Move calculations outside of the loop, as they only need to be calculated once per frame.

Bit of cleanup.
This commit is contained in:
Malkierian
2024-12-09 16:48:06 -07:00
committed by Alejandro Asenjo Nitti
parent 354de2f364
commit 48aa44f401
2 changed files with 6 additions and 14 deletions
-8
View File
@@ -588,12 +588,4 @@ extern "C" void* GameEngine_Malloc(size_t size) {
memset(static_cast<uint8_t*>(MemoryPool.memory) + MemoryPool.length, 0, MemoryPool.length - chunk);
SPDLOG_INFO("Memory pool resized from {} to {}", MemoryPool.length - chunk, MemoryPool.length);
return GameEngine_Malloc(size);
}
extern "C" float GetWindowWidth() {
return Ship::Context::GetInstance()->GetWindow()->GetWidth();
}
extern "C" float GetWindowHeight() {
return Ship::Context::GetInstance()->GetWindow()->GetHeight();
}