diff options
author | Travis Howell | 2004-08-31 07:47:34 +0000 |
---|---|---|
committer | Travis Howell | 2004-08-31 07:47:34 +0000 |
commit | 3f1aee9ff4c71c069f5ba22dbd9effd013b5de34 (patch) | |
tree | 64aaf4b7036ffc0b10b055cb05878f6c295a35dd /scumm | |
parent | 0ab96ee6c87f6ca4be680f11f3bb502594b3b16c (diff) | |
download | scummvm-rg350-3f1aee9ff4c71c069f5ba22dbd9effd013b5de34.tar.gz scummvm-rg350-3f1aee9ff4c71c069f5ba22dbd9effd013b5de34.tar.bz2 scummvm-rg350-3f1aee9ff4c71c069f5ba22dbd9effd013b5de34.zip |
Add HE 72 version
svn-id: r14845
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/intern.h | 3 | ||||
-rw-r--r-- | scumm/script_v72he.cpp | 59 | ||||
-rw-r--r-- | scumm/script_v7he.cpp | 1 |
3 files changed, 52 insertions, 11 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index c820782e36..5cb7d9b0c5 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -723,8 +723,9 @@ protected: void o72_getPixel(); void o72_pickVarRandom(); void o72_redimArray(); - void o72_readINI(); + void o72_unknownEF(); void o72_unknownF1(); + void o72_readINI(); void o72_unknownF4(); void o72_unknownF8(); void o72_unknownF9(); diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index ec1a914bd3..531d5a5ecf 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -334,7 +334,7 @@ void ScummEngine_v72he::setupOpcodes() { OPCODE(o6_setBoxSet), OPCODE(o6_invalid), OPCODE(o6_invalid), - OPCODE(o7_unknownEF), + OPCODE(o6_invalid), /* E8 */ OPCODE(o6_invalid), OPCODE(o6_seekFilePos), @@ -344,7 +344,7 @@ void ScummEngine_v72he::setupOpcodes() { OPCODE(o6_invalid), OPCODE(o6_invalid), OPCODE(o7_stringLen), - OPCODE(o6_invalid), + OPCODE(o72_unknownEF), /* F0 */ OPCODE(o6_invalid), OPCODE(o72_unknownF1), @@ -1213,6 +1213,54 @@ void ScummEngine_v72he::redimArray(int arrayId, int newDim2start, int newDim2end } +void ScummEngine_v72he::o72_unknownEF() { + int value; + int array, array2, len, len2, len3, offset; + int b, size; + len = pop(); + b = pop(); + array2 = pop(); + + size = len - b + 2; + + defineArray(0, kStringArray, 0, 0, 0, size); + writeArray(0, 0, 0, 0); + + array = readVar(0); + + len2 = len; + if (len == -1) { + len2 = resStrLen(getStringAddress(array2)); + len = 0; + } else { + len = b; + } + len3 = resStrLen(getStringAddress(array)); + + offset = 0; + len2 -= len; + len2++; + while (offset < len2) { + writeVar(0, array2); + value = readArray(0, 0, offset + len); + writeVar(0, array); + writeArray(0, 0, offset + len3, value); + offset++; + } + + writeArray(0, 0, len3 + offset, 0); + + push(array); + debug(1,"stub o72_unknownEF (array %d, array2 %d)", array, array2); +} + +void ScummEngine_v72he::o72_unknownF1() { + int a = pop(); + int b = pop(); + debug(1,"o7_unknownF1 stub (%d, %d)", b, a); + push(-1); +} + void ScummEngine_v72he::o72_readINI() { byte name[100]; int type; @@ -1237,13 +1285,6 @@ void ScummEngine_v72he::o72_readINI() { debug(1, "o72_readINI (%d) %s", type, name); } -void ScummEngine_v72he::o72_unknownF1() { - int a = pop(); - int b = pop(); - debug(1,"o7_unknownF1 stub (%d, %d)", b, a); - push(-1); -} - void ScummEngine_v72he::o72_unknownF4() { byte b; byte name[256], name2[1024]; diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp index 606f3e71f2..9dd9d0e5e3 100644 --- a/scumm/script_v7he.cpp +++ b/scumm/script_v7he.cpp @@ -826,7 +826,6 @@ void ScummEngine_v7he::o7_unknownEF() { size = len - b + 2; - defineArray(0, kStringArray, 0, size); writeArray(0, 0, 0, 0); |