diff options
author | Strangerke | 2012-05-09 08:07:58 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-28 17:36:57 +0200 |
commit | 59f6e304a2feb44b416308a4dd71354893687e7d (patch) | |
tree | 93aa933ae3b8cbf8e731d4c88a566746aa7d047a | |
parent | 6b9777cc9f2eb4c468fbc41dbfc09826236d5922 (diff) | |
download | scummvm-rg350-59f6e304a2feb44b416308a4dd71354893687e7d.tar.gz scummvm-rg350-59f6e304a2feb44b416308a4dd71354893687e7d.tar.bz2 scummvm-rg350-59f6e304a2feb44b416308a4dd71354893687e7d.zip |
LILLIPUT: More renaming
-rw-r--r-- | engines/lilliput/lilliput.cpp | 122 | ||||
-rw-r--r-- | engines/lilliput/lilliput.h | 20 | ||||
-rw-r--r-- | engines/lilliput/script.cpp | 68 | ||||
-rw-r--r-- | engines/lilliput/script.h | 2 |
4 files changed, 105 insertions, 107 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp index bcfb51431b..0649289ca2 100644 --- a/engines/lilliput/lilliput.cpp +++ b/engines/lilliput/lilliput.cpp @@ -157,7 +157,7 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd) _word17081_nextIndex = 0; _word16EFE = 0xFFFF; _word1817B = 0; - _word15BC8Pos = Common::Point(0, 0); + _savedSurfaceUnderMousePos = Common::Point(0, 0); _word15AC2 = 0; _word15AC2 = 0; _displayStringIndex = 0; @@ -213,7 +213,7 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd) _array12861[i] = 0xFFFF; for (int i = 0; i < 256; i++) - _array15AC8[i] = 0; + _savedSurfaceUnderMouse[i] = 0; for (int i = 0; i < 160; i++) _displayStringBuf[i] = 0; @@ -368,9 +368,8 @@ void LilliputEngine::displayFunction1a(byte *buf, Common::Point pos) { displayFunction1(buf, 0, pos); } -// save area under mouse cursor -void LilliputEngine::displayFunction2(byte *buf, Common::Point pos) { - debugC(2, kDebugEngineTBC, "displayFunction2(buf, %d, %d)", pos.x, pos.y); +void LilliputEngine::SaveSurfaceUnderMouseCursor(byte *buf, Common::Point pos) { + debugC(2, kDebugEngine, "SaveSurfaceUnderMouseCursor(buf, %d, %d)", pos.x, pos.y); int tmpVal = ((pos.y & 0xFF) << 8) + (pos.y >> 8); int index2 = pos.x + tmpVal + (tmpVal >> 2); @@ -398,15 +397,14 @@ void LilliputEngine::displayFunction3(int var1, int var2, int var4) { } } -// display mouse cursor -void LilliputEngine::displayFunction4() { - debugC(2, kDebugEngineTBC, "displayFunction4()"); +void LilliputEngine::displayMousePointer() { + debugC(2, kDebugEngine, "displayMousePointer()"); if ((_skipDisplayFlag1 != 1) && (_skipDisplayFlag2 != 1)) { _skipDisplayFlag2 = 1; - _word15BC8Pos = _mouseDisplayPos; - displayFunction2(_array15AC8, _mouseDisplayPos); + _savedSurfaceUnderMousePos = _mouseDisplayPos; + SaveSurfaceUnderMouseCursor(_savedSurfaceUnderMouse, _mouseDisplayPos); displayFunction1(_bufferIdeogram, _word15AC2 + 80, _mouseDisplayPos); _skipDisplayFlag1 = 1; @@ -414,12 +412,12 @@ void LilliputEngine::displayFunction4() { } } -void LilliputEngine::displayFunction5() { - debugC(2, kDebugEngineTBC, "displayFunction5()"); +void LilliputEngine::restoreSurfaceUnderMousePointer() { + debugC(2, kDebugEngine, "restoreSurfaceUnderMousePointer()"); if ((_skipDisplayFlag1 != 0) && (_skipDisplayFlag2 != 1)) { _skipDisplayFlag2 = 1; - displayFunction1a(_array15AC8, _word15BC8Pos); + displayFunction1a(_savedSurfaceUnderMouse, _savedSurfaceUnderMousePos); _skipDisplayFlag1 = 0; _skipDisplayFlag2 = 0; } @@ -429,7 +427,7 @@ void LilliputEngine::displayFunction5() { void LilliputEngine::displayFunction6() { debugC(2, kDebugEngineTBC, "displayFunction6()"); - displayFunction5(); + restoreSurfaceUnderMousePointer(); int index = (16 * 320) + 64; for (int i = 0; i < 176; i++) { @@ -438,14 +436,14 @@ void LilliputEngine::displayFunction6() { index += 320; } - displayFunction4(); + displayMousePointer(); } // save speech zone void LilliputEngine::displayFunction7() { debugC(2, kDebugEngineTBC, "displayFunction7()"); - displayFunction5(); + restoreSurfaceUnderMousePointer(); int index = 66; for (int i = 0; i < 16; i++) { @@ -454,7 +452,7 @@ void LilliputEngine::displayFunction7() { index += 320; } - displayFunction4(); + displayMousePointer(); } void LilliputEngine::displayInterfaceHotspots() { @@ -463,7 +461,7 @@ void LilliputEngine::displayInterfaceHotspots() { if (_displayMap == 1) return; - displayFunction5(); + restoreSurfaceUnderMousePointer(); int index = 0; int tmpVal; @@ -472,7 +470,7 @@ void LilliputEngine::displayInterfaceHotspots() { displayFunction1(_bufferIdeogram, tmpVal + index, Common::Point(_interfaceHotspotsX[index], _interfaceHotspotsY[index])); } - displayFunction4(); + displayMousePointer(); } void LilliputEngine::displayFunction9() { @@ -500,7 +498,7 @@ void LilliputEngine::displayFunction10() { debugC(2, kDebugEngineTBC, "displayFunction10()"); static const byte _array15976[16] = {244, 248, 250, 250, 252, 252, 252, 252, 252, 252, 252, 252, 250, 250, 248, 244}; - displayFunction5(); + restoreSurfaceUnderMousePointer(); int index = 192; int tmpIndex; @@ -516,7 +514,7 @@ void LilliputEngine::displayFunction10() { index += 320; } - displayFunction4(); + displayMousePointer(); } void LilliputEngine::sub15A4C(int &vgaIndex, byte *srcBuf, int &bufIndex) { @@ -554,7 +552,7 @@ void LilliputEngine::sub15A4C(int &vgaIndex, byte *srcBuf, int &bufIndex) { void LilliputEngine::displayFunction11(byte *buf) { debugC(2, kDebugEngineTBC, "displayFunction11(%s)", buf); - displayFunction5(); + restoreSurfaceUnderMousePointer(); int vgaIndex = 70; int bufIndex = 0; @@ -581,13 +579,13 @@ void LilliputEngine::displayFunction11(byte *buf) { sub15A4C(vgaIndex, buf, bufIndex); } - displayFunction4(); + displayMousePointer(); } void LilliputEngine::displayFunction12() { debugC(1, kDebugEngineTBC, "displayFunction12()"); - displayFunction5(); + restoreSurfaceUnderMousePointer(); byte *tmpBuf = loadVGA("SCREEN.GFX", 64000, true); memcpy(_mainSurface->getPixels(), tmpBuf, 320*200); @@ -602,7 +600,7 @@ void LilliputEngine::displayFunction12() { displayFunction15(); displayFunction14(); - displayFunction4(); + displayMousePointer(); free(tmpBuf); } @@ -632,7 +630,7 @@ void LilliputEngine::displayFunction14() { return; if (_mouseDisplayPos.x > 48) - displayFunction5(); + restoreSurfaceUnderMousePointer(); int index = (16 * 320) + 64; for (int i = 0; i < 176; i++) { @@ -644,27 +642,27 @@ void LilliputEngine::displayFunction14() { _system->copyRectToScreen((byte *)_mainSurface->getPixels(), 320, 0, 0, 320, 200); _system->updateScreen(); - displayFunction4(); + displayMousePointer(); } void LilliputEngine::restoreMapPoints() { debugC(2, kDebugEngineTBC, "restoreMapPoints()"); - displayFunction5(); + restoreSurfaceUnderMousePointer(); byte *buf = (byte *)_mainSurface->getPixels(); for (int index = 0; index < _numCharacters; index++) { buf[_word15E5D[index]] = _byte15E35[index]; } - displayFunction4(); + displayMousePointer(); } void LilliputEngine::displayCharactersOnMap() { debugC(2, kDebugEngineTBC, "displayCharactersOnMap()"); sub16217(); - displayFunction5(); + restoreSurfaceUnderMousePointer(); byte *buf = (byte *)_mainSurface->getPixels(); for (int index = _numCharacters - 1; index >=0; index--) { @@ -677,7 +675,7 @@ void LilliputEngine::displayCharactersOnMap() { buf[y * 320 + x] = _scriptHandler->_array128EF[index]; } } - displayFunction4(); + displayMousePointer(); } void LilliputEngine::sub16217() { @@ -828,7 +826,7 @@ void LilliputEngine::sub1863B() { } void LilliputEngine::paletteFadeOut() { - debugC(2, kDebugEngineTBC, "paletteFadeOut()"); + debugC(2, kDebugEngine, "paletteFadeOut()"); sub1863B(); byte palette[768]; @@ -1067,19 +1065,19 @@ void LilliputEngine::sub16CA0() { void LilliputEngine::displayFunction17() { debugC(2, kDebugEngineTBC, "displayFunction17()"); - displayFunction5(); + restoreSurfaceUnderMousePointer(); for (int i = 0; i < 16; i++) for (int j = 0; j < 252; j++) ((byte *)_mainSurface->getPixels())[66 + (i * 320) + j] = _buffer10_4032[(252 * i) + j]; - displayFunction4(); + displayMousePointer(); } void LilliputEngine::displayFunction18(int var1, int var2, int var3, int var4) { debugC(2, kDebugEngineTBC, "displayFunction18(%d, %d, %d, %d)", var1, var2, var3, var4); - displayFunction5(); + restoreSurfaceUnderMousePointer(); if ((var1 & 0xFF) == 0x2D) { var2 += 35; @@ -1105,7 +1103,7 @@ void LilliputEngine::displayFunction18(int var1, int var2, int var3, int var4) { vgaIndex += 320; } - displayFunction4(); + displayMousePointer(); } void LilliputEngine::displayString(byte *buf, int var2, int var4) { @@ -1347,7 +1345,7 @@ void LilliputEngine::sub189DE() { --_byte1881D; if (_byte1881D == 0) { displayFunction17(); - _scriptHandler->_word1881B = 0xFFFF; + _scriptHandler->_word1881B = -1; } } } @@ -2230,7 +2228,7 @@ void LilliputEngine::displayHeroismIndicator() { if (var1 == _scriptHandler->_heroismLevel) return; - displayFunction5(); + restoreSurfaceUnderMousePointer(); int var2 = 1; if (var1 > _scriptHandler->_heroismLevel) var1 = 150; @@ -2265,7 +2263,7 @@ void LilliputEngine::displayHeroismIndicator() { } } - displayFunction4(); + displayMousePointer(); } void LilliputEngine::pollEvent() { @@ -2296,9 +2294,9 @@ void LilliputEngine::pollEvent() { if (_mousePos != _oldMousePos) { _oldMousePos = _mousePos; if (_skipDisplayFlag1 != 0) { - displayFunction5(); + restoreSurfaceUnderMousePointer(); _mouseDisplayPos = _mousePos; - displayFunction4(); + displayMousePointer(); } else { _mouseDisplayPos = _mousePos; } @@ -2435,33 +2433,33 @@ void LilliputEngine::loadRules() { _rulesBuffer2_16[(j * 32) + k] = f.readByte(); } - // Chunk 3 & 4 - _rulesChunk3_size = f.readSint16LE(); + // Chunk 3 & 4 : Packed strings & associated indexes + _packedStringNumb = f.readSint16LE(); curWord = f.readSint16LE(); - _rulesChunk3 = (int *)malloc(sizeof(int) * _rulesChunk3_size); - for (int i = 0; i < _rulesChunk3_size; ++i) - _rulesChunk3[i] = f.readUint16LE(); + _packedStringIndex = (int *)malloc(sizeof(int) * _packedStringNumb); + for (int i = 0; i < _packedStringNumb; ++i) + _packedStringIndex[i] = f.readUint16LE(); - _rulesChunk4 = (byte *)malloc(sizeof(byte) * curWord); + _packedStrings = (char *)malloc(curWord); for (int i = 0; i < curWord; ++i) - _rulesChunk4[i] = f.readByte(); + _packedStrings[i] = f.readByte(); // Chunk 5: Scripts // Use byte instead of int, therefore multiply by two the size. - // This is for changing that into a memory read stream - _initScript_size = f.readUint16LE() * 2; - _initScript = (byte *)malloc(sizeof(byte) * _initScript_size); - for (int i = 0; i < _initScript_size; ++i) + // This is for converting it into a memory read stream + _initScriptSize = f.readUint16LE() * 2; + _initScript = (byte *)malloc(_initScriptSize); + for (int i = 0; i < _initScriptSize; ++i) _initScript[i] = f.readByte(); - // Chunk 6 - _menuScript_size = f.readUint16LE() * 2; - _menuScript = (byte *)malloc(sizeof(byte) * _menuScript_size); - for (int i = 0; i < _menuScript_size; ++i) + // Chunk 6: Menu Script + _menuScriptSize = f.readUint16LE() * 2; + _menuScript = (byte *)malloc(sizeof(byte) * _menuScriptSize); + for (int i = 0; i < _menuScriptSize; ++i) _menuScript[i] = f.readByte(); - // Chunk 7 & 8 + // Chunk 7 & 8: Game scripts and indexes _gameScriptIndexSize = f.readUint16LE(); // Added one position to keep the total size too, as it's useful later _arrayGameScriptIndex = (int *)malloc(sizeof(int) * (_gameScriptIndexSize + 1)); @@ -2546,16 +2544,16 @@ void LilliputEngine::loadRules() { } void LilliputEngine::displayVGAFile(Common::String fileName) { - debugC(1, kDebugEngineTBC, "displayVGAFile(%s)", fileName.c_str()); + debugC(1, kDebugEngine, "displayVGAFile(%s)", fileName.c_str()); - displayFunction4(); + displayMousePointer(); byte *buffer = loadVGA(fileName, 64000, true); memcpy(_mainSurface->getPixels(), buffer, 320*200); _system->copyRectToScreen((byte *)_mainSurface->getPixels(), 320, 0, 0, 320, 200); _system->updateScreen(); - displayFunction5(); + restoreSurfaceUnderMousePointer(); } void LilliputEngine::fixPaletteEntries(uint8 *palette, int num) { @@ -2610,7 +2608,7 @@ void LilliputEngine::handleMenu() { sub170EE(_word10804); debugC(1, kDebugScriptTBC, "========================== Menu Script =============================="); - _scriptHandler->runMenuScript(ScriptStream(_menuScript, _menuScript_size)); + _scriptHandler->runMenuScript(ScriptStream(_menuScript, _menuScriptSize)); debugC(1, kDebugScriptTBC, "========================== End of Menu Script=============================="); _savedMousePosDivided = Common::Point(-1, -1); _byte129A0 = 0xFF; @@ -2700,7 +2698,7 @@ Common::Error LilliputEngine::run() { _lastTime = _system->getMillis(); - _scriptHandler->runScript(ScriptStream(_initScript, _initScript_size)); + _scriptHandler->runScript(ScriptStream(_initScript, _initScriptSize)); // Hack, see above _int8installed = true; diff --git a/engines/lilliput/lilliput.h b/engines/lilliput/lilliput.h index 642069eb10..a1d683c198 100644 --- a/engines/lilliput/lilliput.h +++ b/engines/lilliput/lilliput.h @@ -138,7 +138,7 @@ public: int _word17081_nextIndex; int _word16EFE; int _word1817B; - Common::Point _word15BC8Pos; + Common::Point _savedSurfaceUnderMousePos; int _word15AC2; int _currentDisplayCharacter; int _displayStringIndex; @@ -170,13 +170,13 @@ public: byte _characterVariables_[1400 + 3120]; byte *_currentCharacterVariables; byte _rulesBuffer2_16[40 * 32]; - int *_rulesChunk3; - int _rulesChunk3_size; - byte *_rulesChunk4; + int *_packedStringIndex; + int _packedStringNumb; + char *_packedStrings; byte *_initScript; - int _initScript_size; + int _initScriptSize; byte *_menuScript; - int _menuScript_size; + int _menuScriptSize; int *_arrayGameScriptIndex; int _gameScriptIndexSize; byte *_arrayGameScripts; @@ -196,7 +196,7 @@ public: byte _rulesBuffer13_4[20]; int16 _array10999PosX[40]; int16 _array109C1PosY[40]; - byte _array15AC8[256]; + byte _savedSurfaceUnderMouse[16 * 16]; byte _charactersToDisplay[40]; int16 _characterRelativePositionX[40]; int16 _characterRelativePositionY[40]; @@ -222,10 +222,10 @@ public: void displayFunction1(byte *buf, int var1, Common::Point pos); void displayFunction1a(byte *buf, Common::Point pos); - void displayFunction2(byte *buf, Common::Point pos); + void SaveSurfaceUnderMouseCursor(byte *buf, Common::Point pos); void displayFunction3(int var1, int var2, int var4); - void displayFunction4(); - void displayFunction5(); + void displayMousePointer(); + void restoreSurfaceUnderMousePointer(); void displayFunction6(); void displayFunction7(); void displayInterfaceHotspots(); diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp index 6cd5738a7f..17f6f6a574 100644 --- a/engines/lilliput/script.cpp +++ b/engines/lilliput/script.cpp @@ -86,7 +86,7 @@ LilliputScript::~LilliputScript() { } byte LilliputScript::handleOpcodeType1(int curWord) { - debugC(2, kDebugScriptTBC, "handleOpcodeType1(0x%x)", curWord); + debugC(2, kDebugScript, "handleOpcodeType1(0x%x)", curWord); switch (curWord) { case 0x0: return OC_checkCharacterGoalPos(); @@ -245,7 +245,7 @@ byte LilliputScript::handleOpcodeType1(int curWord) { } void LilliputScript::handleOpcodeType2(int curWord) { - debugC(2, kDebugScriptTBC, "handleOpcodeType2(0x%x)", curWord); + debugC(2, kDebugScript, "handleOpcodeType2(0x%x)", curWord); switch (curWord) { case 0x0: OC_setWord18821(); @@ -905,7 +905,7 @@ void LilliputScript::disasmScript( ScriptStream script) { } int LilliputScript::handleOpcode(ScriptStream *script) { - debugC(2, kDebugScriptTBC, "handleOpcode"); + debugC(2, kDebugScript, "handleOpcode"); _currScript = script; uint16 curWord = _currScript->readUint16LE(); @@ -939,7 +939,7 @@ int LilliputScript::handleOpcode(ScriptStream *script) { } void LilliputScript::runScript(ScriptStream script) { - debugC(1, kDebugScriptTBC, "runScript"); + debugC(1, kDebugScript, "runScript"); _byte16F05_ScriptHandler = 1; @@ -1179,8 +1179,8 @@ void LilliputScript::sub189B8() { _vm->displayFunction11(_vm->_displayStringBuf); } -void LilliputScript::sub18A56(byte *buf) { - debugC(2, kDebugScriptTBC, "sub18A56(buf)"); +void LilliputScript::decodePackedText(char *buf) { + debugC(2, kDebugScriptTBC, "decodePackedText(buf)"); static const char *nounsArrayPtr = "I am |You are |you are |hou art |in the |is the |is a |in a |To the |to the |by |going |here |The|the|and |some |build|not |way|I |a |an |from |of |him|her|by |his |ing |tion|have |you|I''ve |can''t |up |to |he |she |down |what|What|with|are |and|ent|ian|ome|ed |me|my|ai|it|is|of|oo|ea|er|es|th|we|ou|ow|or|gh|go|er|st|ee|th|sh|ch|ct|on|ly|ng|nd|nt|ty|ll|le|de|as|ie|in|ss|''s |''t |re|gg|tt|pp|nn|ay|ar|wh|"; @@ -1237,9 +1237,9 @@ void LilliputScript::sub18A56(byte *buf) { int LilliputScript::sub18BB7(int index) { debugC(2, kDebugScriptTBC, "sub18BB7(%d)", index); - int chunk4Index = _vm->_rulesChunk3[index]; + int chunk4Index = _vm->_packedStringIndex[index]; int result = 0; - while (_vm->_rulesChunk4[chunk4Index + result] == 0x5B) + while (_vm->_packedStrings[chunk4Index + result] == 0x5B) ++result; return result + 1; @@ -1253,9 +1253,9 @@ void LilliputScript::sub18B3C(int var) { _word18776 = var; - int index = _vm->_rulesChunk3[var]; + int index = _vm->_packedStringIndex[var]; int count = 0; - while (_vm->_rulesChunk4[index + count] != 0x5B) + while (_vm->_packedStrings[index + count] != 0x5B) ++count; int i = 0; @@ -1265,12 +1265,12 @@ void LilliputScript::sub18B3C(int var) { for (int j = 0; j < tmpVal; j++) { do ++i; - while (_vm->_rulesChunk4[index + count + i] != 0x5B); + while (_vm->_packedStrings[index + count + i] != 0x5B); } } } - sub18A56(&_vm->_rulesChunk4[index + count + i]); + decodePackedText(&_vm->_packedStrings[index + count + i]); } int16 LilliputScript::getValue1() { @@ -1546,8 +1546,8 @@ byte LilliputScript::OC_compareCoords_1() { int index = _currScript->readUint16LE(); assert(index < 40); - int var3 = _vm->_rectXMinMax[index]; - int var4 = _vm->_rectYMinMax[index]; + int16 var3 = _vm->_rectXMinMax[index]; + int16 var4 = _vm->_rectYMinMax[index]; Common::Point var1 = _vm->_currentScriptCharacterPos; if ((var1.x < (var3 >> 8)) || (var1.x > (var3 & 0xFF)) || (var1.y < (var4 >> 8)) || (var1.y > (var4 & 0xFF))) @@ -1560,11 +1560,11 @@ byte LilliputScript::OC_compareCoords_1() { byte LilliputScript::OC_compareCoords_2() { debugC(1, kDebugScriptTBC, "OC_compareCoords_2()"); - int index = getValue1(); + int16 index = getValue1(); Common::Point var1 = Common::Point(_array16123PosX[index], _array1614BPosY[index]); - uint16 var2 = _currScript->readUint16LE(); - uint16 var3 = _vm->_rectXMinMax[var2]; - uint16 var4 = _vm->_rectYMinMax[var2]; + index = _currScript->readUint16LE(); + uint16 var3 = _vm->_rectXMinMax[index]; + uint16 var4 = _vm->_rectYMinMax[index]; if ((var1.x < (var3 >> 8)) || (var1.x > (var3 & 0xFF)) || (var1.y < (var4 >> 8)) || (var1.y > (var4 & 0xFF))) return 0; @@ -2137,23 +2137,23 @@ void LilliputScript::sub18B7C(int var1, int var3) { return; _word18776 = var1; - int index = _vm->_rulesChunk3[var1]; + int index = _vm->_packedStringIndex[var1]; - while (_vm->_rulesChunk4[index] == 91) + while (_vm->_packedStrings[index] == 91) ++index; for (int i = 0; i < var3; i++) { int tmpVal = 93; while (tmpVal == 93) { - tmpVal = _vm->_rulesChunk4[index]; + tmpVal = _vm->_packedStrings[index]; ++index; } } - if (_vm->_rulesChunk4[index] == 0) + if (_vm->_packedStrings[index] == 0) return; - sub18A56(&_vm->_rulesChunk4[index]); + decodePackedText(&_vm->_packedStrings[index]); } void LilliputScript::OC_sub17D7F() { @@ -2917,7 +2917,7 @@ void LilliputScript::OC_sub182EC() { } void LilliputScript::OC_PaletteFadeOut() { - debugC(1, kDebugScriptTBC, "OC_PaletteFadeOut()"); + debugC(1, kDebugScript, "OC_PaletteFadeOut()"); _byte12A09 = 1; _vm->paletteFadeOut(); @@ -2925,7 +2925,7 @@ void LilliputScript::OC_PaletteFadeOut() { } void LilliputScript::OC_PaletteFadeIn() { - debugC(1, kDebugScriptTBC, "OC_PaletteFadeIn()"); + debugC(1, kDebugScript, "OC_PaletteFadeIn()"); _byte12A09 = 1; _vm->paletteFadeIn(); @@ -3016,7 +3016,7 @@ void LilliputScript::OC_loadFile_AERIAL_GFX() { _vm->_byte15EAD = var1; _byte12A09 = 1; - _word1881B = 0xFFFF; + _word1881B = -1; OC_PaletteFadeOut(); _vm->_word15AC2 = 1; _vm->displayVGAFile("AERIAL.GFX"); @@ -3049,9 +3049,9 @@ void LilliputScript::OC_sub1847F() { int var4 = _currScript->readUint16LE(); if (_vm->_displayMap != 1) { - _vm->displayFunction5(); + _vm->restoreSurfaceUnderMousePointer(); sub18BE6(var1 & 0xFF, var2, var4); - _vm->displayFunction4(); + _vm->displayMousePointer(); } } @@ -3069,16 +3069,16 @@ void LilliputScript::sub18BE6(byte var1, int var2, int var4) { } void LilliputScript::OC_displayVGAFile() { - debugC(1, kDebugScriptTBC, "OC_displayVGAFile()"); + debugC(1, kDebugScript, "OC_displayVGAFile()"); _byte12A09 = 1; - OC_PaletteFadeOut(); + _vm->paletteFadeOut(); int curWord = _currScript->readUint16LE(); - int index = _vm->_rulesChunk3[curWord]; - Common::String fileName = Common::String((const char *)&_vm->_rulesChunk4[index]); - _word1881B = 0xFFFF; + int index = _vm->_packedStringIndex[curWord]; + Common::String fileName = Common::String((const char *)&_vm->_packedStrings[index]); + _word1881B = -1; _vm->displayVGAFile(fileName); - OC_PaletteFadeIn(); + _vm->paletteFadeIn(); } void LilliputScript::OC_sub184D7() { diff --git a/engines/lilliput/script.h b/engines/lilliput/script.h index 6699bb61b8..07db0a9020 100644 --- a/engines/lilliput/script.h +++ b/engines/lilliput/script.h @@ -130,7 +130,7 @@ private: void sub16C86(int index, byte *buf); void sub16C5C(int index, byte var3); void sub17D40(bool &forceReturnFl); - void sub18A56(byte *buf); + void decodePackedText(char *buf); void sub18B3C(int var); void sub18BE6(byte var1, int var2, int var4); byte *getMapPtr(Common::Point val); |