diff options
author | md5 | 2011-04-27 13:29:51 +0300 |
---|---|---|
committer | md5 | 2011-04-27 13:29:51 +0300 |
commit | 3ab0a133b3fca2e9e28be9d9d6d6efd3a4c2cb88 (patch) | |
tree | bf1daff00ad62ccc40e5ce3629bf1d9916bf92a6 /engines/scumm | |
parent | c06dd901420fa9aebfb14a26b47e241910a7778b (diff) | |
download | scummvm-rg350-3ab0a133b3fca2e9e28be9d9d6d6efd3a4c2cb88.tar.gz scummvm-rg350-3ab0a133b3fca2e9e28be9d9d6d6efd3a4c2cb88.tar.bz2 scummvm-rg350-3ab0a133b3fca2e9e28be9d9d6d6efd3a4c2cb88.zip |
SCUMM: Fixed compilation with MSVC
Both double and float parameters were passed to atan2(), which didn't match
any variants of atan2()
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/he/logic_he.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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]; |