1
0
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:
tron
2006-04-23 13:48:16 +00:00
parent b5ce99c52d
commit 0347fb2ab6
28 changed files with 339 additions and 292 deletions

View File

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