From 10f65a3c6ff96b590d4caa30503e0b5671dd91ca Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 9 Jun 2014 18:01:04 +0200 Subject: CRUISE: some more renaming, remove another useless variable --- engines/cruise/cruise.cpp | 3 +-- engines/cruise/cruise.h | 2 +- engines/cruise/cruise_main.cpp | 9 +++------ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp index 5c1a37a8eb..eebd8fdc15 100644 --- a/engines/cruise/cruise.cpp +++ b/engines/cruise/cruise.cpp @@ -53,8 +53,7 @@ CruiseEngine::CruiseEngine(OSystem * syst, const CRUISEGameDescription *gameDesc PCFadeFlag = false; _preLoad = false; _savedCursor = CURSOR_NOMOUSE; - lastTick = 0; - lastTickDebug = 0; + _lastTick = 0; _gameSpeed = GAME_FRAME_DELAY_1; _speedFlag = false; _polyStructs = nullptr; diff --git a/engines/cruise/cruise.h b/engines/cruise/cruise.h index c81e5dd5ec..8624ba693e 100644 --- a/engines/cruise/cruise.h +++ b/engines/cruise/cruise.h @@ -60,7 +60,7 @@ private: PCSound *_sound; Common::StringArray _langStrings; CursorType _savedCursor; - uint32 lastTick, lastTickDebug; + uint32 _lastTick; int _gameSpeed; bool _speedFlag; diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp index f2f7e0c2b0..cab3e41dd4 100644 --- a/engines/cruise/cruise_main.cpp +++ b/engines/cruise/cruise_main.cpp @@ -1829,10 +1829,7 @@ void CruiseEngine::mainLoop() { if (!skipEvents || bFastMode) skipEvents = manageEvents(); - if (bFastMode) { - if (currentTick >= (lastTickDebug + 10)) - lastTickDebug = currentTick; - } else { + if (!bFastMode) { g_system->delayMillis(10); currentTick = g_system->getMillis(); } @@ -1841,11 +1838,11 @@ void CruiseEngine::mainLoop() { break; _vm->getDebugger()->onFrame(); - } while (currentTick < lastTick + _gameSpeed && !bFastMode); + } while (currentTick < _lastTick + _gameSpeed && !bFastMode); if (_playerDontAskQuit) break; - lastTick = g_system->getMillis(); + _lastTick = g_system->getMillis(); // Handle switchover in game speed after intro if (!_speedFlag && canLoadGameStateCurrently()) { -- cgit v1.2.3