diff options
author | Gregory Montoir | 2004-10-10 17:12:50 +0000 |
---|---|---|
committer | Gregory Montoir | 2004-10-10 17:12:50 +0000 |
commit | bbf1de48d520c70e2b534aa595238b1eac160b1c (patch) | |
tree | d45db9ffa6e65d93f788a02d29db102807a6772f /queen | |
parent | 09c0855f9ad4631f87f0d5d40ded3e35ae978e38 (diff) | |
download | scummvm-rg350-bbf1de48d520c70e2b534aa595238b1eac160b1c.tar.gz scummvm-rg350-bbf1de48d520c70e2b534aa595238b1eac160b1c.tar.bz2 scummvm-rg350-bbf1de48d520c70e2b534aa595238b1eac160b1c.zip |
make queen engine returning to the launcher when finished (next step: plug all the memory leaks, mainly in Logic class)
svn-id: r15511
Diffstat (limited to 'queen')
-rw-r--r-- | queen/journal.cpp | 4 | ||||
-rw-r--r-- | queen/logic.cpp | 6 | ||||
-rw-r--r-- | queen/queen.cpp | 3 | ||||
-rw-r--r-- | queen/queen.h | 2 |
4 files changed, 10 insertions, 5 deletions
diff --git a/queen/journal.cpp b/queen/journal.cpp index 5a72dbccf1..f1a32bd6a5 100644 --- a/queen/journal.cpp +++ b/queen/journal.cpp @@ -289,7 +289,9 @@ void Journal::handleYesNoMode(int16 zoneNum) { } break; case ZN_GIVEUP: - OSystem::instance()->quit(); + _quit = true; + _quitCleanly = false; + _vm->quitGame(); break; } } else if (zoneNum == ZN_NO) { diff --git a/queen/logic.cpp b/queen/logic.cpp index 95e14a4883..711bb596fd 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -1529,7 +1529,7 @@ void Logic::asmEndGame() { _vm->update(); } debug(0, "Game completed."); - OSystem::instance()->quit(); + _vm->quitGame(); } void Logic::asmPutCameraOnDino() { @@ -1952,7 +1952,7 @@ void Logic::asmPanLeftToBomb() { void Logic::asmEndDemo() { debug(0, "Flight of the Amazon Queen, released January 95."); - OSystem::instance()->quit(); + _vm->quitGame(); } void Logic::asmInterviewIntro() { @@ -1997,7 +1997,7 @@ void Logic::asmInterviewIntro() { void Logic::asmEndInterview() { debug(0, "Interactive Interview copyright (c) 1995, IBI."); - OSystem::instance()->quit(); + _vm->quitGame(); } void Logic::startCredits(const char *filename) { diff --git a/queen/queen.cpp b/queen/queen.cpp index f2f6cd9daf..79b63ed241 100644 --- a/queen/queen.cpp +++ b/queen/queen.cpp @@ -304,7 +304,8 @@ void QueenEngine::go() { _logic->oldRoom(0); _logic->newRoom(_logic->currentRoom()); - for (;;) { + _quit = false; + while (!_quit) { // queen.c lines 4080-4104 if (_logic->newRoom() > 0) { _logic->update(); diff --git a/queen/queen.h b/queen/queen.h index ddc0933b10..7912f151ae 100644 --- a/queen/queen.h +++ b/queen/queen.h @@ -96,6 +96,7 @@ public: void talkSpeed(int speed) { _talkSpeed = speed; } bool subtitles() const { return _subtitles; } void subtitles(bool enable) { _subtitles = enable; } + void quitGame() { _quit = true; } void update(bool checkPlayerInput = false); @@ -121,6 +122,7 @@ protected: int _talkSpeed; bool _subtitles; + bool _quit; BamScene *_bam; BankManager *_bankMan; |