diff options
Diffstat (limited to 'engines/tinsel')
-rw-r--r-- | engines/tinsel/inventory.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/tinlib.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/tinsel.cpp | 11 | ||||
-rw-r--r-- | engines/tinsel/tinsel.h | 1 |
4 files changed, 6 insertions, 10 deletions
diff --git a/engines/tinsel/inventory.cpp b/engines/tinsel/inventory.cpp index 2a0f3695c0..e3333bae90 100644 --- a/engines/tinsel/inventory.cpp +++ b/engines/tinsel/inventory.cpp @@ -3073,7 +3073,7 @@ void InventoryProcess(CORO_PARAM, const void *) { InvLoadGame(); break; case IQUITGAME: - _vm->quitFlag = true; + _vm->quitGame(); break; case CLOSEWIN: KillInventory(); diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp index e8364e20dd..bf980f0983 100644 --- a/engines/tinsel/tinlib.cpp +++ b/engines/tinsel/tinlib.cpp @@ -1271,7 +1271,7 @@ void printtag(HPOLYGON hp, SCNHANDLE text) { void quitgame(void) { stopmidi(); stopsample(); - _vm->quitFlag = true; + _vm->quitGame(); } /** diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp index 1f56385283..16e477c947 100644 --- a/engines/tinsel/tinsel.cpp +++ b/engines/tinsel/tinsel.cpp @@ -638,7 +638,6 @@ TinselEngine::TinselEngine(OSystem *syst, const TinselGameDescription *gameDesc) _mousePos.y = 0; _keyHandler = NULL; _dosPlayerDir = 0; - quitFlag = false; } TinselEngine::~TinselEngine() { @@ -678,6 +677,8 @@ int TinselEngine::init() { #if 1 // FIXME: The following is taken from RestartGame(). // It may have to be adjusted a bit + CountOut = 1; + RebootCursor(); RebootDeadTags(); RebootMovers(); @@ -755,7 +756,7 @@ int TinselEngine::go() { // Foreground loop - while (!quitFlag) { + while (!quit()) { assert(_console); if (_console->isAttached()) _console->onFrame(); @@ -789,7 +790,7 @@ int TinselEngine::go() { // Write configuration WriteConfig(); - return 0; + return _eventMan->shouldRTL(); } @@ -819,10 +820,6 @@ bool TinselEngine::pollEvent() { // Handle the various kind of events switch (event.type) { - case Common::EVENT_QUIT: - quitFlag = true; - break; - case Common::EVENT_LBUTTONDOWN: case Common::EVENT_LBUTTONUP: case Common::EVENT_RBUTTONDOWN: diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h index 44cc83af9b..3d0ace19be 100644 --- a/engines/tinsel/tinsel.h +++ b/engines/tinsel/tinsel.h @@ -100,7 +100,6 @@ public: Common::Language getLanguage() const; uint16 getVersion() const; Common::Platform getPlatform() const; - bool quitFlag; SoundManager *_sound; MusicPlayer *_music; |