aboutsummaryrefslogtreecommitdiff
path: root/engines/lilliput
diff options
context:
space:
mode:
authorStrangerke2012-05-06 23:38:13 +0200
committerEugene Sandulenko2018-03-28 17:36:57 +0200
commit6b7026256305dc07e9aac095c7f7d19296d7029e (patch)
treeb3f3b0b0a165650a7726697ba2b1da1c1f58e9ee /engines/lilliput
parent7153a4b38aca78c7d9c5222c0f17d8d6342ebf2d (diff)
downloadscummvm-rg350-6b7026256305dc07e9aac095c7f7d19296d7029e.tar.gz
scummvm-rg350-6b7026256305dc07e9aac095c7f7d19296d7029e.tar.bz2
scummvm-rg350-6b7026256305dc07e9aac095c7f7d19296d7029e.zip
LILLIPUT: Some more renaming
Diffstat (limited to 'engines/lilliput')
-rw-r--r--engines/lilliput/lilliput.cpp32
-rw-r--r--engines/lilliput/lilliput.h6
-rw-r--r--engines/lilliput/script.cpp4
3 files changed, 21 insertions, 21 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp
index 63736814a9..2a5f6dbd3a 100644
--- a/engines/lilliput/lilliput.cpp
+++ b/engines/lilliput/lilliput.cpp
@@ -1424,8 +1424,8 @@ void LilliputEngine::sub167EF(int index) {
if (word167EB = 0xFFFF) {
int tmpVal = sub16901(_array10999PosX[index], _array109C1PosY[index]);
- _array109E9PosX[index] = _rulesBuffer12Pos[tmpVal].x;
- _array10A11PosY[index] = _rulesBuffer12Pos[tmpVal].y;
+ _array109E9PosX[index] = _rulesBuffer12Pos4[tmpVal].x;
+ _array10A11PosY[index] = _rulesBuffer12Pos4[tmpVal].y;
return;
}
@@ -1434,13 +1434,13 @@ void LilliputEngine::sub167EF(int index) {
(_array10999PosX[index] <= (_rectXMinMax[word167EB] & 0xFF)) &&
(_array109C1PosY[index] >= (_rectYMinMax[word167EB] >> 8)) &&
(_array109C1PosY[index] <= (_rectYMinMax[word167EB] & 0xFF)) ) {
- _array109E9PosX[index] = _rulesBuffer12Pos[word167ED].x;
- _array10A11PosY[index] = _rulesBuffer12Pos[word167ED].y;
+ _array109E9PosX[index] = _rulesBuffer12Pos4[word167ED].x;
+ _array10A11PosY[index] = _rulesBuffer12Pos4[word167ED].y;
return;
}
- _array109E9PosX[index] = _rulesBuffer12Pos[word167EB].x;
- _array10A11PosY[index] = _rulesBuffer12Pos[word167EB].y;
+ _array109E9PosX[index] = _rulesBuffer12Pos4[word167EB].x;
+ _array10A11PosY[index] = _rulesBuffer12Pos4[word167EB].y;
int var4h = (_rectXMinMax[index] >> 8);
int var4l = (_rectXMinMax[index] & 0xFF);
@@ -1489,7 +1489,7 @@ void LilliputEngine::sub1693A(int index) {
int var1h = _scriptHandler->_array16123PosX[index];
int var1l = _scriptHandler->_array1614BPosY[index];
- _word16937 = (var1h << 8) + var1l;
+ _word16937Pos = Common::Point(var1h, var1l);
sub16A08(index);
@@ -1532,15 +1532,14 @@ void LilliputEngine::sub1693A(int index) {
_characterDirectionArray[index] = retVal;
}
-// TODO rename _word16937
byte LilliputEngine::sub16A76(int indexb, int indexs) {
debugC(2, kDebugEngine, "sub16A76(%d, %d)", indexb, indexs);
static const char _array16A6C[4] = {1, 0, 0, -1};
static const char _array16A70[4] = {0, -1, 1, 0};
- char var1h = (_word16937 >> 8) + _array16A6C[indexb];
- char var1l = (_word16937 & 0xFF) + _array16A70[indexs];
+ char var1h = _word16937Pos.x + _array16A6C[indexb];
+ char var1l = _word16937Pos.y + _array16A70[indexs];
int var2 = sub168DA(Common::Point(var1h, var1l));
if (var2 == 0xFFFF)
@@ -1548,8 +1547,8 @@ byte LilliputEngine::sub16A76(int indexb, int indexs) {
int _word16A74 = var2; // useless?
- var1h = (_word16937 >> 8);
- var1l = (_word16937 & 0xFF);
+ var1h = _word16937Pos.x;
+ var1l = _word16937Pos.y;
if ((var1h >= (_rectXMinMax[var2] >> 8)) && (var1h <= (_rectXMinMax[var2] & 0xFF)) && (var1l >= (_rectYMinMax[var2] >> 8)) && (var1l <= (_rectYMinMax[var2] & 0xFF)))
return 0;
@@ -1593,8 +1592,8 @@ void LilliputEngine::sub16A08(int index) {
int _array16A00[4];
for (int i = 3; i >= 0; i--) {
- byte var1h = (_word16937 >> 8) + _array169F8[i] - _array109E9PosX[index];
- byte var1l = (_word16937 & 0xFF) + _array169FC[i] - _array10A11PosY[index];
+ int16 var1h = _word16937Pos.x + _array169F8[i] - _array109E9PosX[index];
+ int16 var1l = _word16937Pos.y + _array169FC[i] - _array10A11PosY[index];
_array16A00[i] = (var1l * var1l) + (var1h * var1h);
}
_array1692B[0] = 0;
@@ -2510,9 +2509,10 @@ void LilliputEngine::loadRules() {
for (int i = 0; i < _rulesChunk12_size; i++) {
_rectXMinMax[i] = f.readUint16LE();
_rectYMinMax[i] = f.readUint16LE();
- _rulesBuffer12_3[i] = f.readUint16LE();
tmpVal = f.readUint16LE();
- _rulesBuffer12Pos[i] = Common::Point(tmpVal >> 8, tmpVal & 0xFF);
+ _rulesBuffer12Pos3[i] = Common::Point(tmpVal >> 8, tmpVal & 0xFF);
+ tmpVal = f.readUint16LE();
+ _rulesBuffer12Pos4[i] = Common::Point(tmpVal >> 8, tmpVal & 0xFF);
}
// Chunk 13
diff --git a/engines/lilliput/lilliput.h b/engines/lilliput/lilliput.h
index f2b38cad53..de36c1990b 100644
--- a/engines/lilliput/lilliput.h
+++ b/engines/lilliput/lilliput.h
@@ -142,7 +142,7 @@ public:
int _currentDisplayCharacter;
int _displayStringIndex;
int _word1289D;
- int _word16937;
+ Common::Point _word16937Pos;
short _word15E5D[40];
byte _byte15E35[40];
@@ -186,8 +186,8 @@ public:
int _rulesChunk12_size;
int16 _rectXMinMax[40];
int16 _rectYMinMax[40];
- int _rulesBuffer12_3[40];
- Common::Point _rulesBuffer12Pos[40];
+ Common::Point _rulesBuffer12Pos3[40];
+ Common::Point _rulesBuffer12Pos4[40];
int _word12F68_ERULES;
byte _rulesBuffer13_1[20];
int _interfaceHotspotsX[20];
diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp
index c38bc8f947..bd3791cf1e 100644
--- a/engines/lilliput/script.cpp
+++ b/engines/lilliput/script.cpp
@@ -768,7 +768,7 @@ Common::String LilliputScript::getArgumentString(KValueType type, ScriptStream&
case 0xF8: {
int index = curWord & 0xFF;
assert((index >= 0) && (index < 40));
- str = Common::String::format("_vm->_rulesBuffer12_3[%d]", index);
+ str = Common::String::format("_vm->_rulesBuffer12Pos3[%d]", index);
}
case 0xF7: {
str = Common::String::format("(_characterPositionTileX[_currentCharacterVariables[6]], _characterPositionTileY[_currentCharacterVariables[6]])");
@@ -1334,7 +1334,7 @@ Common::Point LilliputScript::getPosFromScript() {
case 0xF8: {
int8 index = curWord & 0xFF;
assert((index >= 0) && (index < 40));
- return Common::Point(_vm->_rulesBuffer12_3[index] >> 8, _vm->_rulesBuffer12_3[index] & 0xFF);
+ return _vm->_rulesBuffer12Pos3[index];
}
case 0xF7: {
int8 index = _vm->_currentCharacterVariables[6];