diff options
author | Strangerke | 2017-01-25 01:03:28 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-01-25 22:42:27 +0100 |
commit | 46ead907840c271fc4563fc54b54273d28874aae (patch) | |
tree | e3456dedc018b7d6aef7870d392af3e61cfdf69f /engines/cryo/debugger.cpp | |
parent | a8a142cfe4521bae210cc4a7c7b4891030d1de39 (diff) | |
download | scummvm-rg350-46ead907840c271fc4563fc54b54273d28874aae.tar.gz scummvm-rg350-46ead907840c271fc4563fc54b54273d28874aae.tar.bz2 scummvm-rg350-46ead907840c271fc4563fc54b54273d28874aae.zip |
CRYO: Move inventory debug hack to debugger
Diffstat (limited to 'engines/cryo/debugger.cpp')
-rw-r--r-- | engines/cryo/debugger.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/cryo/debugger.cpp b/engines/cryo/debugger.cpp index 11a3fb9ec2..f19c616b72 100644 --- a/engines/cryo/debugger.cpp +++ b/engines/cryo/debugger.cpp @@ -28,6 +28,7 @@ namespace Cryo { Debugger::Debugger(CryoEngine *vm) : GUI::Debugger(), _vm(vm) { registerCmd("showHotspots", WRAP_METHOD(Debugger, Cmd_ShowHotspots)); + registerCmd("fullInventory", WRAP_METHOD(Debugger, Cmd_FullInventory)); } /** @@ -44,4 +45,20 @@ bool Debugger::Cmd_ShowHotspots(int argc, const char **argv) { return false; } +bool Debugger::Cmd_FullInventory(int argc, const char **argv) { + if (argc != 1) { + debugPrintf("Usage: %s\n", argv[0]); + return true; + } + + for (int i = 0; i < MAX_OBJECTS; i++) { + object_t *object = _vm->_game->getObjectPtr(i); + object->_flags |= ObjectFlags::ofFlag1; + object->_count++; + } + + _vm->_game->showObjects(); + + return false; +} } // End of namespace Cryo |