mirror of
https://github.com/HarbourMasters/Starship
synced 2026-08-19 14:23:21 -04:00
Move calculations outside of the loop, as they only need to be calculated once per frame.
Bit of cleanup.
This commit is contained in:
committed by
Alejandro Asenjo Nitti
parent
354de2f364
commit
48aa44f401
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user