aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2005-10-14 08:39:27 +0000
committerTravis Howell2005-10-14 08:39:27 +0000
commit17f251a37fb1a88867a22095ee2e635e2a2da923 (patch)
treecda103b4e60c09bdac40c80127e6f64593fc2403 /scumm
parent0436bdeb0fd3ed1bbe20d337c62efc2afad60b01 (diff)
downloadscummvm-rg350-17f251a37fb1a88867a22095ee2e635e2a2da923.tar.gz
scummvm-rg350-17f251a37fb1a88867a22095ee2e635e2a2da923.tar.bz2
scummvm-rg350-17f251a37fb1a88867a22095ee2e635e2a2da923.zip
loadFlObject() should use object index, when checking if object is already loaded. Matches original games and prevent multiple load of same flObject in HE games.
svn-id: r19076
Diffstat (limited to 'scumm')
-rw-r--r--scumm/object.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp
index 5190890f0a..0fb9895e65 100644
--- a/scumm/object.cpp
+++ b/scumm/object.cpp
@@ -1695,17 +1695,17 @@ int ScummEngine::findFlObjectSlot() {
void ScummEngine::loadFlObject(uint object, uint room) {
FindObjectInRoom foir;
- int slot, objslot;
+ int i, slot, objslot;
ObjectData *od;
byte *flob;
uint32 obcd_size, obim_size, flob_size;
bool isRoomLocked, isRoomScriptsLocked;
// Don't load an already loaded object
- if (whereIsObject(object) != WIO_NOT_FOUND)
+ if (getObjectIndex(object) != -1)
return;
- int i;
+ // Don't load an already stored object
for (i = 0; i < _numStoredFlObjects; i++) {
if (_storedFlObjects[i].obj_nr == object)
return;