mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
Use different methods to avoid overflows to FF, to avoid regressions
svn-id: r21923
This commit is contained in:
parent
e63763329c
commit
53698416f2
@ -397,8 +397,10 @@ SimonEngine::SimonEngine(OSystem *syst)
|
||||
memset(_speechIdArray4, 0, sizeof(_speechIdArray4));
|
||||
|
||||
memset(_bitArray, 0, sizeof(_bitArray));
|
||||
|
||||
memset(_variableArray, 0, sizeof(_variableArray));
|
||||
memset(_variableArray2, 0, sizeof(_variableArray2));
|
||||
_variableArrayPtr = 0;
|
||||
|
||||
memset(_windowArray, 0, sizeof(_windowArray));
|
||||
|
||||
@ -995,8 +997,12 @@ uint SimonEngine::getVarOrByte() {
|
||||
uint SimonEngine::getVarOrWord() {
|
||||
uint a = READ_BE_UINT16(_codePtr);
|
||||
_codePtr += 2;
|
||||
if (a >= 30000 && a < 30512)
|
||||
return readVariable(a - 30000);
|
||||
if (a >= 30000 && a < 30512) {
|
||||
if (getGameType() == GType_FF)
|
||||
return (uint16)readVariable(a - 30000);
|
||||
else
|
||||
return readVariable(a - 30000);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
@ -3509,6 +3515,8 @@ int SimonEngine::go() {
|
||||
else
|
||||
_numTextBoxes = 20;
|
||||
|
||||
_variableArrayPtr = _variableArray;
|
||||
|
||||
_startMainScript = false;
|
||||
_continousMainScript = false;
|
||||
_startVgaScript = false;
|
||||
|
Loading…
Reference in New Issue
Block a user