From 723cb6c0f0a638cc9d4f07c0fccf7bdf0197a6ac Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 15 Jun 2010 10:16:13 +0000 Subject: SAGA: Moved more code under ENABLE_IHNM svn-id: r49696 --- engines/saga/interface.cpp | 8 ++++++++ engines/saga/scene.cpp | 4 ++++ engines/saga/sfuncs.cpp | 12 ------------ engines/saga/sfuncs_ihnm.cpp | 12 ++++++++++++ 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp index c0d3cee465..70e6aa0c6b 100644 --- a/engines/saga/interface.cpp +++ b/engines/saga/interface.cpp @@ -544,8 +544,10 @@ bool Interface::processAscii(Common::KeyState keystate) { return true; } +#ifdef ENABLE_IHNM if (_vm->_scene->isNonInteractiveIHNMDemoPart()) _vm->_scene->showIHNMDemoSpecialScreen(); +#endif break; case kPanelCutaway: if (keystate.keycode == Common::KEYCODE_ESCAPE) { @@ -555,8 +557,10 @@ bool Interface::processAscii(Common::KeyState keystate) { return true; } +#ifdef ENABLE_INHM if (_vm->_scene->isNonInteractiveIHNMDemoPart()) _vm->_scene->showIHNMDemoSpecialScreen(); +#endif break; case kPanelVideo: if (keystate.keycode == Common::KEYCODE_ESCAPE) { @@ -570,8 +574,10 @@ bool Interface::processAscii(Common::KeyState keystate) { return true; } +#ifdef ENABLE_IHNM if (_vm->_scene->isNonInteractiveIHNMDemoPart()) _vm->_scene->showIHNMDemoSpecialScreen(); +#endif break; case kPanelOption: // TODO: check input dialog keys @@ -1866,8 +1872,10 @@ void Interface::update(const Point& mousePoint, int updateFlag) { break; case kPanelNull: +#ifdef ENABLE_IHNM if (_vm->_scene->isNonInteractiveIHNMDemoPart() && (updateFlag & UPDATE_MOUSECLICK)) _vm->_scene->showIHNMDemoSpecialScreen(); +#endif break; } diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp index 40ee1fb720..1b2a600729 100644 --- a/engines/saga/scene.cpp +++ b/engines/saga/scene.cpp @@ -1425,6 +1425,8 @@ void Scene::clearPlacard() { q_event = _vm->_events->chain(q_event, &event); } +#ifdef ENABLE_IHNM + void Scene::showPsychicProfile(const char *text) { int textHeight; static PalEntry cur_pal[PAL_ENTRIES]; @@ -1531,4 +1533,6 @@ void Scene::showIHNMDemoSpecialScreen() { _vm->_scene->changeScene(150, 0, kTransitionFade); } +#endif // IHNM + } // End of namespace Saga diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp index f98a80acd8..a924383ba3 100644 --- a/engines/saga/sfuncs.cpp +++ b/engines/saga/sfuncs.cpp @@ -1153,18 +1153,6 @@ void Script::sfPlacardOff(SCRIPTFUNC_PARAMS) { _vm->_scene->clearPlacard(); } -void Script::sfPsychicProfile(SCRIPTFUNC_PARAMS) { - thread->wait(kWaitTypePlacard); - - _vm->_scene->showPsychicProfile(thread->_strings->getString(thread->pop())); -} - -void Script::sfPsychicProfileOff(SCRIPTFUNC_PARAMS) { - // This is called a while after the psychic profile is - // opened, to close it automatically - _vm->_scene->clearPsychicProfile(); -} - // Script function #50 (0x32) void Script::sfSetProtagState(SCRIPTFUNC_PARAMS) { _vm->_actor->setProtagState(thread->pop()); diff --git a/engines/saga/sfuncs_ihnm.cpp b/engines/saga/sfuncs_ihnm.cpp index fe586b54ae..b98c1cb852 100644 --- a/engines/saga/sfuncs_ihnm.cpp +++ b/engines/saga/sfuncs_ihnm.cpp @@ -440,6 +440,18 @@ void Script::sfDisableAbortSpeeches(SCRIPTFUNC_PARAMS) { _vm->_interface->disableAbortSpeeches(thread->pop() != 0); } +void Script::sfPsychicProfile(SCRIPTFUNC_PARAMS) { + thread->wait(kWaitTypePlacard); + + _vm->_scene->showPsychicProfile(thread->_strings->getString(thread->pop())); +} + +void Script::sfPsychicProfileOff(SCRIPTFUNC_PARAMS) { + // This is called a while after the psychic profile is + // opened, to close it automatically + _vm->_scene->clearPsychicProfile(); +} + } // End of namespace Saga #endif -- cgit v1.2.3