diff options
author | James Brown | 2003-01-07 09:46:51 +0000 |
---|---|---|
committer | James Brown | 2003-01-07 09:46:51 +0000 |
commit | 08d34d17c0d8b4fd0f476ed81c3b2bb948178491 (patch) | |
tree | 569a9a79945064a67d266cdca5db4e54a5c7a703 /scumm/debugger.cpp | |
parent | 6426833420d3beb4137d654c507386394b3e4e74 (diff) | |
download | scummvm-rg350-08d34d17c0d8b4fd0f476ed81c3b2bb948178491.tar.gz scummvm-rg350-08d34d17c0d8b4fd0f476ed81c3b2bb948178491.tar.bz2 scummvm-rg350-08d34d17c0d8b4fd0f476ed81c3b2bb948178491.zip |
Skeleton for actor debugger commands - current command is useful for states where actors in CMI get stuck with "I can't reach it"
type stuff. :)
svn-id: r6351
Diffstat (limited to 'scumm/debugger.cpp')
-rw-r--r-- | scumm/debugger.cpp | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp index e9b3f93836..f02103d798 100644 --- a/scumm/debugger.cpp +++ b/scumm/debugger.cpp @@ -55,7 +55,8 @@ void ScummDebugger::attach(Scumm *s) DCmd_Register("exit", &ScummDebugger::Cmd_Exit); DCmd_Register("quit", &ScummDebugger::Cmd_Exit); - DCmd_Register("actor", &ScummDebugger::Cmd_PrintActor); + DCmd_Register("actor", &ScummDebugger::Cmd_Actor); + DCmd_Register("actors", &ScummDebugger::Cmd_PrintActor); DCmd_Register("box", &ScummDebugger::Cmd_PrintBox); DCmd_Register("room", &ScummDebugger::Cmd_Room); @@ -264,7 +265,7 @@ bool ScummDebugger::Cmd_Room(int argc, const char **argv) { _s->_fullRedraw = 1; return false; } else { - Debug_Printf("Current room: %d [%d]\n", _s->_currentRoom, _s->_roomResource); + Debug_Printf("Current room: %d [%d] - use 'room <roomnum>' to switch\n", _s->_currentRoom, _s->_roomResource); return true; } } @@ -278,6 +279,8 @@ bool ScummDebugger::Cmd_LoadGame(int argc, const char **argv) { _s->_saveLoadCompatible = false; _detach_now = true; + } else { + Debug_Printf("Syntax: savegame <slotnum>\n"); } return false; } @@ -291,10 +294,39 @@ bool ScummDebugger::Cmd_SaveGame(int argc, const char **argv) { _s->_saveLoadCompatible = false; _detach_now = true; + } else { + Debug_Printf("Syntax: savegame <slotnum>\n"); } return false; } +bool ScummDebugger::Cmd_Actor(int argc, const char **argv) { + Actor *a; + int actnum; + + if (argc < 3) { + Debug_Printf("Syntax: actor <actornum> <command> <parameter>\n"); + return true; + } + + actnum = atoi(argv[1]); + if (actnum >= _s->NUM_ACTORS) { + Debug_Printf("Actor %d is out of range (range: 1 - %d)\n", actnum, _s->NUM_ACTORS); + return true; + } + + a = &_s->_actors[actnum]; + + if (!strcmp(argv[2], "ignoreboxes")) { + a->ignoreBoxes = atoi(argv[3]); + Debug_Printf("Actor[%d].ignoreBoxes = %d\n", actnum, a->ignoreBoxes); + } else { + Debug_Printf("Unknown actor command '%s'\n", argv[2]); + } + + return true; + +} bool ScummDebugger::Cmd_PrintActor(int argc, const char **argv) { int i; Actor *a; |