// Script function #16 (0x10) void Script::sfScriptGotoScene(SCRIPTFUNC_PARAMS) { int16 sceneNumber; int16 entrance; sceneNumber = thread->pop(); entrance = thread->pop(); if (sceneNumber < 0) { _vm->shutDown(); return; } if (_vm->getGameType() == GType_IHNM) { warning("FIXME: implement sfScriptGotoScene differences for IHNM"); // Since it doesn't look like the IHNM scripts remove the // cutaway after the intro, this is probably the best place to // to it. _vm->_anim->clearCutaway(); } // It is possible to leave scene when converse panel is on, // particulalrly it may happen at Moneychanger tent. This // prevent this from happening. if (_vm->_interface->getMode() == kPanelConverse) { _vm->_interface->setMode(kPanelMain); } _vm->_scene->changeScene(sceneNumber, entrance, (sceneNumber == ITE_SCENE_ENDCREDIT1) ? kTransitionFade : kTransitionNoFade); //TODO: placard stuff _pendingVerb = _vm->_script->getVerbType(kVerbNone); _currentObject[0] = _currentObject[1] = ID_NOTHING; showVerb(); }
// Script function #5 (0x05) void Script::sfMainMode(SCRIPTFUNC_PARAMS) { _vm->_actor->_centerActor = _vm->_actor->_protagonist; showVerb(); _vm->_interface->activate(); _vm->_interface->setMode(kPanelMain); // Sometimes, the active cutaway is cleared after this opcode is called, // resulting in an incorrect mode being set. An example is Ellen's chapter // in IHNM, when using the computer with the chaos trebler CD. Make sure // that the saved mode is kPanelMain, so that it won't get overwritten // by an incorrect stored mode _vm->_interface->rememberMode(); if (_vm->getGameId() == GID_ITE) setPointerVerb(); // The early Windows and Mac demos of ITE were non-interactive. In those demos, // the intro is shown and then when the first scene is shown, there's a dialog // thanking the user for playing the demo and asking him to buy the full game, // without allowing him to continue any further. The game data itself for these // demos does not contain any scripts for the first scene (i.e. there's no text // in the game data to look at Rif's silver medallion). Also, there are no more // scenes apart from the Grand Tournament scene. This opcode is called in those // demos, and I assume that its use there is to just show the popup window and // exit the game. Therefore, once this opcode is called in the older ITE demos, // exit the game. Known non-interactive demos are GID_ITE_MACDEMO1 and // GID_ITE_WINDEMO1 if (_vm->_script->isNonInteractiveDemo()) _vm->quitGame(); }
// Script function #16 (0x10) void Script::sfScriptGotoScene(SCRIPTFUNC_PARAMS) { int16 sceneNumber = thread->pop(); int16 entrance = thread->pop(); #ifdef ENABLE_IHNM if (_vm->getGameId() == GID_IHNM) { _vm->_gfx->setCursor(kCursorBusy); } #endif if (_vm->getGameId() == GID_ITE && sceneNumber < 0) { _vm->quitGame(); return; } #ifdef ENABLE_IHNM if (_vm->getGameId() == GID_IHNM && sceneNumber == 0) { _vm->_scene->creditsScene(); return; } #endif // It is possible to leave scene when converse panel is on, // particulalrly it may happen at Moneychanger tent. This // prevents this from happening. if (_vm->_interface->getMode() == kPanelConverse) { _vm->_interface->setMode(kPanelMain); } // changeScene calls loadScene which calls setVerb. setVerb resets all pending objects and object flags if (sceneNumber == -1 && _vm->getGameId() == GID_IHNM) { // Return back to the character selection screen in IHNM _vm->_scene->changeScene(154, entrance, kTransitionFade, 8); } else { _vm->_scene->changeScene(sceneNumber, entrance, (sceneNumber == ITE_SCENE_ENDCREDIT1) ? kTransitionFade : kTransitionNoFade); } if (_vm->_interface->getMode() == kPanelPlacard || _vm->_interface->getMode() == kPanelCutaway || _vm->_interface->getMode() == kPanelVideo) { _vm->_gfx->showCursor(true); _vm->_interface->setMode(kPanelMain); } _pendingVerb = _vm->_script->getVerbType(kVerbNone); _currentObject[0] = _currentObject[1] = ID_NOTHING; showVerb(); // calls setStatusText("") #ifdef ENABLE_IHNM if (_vm->getGameId() == GID_IHNM) { // There are some cutaways which are not removed by game scripts, like the cutaway // after the intro of IHNM or the cutaway at the end of Ellen's part in the IHNM demo. // Clear any remaining cutaways here _vm->_anim->clearCutaway(); _vm->_gfx->setCursor(kCursorNormal); } #endif }
// Script function #5 (0x05) void Script::sfMainMode(SCRIPTFUNC_PARAMS) { _vm->_actor->_centerActor = _vm->_actor->_protagonist; showVerb(); _vm->_interface->activate(); _vm->_interface->setMode(kPanelMain); if (_vm->getGameType() == GType_ITE) setPointerVerb(); }