[Scummvm-git-logs] scummvm master -> c3b30b75a61a20b80c153eefcf72eb80f8331d73
bluegr
noreply at scummvm.org
Mon Jun 13 17:22:54 UTC 2022
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:
c3b30b75a6 SCUMM: Add a `grail` command to the debugger
Commit: c3b30b75a61a20b80c153eefcf72eb80f8331d73
https://github.com/scummvm/scummvm/commit/c3b30b75a61a20b80c153eefcf72eb80f8331d73
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-06-13T20:22:51+03:00
Commit Message:
SCUMM: Add a `grail` command to the debugger
This prints the number of the real Grail object when counting from the
left in the final room with the knight in Indy3.
May be useful since there are many Grails, choosing the wrong one kills
you and makes you restart the 3 trials again, and the hints to find it
require the original manual and taking notes during the game.
Changed paths:
engines/scumm/debugger.cpp
engines/scumm/debugger.h
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index 9e62652d2ca..7f41f83e6af 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -82,7 +82,8 @@ ScummDebugger::ScummDebugger(ScummEngine *s)
if (_vm->_game.id == GID_LOOM)
registerCmd("drafts", WRAP_METHOD(ScummDebugger, Cmd_PrintDraft));
-
+ if (_vm->_game.id == GID_INDY3)
+ registerCmd("grail", WRAP_METHOD(ScummDebugger, Cmd_PrintGrail));
if (_vm->_game.id == GID_MONKEY && _vm->_game.platform == Common::kPlatformSegaCD)
registerCmd("passcode", WRAP_METHOD(ScummDebugger, Cmd_Passcode));
@@ -1004,6 +1005,28 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
return true;
}
+bool ScummDebugger::Cmd_PrintGrail(int argc, const char **argv) {
+ if (_vm->_game.id != GID_INDY3) {
+ debugPrintf("Command only works with Indy3\n");
+ return true;
+ }
+
+ if (_vm->_currentRoom != 86) {
+ debugPrintf("Command only works in room 86\n");
+ return true;
+ }
+
+ const int grailNumber = _vm->_scummVars[253];
+ if (grailNumber < 1 || grailNumber > 10) {
+ debugPrintf("Couldn't find the Grail number\n");
+ return true;
+ }
+
+ debugPrintf("Real Grail is Grail #%d\n", grailNumber);
+
+ return true;
+}
+
bool ScummDebugger::Cmd_Passcode(int argc, const char **argv) {
if (argc > 1) {
_vm->_bootParam = atoi(argv[1]);
diff --git a/engines/scumm/debugger.h b/engines/scumm/debugger.h
index f81694f27bc..034575083f7 100644
--- a/engines/scumm/debugger.h
+++ b/engines/scumm/debugger.h
@@ -57,6 +57,7 @@ private:
bool Cmd_ImportRes(int argc, const char **argv);
bool Cmd_PrintDraft(int argc, const char **argv);
+ bool Cmd_PrintGrail(int argc, const char **argv);
bool Cmd_Passcode(int argc, const char **argv);
bool Cmd_Debug(int argc, const char **argv);
More information about the Scummvm-git-logs
mailing list