diff options
author | Travis Howell | 2004-03-02 06:42:22 +0000 |
---|---|---|
committer | Travis Howell | 2004-03-02 06:42:22 +0000 |
commit | ca85e8d51d5a8b2d0489dbfb3d33a15480b1a90e (patch) | |
tree | b365071135c4f83f495450e23cf32532ba955ae6 /scumm/script_v6he.cpp | |
parent | f80d6a7a2660ede913c7d7cf58d5afa26fc471cd (diff) | |
download | scummvm-rg350-ca85e8d51d5a8b2d0489dbfb3d33a15480b1a90e.tar.gz scummvm-rg350-ca85e8d51d5a8b2d0489dbfb3d33a15480b1a90e.tar.bz2 scummvm-rg350-ca85e8d51d5a8b2d0489dbfb3d33a15480b1a90e.zip |
Ooops, just move everyting used by HE6 to HE6.
svn-id: r13137
Diffstat (limited to 'scumm/script_v6he.cpp')
-rw-r--r-- | scumm/script_v6he.cpp | 74 |
1 files changed, 66 insertions, 8 deletions
diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp index ec7d68055e..ce53e47f80 100644 --- a/scumm/script_v6he.cpp +++ b/scumm/script_v6he.cpp @@ -352,7 +352,7 @@ void ScummEngine_v6he::setupOpcodes() { OPCODE(o6_invalid), OPCODE(o6_readINI), /* F4 */ - OPCODE(o6_invalid), + OPCODE(o6_unknownF4), OPCODE(o6_invalid), OPCODE(o6_invalid), OPCODE(o6_invalid), @@ -1248,22 +1248,21 @@ void ScummEngine_v6he::o6_stringLen() { int a, len; byte *addr; - if (!(_features & GF_WINDOWS)) { - o6_invalid(); - return; - } - a = pop(); addr = getStringAddress(a); if (!addr) { // FIXME: should be error here - warning("ScummEngine_v6he::o7_stringLen: Reference to zeroed array pointer (%d)", a); + warning("o6_stringLen: Reference to zeroed array pointer (%d)", a); push(0); return; } - len = stringLen(addr); + if (_gameId == GID_FREDDEMO) { + len = strlen((char *)getStringAddress(a)); + } else { // FREDDI, PUTTMOON + len = stringLen(addr); + } push(len); } @@ -1315,6 +1314,65 @@ void ScummEngine_v6he::o6_localizeArray() { } } +void ScummEngine_v6he::o6_unknownF4() { + if (_gameId == GID_FREDDEMO) { + byte b; + int len; + b = fetchScriptByte(); + + switch (b) { + case 6: + pop(); + len = resStrLen(_scriptPointer); + _scriptPointer += len + 1; + break; + case 7: + len = resStrLen(_scriptPointer); + _scriptPointer += len + 1; + len = resStrLen(_scriptPointer); + _scriptPointer += len + 1; + break; + } + } else { // FREDDI, PUTTMOON + int a, b; + byte filename1[256], filename2[256]; + int len; + + + b = pop(); + a = pop(); + + switch (b) { + case 1: + _msgPtrToAdd = filename1; + _messagePtr = _scriptPointer; + addMessageToStack(_messagePtr); + + len = resStrLen(_scriptPointer); + _scriptPointer += len + 1; + debug(1, "o6_unknownF4(%d, %d, \"%s\")", a, b, _messagePtr); + break; + case 2: + _msgPtrToAdd = filename1; + _messagePtr = _scriptPointer; + addMessageToStack(_messagePtr); + + len = resStrLen(_scriptPointer); + _scriptPointer += len + 1; + + _msgPtrToAdd = filename2; + _messagePtr = _scriptPointer; + addMessageToStack(_messagePtr); + + len = resStrLen(_scriptPointer); + _scriptPointer += len + 1; + debug(1, "o6_unknownF4(%d, %d, \"%s\", \"%s\")", a, b, filename1, filename2); + break; + } + } + warning("o6_unknownF4 stub"); +} + void ScummEngine_v6he::o6_unknownF9() { // File related int len, r; |