aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-12-18 10:16:19 +0200
committerEugene Sandulenko2013-12-18 10:16:37 +0200
commit9f1dee1115d450a252fd30e14423e54110e49bde (patch)
treea03ccea215ed2d42979b28afc6d9530da05ddea8 /engines
parent4117af414e581046e47272cb4fee7c6fe7c82a22 (diff)
downloadscummvm-rg350-9f1dee1115d450a252fd30e14423e54110e49bde.tar.gz
scummvm-rg350-9f1dee1115d450a252fd30e14423e54110e49bde.tar.bz2
scummvm-rg350-9f1dee1115d450a252fd30e14423e54110e49bde.zip
FULLPIPE: Fix compiler warnings
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/motion.cpp18
-rw-r--r--engines/fullpipe/scenes/scene06.cpp2
2 files changed, 10 insertions, 10 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 16ac82be9e..2dd025855d 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -507,8 +507,8 @@ double MovGraph::calcDistance(Common::Point *point, MovGraphLink *link, int fuzz
return -1.0;
}
} else {
- point->x = n1x + (dist2x * distm / link->_distance);
- point->y = n1y + (dist2y * distm / link->_distance);
+ point->x = (int)(n1x + (dist2x * distm / link->_distance));
+ point->y = (int)(n1y + (dist2y * distm / link->_distance));
}
return res;
@@ -1166,7 +1166,7 @@ MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int
double dst1 = sqrt((double)((ypos - nod->_y) * (ypos - nod->_y) + (xpos - nod->_x) * (xpos - nod->_x)));
int dst = linkInfoDest.link->_movGraphNode2->_distance - nod->_distance;
- movInfo1.distance2 = nod->_distance + (dst1 * (double)dst / linkInfoDest.link->_distance);
+ movInfo1.distance2 = (int)(nod->_distance + (dst1 * (double)dst / linkInfoDest.link->_distance));
calcDistance(&movInfo1.pt2, linkInfoDest.link, 1);
@@ -1798,15 +1798,15 @@ bool MovGraphReact::pointInRegion(int x, int y) {
double xinters;
Common::Point p, p1, p2;
- p.x = (double)x;
- p.y = (double)y;
+ p.x = x;
+ p.y = y;
- p1.x = (double)_points[0]->x;
- p1.y = (double)_points[0]->y;
+ p1.x = _points[0]->x;
+ p1.y = _points[0]->y;
for (int i = 1; i <= _pointCount; i++) {
- p2.x = (double)_points[i % _pointCount]->x;
- p2.y = (double)_points[i % _pointCount]->y;
+ p2.x = _points[i % _pointCount]->x;
+ p2.y = _points[i % _pointCount]->y;
if (p.y > MIN(p1.y, p2.y)) {
if (p.y <= MAX(p1.y, p2.y)) {
diff --git a/engines/fullpipe/scenes/scene06.cpp b/engines/fullpipe/scenes/scene06.cpp
index 62360e62b8..9dc4708b3e 100644
--- a/engines/fullpipe/scenes/scene06.cpp
+++ b/engines/fullpipe/scenes/scene06.cpp
@@ -204,7 +204,7 @@ void sceneHandler06_throwCallback(int *arg) {
+ (g_fullpipe->_mouseVirtX - g_vars->scene06_sceneClickX)
* (g_fullpipe->_mouseVirtX - g_vars->scene06_sceneClickX);
- *arg = sqrt(dist) * 0.1;
+ *arg = (int)(sqrt((double)dist) * 0.1);
if (*arg > 8)
*arg = 8;