From 85658095525c9472b1c2b59fbde3ac496830a2d2 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 13 Jun 2007 13:00:25 +0000 Subject: IHNM: Fixed sfSetSpeechBox, now the dialog of Nimdok and Mengele will show up correctly. Also, done some preliminary work on sfScriptGotoScene and changeScene to return to the character selection screen, but it's not right yet svn-id: r27385 --- engines/saga/scene.cpp | 6 ++++++ engines/saga/sfuncs.cpp | 14 ++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp index 839beca349..b83e1e29f9 100644 --- a/engines/saga/scene.cpp +++ b/engines/saga/scene.cpp @@ -477,6 +477,12 @@ void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionTy if (sceneNumber != -2) { endScene(); } + + if (sceneParams.sceneDescriptor == -1 && _vm->getGameType() == GType_IHNM) { + sceneParams.chapter = 8; + sceneParams.sceneDescriptor = 152; + } + loadScene(&sceneParams); } diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp index 08e80cb799..c84a09e7bf 100644 --- a/engines/saga/sfuncs.cpp +++ b/engines/saga/sfuncs.cpp @@ -544,12 +544,18 @@ void Script::sfSetFollower(SCRIPTFUNC_PARAMS) { void Script::sfScriptGotoScene(SCRIPTFUNC_PARAMS) { int16 sceneNumber; int16 entrance; + int16 transition = 0; // IHNM sceneNumber = thread->pop(); entrance = thread->pop(); + if (_vm->getGameType() == GType_IHNM) + transition = thread->pop(); + if (sceneNumber < 0) { - _vm->shutDown(); - return; + if (_vm->getGameType() == GType_ITE) { + _vm->shutDown(); + return; + } } if (_vm->getGameType() == GType_IHNM) { @@ -2053,8 +2059,8 @@ void Script::sfSetSpeechBox(SCRIPTFUNC_PARAMS) { _vm->_actor->_speechBoxScript.left = param1; _vm->_actor->_speechBoxScript.top = param2; - _vm->_actor->_speechBoxScript.setWidth(param3); - _vm->_actor->_speechBoxScript.setHeight(param4); + _vm->_actor->_speechBoxScript.setWidth(param3 - param1); + _vm->_actor->_speechBoxScript.setHeight(param4 - param2); } void Script::sfDebugShowData(SCRIPTFUNC_PARAMS) { -- cgit v1.2.3