diff options
author | James Brown | 2004-01-10 11:01:47 +0000 |
---|---|---|
committer | James Brown | 2004-01-10 11:01:47 +0000 |
commit | c4528ac022d13fde66a4d494110da4e97d2660c0 (patch) | |
tree | 7333045950dfebd54635d5fd13ee0f228c793cf7 /scumm/actor.cpp | |
parent | 158acbb70c49a7bdbf721c928e8b2ad353d2a52b (diff) | |
download | scummvm-rg350-c4528ac022d13fde66a4d494110da4e97d2660c0.tar.gz scummvm-rg350-c4528ac022d13fde66a4d494110da4e97d2660c0.tar.bz2 scummvm-rg350-c4528ac022d13fde66a4d494110da4e97d2660c0.zip |
More conversion to debug channels
svn-id: r12293
Diffstat (limited to 'scumm/actor.cpp')
-rw-r--r-- | scumm/actor.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 1f827bf960..b1abeb0326 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -817,7 +817,9 @@ void ScummEngine::playActorSounds() { Actor *ScummEngine::derefActor(int id, const char *errmsg) const { if (id == 0) - debug(3, "derefActor(0, \"%s\") in script %d, opcode 0x%x", errmsg, vm.slot[_curExecScript].number, _opcode); + debugC(DEBUG_ACTORS, "derefActor(0, \"%s\") in script %d, opcode 0x%x", + errmsg, vm.slot[_curExecScript].number, _opcode); + if (id < 0 || id >= _numActors || _actors[id].number != id) { if (errmsg) error("Invalid actor %d in %s", id, errmsg); @@ -829,9 +831,11 @@ Actor *ScummEngine::derefActor(int id, const char *errmsg) const { Actor *ScummEngine::derefActorSafe(int id, const char *errmsg) const { if (id == 0) - debug(3, "derefActorSafe(0, \"%s\") in script %d, opcode 0x%x", errmsg, vm.slot[_curExecScript].number, _opcode); + debugC(DEBUG_ACTORS, "derefActorSafe(0, \"%s\") in script %d, opcode 0x%x", + errmsg, vm.slot[_curExecScript].number, _opcode); + if (id < 0 || id >= _numActors || _actors[id].number != id) { - debug(2, "Invalid actor %d in %s (script %d, opcode 0x%x) - This is potentially a BIG problem.", + debugC(DEBUG_ACTORS, "Invalid actor %d in %s (script %d, opcode 0x%x)", id, errmsg, vm.slot[_curExecScript].number, _opcode); return NULL; } |