From 6cd046a9061f1b40d4e39f1b1c20d512c7ed8bf0 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 27 Nov 2004 02:47:46 +0000 Subject: Revert opcode EF merge, HE72 uses different array structure. svn-id: r15905 --- scumm/intern.h | 1 + scumm/script_v100he.cpp | 2 +- scumm/script_v72he.cpp | 23 ++++++++++++++++++++++- scumm/script_v80he.cpp | 2 +- scumm/script_v90he.cpp | 2 +- 5 files changed, 26 insertions(+), 4 deletions(-) (limited to 'scumm') 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), -- cgit v1.2.3