aboutsummaryrefslogtreecommitdiff
path: root/boxes.cpp
diff options
context:
space:
mode:
authorMax Horn2002-07-08 01:04:29 +0000
committerMax Horn2002-07-08 01:04:29 +0000
commitb00225b9dca5055b3f1a70267021cbb567b4053e (patch)
tree3989436153b6f2ded6b3078008555b3da0d5998e /boxes.cpp
parent28852f14975ba9fddbee838fcf9723386870d39c (diff)
downloadscummvm-rg350-b00225b9dca5055b3f1a70267021cbb567b4053e.tar.gz
scummvm-rg350-b00225b9dca5055b3f1a70267021cbb567b4053e.tar.bz2
scummvm-rg350-b00225b9dca5055b3f1a70267021cbb567b4053e.zip
added some typecasts that might help QNX; updated NewGui TODO list
svn-id: r4489
Diffstat (limited to 'boxes.cpp')
-rw-r--r--boxes.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/boxes.cpp b/boxes.cpp
index 960e24f9a7..d37f1995ac 100644
--- a/boxes.cpp
+++ b/boxes.cpp
@@ -23,6 +23,7 @@
#include "stdafx.h"
#include "scumm.h"
#include "actor.h"
+
#include <math.h>
byte Scumm::getMaskFromBox(int box)
@@ -967,9 +968,9 @@ void Scumm::GetGates(int trap1, int trap2)
Box2 = (Closest2 > 3);
Box3 = (Closest3 > 3);
- Dist1 = (int)sqrt(Dist1);
- Dist2 = (int)sqrt(Dist2);
- Dist3 = (int)sqrt(Dist3);
+ Dist1 = (int)sqrt((double)Dist1);
+ Dist2 = (int)sqrt((double)Dist2);
+ Dist3 = (int)sqrt((double)Dist3);
if (Box1 == Box2 && abs(Dist1 - Dist2) < 4) {
SetGate(Closest1, Closest2, polyx, polyy);