aboutsummaryrefslogtreecommitdiff
path: root/engines/lilliput
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lilliput')
-rw-r--r--engines/lilliput/lilliput.cpp40
-rw-r--r--engines/lilliput/lilliput.h12
-rw-r--r--engines/lilliput/script.cpp101
-rw-r--r--engines/lilliput/script.h8
4 files changed, 79 insertions, 82 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp
index 687b3571dd..03ee6827e8 100644
--- a/engines/lilliput/lilliput.cpp
+++ b/engines/lilliput/lilliput.cpp
@@ -128,7 +128,7 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd)
_skipDisplayFlag2 = 0;
_displayMap = false;
_debugFlag = 0;
- _byte14837 = 0;
+ _debugFlag2 = 0;
_scriptHandler = new LilliputScript(this);
_soundHandler = new LilliputSound(this);
@@ -163,10 +163,10 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd)
_saveFlag = true;
_actionType = kActionNone;
- _array16C54[0] = _array16C58[3] = 1;
- _array16C54[1] = _array16C58[2] = 2;
- _array16C54[2] = _array16C58[1] = 4;
- _array16C54[3] = _array16C58[0] = 8;
+ _doorEntranceMask[0] = _doorExitMask[3] = 1;
+ _doorEntranceMask[1] = _doorExitMask[2] = 2;
+ _doorEntranceMask[2] = _doorExitMask[1] = 4;
+ _doorEntranceMask[3] = _doorExitMask[0] = 8;
for (int i = 0; i < 3; i++)
_codeEntered[i] = 0;
@@ -876,8 +876,8 @@ int16 LilliputEngine::checkObstacle(int x1, int y1, int x2, int y2) {
return tmpMapMoveY;
}
-void LilliputEngine::sub15F75() {
- debugC(2, kDebugEngineTBC, "sub15F75()");
+void LilliputEngine::startNavigateFromMap() {
+ debugC(2, kDebugEngine, "startNavigateFromMap()");
_selectedCharacterId = -1;
_savedMousePosDivided = Common::Point(-1, -1);
@@ -915,7 +915,7 @@ void LilliputEngine::checkMapClosing(bool &forceReturnFl) {
return;
_mouseButton = 0;
- sub15F75();
+ startNavigateFromMap();
}
_displayMap = false;
@@ -1458,7 +1458,7 @@ void LilliputEngine::sub1693A_chooseDirections(int index) {
for (int i = 3; i >= 0; 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] & _doorEntranceMask[i]) != 0) && ((_bufferIsoMap[mapIndex + 3] & _doorExitMask[i]) != 0)) {
if ((_bufferIsoMap[mapIndex + mapIndexDiff + 3] & 0x80) != 0 && (sub16A76(i, index) != 0)) {
_array1692B[i] -= 20;
}
@@ -2109,29 +2109,29 @@ void LilliputEngine::moveCharacterDown2(int index) {
void LilliputEngine::moveCharacterSpeed2(int index) {
debugC(2, kDebugEngine, "moveCharacterSpeed2(%d)", index);
- sub16B31_moveCharacter(index, 2);
+ moveCharacterForward(index, 2);
}
void LilliputEngine::moveCharacterSpeed4(int index) {
debugC(2, kDebugEngine, "moveCharacterSpeed4(%d)", index);
- sub16B31_moveCharacter(index, 4);
+ moveCharacterForward(index, 4);
}
void LilliputEngine::moveCharacterBack2(int index) {
debugC(2, kDebugEngine, "moveCharacterBack2(%d)", index);
- sub16B31_moveCharacter(index, -2);
+ moveCharacterForward(index, -2);
}
void LilliputEngine::moveCharacterSpeed3(int index) {
debugC(2, kDebugEngine, "moveCharacterSpeed3(%d)", index);
- sub16B31_moveCharacter(index, 3);
+ moveCharacterForward(index, 3);
}
-void LilliputEngine::sub16B31_moveCharacter(int index, int16 speed) {
- debugC(2, kDebugEngine, "sub16B31_moveCharacter(%d, %d)", index, speed);
+void LilliputEngine::moveCharacterForward(int index, int16 speed) {
+ debugC(2, kDebugEngine, "moveCharacterForward(%d, %d)", index, speed);
int16 newX = _characterPositionX[index];
int16 newY = _characterPositionY[index];
@@ -2149,11 +2149,11 @@ void LilliputEngine::sub16B31_moveCharacter(int index, int16 speed) {
newX -= speed;
break;
}
- sub16B8F_moveCharacter(index, Common::Point(newX, newY), _characterDirectionArray[index]);
+ checkCollision(index, Common::Point(newX, newY), _characterDirectionArray[index]);
}
-void LilliputEngine::sub16B8F_moveCharacter(int index, Common::Point pos, int direction) {
- debugC(2, kDebugEngine, "sub16B8F_moveCharacter(%d, %d - %d, %d)", index, pos.x, pos.y, direction);
+void LilliputEngine::checkCollision(int index, Common::Point pos, int direction) {
+ debugC(2, kDebugEngine, "checkCollision(%d, %d - %d, %d)", index, pos.x, pos.y, direction);
int16 diffX = pos.x >> 3;
if (((diffX & 0xFF) == _scriptHandler->_characterTilePos[index].x) && ((pos.y >> 3) == _scriptHandler->_characterTilePos[index].y)) {
@@ -2168,13 +2168,13 @@ void LilliputEngine::sub16B8F_moveCharacter(int index, Common::Point pos, int di
int mapIndex = (_scriptHandler->_characterTilePos[index].y * 64 + _scriptHandler->_characterTilePos[index].x) * 4;
assert(mapIndex < 16384);
- if ((_bufferIsoMap[mapIndex + 3] & _array16C58[direction]) == 0)
+ if ((_bufferIsoMap[mapIndex + 3] & _doorExitMask[direction]) == 0)
return;
mapIndex = ((pos.y & 0xFFF8) << 3) + diffX;
mapIndex <<= 2;
- if ((_bufferIsoMap[mapIndex + 3] & _array16C54[direction]) == 0)
+ if ((_bufferIsoMap[mapIndex + 3] & _doorEntranceMask[direction]) == 0)
return;
byte var1 = _characterMobility[index];
diff --git a/engines/lilliput/lilliput.h b/engines/lilliput/lilliput.h
index cbef154089..462936b24f 100644
--- a/engines/lilliput/lilliput.h
+++ b/engines/lilliput/lilliput.h
@@ -125,7 +125,7 @@ public:
int8 _lastInterfaceHotspotIndex;
byte _lastInterfaceHotspotButton; // Unused: set by 2 functions, but never used elsewhere
byte _debugFlag; // Mostly useless, as the associated functions are empty
- byte _byte14837; // Unused byte, set by an opcode
+ byte _debugFlag2; // Unused byte, set by an opcode
byte _codeEntered[3];
char _array1692B[4];
@@ -219,8 +219,8 @@ public:
int16 _characterSubTargetPosX[40];
int16 _characterSubTargetPosY[40];
byte _specialCubes[40];
- byte _array16C54[4];
- byte _array16C58[4];
+ byte _doorEntranceMask[4];
+ byte _doorExitMask[4];
byte _savedSurfaceGameArea1[176 * 256]; // 45056
byte _savedSurfaceGameArea2[176 * 256]; // 45056
byte _savedSurfaceGameArea3[176 * 256]; // 45056
@@ -256,7 +256,7 @@ public:
void displaySmallIndexedAnim(byte index, byte subIndex);
void unselectInterfaceHotspots();
- void sub15F75();
+ void startNavigateFromMap();
void resetSmallAnims();
void paletteFadeOut();
void paletteFadeIn();
@@ -316,8 +316,8 @@ public:
void moveCharacterSpeed4(int index);
void moveCharacterBack2(int index);
void moveCharacterSpeed3(int index);
- void sub16B31_moveCharacter(int index, int16 speed);
- void sub16B8F_moveCharacter(int index, Common::Point pos, int direction);
+ void moveCharacterForward(int index, int16 speed);
+ void checkCollision(int index, Common::Point pos, int direction);
byte sequenceSeekMovingCharacter(int index, Common::Point var1);
byte sequenceSound(int index, Common::Point var1);
byte sequenceRepeat(int index, Common::Point var1, int tmpVal);
diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp
index b49ee08953..ab2debf5e2 100644
--- a/engines/lilliput/script.cpp
+++ b/engines/lilliput/script.cpp
@@ -431,16 +431,16 @@ void LilliputScript::handleOpcodeType2(int curWord) {
OC_setModePriority();
break;
case 0x3E:
- OC_sub181BB();
+ OC_setComputedModePriority();
break;
case 0x3F:
- OC_sub18213();
+ OC_selectBestMode();
break;
case 0x40:
OC_magicPuffEntrance();
break;
case 0x41:
- OC_sub18260();
+ OC_spawnCharacterAtPos();
break;
case 0x42:
OC_CharacterVariableAddOrRemoveFlag();
@@ -473,7 +473,7 @@ void LilliputScript::handleOpcodeType2(int curWord) {
OC_setDebugFlag();
break;
case 0x4C:
- OC_setByte14837();
+ OC_setDebugFlag2();
break;
case 0x4D:
OC_waitForEvent();
@@ -673,10 +673,10 @@ static const OpCode opCodes2[] = {
/* 0x3b */ { "OC_setViewPortPos", 1, kgetPosFromScript, kNone, kNone, kNone, kNone },
/* 0x3c */ { "OC_setCurrentCharacterAltitude", 1, kImmediateValue, kNone, kNone, kNone, kNone },
/* 0x3d */ { "OC_setModePriority", 2, kImmediateValue, kImmediateValue, kNone, kNone, kNone },
-/* 0x3e */ { "OC_sub181BB", 4, kImmediateValue, kImmediateValue, kImmediateValue, kImmediateValue, kNone },
-/* 0x3f */ { "OC_sub18213", 1, kImmediateValue, kNone, kNone, kNone, kNone },
+/* 0x3e */ { "OC_setComputedModePriority", 4, kImmediateValue, kImmediateValue, kImmediateValue, kImmediateValue, kNone },
+/* 0x3f */ { "OC_selectBestMode", 1, kImmediateValue, kNone, kNone, kNone, kNone },
/* 0x40 */ { "OC_magicPuffEntrance", 1, kGetValue1, kNone, kNone, kNone, kNone },
-/* 0x41 */ { "OC_sub18260", 2, kGetValue1, kgetPosFromScript, kNone, kNone, kNone }, // TODO
+/* 0x41 */ { "OC_spawnCharacterAtPos", 2, kGetValue1, kgetPosFromScript, kNone, kNone, kNone }, // TODO
/* 0x42 */ { "OC_characterVariableAddOrRemoveFlag", 4, kGetValue1, kImmediateValue, kImmediateValue, kImmediateValue, kNone },
/* 0x43 */ { "OC_paletteFadeOut", 0, kNone, kNone, kNone, kNone, kNone },
/* 0x44 */ { "OC_paletteFadeIn", 0, kNone, kNone, kNone, kNone, kNone },
@@ -687,7 +687,7 @@ static const OpCode opCodes2[] = {
/* 0x49 */ { "OC_enableCharacterScript", 2, kGetValue1, kImmediateValue, kNone, kNone, kNone },
/* 0x4a */ { "OC_setRulesBuffer2Element", 2, kGetValue1, kImmediateValue, kNone, kNone, kNone },
/* 0x4b */ { "OC_setDebugFlag", 0, kNone, kNone, kNone, kNone, kNone },
-/* 0x4c */ { "OC_setByte14837", 0, kNone, kNone, kNone, kNone, kNone },
+/* 0x4c */ { "OC_setDebugFlag2", 0, kNone, kNone, kNone, kNone, kNone },
/* 0x4d */ { "OC_waitForEvent", 0, kNone, kNone, kNone, kNone, kNone },
/* 0x4e */ { "OC_disableInterfaceHotspot", 2, kImmediateValue, kImmediateValue, kNone, kNone, kNone }, // TODO
/* 0x4f */ { "OC_loadFileAerial", 1, kNone, kNone, kNone, kNone, kNone },
@@ -931,7 +931,7 @@ void LilliputScript::runScript(ScriptStream script) {
}
void LilliputScript::runMenuScript(ScriptStream script) {
- debugC(1, kDebugScriptTBC, "runMenuScript");
+ debugC(1, kDebugScript, "runMenuScript");
_byte16F05_ScriptHandler = 0;
@@ -1231,7 +1231,7 @@ void LilliputScript::listAllTexts() {
}
} else {*/
decodePackedText(&_vm->_packedStrings[index + variantCount]);
- debugC(1, kDebugScriptTBC, "Text 0x%x variant 0 : %s", i, _vm->_displayStringBuf);
+ debugC(1, kDebugScript, "Text 0x%x variant 0 : %s", i, _vm->_displayStringBuf);
/* }*/
}
}
@@ -1448,7 +1448,7 @@ byte LilliputScript::OC_for() {
}
byte LilliputScript::OC_compCurrentSpeechId() {
- debugC(1, kDebugScriptTBC, "OC_compCurrentSpeechId()");
+ debugC(1, kDebugScript, "OC_compCurrentSpeechId()");
int var1 = _currScript->readUint16LE();
@@ -1468,7 +1468,7 @@ byte LilliputScript::OC_checkSaveFlag() {
}
byte LilliputScript::OC_compScriptForVal() {
- debugC(1, kDebugScriptTBC, "OC_compScriptForVal()");
+ debugC(1, kDebugScript, "OC_compScriptForVal()");
uint16 oper = _currScript->readUint16LE();
int16 var2 = _currScript->readUint16LE();
@@ -1571,7 +1571,7 @@ byte LilliputScript::OC_CompareDistanceFromCharacterToPositionWith() {
}
byte LilliputScript::OC_compareRandomCharacterId() {
- debugC(1, kDebugScriptTBC, "OC_compareRandomCharacterId()");
+ debugC(1, kDebugScript, "OC_compareRandomCharacterId()");
byte *tmpArr = getCharacterAttributesPtr();
_lastRandomValue = _vm->_rnd->getRandomNumber(tmpArr[0] + 1);
@@ -1889,7 +1889,7 @@ byte LilliputScript::OC_CompareGameVariables() {
}
byte LilliputScript::OC_skipNextOpcode() {
- debugC(1, kDebugScriptTBC, "OC_skipNextOpcode()");
+ debugC(1, kDebugScript, "OC_skipNextOpcode()");
_currScript->readUint16LE();
return 1;
@@ -2032,7 +2032,7 @@ byte LilliputScript::OC_checkDelayedReactivation() {
}
byte LilliputScript::OC_checkTargetReached() {
- debugC(1, kDebugScriptTBC, "OC_checkTargetReached()");
+ debugC(1, kDebugScript, "OC_checkTargetReached()");
Common::Point var1 = getPosFromScript();
if ((_vm->_characterTargetPosX[_vm->_currentScriptCharacter] == var1.x)
@@ -2101,7 +2101,7 @@ void LilliputScript::OC_setWord18821() {
}
void LilliputScript::OC_ChangeIsoMap() {
- debugC(1, kDebugScriptTBC, "OC_ChangeIsoMap()");
+ debugC(1, kDebugScript, "OC_ChangeIsoMap()");
Common::Point var1 = getPosFromScript();
int var2 = _currScript->readUint16LE();
@@ -2168,7 +2168,7 @@ void LilliputScript::getSpeechVariant(int speechIndex, int speechVariant) {
}
void LilliputScript::OC_getComputedVariantSpeech() {
- debugC(1, kDebugScriptTBC, "OC_getComputedVariantSpeech()");
+ debugC(1, kDebugScript, "OC_getComputedVariantSpeech()");
int tmpVal1 = getCharacterAttributesPtr()[0];
int tmpVal2 = (_currScript->readUint16LE() & 0xFF);
@@ -2220,7 +2220,7 @@ void LilliputScript::OC_startSpeechIfMute() {
}
void LilliputScript::OC_getComputedVariantSpeechIfMute() {
- debugC(1, kDebugScriptTBC, "OC_getComputedVariantSpeechIfMute()");
+ debugC(1, kDebugScript, "OC_getComputedVariantSpeechIfMute()");
if (_talkingCharacter == -1) {
OC_getComputedVariantSpeech();
@@ -2305,7 +2305,7 @@ void LilliputScript::OC_nSkipOpcodes() {
}
void LilliputScript::OC_startSpeech5() {
- debugC(1, kDebugScriptTBC, "OC_startSpeech5()");
+ debugC(1, kDebugScript, "OC_startSpeech5()");
bool forceReturnFl = false;
checkSpeechAllowed(forceReturnFl);
@@ -2317,18 +2317,18 @@ void LilliputScript::OC_startSpeech5() {
}
void LilliputScript::OC_resetHandleOpcodeFlag() {
- debugC(1, kDebugScriptTBC, "OC_resetHandleOpcodeFlag()");
+ debugC(1, kDebugScript, "OC_resetHandleOpcodeFlag()");
_vm->_handleOpcodeReturnCode = 0;
}
void LilliputScript::OC_deleteSavegameAndQuit() {
- warning("OC_deleteSavegameAndQuit");
+ warning("TODO: OC_deleteSavegameAndQuit");
_vm->_shouldQuit = true;
}
void LilliputScript::OC_incScriptForVal() {
- debugC(1, kDebugScriptTBC, "OC_incScriptForVal()");
+ debugC(1, kDebugScript, "OC_incScriptForVal()");
++_scriptForVal;
}
@@ -2343,7 +2343,7 @@ void LilliputScript::OC_computeChararacterAttr() {
}
void LilliputScript::OC_setTextVarNumber() {
- debugC(1, kDebugScriptTBC, "OC_setTextVarNumber()");
+ debugC(1, kDebugScript, "OC_setTextVarNumber()");
byte *tmpArr = getCharacterAttributesPtr();
_textVarNumber = *tmpArr;
@@ -2353,7 +2353,6 @@ void LilliputScript::OC_callScript() {
debugC(1, kDebugScript, "OC_callScript()");
int index = _currScript->readUint16LE();
-
int charIndex = getValue1();
_vm->setCurrentCharacter(charIndex);
@@ -2395,7 +2394,7 @@ void LilliputScript::OC_setCurrentScriptCharacterPos() {
}
void LilliputScript::OC_initScriptFor() {
- debugC(1, kDebugScriptTBC, "OC_initScriptFor()");
+ debugC(1, kDebugScript, "OC_initScriptFor()");
_scriptForVal = 0;
}
@@ -2451,8 +2450,6 @@ void LilliputScript::OC_setCharacterCarry() {
_vm->_characterCarried[index] = carriedIdx;
_vm->_characterBehindDist[index] = distBehind;
_vm->_characterAboveDist[index] = distAbove;
-
- warning("debug - OC_setCharacterCarry index %d, var1 0x%x var3 0x%x var4 0x%x", index, carriedIdx, distBehind, distAbove);
}
void LilliputScript::OC_dropCarried() {
@@ -2506,10 +2503,10 @@ void LilliputScript::OC_sendHearSignal() {
}
void LilliputScript::OC_sendVarSignal() {
- debugC(1, kDebugScriptTBC, "OC_sendVarSignal()");
+ debugC(1, kDebugScript, "OC_sendVarSignal()");
int16 var4 = _currScript->readSint16LE();
- int16 type = getValue1(); // CHECKME- dubious
+ int16 type = getValue1();
byte var2h = (_currScript->readUint16LE() & 0xFF);
sendSignal(type, var2h, _vm->_currentScriptCharacter, var4);
@@ -2558,7 +2555,7 @@ void LilliputScript::OC_setCurrentCharacterPos() {
}
void LilliputScript::OC_setCurrentCharacterBehavior() {
- debugC(1, kDebugScriptTBC, "OC_setCurrentCharacterBehavior()");
+ debugC(1, kDebugScript, "OC_setCurrentCharacterBehavior()");
uint16 var1 = _currScript->readUint16LE();
_vm->_characterBehaviour[_vm->_currentScriptCharacter] = (var1 - 2000) & 0xFF;
@@ -2687,7 +2684,7 @@ void LilliputScript::OC_scrollAwayFromCharacter() {
}
void LilliputScript::OC_skipNextVal() {
- debugC(1, kDebugScriptTBC, "OC_skipNextVal()");
+ debugC(1, kDebugScript, "OC_skipNextVal()");
_currScript->readUint16LE();
}
@@ -2750,7 +2747,7 @@ void LilliputScript::OC_setCharacterProperties() {
}
void LilliputScript::OC_setMonitoredCharacter() {
- debugC(1, kDebugScriptTBC, "OC_setMonitoredCharacter()");
+ debugC(1, kDebugScript, "OC_setMonitoredCharacter()");
_monitoredCharacter = getValue1();
for (int i = 0; i < 4; i++)
@@ -2758,7 +2755,7 @@ void LilliputScript::OC_setMonitoredCharacter() {
}
void LilliputScript::OC_setNewPose() {
- debugC(1, kDebugScriptTBC, "OC_setNewPose()");
+ debugC(1, kDebugScript, "OC_setNewPose()");
int var2 = _currScript->readUint16LE();
byte var1 = (_currScript->readUint16LE() & 0xFF);
@@ -2850,8 +2847,8 @@ void LilliputScript::setMode(EvaluatedMode newMode) {
++_vm->_newModesEvaluatedNumber;
}
-void LilliputScript::OC_sub181BB() {
- debugC(1, kDebugScript, "OC_sub181BB()");
+void LilliputScript::OC_setComputedModePriority() {
+ debugC(1, kDebugScript, "OC_setComputedModePriority()");
int8 mode = (int8)(_currScript->readUint16LE() & 0xFF);
byte oper = _currScript->readUint16LE() & 0xFF;
@@ -2877,11 +2874,11 @@ void LilliputScript::OC_sub181BB() {
case '+':
break;
default:
- warning("OC_sub181BB: skipped oper %c", oper);
+ warning("OC_setComputedModePriority: skipped oper %c", oper);
break;
}
if (c > 0xFF)
- warning("OC_sub181BB- Abnormal value c = %d, should put back c &= 0xFF;", c);
+ warning("OC_setComputedModePriority- Abnormal value c = %d, should put back c &= 0xFF;", c);
int priority = (_currScript->readSint16LE() * c) + c;
priority >>= 8;
@@ -2893,8 +2890,8 @@ void LilliputScript::OC_sub181BB() {
setMode(newMode);
}
-void LilliputScript::OC_sub18213() {
- debugC(1, kDebugScript, "OC_sub18213()");
+void LilliputScript::OC_selectBestMode() {
+ debugC(1, kDebugScript, "OC_selectBestMode()");
uint16 var1 = _currScript->readUint16LE();
@@ -2919,8 +2916,8 @@ void LilliputScript::OC_magicPuffEntrance() {
_vm->_characterMagicPuffFrame[index] = 4;
}
-void LilliputScript::OC_sub18260() {
- debugC(1, kDebugScriptTBC, "OC_sub18260()");
+void LilliputScript::OC_spawnCharacterAtPos() {
+ debugC(1, kDebugScript, "OC_spawnCharacterAtPos()");
int index = getValue1();
Common::Point var4 = getPosFromScript();
@@ -3041,19 +3038,19 @@ void LilliputScript::OC_setRulesBuffer2Element() {
}
void LilliputScript::OC_setDebugFlag() {
- debugC(1, kDebugScriptTBC, "OC_setDebugFlag()");
+ debugC(1, kDebugScript, "OC_setDebugFlag()");
_vm->_debugFlag = 1;
}
-void LilliputScript::OC_setByte14837() {
- debugC(1, kDebugScriptTBC, "OC_setByte14837()");
+void LilliputScript::OC_setDebugFlag2() {
+ debugC(1, kDebugScript, "OC_setDebugFlag2()");
- _vm->_byte14837 = 1;
+ _vm->_debugFlag2 = 1;
}
void LilliputScript::OC_waitForEvent() {
- debugC(1, kDebugScriptTBC, "OC_waitForEvent()");
+ debugC(1, kDebugScript, "OC_waitForEvent()");
_vm->_refreshScreenFlag = true;
while (true) {
@@ -3105,7 +3102,7 @@ void LilliputScript::OC_loadFileAerial() {
}
void LilliputScript::OC_startSpeechIfSoundOff() {
- debugC(1, kDebugScriptTBC, "OC_startSpeechIfSoundOff()");
+ debugC(1, kDebugScript, "OC_startSpeechIfSoundOff()");
// HACK: In the original, OC_startSpeechIfSoundOff() only calls
// OC_startSpeech if sound is off. For the moment, it's always called
@@ -3260,7 +3257,7 @@ void LilliputScript::OC_setCharacterHeroismBar() {
}
void LilliputScript::OC_setCharacterHome() {
- debugC(1, kDebugScriptTBC, "OC_setCharacterHome()");
+ debugC(1, kDebugScript, "OC_setCharacterHome()");
int index = getValue1();
Common::Point pos = getPosFromScript();
@@ -3275,16 +3272,16 @@ void LilliputScript::OC_setViewPortCharacterTarget() {
}
void LilliputScript::OC_showObject() {
- debugC(1, kDebugScriptTBC, "OC_showObject()");
+ debugC(1, kDebugScript, "OC_showObject()");
- int var1 = getValue1();
+ int frameIdx = getValue1();
int posX = _currScript->readUint16LE();
int posY = _currScript->readUint16LE();
Common::Point pos = Common::Point(posX, posY);
_vm->fill16x16Rect(16, pos);
- int frame = _vm->_characterFrameArray[var1];
+ int frame = _vm->_characterFrameArray[frameIdx];
byte* buf = _vm->_bufferMen;
if (frame > 240) {
@@ -3334,7 +3331,7 @@ void LilliputScript::OC_stopLocationSound() {
}
void LilliputScript::OC_toggleSound() {
- debugC(1, kDebugScriptTBC, "OC_toggleSound()");
+ debugC(1, kDebugScript, "OC_toggleSound()");
_vm->_soundHandler->contentFct4();
}
diff --git a/engines/lilliput/script.h b/engines/lilliput/script.h
index ab94fd0239..c711ceb901 100644
--- a/engines/lilliput/script.h
+++ b/engines/lilliput/script.h
@@ -269,10 +269,10 @@ private:
void OC_setCurrentCharacterAltitude();
void OC_setModePriority();
void setMode(EvaluatedMode newMode);
- void OC_sub181BB();
- void OC_sub18213();
+ void OC_setComputedModePriority();
+ void OC_selectBestMode();
void OC_magicPuffEntrance();
- void OC_sub18260();
+ void OC_spawnCharacterAtPos();
void OC_CharacterVariableAddOrRemoveFlag();
void OC_PaletteFadeOut();
void OC_PaletteFadeIn();
@@ -283,7 +283,7 @@ private:
void OC_enableCharacterScript();
void OC_setRulesBuffer2Element();
void OC_setDebugFlag();
- void OC_setByte14837();
+ void OC_setDebugFlag2();
void OC_waitForEvent();
void OC_disableInterfaceHotspot();
void OC_loadFileAerial();