(svn r23092) -Codechange: create a non-pixel version of some of the Get*PixelZ functions, and let Get*PixelZ wrap around the new function (multiplying the Z by TILE_HEIGHT) just like TileHeight and TilePixelHeight
This commit is contained in:
@@ -159,11 +159,22 @@ static inline Corner GetHalftileSlopeCorner(Slope s)
|
||||
* @param s The #Slope.
|
||||
* @return Relative height of highest corner.
|
||||
*/
|
||||
static inline uint GetSlopeMaxPixelZ(Slope s)
|
||||
static inline uint GetSlopeMaxZ(Slope s)
|
||||
{
|
||||
if (s == SLOPE_FLAT) return 0;
|
||||
if (IsSteepSlope(s)) return 2 * TILE_HEIGHT;
|
||||
return TILE_HEIGHT;
|
||||
if (IsSteepSlope(s)) return 2;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the highest corner of a slope relative to TileZ (= minimal height)
|
||||
*
|
||||
* @param s The #Slope.
|
||||
* @return Relative height of highest corner.
|
||||
*/
|
||||
static inline uint GetSlopeMaxPixelZ(Slope s)
|
||||
{
|
||||
return GetSlopeMaxZ(s) * TILE_HEIGHT;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user