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

kirben at users.sourceforge.net kirben at users.sourceforge.net
Fri Apr 14 23:43:01 CEST 2006


Revision: 21902
Author:   kirben
Date:     2006-04-14 23:42:40 -0700 (Fri, 14 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21902&view=rev

Log Message:
-----------
Adjust various number of textBox checks for FF

Modified Paths:
--------------
    scummvm/trunk/engines/simon/items.cpp
    scummvm/trunk/engines/simon/simon.cpp
    scummvm/trunk/engines/simon/simon.h
    scummvm/trunk/engines/simon/string.cpp
Modified: scummvm/trunk/engines/simon/items.cpp
===================================================================
--- scummvm/trunk/engines/simon/items.cpp	2006-04-15 06:35:40 UTC (rev 21901)
+++ scummvm/trunk/engines/simon/items.cpp	2006-04-15 06:42:40 UTC (rev 21902)
@@ -700,7 +700,7 @@
 	int w = getVarOrWord();
 	int h = getVarOrWord();
 	int number = getVarOrByte();
-	if (number < 20)
+	if (number < _numTextBoxes)
 		defineBox(id, x, y, w, h, (number << 8) + 129, 208, _dummyItem2);
 }
 
@@ -708,7 +708,7 @@
 	// 66: set item name
 	uint var = getVarOrByte();
 	uint stringId = getNextStringID();
-	if (var < 20)
+	if (var < _numTextBoxes)
 		_stringIdArray2[var] = stringId;
 }
 
@@ -718,12 +718,12 @@
 	uint stringId = getNextStringID();
 	if (getFeatures() & GF_TALKIE) {
 		uint speechId = getNextWord();
-		if (var < 20) {
+		if (var < _numTextBoxes) {
 			_stringIdArray3[var] = stringId;
 			_speechIdArray4[var] = speechId;
 		}
 	} else {
-		if (var < 20) {
+		if (var < _numTextBoxes) {
 			_stringIdArray3[var] = stringId;
 		}
 	}
@@ -1729,7 +1729,7 @@
 	// 188: string2 is
 	uint i = getVarOrByte();
 	uint str = getNextStringID();
-	setScriptCondition(str < 20 && _stringIdArray2[i] == str);
+	setScriptCondition(str < _numTextBoxes && _stringIdArray2[i] == str);
 }
 
 void SimonEngine::o2_clearMarks() {
@@ -1771,7 +1771,7 @@
 	w = getVarOrWord();
 	h = getVarOrWord();
 	num = getVarOrByte();
-	if (num < 20)
+	if (num < _numTextBoxes)
 		defineBox(id, x, y, w, h, flags + (num << 8), 208, _dummyItem1);
 }
 

Modified: scummvm/trunk/engines/simon/simon.cpp
===================================================================
--- scummvm/trunk/engines/simon/simon.cpp	2006-04-15 06:35:40 UTC (rev 21901)
+++ scummvm/trunk/engines/simon/simon.cpp	2006-04-15 06:42:40 UTC (rev 21902)
@@ -304,6 +304,8 @@
 	_printCharPixelCount = 0;
 	_numLettersToPrint = 0;
 
+	_numTextBoxes = 0;
+
 	_clockStopped = 0;
 	_gameStoppedClock = 0;
 	_lastTime = 0;
@@ -3502,6 +3504,11 @@
 	_lastMusicPlayed = -1;
 	_frameRate = 1;
 
+	if (getGameType() == GType_FF)
+		_numTextBoxes = 40;
+	else
+		_numTextBoxes = 20;
+
 	_startMainScript = false;
 	_continousMainScript = false;
 	_startVgaScript = false;

Modified: scummvm/trunk/engines/simon/simon.h
===================================================================
--- scummvm/trunk/engines/simon/simon.h	2006-04-15 06:35:40 UTC (rev 21901)
+++ scummvm/trunk/engines/simon/simon.h	2006-04-15 06:42:40 UTC (rev 21902)
@@ -301,6 +301,8 @@
 	uint _printCharCurPos, _printCharMaxPos, _printCharPixelCount;
 	uint _numLettersToPrint;
 
+	int _numTextBoxes;
+
 	uint _lastTime;
 	uint _clockStopped, _gameStoppedClock;
 	time_t _timeStore;

Modified: scummvm/trunk/engines/simon/string.cpp
===================================================================
--- scummvm/trunk/engines/simon/string.cpp	2006-04-15 06:35:40 UTC (rev 21901)
+++ scummvm/trunk/engines/simon/string.cpp	2006-04-15 06:42:40 UTC (rev 21902)
@@ -82,7 +82,7 @@
 		}
 	}
 
-	if (a >= 20)
+	if (a >= _numTextBoxes)
 		return 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