diff options
author | Travis Howell | 2004-09-12 00:48:16 +0000 |
---|---|---|
committer | Travis Howell | 2004-09-12 00:48:16 +0000 |
commit | 09dfaa924eaa59ade2605b8a94718ebe1b930c4d (patch) | |
tree | 325a28fa01ef2bc394f07acf2a687fe66d541bce /scumm | |
parent | 867809fb1db68da6e669805a87e85166d04b7c82 (diff) | |
download | scummvm-rg350-09dfaa924eaa59ade2605b8a94718ebe1b930c4d.tar.gz scummvm-rg350-09dfaa924eaa59ade2605b8a94718ebe1b930c4d.tar.bz2 scummvm-rg350-09dfaa924eaa59ade2605b8a94718ebe1b930c4d.zip |
Add some HE90+ opcodes
svn-id: r15013
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/intern.h | 3 | ||||
-rw-r--r-- | scumm/script_v72he.cpp | 7 | ||||
-rw-r--r-- | scumm/script_v90he.cpp | 133 |
3 files changed, 117 insertions, 26 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 81c3c3f885..6f1f517189 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -814,6 +814,9 @@ protected: virtual const char *getOpcodeDesc(byte i); /* HE version 90 script opcodes */ + void o90_getLT(); + void o90_getGT(); + void o90_startLocalScript(); void o90_unknown1C(); void o90_unknown25(); void o90_unknown26(); diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index 0884797527..28602ec0ec 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -860,7 +860,7 @@ void ScummEngine_v72he::o72_actorOps() { debug(1,"o72_actorOps: case 24 (%d)", k); break; case 43: - // HE 80+ + // HE 90+ k = pop(); debug(1,"o72_actorOps: case 43 (%d)", k); break; @@ -870,6 +870,11 @@ void ScummEngine_v72he::o72_actorOps() { _actorClipOverride.top = pop(); _actorClipOverride.left = pop(); break; + case 68: + // HE 90+ + k = pop(); + debug(1,"o72_actorOps: case 65 (%d)", k); + break; case 76: // SO_COSTUME a->setActorCostume(pop()); break; diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index f2f623c432..d26c3303f6 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -81,8 +81,8 @@ void ScummEngine_v90he::setupOpcodes() { OPCODE(o72_compareStackList), /* 1C */ OPCODE(o90_unknown1C), - OPCODE(o6_invalid), - OPCODE(o6_invalid), + OPCODE(o90_getLT), + OPCODE(o90_getGT), OPCODE(o6_invalid), /* 20 */ OPCODE(o6_invalid), @@ -98,7 +98,7 @@ void ScummEngine_v90he::setupOpcodes() { OPCODE(o90_unknown28), OPCODE(o90_unknown29), OPCODE(o6_invalid), - OPCODE(o6_invalid), + OPCODE(o90_startLocalScript), /* 2C */ OPCODE(o6_invalid), OPCODE(o6_invalid), @@ -378,6 +378,39 @@ const char *ScummEngine_v90he::getOpcodeDesc(byte i) { return _opcodesV90he[i].desc; } +void ScummEngine_v90he::o90_getLT() { + int a = pop(); + int b = pop(); + + if (b < a) { + push(b); + } else { + push(a); + } +} + +void ScummEngine_v90he::o90_getGT() { + int a = pop(); + int b = pop(); + + if (b > a) { + push(b); + } else { + push(a); + } +} + +void ScummEngine_v90he::o90_startLocalScript() { + int args[16]; + int script, entryp; + int flags; + getStackList(args, ARRAYSIZE(args)); + entryp = pop(); + script = pop(); + flags = fetchScriptByte(); + runScript(script, (flags == 199 || flags == 200), (flags == 195 || flags == 200), args); +} + void ScummEngine_v90he::o90_unknown1C() { // For Pajame Sam 2 demo // Incomplete @@ -459,48 +492,98 @@ void ScummEngine_v90he::o90_unknown1C() { void ScummEngine_v90he::o90_unknown25() { int args[16]; int subOp = fetchScriptByte(); + subOp -= 30; + + debug(1,"o90_unknown25 stub (%d)", subOp); switch (subOp) { - case 30: - case 31: - case 32: + case 0: + pop(); + break; + case 1: + pop(); + break; + case 2: + pop(); + break; + case 3: + pop(); + break; + case 4: + pop(); + break; + case 5: + pop(); + break; + case 6: + pop(); + break; + case 7: + pop(); + break; + case 8: + pop(); + break; + case 9: + pop(); + break; + case 12: + pop(); + pop(); + break; + case 13: + pop(); + break; + case 15: + if (_heversion >= 99) { + getStackList(args, ARRAYSIZE(args)); + pop(); + pop(); + pop(); + pop(); + } else { + pop(); + pop(); + pop(); + } + break; + case 22: + pop(); + break; case 33: - case 34: - case 35: - case 36: - case 37: + pop(); + break; case 38: - case 39: - case 43: - case 52: - case 63: - case 68: - case 82: - case 92: - case 97: - case 98: - case 124: pop(); break; - case 42: - case 198: + case 52: pop(); + break; + case 62: pop(); break; - case 45: + case 67: pop(); + break; + case 68: pop(); + break; + case 94: pop(); break; - case 125: + case 95: getStackList(args, ARRAYSIZE(args)); pop(); break; + case 168: + pop(); + pop(); + break; default: error("o90_unknown25: Unknown case %d", subOp); } push(0); - debug(1,"o90_unknown25 stub (%d)", subOp); + } void ScummEngine_v90he::o90_unknown26() { |