diff options
author | Max Horn | 2003-05-31 11:57:18 +0000 |
---|---|---|
committer | Max Horn | 2003-05-31 11:57:18 +0000 |
commit | d5d0440e8ceb295dfd67c4993c205e268b3ba6d7 (patch) | |
tree | fff8c4625994450075075800babe5a66876a8eb9 /scumm | |
parent | 945dacb247789d59764d9389f16d684ae05bd50d (diff) | |
download | scummvm-rg350-d5d0440e8ceb295dfd67c4993c205e268b3ba6d7.tar.gz scummvm-rg350-d5d0440e8ceb295dfd67c4993c205e268b3ba6d7.tar.bz2 scummvm-rg350-d5d0440e8ceb295dfd67c4993c205e268b3ba6d7.zip |
cleanup
svn-id: r8169
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/object.cpp | 28 | ||||
-rw-r--r-- | scumm/resource.cpp | 1 | ||||
-rw-r--r-- | scumm/script.cpp | 3 | ||||
-rw-r--r-- | scumm/scumm.h | 1 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 2 |
5 files changed, 13 insertions, 22 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp index 99997b2207..ecb856d6da 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -888,21 +888,6 @@ byte *Scumm::getObjOrActorName(int obj) { if (obj < _numActors) return derefActor(obj, "getObjOrActorName")->getActorName(); - if (_features & GF_SMALL_HEADER) { - byte offset = 0; - - objptr = getOBCDFromObject(obj); - if (objptr) { - if (_features & GF_AFTER_V2) - offset = *(objptr + 14); - else if (_features & GF_OLD_BUNDLE) - offset = *(objptr + 16); - else - offset = READ_LE_UINT16(objptr + 18); - } - return (objptr + offset); - } - if (_features & GF_AFTER_V6) { for (i = 0; i < _numNewNames; i++) { if (_newNames[i] == obj) { @@ -917,6 +902,19 @@ byte *Scumm::getObjOrActorName(int obj) { if (objptr == NULL) return NULL; + if (_features & GF_SMALL_HEADER) { + byte offset = 0; + + if (_features & GF_AFTER_V2) + offset = *(objptr + 14); + else if (_features & GF_OLD_BUNDLE) + offset = *(objptr + 16); + else + offset = READ_LE_UINT16(objptr + 18); + + return (objptr + offset); + } + #if 0 return findResourceData(MKID('OBNA'), objptr); #else diff --git a/scumm/resource.cpp b/scumm/resource.cpp index 4d69b131e7..8d22112252 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -1753,7 +1753,6 @@ void Scumm::allocateArrays() { _objectOwnerTable = (byte *)calloc(_numGlobalObjects, 1); _objectStateTable = (byte *)calloc(_numGlobalObjects, 1); _classData = (uint32 *)calloc(_numGlobalObjects, sizeof(uint32)); - _arrays = (byte *)calloc(_numArray, 1); _newNames = (uint16 *)calloc(_numNewNames, sizeof(uint16)); _inventory = (uint16 *)calloc(_numInventory, sizeof(uint16)); diff --git a/scumm/script.cpp b/scumm/script.cpp index d736e4bb40..478a4f96cb 100644 --- a/scumm/script.cpp +++ b/scumm/script.cpp @@ -969,7 +969,6 @@ int Scumm::defineArray(int array, int type, int dim2, int dim1) { if (_features & GF_AFTER_V8) { if (array & 0x40000000) { - _arrays[id] = (char)vm.slot[_currentScript].number; } if (array & 0x80000000) { @@ -979,7 +978,6 @@ int Scumm::defineArray(int array, int type, int dim2, int dim1) { size = (type == 5) ? 32 : 8; } else { if (array & 0x4000) { - _arrays[id] = (char)vm.slot[_currentScript].number; } if (array & 0x8000) { @@ -1011,7 +1009,6 @@ void Scumm::nukeArray(int a) { if (data) nukeResource(rtString, data); - _arrays[data] = 0; writeVar(a, 0); } diff --git a/scumm/scumm.h b/scumm/scumm.h index 73fe9af455..e747ca1b13 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -384,7 +384,6 @@ protected: Actor *_actors; // Has _numActors elements uint16 *_inventory; - byte *_arrays; uint16 *_newNames; public: // VAR is a wrapper around scummVar, which attempts to include additional diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index c492739dbc..e78e122c58 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -220,7 +220,6 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst) memset(&gdi,0,sizeof(Gdi)); _actors = NULL; _inventory = NULL; - _arrays = NULL; _newNames = NULL; _scummVars = NULL; _varwatch = 0; @@ -1948,7 +1947,6 @@ void Scumm::destroy() { free(_objectRoomTable); free(_objectOwnerTable); free(_inventory); - free(_arrays); free(_verbs); free(_objs); free(_scummVars); |