diff options
author | Tobias Gunkel | 2012-01-22 22:58:10 +0100 |
---|---|---|
committer | Tobias Gunkel | 2012-02-11 08:29:13 +0100 |
commit | 96f8fc6ca9889d30db11b854c95ffd65bb88034d (patch) | |
tree | e8c765f1f68123433f6f36063b7e4e2479c83d58 /engines/scumm/debugger.cpp | |
parent | fd4a3501ede75d87c06980b5ac563402da834f25 (diff) | |
download | scummvm-rg350-96f8fc6ca9889d30db11b854c95ffd65bb88034d.tar.gz scummvm-rg350-96f8fc6ca9889d30db11b854c95ffd65bb88034d.tar.bz2 scummvm-rg350-96f8fc6ca9889d30db11b854c95ffd65bb88034d.zip |
SCUMM: Fix actor ID handling in v0
Some object functions allow actor IDs and object IDs as parameters. They are easily distinguishable in engines > 0 as actor IDs are < _numActors and object IDs are bigger. In v0 this is not the case as there are objects with IDs like 3 and 5 (e.g. the hamster). So object ID handling was unified for v0 and the other engines by introducing objIsActor(), objToActor() and ActorToObj().
Diffstat (limited to 'engines/scumm/debugger.cpp')
-rw-r--r-- | engines/scumm/debugger.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp index 5d1396633f..edcf2e6fea 100644 --- a/engines/scumm/debugger.cpp +++ b/engines/scumm/debugger.cpp @@ -382,8 +382,8 @@ bool ScummDebugger::Cmd_Actor(int argc, const char **argv) { DebugPrintf("Actor[%d].costume = %d\n", actnum, a->_costume); } } else if (!strcmp(argv[2], "name")) { - int actor = (_vm->_game.version != 0 ? actnum : OBJECT_V0(actnum, kObjectV0TypeActor)); - DebugPrintf("Name of actor %d: %s\n", actnum, _vm->getObjOrActorName(actor)); + DebugPrintf("Name of actor %d: %s\n", actnum, + _vm->getObjOrActorName(_vm->actorToObj(actnum))); } else if (!strcmp(argv[2], "condmask")) { if (argc > 3) { a->_heCondMask = value; |