OpenTTD Source 20260704-master-gbf70c61fb8
Sprites for rail and rail stations.

Topics

 Base sprites for elrail.
 Offsets via an enum are used so a complete list of absolute sprite numbers is unnecessary.

Variables

static const uint16_t SPR_RAIL_SNOW_OFFSET = 26
 Sprite number difference between a piece of rail track on a snowy ground and the corresponding one on normal ground.
static const uint16_t SPR_MONO_SNOW_OFFSET = 26
 Sprite number difference between a piece of monorail track on a snowy ground and the corresponding one on normal ground.
static const uint16_t SPR_MGLV_SNOW_OFFSET = 26
 Sprite number difference between a piece of maglev track on a snowy ground and the corresponding one on normal ground.
static const SpriteID SPR_ORIGINAL_SIGNALS_BASE = 1275
 Sprite number of the first block sginall.
static const SpriteID SPR_RAIL_SINGLE_X = 1005
static const SpriteID SPR_RAIL_SINGLE_Y = 1006
static const SpriteID SPR_RAIL_SINGLE_NORTH = 1007
static const SpriteID SPR_RAIL_SINGLE_SOUTH = 1008
static const SpriteID SPR_RAIL_SINGLE_EAST = 1009
static const SpriteID SPR_RAIL_SINGLE_WEST = 1010
static const SpriteID SPR_RAIL_TRACK_Y = 1011
static const SpriteID SPR_RAIL_TRACK_X = 1012
static const SpriteID SPR_RAIL_TRACK_BASE = 1018
static const SpriteID SPR_RAIL_TRACK_N_S = 1035
static const SpriteID SPR_RAIL_TRACK_Y_SNOW = 1037
static const SpriteID SPR_RAIL_TRACK_X_SNOW = 1038
static const SpriteID SPR_RAIL_DEPOT_SE_1 = 1063
static const SpriteID SPR_RAIL_DEPOT_SE_2 = 1064
static const SpriteID SPR_RAIL_DEPOT_SW_1 = 1065
static const SpriteID SPR_RAIL_DEPOT_SW_2 = 1066
static const SpriteID SPR_RAIL_DEPOT_NE = 1067
static const SpriteID SPR_RAIL_DEPOT_NW = 1068
static const SpriteID SPR_RAIL_PLATFORM_Y_FRONT = 1069
static const SpriteID SPR_RAIL_PLATFORM_X_REAR = 1070
static const SpriteID SPR_RAIL_PLATFORM_Y_REAR = 1071
static const SpriteID SPR_RAIL_PLATFORM_X_FRONT = 1072
static const SpriteID SPR_RAIL_PLATFORM_BUILDING_X = 1073
static const SpriteID SPR_RAIL_PLATFORM_BUILDING_Y = 1074
static const SpriteID SPR_RAIL_PLATFORM_PILLARS_Y_FRONT = 1075
static const SpriteID SPR_RAIL_PLATFORM_PILLARS_X_REAR = 1076
static const SpriteID SPR_RAIL_PLATFORM_PILLARS_Y_REAR = 1077
static const SpriteID SPR_RAIL_PLATFORM_PILLARS_X_FRONT = 1078
static const SpriteID SPR_RAIL_ROOF_STRUCTURE_X_TILE_A = 1079
 First half of the roof structure.
static const SpriteID SPR_RAIL_ROOF_STRUCTURE_Y_TILE_A = 1080
 First half of the roof structure.
static const SpriteID SPR_RAIL_ROOF_STRUCTURE_X_TILE_B = 1081
 Second half of the roof structure.
static const SpriteID SPR_RAIL_ROOF_STRUCTURE_Y_TILE_B = 1082
 Second half of the roof structure.
static const SpriteID SPR_RAIL_ROOF_GLASS_X_TILE_A = 1083
 First half of the roof glass.
static const SpriteID SPR_RAIL_ROOF_GLASS_Y_TILE_A = 1084
 First half of the roof glass.
static const SpriteID SPR_RAIL_ROOF_GLASS_X_TILE_B = 1085
 Second half of the roof glass.
static const SpriteID SPR_RAIL_ROOF_GLASS_Y_TILE_B = 1086
 Second half of the roof glass.
static const SpriteID SPR_MONO_SINGLE_X = 1087
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
static const SpriteID SPR_TRACK_FENCE_FLAT_X = 1301
static const SpriteID SPR_TRACK_FENCE_FLAT_Y = 1302
static const SpriteID SPR_TRACK_FENCE_FLAT_VERT = 1303
static const SpriteID SPR_TRACK_FENCE_FLAT_HORZ = 1304
static const SpriteID SPR_TRACK_FENCE_SLOPE_SW = 1305
static const SpriteID SPR_TRACK_FENCE_SLOPE_SE = 1306
static const SpriteID SPR_TRACK_FENCE_SLOPE_NE = 1307
static const SpriteID SPR_TRACK_FENCE_SLOPE_NW = 1308

Detailed Description

See also
_track_sloped_sprites in rail_cmd.cpp for slope offsets.

Variable Documentation

◆ SPR_MGLV_SINGLE_EAST

const SpriteID SPR_MGLV_SINGLE_EAST = 1173
static

Maglev sprites.

Definition at line 497 of file sprites.h.

◆ SPR_MGLV_SINGLE_NORTH

const SpriteID SPR_MGLV_SINGLE_NORTH = 1171
static

Maglev sprites.

Definition at line 495 of file sprites.h.

◆ SPR_MGLV_SINGLE_SOUTH

const SpriteID SPR_MGLV_SINGLE_SOUTH = 1172
static

Maglev sprites.

Definition at line 496 of file sprites.h.

◆ SPR_MGLV_SINGLE_WEST

const SpriteID SPR_MGLV_SINGLE_WEST = 1174
static

Maglev sprites.

Definition at line 498 of file sprites.h.

◆ SPR_MGLV_SINGLE_X

const SpriteID SPR_MGLV_SINGLE_X = 1169
static

Maglev sprites.

Definition at line 493 of file sprites.h.

◆ SPR_MGLV_SINGLE_Y

const SpriteID SPR_MGLV_SINGLE_Y = 1170
static

Maglev sprites.

Definition at line 494 of file sprites.h.

◆ SPR_MGLV_SNOW_OFFSET

const uint16_t SPR_MGLV_SNOW_OFFSET = 26
static

Sprite number difference between a piece of maglev track on a snowy ground and the corresponding one on normal ground.

Definition at line 432 of file sprites.h.

◆ SPR_MGLV_TRACK_BASE

const SpriteID SPR_MGLV_TRACK_BASE = 1182
static

Maglev sprites.

Definition at line 501 of file sprites.h.

◆ SPR_MGLV_TRACK_N_S

const SpriteID SPR_MGLV_TRACK_N_S = 1199
static

Maglev sprites.

Definition at line 504 of file sprites.h.

◆ SPR_MGLV_TRACK_X

const SpriteID SPR_MGLV_TRACK_X = 1176
static

Maglev sprites.

Definition at line 500 of file sprites.h.

Referenced by SplitGroundSpriteForOverlay().

◆ SPR_MGLV_TRACK_X_SNOW

const SpriteID SPR_MGLV_TRACK_X_SNOW = 1185
static

Maglev sprites.

Definition at line 503 of file sprites.h.

Referenced by SplitGroundSpriteForOverlay().

◆ SPR_MGLV_TRACK_Y

const SpriteID SPR_MGLV_TRACK_Y = 1175
static

Maglev sprites.

Definition at line 499 of file sprites.h.

Referenced by SplitGroundSpriteForOverlay().

◆ SPR_MGLV_TRACK_Y_SNOW

const SpriteID SPR_MGLV_TRACK_Y_SNOW = 1184
static

Maglev sprites.

Definition at line 502 of file sprites.h.

Referenced by SplitGroundSpriteForOverlay().

◆ SPR_MONO_SINGLE_EAST

const SpriteID SPR_MONO_SINGLE_EAST = 1091
static

Monorail sprites.

Definition at line 483 of file sprites.h.

◆ SPR_MONO_SINGLE_NORTH

const SpriteID SPR_MONO_SINGLE_NORTH = 1089
static

Monorail sprites.

Definition at line 481 of file sprites.h.

◆ SPR_MONO_SINGLE_SOUTH

const SpriteID SPR_MONO_SINGLE_SOUTH = 1090
static

Monorail sprites.

Definition at line 482 of file sprites.h.

◆ SPR_MONO_SINGLE_WEST

const SpriteID SPR_MONO_SINGLE_WEST = 1092
static

Monorail sprites.

Definition at line 484 of file sprites.h.

◆ SPR_MONO_SINGLE_X

const SpriteID SPR_MONO_SINGLE_X = 1087
static

Monorail sprites.

Definition at line 479 of file sprites.h.

◆ SPR_MONO_SINGLE_Y

const SpriteID SPR_MONO_SINGLE_Y = 1088
static

Monorail sprites.

Definition at line 480 of file sprites.h.

◆ SPR_MONO_SNOW_OFFSET

const uint16_t SPR_MONO_SNOW_OFFSET = 26
static

Sprite number difference between a piece of monorail track on a snowy ground and the corresponding one on normal ground.

Definition at line 431 of file sprites.h.

◆ SPR_MONO_TRACK_BASE

const SpriteID SPR_MONO_TRACK_BASE = 1100
static

Monorail sprites.

Definition at line 487 of file sprites.h.

◆ SPR_MONO_TRACK_N_S

const SpriteID SPR_MONO_TRACK_N_S = 1117
static

Monorail sprites.

Definition at line 488 of file sprites.h.

◆ SPR_MONO_TRACK_X

const SpriteID SPR_MONO_TRACK_X = 1094
static

Monorail sprites.

Definition at line 486 of file sprites.h.

Referenced by SplitGroundSpriteForOverlay().

◆ SPR_MONO_TRACK_X_SNOW

const SpriteID SPR_MONO_TRACK_X_SNOW = 1120
static

Monorail sprites.

Definition at line 490 of file sprites.h.

Referenced by SplitGroundSpriteForOverlay().

◆ SPR_MONO_TRACK_Y

const SpriteID SPR_MONO_TRACK_Y = 1093
static

Monorail sprites.

Definition at line 485 of file sprites.h.

Referenced by SplitGroundSpriteForOverlay().

◆ SPR_MONO_TRACK_Y_SNOW

const SpriteID SPR_MONO_TRACK_Y_SNOW = 1119
static

Monorail sprites.

Definition at line 489 of file sprites.h.

Referenced by SplitGroundSpriteForOverlay().

◆ SPR_ORIGINAL_SIGNALS_BASE

const SpriteID SPR_ORIGINAL_SIGNALS_BASE = 1275
static

Sprite number of the first block sginall.

Definition at line 434 of file sprites.h.

◆ SPR_RAIL_DEPOT_NE

const SpriteID SPR_RAIL_DEPOT_NE = 1067
static

Train depot sprites.

Definition at line 455 of file sprites.h.

◆ SPR_RAIL_DEPOT_NW

const SpriteID SPR_RAIL_DEPOT_NW = 1068
static

Train depot sprites.

Definition at line 456 of file sprites.h.

◆ SPR_RAIL_DEPOT_SE_1

const SpriteID SPR_RAIL_DEPOT_SE_1 = 1063
static

Train depot sprites.

Definition at line 451 of file sprites.h.

Referenced by DrawTile_Rail(), and DrawTrainDepotSprite().

◆ SPR_RAIL_DEPOT_SE_2

const SpriteID SPR_RAIL_DEPOT_SE_2 = 1064
static

Train depot sprites.

Definition at line 452 of file sprites.h.

◆ SPR_RAIL_DEPOT_SW_1

const SpriteID SPR_RAIL_DEPOT_SW_1 = 1065
static

Train depot sprites.

Definition at line 453 of file sprites.h.

◆ SPR_RAIL_DEPOT_SW_2

const SpriteID SPR_RAIL_DEPOT_SW_2 = 1066
static

Train depot sprites.

Definition at line 454 of file sprites.h.

◆ SPR_RAIL_PLATFORM_BUILDING_X

const SpriteID SPR_RAIL_PLATFORM_BUILDING_X = 1073
static

Rail station sprites.

Definition at line 463 of file sprites.h.

◆ SPR_RAIL_PLATFORM_BUILDING_Y

const SpriteID SPR_RAIL_PLATFORM_BUILDING_Y = 1074
static

Rail station sprites.

Definition at line 464 of file sprites.h.

◆ SPR_RAIL_PLATFORM_PILLARS_X_FRONT

const SpriteID SPR_RAIL_PLATFORM_PILLARS_X_FRONT = 1078
static

Rail station sprites.

Definition at line 468 of file sprites.h.

◆ SPR_RAIL_PLATFORM_PILLARS_X_REAR

const SpriteID SPR_RAIL_PLATFORM_PILLARS_X_REAR = 1076
static

Rail station sprites.

Definition at line 466 of file sprites.h.

◆ SPR_RAIL_PLATFORM_PILLARS_Y_FRONT

const SpriteID SPR_RAIL_PLATFORM_PILLARS_Y_FRONT = 1075
static

Rail station sprites.

Definition at line 465 of file sprites.h.

◆ SPR_RAIL_PLATFORM_PILLARS_Y_REAR

const SpriteID SPR_RAIL_PLATFORM_PILLARS_Y_REAR = 1077
static

Rail station sprites.

Definition at line 467 of file sprites.h.

◆ SPR_RAIL_PLATFORM_X_FRONT

const SpriteID SPR_RAIL_PLATFORM_X_FRONT = 1072
static

Rail station sprites.

Definition at line 462 of file sprites.h.

◆ SPR_RAIL_PLATFORM_X_REAR

const SpriteID SPR_RAIL_PLATFORM_X_REAR = 1070
static

Rail station sprites.

Definition at line 460 of file sprites.h.

◆ SPR_RAIL_PLATFORM_Y_FRONT

const SpriteID SPR_RAIL_PLATFORM_Y_FRONT = 1069
static

Rail station sprites.

Definition at line 459 of file sprites.h.

Referenced by GetCustomStationRelocation().

◆ SPR_RAIL_PLATFORM_Y_REAR

const SpriteID SPR_RAIL_PLATFORM_Y_REAR = 1071
static

Rail station sprites.

Definition at line 461 of file sprites.h.

◆ SPR_RAIL_ROOF_GLASS_X_TILE_A

const SpriteID SPR_RAIL_ROOF_GLASS_X_TILE_A = 1083
static

First half of the roof glass.

Definition at line 473 of file sprites.h.

◆ SPR_RAIL_ROOF_GLASS_X_TILE_B

const SpriteID SPR_RAIL_ROOF_GLASS_X_TILE_B = 1085
static

Second half of the roof glass.

Definition at line 475 of file sprites.h.

◆ SPR_RAIL_ROOF_GLASS_Y_TILE_A

const SpriteID SPR_RAIL_ROOF_GLASS_Y_TILE_A = 1084
static

First half of the roof glass.

Definition at line 474 of file sprites.h.

◆ SPR_RAIL_ROOF_GLASS_Y_TILE_B

const SpriteID SPR_RAIL_ROOF_GLASS_Y_TILE_B = 1086
static

Second half of the roof glass.

Definition at line 476 of file sprites.h.

◆ SPR_RAIL_ROOF_STRUCTURE_X_TILE_A

const SpriteID SPR_RAIL_ROOF_STRUCTURE_X_TILE_A = 1079
static

First half of the roof structure.

Definition at line 469 of file sprites.h.

◆ SPR_RAIL_ROOF_STRUCTURE_X_TILE_B

const SpriteID SPR_RAIL_ROOF_STRUCTURE_X_TILE_B = 1081
static

Second half of the roof structure.

Definition at line 471 of file sprites.h.

◆ SPR_RAIL_ROOF_STRUCTURE_Y_TILE_A

const SpriteID SPR_RAIL_ROOF_STRUCTURE_Y_TILE_A = 1080
static

First half of the roof structure.

Definition at line 470 of file sprites.h.

◆ SPR_RAIL_ROOF_STRUCTURE_Y_TILE_B

const SpriteID SPR_RAIL_ROOF_STRUCTURE_Y_TILE_B = 1082
static

Second half of the roof structure.

Definition at line 472 of file sprites.h.

◆ SPR_RAIL_SINGLE_EAST

const SpriteID SPR_RAIL_SINGLE_EAST = 1009
static

Default rail sprites.

Definition at line 441 of file sprites.h.

◆ SPR_RAIL_SINGLE_NORTH

const SpriteID SPR_RAIL_SINGLE_NORTH = 1007
static

Default rail sprites.

Definition at line 439 of file sprites.h.

◆ SPR_RAIL_SINGLE_SOUTH

const SpriteID SPR_RAIL_SINGLE_SOUTH = 1008
static

Default rail sprites.

Definition at line 440 of file sprites.h.

◆ SPR_RAIL_SINGLE_WEST

const SpriteID SPR_RAIL_SINGLE_WEST = 1010
static

Default rail sprites.

Definition at line 442 of file sprites.h.

◆ SPR_RAIL_SINGLE_X

const SpriteID SPR_RAIL_SINGLE_X = 1005
static

Default rail sprites.

Definition at line 437 of file sprites.h.

◆ SPR_RAIL_SINGLE_Y

const SpriteID SPR_RAIL_SINGLE_Y = 1006
static

Default rail sprites.

Definition at line 438 of file sprites.h.

◆ SPR_RAIL_SNOW_OFFSET

const uint16_t SPR_RAIL_SNOW_OFFSET = 26
static

Sprite number difference between a piece of rail track on a snowy ground and the corresponding one on normal ground.

Definition at line 430 of file sprites.h.

◆ SPR_RAIL_TRACK_BASE

const SpriteID SPR_RAIL_TRACK_BASE = 1018
static

Default rail sprites.

Definition at line 445 of file sprites.h.

◆ SPR_RAIL_TRACK_N_S

const SpriteID SPR_RAIL_TRACK_N_S = 1035
static

Default rail sprites.

Definition at line 446 of file sprites.h.

◆ SPR_RAIL_TRACK_X

const SpriteID SPR_RAIL_TRACK_X = 1012
static

Default rail sprites.

Definition at line 444 of file sprites.h.

Referenced by SplitGroundSpriteForOverlay().

◆ SPR_RAIL_TRACK_X_SNOW

const SpriteID SPR_RAIL_TRACK_X_SNOW = 1038
static

Default rail sprites.

Definition at line 448 of file sprites.h.

Referenced by SplitGroundSpriteForOverlay().

◆ SPR_RAIL_TRACK_Y

const SpriteID SPR_RAIL_TRACK_Y = 1011
static

Default rail sprites.

Definition at line 443 of file sprites.h.

Referenced by SplitGroundSpriteForOverlay().

◆ SPR_RAIL_TRACK_Y_SNOW

const SpriteID SPR_RAIL_TRACK_Y_SNOW = 1037
static

Default rail sprites.

Definition at line 447 of file sprites.h.

Referenced by SplitGroundSpriteForOverlay().

◆ SPR_TRACK_FENCE_FLAT_HORZ

const SpriteID SPR_TRACK_FENCE_FLAT_HORZ = 1304
static

Track fences.

Definition at line 516 of file sprites.h.

◆ SPR_TRACK_FENCE_FLAT_VERT

const SpriteID SPR_TRACK_FENCE_FLAT_VERT = 1303
static

Track fences.

Definition at line 515 of file sprites.h.

◆ SPR_TRACK_FENCE_FLAT_X

const SpriteID SPR_TRACK_FENCE_FLAT_X = 1301
static

Track fences.

Definition at line 513 of file sprites.h.

Referenced by DrawTrackDetails().

◆ SPR_TRACK_FENCE_FLAT_Y

const SpriteID SPR_TRACK_FENCE_FLAT_Y = 1302
static

Track fences.

Definition at line 514 of file sprites.h.

◆ SPR_TRACK_FENCE_SLOPE_NE

const SpriteID SPR_TRACK_FENCE_SLOPE_NE = 1307
static

Track fences.

Definition at line 519 of file sprites.h.

◆ SPR_TRACK_FENCE_SLOPE_NW

const SpriteID SPR_TRACK_FENCE_SLOPE_NW = 1308
static

Track fences.

Definition at line 520 of file sprites.h.

◆ SPR_TRACK_FENCE_SLOPE_SE

const SpriteID SPR_TRACK_FENCE_SLOPE_SE = 1306
static

Track fences.

Definition at line 518 of file sprites.h.

◆ SPR_TRACK_FENCE_SLOPE_SW

const SpriteID SPR_TRACK_FENCE_SLOPE_SW = 1305
static

Track fences.

Definition at line 517 of file sprites.h.

◆ SPR_WAYPOINT_X_1

const SpriteID SPR_WAYPOINT_X_1 = SPR_OPENTTD_BASE + 78
static

Waypoint sprites.

Definition at line 507 of file sprites.h.

◆ SPR_WAYPOINT_X_2

const SpriteID SPR_WAYPOINT_X_2 = SPR_OPENTTD_BASE + 79
static

Waypoint sprites.

Definition at line 508 of file sprites.h.

◆ SPR_WAYPOINT_Y_1

const SpriteID SPR_WAYPOINT_Y_1 = SPR_OPENTTD_BASE + 80
static

Waypoint sprites.

Definition at line 509 of file sprites.h.

◆ SPR_WAYPOINT_Y_2

const SpriteID SPR_WAYPOINT_Y_2 = SPR_OPENTTD_BASE + 81
static

Waypoint sprites.

Definition at line 510 of file sprites.h.