LILLIPUT: Renaming, fix bug in startSpeech
This commit is contained in:
parent
2ea4cc178b
commit
aa8ecc2493
4 changed files with 26 additions and 26 deletions
|
@ -190,7 +190,7 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd)
|
||||||
_array10A11PosY[i] = -1;
|
_array10A11PosY[i] = -1;
|
||||||
_array16E94[i] = 0;
|
_array16E94[i] = 0;
|
||||||
|
|
||||||
_array11D49[i] = 0xFFFF;
|
_array11D49[i] = -1;
|
||||||
_characterPositionX[i] = -1;
|
_characterPositionX[i] = -1;
|
||||||
_characterPositionY[i] = -1;
|
_characterPositionY[i] = -1;
|
||||||
_characterPositionAltitude[i] = 0;
|
_characterPositionAltitude[i] = 0;
|
||||||
|
@ -205,7 +205,7 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd)
|
||||||
_rulesBuffer2_12[i] = 0;
|
_rulesBuffer2_12[i] = 0;
|
||||||
_rulesBuffer2_13_posX[i] = 0;
|
_rulesBuffer2_13_posX[i] = 0;
|
||||||
_rulesBuffer2_14_posY[i] = 0;
|
_rulesBuffer2_14_posY[i] = 0;
|
||||||
_array1289F[i] = 0xFFFF;
|
_array1289F[i] = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 30; i++)
|
for (int i = 0; i < 30; i++)
|
||||||
|
@ -522,8 +522,8 @@ void LilliputEngine::displayFunction10() {
|
||||||
displayMousePointer();
|
displayMousePointer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LilliputEngine::sub15A4C(int vgaIndex, byte *srcBuf, int &bufIndex) {
|
void LilliputEngine::displaySpeechLine(int vgaIndex, byte *srcBuf, int &bufIndex) {
|
||||||
debugC(2, kDebugEngineTBC, "sub15A4C()");
|
debugC(2, kDebugEngineTBC, "displaySpeechLine()");
|
||||||
|
|
||||||
int var3 = 0;
|
int var3 = 0;
|
||||||
int var1;
|
int var1;
|
||||||
|
@ -554,16 +554,16 @@ void LilliputEngine::sub15A4C(int vgaIndex, byte *srcBuf, int &bufIndex) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LilliputEngine::displayFunction11(byte *buf) {
|
void LilliputEngine::displaySpeech(byte *buf) {
|
||||||
debugC(2, kDebugEngineTBC, "displayFunction11(%s)", buf);
|
debugC(2, kDebugEngine, "displaySpeech(%s)", buf);
|
||||||
|
|
||||||
restoreSurfaceUnderMousePointer();
|
restoreSurfaceUnderMousePointer();
|
||||||
|
|
||||||
int vgaIndex = 70;
|
int vgaIndex = 70;
|
||||||
int bufIndex = 0;
|
int bufIndex = 0;
|
||||||
|
|
||||||
byte _byte15A0C = 0;
|
bool multiLineFlag = false;
|
||||||
int var1;
|
byte var1;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
var1 = buf[bufIndex];
|
var1 = buf[bufIndex];
|
||||||
|
@ -571,17 +571,17 @@ void LilliputEngine::displayFunction11(byte *buf) {
|
||||||
if (var1 == 0) {
|
if (var1 == 0) {
|
||||||
vgaIndex += (4 * 320);
|
vgaIndex += (4 * 320);
|
||||||
break;
|
break;
|
||||||
} else if (var1 == 0x7C) {
|
} else if (var1 == '|') {
|
||||||
_byte15A0C = 1;
|
multiLineFlag = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bufIndex = 0;
|
bufIndex = 0;
|
||||||
sub15A4C(vgaIndex, buf, bufIndex);
|
displaySpeechLine(vgaIndex, buf, bufIndex);
|
||||||
if (_byte15A0C == 1) {
|
if (multiLineFlag) {
|
||||||
vgaIndex += (8 * 320);
|
vgaIndex += (8 * 320);
|
||||||
sub15A4C(vgaIndex, buf, bufIndex);
|
displaySpeechLine(vgaIndex, buf, bufIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
displayMousePointer();
|
displayMousePointer();
|
||||||
|
@ -2674,7 +2674,7 @@ void LilliputEngine::handleGameScripts() {
|
||||||
|
|
||||||
|
|
||||||
_word16EFE = _array11D49[index];
|
_word16EFE = _array11D49[index];
|
||||||
_array11D49[index] = 0xFFFF;
|
_array11D49[index] = -1;
|
||||||
_word1817B = 0;
|
_word1817B = 0;
|
||||||
|
|
||||||
int tmpVal = _rulesBuffer2_12[index];
|
int tmpVal = _rulesBuffer2_12[index];
|
||||||
|
|
|
@ -234,7 +234,7 @@ public:
|
||||||
void displayInterfaceHotspots();
|
void displayInterfaceHotspots();
|
||||||
void displayLandscape();
|
void displayLandscape();
|
||||||
void displayFunction10();
|
void displayFunction10();
|
||||||
void displayFunction11(byte *buf);
|
void displaySpeech(byte *buf);
|
||||||
void initGameAreaDisplay();
|
void initGameAreaDisplay();
|
||||||
void displayIsometricBlock(byte *buf, int var1, int var2, int var3);
|
void displayIsometricBlock(byte *buf, int var1, int var2, int var3);
|
||||||
void displayGameArea();
|
void displayGameArea();
|
||||||
|
@ -295,7 +295,7 @@ public:
|
||||||
void sub131FC(Common::Point pos);
|
void sub131FC(Common::Point pos);
|
||||||
void sub1546F(Common::Point displayPos);
|
void sub1546F(Common::Point displayPos);
|
||||||
void sub15498(Common::Point pos, int var2);
|
void sub15498(Common::Point pos, int var2);
|
||||||
void sub15A4C(int vgaIndex, byte *srcBuf, int &bufIndex);
|
void displaySpeechLine(int vgaIndex, byte *srcBuf, int &bufIndex);
|
||||||
void checkMapClosing(bool &forceReturnFl);
|
void checkMapClosing(bool &forceReturnFl);
|
||||||
void turnCharacter1(int index);
|
void turnCharacter1(int index);
|
||||||
void turnCharacter2(int index);
|
void turnCharacter2(int index);
|
||||||
|
|
|
@ -1096,8 +1096,8 @@ void LilliputScript::checkSpeechAllowed(bool &forceReturnFl) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LilliputScript::sub189F5() {
|
void LilliputScript::formatSpeechString() {
|
||||||
debugC(2, kDebugScriptTBC, "sub189F5()");
|
debugC(2, kDebugScript, "formatSpeechString()");
|
||||||
|
|
||||||
int index = 0;
|
int index = 0;
|
||||||
int var2 = 0x100;
|
int var2 = 0x100;
|
||||||
|
@ -1135,9 +1135,9 @@ void LilliputScript::sub189F5() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void LilliputScript::sub189B8() {
|
void LilliputScript::sub189B8() {
|
||||||
debugC(2, kDebugScriptTBC, "sub189B8()");
|
debugC(2, kDebugScript, "sub189B8()");
|
||||||
|
|
||||||
sub189F5();
|
formatSpeechString();
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
@ -1150,11 +1150,11 @@ void LilliputScript::sub189B8() {
|
||||||
index += 4;
|
index += 4;
|
||||||
_speechTimer = index;
|
_speechTimer = index;
|
||||||
_vm->displayFunction10();
|
_vm->displayFunction10();
|
||||||
_vm->displayFunction11(_vm->_displayStringBuf);
|
_vm->displaySpeech(_vm->_displayStringBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LilliputScript::decodePackedText(char *buf) {
|
void LilliputScript::decodePackedText(char *buf) {
|
||||||
debugC(2, kDebugScriptTBC, "decodePackedText(buf)");
|
debugC(2, kDebugScript, "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|";
|
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|";
|
||||||
|
|
||||||
|
@ -1247,7 +1247,7 @@ void LilliputScript::listAllTexts() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void LilliputScript::startSpeech(int speechId) {
|
void LilliputScript::startSpeech(int speechId) {
|
||||||
debugC(2, kDebugScriptTBC, "startSpeech(%d)", speechId);
|
debugC(2, kDebugScript, "startSpeech(%d)", speechId);
|
||||||
|
|
||||||
if (speechId == -1)
|
if (speechId == -1)
|
||||||
return;
|
return;
|
||||||
|
@ -1256,7 +1256,7 @@ void LilliputScript::startSpeech(int speechId) {
|
||||||
|
|
||||||
int index = _vm->_packedStringIndex[speechId];
|
int index = _vm->_packedStringIndex[speechId];
|
||||||
int count = 0;
|
int count = 0;
|
||||||
while (_vm->_packedStrings[index + count] == 0x5B)
|
while (_vm->_packedStrings[index + count] == '[')
|
||||||
++count;
|
++count;
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
@ -1266,7 +1266,7 @@ void LilliputScript::startSpeech(int speechId) {
|
||||||
for (int j = 0; j < tmpVal; j++) {
|
for (int j = 0; j < tmpVal; j++) {
|
||||||
do
|
do
|
||||||
++i;
|
++i;
|
||||||
while (_vm->_packedStrings[index + count + i] != 0x5B);
|
while (_vm->_packedStrings[index + count + i] != ']');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,7 +131,7 @@ private:
|
||||||
void sub171AF(int16 var1, int16 var2, int16 var4);
|
void sub171AF(int16 var1, int16 var2, int16 var4);
|
||||||
void sub18B7C(int var1, int var3);
|
void sub18B7C(int var1, int var3);
|
||||||
void sub189B8();
|
void sub189B8();
|
||||||
void sub189F5();
|
void formatSpeechString();
|
||||||
Common::Point getCharacterTilePos(int index);
|
Common::Point getCharacterTilePos(int index);
|
||||||
int sub18BB7(int index);
|
int sub18BB7(int index);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue