[Scummvm-cvs-logs] SF.net SVN: scummvm: [22066] scummvm/trunk/engines/simon/vga.cpp

kirben at users.sourceforge.net kirben at users.sourceforge.net
Thu Apr 20 21:37:15 CEST 2006


Revision: 22066
Author:   kirben
Date:     2006-04-20 21:36:26 -0700 (Thu, 20 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22066&view=rev

Log Message:
-----------
Move _variableArrayPtr changes to match original code, in case it is triggered outside video opcodes

Modified Paths:
--------------
    scummvm/trunk/engines/simon/vga.cpp
Modified: scummvm/trunk/engines/simon/vga.cpp
===================================================================
--- scummvm/trunk/engines/simon/vga.cpp	2006-04-21 04:06:44 UTC (rev 22065)
+++ scummvm/trunk/engines/simon/vga.cpp	2006-04-21 04:36:26 UTC (rev 22066)
@@ -1928,13 +1928,6 @@
 void SimonEngine::setBitFlag(uint bit, bool value) {
 	uint16 *bits = &_bitArray[bit / 16];
 	*bits = (*bits & ~(1 << (bit & 15))) | (value << (bit & 15));
-
-	if (getGameType() == GType_FF && bit == 82) {
-		if (value == true)
-			_variableArrayPtr = _variableArray2;
-		else
-			_variableArrayPtr = _variableArray;
-	}
 }
 
 bool SimonEngine::getBitFlag(uint bit) {
@@ -1943,11 +1936,19 @@
 }
 
 void SimonEngine::vc49_setBit() {
-	setBitFlag(vcReadNextWord(), true);
+	uint bit = vcReadNextWord();
+	if (getGameType() == GType_FF && bit == 82) {
+		_variableArrayPtr = _variableArray2;
+	}
+	setBitFlag(bit, true);
 }
 
 void SimonEngine::vc50_clearBit() {
-	setBitFlag(vcReadNextWord(), false);
+	uint bit = vcReadNextWord();
+	if (getGameType() == GType_FF && bit == 82) {
+		_variableArrayPtr = _variableArray;
+	}
+	setBitFlag(bit, false);
 }
 
 void SimonEngine::vc51_enableBox() {


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