From 1bc6242caac5261dfd74be55027aa033f7a297a4 Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 4 Apr 2022 22:28:16 +0200 Subject: Streamlined game loops --- StarsEx/Starshatter.cpp | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'StarsEx/Starshatter.cpp') diff --git a/StarsEx/Starshatter.cpp b/StarsEx/Starshatter.cpp index 415a04b..cc36461 100644 --- a/StarsEx/Starshatter.cpp +++ b/StarsEx/Starshatter.cpp @@ -789,43 +789,6 @@ Starshatter::KeyDown(int action) const // +--------------------------------------------------------------------+ -bool -Starshatter::GameLoop() -{ - cam_dir = CameraDirector::GetInstance(); - - if (active && paused) { - // Route Events to EventTargets - EventDispatch* ed = EventDispatch::GetInstance(); - if (ed) - ed->Dispatch(); - - UpdateWorld(); - GameState(); - UpdateScreen(); - - /*** - static DWORD vmf_time = 0; - - if (real_time() - vmf_time > 5000) { - vmf_time = real_time(); - DWORD vmf = video->VidMemFree() / (1024 * 1024); - ::Print("\n###### %02d:%02d - Video Memory Free: %d MB\n\n", - vmf_time / 60000, - vmf_time / 1000, - vmf); - } - ***/ - } - - Game::GameLoop(); - return false; // must return false to keep processing - // true tells the outer loop to sleep until a - // windows event is available -} - -// +--------------------------------------------------------------------+ - void Starshatter::UpdateWorld() { -- cgit v1.1