50
50
/* Extra graphic spritenumbers */
51
51
SPR_OPENTTD_BASE = 4896,
52
OPENTTD_SPRITE_COUNT = 138,
52
OPENTTD_SPRITE_COUNT = 149,
54
54
/* Halftile-selection sprites */
55
55
SPR_HALFTILE_SELECTION_FLAT = SPR_OPENTTD_BASE,
56
56
SPR_HALFTILE_SELECTION_DOWN = SPR_OPENTTD_BASE + 4,
57
57
SPR_HALFTILE_SELECTION_UP = SPR_OPENTTD_BASE + 8,
59
SPR_SQUARE = SPR_OPENTTD_BASE + 38, // colored square (used for newgrf compatibility)
60
SPR_BLOT = SPR_OPENTTD_BASE + 39, // colored circle (mainly used as vehicle profit marker and for server compatibility)
59
SPR_SQUARE = SPR_OPENTTD_BASE + 38, // coloured square (used for newgrf compatibility)
60
SPR_BLOT = SPR_OPENTTD_BASE + 39, // coloured circle (mainly used as vehicle profit marker and for server compatibility)
61
61
SPR_LOCK = SPR_OPENTTD_BASE + 40, // lock icon (for password protected servers)
62
62
SPR_BOX_EMPTY = SPR_OPENTTD_BASE + 41,
63
63
SPR_BOX_CHECKED = SPR_OPENTTD_BASE + 42,
73
73
SPR_PIN_UP = SPR_OPENTTD_BASE + 51, // pin icon
74
74
SPR_PIN_DOWN = SPR_OPENTTD_BASE + 52,
76
SPR_CIRCLE_FOLDED = SPR_OPENTTD_BASE + 147, // (+) icon
77
SPR_CIRCLE_UNFOLDED = SPR_OPENTTD_BASE + 148, // (-) icon
79
/* on screen keyboard icons */
80
SPR_OSK_LEFT = SPR_OPENTTD_BASE + 138,
81
SPR_OSK_RIGHT = SPR_OPENTTD_BASE + 139,
82
SPR_OSK_CAPS = SPR_OPENTTD_BASE + 140,
83
SPR_OSK_SHIFT = SPR_OPENTTD_BASE + 141,
84
SPR_OSK_BACKSPACE = SPR_OPENTTD_BASE + 142,
85
SPR_OSK_SPECIAL = SPR_OPENTTD_BASE + 143,
76
87
/* Clone vehicles stuff */
77
88
SPR_CLONE_TRAIN = SPR_OPENTTD_BASE + 106,
78
89
SPR_CLONE_ROADVEH = SPR_OPENTTD_BASE + 107,
122
135
SPR_CANALS_BASE = SPR_SIGNALS_BASE + PRESIGNAL_SEMAPHORE_AND_PBS_SPRITE_COUNT,
123
136
CANALS_SPRITE_COUNT = 65,
125
SPR_SLOPES_BASE = SPR_CANALS_BASE + CANALS_SPRITE_COUNT,
138
/* Sprites for the Aqueduct. */
139
SPR_AQUEDUCT_BASE = SPR_CANALS_BASE + CANALS_SPRITE_COUNT,
140
SPR_AQUEDUCT_RAMP_SW = SPR_AQUEDUCT_BASE + 0,
141
SPR_AQUEDUCT_RAMP_SE = SPR_AQUEDUCT_BASE + 1,
142
SPR_AQUEDUCT_RAMP_NE = SPR_AQUEDUCT_BASE + 2,
143
SPR_AQUEDUCT_RAMP_NW = SPR_AQUEDUCT_BASE + 3,
144
SPR_AQUEDUCT_MIDDLE_X = SPR_AQUEDUCT_BASE + 4,
145
SPR_AQUEDUCT_MIDDLE_Y = SPR_AQUEDUCT_BASE + 5,
146
SPR_AQUEDUCT_PILLAR_X = SPR_AQUEDUCT_BASE + 6,
147
SPR_AQUEDUCT_PILLAR_Y = SPR_AQUEDUCT_BASE + 7,
148
AQUEDUCT_SPRITE_COUNT = 8,
150
/* Sprites for 'highlighting' tracks on sloped land. */
151
SPR_TRACKS_FOR_SLOPES_BASE = SPR_AQUEDUCT_BASE + AQUEDUCT_SPRITE_COUNT,
152
SPR_TRACKS_FOR_SLOPES_RAIL_BASE = SPR_TRACKS_FOR_SLOPES_BASE + 0,
153
SPR_TRACKS_FOR_SLOPES_MONO_BASE = SPR_TRACKS_FOR_SLOPES_BASE + 4,
154
SPR_TRACKS_FOR_SLOPES_MAGLEV_BASE = SPR_TRACKS_FOR_SLOPES_BASE + 8,
155
TRACKS_FOR_SLOPES_SPRITE_COUNT = 12,
157
SPR_SLOPES_BASE = SPR_TRACKS_FOR_SLOPES_BASE + TRACKS_FOR_SLOPES_SPRITE_COUNT,
126
158
SPR_SLOPES_INCLINED_OFFSET = 15,
127
159
SPR_SLOPES_VIRTUAL_BASE = SPR_SLOPES_BASE - SPR_SLOPES_INCLINED_OFFSET, // The original foundations (see SPR_FOUNDATION_BASE below) are mapped before the additional foundations.
128
160
SPR_TRKFOUND_BLOCK_SIZE = 22, // The normal track foundation sprites are organized in blocks of 22.
293
325
SPR_RAIL_PLATFORM_PILLARS_X_REAR = 1076,
294
326
SPR_RAIL_PLATFORM_PILLARS_Y_REAR = 1077,
295
327
SPR_RAIL_PLATFORM_PILLARS_X_FRONT = 1078,
296
SPR_RAIL_ROOF_STRUCTURE_X_TILE_A = 1079, //First half of the roof structure
328
SPR_RAIL_ROOF_STRUCTURE_X_TILE_A = 1079, // First half of the roof structure
297
329
SPR_RAIL_ROOF_STRUCTURE_Y_TILE_A = 1080,
298
SPR_RAIL_ROOF_STRUCTURE_X_TILE_B = 1081, //Second half of the roof structure
330
SPR_RAIL_ROOF_STRUCTURE_X_TILE_B = 1081, // Second half of the roof structure
299
331
SPR_RAIL_ROOF_STRUCTURE_Y_TILE_B = 1082,
300
SPR_RAIL_ROOF_GLASS_X_TILE_A = 1083, //First half of the roof glass
332
SPR_RAIL_ROOF_GLASS_X_TILE_A = 1083, // First half of the roof glass
301
333
SPR_RAIL_ROOF_GLASS_Y_TILE_A = 1084,
302
SPR_RAIL_ROOF_GLASS_X_TILE_B = 1085, //second half of the roof glass
334
SPR_RAIL_ROOF_GLASS_X_TILE_B = 1085, // second half of the roof glass
303
335
SPR_RAIL_ROOF_GLASS_Y_TILE_B = 1086,
304
336
SPR_MONO_SINGLE_Y = 1087,
305
337
SPR_MONO_SINGLE_X = 1088,
347
379
SPR_TRACK_FENCE_SLOPE_NE = 1307,
348
380
SPR_TRACK_FENCE_SLOPE_NW = 1308,
351
/* Wires. First identifier is the direction of the track, second is the required placement of the pylon.
352
* "short" denotes a wire that requires a pylon on each end. Third identifier is the direction of the slope
353
* (in positive coordinate direction) */
354
SPR_WIRE_X_SHORT = SPR_ELRAIL_BASE + 0,
355
SPR_WIRE_Y_SHORT = SPR_ELRAIL_BASE + 1,
356
SPR_WIRE_EW_SHORT = SPR_ELRAIL_BASE + 2,
357
SPR_WIRE_NS_SHORT = SPR_ELRAIL_BASE + 3,
358
SPR_WIRE_X_SHORT_DOWN = SPR_ELRAIL_BASE + 4,
359
SPR_WIRE_Y_SHORT_UP = SPR_ELRAIL_BASE + 5,
360
SPR_WIRE_X_SHORT_UP = SPR_ELRAIL_BASE + 6,
361
SPR_WIRE_Y_SHORT_DOWN = SPR_ELRAIL_BASE + 7,
363
SPR_WIRE_X_SW = SPR_ELRAIL_BASE + 8,
364
SPR_WIRE_Y_SE = SPR_ELRAIL_BASE + 9,
365
SPR_WIRE_EW_E = SPR_ELRAIL_BASE + 10,
366
SPR_WIRE_NS_S = SPR_ELRAIL_BASE + 11,
367
SPR_WIRE_X_SW_DOWN = SPR_ELRAIL_BASE + 12,
368
SPR_WIRE_Y_SE_UP = SPR_ELRAIL_BASE + 13,
369
SPR_WIRE_X_SW_UP = SPR_ELRAIL_BASE + 14,
370
SPR_WIRE_Y_SE_DOWN = SPR_ELRAIL_BASE + 15,
372
SPR_WIRE_X_NE = SPR_ELRAIL_BASE + 16,
373
SPR_WIRE_Y_NW = SPR_ELRAIL_BASE + 17,
374
SPR_WIRE_EW_W = SPR_ELRAIL_BASE + 18,
375
SPR_WIRE_NS_N = SPR_ELRAIL_BASE + 19,
376
SPR_WIRE_X_NE_DOWN = SPR_ELRAIL_BASE + 20,
377
SPR_WIRE_Y_NW_UP = SPR_ELRAIL_BASE + 21,
378
SPR_WIRE_X_NE_UP = SPR_ELRAIL_BASE + 22,
379
SPR_WIRE_Y_NW_DOWN = SPR_ELRAIL_BASE + 23,
382
SPR_WIRE_TUNNEL_NE = SPR_ELRAIL_BASE + 24,
383
SPR_WIRE_TUNNEL_SE = SPR_ELRAIL_BASE + 25,
384
SPR_WIRE_TUNNEL_SW = SPR_ELRAIL_BASE + 26,
385
SPR_WIRE_TUNNEL_NW = SPR_ELRAIL_BASE + 27,
388
SPR_WIRE_DEPOT_SW = SPR_ELRAIL_BASE + 24,
389
SPR_WIRE_DEPOT_NW = SPR_ELRAIL_BASE + 25,
390
SPR_WIRE_DEPOT_NE = SPR_ELRAIL_BASE + 26,
391
SPR_WIRE_DEPOT_SE = SPR_ELRAIL_BASE + 27,
394
/* Pylons, first identifier is the direction of the track, second the placement relative to the track */
395
SPR_PYLON_Y_NE = SPR_ELRAIL_BASE + 28,
396
SPR_PYLON_Y_SW = SPR_ELRAIL_BASE + 29,
397
SPR_PYLON_X_NW = SPR_ELRAIL_BASE + 30,
398
SPR_PYLON_X_SE = SPR_ELRAIL_BASE + 31,
399
SPR_PYLON_EW_N = SPR_ELRAIL_BASE + 32,
400
SPR_PYLON_EW_S = SPR_ELRAIL_BASE + 33,
401
SPR_PYLON_NS_W = SPR_ELRAIL_BASE + 34,
402
SPR_PYLON_NS_E = SPR_ELRAIL_BASE + 35,
382
/* Base sprites for elrail.
383
* Offsets via an enum are used so a complete list of absolute
384
* sprite numbers is unnecessary.
386
SPR_WIRE_BASE = SPR_ELRAIL_BASE + 0,
387
SPR_PYLON_BASE = SPR_ELRAIL_BASE + 28,
404
389
/* sprites for roads */
405
390
SPR_ROAD_PAVED_STRAIGHT_Y = 1313,
505
490
SPR_TRUCK_STOP_SW_BUILD_C = 2722,
506
491
SPR_TRUCK_STOP_NW_BUILD_C = 2723,
508
/* Sprites for docks */
509
/* Docks consist of two tiles, the sloped one and the flat one */
494
* Docks consist of two tiles, the sloped one and the flat one */
510
495
SPR_DOCK_SLOPE_NE = 2727,
511
496
SPR_DOCK_SLOPE_SE = 2728,
512
497
SPR_DOCK_SLOPE_SW = 2729,
513
498
SPR_DOCK_SLOPE_NW = 2730,
514
SPR_DOCK_FLAT_X = 2731, //for NE and SW
515
SPR_DOCK_FLAT_Y = 2732, //for NW and SE
516
SPR_BUOY = 4076, //XXX this sucks, because it displays wrong stuff on canals
499
SPR_DOCK_FLAT_X = 2731, // for NE and SW
500
SPR_DOCK_FLAT_Y = 2732, // for NW and SE
501
SPR_BUOY = 4076, // XXX this sucks, because it displays wrong stuff on canals
518
503
/* Sprites for road */
519
504
SPR_ROAD_Y = 1332,
568
553
SPR_SHIP_DEPOT_NE = 4073,
569
554
SPR_SHIP_DEPOT_SE_REAR = 4074,
570
555
SPR_SHIP_DEPOT_SW_REAR = 4075,
571
//here come sloped water sprites
572
SPR_WATER_SLOPE_Y_UP = SPR_CANALS_BASE + 0, //Water flowing negative Y direction
573
SPR_WATER_SLOPE_X_DOWN = SPR_CANALS_BASE + 1, //positive X
574
SPR_WATER_SLOPE_X_UP = SPR_CANALS_BASE + 2, //negative X
575
SPR_WATER_SLOPE_Y_DOWN = SPR_CANALS_BASE + 3, //positive Y
576
//sprites for the shiplifts
577
//there are 4 kinds of shiplifts, each of them is 3 tiles long.
578
//the four kinds are running in the X and Y direction and
579
//are "lowering" either in the "+" or the "-" direction.
580
//the three tiles are the center tile (where the slope is)
581
//and a bottom and a top tile
556
/* here come sloped water sprites */
557
SPR_WATER_SLOPE_Y_UP = SPR_CANALS_BASE + 0, // Water flowing negative Y direction
558
SPR_WATER_SLOPE_X_DOWN = SPR_CANALS_BASE + 1, // positive X
559
SPR_WATER_SLOPE_X_UP = SPR_CANALS_BASE + 2, // negative X
560
SPR_WATER_SLOPE_Y_DOWN = SPR_CANALS_BASE + 3, // positive Y
561
/* sprites for the shiplifts
562
* there are 4 kinds of shiplifts, each of them is 3 tiles long.
563
* the four kinds are running in the X and Y direction and
564
* are "lowering" either in the "+" or the "-" direction.
565
* the three tiles are the center tile (where the slope is)
566
* and a bottom and a top tile */
582
567
SPR_SHIPLIFT_BASE = SPR_CANALS_BASE + 4,
583
568
SPR_SHIPLIFT_Y_UP_CENTER_REAR = SPR_CANALS_BASE + 4,
584
569
SPR_SHIPLIFT_X_DOWN_CENTER_REAR = SPR_CANALS_BASE + 5,
637
622
SPR_BTWDN_ROAD_RAMP_Y_DOWN = 2529,
638
623
SPR_BTWDN_ROAD_RAMP_X_DOWN = 2530,
639
SPR_BTWDN_ROAD_RAMP_X_UP = 2531, //for some weird reason the order is swapped
640
SPR_BTWDN_ROAD_RAMP_Y_UP = 2532, //between X and Y.
624
SPR_BTWDN_ROAD_RAMP_X_UP = 2531, // for some weird reason the order is swapped
625
SPR_BTWDN_ROAD_RAMP_Y_UP = 2532, // between X and Y.
641
626
SPR_BTWDN_ROAD_Y_SLOPE_UP = 2533,
642
627
SPR_BTWDN_ROAD_X_SLOPE_UP = 2534,
643
628
SPR_BTWDN_ROAD_Y_SLOPE_DOWN = 2535,
644
629
SPR_BTWDN_ROAD_X_SLOPE_DOWN = 2536,
645
630
SPR_BTWDN_RAIL_RAMP_Y_DOWN = 2537,
646
631
SPR_BTWDN_RAIL_RAMP_X_DOWN = 2538,
647
SPR_BTWDN_RAIL_RAMP_X_UP = 2539, //for some weird reason the order is swapped
648
SPR_BTWDN_RAIL_RAMP_Y_UP = 2540, //between X and Y.
632
SPR_BTWDN_RAIL_RAMP_X_UP = 2539, // for some weird reason the order is swapped
633
SPR_BTWDN_RAIL_RAMP_Y_UP = 2540, // between X and Y.
649
634
SPR_BTWDN_RAIL_Y_SLOPE_UP = 2541,
650
635
SPR_BTWDN_RAIL_X_SLOPE_UP = 2542,
651
636
SPR_BTWDN_RAIL_Y_SLOPE_DOWN = 2543,
652
637
SPR_BTWDN_RAIL_X_SLOPE_DOWN = 2544,
653
638
SPR_BTWDN_MONO_RAMP_Y_DOWN = 4352,
654
639
SPR_BTWDN_MONO_RAMP_X_DOWN = 4353,
655
SPR_BTWDN_MONO_RAMP_X_UP = 4354, //for some weird reason the order is swapped
656
SPR_BTWDN_MONO_RAMP_Y_UP = 4355, //between X and Y.
640
SPR_BTWDN_MONO_RAMP_X_UP = 4354, // for some weird reason the order is swapped
641
SPR_BTWDN_MONO_RAMP_Y_UP = 4355, // between X and Y.
657
642
SPR_BTWDN_MONO_Y_SLOPE_UP = 4356,
658
643
SPR_BTWDN_MONO_X_SLOPE_UP = 4357,
659
644
SPR_BTWDN_MONO_Y_SLOPE_DOWN = 4358,
660
645
SPR_BTWDN_MONO_X_SLOPE_DOWN = 4359,
661
646
SPR_BTWDN_MGLV_RAMP_Y_DOWN = 4392,
662
647
SPR_BTWDN_MGLV_RAMP_X_DOWN = 4393,
663
SPR_BTWDN_MGLV_RAMP_X_UP = 4394, //for some weird reason the order is swapped
664
SPR_BTWDN_MGLV_RAMP_Y_UP = 4395, //between X and Y.
648
SPR_BTWDN_MGLV_RAMP_X_UP = 4394, // for some weird reason the order is swapped
649
SPR_BTWDN_MGLV_RAMP_Y_UP = 4395, // between X and Y.
665
650
SPR_BTWDN_MGLV_Y_SLOPE_UP = 4396,
666
651
SPR_BTWDN_MGLV_X_SLOPE_UP = 4397,
667
652
SPR_BTWDN_MGLV_Y_SLOPE_DOWN = 4398,
668
653
SPR_BTWDN_MGLV_X_SLOPE_DOWN = 4399,
670
/* Steel Girder with arches */
671
/* BTSGA == Bridge Type Steel Girder Arched */
672
/* This is bridge type number 2 */
655
/* Steel Girder with arches
656
* BTSGA == Bridge Type Steel Girder Arched
657
* This is bridge type number 2 */
673
658
SPR_BTSGA_RAIL_X_REAR = 2499,
674
659
SPR_BTSGA_RAIL_Y_REAR = 2500,
675
660
SPR_BTSGA_ROAD_X_REAR = 2501,
834
819
SPR_BTGIR_MGLV_X = 4402,
835
820
SPR_BTGIR_MGLV_Y = 4403,
837
/* tubular bridges */
838
/* tubular bridges have 3 kinds of tiles:
823
* tubular bridges have 3 kinds of tiles:
839
824
* a start tile (with only half a tube on the far side, marked _BEG
840
825
* a middle tile (full tunnel), marked _MID
841
826
* and an end tile (half a tube on the near side, maked _END
843
828
SPR_BTTUB_X_FRONT_BEG = 2559,
844
SPR_BTTUB_X_FRONT_MID = 2660,
829
SPR_BTTUB_X_FRONT_MID = 2560,
845
830
SPR_BTTUB_X_FRONT_END = 2561,
846
831
SPR_BTTUB_Y_FRONT_END = 2562,
847
832
SPR_BTTUB_Y_FRONT_MID = 2563,
848
833
SPR_BTTUB_Y_FRONT_BEG = 2564,
834
SPR_BTTUB_X_PILLAR_BEG = 2565,
835
SPR_BTTUB_X_PILLAR_MID = 2566,
836
SPR_BTTUB_Y_PILLAR_MID = 2567,
837
SPR_BTTUB_Y_PILLAR_BEG = 2568,
849
838
SPR_BTTUB_X_RAIL_REAR_BEG = 2569,
850
839
SPR_BTTUB_X_RAIL_REAR_MID = 2570,
851
840
SPR_BTTUB_X_RAIL_REAR_END = 2571,
934
923
/* Town/house sprites */
937
//used in town_land.h
938
//CNST1..3 = Those are the different stages of construction
939
//The last 2 hexas correspond to the type of building it represent, if any
926
/* used in town_land.h
927
* CNST1..3 = Those are the different stages of construction
928
* The last 2 hexas correspond to the type of building it represent, if any */
940
929
SPR_CNST1_TALLOFFICE_00 = 1421,
941
930
SPR_CNST2_TALLOFFICE_00 = 1422,
942
931
SPR_CNST3_TALLOFFICE_00 = 1423,
943
932
SPR_GROUND_TALLOFFICE_00 = 1424,
944
SPR_BUILD_TALLOFFICE_00 = 1425, //temperate
933
SPR_BUILD_TALLOFFICE_00 = 1425, // temperate
945
934
SPR_CNST1_OFFICE_01 = 1426,
946
935
SPR_CNST2_OFFICE_01 = 1427,
947
SPR_BUILD_OFFICE_01 = 1428, //temperate
936
SPR_BUILD_OFFICE_01 = 1428, // temperate
948
937
SPR_GROUND_OFFICE_01 = 1429,
949
SPR_CNST1_SMLBLCKFLATS_02 = 1430, //Small Block of Flats
938
SPR_CNST1_SMLBLCKFLATS_02 = 1430, // Small Block of Flats
950
939
SPR_CNST2_SMLBLCKFLATS_02 = 1431,
951
SPR_BUILD_SMLBLCKFLATS_02 = 1432, //temperate
940
SPR_BUILD_SMLBLCKFLATS_02 = 1432, // temperate
952
941
SPR_GROUND_SMLBLCKFLATS_02 = 1433,
953
942
SPR_CNST1_TEMPCHURCH = 1434,
954
943
SPR_CNST2_TEMPCHURCH = 1435,
1263
1253
SPR_IMG_RAIL_STATION = 1298,
1264
1254
SPR_IMG_RAIL_SIGNALS = 1291,
1266
SPR_IMG_SIGNAL_ELECTRIC_NORM = 1287,
1267
SPR_IMG_SIGNAL_ELECTRIC_ENTRY = SPR_SIGNALS_BASE + 12,
1268
SPR_IMG_SIGNAL_ELECTRIC_EXIT = SPR_SIGNALS_BASE + 28,
1269
SPR_IMG_SIGNAL_ELECTRIC_COMBO = SPR_SIGNALS_BASE + 44,
1270
SPR_IMG_SIGNAL_SEMAPHORE_NORM = SPR_SIGNALS_BASE + 60,
1271
SPR_IMG_SIGNAL_SEMAPHORE_ENTRY = SPR_SIGNALS_BASE + 76,
1272
SPR_IMG_SIGNAL_SEMAPHORE_EXIT = SPR_SIGNALS_BASE + 92,
1273
SPR_IMG_SIGNAL_SEMAPHORE_COMBO = SPR_SIGNALS_BASE + 108,
1274
SPR_IMG_SIGNAL_CONVERT = SPR_OPENTTD_BASE + 135,
1256
SPR_IMG_SIGNAL_ELECTRIC_NORM = 1287,
1257
SPR_IMG_SIGNAL_ELECTRIC_ENTRY = SPR_SIGNALS_BASE + 12,
1258
SPR_IMG_SIGNAL_ELECTRIC_EXIT = SPR_SIGNALS_BASE + 28,
1259
SPR_IMG_SIGNAL_ELECTRIC_COMBO = SPR_SIGNALS_BASE + 44,
1260
SPR_IMG_SIGNAL_ELECTRIC_PBS = SPR_SIGNALS_BASE + 124,
1261
SPR_IMG_SIGNAL_ELECTRIC_PBS_OWAY = SPR_SIGNALS_BASE + 140,
1262
SPR_IMG_SIGNAL_SEMAPHORE_NORM = SPR_SIGNALS_BASE + 60,
1263
SPR_IMG_SIGNAL_SEMAPHORE_ENTRY = SPR_SIGNALS_BASE + 76,
1264
SPR_IMG_SIGNAL_SEMAPHORE_EXIT = SPR_SIGNALS_BASE + 92,
1265
SPR_IMG_SIGNAL_SEMAPHORE_COMBO = SPR_SIGNALS_BASE + 108,
1266
SPR_IMG_SIGNAL_SEMAPHORE_PBS = SPR_SIGNALS_BASE + 188,
1267
SPR_IMG_SIGNAL_SEMAPHORE_PBS_OWAY= SPR_SIGNALS_BASE + 204,
1268
SPR_IMG_SIGNAL_CONVERT = SPR_OPENTTD_BASE + 135,
1276
1270
SPR_IMG_TUNNEL_RAIL = 2430,
1277
1271
SPR_IMG_TUNNEL_MONO = 2431,
1406
1401
* <ul><li> SPRITE_WIDTH is the number of bits used for the actual sprite to be displayed.
1407
1402
* This always starts at bit 0.</li>
1408
1403
* <li> TRANSPARENT_BIT is the bit number which toggles sprite transparency</li>
1409
* <li> RECOLOR_BIT toggles the recoloring system</li>
1404
* <li> RECOLOUR_BIT toggles the recolouring system</li>
1410
1405
* <li> PALETTE_SPRITE_WIDTH and PALETTE_SPRITE_START determine the position and number of
1411
* bits used for the recoloring process. For transparency, it must be 0x322.</li></ul>
1406
* bits used for the recolouring process. For transparency, it must be 0x322.</li></ul>
1413
1408
enum SpriteSetup {
1414
1409
TRANSPARENT_BIT = 31, ///< toggles transparency in the sprite
1415
RECOLOR_BIT = 30, ///< toggles recoloring in the sprite
1410
RECOLOUR_BIT = 30, ///< toggles recolouring in the sprite
1416
1411
OFFSET_BIT = 29,
1417
1412
OPAQUE_BIT = 28,
1419
PALETTE_WIDTH = 24, ///< number of bits of the sprite containing the recolor palette
1414
PALETTE_WIDTH = 24, ///< number of bits of the sprite containing the recolour palette
1420
1415
SPRITE_WIDTH = 24, ///< number of bits for the sprite number
1424
* these masks change the colors of the palette for a sprite.
1419
* these masks change the colours of the palette for a sprite.
1425
1420
* Apart from this bit, a sprite number is needed to define
1426
* the palette used for recoloring. This palette is stored
1421
* the palette used for recolouring. This palette is stored
1427
1422
* in the bits marked by PALETTE_SPRITE_MASK.
1428
1423
* @note Do not modify this enum. Alter SpriteSetup instead
1429
1424
* @see SpriteSetup
1431
1426
enum Modifiers {
1432
1427
SPRITE_MODIFIER_USE_OFFSET = OFFSET_BIT,
1433
/// Set when a sprite must not ever be displayed transparently
1428
/** Set when a sprite must not ever be displayed transparently */
1434
1429
SPRITE_MODIFIER_OPAQUE = OPAQUE_BIT,
1435
///when a sprite is to be displayed transparently, this bit needs to be set.
1430
/** when a sprite is to be displayed transparently, this bit needs to be set. */
1436
1431
PALETTE_MODIFIER_TRANSPARENT = TRANSPARENT_BIT,
1437
///this bit is set when a recoloring process is in action
1438
PALETTE_MODIFIER_COLOR = RECOLOR_BIT,
1440
//This is used for the GfxFillRect function
1441
///Used to draw a "grey out" rectangle. @see GfxFillRect
1442
PALETTE_MODIFIER_GREYOUT = TRANSPARENT_BIT,
1443
///Set when a colortable mode is used. @see GfxFillRect
1444
USE_COLORTABLE = RECOLOR_BIT,
1432
/** this bit is set when a recolouring process is in action */
1433
PALETTE_MODIFIER_COLOUR = RECOLOUR_BIT,
1447
1436
/** Masks needed for sprite operations.
1448
1437
* @note Do not modify this enum. Alter SpriteSetup instead
1449
1438
* @see SpriteSetup */
1450
1439
enum SpriteMasks {
1451
///Maximum number of sprites that can be loaded at a given time.
1440
/** Maximum number of sprites that can be loaded at a given time. */
1452
1441
MAX_SPRITES = 1 << SPRITE_WIDTH,
1453
///The mask to for the main sprite
1442
/** The mask to for the main sprite */
1454
1443
SPRITE_MASK = MAX_SPRITES - 1,
1456
1445
MAX_PALETTES = 1 << PALETTE_WIDTH,
1457
///The mask for the auxiliary sprite (the one that takes care of recoloring)
1446
/** The mask for the auxiliary sprite (the one that takes care of recolouring) */
1458
1447
PALETTE_MASK = MAX_PALETTES - 1,
1461
1450
assert_compile( (1 << TRANSPARENT_BIT & SPRITE_MASK) == 0 );
1462
assert_compile( (1 << RECOLOR_BIT & SPRITE_MASK) == 0 );
1463
assert_compile( !(TRANSPARENT_BIT == RECOLOR_BIT) );
1451
assert_compile( (1 << RECOLOUR_BIT & SPRITE_MASK) == 0 );
1452
assert_compile( !(TRANSPARENT_BIT == RECOLOUR_BIT) );
1464
1453
assert_compile( (1 << TRANSPARENT_BIT & PALETTE_MASK) == 0);
1465
assert_compile( (1 << RECOLOR_BIT & PALETTE_MASK) == 0 );
1454
assert_compile( (1 << RECOLOUR_BIT & PALETTE_MASK) == 0 );
1468
PALETTE_RECOLOR_START = 0x307,
1457
PALETTE_RECOLOUR_START = 0x307,
1472
1461
static const SpriteID PALETTE_CRASH = 0x324;
1473
1462
static const SpriteID PAL_NONE = 0;
1475
//note: these numbers are already the modified once the renderer needs.
1476
//the actual sprite number is the upper 16 bits of the number
1464
/* note: these numbers are already the modified once the renderer needs.
1465
* the actual sprite number is the upper 16 bits of the number */
1478
///Here a puslating red tile is drawn if you try to build a wrong tunnel or raise/lower land where it is not possible
1467
/** Here a puslating red tile is drawn if you try to build a wrong tunnel or raise/lower land where it is not possible */
1479
1468
static const SpriteID PALETTE_TILE_RED_PULSATING = 0x303;
1480
///makes a square red. is used when removing rails or other stuff
1469
/** makes a square red. is used when removing rails or other stuff */
1481
1470
static const SpriteID PALETTE_SEL_TILE_RED = 0x304;
1482
///This draws a blueish square (catchment areas for example)
1471
/** This draws a blueish square (catchment areas for example) */
1483
1472
static const SpriteID PALETTE_SEL_TILE_BLUE = 0x305;
1484
//0x306 is a real sprite (the little dot you get when you try to raise/lower a corner of the map
1485
//here the color switches begin
1486
//use this if you add stuff to the value, so that the resulting color
1487
//is not a fixed value.
1488
//NOTE THAT THE SWITCH 0x8000 is NOT present in _TO_COLORS yet!
1473
/* 0x306 is a real sprite (the little dot you get when you try to raise/lower a corner of the map
1474
* here the colour switches begin
1475
* use this if you add stuff to the value, so that the resulting colour
1476
* is not a fixed value.
1477
* NOTE THAT THE SWITCH 0x8000 is NOT present in _TO_COLOURS yet! */
1489
1478
enum PaletteSprites {
1490
1479
PALETTE_TO_DARK_BLUE = 0x307,
1491
1480
PALETTE_TO_PALE_GREEN = 0x308,
1497
1486
PALETTE_TO_DARK_GREEN = 0x30E,
1498
1487
PALETTE_TO_BLUE = 0x30F,
1499
1488
PALETTE_TO_CREAM = 0x310,
1500
//maybe don't use as player color because it doesn't display in the graphs?
1489
/* maybe don't use as company colour because it doesn't display in the graphs? */
1501
1490
PALETTE_TO_MAUVE = 0x311,
1502
1491
PALETTE_TO_PURPLE = 0x312,
1503
1492
PALETTE_TO_ORANGE = 0x313,
1504
1493
PALETTE_TO_BROWN = 0x314,
1505
1494
PALETTE_TO_GREY = 0x315,
1506
1495
PALETTE_TO_WHITE = 0x316,
1507
//sets color to bare land stuff, for rail and road (and crossings)
1496
/* sets colour to bare land stuff, for rail and road (and crossings) */
1508
1497
PALETTE_TO_BARE_LAND = 0x317,
1509
//XXX is 318-31A really not used?
1498
/* XXX is 318-31A really not used? */
1510
1499
PALETTE_TO_STRUCT_BLUE = 0x31B,
1511
//structure color to something brownish (for the cantilever bridges for example)
1500
/* structure colour to something brownish (for the cantilever bridges for example) */
1512
1501
PALETTE_TO_STRUCT_BROWN = 0x31C,
1513
1502
PALETTE_TO_STRUCT_WHITE = 0x31D,
1514
//sets bridge or structure to red, little concrete one and cantilever use this one for example
1503
/* sets bridge or structure to red, little concrete one and cantilever use this one for example */
1515
1504
PALETTE_TO_STRUCT_RED = 0x31E,
1516
1505
PALETTE_TO_STRUCT_GREEN = 0x31F,
1517
PALETTE_TO_STRUCT_CONCRETE = 0x320, //Sets the suspension bridge to concrete, also other strucutures use it
1518
PALETTE_TO_STRUCT_YELLOW = 0x321, //Sets the bridge color to yellow (suspension and tubular)
1519
PALETTE_TO_TRANSPARENT = 0x322, //This sets the sprite to transparent
1520
//This is used for changing the tubular bridges to the silicon display, or some grayish color
1506
PALETTE_TO_STRUCT_CONCRETE = 0x320, // Sets the suspension bridge to concrete, also other strucutures use it
1507
PALETTE_TO_STRUCT_YELLOW = 0x321, // Sets the bridge colour to yellow (suspension and tubular)
1508
PALETTE_TO_TRANSPARENT = 0x322, // This sets the sprite to transparent
1509
/* This is used for changing the tubular bridges to the silicon display, or some grayish colour */
1521
1510
PALETTE_TO_STRUCT_GREY = 0x323,
1523
//XXX - const - PALETTE_CRASH = 0x324, //this changes stuff to the "crash color"
1524
//XXX another place where structures are colored.
1525
//I'm not sure which colors these are
1512
/* XXX - const - PALETTE_CRASH = 0x324, // this changes stuff to the "crash colour"
1513
* XXX another place where structures are coloured.
1514
* I'm not sure which colours these are */
1526
1515
PALETTE_59E = 0x59E,
1527
1516
PALETTE_59F = 0x59F,