summaryrefslogtreecommitdiff
path: root/src/landscape.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-11-04 10:23:48 +0000
committerrubidium <rubidium@openttd.org>2011-11-04 10:23:48 +0000
commitecbc56a67711bfc37d751f9c3bff2a464ea03564 (patch)
tree59bf90cf6155c7940d6c56735a2cfd491e300bd3 /src/landscape.h
parent2ed0f93bfbd27ba4b4dc3e590556ffae6d9b9338 (diff)
downloadopenttd-ecbc56a67711bfc37d751f9c3bff2a464ea03564.tar.xz
(svn r23094) -Codechange: add a default NULL to GetFoundationSlope and use it
Diffstat (limited to 'src/landscape.h')
-rw-r--r--src/landscape.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/landscape.h b/src/landscape.h
index f3071868f..a62bde13f 100644
--- a/src/landscape.h
+++ b/src/landscape.h
@@ -36,7 +36,7 @@ byte LowestSnowLine();
void ClearSnowLine();
int GetSlopeZInCorner(Slope tileh, Corner corner);
-Slope GetFoundationSlope(TileIndex tile, uint *z);
+Slope GetFoundationSlope(TileIndex tile, uint *z = NULL);
uint GetPartialPixelZ(int x, int y, Slope corners);
uint GetSlopePixelZ(int x, int y);
@@ -66,8 +66,9 @@ static inline int GetSlopePixelZInCorner(Slope tileh, Corner corner)
*/
static inline Slope GetFoundationPixelSlope(TileIndex tile, uint *z)
{
+ assert(z != NULL);
Slope s = GetFoundationSlope(tile, z);
- if (z != NULL) *z *= TILE_HEIGHT;
+ *z *= TILE_HEIGHT;
return s;
}