[Scummvm-cvs-logs] SF.net SVN: scummvm: [21923] scummvm/trunk/engines/simon/simon.cpp
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sat Apr 15 15:15:03 CEST 2006
Revision: 21923
Author: kirben
Date: 2006-04-15 15:14:18 -0700 (Sat, 15 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21923&view=rev
Log Message:
-----------
Use different methods to avoid overflows to FF, to avoid regressions
Modified Paths:
--------------
scummvm/trunk/engines/simon/simon.cpp
Modified: scummvm/trunk/engines/simon/simon.cpp
===================================================================
--- scummvm/trunk/engines/simon/simon.cpp 2006-04-15 22:01:03 UTC (rev 21922)
+++ scummvm/trunk/engines/simon/simon.cpp 2006-04-15 22:14:18 UTC (rev 21923)
@@ -397,8 +397,10 @@
memset(_speechIdArray4, 0, sizeof(_speechIdArray4));
memset(_bitArray, 0, sizeof(_bitArray));
+
memset(_variableArray, 0, sizeof(_variableArray));
memset(_variableArray2, 0, sizeof(_variableArray2));
+ _variableArrayPtr = 0;
memset(_windowArray, 0, sizeof(_windowArray));
@@ -995,8 +997,12 @@
uint SimonEngine::getVarOrWord() {
uint a = READ_BE_UINT16(_codePtr);
_codePtr += 2;
- if (a >= 30000 && a < 30512)
- return readVariable(a - 30000);
+ if (a >= 30000 && a < 30512) {
+ if (getGameType() == GType_FF)
+ return (uint16)readVariable(a - 30000);
+ else
+ return readVariable(a - 30000);
+ }
return a;
}
@@ -3509,6 +3515,8 @@
else
_numTextBoxes = 20;
+ _variableArrayPtr = _variableArray;
+
_startMainScript = false;
_continousMainScript = false;
_startVgaScript = false;
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