Fix Indy4. Make invalid actor warnings -d only.

FIXME note: Need to track down why these invalid calls are happening
in the first place.

svn-id: r3960
This commit is contained in:
James Brown 2002-04-16 16:25:57 +00:00
parent 0eaa9b16b4
commit 9b7db10944
2 changed files with 8 additions and 4 deletions

View File

@ -1254,10 +1254,15 @@ void Scumm::o5_getActorMoving()
void Scumm::o5_getActorRoom()
{
int temp;
Actor *act;
getResultPos();
temp = getVarOrDirectByte(0x80);
act = derefActorSafe(temp, "o5_getActorRoom");
if (!act)
return;
setResult(derefActorSafe(temp, "o5_getActorRoom")->room);
setResult(act->room);
}
void Scumm::o5_getActorScale()

View File

@ -902,9 +902,8 @@ void Scumm::convertKeysToClicks()
Actor *Scumm::derefActorSafe(int id, const char *errmsg)
{
if (id < 1 || id >= NUM_ACTORS) {
warning
("Invalid actor %d in %s (script %d, opcode 0x%x) - This is potentially a BIG problem.",
id, errmsg, vm.slot[_curExecScript].number, _opcode);
if (_debugMode)
warning("Invalid actor %d in %s (script %d, opcode 0x%x) - This is potentially a BIG problem.", id, errmsg, vm.slot[_curExecScript].number, _opcode);
return NULL;
}
return derefActor(id);