diff options
author | Johannes Schickel | 2008-03-09 14:46:24 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-03-09 14:46:24 +0000 |
commit | 05f68b17d4a60ece9e2eed14746eab5b29a3e688 (patch) | |
tree | 0e17bd1f237f7921151de9757d41e178fa1cab18 /engines/kyra/debugger.cpp | |
parent | 95c5a48853f8437606008c6705e400699dc3ee43 (diff) | |
download | scummvm-rg350-05f68b17d4a60ece9e2eed14746eab5b29a3e688.tar.gz scummvm-rg350-05f68b17d4a60ece9e2eed14746eab5b29a3e688.tar.bz2 scummvm-rg350-05f68b17d4a60ece9e2eed14746eab5b29a3e688.zip |
- implemented cauldron handling for HoF (needs some more testing though)
- fixed bug in updateCharFacing
- added 'give' command to HoF debugger, which allows setting the hand item to a specified item
svn-id: r31087
Diffstat (limited to 'engines/kyra/debugger.cpp')
-rw-r--r-- | engines/kyra/debugger.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp index d44fcb3b81..194633ec68 100644 --- a/engines/kyra/debugger.cpp +++ b/engines/kyra/debugger.cpp @@ -234,6 +234,7 @@ Debugger_v2::Debugger_v2(KyraEngine_v2 *vm) : Debugger(vm), _vm(vm) { DCmd_Register("scenes", WRAP_METHOD(Debugger_v2, cmd_listScenes)); DCmd_Register("scene_info", WRAP_METHOD(Debugger_v2, cmd_sceneInfo)); DCmd_Register("scene_to_facing", WRAP_METHOD(Debugger_v2, cmd_sceneToFacing)); + DCmd_Register("give", WRAP_METHOD(Debugger_v2, cmd_giveItem)); } bool Debugger_v2::cmd_enterScene(int argc, const char **argv) { @@ -359,5 +360,23 @@ bool Debugger_v2::cmd_sceneToFacing(int argc, const char **argv) { return true; } +bool Debugger_v2::cmd_giveItem(int argc, const char **argv) { + if (argc == 2) { + int item = atoi(argv[1]); + + // Kyrandia 2 has only 178 items (-1 to 176), otherwise it will crash + if (item < -1 || item > 176) { + DebugPrintf("itemid must be any value between (including) -1 and 176\n"); + return true; + } + + _vm->setHandItem(item); + } else { + DebugPrintf("Syntax: give <itemid>\n"); + } + + return true; +} + } // End of namespace Kyra |