[Scummvm-cvs-logs] SF.net SVN: scummvm:[33380] scummvm/trunk/engines/cine/script_fw.cpp
buddha_ at users.sourceforge.net
buddha_ at users.sourceforge.net
Mon Jul 28 18:46:21 CEST 2008
Revision: 33380
http://scummvm.svn.sourceforge.net/scummvm/?rev=33380&view=rev
Author: buddha_
Date: 2008-07-28 16:46:20 +0000 (Mon, 28 Jul 2008)
Log Message:
-----------
Fixed crash when running Operation Stealth introduced in r33339 (There are actually 256 global variables although only 255 of them are saved and loaded from savegames. The last one is VAR_BYPASS_PROTECTION and it is written to in the mainLoop so that's why there was a crash).
Modified Paths:
--------------
scummvm/trunk/engines/cine/script_fw.cpp
Modified: scummvm/trunk/engines/cine/script_fw.cpp
===================================================================
--- scummvm/trunk/engines/cine/script_fw.cpp 2008-07-28 16:02:40 UTC (rev 33379)
+++ scummvm/trunk/engines/cine/script_fw.cpp 2008-07-28 16:46:20 UTC (rev 33380)
@@ -38,7 +38,13 @@
namespace Cine {
-ScriptVars globalVars(NUM_MAX_VAR);
+/**
+ * Global variables.
+ * 255 of these are saved, but there's one more that's used for bypassing the copy protection.
+ * In CineEngine::mainLoop(int bootScriptIdx) there's this code: globalVars[VAR_BYPASS_PROTECTION] = 0;
+ * And as VAR_BYPASS_PROTECTION is 255 that's why we're allocating one more than we otherwise would.
+ */
+ScriptVars globalVars(NUM_MAX_VAR + 1);
uint16 compareVars(int16 a, int16 b);
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