diff options
author | Travis Howell | 2005-03-23 00:16:51 +0000 |
---|---|---|
committer | Travis Howell | 2005-03-23 00:16:51 +0000 |
commit | 8e84ee694c90c02417720eb99f45b3855607649a (patch) | |
tree | f5dc2c8f17ba648e7dd597088e807c1c92afa771 /scumm | |
parent | df0869f51d14ecd12d549a5d025e1db33344b479 (diff) | |
download | scummvm-rg350-8e84ee694c90c02417720eb99f45b3855607649a.tar.gz scummvm-rg350-8e84ee694c90c02417720eb99f45b3855607649a.tar.bz2 scummvm-rg350-8e84ee694c90c02417720eb99f45b3855607649a.zip |
Add HE90 version of kernelGet/Set opcode and move HE90 specific cases over.
svn-id: r17200
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/intern.h | 2 | ||||
-rw-r--r-- | scumm/script_v100he.cpp | 4 | ||||
-rw-r--r-- | scumm/script_v72he.cpp | 17 | ||||
-rw-r--r-- | scumm/script_v7he.cpp | 10 | ||||
-rw-r--r-- | scumm/script_v90he.cpp | 87 |
5 files changed, 89 insertions, 31 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 07df03a8ed..435f7bb9e2 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -1047,6 +1047,8 @@ protected: void o90_paletteOps(); void o90_unknownA5(); void o90_getActorAnimProgress(); + void o90_kernelGetFunctions(); + void o90_kernelSetFunctions(); }; class ScummEngine_v100he : public ScummEngine_v90he { diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp index 856bcfb181..188c7ca7d3 100644 --- a/scumm/script_v100he.cpp +++ b/scumm/script_v100he.cpp @@ -116,7 +116,7 @@ void ScummEngine_v100he::setupOpcodes() { OPCODE(o6_wordArrayInc), OPCODE(o6_jump), /* 3C */ - OPCODE(o70_kernelSetFunctions), + OPCODE(o90_kernelSetFunctions), OPCODE(o6_land), OPCODE(o6_le), OPCODE(o60_localizeArrayToScript), @@ -278,7 +278,7 @@ void ScummEngine_v100he::setupOpcodes() { /* BC */ OPCODE(o6_isAnyOf), OPCODE(o6_getInventoryCount), - OPCODE(o72_kernelGetFunctions), + OPCODE(o90_kernelGetFunctions), OPCODE(o90_max), /* C0 */ OPCODE(o90_min), diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index b7e96f667b..dcffaf9fac 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -1559,23 +1559,6 @@ void ScummEngine_v72he::o72_kernelGetFunctions() { virtScreenSave(ah->data, args[1], args[2], args[3], args[4]); push(readVar(0)); break; - case 1001: - { - double a = args[1] * PI / 180.; - push((int)(sin(a) * 100000)); - } - break; - case 1002: - { - double a = args[1] * PI / 180.; - push((int)(cos(a) * 100000)); - } - break; - case 2001: - // Used in football - push(0); - warning("o72_kernelGetFunctions: unhandled case 2001"); - break; default: error("o72_kernelGetFunctions: default case %d", args[0]); } diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp index bc719e135b..488c204ec6 100644 --- a/scumm/script_v7he.cpp +++ b/scumm/script_v7he.cpp @@ -829,16 +829,6 @@ void ScummEngine_v70he::o70_kernelSetFunctions() { // drawWizImage related warning("o70_kernelSetFunctions: unhandled case 43"); break; - case 714: - break; - case 1492: - // Used in baseball - warning("o70_kernelSetFunctions: unhandled case 1492"); - break; - case 2001: - // Used in SoccerMLS/Soccer2004 - warning("o70_kernelSetFunctions: unhandled case 2001"); - break; default: error("o70_kernelSetFunctions: default case %d (param count %d)", args[0], num); } diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index 8838b2e57e..3415cd43c3 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -291,8 +291,8 @@ void ScummEngine_v90he::setupOpcodes() { OPCODE(o6_distObjectPt), OPCODE(o6_distPtPt), /* C8 */ - OPCODE(o72_kernelGetFunctions), - OPCODE(o70_kernelSetFunctions), + OPCODE(o90_kernelGetFunctions), + OPCODE(o90_kernelSetFunctions), OPCODE(o6_delayFrames), OPCODE(o6_pickOneOf), /* CC */ @@ -2175,4 +2175,87 @@ void ScummEngine_v90he::o90_getActorAnimProgress() { push(a->getAnimProgress()); } +void ScummEngine_v90he::o90_kernelGetFunctions() { + int args[29]; + int num; + ArrayHeader *ah; + + num = getStackList(args, ARRAYSIZE(args)); + + switch (args[0]) { + case 1001: + { + double a = args[1] * PI / 180.; + push((int)(sin(a) * 100000)); + } + break; + case 1002: + { + double a = args[1] * PI / 180.; + push((int)(cos(a) * 100000)); + } + break; + case 2001: + // Used in football + warning("o90_kernelGetFunctions: U32 code (Num %d, args1 %d args 2 %d)", num, args[1], args[2]); + push(0); + break; + default: + error("o90_kernelGetFunctions: default case %d", args[0]); + } +} + +void ScummEngine_v90he::o90_kernelSetFunctions() { + int args[29]; + int num; + Actor *a; + + num = getStackList(args, ARRAYSIZE(args)); + + debug(1, "o90_kernelSetFunctions: case %d (param count %d)", args[0], num); + switch (args[0]) { + case 20: + a = derefActor(args[1], "o90_kernelSetFunctions: 20"); + queueAuxBlock(a); + break; + case 21: + _skipDrawObject = 1; + break; + case 22: + _skipDrawObject = 0; + break; + case 23: + _charset->clearCharsetMask(); + _fullRedraw = 1; + break; + case 24: + _skipProcessActors = 1; + _fullRedraw = 1; + break; + case 25: + _skipProcessActors = 0; + _fullRedraw = 1; + break; + case 42: + // drawWizImage related + warning("o90_kernelSetFunctions: unhandled case 42"); + break; + case 43: + // drawWizImage related + warning("o90_kernelSetFunctions: unhandled case 43"); + break; + case 714: + break; + case 1492: + spriteInfoSet_flag13(args[1], args[2]); + break; + case 2001: + // Used in SoccerMLS/Soccer2004 + warning("o90_kernelSetFunctions: U32 code (Num %d, args1 %d args 2 %d)", num, args[1], args[2]); + break; + default: + error("o90_kernelSetFunctions: default case %d (param count %d)", args[0], num); + } +} + } // End of namespace Scumm |