aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2011-08-02 16:45:17 -0400
committerMatthew Hoops2011-08-02 16:45:17 -0400
commit6d6192b9f71ad1a847920e447dbdb04dad0f9c22 (patch)
treee728665df79a652c86bd970bc88aa31bc75fc7b5 /engines
parent6d5d5f8269d9f5f705f4c90d0455f0ff30ec11c3 (diff)
downloadscummvm-rg350-6d6192b9f71ad1a847920e447dbdb04dad0f9c22.tar.gz
scummvm-rg350-6d6192b9f71ad1a847920e447dbdb04dad0f9c22.tar.bz2
scummvm-rg350-6d6192b9f71ad1a847920e447dbdb04dad0f9c22.zip
SCUMM: Fix soccer u32 op_1007 atan2 calls
The games are now becoming playable. Players and the ball appear on the field. However they go off the field at times and shadows do not work properly yet. It's progress though! Thanks to fuzzie for spotting
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/he/logic_he.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp
index e8af5a2a53..ca2058fea7 100644
--- a/engines/scumm/he/logic_he.cpp
+++ b/engines/scumm/he/logic_he.cpp
@@ -1025,11 +1025,11 @@ int LogicHEsoccer::op_1007(int32 *args) {
double v14 = (double)args[0] * 0.01;
double v13 = (double)args[2] * 0.01;
_userDataD[524] = v14;
- double v12 = atan2(v13, v14);
+ double v12 = atan2(v14, v13);
_userDataD[520] = v12;
- double v15 = atan2(v13 - (double)args[4] * 0.01, (double)args[3] * 0.01);
+ double v15 = atan2((double)args[3] * 0.01, v13 - (double)args[4] * 0.01);
double v19 = v15 * 2.0;
- double v17 = atan2(v13 - (double)args[4] * 0.01, v14);
+ double v17 = atan2(v14, v13 - (double)args[4] * 0.01);
_userDataD[519] = v19;
_userDataD[521] = v17;
_userDataD[525] = (v17 - v12) * 2.0;
@@ -1171,6 +1171,7 @@ int LogicHEsoccer::op_1008(int a1, int a2, int a3, int a4, int a5, int a6, int a
int LogicHEsoccer::op_1011(int32 a1, int32 a2, int32 a3, int32 a4, int32 a5, int32 a6) {
// This is called on each frame by startOfFrame() if activated by op_1012.
// This seems to do player placement!
+ // It also seems to be doing camera panning
float v28 = 0.0;