aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2004-10-02 01:40:34 +0000
committerTravis Howell2004-10-02 01:40:34 +0000
commit168c9757d300c218143d96a64abf6be414aaac29 (patch)
tree468b23b3e157c55c3481d9f6469ebe47fde8193d
parent431797610767f7c69a7aa1b6dc320e1e5376ea74 (diff)
downloadscummvm-rg350-168c9757d300c218143d96a64abf6be414aaac29.tar.gz
scummvm-rg350-168c9757d300c218143d96a64abf6be414aaac29.tar.bz2
scummvm-rg350-168c9757d300c218143d96a64abf6be414aaac29.zip
Add/correct opcode
svn-id: r15380
-rw-r--r--scumm/intern.h3
-rw-r--r--scumm/script_v90he.cpp57
2 files changed, 57 insertions, 3 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 814e5ffdc8..a3bb48451a 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -834,6 +834,8 @@ protected:
const char *desc;
};
+ int _heObject, _heObjectNum;
+
struct WizParameters {
byte filename[260];
Common::Rect box;
@@ -896,6 +898,7 @@ protected:
void o90_unknown36();
void o90_unknown37();
void o90_unknown3A();
+ void o90_unknown44();
void o90_unknown94();
void o90_unknown9E();
void o90_unknownA5();
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp
index 263fb2f530..87b0db709b 100644
--- a/scumm/script_v90he.cpp
+++ b/scumm/script_v90he.cpp
@@ -129,7 +129,7 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o6_invalid),
OPCODE(o6_writeWordVar),
/* 44 */
- OPCODE(o6_invalid),
+ OPCODE(o90_unknown44),
OPCODE(o80_unknown45),
OPCODE(o6_invalid),
OPCODE(o6_wordArrayWrite),
@@ -473,7 +473,7 @@ void ScummEngine_v90he::o90_unknown1F() {
}
- eax = tableUnk[eax * 4];
+ eax = tableUnk[eax];
if (ecx)
push(eax);
@@ -505,7 +505,7 @@ void ScummEngine_v90he::o90_unknown20() {
}
- eax = tableUnk[eax * 4];
+ eax = tableUnk[eax];
if (ecx)
push(eax);
@@ -1183,6 +1183,57 @@ void ScummEngine_v90he::o90_unknown3A() {
debug(1,"o90_unknown3A stub (%d)", subOp);
}
+void ScummEngine_v90he::o90_unknown44() {
+ // Object releated
+ int subOp = fetchScriptByte();
+ subOp -= 32;
+
+ switch (subOp) {
+ case 0:
+ if (_heObjectNum == -1)
+ push(0);
+ else
+ push(_objs[_heObjectNum].width);
+ break;
+ case 1:
+ if (_heObjectNum == -1)
+ push(0);
+ else
+ push(_objs[_heObjectNum].height);
+ break;
+ case 4:
+ push(0);
+ break;
+ case 6:
+ if (_heObjectNum == -1)
+ push(0);
+ else
+ push(_objs[_heObjectNum].x_pos);
+ break;
+ case 7:
+ if (_heObjectNum == -1)
+ push(0);
+ else
+ push(_objs[_heObjectNum].y_pos);
+ break;
+ case 20:
+ push(getState(_heObject));
+ break;
+ case 25:
+ _heObject = pop();
+ _heObjectNum = getObjectIndex(_heObject);
+ break;
+ case 107:
+ // Dummy case
+ pop();
+ push(0);
+ break;
+ default:
+ error("o90_unknown44: Unknown case %d", subOp);
+ }
+ debug(1,"o90_unknown44 stub (%d)", subOp);
+}
+
void ScummEngine_v90he::o90_unknown94() {
int subOp = fetchScriptByte();
subOp -= 45;