diff options
author | Strangerke | 2012-05-16 20:44:47 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-28 17:36:57 +0200 |
commit | 9752da62dfc86edb1d02599754034b5b33bf4465 (patch) | |
tree | dde0be3c1ce8ae9e06bab0d1ebbf83a4f7521c95 /engines/lilliput | |
parent | 127f73a1ec0b04640be1ecc8df987233de4e6a19 (diff) | |
download | scummvm-rg350-9752da62dfc86edb1d02599754034b5b33bf4465.tar.gz scummvm-rg350-9752da62dfc86edb1d02599754034b5b33bf4465.tar.bz2 scummvm-rg350-9752da62dfc86edb1d02599754034b5b33bf4465.zip |
LILLIPUT: Some renaming and refactoring
Diffstat (limited to 'engines/lilliput')
-rw-r--r-- | engines/lilliput/lilliput.cpp | 8 | ||||
-rw-r--r-- | engines/lilliput/lilliput.h | 2 | ||||
-rw-r--r-- | engines/lilliput/script.cpp | 18 | ||||
-rw-r--r-- | engines/lilliput/script.h | 2 |
4 files changed, 13 insertions, 17 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp index 48f0271212..e10a6289bb 100644 --- a/engines/lilliput/lilliput.cpp +++ b/engines/lilliput/lilliput.cpp @@ -1136,12 +1136,10 @@ void LilliputEngine::displayFunction18(int var1, int var2, int var3, int var4) { displayMousePointer(); } -void LilliputEngine::displayString(byte *buf, int var2, int var4) { - debugC(2, kDebugEngineTBC, "displayString(buf, %d, %d)", var2, var4); +void LilliputEngine::displayString(byte *buf, Common::Point pos) { + debugC(2, kDebugEngineTBC, "displayString(buf, %d - %d)", pos.x, pos.y); - int index = var2; - int tmpVar4 = (var4 >> 8) + ((var4 & 0xFF) << 8); - index = index + tmpVar4 + (tmpVar4 >> 2); + int index = (pos.y * 320) + pos.x; int i = 0; while (buf[i] != 0) { diff --git a/engines/lilliput/lilliput.h b/engines/lilliput/lilliput.h index cc391871d6..8df04bce25 100644 --- a/engines/lilliput/lilliput.h +++ b/engines/lilliput/lilliput.h @@ -236,7 +236,7 @@ public: void restoreSurfaceSpeech(); void displayFunction18(int var1, int var2, int var3, int var4); void displayCharacter(int index, Common::Point pos, int flags); - void displayString(byte *buf, int var2, int var4); + void displayString(byte *buf, Common::Point pos); void displayChar(int index, int var1); void displaySmallAnims(); void displaySmallIndexedAnim(byte index, byte subIndex); diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp index a41fde4d68..db976000db 100644 --- a/engines/lilliput/script.cpp +++ b/engines/lilliput/script.cpp @@ -1244,9 +1244,6 @@ void LilliputScript::listAllTexts() { decodePackedText(&_vm->_packedStrings[index + variantCount]); debugC(1, kDebugScriptTBC, "Text 0x%x variant 0 : %s", i, _vm->_displayStringBuf); /* }*/ - - - } } @@ -2712,7 +2709,6 @@ void LilliputScript::OC_sub17FD2() { int var1 = getValue1(); _vm->_currentCharacterVariables[6] = var1 & 0xFF; - } void LilliputScript::OC_sub17FDD() { @@ -2728,6 +2724,7 @@ void LilliputScript::OC_sub17FDD() { void LilliputScript::OC_setByte10B29() { debugC(1, kDebugScriptTBC, "OC_setByte10B29()"); + int var1 = getValue1(); _characterScriptEnabled[var1] = 1; } @@ -2764,6 +2761,7 @@ void LilliputScript::OC_sub1801D() { _vm->_characterDirectionArray[var1] = _currScript->readUint16LE(); } + void LilliputScript::OC_sub1805D() { debugC(1, kDebugScriptTBC, "OC_sub1805D()"); @@ -3096,18 +3094,18 @@ void LilliputScript::OC_sub1847F() { int curWord = _currScript->readUint16LE(); assert(curWord != 0); int var1 = tmpVal / (curWord & 0xFF); - int var2 = _currScript->readUint16LE(); - int var4 = _currScript->readUint16LE(); + int var2 = _currScript->readSint16LE(); + int var4 = _currScript->readSint16LE(); if (_vm->_displayMap != 1) { _vm->restoreSurfaceUnderMousePointer(); - sub18BE6(var1 & 0xFF, var2, var4); + displayNumber(var1 & 0xFF, Common::Point(var2, var4)); _vm->displayMousePointer(); } } -void LilliputScript::sub18BE6(byte var1, int var2, int var4) { - debugC(1, kDebugScriptTBC, "sub18BE6(%d, %d, %d)", var1, var2, var4); +void LilliputScript::displayNumber(byte var1, Common::Point pos) { + debugC(1, kDebugScriptTBC, "displayNumber(%d, %d - %d)", var1, pos.x, pos.y); _vm->_displayStringIndex = 0; _vm->_displayStringBuf[0] = 32; @@ -3116,7 +3114,7 @@ void LilliputScript::sub18BE6(byte var1, int var2, int var4) { _vm->_displayStringBuf[3] = 0; _vm->prepareGoldAmount(var1); - _vm->displayString(_vm->_displayStringBuf, var2, var4); + _vm->displayString(_vm->_displayStringBuf, pos); } void LilliputScript::OC_displayVGAFile() { diff --git a/engines/lilliput/script.h b/engines/lilliput/script.h index 4f635461a2..05092594ec 100644 --- a/engines/lilliput/script.h +++ b/engines/lilliput/script.h @@ -128,7 +128,7 @@ private: void sub17D40(bool &forceReturnFl); void decodePackedText(char *buf); void sub18B3C(int var); - void sub18BE6(byte var1, int var2, int var4); + void displayNumber(byte var1, Common::Point pos); byte *getMapPtr(Common::Point val); byte *sub173D2(); void sub171AF(int var1, int var2, int var4); |