logging macros
This commit is contained in:
@@ -22,27 +22,27 @@ namespace Game
|
||||
|
||||
void Setup(SharedData& shared)
|
||||
{
|
||||
Log("Game Setup Start!");
|
||||
LOG("Game Setup Start!");
|
||||
|
||||
if (shared.Game.PermanentStorage == nullptr)
|
||||
{
|
||||
Log("Game memory not initialized!!");
|
||||
LOG_ERROR("Game memory not initialized!!");
|
||||
return;
|
||||
}
|
||||
if (shared.Game.EntityStorage == nullptr)
|
||||
{
|
||||
Log("Entity memory not initialized!");
|
||||
LOG_ERROR("Entity memory not initialized!");
|
||||
return;
|
||||
}
|
||||
if (shared.Game.PermanentStorageSize < sizeof(GameInstance))
|
||||
{
|
||||
Log("Game memory too small! %u < %u", shared.Game.PermanentStorageSize, sizeof(GameInstance));
|
||||
LOG_ERROR("Game memory too small! %u < %u", shared.Game.PermanentStorageSize, sizeof(GameInstance));
|
||||
return;
|
||||
}
|
||||
GameInstance& instance = *reinterpret_cast<GameInstance*>(shared.Game.PermanentStorage);
|
||||
if (sizeof(GameInstance) != instance.Size)
|
||||
{
|
||||
Log("Game instance size changed, resetting!");
|
||||
LOG_ERROR("Game instance size changed, resetting!");
|
||||
instance = {};
|
||||
}
|
||||
instance.UsedScratchAmount = 0;
|
||||
@@ -81,7 +81,7 @@ namespace Game
|
||||
|
||||
void Shutdown()
|
||||
{
|
||||
Log("Shutdown");
|
||||
LOG("Shutdown");
|
||||
SetupInstance.Rendering.Shutdown();
|
||||
}
|
||||
} // namespace Game
|
||||
|
||||
Reference in New Issue
Block a user