mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 09:56:30 +00:00
LILLIPUT: Start reworking _word16EFE
This commit is contained in:
parent
1d897d7be2
commit
d011a68d4f
@ -154,7 +154,7 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd)
|
|||||||
_currentScriptCharacterPos = Common::Point(0, 0);
|
_currentScriptCharacterPos = Common::Point(0, 0);
|
||||||
_word10804 = 0;
|
_word10804 = 0;
|
||||||
_nextCharacterIndex = 0;
|
_nextCharacterIndex = 0;
|
||||||
_word16EFE = 0xFFFF;
|
_word16EFE = -1;
|
||||||
_word1817B = 0;
|
_word1817B = 0;
|
||||||
_savedSurfaceUnderMousePos = Common::Point(0, 0);
|
_savedSurfaceUnderMousePos = Common::Point(0, 0);
|
||||||
_word15AC2 = 0;
|
_word15AC2 = 0;
|
||||||
|
@ -141,7 +141,7 @@ public:
|
|||||||
byte _numCharacters;
|
byte _numCharacters;
|
||||||
Common::Point _currentScriptCharacterPos;
|
Common::Point _currentScriptCharacterPos;
|
||||||
int _nextCharacterIndex;
|
int _nextCharacterIndex;
|
||||||
int _word16EFE;
|
int16 _word16EFE;
|
||||||
uint16 _word1817B;
|
uint16 _word1817B;
|
||||||
Common::Point _savedSurfaceUnderMousePos;
|
Common::Point _savedSurfaceUnderMousePos;
|
||||||
int _word15AC2;
|
int _word15AC2;
|
||||||
|
@ -2481,14 +2481,14 @@ void LilliputScript::OC_setCurrentCharacter() {
|
|||||||
_vm->setCurrentCharacter(var1);
|
_vm->setCurrentCharacter(var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LilliputScript::sub171AF(int16 var1, uint16 var2, int16 var4) {
|
void LilliputScript::sub171AF(int16 var1, byte var2h, byte characterId, int16 var4) {
|
||||||
debugC(2, kDebugScript, "sub171AF()");
|
debugC(2, kDebugScript, "sub171AF(%d, %d, %d, %d)", var1, var2h, characterId, var4);
|
||||||
|
|
||||||
int index = 0;
|
int index = 0;
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
if (_vm->_array12861[index + 1] == -1) {
|
if (_vm->_array12861[index + 1] == -1) {
|
||||||
_vm->_array12861[index + 1] = var1;
|
_vm->_array12861[index + 1] = var1;
|
||||||
_vm->_array12861[index + 2] = var2;
|
_vm->_array12861[index + 2] = (var2h << 8) + characterId;
|
||||||
_vm->_array12861[index + 0] = _vm->_word1289D + var4;
|
_vm->_array12861[index + 0] = _vm->_word1289D + var4;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2501,10 +2501,9 @@ void LilliputScript::OC_sub17C8B() {
|
|||||||
|
|
||||||
int16 type = 2 << 8;
|
int16 type = 2 << 8;
|
||||||
int16 var4 = _currScript->readSint16LE();
|
int16 var4 = _currScript->readSint16LE();
|
||||||
byte tmpVal = (_currScript->readUint16LE() & 0xFF);
|
byte var2h = (_currScript->readUint16LE() & 0xFF);
|
||||||
uint16 var2 = (tmpVal << 8) + _vm->_currentScriptCharacter;
|
|
||||||
|
|
||||||
sub171AF(type, var2, var4);
|
sub171AF(type, var2h, _vm->_currentScriptCharacter, var4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LilliputScript::OC_sub17CA2() {
|
void LilliputScript::OC_sub17CA2() {
|
||||||
@ -2512,21 +2511,19 @@ void LilliputScript::OC_sub17CA2() {
|
|||||||
|
|
||||||
int16 type = 1 << 8;
|
int16 type = 1 << 8;
|
||||||
int16 var4 = _currScript->readSint16LE();
|
int16 var4 = _currScript->readSint16LE();
|
||||||
byte tmpVal = (_currScript->readUint16LE() & 0xFF);
|
byte var2h = (_currScript->readUint16LE() & 0xFF);
|
||||||
uint16 var2 = (tmpVal << 8) + _vm->_currentScriptCharacter;
|
|
||||||
|
|
||||||
sub171AF(type, var2, var4);
|
sub171AF(type, var2h, _vm->_currentScriptCharacter, var4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LilliputScript::OC_sub17CB9() {
|
void LilliputScript::OC_sub17CB9() {
|
||||||
debugC(1, kDebugScript, "OC_sub17CB9()");
|
debugC(1, kDebugScriptTBC, "OC_sub17CB9()");
|
||||||
|
|
||||||
int16 var4 = _currScript->readSint16LE();
|
int16 var4 = _currScript->readSint16LE();
|
||||||
int16 var1 = getValue1();
|
int16 type = getValue1();
|
||||||
byte tmpVal = (_currScript->readUint16LE() & 0xFF);
|
byte var2h = (_currScript->readUint16LE() & 0xFF);
|
||||||
uint16 var2 = (tmpVal << 8) + _vm->_currentScriptCharacter;
|
|
||||||
|
|
||||||
sub171AF(var1, var2, var4);
|
sub171AF(type, var2h, _vm->_currentScriptCharacter, var4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LilliputScript::OC_sub17CD1() {
|
void LilliputScript::OC_sub17CD1() {
|
||||||
@ -2534,16 +2531,15 @@ void LilliputScript::OC_sub17CD1() {
|
|||||||
|
|
||||||
int16 type = 3 << 8;
|
int16 type = 3 << 8;
|
||||||
int16 var4 = _currScript->readSint16LE();
|
int16 var4 = _currScript->readSint16LE();
|
||||||
int tmpVal = (_currScript->readUint16LE() & 0xFF);
|
byte var2h = (_currScript->readUint16LE() & 0xFF);
|
||||||
uint16 var2 = (tmpVal << 8) + _vm->_currentScriptCharacter;
|
|
||||||
|
|
||||||
sub171AF(type, var2, var4);
|
sub171AF(type, var2h, _vm->_currentScriptCharacter, var4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LilliputScript::OC_resetWord16EFE() {
|
void LilliputScript::OC_resetWord16EFE() {
|
||||||
debugC(1, kDebugScriptTBC, "OC_resetWord16EFE()");
|
debugC(1, kDebugScriptTBC, "OC_resetWord16EFE()");
|
||||||
|
|
||||||
_vm->_word16EFE = 0xFFFF;
|
_vm->_word16EFE = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LilliputScript::OC_enableCurrentCharacterScript() {
|
void LilliputScript::OC_enableCurrentCharacterScript() {
|
||||||
|
@ -127,7 +127,7 @@ private:
|
|||||||
void displayNumber(byte var1, Common::Point pos);
|
void displayNumber(byte var1, Common::Point pos);
|
||||||
byte *getMapPtr(Common::Point val);
|
byte *getMapPtr(Common::Point val);
|
||||||
byte *getCurrentCharacterVarFromScript();
|
byte *getCurrentCharacterVarFromScript();
|
||||||
void sub171AF(int16 var1, uint16 var2, int16 var4);
|
void sub171AF(int16 var1, byte var2h, byte characterId, int16 var4);
|
||||||
void getSpeechVariant(int speechIndex, int speechVariant);
|
void getSpeechVariant(int speechIndex, int speechVariant);
|
||||||
void sub189B8();
|
void sub189B8();
|
||||||
void formatSpeechString();
|
void formatSpeechString();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user