From 3ab0a133b3fca2e9e28be9d9d6d6efd3a4c2cb88 Mon Sep 17 00:00:00 2001 From: md5 Date: Wed, 27 Apr 2011 13:29:51 +0300 Subject: SCUMM: Fixed compilation with MSVC Both double and float parameters were passed to atan2(), which didn't match any variants of atan2() --- engines/scumm/he/logic_he.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/scumm/he') diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp index 0f2d232179..33647634d3 100644 --- a/engines/scumm/he/logic_he.cpp +++ b/engines/scumm/he/logic_he.cpp @@ -1020,7 +1020,7 @@ int LogicHEsoccer::op_1011(int32 a1, int32 a2, int32 a3, int32 a4, int32 a5) { // This is called on each frame by startOfFrame() if activated by op_1012. // This seems to do player placement! - float v28; + float v28 = 0.0; for (int i = 0; i < 18; i++) { // These seem to be some sort of percent? of angles? @@ -1060,15 +1060,15 @@ int LogicHEsoccer::op_1011(int32 a1, int32 a2, int32 a3, int32 a4, int32 a5) { putInArray(a5, 0, i, v24 + 11 * v21); } - float v7 = atan2(_userDataD[524] - v28, v31); + float v7 = atan2(_userDataD[524] - v28, (double)v31); int v8 = (int)(_userDataD[526] - (_userDataD[521] - v7) * _userDataD[522] + 300.0); - double v9 = atan2(_userDataD[523], v31); + double v9 = atan2(_userDataD[523], (double)v31); // x/y position? putInArray(a2, i, 0, (int32)(v29 * v9 + 640.0)); putInArray(a2, i, 1, v8); - double v10 = atan2(_userDataD[524], v31); + double v10 = atan2(_userDataD[524], (double)v31); int v12 = (int)(_userDataD[526] - (_userDataD[521] - (float)v10) * _userDataD[522] + 300.0); double v13 = _userDataD[523]; -- cgit v1.2.3