aboutsummaryrefslogtreecommitdiff
path: root/engines/lilliput
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lilliput')
-rw-r--r--engines/lilliput/lilliput.cpp17
-rw-r--r--engines/lilliput/script.cpp14
2 files changed, 9 insertions, 22 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp
index 17ca425b57..eaca15d4b3 100644
--- a/engines/lilliput/lilliput.cpp
+++ b/engines/lilliput/lilliput.cpp
@@ -432,9 +432,8 @@ void LilliputEngine::displayInterfaceHotspots() {
if (_displayMap)
return;
- int tmpVal;
for (int index = 0; index < _interfaceHotspotNumb; index++) {
- tmpVal = _scriptHandler->_interfaceHotspotStatus[index] * 20;
+ int tmpVal = _scriptHandler->_interfaceHotspotStatus[index] * 20;
display16x16IndexedBuf(_bufferIdeogram, tmpVal + index, Common::Point(_interfaceHotspotsX[index], _interfaceHotspotsY[index]));
}
}
@@ -462,12 +461,10 @@ void LilliputEngine::displaySpeechBubble() {
static const byte _array15976[16] = {244, 248, 250, 250, 252, 252, 252, 252, 252, 252, 252, 252, 250, 250, 248, 244};
int index = 192;
- int tmpIndex;
- int var3;
for (int i = 0; i < 16; i++) {
- var3 = _array15976[i];
- tmpIndex = index - (var3 / 2);
+ int var3 = _array15976[i];
+ int tmpIndex = index - (var3 / 2);
var3 &= 0xFE;
for (int j = 0; j < var3; j++) {
((byte *)_mainSurface->getPixels())[tmpIndex + j] = 17;
@@ -1477,10 +1474,9 @@ void LilliputEngine::sub1693A_chooseDirections(int index) {
byte byte16939 = 0;
int mapIndex = ((_word16937Pos.y * 64) + _word16937Pos.x) * 4;
- int mapIndexDiff = 0;
int retVal = 0;
for (int i = 3; i >= 0; i--) {
- mapIndexDiff = mapArrayMove[i];
+ int mapIndexDiff = mapArrayMove[i];
assert(mapIndex + mapIndexDiff + 3 < 16384);
if (((_bufferIsoMap[mapIndex + mapIndexDiff + 3] & _array16C54[i]) != 0) && ((_bufferIsoMap[mapIndex + 3] & _array16C58[i]) != 0)) {
if ((_bufferIsoMap[mapIndex + mapIndexDiff + 3] & 0x80) != 0 && (sub16A76(i, index) != 0)) {
@@ -1606,11 +1602,10 @@ void LilliputEngine::numberToString(int param1) {
static const int _array18AE3[6] = {10000, 1000, 100, 10, 1};
- int count;
int var1 = param1;
bool hideZeros = true;
for (int i = 0; i < 5; i++) {
- count = 0;
+ int count = 0;
while (var1 >= 0) {
++count;
var1 -= _array18AE3[i];
@@ -2784,7 +2779,7 @@ void LilliputEngine::handleGameScripts() {
while (1);
*/
- i = index;
+ //i = index;
//debugC(1, kDebugEngineTBC, "before char %d, pos %d %d, var0 %d, var1 %d, var2 %d var16 %d, script enabled %d", i, _characterPositionX[i], _characterPositionY[i], *getCharacterVariablesPtr(i * 32 + 0), *getCharacterVariablesPtr(i * 32 + 1), *getCharacterVariablesPtr(i * 32 + 2), *getCharacterVariablesPtr(i * 32 + 22), _scriptHandler->_characterScriptEnabled[i]);
assert(tmpVal < _gameScriptIndexSize);
diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp
index 34c76e4ba7..24572e9bcf 100644
--- a/engines/lilliput/script.cpp
+++ b/engines/lilliput/script.cpp
@@ -805,12 +805,6 @@ void LilliputScript::disasmScript(ScriptStream script) {
if (val == 0xFFF6) // end of script
return;
- bool hasIf = false;
-
- if (val != 0xFFF8) {
- hasIf = true;
- }
-
bool firstIf = true;
// check the conditions.
@@ -824,7 +818,7 @@ void LilliputScript::disasmScript(ScriptStream script) {
}
// op code type 1
- assert(val < sizeof(opCodes1)/sizeof(OpCode));
+ assert(val < sizeof(opCodes1) / sizeof(OpCode));
const OpCode *opCode = &opCodes1[val];
const kValueType *opArgType = &opCode->_arg1;
@@ -1038,9 +1032,8 @@ void LilliputScript::sub17B6C(int var1) {
++var1;
int curVal = 0;
- int tmpVal;
while (curVal < var1) {
- tmpVal = _currScript->readUint16LE();
+ int tmpVal = _currScript->readUint16LE();
if (tmpVal == 0xFFF7)
++curVal;
}
@@ -1093,10 +1086,9 @@ void LilliputScript::formatSpeechString() {
int index = 0;
int var2 = 0x100;
- int var1;
for (;;) {
- var1 = _vm->_displayStringBuf[index++];
+ int var1 = _vm->_displayStringBuf[index++];
if (var1 == 0)
break;