(svn r23094) -Codechange: add a default NULL to GetFoundationSlope and use it

This commit is contained in:
rubidium
2011-11-04 10:23:48 +00:00
parent 2ed0f93bfb
commit ecbc56a677
5 changed files with 7 additions and 6 deletions

View File

@@ -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;
}