aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2006-04-15 06:42:40 +0000
committerTravis Howell2006-04-15 06:42:40 +0000
commit3d36a28296a79d49c109486a8236b1a3f7a9b18a (patch)
treeb09cce9bb0b1e9978a61b75d778d6800914060d7
parent647b318a97bc3afd73dc9b04934a36e6e6c1ba5e (diff)
downloadscummvm-rg350-3d36a28296a79d49c109486a8236b1a3f7a9b18a.tar.gz
scummvm-rg350-3d36a28296a79d49c109486a8236b1a3f7a9b18a.tar.bz2
scummvm-rg350-3d36a28296a79d49c109486a8236b1a3f7a9b18a.zip
Adjust various number of textBox checks for FF
svn-id: r21902
-rw-r--r--engines/simon/items.cpp12
-rw-r--r--engines/simon/simon.cpp7
-rw-r--r--engines/simon/simon.h2
-rw-r--r--engines/simon/string.cpp2
4 files changed, 16 insertions, 7 deletions
diff --git a/engines/simon/items.cpp b/engines/simon/items.cpp
index e4e22c341a..327535130d 100644
--- a/engines/simon/items.cpp
+++ b/engines/simon/items.cpp
@@ -700,7 +700,7 @@ void SimonEngine::o_addTextBox() {
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 @@ void SimonEngine::o_setShortText() {
// 66: set item name
uint var = getVarOrByte();
uint stringId = getNextStringID();
- if (var < 20)
+ if (var < _numTextBoxes)
_stringIdArray2[var] = stringId;
}
@@ -718,12 +718,12 @@ void SimonEngine::o_setLongText() {
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 @@ void SimonEngine::o2_isShortText() {
// 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 @@ void SimonEngine::o3_addTextBox() {
w = getVarOrWord();
h = getVarOrWord();
num = getVarOrByte();
- if (num < 20)
+ if (num < _numTextBoxes)
defineBox(id, x, y, w, h, flags + (num << 8), 208, _dummyItem1);
}
diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp
index 7e328f7940..518ce700ad 100644
--- a/engines/simon/simon.cpp
+++ b/engines/simon/simon.cpp
@@ -304,6 +304,8 @@ SimonEngine::SimonEngine(OSystem *syst)
_printCharPixelCount = 0;
_numLettersToPrint = 0;
+ _numTextBoxes = 0;
+
_clockStopped = 0;
_gameStoppedClock = 0;
_lastTime = 0;
@@ -3502,6 +3504,11 @@ int SimonEngine::go() {
_lastMusicPlayed = -1;
_frameRate = 1;
+ if (getGameType() == GType_FF)
+ _numTextBoxes = 40;
+ else
+ _numTextBoxes = 20;
+
_startMainScript = false;
_continousMainScript = false;
_startVgaScript = false;
diff --git a/engines/simon/simon.h b/engines/simon/simon.h
index a4d5262dab..43838358a5 100644
--- a/engines/simon/simon.h
+++ b/engines/simon/simon.h
@@ -301,6 +301,8 @@ protected:
uint _printCharCurPos, _printCharMaxPos, _printCharPixelCount;
uint _numLettersToPrint;
+ int _numTextBoxes;
+
uint _lastTime;
uint _clockStopped, _gameStoppedClock;
time_t _timeStore;
diff --git a/engines/simon/string.cpp b/engines/simon/string.cpp
index b03e418ebf..f8c98a6539 100644
--- a/engines/simon/string.cpp
+++ b/engines/simon/string.cpp
@@ -82,7 +82,7 @@ bool SimonEngine::printTextOf(uint a, uint x, uint y) {
}
}
- if (a >= 20)
+ if (a >= _numTextBoxes)
return false;