aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2017-11-11 12:21:39 -0500
committerPaul Gilbert2017-11-11 12:21:39 -0500
commit2c2803863eadf9875c60607b116be9dce888ac2c (patch)
treed6ce3cf31264348af30a77149687ef3b63c5b930 /engines
parentfddc81a23e495e95b0ac3ffc787cb9fdbfa434c7 (diff)
downloadscummvm-rg350-2c2803863eadf9875c60607b116be9dce888ac2c.tar.gz
scummvm-rg350-2c2803863eadf9875c60607b116be9dce888ac2c.tar.bz2
scummvm-rg350-2c2803863eadf9875c60607b116be9dce888ac2c.zip
XEEN: Debugger commands for gold and gems
Diffstat (limited to 'engines')
-rw-r--r--engines/xeen/debugger.cpp28
-rw-r--r--engines/xeen/debugger.h2
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);