handle old_bundle offsets getVerbEntrypoint(), o5_setObjectName(), getObjOrActorName() funcs

svn-id: r7003
This commit is contained in:
Paweł Kołodziejski 2003-04-13 16:42:33 +00:00
parent aff192d554
commit e0d170faca
3 changed files with 11 additions and 3 deletions

View File

@ -831,7 +831,10 @@ byte *Scumm::getObjOrActorName(int obj) {
objptr = getOBCDFromObject(obj);
if (objptr)
offset = READ_LE_UINT16(objptr + 18);
if (_features & GF_OLD_BUNDLE)
offset = READ_LE_UINT16(objptr + 20);
else
offset = READ_LE_UINT16(objptr + 18);
return (objptr + offset);
}

View File

@ -874,7 +874,9 @@ int Scumm::getVerbEntrypoint(int obj, int entry) {
objptr = getOBCDFromObject(obj);
assert(objptr);
if (_features & GF_SMALL_HEADER)
if (_features & GF_OLD_BUNDLE)
verbptr = objptr + 21;
else if (_features & GF_SMALL_HEADER)
verbptr = objptr + 19;
else
verbptr = findResource(MKID('VERB'), objptr);

View File

@ -1899,7 +1899,10 @@ void Scumm_v5::o5_setObjectName() {
byte offset = 0;
objptr = getOBCDFromObject(obj);
offset = READ_LE_UINT16(objptr + 18);
if (_features & GF_OLD_BUNDLE)
offset = READ_LE_UINT16(objptr + 20);
else
offset = READ_LE_UINT16(objptr + 18);
size = READ_LE_UINT16(objptr) - offset;
} else {
size = getResourceDataSize(name);