SAGA: Moved more code under ENABLE_IHNM

svn-id: r49696
This commit is contained in:
Eugene Sandulenko 2010-06-15 10:16:13 +00:00
parent d137b4610a
commit 723cb6c0f0
4 changed files with 24 additions and 12 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -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());

View File

@ -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