diff options
author | Arnaud Boutonné | 2011-02-03 18:25:38 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2011-02-03 18:25:38 +0000 |
commit | 935b3187982afb8a8c1aebded8b5ddc607e27f0f (patch) | |
tree | 96e092ef06cb439f25db0b91ab43be653c8756a6 /engines/hugo/hugo.cpp | |
parent | 38444a3712543f60f5daf8106ef3b2d66c6f9ab9 (diff) | |
download | scummvm-rg350-935b3187982afb8a8c1aebded8b5ddc607e27f0f.tar.gz scummvm-rg350-935b3187982afb8a8c1aebded8b5ddc607e27f0f.tar.bz2 scummvm-rg350-935b3187982afb8a8c1aebded8b5ddc607e27f0f.zip |
HUGO: Suppress static variables (except one)
This also fixes the multiple-RTL related music bug reported by D. Gray
svn-id: r55758
Diffstat (limited to 'engines/hugo/hugo.cpp')
-rw-r--r-- | engines/hugo/hugo.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index 78d7b9a581..7014b66f87 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -62,8 +62,7 @@ HugoEngine::HugoEngine(OSystem *syst, const HugoGameDescription *gd) : Engine(sy _arrayReqs(0), _hotspots(0), _invent(0), _uses(0), _catchallList(0), _backgroundObjects(0), _points(0), _cmdList(0), _screenActs(0), _hero(0), _heroImage(0), _defltTunes(0), _introX(0), _introY(0), _maxInvent(0), _numBonuses(0), _numScreens(0), _tunesNbr(0), _soundSilence(0), _soundTest(0), _screenStates(0), _score(0), _maxscore(0), - _backgroundObjectsSize(0), _screenActsSize(0), _usesSize(0) - + _backgroundObjectsSize(0), _screenActsSize(0), _usesSize(0), _lastTime(0), _curTime(0) { _system = syst; DebugMan.addDebugChannel(kDebugSchedule, "Schedule", "Script Schedule debug level"); @@ -305,9 +304,6 @@ void HugoEngine::initMachine() { * Hugo game state machine - called during onIdle */ void HugoEngine::runMachine() { - static uint32 lastTime; - uint32 curTime; - status_t &gameStatus = getGameStatus(); // Don't process if we're in a textbox if (gameStatus.textBoxFl) @@ -317,13 +313,13 @@ void HugoEngine::runMachine() { if (gameStatus.gameOverFl) return; - curTime = g_system->getMillis(); + _curTime = g_system->getMillis(); // Process machine once every tick - while (curTime - lastTime < (uint32)(1000 / getTPS())) { + while (_curTime - _lastTime < (uint32)(1000 / getTPS())) { g_system->delayMillis(5); - curTime = g_system->getMillis(); + _curTime = g_system->getMillis(); } - lastTime = curTime; + _lastTime = _curTime; switch (gameStatus.viewState) { case kViewIdle: // Not processing state machine |