aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/scumm.cpp
diff options
context:
space:
mode:
authorChristopher Page2008-07-11 01:22:37 +0000
committerChristopher Page2008-07-11 01:22:37 +0000
commite9c6b03fc73ad5d556eb56afed6e55ef1b0bef67 (patch)
treef048b01ac7a0ec7d4ec754ef567feaa798c86a66 /engines/scumm/scumm.cpp
parentcbadb51ce75f2ec599203433b50c9d4bf5f51728 (diff)
downloadscummvm-rg350-e9c6b03fc73ad5d556eb56afed6e55ef1b0bef67.tar.gz
scummvm-rg350-e9c6b03fc73ad5d556eb56afed6e55ef1b0bef67.tar.bz2
scummvm-rg350-e9c6b03fc73ad5d556eb56afed6e55ef1b0bef67.zip
SCUMM works with new GMM implementation
svn-id: r33001
Diffstat (limited to 'engines/scumm/scumm.cpp')
-rw-r--r--engines/scumm/scumm.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 0e62ef4b19..37e1fa862a 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -143,7 +143,6 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
_objs = NULL;
_sound = NULL;
memset(&vm, 0, sizeof(vm));
- _quit = false;
_pauseDialog = NULL;
_scummMenuDialog = NULL;
_versionDialog = NULL;
@@ -815,7 +814,6 @@ ScummEngine_vCUPhe::ScummEngine_vCUPhe(OSystem *syst, const DetectorResult &dr)
_syst = syst;
_game = dr.game;
_filenamePattern = dr.fp,
- _quit = false;
_cupPlayer = new CUP_Player(syst, this, _mixer);
}
@@ -846,9 +844,6 @@ void ScummEngine_vCUPhe::parseEvents() {
while (_eventMan->pollEvent(event)) {
switch (event.type) {
- case Common::EVENT_QUIT:
- _quit = true;
- break;
default:
break;
@@ -1722,7 +1717,7 @@ int ScummEngine::go() {
int diff = 0; // Duration of one loop iteration
- while (!_quit) {
+ while (!quit()) {
if (_debugger->isAttached())
_debugger->onFrame();
@@ -1755,12 +1750,12 @@ int ScummEngine::go() {
diff = _system->getMillis() - diff;
- if (_quit) {
+ if (quit()) {
// TODO: Maybe perform an autosave on exit?
}
}
- return _rtl;
+ return _eventMan->shouldRTL();
}
void ScummEngine::waitForTimer(int msec_delay) {
@@ -1773,7 +1768,7 @@ void ScummEngine::waitForTimer(int msec_delay) {
start_time = _system->getMillis();
- while (!_quit) {
+ while (!quit()) {
_sound->updateCD(); // Loop CD Audio if needed
parseEvents();
_system->updateScreen();
@@ -1896,7 +1891,7 @@ load_game:
checkExecVerbs();
checkAndRunSentenceScript();
- if (_quit)
+ if (quit())
return;
// HACK: If a load was requested, immediately perform it. This avoids
@@ -2161,10 +2156,6 @@ void ScummEngine::pauseGame() {
pauseDialog();
}
-void ScummEngine::shutDown() {
- _quit = true;
-}
-
void ScummEngine::restart() {
// TODO: Check this function - we should probably be reinitting a lot more stuff, and I suspect
// this leaks memory like a sieve
@@ -2317,7 +2308,7 @@ void ScummEngine::confirmExitDialog() {
ConfirmDialog d(this, 6);
if (runDialog(d)) {
- _quit = true;
+ quitGame();
}
}