From 6d6192b9f71ad1a847920e447dbdb04dad0f9c22 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 2 Aug 2011 16:45:17 -0400 Subject: 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 --- engines/scumm/he/logic_he.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'engines/scumm/he') 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; -- cgit v1.2.3