diff options
Diffstat (limited to 'scumm/script_v6he.cpp')
-rw-r--r-- | scumm/script_v6he.cpp | 48 |
1 files changed, 21 insertions, 27 deletions
diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp index e006b05721..377f8834ef 100644 --- a/scumm/script_v6he.cpp +++ b/scumm/script_v6he.cpp @@ -955,8 +955,7 @@ void ScummEngine_v6he::o6_openFile() { int mode, len, slot, l, r; byte filename[100]; - _messagePtr = _scriptPointer; - addMessageToStack(_messagePtr, filename, sizeof(filename)); + addMessageToStack(_scriptPointer, filename, sizeof(filename)); len = resStrLen(_scriptPointer); _scriptPointer += len + 1; @@ -1002,8 +1001,7 @@ void ScummEngine_v6he::o6_deleteFile() { int len, r; byte filename[100]; - _messagePtr = _scriptPointer; - addMessageToStack(_messagePtr, filename, sizeof(filename)); + addMessageToStack(_scriptPointer, filename, sizeof(filename)); len = resStrLen(_scriptPointer); _scriptPointer += len + 1; @@ -1020,8 +1018,7 @@ void ScummEngine_v6he::o6_rename() { int len, r1, r2; byte filename[100],filename2[100]; - _messagePtr = _scriptPointer; - addMessageToStack(_messagePtr, filename, sizeof(filename)); + addMessageToStack(_scriptPointer, filename, sizeof(filename)); len = resStrLen(_scriptPointer); _scriptPointer += len + 1; @@ -1031,8 +1028,7 @@ void ScummEngine_v6he::o6_rename() { break; } - _messagePtr = _scriptPointer; - addMessageToStack(_messagePtr, filename2, sizeof(filename2)); + addMessageToStack(_scriptPointer, filename2, sizeof(filename2)); len = resStrLen(_scriptPointer); _scriptPointer += len + 1; @@ -1340,22 +1336,19 @@ void ScummEngine_v6he::o6_unknownF4() { switch (b) { case 1: - _messagePtr = _scriptPointer; - addMessageToStack(_messagePtr, filename1, sizeof(filename1)); + addMessageToStack(_scriptPointer, filename1, sizeof(filename1)); len = resStrLen(_scriptPointer); _scriptPointer += len + 1; - debug(1, "o6_unknownF4(%d, %d, \"%s\")", a, b, _messagePtr); + debug(1, "o6_unknownF4(%d, %d, \"%s\")", a, b, filename1); break; case 2: - _messagePtr = _scriptPointer; - addMessageToStack(_messagePtr, filename1, sizeof(filename1)); + addMessageToStack(_scriptPointer, filename1, sizeof(filename1)); len = resStrLen(_scriptPointer); _scriptPointer += len + 1; - _messagePtr = _scriptPointer; - addMessageToStack(_messagePtr, filename2, sizeof(filename2)); + addMessageToStack(_scriptPointer, filename2, sizeof(filename2)); len = resStrLen(_scriptPointer); _scriptPointer += len + 1; @@ -1371,8 +1364,7 @@ void ScummEngine_v6he::o6_unknownF9() { int len, r; byte filename[100]; - _messagePtr = _scriptPointer; - addMessageToStack(_messagePtr, filename, sizeof(filename)); + addMessageToStack(_scriptPointer, filename, sizeof(filename)); len = resStrLen(_scriptPointer); _scriptPointer += len + 1; @@ -1413,6 +1405,7 @@ void ScummEngine_v6he::o6_unknownFB() { void ScummEngine_v6he::decodeParseString(int m, int n) { byte b; int c; + const byte *msg; b = fetchScriptByte(); @@ -1447,24 +1440,25 @@ void ScummEngine_v6he::decodeParseString(int m, int n) { _string[m].no_talk_anim = true; break; case 75: // SO_TEXTSTRING - _messagePtr = translateTextAndPlaySpeech(_scriptPointer); - _scriptPointer += resStrLen(_scriptPointer)+ 1; + msg = translateTextAndPlaySpeech(_scriptPointer); + _scriptPointer += resStrLen(_scriptPointer) + 1; switch (m) { case 0: - actorTalk(); + actorTalk(msg); break; case 1: - drawString(1); + drawString(1, msg); break; case 2: - unkMessage1(); + unkMessage1(msg); break; case 3: - unkMessage2(); + unkMessage2(msg); break; } - return; + + break; case 0xF9: c = pop(); if (c == 1) { @@ -1475,12 +1469,12 @@ void ScummEngine_v6he::decodeParseString(int m, int n) { getStackList(args, ARRAYSIZE(args)); } warning("decodeParseString case 0xF9 stub"); - return; + break; case 0xFE: setStringVars(m); if (n) _actorToPrintStrFor = pop(); - return; + break; case 0xFF: _string[m].t_xpos = _string[m].xpos; _string[m].t_ypos = _string[m].ypos; @@ -1490,7 +1484,7 @@ void ScummEngine_v6he::decodeParseString(int m, int n) { _string[m].t_right = _string[m].right; _string[m].t_color = _string[m].color; _string[m].t_charset = _string[m].charset; - return; + break; default: error("decodeParseString: default case 0x%x", b); } |