(svn r2515) -Codechange: Removed a good deal of magic sprite numbers in the rail drawing code, and placed neatly into arrays and enums. This also makes way to implement more railtypes without having to do tons of ugly hacks.

This commit is contained in:
celestar
2005-07-04 10:01:06 +00:00
parent e675794812
commit d07e1a875e
2 changed files with 124 additions and 15 deletions

View File

@@ -112,8 +112,20 @@ enum Sprites {
SPR_BOUGHT_LAND = 4790,
/* sprites for rail and rail stations*/
SPR_RAIL_SNOW_OFFSET = 26,
SPR_MONO_SNOW_OFFSET = 26,
SPR_MGLV_SNOW_OFFSET = 26,
SPR_RAIL_SINGLE_Y = 1005,
SPR_RAIL_SINGLE_X = 1006,
SPR_RAIL_SINGLE_NORTH = 1007,
SPR_RAIL_SINGLE_SOUTH = 1008,
SPR_RAIL_SINGLE_EAST = 1009,
SPR_RAIL_SINGLE_WEST = 1010,
SPR_RAIL_TRACK_Y = 1011,
SPR_RAIL_TRACK_X = 1012,
SPR_RAIL_TRACK_BASE = 1018,
SPR_RAIL_TRACK_N_S = 1035,
SPR_RAIL_TRACK_Y_SNOW = 1037,
SPR_RAIL_TRACK_X_SNOW = 1038,
SPR_RAIL_DEPOT_SE_1 = 1063,
@@ -140,6 +152,24 @@ enum Sprites {
SPR_RAIL_ROOF_GLASS_Y_TILE_A = 1084,
SPR_RAIL_ROOF_GLASS_X_TILE_B = 1085, //second half of the roof glass
SPR_RAIL_ROOF_GLASS_Y_TILE_B = 1086,
SPR_MONO_SINGLE_Y = 1087,
SPR_MONO_SINGLE_X = 1088,
SPR_MONO_SINGLE_NORTH = 1089,
SPR_MONO_SINGLE_SOUTH = 1090,
SPR_MONO_SINGLE_EAST = 1091,
SPR_MONO_SINGLE_WEST = 1092,
SPR_MONO_TRACK_Y = 1093,
SPR_MONO_TRACK_BASE = 1100,
SPR_MONO_TRACK_N_S = 1117,
SPR_MGLV_SINGLE_Y = 1169,
SPR_MGLV_SINGLE_X = 1170,
SPR_MGLV_SINGLE_NORTH = 1171,
SPR_MGLV_SINGLE_SOUTH = 1172,
SPR_MGLV_SINGLE_EAST = 1173,
SPR_MGLV_SINGLE_WEST = 1174,
SPR_MGLV_TRACK_Y = 1175,
SPR_MGLV_TRACK_BASE = 1182,
SPR_MGLV_TRACK_N_S = 1199,
SPR_WAYPOINT_X_1 = SPR_OPENTTD_BASE + 18,
SPR_WAYPOINT_X_2 = SPR_OPENTTD_BASE + 19,
SPR_WAYPOINT_Y_1 = SPR_OPENTTD_BASE + 20,