summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-05-13 12:42:56 +0000
committerrubidium <rubidium@openttd.org>2010-05-13 12:42:56 +0000
commit241dd9a9f59208f5c9d025f0481dc00dac35989d (patch)
treef8f67882390f32d6a2d861e69515203ad473e5e7 /src/viewport.cpp
parent548dd91ef0ed6d470dc3553b994022ead99ece95 (diff)
downloadopenttd-241dd9a9f59208f5c9d025f0481dc00dac35989d.tar.xz
(svn r19817) -Fix: MSVC compile warnings
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r--src/viewport.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 87023c958..65cc9ff00 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -386,8 +386,8 @@ static Point TranslateXYToTileCoord(const ViewPort *vp, int x, int y)
/* we need to move variables in to the valid range, as the
* GetTileZoomCenterWindow() function can call here with invalid x and/or y,
* when the user tries to zoom out along the sides of the map */
- a = Clamp(a, -4 * TILE_SIZE, (int)(MapMaxX() * TILE_SIZE) - 1);
- b = Clamp(b, -4 * TILE_SIZE, (int)(MapMaxY() * TILE_SIZE) - 1);
+ a = Clamp(a, -4 * (int)TILE_SIZE, (int)(MapMaxX() * TILE_SIZE) - 1);
+ b = Clamp(b, -4 * (int)TILE_SIZE, (int)(MapMaxY() * TILE_SIZE) - 1);
/* (a, b) is the X/Y-world coordinate that belongs to (x,y) if the landscape would be completely flat on height 0.
* Now find the Z-world coordinate by fix point iteration.
@@ -2330,9 +2330,9 @@ static void CalcRaildirsDrawstyle(TileHighlightData *thd, int x, int y, int meth
/* 'Build' the last half rail tile if needed */
if ((offset & TILE_UNIT_MASK) > (TILE_SIZE / 2)) {
if (dx + dy >= (int)TILE_SIZE) {
- x += (dx + dy < 0) ? TILE_SIZE : -TILE_SIZE;
+ x += (dx + dy < 0) ? TILE_SIZE : -(int)TILE_SIZE;
} else {
- y += (dx + dy < 0) ? TILE_SIZE : -TILE_SIZE;
+ y += (dx + dy < 0) ? TILE_SIZE : -(int)TILE_SIZE;
}
}
@@ -2365,9 +2365,9 @@ static void CalcRaildirsDrawstyle(TileHighlightData *thd, int x, int y, int meth
/* 'Build' the last half rail tile if needed */
if ((offset & TILE_UNIT_MASK) > (TILE_SIZE / 2)) {
if (dx - dy < 0) {
- y += (dx > dy) ? TILE_SIZE : -TILE_SIZE;
+ y += (dx > dy) ? TILE_SIZE : -(int)TILE_SIZE;
} else {
- x += (dx < dy) ? TILE_SIZE : -TILE_SIZE;
+ x += (dx < dy) ? TILE_SIZE : -(int)TILE_SIZE;
}
}