aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Page2008-07-08 06:00:39 +0000
committerChristopher Page2008-07-08 06:00:39 +0000
commitb8fe71e7a12e60f0c19fa86da83f270dc09e14fd (patch)
treed94aa645b95cd237f53713c5ead37ab196af38de
parent94beb3037e55803dd45e5720af8320f0ebccb9ac (diff)
downloadscummvm-rg350-b8fe71e7a12e60f0c19fa86da83f270dc09e14fd.tar.gz
scummvm-rg350-b8fe71e7a12e60f0c19fa86da83f270dc09e14fd.tar.bz2
scummvm-rg350-b8fe71e7a12e60f0c19fa86da83f270dc09e14fd.zip
Updated KYRA to work with the new GMM implementation
svn-id: r32959
-rw-r--r--engines/kyra/gui_hof.cpp2
-rw-r--r--engines/kyra/gui_lok.cpp14
-rw-r--r--engines/kyra/gui_mr.cpp2
-rw-r--r--engines/kyra/gui_v2.cpp2
-rw-r--r--engines/kyra/kyra_hof.cpp6
-rw-r--r--engines/kyra/kyra_lok.cpp12
-rw-r--r--engines/kyra/kyra_mr.cpp8
-rw-r--r--engines/kyra/kyra_v1.cpp2
-rw-r--r--engines/kyra/kyra_v1.h2
-rw-r--r--engines/kyra/kyra_v2.cpp2
-rw-r--r--engines/kyra/saveload.cpp2
-rw-r--r--engines/kyra/saveload_lok.cpp2
-rw-r--r--engines/kyra/scene_hof.cpp2
-rw-r--r--engines/kyra/scene_mr.cpp2
-rw-r--r--engines/kyra/script_mr.cpp2
-rw-r--r--engines/kyra/sequences_hof.cpp22
-rw-r--r--engines/kyra/sequences_lok.cpp14
-rw-r--r--engines/kyra/text_hof.cpp12
-rw-r--r--engines/kyra/text_mr.cpp10
19 files changed, 59 insertions, 61 deletions
diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp
index ca68413cb8..032c28d44d 100644
--- a/engines/kyra/gui_hof.cpp
+++ b/engines/kyra/gui_hof.cpp
@@ -500,7 +500,7 @@ void KyraEngine_HoF::bookLoop() {
showBookPage();
_bookShown = true;
- while (_bookShown && !_eventMan->shouldQuit()) {
+ while (_bookShown && !quit()) {
checkInput(buttonList);
removeInputTop();
diff --git a/engines/kyra/gui_lok.cpp b/engines/kyra/gui_lok.cpp
index 055b5366ca..c725659089 100644
--- a/engines/kyra/gui_lok.cpp
+++ b/engines/kyra/gui_lok.cpp
@@ -459,7 +459,7 @@ int GUI_LoK::buttonMenuCallback(Button *caller) {
updateAllMenuButtons();
}
- while (_displayMenu && !_vm->_eventMan->shouldQuit()) {
+ while (_displayMenu && !_vm->quit()) {
Common::Point mouse = _vm->getMousePos();
processHighlights(_menu[_toplevelMenu], mouse.x, mouse.y);
processButtonList(_menuButtonList, 0, 0);
@@ -579,7 +579,7 @@ int GUI_LoK::saveGameMenu(Button *button) {
_displaySubMenu = true;
_cancelSubMenu = false;
- while (_displaySubMenu && !_vm->_eventMan->shouldQuit()) {
+ while (_displaySubMenu && !_vm->quit()) {
getInput();
Common::Point mouse = _vm->getMousePos();
processHighlights(_menu[2], mouse.x, mouse.y);
@@ -628,7 +628,7 @@ int GUI_LoK::loadGameMenu(Button *button) {
_vm->_gameToLoad = -1;
- while (_displaySubMenu && !_vm->_eventMan->shouldQuit()) {
+ while (_displaySubMenu && !_vm->quit()) {
getInput();
Common::Point mouse = _vm->getMousePos();
processHighlights(_menu[2], mouse.x, mouse.y);
@@ -716,7 +716,7 @@ int GUI_LoK::saveGame(Button *button) {
}
redrawTextfield();
- while (_displaySubMenu && !_vm->_eventMan->shouldQuit()) {
+ while (_displaySubMenu && !_vm->quit()) {
getInput();
updateSavegameString();
Common::Point mouse = _vm->getMousePos();
@@ -770,7 +770,7 @@ int GUI_LoK::quitPlaying(Button *button) {
updateMenuButton(button);
if (quitConfirm(_vm->_guiStrings[14])) { // Are you sure you want to quit playing?
- _vm->_eventMan->pushEvent(Common::EVENT_QUIT);
+ _vm->quitGame();
} else {
initMenu(_menu[_toplevelMenu]);
updateAllMenuButtons();
@@ -792,7 +792,7 @@ bool GUI_LoK::quitConfirm(const char *str) {
_displaySubMenu = true;
_cancelSubMenu = true;
- while (_displaySubMenu && !_vm->_eventMan->shouldQuit()) {
+ while (_displaySubMenu && !_vm->quit()) {
getInput();
Common::Point mouse = _vm->getMousePos();
processHighlights(_menu[1], mouse.x, mouse.y);
@@ -858,7 +858,7 @@ int GUI_LoK::gameControlsMenu(Button *button) {
_displaySubMenu = true;
_cancelSubMenu = false;
- while (_displaySubMenu && !_vm->_eventMan->shouldQuit()) {
+ while (_displaySubMenu && !_vm->quit()) {
getInput();
Common::Point mouse = _vm->getMousePos();
processHighlights(_menu[5], mouse.x, mouse.y);
diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp
index 5262d2819e..40fe78c439 100644
--- a/engines/kyra/gui_mr.cpp
+++ b/engines/kyra/gui_mr.cpp
@@ -868,7 +868,7 @@ void KyraEngine_MR::processAlbum() {
albumNewPage();
_album.running = true;
- while (_album.running && !_eventMan->shouldQuit()) {
+ while (_album.running && !quit()) {
updateInput();
checkInput(buttonList);
removeInputTop();
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index 37dc254acd..11f430040c 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -823,7 +823,7 @@ void GUI_v2::checkTextfieldInput() {
switch (event.type) {
case Common::EVENT_KEYDOWN:
if (event.kbd.keycode == 'q' && event.kbd.flags == Common::KBD_CTRL)
- _vm->_eventMan->pushEvent(Common::EVENT_QUIT);
+ _vm->quitGame();
else
_keyPressed = event.kbd;
running = false;
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp
index 74332ecc8f..470e5f0343 100644
--- a/engines/kyra/kyra_hof.cpp
+++ b/engines/kyra/kyra_hof.cpp
@@ -441,7 +441,7 @@ void KyraEngine_HoF::runLoop() {
_screen->updateScreen();
_runFlag = true;
- while (!_eventMan->shouldQuit() && _runFlag) {
+ while (!quit() && _runFlag) {
if (_deathHandler >= 0) {
removeHandItem();
delay(5);
@@ -1602,7 +1602,7 @@ void KyraEngine_HoF::loadInvWsa(const char *filename, int run, int delayTime, in
_invWsa.timer = _system->getMillis();
if (run) {
- while (_invWsa.running && !skipFlag() && !_eventMan->shouldQuit()) {
+ while (_invWsa.running && !skipFlag() && !quit()) {
update();
_system->delayMillis(10);
}
@@ -1976,7 +1976,7 @@ void KyraEngine_HoF::playTim(const char *filename) {
return;
_tim->resetFinishedFlag();
- while (!_eventMan->shouldQuit() && !_tim->finished()) {
+ while (!quit() && !_tim->finished()) {
_tim->exec(tim, 0);
if (_chatText)
updateWithText();
diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp
index 6525d3cfbe..747513cc52 100644
--- a/engines/kyra/kyra_lok.cpp
+++ b/engines/kyra/kyra_lok.cpp
@@ -300,7 +300,7 @@ int KyraEngine_LoK::go() {
if (_gameToLoad == -1) {
setGameFlag(0xEF);
seq_intro();
- if (_eventMan->shouldQuit())
+ if (quit())
return _eventMan->shouldRTL();
if (_skipIntroFlag && _abortIntroFlag)
resetGameFlag(0xEF);
@@ -399,7 +399,7 @@ void KyraEngine_LoK::startup() {
void KyraEngine_LoK::mainLoop() {
debugC(9, kDebugLevelMain, "KyraEngine_LoK::mainLoop()");
- while (!_eventMan->shouldQuit()) {
+ while (!quit()) {
int32 frameTime = (int32)_system->getMillis();
_skipFlag = false;
@@ -444,7 +444,7 @@ void KyraEngine_LoK::mainLoop() {
}
void KyraEngine_LoK::delayUntil(uint32 timestamp, bool updateTimers, bool update, bool isMainLoop) {
- while (_system->getMillis() < timestamp && !_eventMan->shouldQuit()) {
+ while (_system->getMillis() < timestamp && !quit()) {
if (updateTimers)
_timer->update();
@@ -526,19 +526,19 @@ void KyraEngine_LoK::delay(uint32 amount, bool update, bool isMainLoop) {
if (_skipFlag && !_abortIntroFlag && !queryGameFlag(0xFE))
_skipFlag = false;
- if (amount > 0 && !_skipFlag && !_eventMan->shouldQuit())
+ if (amount > 0 && !_skipFlag && !quit())
_system->delayMillis(10);
if (_skipFlag)
_sound->voiceStop();
- } while (!_skipFlag && _system->getMillis() < start + amount && !_eventMan->shouldQuit());
+ } while (!_skipFlag && _system->getMillis() < start + amount && !quit());
}
void KyraEngine_LoK::waitForEvent() {
bool finished = false;
Common::Event event;
- while (!finished && !_eventMan->shouldQuit()) {
+ while (!finished && !quit()) {
while (_eventMan->pollEvent(event)) {
switch (event.type) {
case Common::EVENT_KEYDOWN:
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp
index 431bdf4109..700bec10b7 100644
--- a/engines/kyra/kyra_mr.cpp
+++ b/engines/kyra/kyra_mr.cpp
@@ -263,7 +263,7 @@ int KyraEngine_MR::go() {
running = false;
}
- while (running && !_eventMan->shouldQuit()) {
+ while (running && !quit()) {
_screen->_curPage = 0;
_screen->clearPage(0);
@@ -272,14 +272,14 @@ int KyraEngine_MR::go() {
// XXX
playMenuAudioFile();
- for (int i = 0; i < 64 && !_eventMan->shouldQuit(); ++i) {
+ for (int i = 0; i < 64 && !quit(); ++i) {
uint32 nextRun = _system->getMillis() + 3 * _tickLength;
_menuAnim->displayFrame(i, 0);
_screen->updateScreen();
delayUntil(nextRun);
}
- for (int i = 64; i > 29 && !_eventMan->shouldQuit(); --i) {
+ for (int i = 64; i > 29 && !quit(); --i) {
uint32 nextRun = _system->getMillis() + 3 * _tickLength;
_menuAnim->displayFrame(i, 0);
_screen->updateScreen();
@@ -987,7 +987,7 @@ void KyraEngine_MR::runLoop() {
_eventList.clear();
_runFlag = true;
- while (_runFlag && !_eventMan->shouldQuit()) {
+ while (_runFlag && !quit()) {
if (_deathHandler >= 0) {
removeHandItem();
delay(5);
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index 068e2f681b..c7b39aa257 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -256,7 +256,7 @@ int KyraEngine_v1::resetGameFlag(int flag) {
}
void KyraEngine_v1::delayUntil(uint32 timestamp, bool updateTimers, bool update, bool isMainLoop) {
- while (_system->getMillis() < timestamp && !_eventMan->shouldQuit()) {
+ while (_system->getMillis() < timestamp && !quit()) {
if (timestamp - _system->getMillis() >= 10)
delay(10, update, isMainLoop);
}
diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h
index 8021abd1ef..921d5ba033 100644
--- a/engines/kyra/kyra_v1.h
+++ b/engines/kyra/kyra_v1.h
@@ -112,8 +112,6 @@ public:
virtual void pauseEngineIntern(bool pause);
- bool quit() const { return _eventMan->shouldQuit(); }
-
uint8 game() const { return _flags.gameID; }
const GameFlags &gameFlags() const { return _flags; }
diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp
index d55c50dd7b..20875202e5 100644
--- a/engines/kyra/kyra_v2.cpp
+++ b/engines/kyra/kyra_v2.cpp
@@ -127,7 +127,7 @@ void KyraEngine_v2::delay(uint32 amount, bool updateGame, bool isMainLoop) {
if (amount > 0)
_system->delayMillis(amount > 10 ? 10 : amount);
- } while (!skipFlag() && _system->getMillis() < start + amount && !_eventMan->shouldQuit());
+ } while (!skipFlag() && _system->getMillis() < start + amount && !quit());
}
int KyraEngine_v2::checkInput(Button *buttonList, bool mainLoop) {
diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp
index e91c4cdaf7..147c774a52 100644
--- a/engines/kyra/saveload.cpp
+++ b/engines/kyra/saveload.cpp
@@ -161,7 +161,7 @@ Common::InSaveFile *KyraEngine_v1::openSaveForReading(const char *filename, Save
Common::OutSaveFile *KyraEngine_v1::openSaveForWriting(const char *filename, const char *saveName) const {
debugC(9, kDebugLevelMain, "KyraEngine_v1::openSaveForWriting('%s', '%s')", filename, saveName);
- if (_eventMan->shouldQuit())
+ if (quit())
return 0;
Common::OutSaveFile *out = 0;
diff --git a/engines/kyra/saveload_lok.cpp b/engines/kyra/saveload_lok.cpp
index 8dbe85485f..74cf26646c 100644
--- a/engines/kyra/saveload_lok.cpp
+++ b/engines/kyra/saveload_lok.cpp
@@ -221,7 +221,7 @@ void KyraEngine_LoK::loadGame(const char *fileName) {
void KyraEngine_LoK::saveGame(const char *fileName, const char *saveName) {
debugC(9, kDebugLevelMain, "KyraEngine_LoK::saveGame('%s', '%s')", fileName, saveName);
- if (_eventMan->shouldQuit())
+ if (quit())
return;
Common::OutSaveFile *out = openSaveForWriting(fileName, saveName);
diff --git a/engines/kyra/scene_hof.cpp b/engines/kyra/scene_hof.cpp
index feb73abbc5..dbf54e1fcd 100644
--- a/engines/kyra/scene_hof.cpp
+++ b/engines/kyra/scene_hof.cpp
@@ -277,7 +277,7 @@ int KyraEngine_HoF::trySceneChange(int *moveTable, int unk1, int updateChar) {
int changedScene = 0;
const int *moveTableStart = moveTable;
_unk4 = 0;
- while (running && !_eventMan->shouldQuit()) {
+ while (running && !quit()) {
if (*moveTable >= 0 && *moveTable <= 7) {
_mainCharacter.facing = getOppositeFacingDirection(*moveTable);
unkFlag = true;
diff --git a/engines/kyra/scene_mr.cpp b/engines/kyra/scene_mr.cpp
index 6c12f9a62d..716c139129 100644
--- a/engines/kyra/scene_mr.cpp
+++ b/engines/kyra/scene_mr.cpp
@@ -653,7 +653,7 @@ int KyraEngine_MR::trySceneChange(int *moveTable, int unk1, int updateChar) {
const int *moveTableStart = moveTable;
_unk4 = 0;
- while (running && !_eventMan->shouldQuit()) {
+ while (running && !quit()) {
if (*moveTable >= 0 && *moveTable <= 7) {
_mainCharacter.facing = getOppositeFacingDirection(*moveTable);
unkFlag = true;
diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp
index 2dba9b550f..6dda6c8bd7 100644
--- a/engines/kyra/script_mr.cpp
+++ b/engines/kyra/script_mr.cpp
@@ -786,7 +786,7 @@ int KyraEngine_MR::o3_daggerWarning(EMCState *script) {
_screen->_curPage = curPageBackUp;
_screen->showMouse();
- while (!_eventMan->shouldQuit()) {
+ while (!quit()) {
int keys = checkInput(0);
removeInputTop();
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index 520a5e063b..7e0220af8a 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -75,7 +75,7 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
_seqEndTime = 0;
_menuChoice = 0;
- for (int seqNum = startSeq; seqNum <= endSeq && !((skipFlag() && allowSkip) || _eventMan->shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice); seqNum++) {
+ for (int seqNum = startSeq; seqNum <= endSeq && !((skipFlag() && allowSkip) || quit() || (_abortIntroFlag && allowSkip) || _menuChoice); seqNum++) {
_screen->clearPage(0);
_screen->clearPage(8);
memcpy(_screen->getPalette(1), _screen->getPalette(0), 0x300);
@@ -131,7 +131,7 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
seq_sequenceCommand(cseq.startupCommand);
- if (!((skipFlag() && allowSkip) || _eventMan->shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ if (!((skipFlag() && allowSkip) || quit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
_screen->copyPage(2, 0);
_screen->updateScreen();
}
@@ -165,7 +165,7 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
_seqWsaCurrentFrame = cseq.startFrame;
bool loop = true;
- while (loop && !((skipFlag() && allowSkip) || _eventMan->shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ while (loop && !((skipFlag() && allowSkip) || quit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
_seqEndTime = _system->getMillis() + _seqFrameDelay * _tickLength;
if (_seqWsa || !cb)
@@ -189,16 +189,16 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
seq_processWSAs();
seq_processText();
- if ((_seqWsa || !cb) && !((skipFlag() && allowSkip) || _eventMan->shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ if ((_seqWsa || !cb) && !((skipFlag() && allowSkip) || quit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
_screen->copyPage(2, 0);
_screen->updateScreen();
}
bool loop2 = true;
- while (loop2 && !((skipFlag() && allowSkip) || _eventMan->shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ while (loop2 && !((skipFlag() && allowSkip) || quit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
if (_seqWsa) {
seq_processText();
- if (!((skipFlag() && allowSkip) || _eventMan->shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ if (!((skipFlag() && allowSkip) || quit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
_screen->copyPage(2, 0);
_screen->updateScreen();
}
@@ -230,7 +230,7 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
} else {
_seqFrameDelay = cseq.frameDelay;
_seqEndTime = _system->getMillis() + _seqFrameDelay * _tickLength;
- while (!((skipFlag() && allowSkip) || _eventMan->shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ while (!((skipFlag() && allowSkip) || quit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
_seqSubFrameStartTime = _system->getMillis();
seq_processWSAs();
if (cb)
@@ -262,7 +262,7 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
dl = ct;
_seqEndTime = _system->getMillis() + dl;
- while (!((skipFlag() && allowSkip) || _eventMan->shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ while (!((skipFlag() && allowSkip) || quit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
_seqSubFrameStartTime = _system->getMillis();
seq_processWSAs();
@@ -2093,7 +2093,7 @@ void KyraEngine_HoF::seq_loadNestedSequence(int wsaNum, int seqNum) {
void KyraEngine_HoF::seq_nestedSequenceFrame(int command, int wsaNum) {
int xa = 0, ya = 0;
command--;
- if (!_activeWSA[wsaNum].movie || skipFlag() || _eventMan->shouldQuit() || _abortIntroFlag)
+ if (!_activeWSA[wsaNum].movie || skipFlag() || quit() || _abortIntroFlag)
return;
switch (command) {
@@ -2293,7 +2293,7 @@ bool KyraEngine_HoF::seq_processNextSubFrame(int wsaNum) {
void KyraEngine_HoF::seq_printCreditsString(uint16 strIndex, int x, int y, const uint8 *colorMap, uint8 textcolor) {
uint8 colormap[16];
- if (skipFlag() || _eventMan->shouldQuit() || _abortIntroFlag || _menuChoice)
+ if (skipFlag() || quit() || _abortIntroFlag || _menuChoice)
return;
memset(&_screen->getPalette(0)[0x2fa], 0x3f, 6);
@@ -2774,7 +2774,7 @@ void KyraEngine_HoF::seq_makeBookAppear() {
++_invWsa.curFrame;
- if (_invWsa.curFrame >= _invWsa.lastFrame && !_eventMan->shouldQuit())
+ if (_invWsa.curFrame >= _invWsa.lastFrame && !quit())
break;
switch (_invWsa.curFrame) {
diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp
index 73cf634826..8005167d7d 100644
--- a/engines/kyra/sequences_lok.cpp
+++ b/engines/kyra/sequences_lok.cpp
@@ -164,7 +164,7 @@ void KyraEngine_LoK::seq_introLogos() {
_screen->updateScreen();
_screen->fadeFromBlack();
- if (_seq->playSequence(_seq_WestwoodLogo, _skipFlag) || _eventMan->shouldQuit()) {
+ if (_seq->playSequence(_seq_WestwoodLogo, _skipFlag) || quit()) {
_screen->fadeToBlack();
_screen->clearPage(0);
return;
@@ -176,14 +176,14 @@ void KyraEngine_LoK::seq_introLogos() {
_screen->setScreenPalette(_screen->_currentPalette);
}
- if ((_seq->playSequence(_seq_KyrandiaLogo, _skipFlag) && !seq_skipSequence()) || _eventMan->shouldQuit()) {
+ if ((_seq->playSequence(_seq_KyrandiaLogo, _skipFlag) && !seq_skipSequence()) || quit()) {
_screen->fadeToBlack();
_screen->clearPage(0);
return;
}
_screen->fillRect(0, 179, 319, 199, 0);
- if (_eventMan->shouldQuit())
+ if (quit())
return;
if (_flags.platform == Common::kPlatformAmiga) {
@@ -223,10 +223,10 @@ void KyraEngine_LoK::seq_introLogos() {
oldDistance = distance;
delay(10);
- } while (!doneFlag && !_eventMan->shouldQuit() && !_abortIntroFlag);
+ } while (!doneFlag && !quit() && !_abortIntroFlag);
}
- if (_eventMan->shouldQuit())
+ if (quit())
return;
_seq->playSequence(_seq_Forest, true);
@@ -1030,7 +1030,7 @@ void KyraEngine_LoK::seq_brandonToStone() {
void KyraEngine_LoK::seq_playEnding() {
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_playEnding()");
- if (_eventMan->shouldQuit())
+ if (quit())
return;
_screen->hideMouse();
_screen->_curPage = 0;
@@ -1210,7 +1210,7 @@ void KyraEngine_LoK::seq_playCredits() {
bool KyraEngine_LoK::seq_skipSequence() const {
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_skipSequence()");
- return _eventMan->shouldQuit() || _abortIntroFlag;
+ return quit() || _abortIntroFlag;
}
int KyraEngine_LoK::handleMalcolmFlag() {
diff --git a/engines/kyra/text_hof.cpp b/engines/kyra/text_hof.cpp
index 4a109966b0..b94b8a6258 100644
--- a/engines/kyra/text_hof.cpp
+++ b/engines/kyra/text_hof.cpp
@@ -335,7 +335,7 @@ void KyraEngine_HoF::objectChatWaitToFinish() {
const uint32 endTime = _chatEndTime;
resetSkipFlag();
- while (running && !_eventMan->shouldQuit()) {
+ while (running && !quit()) {
if (!_emc->isValid(&_chatScriptState))
_emc->start(&_chatScriptState, 1);
@@ -353,7 +353,7 @@ void KyraEngine_HoF::objectChatWaitToFinish() {
uint32 nextFrame = _system->getMillis() + delayTime * _tickLength;
- while (_system->getMillis() < nextFrame && !_eventMan->shouldQuit()) {
+ while (_system->getMillis() < nextFrame && !quit()) {
updateWithText();
const uint32 curTime = _system->getMillis();
@@ -593,7 +593,7 @@ void KyraEngine_HoF::initTalkObject(int index) {
if (_currentTalkSections.STATim) {
_tim->resetFinishedFlag();
- while (!_eventMan->shouldQuit() && !_tim->finished()) {
+ while (!quit() && !_tim->finished()) {
_tim->exec(_currentTalkSections.STATim, false);
if (_chatText)
updateWithText();
@@ -609,7 +609,7 @@ void KyraEngine_HoF::deinitTalkObject(int index) {
if (_currentTalkSections.ENDTim) {
_tim->resetFinishedFlag();
- while (!_eventMan->shouldQuit() && !_tim->finished()) {
+ while (!quit() && !_tim->finished()) {
_tim->exec(_currentTalkSections.ENDTim, false);
if (_chatText)
updateWithText();
@@ -647,10 +647,10 @@ void KyraEngine_HoF::npcChatSequence(const char *str, int objectId, int vocHigh,
_chatVocHigh = _chatVocLow = -1;
}
- while (((textEnabled() && _chatEndTime > _system->getMillis()) || (speechEnabled() && snd_voiceIsPlaying())) && !(_eventMan->shouldQuit() || skipFlag())) {
+ while (((textEnabled() && _chatEndTime > _system->getMillis()) || (speechEnabled() && snd_voiceIsPlaying())) && !(quit() || skipFlag())) {
if ((!speechEnabled() && chatAnimEndTime > _system->getMillis()) || (speechEnabled() && snd_voiceIsPlaying())) {
_tim->resetFinishedFlag();
- while (!_tim->finished() && !skipFlag() && !_eventMan->shouldQuit()) {
+ while (!_tim->finished() && !skipFlag() && !quit()) {
if (_currentTalkSections.TLKTim)
_tim->exec(_currentTalkSections.TLKTim, false);
else
diff --git a/engines/kyra/text_mr.cpp b/engines/kyra/text_mr.cpp
index d9ef59e226..be306ceec1 100644
--- a/engines/kyra/text_mr.cpp
+++ b/engines/kyra/text_mr.cpp
@@ -349,7 +349,7 @@ void KyraEngine_MR::objectChatWaitToFinish() {
const uint32 endTime = _chatEndTime;
resetSkipFlag();
- while (running && !_eventMan->shouldQuit()) {
+ while (running && !quit()) {
if (!_emc->isValid(&_chatScriptState))
_emc->start(&_chatScriptState, 1);
@@ -367,7 +367,7 @@ void KyraEngine_MR::objectChatWaitToFinish() {
uint32 nextFrame = _system->getMillis() + delayTime * _tickLength;
- while (_system->getMillis() < nextFrame && !_eventMan->shouldQuit()) {
+ while (_system->getMillis() < nextFrame && !quit()) {
updateWithText();
const uint32 curTime = _system->getMillis();
@@ -419,7 +419,7 @@ void KyraEngine_MR::badConscienceChatWaitToFinish() {
uint32 nextFrame = _system->getMillis() + _rnd.getRandomNumberRng(4, 8) * _tickLength;
int frame = _badConscienceFrameTable[_badConscienceAnim+24];
- while (running && !_eventMan->shouldQuit()) {
+ while (running && !quit()) {
if (nextFrame < _system->getMillis()) {
++frame;
if (_badConscienceFrameTable[_badConscienceAnim+32] < frame)
@@ -477,7 +477,7 @@ void KyraEngine_MR::goodConscienceChatWaitToFinish() {
uint32 nextFrame = _system->getMillis() + _rnd.getRandomNumberRng(3, 6) * _tickLength;
int frame = _goodConscienceFrameTable[_goodConscienceAnim+15];
- while (running && !_eventMan->shouldQuit()) {
+ while (running && !quit()) {
if (nextFrame < _system->getMillis()) {
++frame;
if (_goodConscienceFrameTable[_goodConscienceAnim+20] < frame)
@@ -597,7 +597,7 @@ void KyraEngine_MR::albumChatWaitToFinish() {
uint32 nextFrame = 0;
int frame = 12;
- while (running && !_eventMan->shouldQuit()) {
+ while (running && !quit()) {
if (nextFrame < _system->getMillis()) {
++frame;
if (frame > 22)