mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-12 17:19:09 +00:00
(svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums
This commit is contained in:
@@ -250,10 +250,9 @@ static void DrawTile_Trees(TileInfo *ti)
|
||||
DrawClearLandFence(ti);
|
||||
|
||||
z = ti->z;
|
||||
if (ti->tileh != 0) {
|
||||
if (ti->tileh != SLOPE_FLAT) {
|
||||
z += 4;
|
||||
if (IsSteepTileh(ti->tileh))
|
||||
z += 4;
|
||||
if (IsSteepSlope(ti->tileh)) z += 4;
|
||||
}
|
||||
|
||||
{
|
||||
@@ -329,7 +328,7 @@ static uint GetSlopeZ_Trees(const TileInfo* ti)
|
||||
return GetPartialZ(ti->x & 0xF, ti->y & 0xF, ti->tileh) + ti->z;
|
||||
}
|
||||
|
||||
static uint GetSlopeTileh_Trees(TileIndex tile, uint tileh)
|
||||
static Slope GetSlopeTileh_Trees(TileIndex tile, Slope tileh)
|
||||
{
|
||||
return tileh;
|
||||
}
|
||||
|
Reference in New Issue
Block a user