MadMoose's bugfix for 555890 - DOTT: Inventory items not changing name
svn-id: r4427
This commit is contained in:
parent
88e176f155
commit
38f89eff0b
2 changed files with 17 additions and 2 deletions
11
object.cpp
11
object.cpp
|
@ -719,6 +719,7 @@ void Scumm::clearDrawObjectQueue()
|
|||
byte *Scumm::getObjOrActorName(int obj)
|
||||
{
|
||||
byte *objptr;
|
||||
int i;
|
||||
|
||||
if (obj < NUM_ACTORS)
|
||||
return derefActorSafe(obj, "getObjOrActorName")->getActorName();
|
||||
|
@ -732,6 +733,16 @@ byte *Scumm::getObjOrActorName(int obj)
|
|||
return (objptr + offset);
|
||||
}
|
||||
|
||||
if (_features & GF_AFTER_V6) {
|
||||
for (i = 1; i < 50; i++) {
|
||||
if (_newNames[i] == obj) {
|
||||
debug(5, "Found new name for object %d at _newNames[i]", obj, i);
|
||||
return getResourceAddress(rtObjectName, i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
objptr = getOBCDFromObject(obj);
|
||||
if (objptr == NULL)
|
||||
return (byte *)" ";
|
||||
|
|
|
@ -1293,9 +1293,13 @@ void Scumm::o5_getActorScale()
|
|||
|
||||
void Scumm::o5_getActorWalkBox()
|
||||
{
|
||||
Actor *a;
|
||||
getResultPos();
|
||||
setResult(derefActorSafe(getVarOrDirectByte(0x80), "o5_getActorWalkbox")->
|
||||
walkbox);
|
||||
a = derefActorSafe(getVarOrDirectByte(0x80), "o5_getActorWalkbox");
|
||||
if (a) // FIXME - bug 572977 workaround
|
||||
setResult(a->walkbox);
|
||||
else
|
||||
setResult(0);
|
||||
}
|
||||
|
||||
void Scumm::o5_getActorWidth()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue