Changeset - r15213:79a4f21fe730
[Not reviewed]
master
0 2 0
frosch - 15 years ago 2010-05-18 20:49:53
frosch@openttd.org
(svn r19852) -Fix [FS#TT-MS]: Drawing fallback sprites for unavailable NewGRF waypoints failed.
2 files changed with 12 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -2580,7 +2580,7 @@ static void DrawTile_Station(TileInfo *t
 
		palette = PALETTE_TO_GREY;
 
	}
 

	
 
	if (t == NULL || t->seq == NULL) t = &_station_display_datas[GetStationType(ti->tile)][GetStationGfx(ti->tile)];
 
	if (t == NULL || t->seq == NULL) t = GetStationTileLayout(GetStationType(ti->tile), GetStationGfx(ti->tile));
 

	
 
	/* don't show foundation for docks */
 
	if (ti->tileh != SLOPE_FLAT && !IsDock(ti->tile)) {
 
@@ -2702,7 +2702,7 @@ void StationPickerDrawSprite(int x, int 
 
{
 
	int32 total_offset = 0;
 
	PaletteID pal = COMPANY_SPRITE_COLOUR(_local_company);
 
	const DrawTileSprites *t = &_station_display_datas[st][image];
 
	const DrawTileSprites *t = GetStationTileLayout(st, image);
 
	const RailtypeInfo *rti = NULL;
 

	
 
	if (railtype != INVALID_RAILTYPE) {
src/table/station_land.h
Show inline comments
 
@@ -954,11 +954,21 @@ static const DrawTileSprites _station_di
 
static const DrawTileSprites _station_display_datas_waypoint[] = {
 
	TILE_SPRITE_LINE(SPR_RAIL_TRACK_X,               _station_display_datas_waypoint_X)
 
	TILE_SPRITE_LINE(SPR_RAIL_TRACK_Y,               _station_display_datas_waypoint_Y)
 
	TILE_SPRITE_LINE(SPR_RAIL_TRACK_X,               _station_display_datas_waypoint_X)
 
	TILE_SPRITE_LINE(SPR_RAIL_TRACK_Y,               _station_display_datas_waypoint_Y)
 
	TILE_SPRITE_LINE(SPR_RAIL_TRACK_X,               _station_display_datas_waypoint_X)
 
	TILE_SPRITE_LINE(SPR_RAIL_TRACK_Y,               _station_display_datas_waypoint_Y)
 
	TILE_SPRITE_LINE(SPR_RAIL_TRACK_X,               _station_display_datas_waypoint_X)
 
	TILE_SPRITE_LINE(SPR_RAIL_TRACK_Y,               _station_display_datas_waypoint_Y)
 
};
 

	
 
#undef TILE_SPRITE_LINE
 
#undef TILE_SPRITE_NULL
 

	
 
/* Default waypoint is also drawn as fallback for NewGRF waypoints.
 
 * As these are drawn/build like stations, they may use the same number of layouts. */
 
assert_compile(lengthof(_station_display_datas_rail) == lengthof(_station_display_datas_waypoint));
 

	
 
static const DrawTileSprites * const _station_display_datas[] = {
 
	_station_display_datas_rail,
 
	_station_display_datas_airport,
0 comments (0 inline, 0 general)