Changeset - r23592:53cb7271a53a
[Not reviewed]
master
0 2 0
kiwitreekor - 6 years ago 2019-04-02 18:23:19
kiwitreekor@gmail.com
Fix #6222: Advanced sprite layout sometimes showed incorrect railtype ground tile
2 files changed with 14 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -2678,27 +2678,35 @@ const DrawTileSprites *GetStationTileLay
 
 */
 
bool SplitGroundSpriteForOverlay(const TileInfo *ti, SpriteID *ground, RailTrackOffset *overlay_offset)
 
{
 
	bool snow_desert;
 
	switch (*ground) {
 
		case SPR_RAIL_TRACK_X:
 
		case SPR_MONO_TRACK_X:
 
		case SPR_MGLV_TRACK_X:
 
			snow_desert = false;
 
			*overlay_offset = RTO_X;
 
			break;
 

	
 
		case SPR_RAIL_TRACK_Y:
 
		case SPR_MONO_TRACK_Y:
 
		case SPR_MGLV_TRACK_Y:
 
			snow_desert = false;
 
			*overlay_offset = RTO_Y;
 
			break;
 

	
 
		case SPR_RAIL_TRACK_X_SNOW:
 
		case SPR_MONO_TRACK_X_SNOW:
 
		case SPR_MGLV_TRACK_X_SNOW:
 
			snow_desert = true;
 
			*overlay_offset = RTO_X;
 
			break;
 

	
 
		case SPR_RAIL_TRACK_Y_SNOW:
 
		case SPR_MONO_TRACK_Y_SNOW:
 
		case SPR_MGLV_TRACK_Y_SNOW:
 
			snow_desert = true;
 
			*overlay_offset = RTO_Y;
 
			break;
 

	
 
		default:
 
			return false;
src/table/sprites.h
Show inline comments
 
@@ -399,22 +399,28 @@ static const SpriteID SPR_MONO_SINGLE_X 
 
static const SpriteID SPR_MONO_SINGLE_Y                 = 1088;
 
static const SpriteID SPR_MONO_SINGLE_NORTH             = 1089;
 
static const SpriteID SPR_MONO_SINGLE_SOUTH             = 1090;
 
static const SpriteID SPR_MONO_SINGLE_EAST              = 1091;
 
static const SpriteID SPR_MONO_SINGLE_WEST              = 1092;
 
static const SpriteID SPR_MONO_TRACK_Y                  = 1093;
 
static const SpriteID SPR_MONO_TRACK_X                  = 1094;
 
static const SpriteID SPR_MONO_TRACK_BASE               = 1100;
 
static const SpriteID SPR_MONO_TRACK_N_S                = 1117;
 
static const SpriteID SPR_MONO_TRACK_Y_SNOW             = 1119;
 
static const SpriteID SPR_MONO_TRACK_X_SNOW             = 1120;
 
static const SpriteID SPR_MGLV_SINGLE_X                 = 1169;
 
static const SpriteID SPR_MGLV_SINGLE_Y                 = 1170;
 
static const SpriteID SPR_MGLV_SINGLE_NORTH             = 1171;
 
static const SpriteID SPR_MGLV_SINGLE_SOUTH             = 1172;
 
static const SpriteID SPR_MGLV_SINGLE_EAST              = 1173;
 
static const SpriteID SPR_MGLV_SINGLE_WEST              = 1174;
 
static const SpriteID SPR_MGLV_TRACK_Y                  = 1175;
 
static const SpriteID SPR_MGLV_TRACK_X                  = 1176;
 
static const SpriteID SPR_MGLV_TRACK_BASE               = 1182;
 
static const SpriteID SPR_MGLV_TRACK_Y_SNOW             = 1184;
 
static const SpriteID SPR_MGLV_TRACK_X_SNOW             = 1185;
 
static const SpriteID SPR_MGLV_TRACK_N_S                = 1199;
 
static const SpriteID SPR_WAYPOINT_X_1            = SPR_OPENTTD_BASE + 78;
 
static const SpriteID SPR_WAYPOINT_X_2            = SPR_OPENTTD_BASE + 79;
 
static const SpriteID SPR_WAYPOINT_Y_1            = SPR_OPENTTD_BASE + 80;
 
static const SpriteID SPR_WAYPOINT_Y_2            = SPR_OPENTTD_BASE + 81;
 
/* see _track_sloped_sprites in rail_cmd.cpp for slope offsets */
0 comments (0 inline, 0 general)