aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob')
-rw-r--r--engines/gob/game_v1.cpp4
-rw-r--r--engines/gob/game_v2.cpp10
-rw-r--r--engines/gob/gob.cpp4
-rw-r--r--engines/gob/gob.h2
-rw-r--r--engines/gob/inter.cpp4
-rw-r--r--engines/gob/inter_bargon.cpp6
-rw-r--r--engines/gob/inter_v1.cpp4
-rw-r--r--engines/gob/inter_v2.cpp2
-rw-r--r--engines/gob/mult.cpp2
-rw-r--r--engines/gob/palanim.cpp2
-rw-r--r--engines/gob/util.cpp2
-rw-r--r--engines/gob/videoplayer.cpp2
12 files changed, 19 insertions, 25 deletions
diff --git a/engines/gob/game_v1.cpp b/engines/gob/game_v1.cpp
index 4bfcd0fcad..90c96d6eb7 100644
--- a/engines/gob/game_v1.cpp
+++ b/engines/gob/game_v1.cpp
@@ -64,7 +64,7 @@ void Game_v1::playTot(int16 skipPlay) {
strcpy(savedTotName, _curTotFile);
if (skipPlay <= 0) {
- while (!g_system->getEventManager()->shouldQuit()) {
+ while (!_vm->quit()) {
for (int i = 0; i < 4; i++) {
_vm->_draw->_fontToSprite[i].sprite = -1;
_vm->_draw->_fontToSprite[i].base = -1;
@@ -998,7 +998,7 @@ void Game_v1::collisionsBlock(void) {
WRITE_VAR(16, 0);
_activeCollResId = 0;
}
- while ((_activeCollResId == 0) && !_vm->_inter->_terminate && !g_system->getEventManager()->shouldQuit());
+ while ((_activeCollResId == 0) && !_vm->_inter->_terminate && !_vm->quit());
if (((uint16) _activeCollResId & ~0x8000) == collResId) {
collStackPos = 0;
diff --git a/engines/gob/game_v2.cpp b/engines/gob/game_v2.cpp
index cf7beec031..d99b9e82fc 100644
--- a/engines/gob/game_v2.cpp
+++ b/engines/gob/game_v2.cpp
@@ -71,7 +71,7 @@ void Game_v2::playTot(int16 skipPlay) {
strcpy(savedTotName, _curTotFile);
if (skipPlay <= 0) {
- while (!g_system->getEventManager()->shouldQuit()) {
+ while (!_vm->quit()) {
if (_vm->_inter->_variables)
_vm->_draw->animateCursor(4);
@@ -439,7 +439,7 @@ int16 Game_v2::checkCollisions(byte handleMouse, int16 deltaTime, int16 *pResId,
timeKey = _vm->_util->getTimeKey();
while (1) {
- if (_vm->_inter->_terminate || g_system->getEventManager()->shouldQuit()) {
+ if (_vm->_inter->_terminate || _vm->quit()) {
if (handleMouse)
_vm->_draw->blitCursor();
return 0;
@@ -1044,7 +1044,7 @@ void Game_v2::collisionsBlock(void) {
WRITE_VAR(16, 0);
_activeCollResId = 0;
}
- while ((_activeCollResId == 0) && !_vm->_inter->_terminate && !g_system->getEventManager()->shouldQuit());
+ while ((_activeCollResId == 0) && !_vm->_inter->_terminate && !_vm->quit());
if ((_activeCollResId & 0xFFF) == collResId) {
collStackPos = 0;
@@ -1466,7 +1466,7 @@ int16 Game_v2::inputArea(int16 xPos, int16 yPos, int16 width, int16 height,
key = checkCollisions(handleMouse, -300, collResId, collIndex);
if ((key != 0) || (*collResId != 0) ||
- _vm->_inter->_terminate || g_system->getEventManager()->shouldQuit())
+ _vm->_inter->_terminate || _vm->quit())
break;
if (*pTotTime > 0) {
@@ -1480,7 +1480,7 @@ int16 Game_v2::inputArea(int16 xPos, int16 yPos, int16 width, int16 height,
}
if ((key == 0) || (*collResId != 0) ||
- _vm->_inter->_terminate || g_system->getEventManager()->shouldQuit())
+ _vm->_inter->_terminate || _vm->quit())
return 0;
switch (key) {
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index 61d173346e..f38371d685 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -114,10 +114,6 @@ int GobEngine::go() {
return _eventMan->shouldRTL();
}
-void GobEngine::shutdown() {
- g_system->getEventManager()->pushEvent(Common::EVENT_QUIT);
-}
-
const char *GobEngine::getLangDesc(int16 language) const {
if ((language < 0) || (language > 8))
language = 2;
diff --git a/engines/gob/gob.h b/engines/gob/gob.h
index d55d2b874a..842a1dc59f 100644
--- a/engines/gob/gob.h
+++ b/engines/gob/gob.h
@@ -223,8 +223,6 @@ public:
SaveLoad *_saveLoad;
VideoPlayer *_vidPlayer;
- void shutdown();
-
const char *getLangDesc(int16 language) const;
void validateLanguage();
void validateVideoMode(int16 videoMode);
diff --git a/engines/gob/inter.cpp b/engines/gob/inter.cpp
index 0c226193f9..04643b7b75 100644
--- a/engines/gob/inter.cpp
+++ b/engines/gob/inter.cpp
@@ -250,7 +250,7 @@ void Inter::funcBlock(int16 retFlag) {
if (executeFuncOpcode(cmd2, cmd, params))
return;
- if (g_system->getEventManager()->shouldQuit())
+ if (_vm->quit())
break;
if (_break) {
@@ -270,7 +270,7 @@ void Inter::funcBlock(int16 retFlag) {
void Inter::callSub(int16 retFlag) {
byte block;
- while (!g_system->getEventManager()->shouldQuit() && _vm->_global->_inter_execPtr &&
+ while (!_vm->quit() && _vm->_global->_inter_execPtr &&
(_vm->_global->_inter_execPtr != _vm->_game->_totFileData)) {
block = *_vm->_global->_inter_execPtr;
diff --git a/engines/gob/inter_bargon.cpp b/engines/gob/inter_bargon.cpp
index b0378f1bdb..25d75589df 100644
--- a/engines/gob/inter_bargon.cpp
+++ b/engines/gob/inter_bargon.cpp
@@ -751,7 +751,7 @@ void Inter_Bargon::oBargon_intro2(OpGobParams &params) {
for (i = 320; i >= 0; i--) {
_vm->_util->setScrollOffset(i, 0);
if ((_vm->_game->checkKeys(&mouseX, &mouseY, &buttons, 0) == 0x11B) ||
- g_system->getEventManager()->shouldQuit()) {
+ _vm->quit()) {
_vm->_palAnim->fade(0, -2, 0);
_vm->_video->clearSurf(_vm->_draw->_frontSurface);
memset((char *) _vm->_draw->_vgaPalette, 0, 768);
@@ -761,7 +761,7 @@ void Inter_Bargon::oBargon_intro2(OpGobParams &params) {
break;
}
}
- if (!g_system->getEventManager()->shouldQuit())
+ if (!_vm->quit())
_vm->_util->setScrollOffset(0, 0);
surface = 0;
if (VAR(57) == ((uint32) -1))
@@ -800,7 +800,7 @@ void Inter_Bargon::oBargon_intro3(OpGobParams &params) {
_vm->_util->longDelay(_vm->_util->getRandom(200));
}
if ((_vm->_game->checkKeys(&mouseX, &mouseY, &buttons, 0) == 0x11B) ||
- g_system->getEventManager()->shouldQuit()) {
+ _vm->quit()) {
_vm->_sound->blasterStop(10);
_vm->_palAnim->fade(0, -2, 0);
_vm->_video->clearSurf(_vm->_draw->_frontSurface);
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp
index 8553354f87..df85f94d58 100644
--- a/engines/gob/inter_v1.cpp
+++ b/engines/gob/inter_v1.cpp
@@ -1226,7 +1226,7 @@ bool Inter_v1::o1_repeatUntil(OpFuncParams &params) {
funcBlock(1);
_vm->_global->_inter_execPtr = blockPtr + size + 1;
flag = evalBoolResult();
- } while (!flag && !_break && !_terminate && !g_system->getEventManager()->shouldQuit());
+ } while (!flag && !_break && !_terminate && !_vm->quit());
_nestLevel[0]--;
@@ -1261,7 +1261,7 @@ bool Inter_v1::o1_whileDo(OpFuncParams &params) {
} else
_vm->_global->_inter_execPtr += size;
- if (_break || _terminate || g_system->getEventManager()->shouldQuit()) {
+ if (_break || _terminate || _vm->quit()) {
_vm->_global->_inter_execPtr = blockPtr;
_vm->_global->_inter_execPtr += size;
break;
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index 2d39fc0a65..16d253ea90 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -1485,7 +1485,7 @@ void Inter_v2::o2_scroll() {
curX = startX;
curY = startY;
- while (!g_system->getEventManager()->shouldQuit() && ((curX != endX) || (curY != endY))) {
+ while (!_vm->quit() && ((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) :
diff --git a/engines/gob/mult.cpp b/engines/gob/mult.cpp
index 2916e246a0..d11600cc08 100644
--- a/engines/gob/mult.cpp
+++ b/engines/gob/mult.cpp
@@ -198,7 +198,7 @@ void Mult::playMult(int16 startFrame, int16 endFrame, char checkEscape,
_frame++;
_vm->_util->waitEndFrame();
- } while (!stop && !stopNoClear && !g_system->getEventManager()->shouldQuit());
+ } while (!stop && !stopNoClear && !_vm->quit());
if (!stopNoClear) {
if (_animDataAllocated) {
diff --git a/engines/gob/palanim.cpp b/engines/gob/palanim.cpp
index 25c5fb43b7..4bcf89a892 100644
--- a/engines/gob/palanim.cpp
+++ b/engines/gob/palanim.cpp
@@ -133,7 +133,7 @@ void PalAnim::fade(Video::PalDesc *palDesc, int16 fadeV, int16 allColors) {
bool stop;
int16 i;
- if (g_system->getEventManager()->shouldQuit())
+ if (_vm->quit())
return;
_fadeValue = (fadeV < 0) ? -fadeV : 2;
diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp
index c38f2e9a77..e5ba535b5c 100644
--- a/engines/gob/util.cpp
+++ b/engines/gob/util.cpp
@@ -72,7 +72,7 @@ void Util::longDelay(uint16 msecs) {
_vm->_video->waitRetrace();
processInput();
delay(15);
- } while (!g_system->getEventManager()->shouldQuit() &&
+ } while (!_vm->quit() &&
((g_system->getMillis() * _vm->_global->_speedFactor) < time));
}
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index 84524b3210..5e6319fcb8 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -570,7 +570,7 @@ bool VideoPlayer::doPlay(int16 frame, int16 breakKey,
_vm->_util->processInput();
- if (g_system->getEventManager()->shouldQuit()) {
+ if (_vm->quit()) {
_primaryVideo->getVideo()->disableSound();
return true;
}