aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Turner2011-01-09 18:12:30 +0000
committerDavid Turner2011-01-09 18:12:30 +0000
commitd54fa49b5f01e624f11a057b80e150b2fcad97c3 (patch)
tree5797a006fab10a328f8c985d80c1dda7f671d43d
parentcd6d818ca30fc054ef60dbc6c103bc420232c7db (diff)
downloadscummvm-rg350-d54fa49b5f01e624f11a057b80e150b2fcad97c3.tar.gz
scummvm-rg350-d54fa49b5f01e624f11a057b80e150b2fcad97c3.tar.bz2
scummvm-rg350-d54fa49b5f01e624f11a057b80e150b2fcad97c3.zip
CINE: Add console command "labyrinthCheat" to help with Operation Stealth Playtesting.
This command activates a cheat for the Operation Stealth Scene 6 arcade section i.e. Chased by Guards in Labyrinths in Otto's Mansion. These puzzles are quite hard and thus discourage playtesting beyond this point, especially since it is not possible to save (This may be a bug compared to the original interpreter). Also, added extra debug output to aid script debug output. svn-id: r55189
-rw-r--r--engines/cine/console.cpp12
-rw-r--r--engines/cine/console.h4
-rw-r--r--engines/cine/script_fw.cpp10
3 files changed, 26 insertions, 0 deletions
diff --git a/engines/cine/console.cpp b/engines/cine/console.cpp
index 9a006bf25e..dbbeb4c9b7 100644
--- a/engines/cine/console.cpp
+++ b/engines/cine/console.cpp
@@ -28,10 +28,22 @@
namespace Cine {
+bool labyrinthCheat;
+
CineConsole::CineConsole(CineEngine *vm) : GUI::Debugger(), _vm(vm) {
+ DCmd_Register("labyrinthCheat", WRAP_METHOD(CineConsole, Cmd_LabyrinthCheat));
+
+ labyrinthCheat = false;
}
CineConsole::~CineConsole() {
}
+// Activate Cheat during Scene 6 Labyrinth chased by Guards in Otto's Mansion
+// This puzzle is hard, especially without save/load so this will aid playtesting.
+bool CineConsole::Cmd_LabyrinthCheat(int argc, const char **argv) {
+ labyrinthCheat = true;
+ return true;
+}
+
} // End of namespace Cine
diff --git a/engines/cine/console.h b/engines/cine/console.h
index 2f24b3be46..92d059cb63 100644
--- a/engines/cine/console.h
+++ b/engines/cine/console.h
@@ -30,6 +30,8 @@
namespace Cine {
+extern bool labyrinthCheat;
+
class CineEngine;
class CineConsole : public GUI::Debugger {
@@ -39,6 +41,8 @@ public:
private:
CineEngine *_vm;
+
+ bool Cmd_LabyrinthCheat(int argc, const char **argv);
};
} // End of namespace Cine
diff --git a/engines/cine/script_fw.cpp b/engines/cine/script_fw.cpp
index 3574a1b73a..d403b0dc3a 100644
--- a/engines/cine/script_fw.cpp
+++ b/engines/cine/script_fw.cpp
@@ -35,6 +35,7 @@
#include "cine/sound.h"
#include "cine/various.h"
#include "cine/script.h"
+#include "cine/console.h"
namespace Cine {
@@ -1333,6 +1334,13 @@ int FWScript::o1_startGlobalScript() {
assert(param < NUM_MAX_SCRIPT);
debugC(5, kCineDebugScript, "Line: %d: startScript(%d)", _line, param);
+
+ // Cheat for Scene 6 Labyrinth Arcade Game to disable John's Death (to aid playtesting)
+ if (g_cine->getGameType() == Cine::GType_OS && labyrinthCheat && scumm_stricmp(currentPrcName, "LABY.PRC") == 0 && param == 46) {
+ warning("LABY.PRC startScript(46) Disabled. CHEAT!");
+ return 0;
+ }
+
addScriptToGlobalScripts(param);
return 0;
}
@@ -1971,6 +1979,7 @@ uint16 compareVars(int16 a, int16 b) {
void executeObjectScripts() {
ScriptList::iterator it = g_cine->_objectScripts.begin();
for (; it != g_cine->_objectScripts.end();) {
+ debugC(5, kCineDebugScript, "executeObjectScripts() Executing Object Index: %d", (*it)->_index);
if ((*it)->_index < 0 || (*it)->execute() < 0) {
it = g_cine->_objectScripts.erase(it);
} else {
@@ -1982,6 +1991,7 @@ void executeObjectScripts() {
void executeGlobalScripts() {
ScriptList::iterator it = g_cine->_globalScripts.begin();
for (; it != g_cine->_globalScripts.end();) {
+ debugC(5, kCineDebugScript, "executeGlobalScripts() Executing Object Index: %d", (*it)->_index);
if ((*it)->_index < 0 || (*it)->execute() < 0) {
it = g_cine->_globalScripts.erase(it);
} else {