svn-id: r8169
This commit is contained in:
Max Horn 2003-05-31 11:57:18 +00:00
parent 945dacb247
commit d5d0440e8c
5 changed files with 13 additions and 22 deletions

View file

@ -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

View file

@ -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));

View file

@ -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);
}

View file

@ -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

View file

@ -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);