Adjust various number of textBox checks for FF
svn-id: r21902
This commit is contained in:
parent
647b318a97
commit
3d36a28296
4 changed files with 16 additions and 7 deletions
|
@ -700,7 +700,7 @@ void SimonEngine::o_addTextBox() {
|
||||||
int w = getVarOrWord();
|
int w = getVarOrWord();
|
||||||
int h = getVarOrWord();
|
int h = getVarOrWord();
|
||||||
int number = getVarOrByte();
|
int number = getVarOrByte();
|
||||||
if (number < 20)
|
if (number < _numTextBoxes)
|
||||||
defineBox(id, x, y, w, h, (number << 8) + 129, 208, _dummyItem2);
|
defineBox(id, x, y, w, h, (number << 8) + 129, 208, _dummyItem2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -708,7 +708,7 @@ void SimonEngine::o_setShortText() {
|
||||||
// 66: set item name
|
// 66: set item name
|
||||||
uint var = getVarOrByte();
|
uint var = getVarOrByte();
|
||||||
uint stringId = getNextStringID();
|
uint stringId = getNextStringID();
|
||||||
if (var < 20)
|
if (var < _numTextBoxes)
|
||||||
_stringIdArray2[var] = stringId;
|
_stringIdArray2[var] = stringId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -718,12 +718,12 @@ void SimonEngine::o_setLongText() {
|
||||||
uint stringId = getNextStringID();
|
uint stringId = getNextStringID();
|
||||||
if (getFeatures() & GF_TALKIE) {
|
if (getFeatures() & GF_TALKIE) {
|
||||||
uint speechId = getNextWord();
|
uint speechId = getNextWord();
|
||||||
if (var < 20) {
|
if (var < _numTextBoxes) {
|
||||||
_stringIdArray3[var] = stringId;
|
_stringIdArray3[var] = stringId;
|
||||||
_speechIdArray4[var] = speechId;
|
_speechIdArray4[var] = speechId;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (var < 20) {
|
if (var < _numTextBoxes) {
|
||||||
_stringIdArray3[var] = stringId;
|
_stringIdArray3[var] = stringId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1729,7 +1729,7 @@ void SimonEngine::o2_isShortText() {
|
||||||
// 188: string2 is
|
// 188: string2 is
|
||||||
uint i = getVarOrByte();
|
uint i = getVarOrByte();
|
||||||
uint str = getNextStringID();
|
uint str = getNextStringID();
|
||||||
setScriptCondition(str < 20 && _stringIdArray2[i] == str);
|
setScriptCondition(str < _numTextBoxes && _stringIdArray2[i] == str);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimonEngine::o2_clearMarks() {
|
void SimonEngine::o2_clearMarks() {
|
||||||
|
@ -1771,7 +1771,7 @@ void SimonEngine::o3_addTextBox() {
|
||||||
w = getVarOrWord();
|
w = getVarOrWord();
|
||||||
h = getVarOrWord();
|
h = getVarOrWord();
|
||||||
num = getVarOrByte();
|
num = getVarOrByte();
|
||||||
if (num < 20)
|
if (num < _numTextBoxes)
|
||||||
defineBox(id, x, y, w, h, flags + (num << 8), 208, _dummyItem1);
|
defineBox(id, x, y, w, h, flags + (num << 8), 208, _dummyItem1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -304,6 +304,8 @@ SimonEngine::SimonEngine(OSystem *syst)
|
||||||
_printCharPixelCount = 0;
|
_printCharPixelCount = 0;
|
||||||
_numLettersToPrint = 0;
|
_numLettersToPrint = 0;
|
||||||
|
|
||||||
|
_numTextBoxes = 0;
|
||||||
|
|
||||||
_clockStopped = 0;
|
_clockStopped = 0;
|
||||||
_gameStoppedClock = 0;
|
_gameStoppedClock = 0;
|
||||||
_lastTime = 0;
|
_lastTime = 0;
|
||||||
|
@ -3502,6 +3504,11 @@ int SimonEngine::go() {
|
||||||
_lastMusicPlayed = -1;
|
_lastMusicPlayed = -1;
|
||||||
_frameRate = 1;
|
_frameRate = 1;
|
||||||
|
|
||||||
|
if (getGameType() == GType_FF)
|
||||||
|
_numTextBoxes = 40;
|
||||||
|
else
|
||||||
|
_numTextBoxes = 20;
|
||||||
|
|
||||||
_startMainScript = false;
|
_startMainScript = false;
|
||||||
_continousMainScript = false;
|
_continousMainScript = false;
|
||||||
_startVgaScript = false;
|
_startVgaScript = false;
|
||||||
|
|
|
@ -301,6 +301,8 @@ protected:
|
||||||
uint _printCharCurPos, _printCharMaxPos, _printCharPixelCount;
|
uint _printCharCurPos, _printCharMaxPos, _printCharPixelCount;
|
||||||
uint _numLettersToPrint;
|
uint _numLettersToPrint;
|
||||||
|
|
||||||
|
int _numTextBoxes;
|
||||||
|
|
||||||
uint _lastTime;
|
uint _lastTime;
|
||||||
uint _clockStopped, _gameStoppedClock;
|
uint _clockStopped, _gameStoppedClock;
|
||||||
time_t _timeStore;
|
time_t _timeStore;
|
||||||
|
|
|
@ -82,7 +82,7 @@ bool SimonEngine::printTextOf(uint a, uint x, uint y) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a >= 20)
|
if (a >= _numTextBoxes)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue