diff options
author | Filippos Karapetis | 2008-08-26 14:26:43 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-08-26 14:26:43 +0000 |
commit | c89281e4a3041bbfab45c1f9e07d5fcdee432280 (patch) | |
tree | 12e41154e9c5f040e4fe16a7306ab8b43e860f1f | |
parent | df5c0b6d0c899f029540598140ff32be135ceaff (diff) | |
download | scummvm-rg350-c89281e4a3041bbfab45c1f9e07d5fcdee432280.tar.gz scummvm-rg350-c89281e4a3041bbfab45c1f9e07d5fcdee432280.tar.bz2 scummvm-rg350-c89281e4a3041bbfab45c1f9e07d5fcdee432280.zip |
Fix for bug #2057200 - "IHNM: Invisible inventory objects"
svn-id: r34189
-rw-r--r-- | engines/saga/sfuncs.cpp | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp index ea61f5ce04..feee6612f4 100644 --- a/engines/saga/sfuncs.cpp +++ b/engines/saga/sfuncs.cpp @@ -276,31 +276,14 @@ void Script::sfTakeObject(SCRIPTFUNC_PARAMS) { if (obj->_sceneNumber != ITE_SCENE_INV) { obj->_sceneNumber = ITE_SCENE_INV; - // WORKAROUND for a problematic object in IHNM - // There are 3 different scenes in front of the zeppelin, in Gorrister's chapter. A scene where the - // zeppelin is in the air (scene 17), a scene where it approaches Gorrister's (scene 16) and another one - // where it has landed (scene 18). - // In two of these scenes (the "on air" and "approaching" ones), when the player uses the knife with the - // rope, the associated script picks up object id 16392. In the "zeppelin landed" scene (scene 18), the - // associated script picks up object id 16390. This seems to be a script bug, as it should be id 16392, - // like in the other two scenes, as it is the same object (the rope). Picking up object 16390 leads to an - // assertion anyway, therefore we change the problematic object (16390) to the correct one (16392) here. - // Fixes bug #1861126 - "IHNM: Crash when Gorrister cuts sheet in the mooring ring" - if (_vm->getGameType() == GType_IHNM) { - if (_vm->_scene->currentChapterNumber() == 1 && _vm->_scene->currentSceneNumber() == 18) { - if (objectId == 16390) - objectId = 16392; - } - } - - // WORKAROUND for two incorrect object sprites in the IHNM demo - // (the mirror and the icon in Ted's part). Set them correctly here - if (_vm->getGameId() == GID_IHNM_DEMO) { - if (objectId == 16408) - obj->_spriteListResourceId = 24; - if (objectId == 16409) - obj->_spriteListResourceId = 25; - } + // Normally, when objects are picked up, they should always have the same + // _spriteListResourceId as their _index value. Some don't in IHNM, so + // we fix their sprite here + // Fixes bugs #2057200 - "IHNM: Invisible inventory objects", + // #1861126 - "IHNM: Crash when Gorrister cuts sheet in the mooring ring" + // and some incorrect objects in the IHNM demo + if (_vm->getGameType() == GType_IHNM) + obj->_spriteListResourceId = obj->_index; _vm->_interface->addToInventory(objectId); } |