aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorChristopher Page2008-07-11 01:09:48 +0000
committerChristopher Page2008-07-11 01:09:48 +0000
commitcbadb51ce75f2ec599203433b50c9d4bf5f51728 (patch)
treefc5cdb2364cb82505001d62c2d53ed2edd2d9052 /engines/saga
parent67c8c39fdf4ae01c0d4a1c6ce97afd720eb4be4e (diff)
downloadscummvm-rg350-cbadb51ce75f2ec599203433b50c9d4bf5f51728.tar.gz
scummvm-rg350-cbadb51ce75f2ec599203433b50c9d4bf5f51728.tar.bz2
scummvm-rg350-cbadb51ce75f2ec599203433b50c9d4bf5f51728.zip
SAGA works with new GMM implementation
svn-id: r33000
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/input.cpp3
-rw-r--r--engines/saga/interface.cpp4
-rw-r--r--engines/saga/introproc_ihnm.cpp9
-rw-r--r--engines/saga/saga.cpp4
-rw-r--r--engines/saga/saga.h1
-rw-r--r--engines/saga/scene.cpp2
-rw-r--r--engines/saga/sfuncs.cpp4
7 files changed, 14 insertions, 13 deletions
diff --git a/engines/saga/input.cpp b/engines/saga/input.cpp
index ac80d87dd0..61b729b701 100644
--- a/engines/saga/input.cpp
+++ b/engines/saga/input.cpp
@@ -141,9 +141,6 @@ int SagaEngine::processInput() {
break;
case Common::EVENT_MOUSEMOVE:
break;
- case Common::EVENT_QUIT:
- shutDown();
- break;
default:
break;
}
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index 1d048baaad..92ef960f48 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -688,7 +688,7 @@ bool Interface::processAscii(Common::KeyState keystate) {
setMode(kPanelMain);
_vm->_script->setNoPendingVerb();
} else if (ascii == 'q' || ascii == 'Q') {
- _vm->shutDown();
+ _vm->quitGame();
}
break;
case kPanelBoss:
@@ -1081,7 +1081,7 @@ void Interface::setQuit(PanelButton *panelButton) {
if (_vm->getGameId() == GID_IHNM_DEMO)
_vm->_scene->creditsScene(); // display sales info for IHNM demo
else
- _vm->shutDown();
+ _vm->quitGame();
break;
}
}
diff --git a/engines/saga/introproc_ihnm.cpp b/engines/saga/introproc_ihnm.cpp
index 6614f4098f..079b355826 100644
--- a/engines/saga/introproc_ihnm.cpp
+++ b/engines/saga/introproc_ihnm.cpp
@@ -59,8 +59,12 @@ int Scene::IHNMStartProc() {
// Play Cyberdreams logo for 168 frames
if (!playTitle(0, logoLength, true)) {
+ if (_vm->quit())
+ return !SUCCESS;
// Play Dreamers Guild logo for 10 seconds
if (!playLoopingTitle(1, 10)) {
+ if (_vm->quit())
+ return !SUCCESS;
// Play the title music
_vm->_music->play(1, MUSIC_NORMAL);
// Play title screen
@@ -70,6 +74,8 @@ int Scene::IHNMStartProc() {
} else {
_vm->_music->play(1, MUSIC_NORMAL);
playTitle(0, 10);
+ if (_vm->quit())
+ return !SUCCESS;
playTitle(2, 12);
}
@@ -144,7 +150,6 @@ bool Scene::checkKey() {
switch (event.type) {
case Common::EVENT_QUIT:
res = true;
- _vm->shutDown();
break;
case Common::EVENT_KEYDOWN:
// Don't react to modifier keys alone. The original did
@@ -187,7 +192,7 @@ bool Scene::playTitle(int title, int time, int mode) {
_vm->_gfx->getCurrentPal(pal_cut);
- while (!done) {
+ while (!done && !_vm->quit()) {
curTime = _vm->_system->getMillis();
switch (phase) {
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index f912ffa93b..c359bbb631 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -261,7 +261,7 @@ int SagaEngine::go() {
uint32 currentTicks;
- while (!_quit) {
+ while (!quit()) {
if (_console->isAttached())
_console->onFrame();
@@ -301,7 +301,7 @@ int SagaEngine::go() {
_system->delayMillis(10);
}
- return _rtl;
+ return _eventMan->shouldRTL();
}
void SagaEngine::loadStrings(StringsTable &stringsTable, const byte *stringsPointer, size_t stringsLength) {
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index de03f1d2f6..cdbaaaa042 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -491,7 +491,6 @@ protected:
public:
SagaEngine(OSystem *syst, const SAGAGameDescription *gameDesc);
virtual ~SagaEngine();
- void shutDown() { _quit = true; }
void save(const char *fileName, const char *saveName);
void load(const char *fileName);
diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp
index c3c1587822..074b4c933a 100644
--- a/engines/saga/scene.cpp
+++ b/engines/saga/scene.cpp
@@ -315,7 +315,7 @@ void Scene::creditsScene() {
break;
}
- _vm->shutDown();
+ _vm->quitGame();
return;
}
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp
index ea61f5ce04..9a304de8e1 100644
--- a/engines/saga/sfuncs.cpp
+++ b/engines/saga/sfuncs.cpp
@@ -356,7 +356,7 @@ void Script::sfMainMode(SCRIPTFUNC_PARAMS) {
// exit the game. Known non-interactive demos are GID_ITE_MACDEMO1 and
// GID_ITE_WINDEMO1
if (_vm->getFeatures() & GF_NON_INTERACTIVE)
- _vm->shutDown();
+ _vm->quitGame();
}
// Script function #6 (0x06) blocking
@@ -572,7 +572,7 @@ void Script::sfScriptGotoScene(SCRIPTFUNC_PARAMS) {
}
if (_vm->getGameType() == GType_ITE && sceneNumber < 0) {
- _vm->shutDown();
+ _vm->quitGame();
return;
}