[Scummvm-cvs-logs] SF.net SVN: scummvm:[34700] scummvm/trunk/engines
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Tue Sep 30 14:28:03 CEST 2008
Revision: 34700
http://scummvm.svn.sourceforge.net/scummvm/?rev=34700&view=rev
Author: fingolfin
Date: 2008-09-30 12:27:38 +0000 (Tue, 30 Sep 2008)
Log Message:
-----------
Renamed Engine::quit to Engine::shouldQuit (previously, it was easily confused with Engine::quitGame); also cleaned up engine.h a bit
Modified Paths:
--------------
scummvm/trunk/engines/agi/cycle.cpp
scummvm/trunk/engines/agi/op_cmd.cpp
scummvm/trunk/engines/agi/op_test.cpp
scummvm/trunk/engines/agi/preagi_common.cpp
scummvm/trunk/engines/agi/preagi_mickey.cpp
scummvm/trunk/engines/agi/preagi_troll.cpp
scummvm/trunk/engines/agi/preagi_winnie.cpp
scummvm/trunk/engines/agi/saveload.cpp
scummvm/trunk/engines/agos/agos.cpp
scummvm/trunk/engines/agos/animation.cpp
scummvm/trunk/engines/agos/event.cpp
scummvm/trunk/engines/agos/gfx.cpp
scummvm/trunk/engines/agos/input.cpp
scummvm/trunk/engines/agos/oracle.cpp
scummvm/trunk/engines/agos/saveload.cpp
scummvm/trunk/engines/agos/script.cpp
scummvm/trunk/engines/agos/script_e1.cpp
scummvm/trunk/engines/agos/script_e2.cpp
scummvm/trunk/engines/agos/script_s1.cpp
scummvm/trunk/engines/agos/script_ww.cpp
scummvm/trunk/engines/agos/subroutine.cpp
scummvm/trunk/engines/agos/verb.cpp
scummvm/trunk/engines/agos/window.cpp
scummvm/trunk/engines/cine/main_loop.cpp
scummvm/trunk/engines/engine.cpp
scummvm/trunk/engines/engine.h
scummvm/trunk/engines/gob/game_v1.cpp
scummvm/trunk/engines/gob/game_v2.cpp
scummvm/trunk/engines/gob/inter.cpp
scummvm/trunk/engines/gob/inter_bargon.cpp
scummvm/trunk/engines/gob/inter_v1.cpp
scummvm/trunk/engines/gob/inter_v2.cpp
scummvm/trunk/engines/gob/mult.cpp
scummvm/trunk/engines/gob/palanim.cpp
scummvm/trunk/engines/gob/sound/sound.cpp
scummvm/trunk/engines/gob/util.cpp
scummvm/trunk/engines/gob/videoplayer.cpp
scummvm/trunk/engines/kyra/gui.cpp
scummvm/trunk/engines/kyra/gui_hof.cpp
scummvm/trunk/engines/kyra/gui_lok.cpp
scummvm/trunk/engines/kyra/gui_mr.cpp
scummvm/trunk/engines/kyra/gui_v2.cpp
scummvm/trunk/engines/kyra/kyra_hof.cpp
scummvm/trunk/engines/kyra/kyra_lok.cpp
scummvm/trunk/engines/kyra/kyra_mr.cpp
scummvm/trunk/engines/kyra/kyra_v1.cpp
scummvm/trunk/engines/kyra/kyra_v2.cpp
scummvm/trunk/engines/kyra/lol.cpp
scummvm/trunk/engines/kyra/saveload.cpp
scummvm/trunk/engines/kyra/saveload_lok.cpp
scummvm/trunk/engines/kyra/scene_hof.cpp
scummvm/trunk/engines/kyra/scene_mr.cpp
scummvm/trunk/engines/kyra/screen.cpp
scummvm/trunk/engines/kyra/script.cpp
scummvm/trunk/engines/kyra/script_lok.cpp
scummvm/trunk/engines/kyra/script_mr.cpp
scummvm/trunk/engines/kyra/seqplayer.cpp
scummvm/trunk/engines/kyra/sequences_hof.cpp
scummvm/trunk/engines/kyra/sequences_lok.cpp
scummvm/trunk/engines/kyra/text.cpp
scummvm/trunk/engines/kyra/text_hof.cpp
scummvm/trunk/engines/kyra/text_mr.cpp
scummvm/trunk/engines/lure/events.cpp
scummvm/trunk/engines/lure/fights.cpp
scummvm/trunk/engines/lure/game.cpp
scummvm/trunk/engines/lure/intro.cpp
scummvm/trunk/engines/lure/lure.cpp
scummvm/trunk/engines/lure/menu.cpp
scummvm/trunk/engines/lure/scripts.cpp
scummvm/trunk/engines/lure/surface.cpp
scummvm/trunk/engines/parallaction/exec_ns.cpp
scummvm/trunk/engines/parallaction/parallaction.cpp
scummvm/trunk/engines/parallaction/parallaction_br.cpp
scummvm/trunk/engines/parallaction/parallaction_ns.cpp
scummvm/trunk/engines/queen/logic.cpp
scummvm/trunk/engines/queen/queen.cpp
scummvm/trunk/engines/queen/talk.cpp
scummvm/trunk/engines/saga/introproc_ihnm.cpp
scummvm/trunk/engines/saga/saga.cpp
scummvm/trunk/engines/scumm/he/cup_player_he.cpp
scummvm/trunk/engines/scumm/scumm.cpp
scummvm/trunk/engines/scumm/smush/smush_player.cpp
scummvm/trunk/engines/sky/control.cpp
scummvm/trunk/engines/sky/sky.cpp
scummvm/trunk/engines/sword1/animation.cpp
scummvm/trunk/engines/sword1/control.cpp
scummvm/trunk/engines/sword1/credits.cpp
scummvm/trunk/engines/sword1/sword1.cpp
scummvm/trunk/engines/sword2/animation.cpp
scummvm/trunk/engines/sword2/controls.cpp
scummvm/trunk/engines/sword2/palette.cpp
scummvm/trunk/engines/sword2/resman.cpp
scummvm/trunk/engines/sword2/screen.cpp
scummvm/trunk/engines/sword2/sword2.cpp
scummvm/trunk/engines/tinsel/tinsel.cpp
scummvm/trunk/engines/touche/menu.cpp
scummvm/trunk/engines/touche/touche.cpp
Modified: scummvm/trunk/engines/agi/cycle.cpp
===================================================================
--- scummvm/trunk/engines/agi/cycle.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agi/cycle.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -115,7 +115,7 @@
oldSound = getflag(fSoundOn);
_game.exitAllLogics = false;
- while (runLogic(0) == 0 && !quit()) {
+ while (runLogic(0) == 0 && !shouldQuit()) {
_game.vars[vWordNotFound] = 0;
_game.vars[vBorderTouchObj] = 0;
_game.vars[vBorderCode] = 0;
@@ -352,16 +352,16 @@
_game.vars[vKey] = 0;
}
- // FIXME: This has been broken with the merge of the RTL GSoC project. quit() returns a boolean, and we're trying to
+ // FIXME: This has been broken with the merge of the RTL GSoC project. shouldQuit() returns a boolean, and we're trying to
// check it against 0xff, which is never going to be true
- //if (quit() == 0xff)
+ //if (shouldQuit() == 0xff)
// ec = errRestartGame;
if (shouldPerformAutoSave(_lastSaveTime)) {
saveGame(getSavegameFilename(0), "Autosave");
}
- } while (quit() == 0);
+ } while (shouldQuit() == 0);
_sound->stopSound();
Modified: scummvm/trunk/engines/agi/op_cmd.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_cmd.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agi/op_cmd.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -1739,7 +1739,7 @@
curLogic->cIP = curLogic->sIP;
timerHack = 0;
- while (ip < _game.logics[n].size && !quit()) {
+ while (ip < _game.logics[n].size && !shouldQuit()) {
if (_debug.enabled) {
if (_debug.steps > 0) {
if (_debug.logic0 || n) {
Modified: scummvm/trunk/engines/agi/op_test.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_test.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agi/op_test.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -231,7 +231,7 @@
uint8 p[16] = { 0 };
bool end_test = false;
- while (retval && !quit() && !end_test) {
+ while (retval && !shouldQuit() && !end_test) {
if (_debug.enabled && (_debug.logic0 || lognum))
debugConsole(lognum, lTEST_MODE, NULL);
Modified: scummvm/trunk/engines/agi/preagi_common.cpp
===================================================================
--- scummvm/trunk/engines/agi/preagi_common.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agi/preagi_common.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -120,7 +120,7 @@
int PreAgiEngine::getSelection(SelectionTypes type) {
Common::Event event;
- while (!quit()) {
+ while (!shouldQuit()) {
while (_eventMan->pollEvent(event)) {
switch(event.type) {
case Common::EVENT_RTL:
Modified: scummvm/trunk/engines/agi/preagi_mickey.cpp
===================================================================
--- scummvm/trunk/engines/agi/preagi_mickey.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agi/preagi_mickey.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -2160,7 +2160,7 @@
intro();
// Game loop
- while (!_vm->quit()) {
+ while (!_vm->shouldQuit()) {
drawRoom();
if (_game.fIntro) {
Modified: scummvm/trunk/engines/agi/preagi_troll.cpp
===================================================================
--- scummvm/trunk/engines/agi/preagi_troll.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agi/preagi_troll.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -56,7 +56,7 @@
drawMenu(szMenu, *iSel);
- while (!_vm->quit()) {
+ while (!_vm->shouldQuit()) {
while (_vm->_system->getEventManager()->pollEvent(event)) {
switch(event.type) {
case Common::EVENT_RTL:
@@ -268,7 +268,7 @@
int iSel = 0;
//char szTreasure[16] = {0};
- while (!_vm->quit()) {
+ while (!_vm->shouldQuit()) {
_vm->clearScreen(0xFF);
_vm->printStr(IDS_TRO_TUTORIAL_0);
Modified: scummvm/trunk/engines/agi/preagi_winnie.cpp
===================================================================
--- scummvm/trunk/engines/agi/preagi_winnie.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agi/preagi_winnie.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -796,7 +796,7 @@
// Show the mouse cursor for the menu
CursorMan.showMouse(true);
- while (!_vm->quit()) {
+ while (!_vm->shouldQuit()) {
while (_vm->_system->getEventManager()->pollEvent(event)) {
switch(event.type) {
case Common::EVENT_RTL:
@@ -1013,7 +1013,7 @@
if (parser(hdr.ofsDesc[iBlock] - _roomOffset, iBlock, roomdata) == IDI_WTP_PAR_BACK)
goto phase1;
}
- while (!_vm->quit()) {
+ while (!_vm->shouldQuit()) {
for (iBlock = 0; iBlock < IDI_WTP_MAX_BLOCK; iBlock++) {
switch(parser(hdr.ofsBlock[iBlock] - _roomOffset, iBlock, roomdata)) {
case IDI_WTP_PAR_GOTO:
Modified: scummvm/trunk/engines/agi/saveload.cpp
===================================================================
--- scummvm/trunk/engines/agi/saveload.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agi/saveload.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -91,7 +91,7 @@
out->writeSint16BE((int16)_game.lognum);
out->writeSint16BE((int16)_game.playerControl);
- out->writeSint16BE((int16)quit());
+ out->writeSint16BE((int16)shouldQuit());
out->writeSint16BE((int16)_game.statusLine);
out->writeSint16BE((int16)_game.clockEnabled);
out->writeSint16BE((int16)_game.exitAllLogics);
Modified: scummvm/trunk/engines/agos/agos.cpp
===================================================================
--- scummvm/trunk/engines/agos/agos.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agos/agos.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -951,7 +951,7 @@
void AGOSEngine::pause() {
pauseEngine(true);
- while (_pause && !quit()) {
+ while (_pause && !shouldQuit()) {
delay(1);
if (_keyPressed.keycode == Common::KEYCODE_p)
pauseEngine(false);
@@ -988,7 +988,7 @@
(getFeatures() & GF_DEMO)) {
int i;
- while (!quit()) {
+ while (!shouldQuit()) {
for (i = 0; i < 4; i++) {
setWindowImage(3, 9902 + i);
debug(0, "Displaying image %d", 9902 + i);
@@ -1017,7 +1017,7 @@
runSubroutine101();
permitInput();
- while (!quit()) {
+ while (!shouldQuit()) {
waitForInput();
handleVerbClicked(_verbHitArea);
delay(100);
@@ -1074,7 +1074,7 @@
delete _moviePlay;
delete _sound;
- _system->quit();
+ _system->shouldQuit();
}
*/
Modified: scummvm/trunk/engines/agos/animation.cpp
===================================================================
--- scummvm/trunk/engines/agos/animation.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agos/animation.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -150,7 +150,7 @@
startSound();
- while (_frameNum < _framesCount && !_vm->quit())
+ while (_frameNum < _framesCount && !_vm->shouldQuit())
handleNextFrame();
closeFile();
Modified: scummvm/trunk/engines/agos/event.cpp
===================================================================
--- scummvm/trunk/engines/agos/event.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agos/event.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -142,7 +142,7 @@
cur_time = getTime() - _gameStoppedClock;
- while ((te = _firstTimeStruct) != NULL && te->time <= cur_time && !quit()) {
+ while ((te = _firstTimeStruct) != NULL && te->time <= cur_time && !shouldQuit()) {
result = true;
_pendingDeleteTimeEvent = te;
invokeTimeEvent(te);
@@ -544,7 +544,7 @@
_system->delayMillis(this_delay);
cur = _system->getMillis();
- } while (cur < start + amount && !quit());
+ } while (cur < start + amount && !shouldQuit());
}
void AGOSEngine::timer_callback() {
Modified: scummvm/trunk/engines/agos/gfx.cpp
===================================================================
--- scummvm/trunk/engines/agos/gfx.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agos/gfx.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -1286,7 +1286,7 @@
if (getGameType() == GType_WW && (mode == 6 || mode == 8 || mode == 9)) {
setWindowImage(mode, vga_res);
} else {
- while (_copyScnFlag && !quit())
+ while (_copyScnFlag && !shouldQuit())
delay(1);
setWindowImage(mode, vga_res);
Modified: scummvm/trunk/engines/agos/input.cpp
===================================================================
--- scummvm/trunk/engines/agos/input.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agos/input.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -123,7 +123,7 @@
clearName();
_lastNameOn = last;
- while (!quit()) {
+ while (!shouldQuit()) {
_lastHitArea = NULL;
_lastHitArea3 = 0;
_leftButtonDown = 0;
@@ -145,7 +145,7 @@
}
delay(100);
- } while ((_lastHitArea3 == (HitArea *) -1 || _lastHitArea3 == 0) && !quit());
+ } while ((_lastHitArea3 == (HitArea *) -1 || _lastHitArea3 == 0) && !shouldQuit());
if (_lastHitArea == NULL) {
} else if (_lastHitArea->id == 0x7FFB) {
@@ -189,12 +189,12 @@
resetVerbs();
}
- while (!quit()) {
+ while (!shouldQuit()) {
_lastHitArea = NULL;
_lastHitArea3 = NULL;
_dragAccept = 1;
- while (!quit()) {
+ while (!shouldQuit()) {
if ((getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) &&
_keyPressed.keycode == Common::KEYCODE_F10)
displayBoxStars();
Modified: scummvm/trunk/engines/agos/oracle.cpp
===================================================================
--- scummvm/trunk/engines/agos/oracle.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agos/oracle.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -459,7 +459,7 @@
}
windowPutChar(window, 0x7f);
- while (!quit()) {
+ while (!shouldQuit()) {
_keyPressed.reset();
delay(1);
Modified: scummvm/trunk/engines/agos/saveload.cpp
===================================================================
--- scummvm/trunk/engines/agos/saveload.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agos/saveload.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -279,11 +279,11 @@
name = buf;
_saveGameNameLen = 0;
- while (!quit()) {
+ while (!shouldQuit()) {
windowPutChar(window, 128);
_keyPressed.reset();
- while (!quit()) {
+ while (!shouldQuit()) {
delay(10);
if (_keyPressed.ascii && _keyPressed.ascii < 128) {
i = _keyPressed.ascii;
@@ -443,7 +443,7 @@
name = buf + 192;
- while (!quit()) {
+ while (!shouldQuit()) {
windowPutChar(window, 128);
_saveLoadEdit = true;
@@ -516,7 +516,7 @@
_keyPressed.reset();
- while (!quit()) {
+ while (!shouldQuit()) {
_lastHitArea = NULL;
_lastHitArea3 = NULL;
@@ -526,7 +526,7 @@
return _keyPressed.ascii;
}
delay(10);
- } while (_lastHitArea3 == 0 && !quit());
+ } while (_lastHitArea3 == 0 && !shouldQuit());
ha = _lastHitArea;
if (ha == NULL || ha->id < 200) {
@@ -708,7 +708,7 @@
_saveGameNameLen++;
}
- while (!quit()) {
+ while (!shouldQuit()) {
windowPutChar(window, 127);
_saveLoadEdit = true;
@@ -787,7 +787,7 @@
_keyPressed.reset();
- while (!quit()) {
+ while (!shouldQuit()) {
_lastHitArea = NULL;
_lastHitArea3 = NULL;
@@ -797,7 +797,7 @@
return _keyPressed.ascii;
}
delay(10);
- } while (_lastHitArea3 == 0 && !quit());
+ } while (_lastHitArea3 == 0 && !shouldQuit());
ha = _lastHitArea;
if (ha == NULL || ha->id < 205) {
Modified: scummvm/trunk/engines/agos/script.cpp
===================================================================
--- scummvm/trunk/engines/agos/script.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agos/script.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -965,7 +965,7 @@
int AGOSEngine::runScript() {
bool flag;
- if (quit())
+ if (shouldQuit())
return 1;
do {
@@ -1010,9 +1010,9 @@
error("Invalid opcode '%d' encountered", _opcode);
executeOpcode(_opcode);
- } while (getScriptCondition() != flag && !getScriptReturn() && !quit());
+ } while (getScriptCondition() != flag && !getScriptReturn() && !shouldQuit());
- return (quit()) ? 1 : getScriptReturn();
+ return (shouldQuit()) ? 1 : getScriptReturn();
}
Child *nextSub(Child *sub, int16 key) {
@@ -1066,7 +1066,7 @@
_exitCutscene = false;
_rightButtonDown = false;
- while (_vgaWaitFor != 0 && !quit()) {
+ while (_vgaWaitFor != 0 && !shouldQuit()) {
if (_rightButtonDown) {
if (_vgaWaitFor == 200 && (getGameType() == GType_FF || !getBitFlag(14))) {
skipSpeech();
Modified: scummvm/trunk/engines/agos/script_e1.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_e1.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agos/script_e1.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -1052,11 +1052,11 @@
ha->priority = 999;
ha->window = 0;
- while (!quit()) {
+ while (!shouldQuit()) {
_lastHitArea = NULL;
_lastHitArea3 = NULL;
- while (!quit()) {
+ while (!shouldQuit()) {
if (_lastHitArea3 != 0)
break;
delay(1);
@@ -1101,11 +1101,11 @@
ha->priority = 999;
ha->window = 0;
- while (!quit()) {
+ while (!shouldQuit()) {
_lastHitArea = NULL;
_lastHitArea3 = NULL;
- while (!quit()) {
+ while (!shouldQuit()) {
if (_lastHitArea3 != 0)
break;
delay(1);
Modified: scummvm/trunk/engines/agos/script_e2.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_e2.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agos/script_e2.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -370,11 +370,11 @@
uint32 pauseTime = getTime();
haltAnimation();
- while (!quit()) {
+ while (!shouldQuit()) {
_lastHitArea = NULL;
_lastHitArea3 = NULL;
- while (!quit()) {
+ while (!shouldQuit()) {
if (processSpecialKeys() != 0 || _lastHitArea3 != 0)
break;
delay(1);
Modified: scummvm/trunk/engines/agos/script_s1.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_s1.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agos/script_s1.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -338,7 +338,7 @@
break;
}
- while (!quit()) {
+ while (!shouldQuit()) {
delay(1);
if (_keyPressed.keycode == keyYes)
quitGame();
Modified: scummvm/trunk/engines/agos/script_ww.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_ww.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agos/script_ww.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -368,11 +368,11 @@
uint32 pauseTime = getTime();
haltAnimation();
- while (!quit()) {
+ while (!shouldQuit()) {
_lastHitArea = NULL;
_lastHitArea3 = NULL;
- while (!quit()) {
+ while (!shouldQuit()) {
if (_lastHitArea3 != 0)
break;
delay(1);
Modified: scummvm/trunk/engines/agos/subroutine.cpp
===================================================================
--- scummvm/trunk/engines/agos/subroutine.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agos/subroutine.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -555,7 +555,7 @@
_currentTable = sub;
restart:
- if (quit())
+ if (shouldQuit())
return result;
while ((byte *)sl != (byte *)sub) {
Modified: scummvm/trunk/engines/agos/verb.cpp
===================================================================
--- scummvm/trunk/engines/agos/verb.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agos/verb.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -343,7 +343,7 @@
Subroutine *sub;
int result;
- if (quit())
+ if (shouldQuit())
return;
_objectItem = _hitAreaObjectItem;
Modified: scummvm/trunk/engines/agos/window.cpp
===================================================================
--- scummvm/trunk/engines/agos/window.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/agos/window.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -298,11 +298,11 @@
ha->id = 0x7FFF;
ha->priority = 999;
- while (!quit()) {
+ while (!shouldQuit()) {
_lastHitArea = NULL;
_lastHitArea3 = NULL;
- while (!quit()) {
+ while (!shouldQuit()) {
if (_lastHitArea3 != 0)
break;
delay(1);
Modified: scummvm/trunk/engines/cine/main_loop.cpp
===================================================================
--- scummvm/trunk/engines/cine/main_loop.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/cine/main_loop.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -419,7 +419,7 @@
manageEvents();
- } while (!quit() && _danKeysPressed != 7);
+ } while (!shouldQuit() && _danKeysPressed != 7);
hideMouse();
g_sound->stopMusic();
Modified: scummvm/trunk/engines/engine.cpp
===================================================================
--- scummvm/trunk/engines/engine.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/engine.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -168,7 +168,7 @@
GUI::MessageDialog dialog(
"You appear to be playing this game directly\n"
"from the CD. This is known to cause problems,\n"
- "and it's therefore recommended that you copy\n"
+ "and it is therefore recommended that you copy\n"
"the data files to your hard disk instead.\n"
"See the README file for details.", "OK");
dialog.runModal();
@@ -224,11 +224,8 @@
}
int Engine::runDialog(Dialog &dialog) {
-
pauseEngine(true);
-
int result = dialog.runModal();
-
pauseEngine(false);
return result;
@@ -254,6 +251,7 @@
}
bool Engine::hasFeature(int f) {
+ // TODO: In each engine, keep a ref to the corresponding MetaEngine?
const EnginePlugin *plugin = 0;
Common::String gameid = ConfMan.get("gameid");
gameid.toLowercase();
Modified: scummvm/trunk/engines/engine.h
===================================================================
--- scummvm/trunk/engines/engine.h 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/engine.h 2008-09-30 12:27:38 UTC (rev 34700)
@@ -79,6 +79,13 @@
int _pauseLevel;
public:
+ /** @name Overloadable methods
+ *
+ * All Engine subclasses should consider overloading some or all of the following methods.
+ */
+ //@{
+
+
Engine(OSystem *syst);
virtual ~Engine();
@@ -96,7 +103,9 @@
*/
virtual int go() = 0;
- /** Specific for each engine: prepare error string. */
+ /**
+ * Prepare an error string, which is printed by the error() function.
+ */
virtual void errorString(const char *buf_input, char *buf_output);
/**
@@ -105,7 +114,36 @@
*/
virtual GUI::Debugger *getDebugger() { return 0; }
+ /** Sync the engine's sound settings with the config manager
+ */
+ virtual void syncSoundSettings();
+
+protected:
+
/**
+ * Actual implementation of pauseEngine by subclasses. See there
+ * for details.
+ */
+ virtual void pauseEngineIntern(bool pause);
+
+ //@}
+
+
+public:
+
+ /**
+ * Quit the engine, sends a Quit event to the Event Manager
+ */
+ void quitGame();
+
+ // TODO: Rename "quit" to "shouldQuit"
+ /**
+ * Return whether or not the ENGINE should quit
+ */
+ bool shouldQuit() const { return (_eventMan->shouldQuit() || _eventMan->shouldRTL()); }
+
+
+ /**
* Pause or resume the engine. This should stop/resume any audio playback
* and other stuff. Called right before the system runs a global dialog
* (like a global pause, main menu, options or 'confirm exit' dialog).
@@ -119,35 +157,26 @@
void pauseEngine(bool pause);
/**
- * Quit the engine, sends a Quit event to the Event Manager
- */
- void quitGame();
-
- /**
* Return whether the engine is currently paused or not.
*/
bool isPaused() const { return _pauseLevel != 0; }
/**
- * Return whether or not the ENGINE should quit
+ * Run the Global Main Menu Dialog
*/
- bool quit() const { return (_eventMan->shouldQuit() || _eventMan->shouldRTL()); }
+ void mainMenuDialog();
- /** Run the Global Main Menu Dialog
+ /**
+ * Determine whether the engine supports the specified MetaEngine feature.
*/
- virtual void mainMenuDialog();
+ bool hasFeature(int f);
- /** Sync the engine's sound settings with the config manager
- */
- virtual void syncSoundSettings();
+public:
- /** Determine whether the engine supports the specified MetaEngine feature
+ /**
+ * Setup the backend's graphics mode.
+ * @todo Must be public because e.g. Saga's Gfx class wants to invoke it. Move it to a better place?
*/
- virtual bool hasFeature(int f);
-
-public:
-
- /** Setup the backend's graphics mode. */
void initCommonGFX(bool defaultTo1XScaler);
/** On some systems, check if the game appears to be run from CD. */
@@ -156,14 +185,12 @@
/** Indicate whether an autosave should be performed. */
bool shouldPerformAutoSave(int lastSaveTime);
- /** Initialized graphics and shows error message. */
- void GUIErrorMessage(const Common::String msg);
-
/**
- * Actual implementation of pauseEngine by subclasses. See there
- * for details.
+ * Initialized graphics and shows error message.
+ * @todo Move this to a better place (not just engines need to access it, so it neither
+ * needs to nor should be contained in class Engine)
*/
- virtual void pauseEngineIntern(bool pause);
+ void GUIErrorMessage(const Common::String msg);
};
extern Engine *g_engine;
Modified: scummvm/trunk/engines/gob/game_v1.cpp
===================================================================
--- scummvm/trunk/engines/gob/game_v1.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/gob/game_v1.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -63,7 +63,7 @@
strcpy(savedTotName, _curTotFile);
if (skipPlay <= 0) {
- while (!_vm->quit()) {
+ while (!_vm->shouldQuit()) {
for (int i = 0; i < 4; i++) {
_vm->_draw->_fontToSprite[i].sprite = -1;
_vm->_draw->_fontToSprite[i].base = -1;
@@ -997,7 +997,7 @@
WRITE_VAR(16, 0);
_activeCollResId = 0;
}
- while ((_activeCollResId == 0) && !_vm->_inter->_terminate && !_vm->quit());
+ while ((_activeCollResId == 0) && !_vm->_inter->_terminate && !_vm->shouldQuit());
if (((uint16) _activeCollResId & ~0x8000) == collResId) {
collStackPos = 0;
Modified: scummvm/trunk/engines/gob/game_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/game_v2.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/gob/game_v2.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -70,7 +70,7 @@
strcpy(savedTotName, _curTotFile);
if (skipPlay <= 0) {
- while (!_vm->quit()) {
+ while (!_vm->shouldQuit()) {
if (_vm->_inter->_variables)
_vm->_draw->animateCursor(4);
@@ -438,7 +438,7 @@
timeKey = _vm->_util->getTimeKey();
while (1) {
- if (_vm->_inter->_terminate || _vm->quit()) {
+ if (_vm->_inter->_terminate || _vm->shouldQuit()) {
if (handleMouse)
_vm->_draw->blitCursor();
return 0;
@@ -1043,7 +1043,7 @@
WRITE_VAR(16, 0);
_activeCollResId = 0;
}
- while ((_activeCollResId == 0) && !_vm->_inter->_terminate && !_vm->quit());
+ while ((_activeCollResId == 0) && !_vm->_inter->_terminate && !_vm->shouldQuit());
if ((_activeCollResId & 0xFFF) == collResId) {
collStackPos = 0;
@@ -1465,7 +1465,7 @@
key = checkCollisions(handleMouse, -300, collResId, collIndex);
if ((key != 0) || (*collResId != 0) ||
- _vm->_inter->_terminate || _vm->quit())
+ _vm->_inter->_terminate || _vm->shouldQuit())
break;
if (*pTotTime > 0) {
@@ -1479,7 +1479,7 @@
}
if ((key == 0) || (*collResId != 0) ||
- _vm->_inter->_terminate || _vm->quit())
+ _vm->_inter->_terminate || _vm->shouldQuit())
return 0;
switch (key) {
Modified: scummvm/trunk/engines/gob/inter.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/gob/inter.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -259,7 +259,7 @@
if (executeFuncOpcode(cmd2, cmd, params))
return;
- if (_vm->quit())
+ if (_vm->shouldQuit())
break;
if (_break) {
@@ -279,7 +279,7 @@
void Inter::callSub(int16 retFlag) {
byte block;
- while (!_vm->quit() && _vm->_global->_inter_execPtr &&
+ while (!_vm->shouldQuit() && _vm->_global->_inter_execPtr &&
(_vm->_global->_inter_execPtr != _vm->_game->_totFileData)) {
block = *_vm->_global->_inter_execPtr;
Modified: scummvm/trunk/engines/gob/inter_bargon.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_bargon.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/gob/inter_bargon.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -750,7 +750,7 @@
for (i = 320; i >= 0; i--) {
_vm->_util->setScrollOffset(i, 0);
if ((_vm->_game->checkKeys(&mouseX, &mouseY, &buttons, 0) == 0x11B) ||
- _vm->quit()) {
+ _vm->shouldQuit()) {
_vm->_palAnim->fade(0, -2, 0);
_vm->_video->clearSurf(_vm->_draw->_frontSurface);
memset((char *) _vm->_draw->_vgaPalette, 0, 768);
@@ -760,7 +760,7 @@
break;
}
}
- if (!_vm->quit())
+ if (!_vm->shouldQuit())
_vm->_util->setScrollOffset(0, 0);
surface = 0;
if (VAR(57) == ((uint32) -1))
@@ -799,7 +799,7 @@
_vm->_util->longDelay(_vm->_util->getRandom(200));
}
if ((_vm->_game->checkKeys(&mouseX, &mouseY, &buttons, 0) == 0x11B) ||
- _vm->quit()) {
+ _vm->shouldQuit()) {
_vm->_sound->blasterStop(10);
_vm->_palAnim->fade(0, -2, 0);
_vm->_video->clearSurf(_vm->_draw->_frontSurface);
Modified: scummvm/trunk/engines/gob/inter_v1.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v1.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/gob/inter_v1.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -1234,7 +1234,7 @@
funcBlock(1);
_vm->_global->_inter_execPtr = blockPtr + size + 1;
flag = evalBoolResult();
- } while (!flag && !_break && !_terminate && !_vm->quit());
+ } while (!flag && !_break && !_terminate && !_vm->shouldQuit());
_nestLevel[0]--;
@@ -1269,7 +1269,7 @@
} else
_vm->_global->_inter_execPtr += size;
- if (_break || _terminate || _vm->quit()) {
+ if (_break || _terminate || _vm->shouldQuit()) {
_vm->_global->_inter_execPtr = blockPtr;
_vm->_global->_inter_execPtr += size;
break;
Modified: scummvm/trunk/engines/gob/inter_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v2.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/gob/inter_v2.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -1490,7 +1490,7 @@
curX = startX;
curY = startY;
- while (!_vm->quit() && ((curX != endX) || (curY != endY))) {
+ while (!_vm->shouldQuit() && ((curX != endX) || (curY != endY))) {
curX = stepX > 0 ? MIN(curX + stepX, (int) endX) :
MAX(curX + stepX, (int) endX);
curY = stepY > 0 ? MIN(curY + stepY, (int) endY) :
Modified: scummvm/trunk/engines/gob/mult.cpp
===================================================================
--- scummvm/trunk/engines/gob/mult.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/gob/mult.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -209,7 +209,7 @@
_frame++;
_vm->_util->waitEndFrame();
- } while (!stop && !stopNoClear && !_vm->quit());
+ } while (!stop && !stopNoClear && !_vm->shouldQuit());
if (!stopNoClear) {
if (_animDataAllocated) {
Modified: scummvm/trunk/engines/gob/palanim.cpp
===================================================================
--- scummvm/trunk/engines/gob/palanim.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/gob/palanim.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -132,7 +132,7 @@
bool stop;
int16 i;
- if (_vm->quit())
+ if (_vm->shouldQuit())
return;
_fadeValue = (fadeV < 0) ? -fadeV : 2;
Modified: scummvm/trunk/engines/gob/sound/sound.cpp
===================================================================
--- scummvm/trunk/engines/gob/sound/sound.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/gob/sound/sound.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -369,7 +369,7 @@
if (stopComp)
_blaster->endComposition();
- while (_blaster->isPlaying() && !_vm->quit()) {
+ while (_blaster->isPlaying() && !_vm->shouldQuit()) {
if (interruptible && (_vm->_util->checkKey() == 0x11B)) {
WRITE_VAR(57, (uint32) -1);
return;
Modified: scummvm/trunk/engines/gob/util.cpp
===================================================================
--- scummvm/trunk/engines/gob/util.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/gob/util.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -71,7 +71,7 @@
_vm->_video->waitRetrace();
processInput();
delay(15);
- } while (!_vm->quit() &&
+ } while (!_vm->shouldQuit() &&
((g_system->getMillis() * _vm->_global->_speedFactor) < time));
}
Modified: scummvm/trunk/engines/gob/videoplayer.cpp
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/gob/videoplayer.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -569,7 +569,7 @@
_vm->_util->processInput();
- if (_vm->quit()) {
+ if (_vm->shouldQuit()) {
_primaryVideo->getVideo()->disableSound();
return true;
}
Modified: scummvm/trunk/engines/kyra/gui.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/gui.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -427,7 +427,7 @@
Common::Rect menuRect(x + 16, y + 4, x + width - 16, y + 4 + fh * 4);
- while (!_vm->quit()) {
+ while (!_vm->shouldQuit()) {
updateAnimation();
bool mousePressed = getInput();
@@ -458,7 +458,7 @@
_system->delayMillis(10);
}
- if (_vm->quit())
+ if (_vm->shouldQuit())
command = -1;
_screen->copyRegion(backUpX, backUpY, backUpX, backUpY, backUpWidth, backUpHeight, 3, 0);
Modified: scummvm/trunk/engines/kyra/gui_hof.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_hof.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/gui_hof.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -514,7 +514,7 @@
showBookPage();
_bookShown = true;
- while (_bookShown && !quit()) {
+ while (_bookShown && !shouldQuit()) {
checkInput(buttonList);
removeInputTop();
Modified: scummvm/trunk/engines/kyra/gui_lok.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_lok.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/gui_lok.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -473,7 +473,7 @@
updateAllMenuButtons();
}
- while (_displayMenu && !_vm->quit()) {
+ while (_displayMenu && !_vm->shouldQuit()) {
Common::Point mouse = _vm->getMousePos();
processHighlights(_menu[_toplevelMenu], mouse.x, mouse.y);
processButtonList(_menuButtonList, 0, 0);
@@ -593,7 +593,7 @@
_displaySubMenu = true;
_cancelSubMenu = false;
- while (_displaySubMenu && !_vm->quit()) {
+ while (_displaySubMenu && !_vm->shouldQuit()) {
getInput();
Common::Point mouse = _vm->getMousePos();
processHighlights(_menu[2], mouse.x, mouse.y);
@@ -642,7 +642,7 @@
_vm->_gameToLoad = -1;
- while (_displaySubMenu && !_vm->quit()) {
+ while (_displaySubMenu && !_vm->shouldQuit()) {
getInput();
Common::Point mouse = _vm->getMousePos();
processHighlights(_menu[2], mouse.x, mouse.y);
@@ -730,7 +730,7 @@
}
redrawTextfield();
- while (_displaySubMenu && !_vm->quit()) {
+ while (_displaySubMenu && !_vm->shouldQuit()) {
getInput();
updateSavegameString();
Common::Point mouse = _vm->getMousePos();
@@ -810,7 +810,7 @@
_displaySubMenu = true;
_cancelSubMenu = true;
- while (_displaySubMenu && !_vm->quit()) {
+ while (_displaySubMenu && !_vm->shouldQuit()) {
getInput();
Common::Point mouse = _vm->getMousePos();
processHighlights(_menu[1], mouse.x, mouse.y);
@@ -876,7 +876,7 @@
_displaySubMenu = true;
_cancelSubMenu = false;
- while (_displaySubMenu && !_vm->quit()) {
+ while (_displaySubMenu && !_vm->shouldQuit()) {
getInput();
Common::Point mouse = _vm->getMousePos();
processHighlights(_menu[5], mouse.x, mouse.y);
Modified: scummvm/trunk/engines/kyra/gui_mr.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_mr.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/gui_mr.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -870,7 +870,7 @@
albumNewPage();
_album.running = true;
- while (_album.running && !quit()) {
+ while (_album.running && !shouldQuit()) {
updateInput();
checkInput(buttonList);
removeInputTop();
Modified: scummvm/trunk/engines/kyra/gui_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_v2.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/gui_v2.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -409,7 +409,7 @@
_vm->checkInput(_menuButtonList);
_vm->removeInputTop();
- if (_vm->quit()) {
+ if (_vm->shouldQuit()) {
_displayMenu = false;
_isLoadMenu = false;
_isSaveMenu = false;
@@ -749,7 +749,7 @@
_keyPressed.reset();
_cancelNameInput = _finishNameInput = false;
- while (running && !_vm->quit()) {
+ while (running && !_vm->shouldQuit()) {
processHighlights(_savenameMenu, _vm->_mouseX, _vm->_mouseY);
checkTextfieldInput();
if (_keyPressed.keycode == Common::KEYCODE_RETURN || _keyPressed.keycode == Common::KEYCODE_KP_ENTER || _finishNameInput) {
Modified: scummvm/trunk/engines/kyra/kyra_hof.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_hof.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/kyra_hof.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -317,7 +317,7 @@
if (_menuChoice & 1) {
startup();
- if (!quit())
+ if (!shouldQuit())
runLoop();
cleanup();
@@ -455,7 +455,7 @@
_screen->updateScreen();
_runFlag = true;
- while (!quit() && _runFlag) {
+ while (!shouldQuit() && _runFlag) {
if (_deathHandler >= 0) {
removeHandItem();
delay(5);
@@ -463,7 +463,7 @@
_gui->optionsButton(0);
_deathHandler = -1;
- if (!_runFlag || !quit())
+ if (!_runFlag || !shouldQuit())
break;
}
@@ -1630,7 +1630,7 @@
_invWsa.timer = _system->getMillis();
if (run) {
- while (_invWsa.running && !skipFlag() && !quit()) {
+ while (_invWsa.running && !skipFlag() && !shouldQuit()) {
update();
_system->delayMillis(10);
}
@@ -2004,7 +2004,7 @@
return;
_tim->resetFinishedFlag();
- while (!quit() && !_tim->finished()) {
+ while (!shouldQuit() && !_tim->finished()) {
_tim->exec(tim, 0);
if (_chatText)
updateWithText();
Modified: scummvm/trunk/engines/kyra/kyra_lok.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_lok.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/kyra_lok.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -303,7 +303,7 @@
if (_gameToLoad == -1) {
setGameFlag(0xEF);
seq_intro();
- if (quit())
+ if (shouldQuit())
return 0;
if (_skipIntroFlag && _abortIntroFlag)
resetGameFlag(0xEF);
@@ -402,7 +402,7 @@
void KyraEngine_LoK::mainLoop() {
debugC(9, kDebugLevelMain, "KyraEngine_LoK::mainLoop()");
- while (!quit()) {
+ while (!shouldQuit()) {
int32 frameTime = (int32)_system->getMillis();
_skipFlag = false;
@@ -449,7 +449,7 @@
}
void KyraEngine_LoK::delayUntil(uint32 timestamp, bool updateTimers, bool update, bool isMainLoop) {
- while (_system->getMillis() < timestamp && !quit()) {
+ while (_system->getMillis() < timestamp && !shouldQuit()) {
if (updateTimers)
_timer->update();
@@ -531,19 +531,19 @@
if (_skipFlag && !_abortIntroFlag && !queryGameFlag(0xFE))
_skipFlag = false;
- if (amount > 0 && !_skipFlag && !quit())
+ if (amount > 0 && !_skipFlag && !shouldQuit())
_system->delayMillis(10);
if (_skipFlag)
_sound->voiceStop();
- } while (!_skipFlag && _system->getMillis() < start + amount && !quit());
+ } while (!_skipFlag && _system->getMillis() < start + amount && !shouldQuit());
}
void KyraEngine_LoK::waitForEvent() {
bool finished = false;
Common::Event event;
- while (!finished && !quit()) {
+ while (!finished && !shouldQuit()) {
while (_eventMan->pollEvent(event)) {
switch (event.type) {
case Common::EVENT_KEYDOWN:
Modified: scummvm/trunk/engines/kyra/kyra_mr.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_mr.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/kyra_mr.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -263,7 +263,7 @@
running = false;
}
- while (running && !quit()) {
+ while (running && !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 && !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 && !shouldQuit(); --i) {
uint32 nextRun = _system->getMillis() + 3 * _tickLength;
_menuAnim->displayFrame(i, 0);
_screen->updateScreen();
@@ -1001,7 +1001,7 @@
_eventList.clear();
_runFlag = true;
- while (_runFlag && !quit()) {
+ while (_runFlag && !shouldQuit()) {
if (_deathHandler >= 0) {
removeHandItem();
delay(5);
@@ -1009,7 +1009,7 @@
_gui->optionsButton(0);
_deathHandler = -1;
- if (quit())
+ if (shouldQuit())
break;
}
Modified: scummvm/trunk/engines/kyra/kyra_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v1.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/kyra_v1.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -235,7 +235,7 @@
}
void KyraEngine_v1::delayUntil(uint32 timestamp, bool updateTimers, bool update, bool isMainLoop) {
- while (_system->getMillis() < timestamp && !quit()) {
+ while (_system->getMillis() < timestamp && !shouldQuit()) {
if (timestamp - _system->getMillis() >= 10)
delay(10, update, isMainLoop);
}
Modified: scummvm/trunk/engines/kyra/kyra_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/kyra_v2.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -159,7 +159,7 @@
if (amount > 0)
_system->delayMillis(amount > 10 ? 10 : amount);
- } while (!skipFlag() && _system->getMillis() < start + amount && !quit());
+ } while (!skipFlag() && _system->getMillis() < start + amount && !shouldQuit());
}
int KyraEngine_v2::checkInput(Button *buttonList, bool mainLoop) {
Modified: scummvm/trunk/engines/kyra/lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/lol.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/lol.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -297,7 +297,7 @@
_screen->hideMouse();
uint32 palNextFadeStep = 0;
- while (!_tim->finished() && !quit() && !skipFlag()) {
+ while (!_tim->finished() && !shouldQuit() && !skipFlag()) {
updateInput();
_tim->exec(intro, false);
_screen->checkedPageUpdate(8, 4);
@@ -375,14 +375,14 @@
_screen->fadePalette(_screen->getPalette(0), 30, 0);
bool kingIntro = true;
- while (!quit()) {
+ while (!shouldQuit()) {
if (kingIntro)
kingSelectionIntro();
if (_charSelection < 0)
processCharacterSelection();
- if (quit())
+ if (shouldQuit())
break;
if (_charSelection == 100) {
@@ -403,11 +403,11 @@
}
}
- if (quit())
+ if (shouldQuit())
return -1;
uint32 waitTime = _system->getMillis() + 420 * _tickLength;
- while (waitTime > _system->getMillis() && !skipFlag() && !quit()) {
+ while (waitTime > _system->getMillis() && !skipFlag() && !shouldQuit()) {
updateInput();
_system->delayMillis(10);
}
@@ -439,7 +439,7 @@
_chargenWSA->setDrawPage(0);
int index = 4;
- while (_sound->voiceIsPlaying("KING01") && _charSelection == -1 && !quit() && !skipFlag()) {
+ while (_sound->voiceIsPlaying("KING01") && _charSelection == -1 && !shouldQuit() && !skipFlag()) {
index = MAX(index, 4);
_chargenWSA->displayFrame(_chargenFrameTable[index], 0, 0, 0);
@@ -450,7 +450,7 @@
_screen->updateScreen();
uint32 waitEnd = _system->getMillis() + 7 * _tickLength;
- while (waitEnd > _system->getMillis() && _charSelection == -1 && !quit() && !skipFlag()) {
+ while (waitEnd > _system->getMillis() && _charSelection == -1 && !shouldQuit() && !skipFlag()) {
_charSelection = getCharSelection();
_system->delayMillis(10);
}
@@ -481,7 +481,7 @@
_chargenWSA->setDrawPage(0);
int index = 0;
- while (_sound->voiceIsPlaying("KING02") && _charSelection == -1 && !quit() && index < 15) {
+ while (_sound->voiceIsPlaying("KING02") && _charSelection == -1 && !shouldQuit() && index < 15) {
_chargenWSA->displayFrame(_chargenFrameTable[index+9], 0, 0, 0);
_screen->copyRegion(_selectionPosTable[_reminderChar1IdxTable[index]*2+0], _selectionPosTable[_reminderChar1IdxTable[index]*2+1], _charPreviews[0].x, _charPreviews[0].y, 32, 32, 4, 0);
_screen->copyRegion(_selectionPosTable[_reminderChar2IdxTable[index]*2+0], _selectionPosTable[_reminderChar2IdxTable[index]*2+1], _charPreviews[1].x, _charPreviews[1].y, 32, 32, 4, 0);
@@ -490,7 +490,7 @@
_screen->updateScreen();
uint32 waitEnd = _system->getMillis() + 8 * _tickLength;
- while (waitEnd > _system->getMillis() && !quit()) {
+ while (waitEnd > _system->getMillis() && !shouldQuit()) {
_charSelection = getCharSelection();
_system->delayMillis(10);
}
@@ -511,14 +511,14 @@
_chargenWSA->setDrawPage(0);
int index = 0;
- while (_sound->voiceIsPlaying("KING03") && !quit() && !skipFlag()) {
+ while (_sound->voiceIsPlaying("KING03") && !shouldQuit() && !skipFlag()) {
index = MAX(index, 4);
_chargenWSA->displayFrame(_chargenFrameTable[index], 0, 0, 0);
_screen->updateScreen();
uint32 waitEnd = _system->getMillis() + 8 * _tickLength;
- while (waitEnd > _system->getMillis() && !quit() && !skipFlag()) {
+ while (waitEnd > _system->getMillis() && !shouldQuit() && !skipFlag()) {
updateInput();
_system->delayMillis(10);
}
@@ -537,10 +537,10 @@
debugC(9, kDebugLevelMain, "LoLEngine::processCharacterSelection()");
_charSelection = -1;
- while (!quit() && _charSelection == -1) {
+ while (!shouldQuit() && _charSelection == -1) {
uint32 nextKingMessage = _system->getMillis() + 900 * _tickLength;
- while (nextKingMessage > _system->getMillis() && _charSelection == -1 && !quit()) {
+ while (nextKingMessage > _system->getMillis() && _charSelection == -1 && !shouldQuit()) {
updateSelectionAnims();
_charSelection = getCharSelection();
_system->delayMillis(10);
@@ -659,12 +659,12 @@
int index = 0;
file[4] = '0';
- while (_charSelectionInfoResult == -1 && !quit()) {
+ while (_charSelectionInfoResult == -1 && !shouldQuit()) {
if (!_sound->voicePlay(file))
break;
int i = 0;
- while (_sound->voiceIsPlaying(file) && _charSelectionInfoResult == -1 && !quit()) {
+ while (_sound->voiceIsPlaying(file) && _charSelectionInfoResult == -1 && !shouldQuit()) {
_screen->drawShape(0, _screen->getPtrToShape(_screen->getCPagePtr(9), _charInfoFrameTable[i]), 11, 130, 0, 0);
_screen->updateScreen();
Modified: scummvm/trunk/engines/kyra/saveload.cpp
===================================================================
--- scummvm/trunk/engines/kyra/saveload.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/saveload.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -179,7 +179,7 @@
Common::WriteStream *KyraEngine_v1::openSaveForWriting(const char *filename, const char *saveName, const Graphics::Surface *thumbnail) const {
debugC(9, kDebugLevelMain, "KyraEngine_v1::openSaveForWriting('%s', '%s', %p)", filename, saveName, (const void *)thumbnail);
- if (quit())
+ if (shouldQuit())
return 0;
Common::WriteStream *out = 0;
Modified: scummvm/trunk/engines/kyra/saveload_lok.cpp
===================================================================
--- scummvm/trunk/engines/kyra/saveload_lok.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/saveload_lok.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -221,7 +221,7 @@
void KyraEngine_LoK::saveGame(const char *fileName, const char *saveName, const Graphics::Surface *thumb) {
debugC(9, kDebugLevelMain, "KyraEngine_LoK::saveGame('%s', '%s', %p)", fileName, saveName, (const void *)thumb);
- if (quit())
+ if (shouldQuit())
return;
Common::OutSaveFile *out = openSaveForWriting(fileName, saveName, thumb);
Modified: scummvm/trunk/engines/kyra/scene_hof.cpp
===================================================================
--- scummvm/trunk/engines/kyra/scene_hof.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/scene_hof.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -277,7 +277,7 @@
int changedScene = 0;
const int *moveTableStart = moveTable;
_unk4 = 0;
- while (running && !quit()) {
+ while (running && !shouldQuit()) {
if (*moveTable >= 0 && *moveTable <= 7) {
_mainCharacter.facing = getOppositeFacingDirection(*moveTable);
unkFlag = true;
Modified: scummvm/trunk/engines/kyra/scene_mr.cpp
===================================================================
--- scummvm/trunk/engines/kyra/scene_mr.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/scene_mr.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -654,7 +654,7 @@
const int *moveTableStart = moveTable;
_unk4 = 0;
- while (running && !quit()) {
+ while (running && !shouldQuit()) {
if (*moveTable >= 0 && *moveTable <= 7) {
_mainCharacter.facing = getOppositeFacingDirection(*moveTable);
unkFlag = true;
Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/screen.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -384,7 +384,7 @@
getFadeParams(palData, delay, delayInc, diff);
int delayAcc = 0;
- while (!_vm->quit()) {
+ while (!_vm->shouldQuit()) {
delayAcc += delayInc;
int refreshed = fadePalStep(palData, diff);
@@ -401,7 +401,7 @@
delayAcc &= 0xFF;
}
- if (_vm->quit()) {
+ if (_vm->shouldQuit()) {
setScreenPalette(palData);
if (upFunc && upFunc->isValid())
(*upFunc)();
@@ -750,7 +750,7 @@
int32 start, now;
int wait;
- for (y = 0; y < h && !_vm->quit(); ++y) {
+ for (y = 0; y < h && !_vm->shouldQuit(); ++y) {
start = (int32)_system->getMillis();
int y_cur = y;
for (x = 0; x < w; ++x) {
@@ -775,7 +775,7 @@
copyOverlayRegion(sx, sy, sx, sy, w, h, srcPage, dstPage);
- if (_vm->quit()) {
+ if (_vm->shouldQuit()) {
copyRegion(sx, sy, sx, sy, w, h, srcPage, dstPage);
_system->updateScreen();
}
Modified: scummvm/trunk/engines/kyra/script.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/script.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -178,7 +178,7 @@
}
bool EMCInterpreter::isValid(EMCState *script) {
- if (!script->ip || !script->dataPtr || _vm->quit())
+ if (!script->ip || !script->dataPtr || _vm->shouldQuit())
return false;
return true;
}
Modified: scummvm/trunk/engines/kyra/script_lok.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_lok.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/script_lok.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -23,7 +23,6 @@
*
*/
-
#include "common/endian.h"
#include "common/system.h"
Modified: scummvm/trunk/engines/kyra/script_mr.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_mr.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/script_mr.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -786,7 +786,7 @@
_screen->_curPage = curPageBackUp;
_screen->showMouse();
- while (!quit()) {
+ while (!shouldQuit()) {
int keys = checkInput(0);
removeInputTop();
Modified: scummvm/trunk/engines/kyra/seqplayer.cpp
===================================================================
--- scummvm/trunk/engines/kyra/seqplayer.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/seqplayer.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -625,7 +625,7 @@
memset(_seqMovies, 0, sizeof(_seqMovies));
_screen->_curPage = 0;
- while (!_seqQuitFlag && !_vm->quit()) {
+ while (!_seqQuitFlag && !_vm->shouldQuit()) {
if (skipSeq && _vm->seq_skipSequence()) {
while (1) {
uint8 code = *_seqData;
Modified: scummvm/trunk/engines/kyra/sequences_hof.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sequences_hof.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/sequences_hof.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -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) || 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) || 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) || 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) || 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) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
if (_seqWsa) {
seq_processText();
- if (!((skipFlag() && allowSkip) || quit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ if (!((skipFlag() && allowSkip) || 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) || 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) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
_seqSubFrameStartTime = _system->getMillis();
seq_processWSAs();
@@ -2267,7 +2267,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() || shouldQuit() || _abortIntroFlag)
return;
switch (command) {
@@ -2467,7 +2467,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() || shouldQuit() || _abortIntroFlag || _menuChoice)
return;
memset(&_screen->getPalette(0)[0x2fa], 0x3f, 6);
@@ -2957,7 +2957,7 @@
++_invWsa.curFrame;
- if (_invWsa.curFrame >= _invWsa.lastFrame && !quit())
+ if (_invWsa.curFrame >= _invWsa.lastFrame && !shouldQuit())
break;
switch (_invWsa.curFrame) {
Modified: scummvm/trunk/engines/kyra/sequences_lok.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sequences_lok.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/sequences_lok.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -163,7 +163,7 @@
_screen->updateScreen();
_screen->fadeFromBlack();
- if (_seq->playSequence(_seq_WestwoodLogo, _skipFlag) || quit()) {
+ if (_seq->playSequence(_seq_WestwoodLogo, _skipFlag) || shouldQuit()) {
_screen->fadeToBlack();
_screen->clearPage(0);
return;
@@ -175,14 +175,14 @@
_screen->setScreenPalette(_screen->_currentPalette);
}
- if ((_seq->playSequence(_seq_KyrandiaLogo, _skipFlag) && !seq_skipSequence()) || quit()) {
+ if ((_seq->playSequence(_seq_KyrandiaLogo, _skipFlag) && !seq_skipSequence()) || shouldQuit()) {
_screen->fadeToBlack();
_screen->clearPage(0);
return;
}
_screen->fillRect(0, 179, 319, 199, 0);
- if (quit())
+ if (shouldQuit())
return;
if (_flags.platform == Common::kPlatformAmiga) {
@@ -222,10 +222,10 @@
oldDistance = distance;
delay(10);
- } while (!doneFlag && !quit() && !_abortIntroFlag);
+ } while (!doneFlag && !shouldQuit() && !_abortIntroFlag);
}
- if (quit())
+ if (shouldQuit())
return;
_seq->playSequence(_seq_Forest, true);
@@ -1029,7 +1029,7 @@
void KyraEngine_LoK::seq_playEnding() {
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_playEnding()");
- if (quit())
+ if (shouldQuit())
return;
_screen->hideMouse();
_screen->_curPage = 0;
@@ -1210,7 +1210,7 @@
bool KyraEngine_LoK::seq_skipSequence() const {
debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_skipSequence()");
- return quit() || _abortIntroFlag;
+ return shouldQuit() || _abortIntroFlag;
}
int KyraEngine_LoK::handleMalcolmFlag() {
Modified: scummvm/trunk/engines/kyra/text.cpp
===================================================================
--- scummvm/trunk/engines/kyra/text.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/text.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -23,8 +23,6 @@
*
*/
-
-
#include "kyra/kyra_v1.h"
#include "kyra/screen.h"
#include "kyra/text.h"
Modified: scummvm/trunk/engines/kyra/text_hof.cpp
===================================================================
--- scummvm/trunk/engines/kyra/text_hof.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/text_hof.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -335,7 +335,7 @@
const uint32 endTime = _chatEndTime;
resetSkipFlag();
- while (running && !quit()) {
+ while (running && !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 && !shouldQuit()) {
updateWithText();
const uint32 curTime = _system->getMillis();
@@ -593,7 +593,7 @@
if (_currentTalkSections.STATim) {
_tim->resetFinishedFlag();
- while (!quit() && !_tim->finished()) {
+ while (!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 (!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())) && !(shouldQuit() || skipFlag())) {
if ((!speechEnabled() && chatAnimEndTime > _system->getMillis()) || (speechEnabled() && snd_voiceIsPlaying())) {
_tim->resetFinishedFlag();
- while (!_tim->finished() && !skipFlag() && !quit()) {
+ while (!_tim->finished() && !skipFlag() && !shouldQuit()) {
if (_currentTalkSections.TLKTim)
_tim->exec(_currentTalkSections.TLKTim, false);
else
Modified: scummvm/trunk/engines/kyra/text_mr.cpp
===================================================================
--- scummvm/trunk/engines/kyra/text_mr.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/kyra/text_mr.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -349,7 +349,7 @@
const uint32 endTime = _chatEndTime;
resetSkipFlag();
- while (running && !quit()) {
+ while (running && !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 && !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 && !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 && !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 && !shouldQuit()) {
if (nextFrame < _system->getMillis()) {
++frame;
if (frame > 22)
Modified: scummvm/trunk/engines/lure/events.cpp
===================================================================
--- scummvm/trunk/engines/lure/events.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/lure/events.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -141,9 +141,9 @@
LureEngine &engine = LureEngine::getReference();
do {
- while (e.pollEvent() && !engine.quit()) ;
+ while (e.pollEvent() && !engine.shouldQuit()) ;
g_system->delayMillis(20);
- } while (!engine.quit() && (lButton() || rButton() || mButton()));
+ } while (!engine.shouldQuit() && (lButton() || rButton() || mButton()));
}
/*--------------------------------------------------------------------------*/
@@ -211,7 +211,7 @@
uint32 delayCtr = g_system->getMillis() + milliseconds;
while (g_system->getMillis() < delayCtr) {
- if (engine.quit()) return true;
+ if (engine.shouldQuit()) return true;
if (events.pollEvent()) {
if (((events.type() == Common::EVENT_KEYDOWN) && (events.event().kbd.ascii != 0)) ||
Modified: scummvm/trunk/engines/lure/fights.cpp
===================================================================
--- scummvm/trunk/engines/lure/fights.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/lure/fights.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -117,7 +117,7 @@
uint32 timerVal = g_system->getMillis();
// Loop for the duration of the battle
- while (!engine.quit() && (playerFight.fwhits != GENERAL_MAGIC_ID)) {
+ while (!engine.shouldQuit() && (playerFight.fwhits != GENERAL_MAGIC_ID)) {
checkEvents();
if (g_system->getMillis() > timerVal + GAME_FRAME_DELAY) {
Modified: scummvm/trunk/engines/lure/game.cpp
===================================================================
--- scummvm/trunk/engines/lure/game.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/lure/game.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -151,7 +151,7 @@
bool initialRestart = true;
- while (!engine.quit()) {
+ while (!engine.shouldQuit()) {
if ((_state & GS_RESTART) != 0) {
res.reset();
@@ -171,7 +171,7 @@
mouse.cursorOn();
// Main game loop
- while (!engine.quit() && ((_state & GS_RESTART) == 0)) {
+ while (!engine.shouldQuit() && ((_state & GS_RESTART) == 0)) {
// If time for next frame, allow everything to update
if (system.getMillis() > timerVal + GAME_FRAME_DELAY) {
timerVal = system.getMillis();
@@ -1025,7 +1025,7 @@
}
g_system->delayMillis(10);
- } while (!engine.quit() && !breakFlag);
+ } while (!engine.shouldQuit() && !breakFlag);
screen.update();
if (!vKbdFlag)
Modified: scummvm/trunk/engines/lure/intro.cpp
===================================================================
--- scummvm/trunk/engines/lure/intro.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/lure/intro.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -60,13 +60,13 @@
screen.update();
Palette p(paletteId);
- if (LureEngine::getReference().quit()) return true;
+ if (LureEngine::getReference().shouldQuit()) return true;
if (isEGA) screen.setPalette(&p);
else screen.paletteFadeIn(&p);
bool result = interruptableDelay(delaySize);
- if (LureEngine::getReference().quit()) return true;
+ if (LureEngine::getReference().shouldQuit()) return true;
if (!isEGA)
screen.paletteFadeOut();
@@ -84,7 +84,7 @@
if (events.interruptableDelay(milliseconds)) {
if (events.type() == Common::EVENT_KEYDOWN)
return events.event().kbd.keycode == 27;
- else if (LureEngine::getReference().quit())
+ else if (LureEngine::getReference().shouldQuit())
return true;
else if (events.type() == Common::EVENT_LBUTTONDOWN)
return false;
Modified: scummvm/trunk/engines/lure/lure.cpp
===================================================================
--- scummvm/trunk/engines/lure/lure.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/lure/lure.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -136,7 +136,7 @@
CopyProtectionDialog *dialog = new CopyProtectionDialog();
bool result = dialog->show();
delete dialog;
- if (quit())
+ if (shouldQuit())
return 0;
if (!result)
@@ -153,7 +153,7 @@
}
// Play the game
- if (!quit()) {
+ if (!shouldQuit()) {
// Play the game
Sound.loadSection(Sound.isRoland() ? ROLAND_MAIN_SOUND_RESOURCE_ID : ADLIB_MAIN_SOUND_RESOURCE_ID);
gameInstance->execute();
Modified: scummvm/trunk/engines/lure/menu.cpp
===================================================================
--- scummvm/trunk/engines/lure/menu.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/lure/menu.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -131,7 +131,7 @@
while (mouse.lButton() || mouse.rButton()) {
while (events.pollEvent()) {
- if (engine.quit()) return MENUITEM_NONE;
+ if (engine.shouldQuit()) return MENUITEM_NONE;
if (mouse.y() < MENUBAR_Y_SIZE) {
MenuRecord *p = getMenuAt(mouse.x());
@@ -547,7 +547,7 @@
}
while (e.pollEvent()) {
- if (engine.quit()) {
+ if (engine.shouldQuit()) {
selectedIndex = 0xffff;
goto bail_out;
Modified: scummvm/trunk/engines/lure/scripts.cpp
===================================================================
--- scummvm/trunk/engines/lure/scripts.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/lure/scripts.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -221,7 +221,7 @@
anim->show();
if (!events.interruptableDelay(30000)) {
// No key yet pressed, so keep waiting
- while (Sound.musicInterface_CheckPlaying(6) && !engine.quit()) {
+ while (Sound.musicInterface_CheckPlaying(6) && !engine.shouldQuit()) {
if (events.interruptableDelay(20))
break;
}
Modified: scummvm/trunk/engines/lure/surface.cpp
===================================================================
--- scummvm/trunk/engines/lure/surface.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/lure/surface.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -534,7 +534,7 @@
// Loop until the input string changes
refreshFlag = false;
while (!refreshFlag && !abortFlag) {
- abortFlag = engine.quit();
+ abortFlag = engine.shouldQuit();
if (abortFlag) break;
while (events.pollEvent()) {
@@ -976,7 +976,7 @@
// Provide highlighting of lines to select a save slot
while (!abortFlag && !(mouse.lButton() && (selectedLine != -1))
&& !mouse.rButton() && !mouse.mButton()) {
- abortFlag = engine.quit();
+ abortFlag = engine.shouldQuit();
if (abortFlag) break;
while (events.pollEvent()) {
@@ -1179,7 +1179,7 @@
// Event loop for making selection
bool buttonPressed = false;
- while (!engine.quit()) {
+ while (!engine.shouldQuit()) {
// Handle events
while (events.pollEvent()) {
if ((events.type() == Common::EVENT_LBUTTONDOWN) && (highlightedButton != -1)) {
@@ -1231,7 +1231,7 @@
Sound.killSounds();
- if (!restartFlag && !engine.quit()) {
+ if (!restartFlag && !engine.shouldQuit()) {
// Need to show Restore game dialog
if (!SaveRestoreDialog::show(false))
// User cancelled, so fall back on Restart
@@ -1351,7 +1351,7 @@
// Clear any prior try
_charIndex = 0;
- while (!engine.quit()) {
+ while (!engine.shouldQuit()) {
while (events.pollEvent() && (_charIndex < 4)) {
if (events.type() == Common::EVENT_KEYDOWN) {
if ((events.event().kbd.keycode == Common::KEYCODE_BACKSPACE) && (_charIndex > 0)) {
@@ -1385,7 +1385,7 @@
break;
}
- if (engine.quit())
+ if (engine.shouldQuit())
return false;
// At this point, two page numbers have been entered - validate them
Modified: scummvm/trunk/engines/parallaction/exec_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/exec_ns.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/parallaction/exec_ns.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -357,7 +357,7 @@
_ctxt.suspend = false;
for ( ; first != last; first++) {
- if (_vm->quit())
+ if (_vm->shouldQuit())
break;
CommandPtr cmd = *first;
Modified: scummvm/trunk/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/parallaction/parallaction.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -326,7 +326,7 @@
void Parallaction::runGame() {
int event = _input->updateInput();
- if (quit())
+ if (shouldQuit())
return;
runGuiFrame();
@@ -337,7 +337,7 @@
processInput(event);
runPendingZones();
- if (quit())
+ if (shouldQuit())
return;
if (_engineFlags & kEngineChangeLocation) {
Modified: scummvm/trunk/engines/parallaction/parallaction_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction_br.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/parallaction/parallaction_br.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -104,7 +104,7 @@
bool splash = true;
- while (!quit()) {
+ while (!shouldQuit()) {
if (getFeatures() & GF_DEMO) {
scheduleLocationSwitch("camalb.1");
@@ -117,7 +117,7 @@
// initCharacter();
- while (((_engineFlags & kEngineReturn) == 0) && (!quit())) {
+ while (((_engineFlags & kEngineReturn) == 0) && (!shouldQuit())) {
runGame();
}
_engineFlags &= ~kEngineReturn;
Modified: scummvm/trunk/engines/parallaction/parallaction_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction_ns.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/parallaction/parallaction_ns.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -231,7 +231,7 @@
startGui();
- while (!quit()) {
+ while (!shouldQuit()) {
runGame();
}
Modified: scummvm/trunk/engines/queen/logic.cpp
===================================================================
--- scummvm/trunk/engines/queen/logic.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/queen/logic.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -2076,7 +2076,7 @@
displayRoom(currentRoom(), RDM_FADE_NOJOE, 100, 2, true);
playCutaway("CLOGO.CUT");
sceneReset();
- if (_vm->quit())
+ if (_vm->shouldQuit())
return true;
currentRoom(ROOM_HOTEL_LOBBY);
entryObj(584);
@@ -2131,10 +2131,10 @@
} else if (currentRoom() == FOTAQ_LOGO && gameState(VAR_INTRO_PLAYED) == 0) {
displayRoom(currentRoom(), RDM_FADE_NOJOE, 100, 2, true);
playCutaway("COPY.CUT");
- if (_vm->quit())
+ if (_vm->shouldQuit())
return true;
playCutaway("CLOGO.CUT");
- if (_vm->quit())
+ if (_vm->shouldQuit())
return true;
if (_vm->resource()->getPlatform() != Common::kPlatformAmiga) {
if (ConfMan.getBool("alt_intro") && _vm->resource()->isCD()) {
@@ -2143,10 +2143,10 @@
playCutaway("CDINT.CUT");
}
}
- if (_vm->quit())
+ if (_vm->shouldQuit())
return true;
playCutaway("CRED.CUT");
- if (_vm->quit())
+ if (_vm->shouldQuit())
return true;
_vm->display()->palSetPanel();
sceneReset();
Modified: scummvm/trunk/engines/queen/queen.cpp
===================================================================
--- scummvm/trunk/engines/queen/queen.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/queen/queen.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -437,7 +437,7 @@
}
_lastSaveTime = _lastUpdateTime = _system->getMillis();
- while (!quit()) {
+ while (!shouldQuit()) {
if (_logic->newRoom() > 0) {
_logic->update();
_logic->oldRoom(_logic->currentRoom());
Modified: scummvm/trunk/engines/queen/talk.cpp
===================================================================
--- scummvm/trunk/engines/queen/talk.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/queen/talk.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -807,7 +807,7 @@
switch (command) {
case SPEAK_PAUSE:
- for (i = 0; i < 10 && !_vm->input()->talkQuit() && !_vm->quit(); i++) {
+ for (i = 0; i < 10 && !_vm->input()->talkQuit() && !_vm->shouldQuit(); i++) {
_vm->update();
}
return;
Modified: scummvm/trunk/engines/saga/introproc_ihnm.cpp
===================================================================
--- scummvm/trunk/engines/saga/introproc_ihnm.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/saga/introproc_ihnm.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -59,11 +59,11 @@
// Play Cyberdreams logo for 168 frames
if (!playTitle(0, logoLength, true)) {
- if (_vm->quit())
+ if (_vm->shouldQuit())
return !SUCCESS;
// Play Dreamers Guild logo for 10 seconds
if (!playLoopingTitle(1, 10)) {
- if (_vm->quit())
+ if (_vm->shouldQuit())
return !SUCCESS;
// Play the title music
_vm->_music->play(1, MUSIC_NORMAL);
@@ -74,7 +74,7 @@
} else {
_vm->_music->play(1, MUSIC_NORMAL);
playTitle(0, 10);
- if (_vm->quit())
+ if (_vm->shouldQuit())
return !SUCCESS;
playTitle(2, 12);
}
@@ -193,7 +193,7 @@
_vm->_gfx->getCurrentPal(pal_cut);
- while (!done && !_vm->quit()) {
+ while (!done && !_vm->shouldQuit()) {
curTime = _vm->_system->getMillis();
switch (phase) {
Modified: scummvm/trunk/engines/saga/saga.cpp
===================================================================
--- scummvm/trunk/engines/saga/saga.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/saga/saga.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -270,7 +270,7 @@
uint32 currentTicks;
- while (!quit()) {
+ while (!shouldQuit()) {
if (_console->isAttached())
_console->onFrame();
Modified: scummvm/trunk/engines/scumm/he/cup_player_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/cup_player_he.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/scumm/he/cup_player_he.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -99,7 +99,7 @@
debug(1, "rate %d width %d height %d", _playbackRate, _width, _height);
int ticks = _system->getMillis();
- while (_dataSize != 0 && !_vm->quit()) {
+ while (_dataSize != 0 && !_vm->shouldQuit()) {
while (parseNextBlockTag(_fileStream)) {
if (_fileStream.ioFailed()) {
return;
@@ -190,7 +190,7 @@
CUP_SfxChannel *sfxChannel = &_sfxChannels[channel];
debug(1, "waitForSfxChannel %d", channel);
if ((sfxChannel->flags & kSfxFlagLoop) == 0) {
- while (_mixer->isSoundHandleActive(sfxChannel->handle) && !_vm->quit()) {
+ while (_mixer->isSoundHandleActive(sfxChannel->handle) && !_vm->shouldQuit()) {
_vm->parseEvents();
_system->delayMillis(10);
}
Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/scumm/scumm.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -24,7 +24,6 @@
*/
-
#include "common/config-manager.h"
#include "common/md5.h"
#include "common/events.h"
@@ -1726,7 +1725,7 @@
int diff = 0; // Duration of one loop iteration
- while (!quit()) {
+ while (!shouldQuit()) {
if (_debugger->isAttached())
_debugger->onFrame();
@@ -1759,7 +1758,7 @@
diff = _system->getMillis() - diff;
- if (quit()) {
+ if (shouldQuit()) {
// TODO: Maybe perform an autosave on exit?
}
}
@@ -1777,7 +1776,7 @@
start_time = _system->getMillis();
- while (!quit()) {
+ while (!shouldQuit()) {
_sound->updateCD(); // Loop CD Audio if needed
parseEvents();
_system->updateScreen();
@@ -1900,7 +1899,7 @@
checkExecVerbs();
checkAndRunSentenceScript();
- if (quit())
+ if (shouldQuit())
return;
// HACK: If a load was requested, immediately perform it. This avoids
Modified: scummvm/trunk/engines/scumm/smush/smush_player.cpp
===================================================================
--- scummvm/trunk/engines/scumm/smush/smush_player.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/scumm/smush/smush_player.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -1254,7 +1254,7 @@
}
if (_endOfFile)
break;
- if (_vm->quit() || _vm->_saveLoadFlag || _vm->_smushVideoShouldFinish) {
+ if (_vm->shouldQuit() || _vm->_saveLoadFlag || _vm->_smushVideoShouldFinish) {
_smixer->stop();
_vm->_mixer->stopHandle(_compressedFileSoundHandle);
_vm->_mixer->stopHandle(_IACTchannel);
Modified: scummvm/trunk/engines/sky/control.cpp
===================================================================
--- scummvm/trunk/engines/sky/control.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/sky/control.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -496,7 +496,7 @@
_curButtonText = 0;
uint16 clickRes = 0;
- while (!quitPanel && !g_engine->quit()) {
+ while (!quitPanel && !g_engine->shouldQuit()) {
_text->drawToScreen(WITH_MASK);
_system->updateScreen();
_mouseClicked = false;
@@ -528,7 +528,7 @@
}
memset(_screenBuf, 0, GAME_SCREEN_WIDTH * FULL_SCREEN_HEIGHT);
_system->copyRectToScreen(_screenBuf, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, FULL_SCREEN_HEIGHT);
- if (!g_engine->quit())
+ if (!g_engine->shouldQuit())
_system->updateScreen();
_skyScreen->forceRefresh();
_skyScreen->setPaletteEndian((uint8 *)_skyCompact->fetchCpt(SkyEngine::_systemVars.currentPalette));
@@ -879,7 +879,7 @@
bool refreshNames = true;
bool refreshAll = true;
uint16 clickRes = 0;
- while (!quitPanel && !g_engine->quit()) {
+ while (!quitPanel && !g_engine->shouldQuit()) {
clickRes = 0;
if (refreshNames || refreshAll) {
if (refreshAll) {
Modified: scummvm/trunk/engines/sky/sky.cpp
===================================================================
--- scummvm/trunk/engines/sky/sky.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/sky/sky.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -365,7 +365,7 @@
introSkipped = !_skyIntro->doIntro(_floppyIntro);
}
- if (!quit()) {
+ if (!shouldQuit()) {
_skyLogic->initScreen0();
if (introSkipped)
_skyControl->restartGame();
@@ -375,7 +375,7 @@
_lastSaveTime = _system->getMillis();
uint32 delayCount = _system->getMillis();
- while (!quit()) {
+ while (!shouldQuit()) {
if (_debugger->isAttached())
_debugger->onFrame();
Modified: scummvm/trunk/engines/sword1/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword1/animation.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/sword1/animation.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -302,7 +302,7 @@
break;
}
}
- if (_vm->quit())
+ if (_vm->shouldQuit())
terminated = true;
}
Modified: scummvm/trunk/engines/sword1/control.cpp
===================================================================
--- scummvm/trunk/engines/sword1/control.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/sword1/control.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -215,7 +215,7 @@
notAccepted = false;
}
}
- } while (notAccepted && (!g_engine->quit()));
+ } while (notAccepted && (!g_engine->shouldQuit()));
_resMan->resClose(fontId);
free(_screenBuf);
@@ -317,7 +317,7 @@
}
delay(1000 / 12);
newMode = getClicks(mode, &retVal);
- } while ((newMode != BUTTON_DONE) && (retVal == 0) && (!g_engine->quit()));
+ } while ((newMode != BUTTON_DONE) && (retVal == 0) && (!g_engine->shouldQuit()));
if (SwordEngine::_systemVars.controlPanelMode == CP_NORMAL) {
uint8 volL, volR;
Modified: scummvm/trunk/engines/sword1/credits.cpp
===================================================================
--- scummvm/trunk/engines/sword1/credits.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/sword1/credits.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -125,7 +125,7 @@
uint16 renderY = BUFSIZE_Y / 2;
uint16 clearY = 0xFFFF;
bool clearLine = false;
- while (((*textData != FNT_EOB) || (scrollY != renderY)) && !g_engine->quit()) {
+ while (((*textData != FNT_EOB) || (scrollY != renderY)) && !g_engine->shouldQuit()) {
if ((int32)_mixer->getSoundElapsedTime(bgSound) - relDelay < (SCROLL_TIMING * 2)) { // sync to audio
if (scrollY < BUFSIZE_Y - CREDITS_Y)
_system->copyRectToScreen(screenBuf + scrollY * CREDITS_X, CREDITS_X, START_X, START_Y, CREDITS_X, CREDITS_Y);
@@ -175,7 +175,7 @@
uint8 *revoBuf = credFile.decompressFile(REVO_LOGO);
uint8 *revoPal = credFile.fetchFile(REVO_PAL, &_palLen);
_palLen /= 3;
- while ((_mixer->getSoundElapsedTime(bgSound) < LOGO_FADEUP_TIME) && !g_engine->quit()) {
+ while ((_mixer->getSoundElapsedTime(bgSound) < LOGO_FADEUP_TIME) && !g_engine->shouldQuit()) {
delay(100);
}
memset(_palette, 0, 256 * 4);
@@ -184,13 +184,13 @@
_system->updateScreen();
fadePalette(revoPal, true, _palLen);
- while ((_mixer->getSoundElapsedTime(bgSound) < LOGO_FADEDOWN_TIME) && !g_engine->quit()) {
+ while ((_mixer->getSoundElapsedTime(bgSound) < LOGO_FADEDOWN_TIME) && !g_engine->shouldQuit()) {
delay(100);
}
fadePalette(revoPal, false, _palLen);
delay(3000);
- if (g_engine->quit())
+ if (g_engine->shouldQuit())
_mixer->stopAll();
free(revoBuf);
}
@@ -200,7 +200,7 @@
int fadeStart = fadeup ? 0 : 12;
int relDelay = _system->getMillis();
- for (int fadeStep = fadeStart; (fadeStep >= 0) && (fadeStep <= 12) && !g_engine->quit(); fadeStep += fadeDir) {
+ for (int fadeStep = fadeStart; (fadeStep >= 0) && (fadeStep <= 12) && !g_engine->shouldQuit(); fadeStep += fadeDir) {
for (uint16 cnt = 0; cnt < len * 3; cnt++)
_palette[(cnt / 3) * 4 + (cnt % 3)] = (srcPal[cnt] * fadeStep) / 12;
_system->setPalette(_palette, 0, 256);
@@ -293,7 +293,7 @@
if (msecs > 0)
_system->delayMillis(10);
- } while ((_system->getMillis() < start + msecs) && !g_engine->quit());
+ } while ((_system->getMillis() < start + msecs) && !g_engine->shouldQuit());
}
ArcFile::ArcFile(void) {
Modified: scummvm/trunk/engines/sword1/sword1.cpp
===================================================================
--- scummvm/trunk/engines/sword1/sword1.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/sword1/sword1.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -703,7 +703,7 @@
_systemVars.controlPanelMode = CP_NEWGAME;
if (_control->runPanel() == CONTROL_GAME_RESTORED)
_control->doRestore();
- else if (!quit())
+ else if (!shouldQuit())
_logic->startPositions(0);
} else {
// no savegames, start new game.
@@ -712,10 +712,10 @@
}
_systemVars.controlPanelMode = CP_NORMAL;
- while (!quit()) {
+ while (!shouldQuit()) {
uint8 action = mainLoop();
- if (!quit()) {
+ if (!shouldQuit()) {
// the mainloop was left, we have to reinitialize.
reinitialize();
if (action == CONTROL_GAME_RESTORED)
@@ -756,7 +756,7 @@
uint8 retCode = 0;
_keyPressed.reset();
- while ((retCode == 0) && (!quit())) {
+ while ((retCode == 0) && (!shouldQuit())) {
// do we need the section45-hack from sword.c here?
checkCd();
@@ -805,9 +805,9 @@
}
_mouseState = 0;
_keyPressed.reset();
- } while ((Logic::_scriptVars[SCREEN] == Logic::_scriptVars[NEW_SCREEN]) && (retCode == 0) && (!quit()));
+ } while ((Logic::_scriptVars[SCREEN] == Logic::_scriptVars[NEW_SCREEN]) && (retCode == 0) && (!shouldQuit()));
- if ((retCode == 0) && (Logic::_scriptVars[SCREEN] != 53) && _systemVars.wantFade && (!quit())) {
+ if ((retCode == 0) && (Logic::_scriptVars[SCREEN] != 53) && _systemVars.wantFade && (!shouldQuit())) {
_screen->fadeDownPalette();
int32 relDelay = (int32)_system->getMillis();
while (_screen->stillFading()) {
Modified: scummvm/trunk/engines/sword2/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword2/animation.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/sword2/animation.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -379,7 +379,7 @@
bool startNextText = false;
// This happens if the user quits during the "eye" cutscene.
- if (_vm->quit())
+ if (_vm->shouldQuit())
return;
_numSpeechLines = numLines;
Modified: scummvm/trunk/engines/sword2/controls.cpp
===================================================================
--- scummvm/trunk/engines/sword2/controls.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/sword2/controls.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -396,7 +396,7 @@
_vm->_system->delayMillis(20);
- if (_vm->quit())
+ if (_vm->shouldQuit())
setResult(0);
}
@@ -842,7 +842,7 @@
if (startDialog.runModal())
return 1;
- if (_vm->quit())
+ if (_vm->shouldQuit())
return 0;
RestoreDialog restoreDialog(_vm);
@@ -850,7 +850,7 @@
if (restoreDialog.runModal())
return 0;
- if (_vm->quit())
+ if (_vm->shouldQuit())
return 0;
}
Modified: scummvm/trunk/engines/sword2/palette.cpp
===================================================================
--- scummvm/trunk/engines/sword2/palette.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/sword2/palette.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -212,7 +212,7 @@
}
void Screen::waitForFade() {
- while (getFadeStatus() != RDFADE_NONE && getFadeStatus() != RDFADE_BLACK && !_vm->quit()) {
+ while (getFadeStatus() != RDFADE_NONE && getFadeStatus() != RDFADE_BLACK && !_vm->shouldQuit()) {
updateDisplay();
_vm->_system->delayMillis(20);
}
Modified: scummvm/trunk/engines/sword2/resman.cpp
===================================================================
--- scummvm/trunk/engines/sword2/resman.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/sword2/resman.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -412,7 +412,7 @@
// quit while the game is asking for the user to insert a CD.
// But recovering from this situation gracefully is just too
// much trouble, so quit now.
- if (_vm->quit())
+ if (_vm->shouldQuit())
g_system->quit();
// If the file is supposed to be on hard disk, or we're
Modified: scummvm/trunk/engines/sword2/screen.cpp
===================================================================
--- scummvm/trunk/engines/sword2/screen.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/sword2/screen.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -389,7 +389,7 @@
uint32 targetTime = _vm->getMillis() + (time * 1000);
_vm->sleepUntil(targetTime);
} else {
- while (!_vm->quit()) {
+ while (!_vm->shouldQuit()) {
MouseEvent *me = _vm->mouseEvent();
if (me && (me->buttons & (RD_LEFTBUTTONDOWN | RD_RIGHTBUTTONDOWN)))
break;
@@ -1035,7 +1035,7 @@
uint32 musicLength = MAX((int32)(1000 * (_vm->_sound->musicTimeRemaining() - 3)), 25 * (int32)scrollSteps);
- while (scrollPos < scrollSteps && !_vm->quit()) {
+ while (scrollPos < scrollSteps && !_vm->shouldQuit()) {
clearScene();
for (i = startLine; i < lineCount; i++) {
@@ -1123,13 +1123,13 @@
// The music should either have stopped or be about to stop, so
// wait for it to really happen.
- while (_vm->_sound->musicTimeRemaining() && !_vm->quit()) {
+ while (_vm->_sound->musicTimeRemaining() && !_vm->shouldQuit()) {
updateDisplay(false);
_vm->_system->delayMillis(100);
}
}
- if (_vm->quit())
+ if (_vm->shouldQuit())
return;
waitForFade();
Modified: scummvm/trunk/engines/sword2/sword2.cpp
===================================================================
--- scummvm/trunk/engines/sword2/sword2.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/sword2/sword2.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -421,7 +421,7 @@
// player will kill the music for us. Otherwise, the restore
// will either have killed the music, or done a crossfade.
- if (quit())
+ if (shouldQuit())
return 0;
if (result)
@@ -493,7 +493,7 @@
// because we want the break to happen before updating the
// screen again.
- if (quit())
+ if (shouldQuit())
break;
// creates the debug text blocks
Modified: scummvm/trunk/engines/tinsel/tinsel.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/tinsel.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/tinsel/tinsel.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -740,7 +740,7 @@
// Foreground loop
- while (!quit()) {
+ while (!shouldQuit()) {
assert(_console);
if (_console->isAttached())
_console->onFrame();
Modified: scummvm/trunk/engines/touche/menu.cpp
===================================================================
--- scummvm/trunk/engines/touche/menu.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/touche/menu.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -433,7 +433,7 @@
_system->delayMillis(10);
}
_fullRedrawCounter = 2;
- if (!menuData.exit && quit()) {
+ if (!menuData.exit && shouldQuit()) {
if (displayQuitDialog())
quitGame();
}
Modified: scummvm/trunk/engines/touche/touche.cpp
===================================================================
--- scummvm/trunk/engines/touche/touche.cpp 2008-09-30 11:55:32 UTC (rev 34699)
+++ scummvm/trunk/engines/touche/touche.cpp 2008-09-30 12:27:38 UTC (rev 34700)
@@ -268,7 +268,7 @@
}
uint32 frameTimeStamp = _system->getMillis();
- for (uint32 cycleCounter = 0; !quit(); ++cycleCounter) {
+ for (uint32 cycleCounter = 0; !shouldQuit(); ++cycleCounter) {
if ((cycleCounter % 3) == 0) {
runCycle();
}
@@ -1837,7 +1837,7 @@
_menuRedrawCounter = 2;
Common::Rect rect(0, y, kScreenWidth, y + h);
i = -1;
- while (_inp_rightMouseButtonPressed && !quit()) {
+ while (_inp_rightMouseButtonPressed && !shouldQuit()) {
Common::Point mousePos = getMousePos();
if (rect.contains(mousePos)) {
int c = (mousePos.y - y) / kTextHeight;
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