[Scummvm-git-logs] scummvm master -> 2c2803863eadf9875c60607b116be9dce888ac2c
dreammaster
dreammaster at scummvm.org
Sat Nov 11 18:21:43 CET 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2c2803863e XEEN: Debugger commands for gold and gems
Commit: 2c2803863eadf9875c60607b116be9dce888ac2c
https://github.com/scummvm/scummvm/commit/2c2803863eadf9875c60607b116be9dce888ac2c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-11-11T12:21:39-05:00
Commit Message:
XEEN: Debugger commands for gold and gems
Changed paths:
engines/xeen/debugger.cpp
engines/xeen/debugger.h
diff --git a/engines/xeen/debugger.cpp b/engines/xeen/debugger.cpp
index 34bc0a3..25eab2b 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 8599835..bbcc4ca 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);
More information about the Scummvm-git-logs
mailing list