aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsluicebox2019-09-21 16:27:58 -0700
committersluicebox2019-09-21 16:27:58 -0700
commita76c476b19236a6e7c1a87c63117dddc07a7e010 (patch)
treeeecdbe1e45177172b0c852f4855dad6d9df28d26
parenta9b4ec721cc865b1b06428f6c81769474b49f039 (diff)
downloadscummvm-rg350-a76c476b19236a6e7c1a87c63117dddc07a7e010.tar.gz
scummvm-rg350-a76c476b19236a6e7c1a87c63117dddc07a7e010.tar.bz2
scummvm-rg350-a76c476b19236a6e7c1a87c63117dddc07a7e010.zip
HDB: Use fabs instead of abs for doubles
Fixes VS2015 build
-rw-r--r--engines/hdb/ai-cinematic.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp
index c592c77d29..0189e2e604 100644
--- a/engines/hdb/ai-cinematic.cpp
+++ b/engines/hdb/ai-cinematic.cpp
@@ -166,8 +166,8 @@ void AI::processCines() {
_cameraX += _cine[i]->xv;
_cameraY += _cine[i]->yv;
debug(3, "C_MOVECAMERA: _cine[%d]->xv: %f, _cine[%d]->yv: %f", i, _cine[i]->xv, i, _cine[i]->yv);
- debug(3, "C_MOVECAMERA: abs(_cameraX - _cine[i]->x): %f, abs(_cameraY - _cine[i]->y): %f", abs(_cameraX - _cine[i]->x), abs(_cameraY - _cine[i]->y));
- if (abs(_cameraX - _cine[i]->x) <= 1 && abs(_cameraY - _cine[i]->y) <= 1) {
+ debug(3, "C_MOVECAMERA: abs(_cameraX - _cine[i]->x): %f, abs(_cameraY - _cine[i]->y): %f", fabs(_cameraX - _cine[i]->x), fabs(_cameraY - _cine[i]->y));
+ if (fabs(_cameraX - _cine[i]->x) <= 1 && fabs(_cameraY - _cine[i]->y) <= 1) {
_cameraX = _cine[i]->x;
_cameraY = _cine[i]->y;
complete = true;