aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorFilippos Karapetis2007-07-29 19:06:17 +0000
committerFilippos Karapetis2007-07-29 19:06:17 +0000
commitbb22e2205096d08a3e210ce2280fd3576776a34b (patch)
treeb8e808715db5f04cbd8fd8f28b318f64f884161b /engines/saga
parent160a4ceaad1cf55e2aca3494616835e74e4c8a42 (diff)
downloadscummvm-rg350-bb22e2205096d08a3e210ce2280fd3576776a34b.tar.gz
scummvm-rg350-bb22e2205096d08a3e210ce2280fd3576776a34b.tar.bz2
scummvm-rg350-bb22e2205096d08a3e210ce2280fd3576776a34b.zip
Inventory icons in the IHNM demo are displayed correctly now
svn-id: r28313
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/sfuncs.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp
index 1e9460c898..fed3f36a6f 100644
--- a/engines/saga/sfuncs.cpp
+++ b/engines/saga/sfuncs.cpp
@@ -277,7 +277,16 @@ void Script::sfTakeObject(SCRIPTFUNC_PARAMS) {
obj = _vm->_actor->getObj(objectId);
if (obj->_sceneNumber != ITE_SCENE_INV) {
obj->_sceneNumber = ITE_SCENE_INV;
- //4debug for (int j=0;j<17;j++)
+
+ // 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 (obj->_spriteListResourceId == 4)
+ obj->_spriteListResourceId = 24;
+ if (obj->_spriteListResourceId == 3)
+ obj->_spriteListResourceId = 25;
+ }
+
_vm->_interface->addToInventory(objectId);
}
}
@@ -870,10 +879,16 @@ void Script::sfDropObject(SCRIPTFUNC_PARAMS) {
_vm->_scene->currentSceneNumber() == 59 && obj->_id == 16385)
obj->_sceneNumber = -1;
- if (_vm->getGameType() == GType_IHNM)
- obj->_spriteListResourceId = spriteId;
- else
+ if (_vm->getGameType() == GType_IHNM) {
+ if (_vm->getGameId() != GID_IHNM_DEMO) {
+ obj->_spriteListResourceId = spriteId;
+ } else {
+ // Don't update the object's _spriteListResourceId in the IHNM demo, as this function is
+ // called incorrectly there (with spriteId == 0, which resets the object sprites)
+ }
+ } else {
obj->_spriteListResourceId = OBJ_SPRITE_BASE + spriteId;
+ }
obj->_location.x = x;
obj->_location.y = y;