Add a debug console command to Riven for displaying combinations to puzzles.
svn-id: r50338
This commit is contained in:
parent
2b9f4e5068
commit
e5e90eb8a8
4 changed files with 32 additions and 1 deletions
|
@ -28,6 +28,7 @@
|
|||
#include "mohawk/myst_scripts.h"
|
||||
#include "mohawk/graphics.h"
|
||||
#include "mohawk/riven.h"
|
||||
#include "mohawk/riven_external.h"
|
||||
#include "mohawk/livingbooks.h"
|
||||
#include "mohawk/sound.h"
|
||||
#include "mohawk/video.h"
|
||||
|
@ -307,6 +308,7 @@ RivenConsole::RivenConsole(MohawkEngine_Riven *vm) : GUI::Debugger(), _vm(vm) {
|
|||
DCmd_Register("dumpScript", WRAP_METHOD(RivenConsole, Cmd_DumpScript));
|
||||
DCmd_Register("listZipCards", WRAP_METHOD(RivenConsole, Cmd_ListZipCards));
|
||||
DCmd_Register("getRMAP", WRAP_METHOD(RivenConsole, Cmd_GetRMAP));
|
||||
DCmd_Register("combos", WRAP_METHOD(RivenConsole, Cmd_Combos));
|
||||
}
|
||||
|
||||
RivenConsole::~RivenConsole() {
|
||||
|
@ -608,6 +610,33 @@ bool RivenConsole::Cmd_GetRMAP(int argc, const char **argv) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool RivenConsole::Cmd_Combos(int argc, const char **argv) {
|
||||
// In the vain of SCUMM's 'drafts' command, this command will list
|
||||
// out all combinations needed in Riven, decoded from the variables.
|
||||
// You'll need to look up the Rebel Tunnel puzzle on your own; the
|
||||
// solution is constant.
|
||||
|
||||
uint32 teleCombo = *_vm->matchVarToString("tcorrectorder");
|
||||
uint32 prisonCombo = *_vm->matchVarToString("pcorrectorder");
|
||||
uint32 domeCombo = *_vm->matchVarToString("adomecombo");
|
||||
|
||||
DebugPrintf("Telescope Combo:\n ");
|
||||
for (int i = 0; i < 5; i++)
|
||||
DebugPrintf("%d ", _vm->_externalScriptHandler->getComboDigit(teleCombo, i));
|
||||
|
||||
DebugPrintf("\nPrison Combo:\n ");
|
||||
for (int i = 0; i < 5; i++)
|
||||
DebugPrintf("%d ", _vm->_externalScriptHandler->getComboDigit(prisonCombo, i));
|
||||
|
||||
DebugPrintf("\nDome Combo:\n ");
|
||||
for (int i = 1; i <= 25; i++)
|
||||
if (domeCombo & (1 << (25 - i)))
|
||||
DebugPrintf("%d ", i);
|
||||
|
||||
DebugPrintf("\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
LivingBooksConsole::LivingBooksConsole(MohawkEngine_LivingBooks *vm) : GUI::Debugger(), _vm(vm) {
|
||||
DCmd_Register("playSound", WRAP_METHOD(LivingBooksConsole, Cmd_PlaySound));
|
||||
DCmd_Register("stopSound", WRAP_METHOD(LivingBooksConsole, Cmd_StopSound));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue