aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2004-10-04 00:01:06 +0000
committerTravis Howell2004-10-04 00:01:06 +0000
commitd48661766aaea62c1935dc74685997ec7998549c (patch)
tree9bf0e2bc8d51ca8525f52aa8b2c88ded1025474c
parent781191e83d091167e269056cbd68d233e3f20779 (diff)
downloadscummvm-rg350-d48661766aaea62c1935dc74685997ec7998549c.tar.gz
scummvm-rg350-d48661766aaea62c1935dc74685997ec7998549c.tar.bz2
scummvm-rg350-d48661766aaea62c1935dc74685997ec7998549c.zip
Add opcode difference
svn-id: r15400
-rw-r--r--scumm/intern.h1
-rw-r--r--scumm/script_v72he.cpp34
-rw-r--r--scumm/script_v80he.cpp2
-rw-r--r--scumm/script_v90he.cpp2
4 files changed, 36 insertions, 3 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index f624548021..baaff2bbeb 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -753,6 +753,7 @@ protected:
void o72_traceStatus();
void o72_unknownCF();
void o72_drawWizImage();
+ void o72_kernelGetFunctions();
void o72_jumpToScript();
void o72_openFile();
void o72_readFile();
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index c8b73c8fda..6f86469752 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -295,7 +295,7 @@ void ScummEngine_v72he::setupOpcodes() {
OPCODE(o6_distObjectPt),
OPCODE(o6_distPtPt),
/* C8 */
- OPCODE(o60_kernelGetFunctions),
+ OPCODE(o72_kernelGetFunctions),
OPCODE(o70_kernelSetFunctions),
OPCODE(o6_delayFrames),
OPCODE(o6_pickOneOf),
@@ -1856,6 +1856,38 @@ void ScummEngine_v72he::flushWizBuffer() {
_wizImagesNum = 0;
}
+void ScummEngine_v72he::o72_kernelGetFunctions() {
+ int args[29];
+ int retval;
+ ArrayHeader *ah;
+ getStackList(args, ARRAYSIZE(args));
+
+ switch (args[0]) {
+ case 1:
+ writeVar(0, 0);
+ defineArray(0, kByteArray, 0, 0, 0, virtScreenSave(0, args[1], args[2], args[3], args[4]));
+ retval = readVar(0);
+ ah = (ArrayHeader *)getResourceAddress(rtString, retval);
+ virtScreenSave(ah->data, args[1], args[2], args[3], args[4]);
+ push(retval);
+ break;
+ case 1001:
+ {
+ double a = args[1] * M_PI / 180.;
+ push((int)(sin(a) * 100000));
+ }
+ break;
+ case 1002:
+ {
+ double a = args[1] * M_PI / 180.;
+ push((int)(cos(a) * 100000));
+ }
+ break;
+ default:
+ error("o72_kernelGetFunctions: default case %d", args[0]);
+ }
+}
+
void ScummEngine_v72he::o72_drawWizImage() {
WizImage wi;
wi.flags = pop();
diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp
index afad98009d..ce16a21538 100644
--- a/scumm/script_v80he.cpp
+++ b/scumm/script_v80he.cpp
@@ -294,7 +294,7 @@ void ScummEngine_v80he::setupOpcodes() {
OPCODE(o6_distObjectPt),
OPCODE(o6_distPtPt),
/* C8 */
- OPCODE(o60_kernelGetFunctions),
+ OPCODE(o72_kernelGetFunctions),
OPCODE(o70_kernelSetFunctions),
OPCODE(o6_delayFrames),
OPCODE(o6_pickOneOf),
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp
index e02dc944c9..3a2209b9eb 100644
--- a/scumm/script_v90he.cpp
+++ b/scumm/script_v90he.cpp
@@ -294,7 +294,7 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o6_distObjectPt),
OPCODE(o6_distPtPt),
/* C8 */
- OPCODE(o60_kernelGetFunctions),
+ OPCODE(o72_kernelGetFunctions),
OPCODE(o70_kernelSetFunctions),
OPCODE(o6_delayFrames),
OPCODE(o6_pickOneOf),