aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2018-03-24 02:15:54 +0100
committerEugene Sandulenko2018-03-28 17:36:57 +0200
commitfedbb3d7fefaa5177b191c90341a8c80037d3dee (patch)
tree8028129ff245e5b097a9605b4af488194b72710b /engines
parent2ea8d71a5a45a885bd0026ea291a49d7850294e4 (diff)
downloadscummvm-rg350-fedbb3d7fefaa5177b191c90341a8c80037d3dee.tar.gz
scummvm-rg350-fedbb3d7fefaa5177b191c90341a8c80037d3dee.tar.bz2
scummvm-rg350-fedbb3d7fefaa5177b191c90341a8c80037d3dee.zip
LILLIPUT: Rename some more opcodes
Diffstat (limited to 'engines')
-rw-r--r--engines/lilliput/lilliput.cpp10
-rw-r--r--engines/lilliput/lilliput.h2
-rw-r--r--engines/lilliput/script.cpp58
-rw-r--r--engines/lilliput/script.h8
4 files changed, 39 insertions, 39 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp
index e475a34f03..663bda43fa 100644
--- a/engines/lilliput/lilliput.cpp
+++ b/engines/lilliput/lilliput.cpp
@@ -210,7 +210,7 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd)
}
for (int i = 0; i < 30; i++)
- _array12861[i] = -1;
+ _signalArray[i] = -1;
for (int i = 0; i < 256; i++)
_savedSurfaceUnderMouse[i] = 0;
@@ -2249,10 +2249,10 @@ void LilliputEngine::sub171CF() {
++_word1289D;
for (int i = 0; i < 10; i++) {
- if ((_array12861[(3 * i) + 1] != -1) && (_array12861[3 * i] == _word1289D)) {
- int16 var1 = _array12861[(3 * i) + 1];
- int var4 = _array12861[(3 * i) + 2];
- _array12861[(3 * i) + 1] = -1;
+ if ((_signalArray[(3 * i) + 1] != -1) && (_signalArray[3 * i] == _word1289D)) {
+ int16 var1 = _signalArray[(3 * i) + 1];
+ int var4 = _signalArray[(3 * i) + 2];
+ _signalArray[(3 * i) + 1] = -1;
byte type = var1 >> 8;
byte index = var1 & 0xFF;
diff --git a/engines/lilliput/lilliput.h b/engines/lilliput/lilliput.h
index 4817a2d013..fd71630dba 100644
--- a/engines/lilliput/lilliput.h
+++ b/engines/lilliput/lilliput.h
@@ -163,7 +163,7 @@ public:
byte _mapSavedPixel[40];
int16 _array11D49[40];
int16 _array1289F[40];
- int16 _array12861[30];
+ int16 _signalArray[30];
byte *_rulesChunk1;
int16 _currentScriptCharacter;
diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp
index 6dc6ee0eb9..4234ff2668 100644
--- a/engines/lilliput/script.cpp
+++ b/engines/lilliput/script.cpp
@@ -338,16 +338,16 @@ void LilliputScript::handleOpcodeType2(int curWord) {
OC_setCurrentCharacter();
break;
case 0x1F:
- OC_sub17C8B();
+ OC_sendSeeSignal();
break;
case 0x20:
- OC_sub17CA2();
+ OC_sendHearSignal();
break;
case 0x21:
- OC_sub17CB9();
+ OC_sendVarSignal();
break;
case 0x22:
- OC_sub17CD1();
+ OC_sendBroadcastSignal();
break;
case 0x23:
OC_resetWord16EFE();
@@ -642,10 +642,10 @@ static const OpCode opCodes2[] = {
/* 0x1c */ { "OC_setCharacterCarry", 4, kGetValue1, kGetValue1, kImmediateValue, kImmediateValue, kNone },
/* 0x1d */ { "OC_dropCarried", 1, kGetValue1, kNone, kNone, kNone, kNone },
/* 0x1e */ { "OC_setCurrentCharacter", 1, kGetValue1, kNone, kNone, kNone, kNone },
-/* 0x1f */ { "OC_sub17C8B", 2, kImmediateValue, kImmediateValue, kNone, kNone, kNone },
-/* 0x20 */ { "OC_sub17CA2", 2, kImmediateValue, kImmediateValue, kNone, kNone, kNone },
-/* 0x21 */ { "OC_sub17CB9", 3, kImmediateValue, kGetValue1, kImmediateValue, kNone, kNone },
-/* 0x22 */ { "OC_sub17CD1", 2, kImmediateValue, kImmediateValue, kNone, kNone, kNone },
+/* 0x1f */ { "OC_sendSeeSignal", 2, kImmediateValue, kImmediateValue, kNone, kNone, kNone },
+/* 0x20 */ { "OC_sendHearSignal", 2, kImmediateValue, kImmediateValue, kNone, kNone, kNone },
+/* 0x21 */ { "OC_sendVarSignal", 3, kImmediateValue, kGetValue1, kImmediateValue, kNone, kNone },
+/* 0x22 */ { "OC_sendBroadcastSignal", 2, kImmediateValue, kImmediateValue, kNone, kNone, kNone },
/* 0x23 */ { "OC_resetWord16EFE", 0, kNone, kNone, kNone, kNone, kNone },
/* 0x24 */ { "OC_enableCurrentCharacterScript", 1, kImmediateValue, kNone, kNone, kNone, kNone }, // stop script
/* 0x25 */ { "OC_incCurrentCharacterVar1", 0, kNone, kNone, kNone, kNone, kNone },
@@ -2474,59 +2474,59 @@ void LilliputScript::OC_setCurrentCharacter() {
_vm->setCurrentCharacter(index);
}
-void LilliputScript::sub171AF(int16 var1, byte var2h, byte characterId, int16 var4) {
- debugC(2, kDebugScript, "sub171AF(%d, %d, %d, %d)", var1, var2h, characterId, var4);
+void LilliputScript::sendSignal(int16 var1, byte var2h, byte characterId, int16 var4) {
+ debugC(2, kDebugScript, "sendSignal(%d, %d, %d, %d)", var1, var2h, characterId, var4);
int index = 0;
for (int i = 0; i < 10; i++) {
- if (_vm->_array12861[index + 1] == -1) {
- _vm->_array12861[index + 1] = var1;
- _vm->_array12861[index + 2] = (var2h << 8) + characterId;
- _vm->_array12861[index + 0] = _vm->_word1289D + var4;
+ if (_vm->_signalArray[index + 1] == -1) {
+ _vm->_signalArray[index + 1] = var1;
+ _vm->_signalArray[index + 2] = (var2h << 8) + characterId;
+ _vm->_signalArray[index + 0] = _vm->_word1289D + var4;
return;
}
index += 3;
}
}
-void LilliputScript::OC_sub17C8B() {
- debugC(1, kDebugScript, "OC_sub17C8B()");
+void LilliputScript::OC_sendSeeSignal() {
+ debugC(1, kDebugScript, "OC_sendSeeSignal()");
- int16 type = 2 << 8;
+ int16 type = 2 << 8; // SEE
int16 var4 = _currScript->readSint16LE();
byte var2h = (_currScript->readUint16LE() & 0xFF);
- sub171AF(type, var2h, _vm->_currentScriptCharacter, var4);
+ sendSignal(type, var2h, _vm->_currentScriptCharacter, var4);
}
-void LilliputScript::OC_sub17CA2() {
- debugC(1, kDebugScript, "OC_sub17CA2()");
+void LilliputScript::OC_sendHearSignal() {
+ debugC(1, kDebugScript, "OC_sendHearSignal()");
- int16 type = 1 << 8;
+ int16 type = 1 << 8; // HEAR
int16 var4 = _currScript->readSint16LE();
byte var2h = (_currScript->readUint16LE() & 0xFF);
- sub171AF(type, var2h, _vm->_currentScriptCharacter, var4);
+ sendSignal(type, var2h, _vm->_currentScriptCharacter, var4);
}
-void LilliputScript::OC_sub17CB9() {
- debugC(1, kDebugScriptTBC, "OC_sub17CB9()");
+void LilliputScript::OC_sendVarSignal() {
+ debugC(1, kDebugScriptTBC, "OC_sendVarSignal()");
int16 var4 = _currScript->readSint16LE();
- int16 type = getValue1();
+ int16 type = getValue1(); // CHECKME- dubious
byte var2h = (_currScript->readUint16LE() & 0xFF);
- sub171AF(type, var2h, _vm->_currentScriptCharacter, var4);
+ sendSignal(type, var2h, _vm->_currentScriptCharacter, var4);
}
-void LilliputScript::OC_sub17CD1() {
- debugC(1, kDebugScript, "OC_sub17CD1()");
+void LilliputScript::OC_sendBroadcastSignal() {
+ debugC(1, kDebugScript, "OC_sendBroadcastSignal()");
int16 type = 3 << 8;
int16 var4 = _currScript->readSint16LE();
byte var2h = (_currScript->readUint16LE() & 0xFF);
- sub171AF(type, var2h, _vm->_currentScriptCharacter, var4);
+ sendSignal(type, var2h, _vm->_currentScriptCharacter, var4);
}
void LilliputScript::OC_resetWord16EFE() {
diff --git a/engines/lilliput/script.h b/engines/lilliput/script.h
index 4261b695ab..213b1d2a86 100644
--- a/engines/lilliput/script.h
+++ b/engines/lilliput/script.h
@@ -137,7 +137,7 @@ private:
void displayNumber(byte var1, Common::Point pos);
byte *getMapPtr(Common::Point val);
byte *getCurrentCharacterVarFromScript();
- void sub171AF(int16 var1, byte var2h, byte characterId, int16 var4);
+ void sendSignal(int16 var1, byte var2h, byte characterId, int16 var4);
void getSpeechVariant(int speechIndex, int speechVariant);
void sub189B8();
void formatSpeechString();
@@ -235,9 +235,9 @@ private:
void OC_setCharacterCarry();
void OC_dropCarried();
void OC_setCurrentCharacter();
- void OC_sub17C8B();
- void OC_sub17CA2();
- void OC_sub17CB9();
+ void OC_sendSeeSignal();
+ void OC_sendHearSignal();
+ void OC_setVarSignal();
void OC_sub17CD1();
void OC_resetWord16EFE();
void OC_enableCurrentCharacterScript();