diff options
author | Strangerke | 2012-05-11 20:47:17 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-28 17:36:57 +0200 |
commit | 72b99e99e46a3f7b69e3894ba6a552204f069638 (patch) | |
tree | bd975386964d8feebde7ab2a2147369dbb793ccd /engines/lilliput | |
parent | 056541c5d98107dcd23202b6c8a262b9682936c0 (diff) | |
download | scummvm-rg350-72b99e99e46a3f7b69e3894ba6a552204f069638.tar.gz scummvm-rg350-72b99e99e46a3f7b69e3894ba6a552204f069638.tar.bz2 scummvm-rg350-72b99e99e46a3f7b69e3894ba6a552204f069638.zip |
LILLIPUT: Some more renaming
Diffstat (limited to 'engines/lilliput')
-rw-r--r-- | engines/lilliput/lilliput.cpp | 13 | ||||
-rw-r--r-- | engines/lilliput/lilliput.h | 2 | ||||
-rw-r--r-- | engines/lilliput/script.cpp | 37 | ||||
-rw-r--r-- | engines/lilliput/script.h | 6 |
4 files changed, 29 insertions, 29 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp index dee248197e..b9e5ded185 100644 --- a/engines/lilliput/lilliput.cpp +++ b/engines/lilliput/lilliput.cpp @@ -609,7 +609,7 @@ void LilliputEngine::displayFunction12() { saveSurfaceSpeech(); displayInterfaceHotspots(); displayLandscape(); - displayFunction15(); + prepareGameArea(); displayGameArea(); displayMousePointer(); @@ -762,8 +762,8 @@ void LilliputEngine::setNextDisplayCharacter(int var1) { } } -void LilliputEngine::displayFunction15() { - debugC(2, kDebugEngineTBC, "displayFunction15()"); +void LilliputEngine::prepareGameArea() { + debugC(2, kDebugEngineTBC, "prepareGameArea()"); moveCharacters(); _currentDisplayCharacter = 0; @@ -816,7 +816,7 @@ void LilliputEngine::displayFunction16() { } else { scrollToViewportCharacterTarget(); sub189DE(); - displayFunction15(); + prepareGameArea(); displayGameArea(); sub16626(); sub12F37(); @@ -1211,11 +1211,10 @@ void LilliputEngine::sortCharacters() { } } -// Move view port to x/y void LilliputEngine::scrollToViewportCharacterTarget() { debugC(2, kDebugEngineTBC, "scrollToViewportCharacterTarget()"); - if (_scriptHandler->_viewportCharacterTarget == 0xFFFF) + if (_scriptHandler->_viewportCharacterTarget == -1) return; int var2 = (_characterPositionX[_scriptHandler->_viewportCharacterTarget] >> 3) - _scriptHandler->_viewportPos.x; @@ -1276,7 +1275,7 @@ void LilliputEngine::viewportScrollTo(Common::Point goalPos) { _scriptHandler->_viewportPos.y += dy; displayLandscape(); - displayFunction15(); + prepareGameArea(); displayGameArea(); if (goalPos.x == _scriptHandler->_viewportPos.x) diff --git a/engines/lilliput/lilliput.h b/engines/lilliput/lilliput.h index c107965422..efdbdbe6d7 100644 --- a/engines/lilliput/lilliput.h +++ b/engines/lilliput/lilliput.h @@ -233,7 +233,7 @@ public: void displayFunction12(); void displayIsometricBlock(byte *buf, int var1, int var2, int var3); void displayGameArea(); - void displayFunction15(); + void prepareGameArea(); void displayFunction16(); void restoreSurfaceSpeech(); void displayFunction18(int var1, int var2, int var3, int var4); diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp index 471484ef1f..74171e3641 100644 --- a/engines/lilliput/script.cpp +++ b/engines/lilliput/script.cpp @@ -233,7 +233,7 @@ byte LilliputScript::handleOpcodeType1(int curWord) { return OC_sub17A07(); break; case 0x31: - return OC_sub17757(); + return OC_checkViewPortCharacterTarget(); break; default: error("Unexpected opcode %d", curWord); @@ -422,10 +422,10 @@ void LilliputScript::handleOpcodeType2(int curWord) { OC_sub180C3(); break; case 0x3B: - OC_sub1810A(); + OC_setViewPortPos(); break; case 0x3C: - OC_sub1812D(); + OC_setCurrentCharacterAltitude(); break; case 0x3D: OC_sub1817F(); @@ -606,7 +606,7 @@ static const OpCode opCodes1[] = { { "OC_sub179C2", 1, kgetPosFromScript, kNone, kNone, kNone, kNone }, { "OC_sub179E5", 1, kImmediateValue, kNone, kNone, kNone, kNone }, { "OC_sub17A07", 3, kImmediateValue, kImmediateValue, kImmediateValue, kNone, kNone }, - { "OC_sub17757", 1, kGetValue1, kNone, kNone, kNone, kNone }, + { "OC_checkViewPortCharacterTarget", 1, kGetValue1, kNone, kNone, kNone, kNone }, }; @@ -670,8 +670,8 @@ static const OpCode opCodes2[] = { /* 0x38 */ { "OC_setCurrentCharacterDirection", 1, kImmediateValue, kNone, kNone, kNone, kNone }, /* 0x39 */ { "OC_sub18099", 2, kImmediateValue, kImmediateValue, kNone, kNone, kNone }, /* 0x3a */ { "OC_sub180C3", 1, kImmediateValue, kNone, kNone, kNone, kNone }, -/* 0x3b */ { "OC_sub1810A", 1, kgetPosFromScript, kNone, kNone, kNone, kNone }, -/* 0x3c */ { "OC_sub1812D", 1, kImmediateValue, kNone, kNone, kNone, kNone }, +/* 0x3b */ { "OC_setViewPortPos", 1, kgetPosFromScript, kNone, kNone, kNone, kNone }, +/* 0x3c */ { "OC_setCurrentCharacterAltitude", 1, kImmediateValue, kNone, kNone, kNone, kNone }, /* 0x3d */ { "OC_sub1817F", 2, kImmediateValue, kImmediateValue, kNone, kNone, kNone }, /* 0x3e */ { "OC_sub181BB", 4, kImmediateValue, kImmediateValue, kImmediateValue, kImmediateValue, kNone }, /* 0x3f */ { "OC_sub18213", 1, kImmediateValue, kNone, kNone, kNone, kNone }, @@ -2056,11 +2056,11 @@ byte LilliputScript::OC_sub17A07() { return 0; } -byte LilliputScript::OC_sub17757() { - debugC(1, kDebugScriptTBC, "OC_sub17757()"); +byte LilliputScript::OC_checkViewPortCharacterTarget() { + debugC(1, kDebugScript, "OC_checkViewPortCharacterTarget()"); int var1 = getValue1(); - if ( var1 == _viewportCharacterTarget ) + if (var1 == _viewportCharacterTarget) return 1; return 0; @@ -2247,7 +2247,7 @@ void LilliputScript::OC_sub17A8D() { assert(tmpVal < 40); if (tmpVal == _vm->_word10804) - _viewportCharacterTarget = 0xFFFF; + _viewportCharacterTarget = -1; _vm->_characterPositionX[tmpVal] = -1; _vm->_characterPositionY[tmpVal] = -1; @@ -2742,7 +2742,8 @@ void LilliputScript::OC_sub18099() { void LilliputScript::OC_sub180C3() { debugC(1, kDebugScriptTBC, "OC_sub180C3()"); - _viewportCharacterTarget = 0xFFFF; + + _viewportCharacterTarget = -1; int var1 = _currScript->readUint16LE(); @@ -2769,18 +2770,18 @@ void LilliputScript::OC_sub180C3() { _byte12A09 = 0; } -void LilliputScript::OC_sub1810A() { - debugC(1, kDebugScriptTBC, "OC_sub1810A()"); +void LilliputScript::OC_setViewPortPos() { + debugC(1, kDebugScript, "OC_setViewPortPos()"); - _viewportCharacterTarget = 0xFFFF; + _viewportCharacterTarget = -1; _viewportPos = getPosFromScript(); _vm->displayLandscape(); - _vm->displayFunction15(); + _vm->prepareGameArea(); } -void LilliputScript::OC_sub1812D() { - debugC(1, kDebugScriptTBC, "OC_sub1812D()"); +void LilliputScript::OC_setCurrentCharacterAltitude() { + debugC(1, kDebugScript, "OC_setCurrentCharacterAltitude()"); _vm->_characterPositionAltitude[_vm->_currentScriptCharacter] = (_currScript->readUint16LE() & 0xFF); } @@ -2914,7 +2915,7 @@ void LilliputScript::OC_loadAndDisplayCUBESx_GFX() { _vm->_bufferCubegfx = _vm->loadVGA(fileName, 61440, false); _vm->displayLandscape(); - _vm->displayFunction15(); + _vm->prepareGameArea(); } void LilliputScript::OC_sub1834C() { diff --git a/engines/lilliput/script.h b/engines/lilliput/script.h index a8875f4e4e..bae66cca7a 100644 --- a/engines/lilliput/script.h +++ b/engines/lilliput/script.h @@ -194,7 +194,7 @@ private: byte OC_sub179C2(); byte OC_sub179E5(); byte OC_sub17A07(); - byte OC_sub17757(); + byte OC_checkViewPortCharacterTarget(); // Opcodes Type 2 void OC_setWord18821(); @@ -256,8 +256,8 @@ private: void OC_setCurrentCharacterDirection(); void OC_sub18099(); void OC_sub180C3(); - void OC_sub1810A(); - void OC_sub1812D(); + void OC_setViewPortPos(); + void OC_setCurrentCharacterAltitude(); void OC_sub1817F(); void sub1818B(Common::Point pos); void OC_sub181BB(); |