diff options
author | tron <tron@openttd.org> | 2005-01-16 11:24:58 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-16 11:24:58 +0000 |
commit | ae796740aab0ee480759d2015014b29e2a7aedb4 (patch) | |
tree | bc9e7bccf2119556badf2efe43aca901dfc0a76e /smallmap_gui.c | |
parent | d2643dc483abbd086441b126912f466127253b06 (diff) | |
download | openttd-ae796740aab0ee480759d2015014b29e2a7aedb4.tar.xz |
(svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn them into inline functions and add some asserts
Diffstat (limited to 'smallmap_gui.c')
-rw-r--r-- | smallmap_gui.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/smallmap_gui.c b/smallmap_gui.c index e7073eede..0f8c0ff50 100644 --- a/smallmap_gui.c +++ b/smallmap_gui.c @@ -297,7 +297,7 @@ static inline uint32 GetSmallMapCountoursPixels(uint tile) { uint t; - t = GET_TILETYPE(tile); + t = TileType(tile); if (t == MP_TUNNELBRIDGE) { t = _map5[tile]; if ((t & 0x80) == 0) t>>=1; @@ -327,7 +327,7 @@ static inline uint32 GetSmallMapVehiclesPixels(uint tile) { uint t; - t = GET_TILETYPE(tile); + t = TileType(tile); if (t == MP_TUNNELBRIDGE) { t = _map5[tile]; if ((t & 0x80) == 0) t>>=1; @@ -380,7 +380,7 @@ static inline uint32 GetSmallMapIndustriesPixels(uint tile) { int t; - t = GET_TILETYPE(tile); + t = TileType(tile); if (t == MP_INDUSTRY) { byte color = _industry_smallmap_colors[_map5[tile]]; return color + (color << 8) + (color << 16) + (color << 24); @@ -413,7 +413,7 @@ static inline uint32 GetSmallMapRoutesPixels(uint tile) int t; uint32 bits; - t = GET_TILETYPE(tile); + t = TileType(tile); if (t == MP_STATION) { byte m5 = _map5[tile]; (bits = MKCOLOR(0x56565656), m5 < 8) || // 8 - railroad station (green) @@ -469,7 +469,7 @@ static inline uint32 GetSmallMapVegetationPixels(uint tile) int i,t; uint32 bits; - t = GET_TILETYPE(tile); + t = TileType(tile); if (t == MP_CLEAR) { i = (_map5[tile] & 0x1F) - 4; if (i >= 0) i = (i >> 2); @@ -514,7 +514,7 @@ static inline uint32 GetSmallMapOwnerPixels(uint tile) { int t; - t = GET_TILETYPE(tile); + t = TileType(tile); if (t == MP_HOUSE || _map_owner[tile] == OWNER_TOWN) { t = 0x80; } else if (t == MP_INDUSTRY) { |