From d09b482bcb976ab36a5a4aa670b7258b1e12a65c Mon Sep 17 00:00:00 2001 From: uruk Date: Thu, 6 Mar 2014 23:01:53 +0100 Subject: AVALANCHE: Implement MainMenu::wait(). Rework other pieces of the engine to fit to it's mechanism. --- engines/avalanche/avalot.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'engines/avalanche/avalot.cpp') diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index fefbbedd34..ae96ac4c74 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -211,7 +211,9 @@ void AvalancheEngine::setup() { loadGame(loadSlot); } else { _mainmenu->run(); - + if (_letMeOut) + return; + newGame(); thinkAbout(kObjectMoney, kThing); @@ -223,7 +225,7 @@ void AvalancheEngine::setup() { void AvalancheEngine::runAvalot() { setup(); - do { + while (!_letMeOut && !shouldQuit()) { uint32 beginLoop = _system->getMillis(); updateEvents(); // The event handler. @@ -241,7 +243,7 @@ void AvalancheEngine::runAvalot() { uint32 delay = _system->getMillis() - beginLoop; if (delay <= 55) _system->delayMillis(55 - delay); // Replaces slowdown(); 55 comes from 18.2 Hz (B Flight). - } while (!_letMeOut && !shouldQuit()); + }; warning("STUB: run()"); -- cgit v1.2.3