diff options
author | Colin Snover | 2017-11-04 20:10:54 -0500 |
---|---|---|
committer | Filippos Karapetis | 2018-08-26 15:33:44 +0300 |
commit | 81f78d4ddf2bee6164dd9cb90657d0666688603d (patch) | |
tree | dc5cf1a6e3454941013a5140b2342e2404bd7def /engines/bladerunner/script/ai/leon.cpp | |
parent | 6af0c77b5a8fb9176870b287e0eb18c99c82c102 (diff) | |
download | scummvm-rg350-81f78d4ddf2bee6164dd9cb90657d0666688603d.tar.gz scummvm-rg350-81f78d4ddf2bee6164dd9cb90657d0666688603d.tar.bz2 scummvm-rg350-81f78d4ddf2bee6164dd9cb90657d0666688603d.zip |
BLADERUNNER: Remove use of C99 math
C++ math functions are overloaded so operate using single-precision
when receiving a float input. The C standard library on FreeMiNT
does not fully support C99 math so use of sqrtf, sinf, etc.
instead of the C++ API does not work.
Diffstat (limited to 'engines/bladerunner/script/ai/leon.cpp')
-rw-r--r-- | engines/bladerunner/script/ai/leon.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/bladerunner/script/ai/leon.cpp b/engines/bladerunner/script/ai/leon.cpp index fdcb538f0a..1a421239ee 100644 --- a/engines/bladerunner/script/ai/leon.cpp +++ b/engines/bladerunner/script/ai/leon.cpp @@ -455,7 +455,7 @@ void AIScriptLeon::FledCombat() {} float AIScriptLeon::sub_446700(int actorId, float x, float y, float z) { float actorX, actorY, actorZ; Actor_Query_XYZ(actorId, &actorX, &actorY, &actorZ); - return sqrtf((z - actorZ) * (z - actorZ) + (y - actorY) * (y - actorY) + (x - actorX) * (x - actorX)); + return sqrt(static_cast<float>((z - actorZ) * (z - actorZ) + (y - actorY) * (y - actorY) + (x - actorX) * (x - actorX))); } } // End of namespace BladeRunner |