diff options
-rw-r--r-- | scumm/intern.h | 1 | ||||
-rw-r--r-- | scumm/script_v72he.cpp | 10 | ||||
-rw-r--r-- | scumm/script_v90he.cpp | 36 |
3 files changed, 42 insertions, 5 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 1245924222..038c0dd070 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -881,6 +881,7 @@ protected: void o90_startScriptUnk(); void o90_jumpToScriptUnk(); void o90_wizImageOps(); + void o90_unknown24(); void o90_unknown25(); void o90_unknown26(); void o90_unknown27(); diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index e8a9f3e7bd..6e63637289 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -1929,8 +1929,11 @@ void ScummEngine_v72he::o72_openFile() { mode = pop(); copyScriptString(filename); - // HACK bb2demo uses incorrect filename - if (!strcmp((char *)filename,".HE9")) { + // HACK Correct incorrect filenames + if (!strcmp((char *)filename,".he7")) { + memset(filename, 0, sizeof(filename)); + sprintf((char *)filename, "%s.he7", _gameName.c_str()); + } else if (!strcmp((char *)filename,".HE9")) { memset(filename, 0, sizeof(filename)); sprintf((char *)filename, "%s.he9", _gameName.c_str()); } @@ -2324,7 +2327,8 @@ void ScummEngine_v72he::o72_unknownF1() { i++; } - push (i); + int r = (i) ? 1 : -1; + push (r); debug(1,"o70_unknownF1 stub (%d, %d, %d)", id, id2, i); } diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index 4c07bc3686..41b3499074 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -89,7 +89,7 @@ void ScummEngine_v90he::setupOpcodes() { OPCODE(o90_atan2), OPCODE(o90_getSegmentAngle), /* 24 */ - OPCODE(o6_invalid), + OPCODE(o90_unknown24), OPCODE(o90_unknown25), OPCODE(o90_unknown26), OPCODE(o90_unknown27), @@ -823,6 +823,31 @@ void ScummEngine_v90he::o90_wizImageOps() { debug(1,"o90_wizImageOps stub (%d)", subOp); } +void ScummEngine_v90he::o90_unknown24() { + byte subOp = fetchScriptByte(); + + switch (subOp) { + case 28: + pop(); + pop(); + pop(); + pop(); + break; + case 29: + pop(); + pop(); + pop(); + pop(); + pop(); + pop(); + break; + default: + error("o90_unknown24: Unknown case %d", subOp); + } + push(0); + debug(1,"o90_unknown24 stub (%d)", subOp); +} + void ScummEngine_v90he::o90_unknown25() { int args[16]; byte subOp = fetchScriptByte(); @@ -1001,8 +1026,11 @@ void ScummEngine_v90he::o90_unknown26() { case 91: getStackList(args, ARRAYSIZE(args)); break; - case 105: // HE99+ + case 105: // HE 99+ + pop(); pop(); + break; + case 106: // HE 99+ pop(); break; case 124: @@ -1059,6 +1087,10 @@ void ScummEngine_v90he::o90_unknown28() { subOp -= 37; switch (subOp) { + case 5: + pop(); + pop(); + break; case 6: pop(); break; |