aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorCameron Cawley2019-10-03 22:10:00 +0100
committerDavid Turner2019-10-03 23:52:46 +0100
commit3cb6a84f035b40b4c4862719811a04e02afe2137 (patch)
tree7c2e51030829980ab7eec5a92afee3e4c50cde6b /engines
parent9368323cdf182121577511b129f8d981c364a34b (diff)
downloadscummvm-rg350-3cb6a84f035b40b4c4862719811a04e02afe2137.tar.gz
scummvm-rg350-3cb6a84f035b40b4c4862719811a04e02afe2137.tar.bz2
scummvm-rg350-3cb6a84f035b40b4c4862719811a04e02afe2137.zip
BLADERUNNER: Remove use of C99 math functions
Diffstat (limited to 'engines')
-rw-r--r--engines/bladerunner/rect_float.h9
-rw-r--r--engines/bladerunner/slice_renderer.cpp6
2 files changed, 8 insertions, 7 deletions
diff --git a/engines/bladerunner/rect_float.h b/engines/bladerunner/rect_float.h
index 4b7fea31bd..69e1ce0a2e 100644
--- a/engines/bladerunner/rect_float.h
+++ b/engines/bladerunner/rect_float.h
@@ -24,6 +24,7 @@
#define BLADERUNNER_RECT_FLOAT_H
#include "common/debug.h"
+#include "common/math.h"
#include "common/types.h"
#include "common/util.h"
@@ -50,10 +51,10 @@ struct RectFloat {
}
void trunc_2_decimals() {
- x0 = truncf(x0 * 100.0f) / 100.0f;
- y0 = truncf(y0 * 100.0f) / 100.0f;
- x1 = truncf(x1 * 100.0f) / 100.0f;
- y1 = truncf(y1 * 100.0f) / 100.0f;
+ x0 = Common::trunc(x0 * 100.0f) / 100.0f;
+ y0 = Common::trunc(y0 * 100.0f) / 100.0f;
+ x1 = Common::trunc(x1 * 100.0f) / 100.0f;
+ y1 = Common::trunc(y1 * 100.0f) / 100.0f;
}
};
diff --git a/engines/bladerunner/slice_renderer.cpp b/engines/bladerunner/slice_renderer.cpp
index 376aa1ec7d..54cc0f4120 100644
--- a/engines/bladerunner/slice_renderer.cpp
+++ b/engines/bladerunner/slice_renderer.cpp
@@ -614,9 +614,9 @@ void SliceRenderer::drawShadowInWorld(int transparency, Graphics::Surface &surfa
0.0f, 0.0f, 1.0f, _position.z);
Matrix4x3 mRotation(
- cosf(_facing), -sinf(_facing), 0.0f, 0.0f,
- sinf(_facing), cosf(_facing), 0.0f, 0.0f,
- 0.0f, 0.0f, 1.0f, 0.0f);
+ cos(_facing), -sin(_facing), 0.0f, 0.0f,
+ sin(_facing), cos(_facing), 0.0f, 0.0f,
+ 0.0f, 0.0f, 1.0f, 0.0f);
Matrix4x3 mScale(
_frameScale.x, 0.0f, 0.0f, 0.0f,