Adjust various number of textBox checks for FF

svn-id: r21902
This commit is contained in:
Travis Howell 2006-04-15 06:42:40 +00:00
parent 647b318a97
commit 3d36a28296
4 changed files with 16 additions and 7 deletions

View File

@ -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);
}

View File

@ -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;

View File

@ -301,6 +301,8 @@ protected:
uint _printCharCurPos, _printCharMaxPos, _printCharPixelCount;
uint _numLettersToPrint;
int _numTextBoxes;
uint _lastTime;
uint _clockStopped, _gameStoppedClock;
time_t _timeStore;

View File

@ -82,7 +82,7 @@ bool SimonEngine::printTextOf(uint a, uint x, uint y) {
}
}
if (a >= 20)
if (a >= _numTextBoxes)
return false;