aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2011-08-02 16:57:44 -0400
committerMatthew Hoops2011-08-02 16:57:44 -0400
commit743ed0517bd251a6d1de25b85ed3afe4feba01ce (patch)
treee1bd1bac76ba138974f8780ede4ffde4960101d0
parent6d6192b9f71ad1a847920e447dbdb04dad0f9c22 (diff)
downloadscummvm-rg350-743ed0517bd251a6d1de25b85ed3afe4feba01ce.tar.gz
scummvm-rg350-743ed0517bd251a6d1de25b85ed3afe4feba01ce.tar.bz2
scummvm-rg350-743ed0517bd251a6d1de25b85ed3afe4feba01ce.zip
SCUMM: Implement soccer u32 op_1017
Used sporadically during gameplay
-rw-r--r--engines/scumm/he/logic_he.cpp15
-rw-r--r--engines/scumm/he/logic_he.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp
index ca2058fea7..b99459d80d 100644
--- a/engines/scumm/he/logic_he.cpp
+++ b/engines/scumm/he/logic_he.cpp
@@ -894,6 +894,10 @@ int32 LogicHEsoccer::dispatch(int op, int numArgs, int32 *args) {
res = op_1016(args);
break;
+ case 1017:
+ res = op_1017(args);
+ break;
+
case 1019:
res = op_1019(args);
break;
@@ -2221,6 +2225,17 @@ int LogicHEsoccer::op_1016(int32 *args) {
return result;
}
+int LogicHEsoccer::op_1017(int32 *args) {
+ // Used sporadically during a match (out of bounds?)
+ if (!args[1])
+ args[1] = 1;
+
+ double v3 = asin((double)args[0] / (double)args[1]);
+ writeScummVar(108, (int32)(v3 / 0.01745329251994328 * (double)args[1]));
+
+ return 1;
+}
+
int LogicHEsoccer::op_1019(int32 *args) {
// Used at the beginning of a match
// Initializes some arrays. Player positions?
diff --git a/engines/scumm/he/logic_he.h b/engines/scumm/he/logic_he.h
index 27b06a797d..db6397e830 100644
--- a/engines/scumm/he/logic_he.h
+++ b/engines/scumm/he/logic_he.h
@@ -135,6 +135,7 @@ private:
int op_1013(int32 a1, int32 a2, int32 a3);
int op_1014(int32 a1, int32 a2, int32 a3, int32 a4, int32 a5, int32 a6, int32 a7, int32 a8, int32 a9, int32 a10, int32 a11, int32 a12, int32 a13, int32 a14);
int op_1016(int32 *args);
+ int op_1017(int32 *args);
int op_1019(int32 *args);
int op_1020();
int op_1021(int32 a1, int32 a2, int32 a3, int32 a4, int32 a5, int32 a6, int32 a7);