(svn r19195) -Codechange: actually draw newgrf airport tiles

This commit is contained in:
yexo
2010-02-22 14:16:41 +00:00
parent 80fb5c70c8
commit 880fedc192
7 changed files with 272 additions and 2 deletions

View File

@@ -2398,7 +2398,18 @@ static void DrawTile_Station(TileInfo *ti)
}
if (IsAirport(ti->tile)) {
switch (GetStationGfx(ti->tile)) {
StationGfx gfx = GetAirportGfx(ti->tile);
if (gfx >= NEW_AIRPORTTILE_OFFSET) {
const AirportTileSpec *ats = AirportTileSpec::Get(gfx);
if (ats->grf_prop.spritegroup != NULL && DrawNewAirportTile(ti, Station::GetByTile(ti->tile), gfx, ats)) {
return;
}
/* No sprite group (or no valid one) found, meaning no graphics associated.
* Use the substitute one instead */
assert(ats->grf_prop.subst_id != INVALID_AIRPORTTILE);
gfx = ats->grf_prop.subst_id;
}
switch (gfx) {
case APT_RADAR_GRASS_FENCE_SW:
t = &_station_display_datas_airport_radar_grass_fence_sw[GetStationAnimationFrame(ti->tile)];
break;