summaryrefslogtreecommitdiff
path: root/landscape.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2005-01-03 14:07:49 +0000
committerdarkvater <darkvater@openttd.org>2005-01-03 14:07:49 +0000
commit39f8b82640675d4810b9e4817ad09c7cb7bd4022 (patch)
tree1e6578e0e541a96bc27287df36c3604a74ff140e /landscape.c
parent32bfe0dddde81d016cb8de15e6a41bca3506d7be (diff)
downloadopenttd-39f8b82640675d4810b9e4817ad09c7cb7bd4022.tar.xz
(svn r1338) -Fix: fix signed/unsigned warnings introduced when ditching the macros for map querying.
Diffstat (limited to 'landscape.c')
-rw-r--r--landscape.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/landscape.c b/landscape.c
index b99ff6066..e9c1f85f1 100644
--- a/landscape.c
+++ b/landscape.c
@@ -512,7 +512,7 @@ void ConvertGroundTilesIntoWaterTiles()
}
tile++;
if (GET_TILE_X(tile) == MapMaxX()) {
- tile += TILE_XY(-MapMaxX(), 1);
+ tile += TILE_XY(-(int)MapMaxX(), 1);
if (GET_TILE_Y(tile) == MapMaxY())
break;
}
@@ -525,7 +525,7 @@ static const byte _genterrain_tbl_2[5] = { 0, 0, 0, 0, 33 };
static void GenerateTerrain(int type, int flag)
{
uint32 r;
- int x,y;
+ uint x,y;
int w,h;
byte *p,*tile;
byte direction;
@@ -747,12 +747,12 @@ TileIndex AdjustTileCoordRandomly(TileIndex a, byte rng)
// the result will be tile + TILE_XY(addx, addy)
uint TileAddWrap(TileIndex tile, int addx, int addy)
{
- int x, y;
+ uint x, y;
x = GET_TILE_X(tile) + addx;
y = GET_TILE_Y(tile) + addy;
// Are we about to wrap?
- if (x > 0 && x < MapMaxX() && y > 0 && y < MapMaxY())
+ if (x < MapMaxX() && y < MapMaxY())
return tile + TILE_XY(addx, addy);
return TILE_WRAPPED;