diff options
author | Filippos Karapetis | 2008-12-24 09:59:18 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-12-24 09:59:18 +0000 |
commit | c2c439b53d35ab75e7f7eaec00424caedb99e5e7 (patch) | |
tree | 7c67a529c3ce3d8313bbb12bd64e9a16965731d9 | |
parent | 41ebd732f59bd14220c050225153082f29e75b9b (diff) | |
download | scummvm-rg350-c2c439b53d35ab75e7f7eaec00424caedb99e5e7.tar.gz scummvm-rg350-c2c439b53d35ab75e7f7eaec00424caedb99e5e7.tar.bz2 scummvm-rg350-c2c439b53d35ab75e7f7eaec00424caedb99e5e7.zip |
Slight cleanup
svn-id: r35523
-rw-r--r-- | engines/saga/interface.cpp | 25 | ||||
-rw-r--r-- | engines/saga/render.cpp | 2 | ||||
-rw-r--r-- | engines/saga/scene.h | 10 |
3 files changed, 17 insertions, 20 deletions
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp index cc0fee0238..b6a779c1ab 100644 --- a/engines/saga/interface.cpp +++ b/engines/saga/interface.cpp @@ -654,7 +654,7 @@ bool Interface::processAscii(Common::KeyState keystate) { switch (ascii) { case 'x': setMode(kPanelMain); - if (_vm->getGameId() == GID_ITE && _vm->_puzzle->isActive()) + if (_vm->_scene->isITEPuzzleScene()) _vm->_puzzle->exitPuzzle(); break; @@ -670,15 +670,12 @@ bool Interface::processAscii(Common::KeyState keystate) { case '2': case '3': case '4': - converseSetPos(ascii); - break; case '5': case '6': case '7': case '8': case '9': - if (_vm->getGameId() == GID_IHNM) - converseSetPos(ascii); + converseSetPos(ascii); break; } break; @@ -736,14 +733,12 @@ bool Interface::processAscii(Common::KeyState keystate) { } void Interface::setStatusText(const char *text, int statusColor) { - - // Disable the status text in IHNM when the chapter is 8 - if (_vm->getGameId() == GID_IHNM && !(_vm->getFeatures() & GF_IHNM_DEMO) && _vm->_scene->currentChapterNumber() == 8) - return; - - // Disable the status text in the introduction of the IHNM demo - if (_vm->getFeatures() & GF_IHNM_DEMO && _vm->_scene->currentSceneNumber() == 0) - return; + if (_vm->getGameId() == GID_IHNM) { + // Don't show the status text for the IHNM chapter selection screens (chapter 8), or + // scene 0 (IHNM demo introduction) + if (_vm->_scene->currentChapterNumber() == 8 || _vm->_scene->currentSceneNumber() == 0) + return; + } assert(text != NULL); assert(strlen(text) < STATUS_TEXT_LEN); @@ -1743,7 +1738,7 @@ void Interface::update(const Point& mousePoint, int updateFlag) { converseChangePos(1); } - if (_vm->getGameId() == GID_ITE && _vm->_puzzle->isActive()) { + if (_vm->_scene->isITEPuzzleScene()) { _vm->_puzzle->handleClick(mousePoint); } } @@ -2624,7 +2619,7 @@ void Interface::converseSetPos(int key) { _vm->_script->finishDialog(ct->strId, ct->replyId, ct->replyFlags, ct->replyBit); - if (_vm->getGameId() == GID_ITE && _vm->_puzzle->isActive()) + if (_vm->_scene->isITEPuzzleScene()) _vm->_puzzle->handleReply(ct->replyId); _conversePos = -1; diff --git a/engines/saga/render.cpp b/engines/saga/render.cpp index 9327fca72c..9c35c3bca4 100644 --- a/engines/saga/render.cpp +++ b/engines/saga/render.cpp @@ -104,7 +104,7 @@ void Render::drawScene() { if (!(_flags & RF_DISABLE_ACTORS) || _vm->getGameId() == GID_ITE) _vm->_scene->draw(); - if (_vm->getGameId() == GID_ITE && _vm->_puzzle->isActive()) { + if (_vm->_scene->isITEPuzzleScene()) { _vm->_puzzle->movePiece(mousePoint); _vm->_actor->drawSpeech(); } else { diff --git a/engines/saga/scene.h b/engines/saga/scene.h index 6be4cb4f28..169af0bb0c 100644 --- a/engines/saga/scene.h +++ b/engines/saga/scene.h @@ -32,6 +32,7 @@ #include "saga/list.h" #include "saga/actor.h" #include "saga/interface.h" +#include "saga/puzzle.h" namespace Saga { @@ -348,10 +349,7 @@ class Scene { void setChapterPointsChanged(bool cp) { _chapterPointsChanged = cp; } void cutawaySkip() { - if (_vm->_scene->isInIntro()) - _vm->_framesEsc = 2; - else - _vm->_framesEsc = 1; + _vm->_framesEsc = _vm->_scene->isInIntro() ? 2 : 1; } void drawTextList(); @@ -372,6 +370,10 @@ class Scene { return _vm->getFeatures() & GF_IHNM_DEMO && (_sceneNumber >= 144 && _sceneNumber <= 149); } + bool isITEPuzzleScene() { + return _vm->getGameId() == GID_ITE && _vm->_puzzle->isActive(); + } + private: void loadScene(LoadSceneParams *loadSceneParams); void loadSceneDescriptor(uint32 resourceId); |