diff options
author | Strangerke | 2014-12-07 19:53:19 +0100 |
---|---|---|
committer | Paul Gilbert | 2014-12-12 23:02:41 -0500 |
commit | 3cf08939797c1963264cf1ef49ed227fba3daf00 (patch) | |
tree | c12470920b4100ab231eaf3988899f60a0505469 /engines | |
parent | b864b846356b6b20d6e6def414456b5d44fe88c7 (diff) | |
download | scummvm-rg350-3cf08939797c1963264cf1ef49ed227fba3daf00.tar.gz scummvm-rg350-3cf08939797c1963264cf1ef49ed227fba3daf00.tar.bz2 scummvm-rg350-3cf08939797c1963264cf1ef49ed227fba3daf00.zip |
ACCESS: Add a cheat mode which currently skips the guard in chapter 8
Diffstat (limited to 'engines')
-rw-r--r-- | engines/access/access.cpp | 1 | ||||
-rw-r--r-- | engines/access/access.h | 2 | ||||
-rw-r--r-- | engines/access/amazon/amazon_logic.cpp | 5 | ||||
-rw-r--r-- | engines/access/debugger.cpp | 13 | ||||
-rw-r--r-- | engines/access/debugger.h | 1 |
5 files changed, 21 insertions, 1 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp index a09e47c733..428c4c603a 100644 --- a/engines/access/access.cpp +++ b/engines/access/access.cpp @@ -88,6 +88,7 @@ AccessEngine::AccessEngine(OSystem *syst, const AccessGameDescription *gameDesc) _sndSubFile = 0; _loadSaveSlot = -1; _vidX = _vidY = 0; + _cheatFl = false; } AccessEngine::~AccessEngine() { diff --git a/engines/access/access.h b/engines/access/access.h index 2fe4b726a2..2fdf26318e 100644 --- a/engines/access/access.h +++ b/engines/access/access.h @@ -207,7 +207,7 @@ public: int _flags[256]; bool _clearSummaryFlag; - + bool _cheatFl; // Fields mapped into the flags array int &_useItem; int &_startup; diff --git a/engines/access/amazon/amazon_logic.cpp b/engines/access/amazon/amazon_logic.cpp index c9e8886d08..c1df5353a2 100644 --- a/engines/access/amazon/amazon_logic.cpp +++ b/engines/access/amazon/amazon_logic.cpp @@ -1168,6 +1168,11 @@ void Guard::setGuardFrame() { } void Guard::doGuard() { + // Skip the code dealing with the guard on the boat (chapter 8) + // if the cheat mode is activated + if (_vm->_cheatFl) + return; + if (_vm->_timers[8]._flag) { setGuardFrame(); return; diff --git a/engines/access/debugger.cpp b/engines/access/debugger.cpp index 6b49fb0e67..1f8100452b 100644 --- a/engines/access/debugger.cpp +++ b/engines/access/debugger.cpp @@ -57,6 +57,7 @@ Debugger *Debugger::init(AccessEngine *vm) { Debugger::Debugger(AccessEngine *vm) : GUI::Debugger(), _vm(vm) { registerCmd("continue", WRAP_METHOD(Debugger, cmdExit)); registerCmd("scene", WRAP_METHOD(Debugger, Cmd_LoadScene)); + registerCmd("cheat", WRAP_METHOD(Debugger, Cmd_Cheat)); switch (vm->getGameID()) { case GType_Amazon: @@ -120,6 +121,18 @@ bool Debugger::Cmd_LoadScene(int argc, const char **argv) { } } +bool Debugger::Cmd_Cheat(int argc, const char **argv) { + if (argc != 1) { + debugPrintf("Usage: %s\n", argv[0]); + debugPrintf("Switches on/off the cheat mode\n"); + return true; + } + + _vm->_cheatFl = !_vm->_cheatFl; + debugPrintf("Cheat is now %s\n", _vm->_cheatFl ? "ON" : "OFF"); + return true; +} + /*------------------------------------------------------------------------*/ namespace Amazon { diff --git a/engines/access/debugger.h b/engines/access/debugger.h index 839d13106e..6bd23740cd 100644 --- a/engines/access/debugger.h +++ b/engines/access/debugger.h @@ -37,6 +37,7 @@ protected: AccessEngine *_vm; bool Cmd_LoadScene(int argc, const char **argv); + bool Cmd_Cheat(int argc, const char **argv); Common::String *_sceneDescr; int _sceneNumb; public: |