aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/object.cpp
diff options
context:
space:
mode:
authorMax Horn2011-05-11 18:06:30 +0200
committerMax Horn2011-05-13 11:47:10 +0200
commit75b9deb1856bae8355403faa5f55857f3929adb6 (patch)
treee3a12b77289bd2f5cc3a252a9867974a2d1cb965 /engines/scumm/object.cpp
parent0af2f71c71e39df2d61dd7cc9faed7c5e6a50fab (diff)
downloadscummvm-rg350-75b9deb1856bae8355403faa5f55857f3929adb6.tar.gz
scummvm-rg350-75b9deb1856bae8355403faa5f55857f3929adb6.tar.bz2
scummvm-rg350-75b9deb1856bae8355403faa5f55857f3929adb6.zip
SCUMM: Get rid of the MemBlkHeader hack
This uncovered at least one potentially serious bug in the inventory code, which still needs to be investigated and fixed.
Diffstat (limited to 'engines/scumm/object.cpp')
-rw-r--r--engines/scumm/object.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp
index 457e2c717c..8b0e22d33e 100644
--- a/engines/scumm/object.cpp
+++ b/engines/scumm/object.cpp
@@ -192,8 +192,11 @@ void ScummEngine::clearOwnerOf(int obj) {
if (!_inventory[i] && _inventory[i+1]) {
_inventory[i] = _inventory[i+1];
_inventory[i+1] = 0;
- _res->_types[rtInventory].address[i] = _res->_types[rtInventory].address[i + 1];
- _res->_types[rtInventory].address[i + 1] = NULL;
+ // FIXME FIXME FIXME: This is incomplete, as we do not touch flags, status... BUG
+ _res->_types[rtInventory]._address[i] = _res->_types[rtInventory]._address[i + 1];
+ _res->_types[rtInventory]._size[i] = _res->_types[rtInventory]._size[i + 1];
+ _res->_types[rtInventory]._address[i + 1] = NULL;
+ _res->_types[rtInventory]._size[i + 1] = 0;
}
}
break;
@@ -1796,7 +1799,7 @@ int ScummEngine::findLocalObjectSlot() {
int ScummEngine::findFlObjectSlot() {
int i;
for (i = 1; i < _numFlObject; i++) {
- if (_res->_types[rtFlObject].address[i] == NULL)
+ if (_res->_types[rtFlObject]._address[i] == NULL)
return i;
}
error("findFlObjectSlot: Out of FLObject slots");