[Scummvm-cvs-logs] SF.net SVN: scummvm: [32957] scummvm/branches/gsoc2008-rtl/engines/kyra
cpage88 at users.sourceforge.net
cpage88 at users.sourceforge.net
Tue Jul 8 07:02:45 CEST 2008
Revision: 32957
http://scummvm.svn.sourceforge.net/scummvm/?rev=32957&view=rev
Author: cpage88
Date: 2008-07-07 22:02:45 -0700 (Mon, 07 Jul 2008)
Log Message:
-----------
KYRA works with the new GMM implementation
Modified Paths:
--------------
scummvm/branches/gsoc2008-rtl/engines/kyra/gui.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/gui_hof.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/gui_lok.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/gui_mr.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/gui_v2.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_hof.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_lok.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_mr.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_v1.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_v1.h
scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_v2.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/saveload.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/saveload_lok.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/scene_hof.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/scene_mr.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/script_mr.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/sequences_hof.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/sequences_lok.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/text_hof.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/text_lok.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/text_mr.cpp
scummvm/branches/gsoc2008-rtl/engines/kyra/vqa.cpp
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/gui.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/gui.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/gui.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -378,9 +378,6 @@
while (_system->getEventManager()->pollEvent(event)) {
switch (event.type) {
- case Common::EVENT_QUIT:
- _vm->quitGame();
- break;
case Common::EVENT_LBUTTONUP:
return true;
default:
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/gui_hof.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/gui_hof.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/gui_hof.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -500,7 +500,7 @@
showBookPage();
_bookShown = true;
- while (_bookShown && !_quit) {
+ while (_bookShown && !_eventMan->shouldQuit()) {
checkInput(buttonList);
removeInputTop();
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/gui_lok.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/gui_lok.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/gui_lok.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -459,7 +459,7 @@
updateAllMenuButtons();
}
- while (_displayMenu && !_vm->_quit) {
+ while (_displayMenu && !_vm->_eventMan->shouldQuit()) {
Common::Point mouse = _vm->getMousePos();
processHighlights(_menu[_toplevelMenu], mouse.x, mouse.y);
processButtonList(_menuButtonList, 0, 0);
@@ -485,9 +485,6 @@
_mouseWheel = 0;
while (_vm->_eventMan->pollEvent(event)) {
switch (event.type) {
- case Common::EVENT_QUIT:
- _vm->quitGame();
- break;
case Common::EVENT_LBUTTONDOWN:
_vm->_mousePressFlag = true;
break;
@@ -582,7 +579,7 @@
_displaySubMenu = true;
_cancelSubMenu = false;
- while (_displaySubMenu && !_vm->_quit) {
+ while (_displaySubMenu && !_vm->_eventMan->shouldQuit()) {
getInput();
Common::Point mouse = _vm->getMousePos();
processHighlights(_menu[2], mouse.x, mouse.y);
@@ -631,7 +628,7 @@
_vm->_gameToLoad = -1;
- while (_displaySubMenu && !_vm->_quit) {
+ while (_displaySubMenu && !_vm->_eventMan->shouldQuit()) {
getInput();
Common::Point mouse = _vm->getMousePos();
processHighlights(_menu[2], mouse.x, mouse.y);
@@ -719,7 +716,7 @@
}
redrawTextfield();
- while (_displaySubMenu && !_vm->_quit) {
+ while (_displaySubMenu && !_vm->_eventMan->shouldQuit()) {
getInput();
updateSavegameString();
Common::Point mouse = _vm->getMousePos();
@@ -773,7 +770,7 @@
updateMenuButton(button);
if (quitConfirm(_vm->_guiStrings[14])) { // Are you sure you want to quit playing?
- _vm->quitGame();
+ _vm->_eventMan->pushEvent(Common::EVENT_QUIT);
} else {
initMenu(_menu[_toplevelMenu]);
updateAllMenuButtons();
@@ -795,7 +792,7 @@
_displaySubMenu = true;
_cancelSubMenu = true;
- while (_displaySubMenu && !_vm->_quit) {
+ while (_displaySubMenu && !_vm->_eventMan->shouldQuit()) {
getInput();
Common::Point mouse = _vm->getMousePos();
processHighlights(_menu[1], mouse.x, mouse.y);
@@ -861,7 +858,7 @@
_displaySubMenu = true;
_cancelSubMenu = false;
- while (_displaySubMenu && !_vm->_quit) {
+ while (_displaySubMenu && !_vm->_eventMan->shouldQuit()) {
getInput();
Common::Point mouse = _vm->getMousePos();
processHighlights(_menu[5], mouse.x, mouse.y);
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/gui_mr.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/gui_mr.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/gui_mr.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -868,7 +868,7 @@
albumNewPage();
_album.running = true;
- while (_album.running && !_quit) {
+ while (_album.running && !_eventMan->shouldQuit()) {
updateInput();
checkInput(buttonList);
removeInputTop();
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/gui_v2.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/gui_v2.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/gui_v2.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -821,13 +821,9 @@
int keys = 0;
while (_vm->_eventMan->pollEvent(event) && running) {
switch (event.type) {
- case Common::EVENT_QUIT:
- _vm->_quit = true;
- break;
-
case Common::EVENT_KEYDOWN:
if (event.kbd.keycode == 'q' && event.kbd.flags == Common::KBD_CTRL)
- _vm->_quit = true;
+ _vm->_eventMan->pushEvent(Common::EVENT_QUIT);
else
_keyPressed = event.kbd;
running = false;
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_hof.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_hof.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_hof.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -311,7 +311,7 @@
seq_playSequences(kSequenceFunters, kSequenceFrash);
}
- return _rtl;
+ return _eventMan->shouldRTL();
}
void KyraEngine_HoF::startup() {
@@ -440,9 +440,8 @@
void KyraEngine_HoF::runLoop() {
_screen->updateScreen();
- _quit = false;
_runFlag = true;
- while (!_quit && _runFlag) {
+ while (!_eventMan->shouldQuit() && _runFlag) {
if (_deathHandler >= 0) {
removeHandItem();
delay(5);
@@ -1603,7 +1602,7 @@
_invWsa.timer = _system->getMillis();
if (run) {
- while (_invWsa.running && !skipFlag() && !_quit) {
+ while (_invWsa.running && !skipFlag() && !_eventMan->shouldQuit()) {
update();
_system->delayMillis(10);
}
@@ -1977,7 +1976,7 @@
return;
_tim->resetFinishedFlag();
- while (!_quit && !_tim->finished()) {
+ while (!_eventMan->shouldQuit() && !_tim->finished()) {
_tim->exec(tim, 0);
if (_chatText)
updateWithText();
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_lok.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_lok.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_lok.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -300,8 +300,8 @@
if (_gameToLoad == -1) {
setGameFlag(0xEF);
seq_intro();
- if (_quit)
- return _rtl;
+ if (_eventMan->shouldQuit())
+ return _eventMan->shouldRTL();
if (_skipIntroFlag && _abortIntroFlag)
resetGameFlag(0xEF);
}
@@ -309,7 +309,7 @@
resetGameFlag(0xEF);
mainLoop();
}
- return _rtl;
+ return _eventMan->shouldRTL();
}
@@ -399,7 +399,7 @@
void KyraEngine_LoK::mainLoop() {
debugC(9, kDebugLevelMain, "KyraEngine_LoK::mainLoop()");
- while (!_quit) {
+ while (!_eventMan->shouldQuit()) {
int32 frameTime = (int32)_system->getMillis();
_skipFlag = false;
@@ -444,7 +444,7 @@
}
void KyraEngine_LoK::delayUntil(uint32 timestamp, bool updateTimers, bool update, bool isMainLoop) {
- while (_system->getMillis() < timestamp && !_quit) {
+ while (_system->getMillis() < timestamp && !_eventMan->shouldQuit()) {
if (updateTimers)
_timer->update();
@@ -476,7 +476,7 @@
if (event.kbd.keycode == 'd')
_debugger->attach();
else if (event.kbd.keycode == 'q')
- _quit = true;
+ quitGame();
} else if (event.kbd.keycode == '.') {
_skipFlag = true;
} else if (event.kbd.keycode == Common::KEYCODE_RETURN || event.kbd.keycode == Common::KEYCODE_SPACE || event.kbd.keycode == Common::KEYCODE_ESCAPE) {
@@ -488,9 +488,6 @@
case Common::EVENT_MOUSEMOVE:
_animator->_updateScreen = true;
break;
- case Common::EVENT_QUIT:
- quitGame();
- break;
case Common::EVENT_LBUTTONDOWN:
_mousePressFlag = true;
break;
@@ -529,27 +526,24 @@
if (_skipFlag && !_abortIntroFlag && !queryGameFlag(0xFE))
_skipFlag = false;
- if (amount > 0 && !_skipFlag && !_quit)
+ if (amount > 0 && !_skipFlag && !_eventMan->shouldQuit())
_system->delayMillis(10);
if (_skipFlag)
_sound->voiceStop();
- } while (!_skipFlag && _system->getMillis() < start + amount && !_quit);
+ } while (!_skipFlag && _system->getMillis() < start + amount && !_eventMan->shouldQuit());
}
void KyraEngine_LoK::waitForEvent() {
bool finished = false;
Common::Event event;
- while (!finished && !_quit) {
+ while (!finished && !_eventMan->shouldQuit()) {
while (_eventMan->pollEvent(event)) {
switch (event.type) {
case Common::EVENT_KEYDOWN:
finished = true;
break;
- case Common::EVENT_QUIT:
- quitGame();
- break;
case Common::EVENT_LBUTTONDOWN:
finished = true;
_skipFlag = true;
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_mr.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_mr.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_mr.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -263,7 +263,7 @@
running = false;
}
- while (running && !_quit) {
+ while (running && !_eventMan->shouldQuit()) {
_screen->_curPage = 0;
_screen->clearPage(0);
@@ -272,14 +272,14 @@
// XXX
playMenuAudioFile();
- for (int i = 0; i < 64 && !_quit; ++i) {
+ for (int i = 0; i < 64 && !_eventMan->shouldQuit(); ++i) {
uint32 nextRun = _system->getMillis() + 3 * _tickLength;
_menuAnim->displayFrame(i, 0);
_screen->updateScreen();
delayUntil(nextRun);
}
- for (int i = 64; i > 29 && !_quit; --i) {
+ for (int i = 64; i > 29 && !_eventMan->shouldQuit(); --i) {
uint32 nextRun = _system->getMillis() + 3 * _tickLength;
_menuAnim->displayFrame(i, 0);
_screen->updateScreen();
@@ -324,7 +324,7 @@
if (_showOutro)
playVQA("CREDITS");
- return _rtl;
+ return _eventMan->shouldRTL();
}
void KyraEngine_MR::initMainMenu() {
@@ -987,7 +987,7 @@
_eventList.clear();
_runFlag = true;
- while (_runFlag && !_quit) {
+ while (_runFlag && !_eventMan->shouldQuit()) {
if (_deathHandler >= 0) {
removeHandItem();
delay(5);
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_v1.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_v1.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_v1.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -218,7 +218,7 @@
void KyraEngine_v1::quitGame() {
debugC(9, kDebugLevelMain, "KyraEngine_v1::quitGame()");
- _quit = true;
+ _eventMan->pushEvent(Common::EVENT_QUIT);
// Nothing to do here
}
@@ -256,7 +256,7 @@
}
void KyraEngine_v1::delayUntil(uint32 timestamp, bool updateTimers, bool update, bool isMainLoop) {
- while (_system->getMillis() < timestamp && !_quit) {
+ while (_system->getMillis() < timestamp && !_eventMan->shouldQuit()) {
if (timestamp - _system->getMillis() >= 10)
delay(10, update, isMainLoop);
}
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_v1.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_v1.h 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_v1.h 2008-07-08 05:02:45 UTC (rev 32957)
@@ -112,7 +112,7 @@
virtual void pauseEngineIntern(bool pause);
- bool quit() const { return _quit; }
+ bool quit() const { return _eventMan->shouldQuit(); }
uint8 game() const { return _flags.gameID; }
const GameFlags &gameFlags() const { return _flags; }
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_v2.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_v2.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/kyra_v2.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -127,7 +127,7 @@
if (amount > 0)
_system->delayMillis(amount > 10 ? 10 : amount);
- } while (!skipFlag() && _system->getMillis() < start + amount && !_quit);
+ } while (!skipFlag() && _system->getMillis() < start + amount && !_eventMan->shouldQuit());
}
int KyraEngine_v2::checkInput(Button *buttonList, bool mainLoop) {
@@ -206,15 +206,11 @@
while (_eventMan->pollEvent(event)) {
switch (event.type) {
- case Common::EVENT_QUIT:
- _quit = true;
- break;
-
case Common::EVENT_KEYDOWN:
if (event.kbd.keycode == '.' || event.kbd.keycode == Common::KEYCODE_ESCAPE)
_eventList.push_back(Event(event, true));
else if (event.kbd.keycode == 'q' && event.kbd.flags == Common::KBD_CTRL)
- _quit = true;
+ quitGame();
else
_eventList.push_back(event);
break;
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/saveload.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/saveload.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/saveload.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -161,7 +161,7 @@
Common::OutSaveFile *KyraEngine_v1::openSaveForWriting(const char *filename, const char *saveName) const {
debugC(9, kDebugLevelMain, "KyraEngine_v1::openSaveForWriting('%s', '%s')", filename, saveName);
- if (_quit)
+ if (_eventMan->shouldQuit())
return 0;
Common::OutSaveFile *out = 0;
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/saveload_lok.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/saveload_lok.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/saveload_lok.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -221,7 +221,7 @@
void KyraEngine_LoK::saveGame(const char *fileName, const char *saveName) {
debugC(9, kDebugLevelMain, "KyraEngine_LoK::saveGame('%s', '%s')", fileName, saveName);
- if (_quit)
+ if (_eventMan->shouldQuit())
return;
Common::OutSaveFile *out = openSaveForWriting(fileName, saveName);
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/scene_hof.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/scene_hof.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/scene_hof.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -277,7 +277,7 @@
int changedScene = 0;
const int *moveTableStart = moveTable;
_unk4 = 0;
- while (running && !_quit) {
+ while (running && !_eventMan->shouldQuit()) {
if (*moveTable >= 0 && *moveTable <= 7) {
_mainCharacter.facing = getOppositeFacingDirection(*moveTable);
unkFlag = true;
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/scene_mr.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/scene_mr.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/scene_mr.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -653,7 +653,7 @@
const int *moveTableStart = moveTable;
_unk4 = 0;
- while (running && !_quit) {
+ while (running && !_eventMan->shouldQuit()) {
if (*moveTable >= 0 && *moveTable <= 7) {
_mainCharacter.facing = getOppositeFacingDirection(*moveTable);
unkFlag = true;
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/script_mr.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/script_mr.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/script_mr.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -786,7 +786,7 @@
_screen->_curPage = curPageBackUp;
_screen->showMouse();
- while (!_quit) {
+ while (!_eventMan->shouldQuit()) {
int keys = checkInput(0);
removeInputTop();
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/sequences_hof.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/sequences_hof.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/sequences_hof.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -75,7 +75,7 @@
_seqEndTime = 0;
_menuChoice = 0;
- for (int seqNum = startSeq; seqNum <= endSeq && !((skipFlag() && allowSkip) || _quit || (_abortIntroFlag && allowSkip) || _menuChoice); seqNum++) {
+ for (int seqNum = startSeq; seqNum <= endSeq && !((skipFlag() && allowSkip) || _eventMan->shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice); seqNum++) {
_screen->clearPage(0);
_screen->clearPage(8);
memcpy(_screen->getPalette(1), _screen->getPalette(0), 0x300);
@@ -131,7 +131,7 @@
seq_sequenceCommand(cseq.startupCommand);
- if (!((skipFlag() && allowSkip) || _quit || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ if (!((skipFlag() && allowSkip) || _eventMan->shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
_screen->copyPage(2, 0);
_screen->updateScreen();
}
@@ -165,7 +165,7 @@
_seqWsaCurrentFrame = cseq.startFrame;
bool loop = true;
- while (loop && !((skipFlag() && allowSkip) || _quit || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ while (loop && !((skipFlag() && allowSkip) || _eventMan->shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
_seqEndTime = _system->getMillis() + _seqFrameDelay * _tickLength;
if (_seqWsa || !cb)
@@ -189,16 +189,16 @@
seq_processWSAs();
seq_processText();
- if ((_seqWsa || !cb) && !((skipFlag() && allowSkip) || _quit || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ if ((_seqWsa || !cb) && !((skipFlag() && allowSkip) || _eventMan->shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
_screen->copyPage(2, 0);
_screen->updateScreen();
}
bool loop2 = true;
- while (loop2 && !((skipFlag() && allowSkip) || _quit || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ while (loop2 && !((skipFlag() && allowSkip) || _eventMan->shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
if (_seqWsa) {
seq_processText();
- if (!((skipFlag() && allowSkip) || _quit || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ if (!((skipFlag() && allowSkip) || _eventMan->shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
_screen->copyPage(2, 0);
_screen->updateScreen();
}
@@ -230,7 +230,7 @@
} else {
_seqFrameDelay = cseq.frameDelay;
_seqEndTime = _system->getMillis() + _seqFrameDelay * _tickLength;
- while (!((skipFlag() && allowSkip) || _quit || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ while (!((skipFlag() && allowSkip) || _eventMan->shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
_seqSubFrameStartTime = _system->getMillis();
seq_processWSAs();
if (cb)
@@ -262,7 +262,7 @@
dl = ct;
_seqEndTime = _system->getMillis() + dl;
- while (!((skipFlag() && allowSkip) || _quit || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ while (!((skipFlag() && allowSkip) || _eventMan->shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
_seqSubFrameStartTime = _system->getMillis();
seq_processWSAs();
@@ -2093,7 +2093,7 @@
void KyraEngine_HoF::seq_nestedSequenceFrame(int command, int wsaNum) {
int xa = 0, ya = 0;
command--;
- if (!_activeWSA[wsaNum].movie || skipFlag() || _quit || _abortIntroFlag)
+ if (!_activeWSA[wsaNum].movie || skipFlag() || _eventMan->shouldQuit() || _abortIntroFlag)
return;
switch (command) {
@@ -2293,7 +2293,7 @@
void KyraEngine_HoF::seq_printCreditsString(uint16 strIndex, int x, int y, const uint8 *colorMap, uint8 textcolor) {
uint8 colormap[16];
- if (skipFlag() || _quit || _abortIntroFlag || _menuChoice)
+ if (skipFlag() || _eventMan->shouldQuit() || _abortIntroFlag || _menuChoice)
return;
memset(&_screen->getPalette(0)[0x2fa], 0x3f, 6);
@@ -2774,7 +2774,7 @@
++_invWsa.curFrame;
- if (_invWsa.curFrame >= _invWsa.lastFrame && !_quit)
+ if (_invWsa.curFrame >= _invWsa.lastFrame && !_eventMan->shouldQuit())
break;
switch (_invWsa.curFrame) {
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/sequences_lok.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/sequences_lok.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/sequences_lok.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -164,7 +164,7 @@
_screen->updateScreen();
_screen->fadeFromBlack();
- if (_seq->playSequence(_seq_WestwoodLogo, _skipFlag) || _quit) {
+ if (_seq->playSequence(_seq_WestwoodLogo, _skipFlag) || _eventMan->shouldQuit()) {
_screen->fadeToBlack();
_screen->clearPage(0);
return;
@@ -176,14 +176,14 @@
_screen->setScreenPalette(_screen->_currentPalette);
}
- if ((_seq->playSequence(_seq_KyrandiaLogo, _skipFlag) && !seq_skipSequence()) || _quit) {
+ if ((_seq->playSequence(_seq_KyrandiaLogo, _skipFlag) && !seq_skipSequence()) || _eventMan->shouldQuit()) {
_screen->fadeToBlack();
_screen->clearPage(0);
return;
}
_screen->fillRect(0, 179, 319, 199, 0);
- if (_quit)
+ if (_eventMan->shouldQuit())
return;
if (_flags.platform == Common::kPlatformAmiga) {
@@ -223,10 +223,10 @@
oldDistance = distance;
delay(10);
- } while (!doneFlag && !_quit && !_abortIntroFlag);
+ } while (!doneFlag && !_eventMan->shouldQuit() && !_abortIntroFlag);
}
- if (_quit)
+ if (_eventMan->shouldQuit())
return;
_seq->playSequence(_seq_Forest, true);
@@ -1030,7 +1030,7 @@
void KyraEngine_LoK::seq_playEnding() {
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_playEnding()");
- if (_quit)
+ if (_eventMan->shouldQuit())
return;
_screen->hideMouse();
_screen->_curPage = 0;
@@ -1187,7 +1187,6 @@
finished = true;
break;
case Common::EVENT_QUIT:
- quitGame();
finished = true;
break;
default:
@@ -1211,7 +1210,7 @@
bool KyraEngine_LoK::seq_skipSequence() const {
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_skipSequence()");
- return _quit || _abortIntroFlag;
+ return _eventMan->shouldQuit() || _abortIntroFlag;
}
int KyraEngine_LoK::handleMalcolmFlag() {
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/text_hof.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/text_hof.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/text_hof.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -335,7 +335,7 @@
const uint32 endTime = _chatEndTime;
resetSkipFlag();
- while (running && !_quit) {
+ while (running && !_eventMan->shouldQuit()) {
if (!_emc->isValid(&_chatScriptState))
_emc->start(&_chatScriptState, 1);
@@ -353,7 +353,7 @@
uint32 nextFrame = _system->getMillis() + delayTime * _tickLength;
- while (_system->getMillis() < nextFrame && !_quit) {
+ while (_system->getMillis() < nextFrame && !_eventMan->shouldQuit()) {
updateWithText();
const uint32 curTime = _system->getMillis();
@@ -593,7 +593,7 @@
if (_currentTalkSections.STATim) {
_tim->resetFinishedFlag();
- while (!_quit && !_tim->finished()) {
+ while (!_eventMan->shouldQuit() && !_tim->finished()) {
_tim->exec(_currentTalkSections.STATim, false);
if (_chatText)
updateWithText();
@@ -609,7 +609,7 @@
if (_currentTalkSections.ENDTim) {
_tim->resetFinishedFlag();
- while (!_quit && !_tim->finished()) {
+ while (!_eventMan->shouldQuit() && !_tim->finished()) {
_tim->exec(_currentTalkSections.ENDTim, false);
if (_chatText)
updateWithText();
@@ -647,10 +647,10 @@
_chatVocHigh = _chatVocLow = -1;
}
- while (((textEnabled() && _chatEndTime > _system->getMillis()) || (speechEnabled() && snd_voiceIsPlaying())) && !(_quit || skipFlag())) {
+ while (((textEnabled() && _chatEndTime > _system->getMillis()) || (speechEnabled() && snd_voiceIsPlaying())) && !(_eventMan->shouldQuit() || skipFlag())) {
if ((!speechEnabled() && chatAnimEndTime > _system->getMillis()) || (speechEnabled() && snd_voiceIsPlaying())) {
_tim->resetFinishedFlag();
- while (!_tim->finished() && !skipFlag() && !_quit) {
+ while (!_tim->finished() && !skipFlag() && !_eventMan->shouldQuit()) {
if (_currentTalkSections.TLKTim)
_tim->exec(_currentTalkSections.TLKTim, false);
else
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/text_lok.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/text_lok.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/text_lok.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -121,7 +121,6 @@
_skipFlag = true;
break;
case Common::EVENT_QUIT:
- quitGame();
runLoop = false;
break;
case Common::EVENT_LBUTTONDOWN:
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/text_mr.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/text_mr.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/text_mr.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -349,7 +349,7 @@
const uint32 endTime = _chatEndTime;
resetSkipFlag();
- while (running && !_quit) {
+ while (running && !_eventMan->shouldQuit()) {
if (!_emc->isValid(&_chatScriptState))
_emc->start(&_chatScriptState, 1);
@@ -367,7 +367,7 @@
uint32 nextFrame = _system->getMillis() + delayTime * _tickLength;
- while (_system->getMillis() < nextFrame && !_quit) {
+ while (_system->getMillis() < nextFrame && !_eventMan->shouldQuit()) {
updateWithText();
const uint32 curTime = _system->getMillis();
@@ -419,7 +419,7 @@
uint32 nextFrame = _system->getMillis() + _rnd.getRandomNumberRng(4, 8) * _tickLength;
int frame = _badConscienceFrameTable[_badConscienceAnim+24];
- while (running && !_quit) {
+ while (running && !_eventMan->shouldQuit()) {
if (nextFrame < _system->getMillis()) {
++frame;
if (_badConscienceFrameTable[_badConscienceAnim+32] < frame)
@@ -477,7 +477,7 @@
uint32 nextFrame = _system->getMillis() + _rnd.getRandomNumberRng(3, 6) * _tickLength;
int frame = _goodConscienceFrameTable[_goodConscienceAnim+15];
- while (running && !_quit) {
+ while (running && !_eventMan->shouldQuit()) {
if (nextFrame < _system->getMillis()) {
++frame;
if (_goodConscienceFrameTable[_goodConscienceAnim+20] < frame)
@@ -597,7 +597,7 @@
uint32 nextFrame = 0;
int frame = 12;
- while (running && !_quit) {
+ while (running && !_eventMan->shouldQuit()) {
if (nextFrame < _system->getMillis()) {
++frame;
if (frame > 22)
Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/vqa.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/vqa.cpp 2008-07-08 01:33:57 UTC (rev 32956)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/vqa.cpp 2008-07-08 05:02:45 UTC (rev 32957)
@@ -672,7 +672,6 @@
return;
break;
case Common::EVENT_QUIT:
- _vm->quitGame();
return;
default:
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list