[Scummvm-cvs-logs] SF.net SVN: scummvm:[55189] scummvm/trunk/engines/cine

tdhs at users.sourceforge.net tdhs at users.sourceforge.net
Sun Jan 9 19:12:30 CET 2011


Revision: 55189
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55189&view=rev
Author:   tdhs
Date:     2011-01-09 18:12:30 +0000 (Sun, 09 Jan 2011)

Log Message:
-----------
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.

Modified Paths:
--------------
    scummvm/trunk/engines/cine/console.cpp
    scummvm/trunk/engines/cine/console.h
    scummvm/trunk/engines/cine/script_fw.cpp

Modified: scummvm/trunk/engines/cine/console.cpp
===================================================================
--- scummvm/trunk/engines/cine/console.cpp	2011-01-09 17:26:22 UTC (rev 55188)
+++ scummvm/trunk/engines/cine/console.cpp	2011-01-09 18:12:30 UTC (rev 55189)
@@ -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

Modified: scummvm/trunk/engines/cine/console.h
===================================================================
--- scummvm/trunk/engines/cine/console.h	2011-01-09 17:26:22 UTC (rev 55188)
+++ scummvm/trunk/engines/cine/console.h	2011-01-09 18:12:30 UTC (rev 55189)
@@ -30,6 +30,8 @@
 
 namespace Cine {
 
+extern bool labyrinthCheat;
+
 class CineEngine;
 
 class CineConsole : public GUI::Debugger {
@@ -39,6 +41,8 @@
 
 private:
 	CineEngine *_vm;
+
+	bool Cmd_LabyrinthCheat(int argc, const char **argv);
 };
 
 } // End of namespace Cine

Modified: scummvm/trunk/engines/cine/script_fw.cpp
===================================================================
--- scummvm/trunk/engines/cine/script_fw.cpp	2011-01-09 17:26:22 UTC (rev 55188)
+++ scummvm/trunk/engines/cine/script_fw.cpp	2011-01-09 18:12:30 UTC (rev 55189)
@@ -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 @@
 	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 @@
 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 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 {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list