aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2004-11-27 02:47:46 +0000
committerTravis Howell2004-11-27 02:47:46 +0000
commit6cd046a9061f1b40d4e39f1b1c20d512c7ed8bf0 (patch)
tree482f995e53cb45d418c01710d29c1532067a4b40 /scumm
parentd172111444300a601cfab9dfc55fdef5d015f51c (diff)
downloadscummvm-rg350-6cd046a9061f1b40d4e39f1b1c20d512c7ed8bf0.tar.gz
scummvm-rg350-6cd046a9061f1b40d4e39f1b1c20d512c7ed8bf0.tar.bz2
scummvm-rg350-6cd046a9061f1b40d4e39f1b1c20d512c7ed8bf0.zip
Revert opcode EF merge, HE72 uses different array structure.
svn-id: r15905
Diffstat (limited to 'scumm')
-rw-r--r--scumm/intern.h1
-rw-r--r--scumm/script_v100he.cpp2
-rw-r--r--scumm/script_v72he.cpp23
-rw-r--r--scumm/script_v80he.cpp2
-rw-r--r--scumm/script_v90he.cpp2
5 files changed, 26 insertions, 4 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 78e3a0acb8..77839542dd 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -774,6 +774,7 @@ protected:
void o72_pickVarRandom();
void o72_redimArray();
void o72_copyString();
+ void o72_appendString();
void o72_concatString();
void o72_checkGlobQueue();
void o72_readINI();
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp
index 2a16d1bfda..26556afe04 100644
--- a/scumm/script_v100he.cpp
+++ b/scumm/script_v100he.cpp
@@ -326,7 +326,7 @@ void ScummEngine_v100he::setupOpcodes() {
/* E0 */
OPCODE(o70_compareString),
OPCODE(o72_copyString),
- OPCODE(o70_appendString),
+ OPCODE(o72_appendString),
OPCODE(o72_concatString),
/* E4 */
OPCODE(o70_getStringLen),
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index 6161525d4e..5060281986 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -343,7 +343,7 @@ void ScummEngine_v72he::setupOpcodes() {
OPCODE(o72_copyString),
OPCODE(o70_getStringWidth),
OPCODE(o70_getStringLen),
- OPCODE(o70_appendString),
+ OPCODE(o72_appendString),
/* F0 */
OPCODE(o72_concatString),
OPCODE(o70_compareString),
@@ -2384,6 +2384,27 @@ void ScummEngine_v72he::o72_copyString() {
debug(1,"stub o72_copyString");
}
+void ScummEngine_v72he::o72_appendString() {
+ int dst, size;
+
+ int len = pop();
+ int srcOffs = pop();
+ int src = pop();
+
+ size = len - srcOffs + 2;
+
+ writeVar(0, 0);
+ defineArray(0, kStringArray, 0, 0, 0, size);
+ writeArray(0, 0, 0, 0);
+
+ dst = readVar(0);
+
+ appendSubstring(dst, src, srcOffs, len);
+
+ push(dst);
+ debug(1,"stub o72_appendString");
+}
+
void ScummEngine_v72he::o72_concatString() {
int dst, size;
diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp
index 4812ce276a..f4806a9c86 100644
--- a/scumm/script_v80he.cpp
+++ b/scumm/script_v80he.cpp
@@ -342,7 +342,7 @@ void ScummEngine_v80he::setupOpcodes() {
OPCODE(o72_copyString),
OPCODE(o70_getStringWidth),
OPCODE(o70_getStringLen),
- OPCODE(o70_appendString),
+ OPCODE(o72_appendString),
/* F0 */
OPCODE(o72_concatString),
OPCODE(o70_compareString),
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp
index 4688ce91a3..11b72709a9 100644
--- a/scumm/script_v90he.cpp
+++ b/scumm/script_v90he.cpp
@@ -342,7 +342,7 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o72_copyString),
OPCODE(o70_getStringWidth),
OPCODE(o70_getStringLen),
- OPCODE(o70_appendString),
+ OPCODE(o72_appendString),
/* F0 */
OPCODE(o72_concatString),
OPCODE(o70_compareString),