aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v7he.cpp
diff options
context:
space:
mode:
authorTravis Howell2004-10-13 10:55:50 +0000
committerTravis Howell2004-10-13 10:55:50 +0000
commit086724d774399aa0b101d2503929e3fca54813d5 (patch)
tree6b9dbc2d42568c617c7b1cd150dc5d11ded599f6 /scumm/script_v7he.cpp
parentf78ded554c1f7ae3ef622753e496281de48bd5a2 (diff)
downloadscummvm-rg350-086724d774399aa0b101d2503929e3fca54813d5.tar.gz
scummvm-rg350-086724d774399aa0b101d2503929e3fca54813d5.tar.bz2
scummvm-rg350-086724d774399aa0b101d2503929e3fca54813d5.zip
Remove more duplicates.
svn-id: r15544
Diffstat (limited to 'scumm/script_v7he.cpp')
-rw-r--r--scumm/script_v7he.cpp44
1 files changed, 43 insertions, 1 deletions
diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp
index 8c45d57d7c..791cfefc52 100644
--- a/scumm/script_v7he.cpp
+++ b/scumm/script_v7he.cpp
@@ -347,7 +347,7 @@ void ScummEngine_v70he::setupOpcodes() {
OPCODE(o70_unknownEF),
/* F0 */
OPCODE(o6_invalid),
- OPCODE(o6_invalid),
+ OPCODE(o70_unknownF1),
OPCODE(o6_invalid),
OPCODE(o70_readINI),
/* F4 */
@@ -761,6 +761,48 @@ void ScummEngine_v70he::o70_unknownEF() {
debug(1,"stub o70_unknownEF");
}
+void ScummEngine_v70he::o70_unknownF1() {
+ byte *addr, *addr2;
+ int i = 0;
+
+ int id = pop();
+ int id2 = pop();
+
+ addr = getStringAddress(id);
+ if (!addr)
+ error("o72_stringLen: Reference to zeroed array pointer (%d)", id);
+
+ addr2 = getStringAddress(id2);
+ if (!addr)
+ error("o72_stringLen: Reference to zeroed array pointer (%d)", id);
+
+ while(1) {
+ if (*addr != *addr2)
+ break;
+ if (*addr == 0) {
+ push(0);
+ return;
+ }
+
+ addr++;
+ addr2++;
+
+ if (*addr != *addr2)
+ break;
+ if (*addr == 0) {
+ push(0);
+ return;
+ }
+
+ addr++;
+ addr2++;
+ i += 2;
+ }
+
+ push (i);
+ debug(1,"o70_unknownF1 stub (%d, %d, %d)", id, id2, i);
+}
+
void ScummEngine_v70he::o70_readINI() {
int len;
int type;