diff options
-rw-r--r-- | engines/xeen/debugger.cpp | 28 | ||||
-rw-r--r-- | engines/xeen/debugger.h | 2 |
2 files changed, 30 insertions, 0 deletions
diff --git a/engines/xeen/debugger.cpp b/engines/xeen/debugger.cpp index 34bc0a3d49..25eab2b7b3 100644 --- a/engines/xeen/debugger.cpp +++ b/engines/xeen/debugger.cpp @@ -48,6 +48,8 @@ Debugger::Debugger(XeenEngine *vm) : GUI::Debugger(), _vm(vm) { registerCmd("continue", WRAP_METHOD(Debugger, cmdExit)); registerCmd("spell", WRAP_METHOD(Debugger, cmdSpell)); registerCmd("dump", WRAP_METHOD(Debugger, cmdDump)); + registerCmd("gold", WRAP_METHOD(Debugger, cmdGold)); + registerCmd("gems", WRAP_METHOD(Debugger, cmdGems)); _spellId = -1; } @@ -113,4 +115,30 @@ bool Debugger::cmdDump(int argc, const char **argv) { return true; } +bool Debugger::cmdGold(int argc, const char **argv) { + Party &party = *_vm->_party; + if (argc == 1) { + debugPrintf("Current gold: %d, bank: %d\n", party._gold, party._bankGold); + } else { + party._gold = strToInt(argv[1]); + if (argc > 2) + party._bankGold = strToInt(argv[2]); + } + + return true; +} + +bool Debugger::cmdGems(int argc, const char **argv) { + Party &party = *_vm->_party; + if (argc == 1) { + debugPrintf("Current gems: %d, bank: %d\n", party._gems, party._bankGems); + } else { + party._gems = strToInt(argv[1]); + if (argc > 2) + party._bankGems = strToInt(argv[2]); + } + + return true; +} + } // End of namespace Xeen diff --git a/engines/xeen/debugger.h b/engines/xeen/debugger.h index 8599835866..bbcc4ca4c2 100644 --- a/engines/xeen/debugger.h +++ b/engines/xeen/debugger.h @@ -37,6 +37,8 @@ private: bool cmdSpell(int argc, const char **argv); bool cmdDump(int argc, const char **argv); + bool cmdGold(int argc, const char **argv); + bool cmdGems(int argc, const char **argv); public: Debugger(XeenEngine *vm); |