summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-01-17 16:55:13 +0000
committerfrosch <frosch@openttd.org>2008-01-17 16:55:13 +0000
commit978a7ca56aa657885ef3cb5fecb9177a5dadb870 (patch)
treedc097272bb93f6c019f9ed773ae4fdb6106339ea /src
parent4f31704e2e295fb06cbe53d43f5665fe8f70aed1 (diff)
downloadopenttd-978a7ca56aa657885ef3cb5fecb9177a5dadb870.tar.xz
(svn r11897) -Fix: Replace an uint with TileIndex and a small coding style fix.
Diffstat (limited to 'src')
-rw-r--r--src/map.cpp2
-rw-r--r--src/map_func.h2
-rw-r--r--src/water_cmd.cpp3
3 files changed, 4 insertions, 3 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 0bdfbe355..865e92b35 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -139,7 +139,7 @@ uint ScaleByMapSize1D(uint n)
* @param addy the amount of tiles in the Y direction to add
* @return translated tile, or INVALID_TILE when it would've wrapped.
*/
-uint TileAddWrap(TileIndex tile, int addx, int addy)
+TileIndex TileAddWrap(TileIndex tile, int addx, int addy)
{
uint x = TileX(tile) + addx;
uint y = TileY(tile) + addy;
diff --git a/src/map_func.h b/src/map_func.h
index 28bf80a27..8b313d7f6 100644
--- a/src/map_func.h
+++ b/src/map_func.h
@@ -227,7 +227,7 @@ static inline TileIndexDiff ToTileIndexDiff(TileIndexDiffC tidc)
/**
* Adds an offset to a tile and check if we are still on the map.
*/
-uint TileAddWrap(TileIndex tile, int addx, int addy);
+TileIndex TileAddWrap(TileIndex tile, int addx, int addy);
/**
* Returns the TileIndexDiffC offset from a DiagDirection.
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index 0605de526..3ef44acd7 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -577,7 +577,8 @@ static void AnimateTile_Water(TileIndex tile)
*
* @param tile tile to check
*/
-static inline void MarkTileDirtyIfCanal(TileIndex tile) {
+static inline void MarkTileDirtyIfCanal(TileIndex tile)
+{
if (IsTileType(tile, MP_WATER) && IsCanal(tile)) MarkTileDirtyByTile(tile);
}