|
|
/* $Id$ */
|
|
|
|
|
|
#ifndef SPRITES_H
|
|
|
#define SPRITES_H
|
|
|
|
|
|
/** @file sprites.h
|
|
|
This file contails all sprite-related enums and defines. These consist mainly of
|
|
|
the sprite numbers and a bunch of masks and macros to handle sprites and to get
|
|
|
rid of all the magic numbers in the code.
|
|
|
|
|
|
@NOTE:
|
|
|
ALL SPRITE NUMBERS BELOW 5126 are in the main files
|
|
|
SPR_CANALS_BASE is in canalsw.grf
|
|
|
SPR_SLOPES_BASE is in trkfoundw.grf
|
|
|
SPR_OPENTTD_BASE is in openttd.grf
|
|
|
|
|
|
All elements which consist of two elements should
|
|
|
have the same name and then suffixes
|
|
|
_GROUND and _BUILD for building-type sprites
|
|
|
_REAR and _FRONT for transport-type sprites (tiles where vehicles are on)
|
|
|
These sprites are split because of the Z order of the elements
|
|
|
(like some parts of a bridge are behind the vehicle, while others are before)
|
|
|
|
|
|
|
|
|
All sprites which are described here are referenced only one to a handful of times
|
|
|
throughout the code. When introducing new sprite enums, use meaningful names.
|
|
|
Don't be lazy and typing, and only use abbrevations when their meaning is clear or
|
|
|
the length of the enum would get out of hand. In that case EXPLAIN THE ABBREVATION
|
|
|
IN THIS FILE, and perhaps add some comments in the code where it is used.
|
|
|
Now, don't whine about this being too much typing work if the enums are like
|
|
|
30 characters in length. If your editor doen't help you simplifying your work,
|
|
|
get a proper editor. If your Operating Systems don't have any decent editors,
|
|
|
get a proper Operating System.
|
|
|
|
|
|
@todo Split the "Sprites" enum into smaller chunks and document them
|
|
|
*/
|
|
|
* This file contails all sprite-related enums and defines. These consist mainly of
|
|
|
* the sprite numbers and a bunch of masks and macros to handle sprites and to get
|
|
|
* rid of all the magic numbers in the code.
|
|
|
*
|
|
|
* @NOTE:
|
|
|
* ALL SPRITE NUMBERS BELOW 5126 are in the main files
|
|
|
* SPR_CANALS_BASE is in canalsw.grf
|
|
|
* SPR_SLOPES_BASE is in trkfoundw.grf
|
|
|
* SPR_OPENTTD_BASE is in openttd.grf
|
|
|
*
|
|
|
* All elements which consist of two elements should
|
|
|
* have the same name and then suffixes
|
|
|
* _GROUND and _BUILD for building-type sprites
|
|
|
* _REAR and _FRONT for transport-type sprites (tiles where vehicles are on)
|
|
|
* These sprites are split because of the Z order of the elements
|
|
|
* (like some parts of a bridge are behind the vehicle, while others are before)
|
|
|
*
|
|
|
*
|
|
|
* All sprites which are described here are referenced only one to a handful of times
|
|
|
* throughout the code. When introducing new sprite enums, use meaningful names.
|
|
|
* Don't be lazy and typing, and only use abbrevations when their meaning is clear or
|
|
|
* the length of the enum would get out of hand. In that case EXPLAIN THE ABBREVATION
|
|
|
* IN THIS FILE, and perhaps add some comments in the code where it is used.
|
|
|
* Now, don't whine about this being too much typing work if the enums are like
|
|
|
* 30 characters in length. If your editor doen't help you simplifying your work,
|
|
|
* get a proper editor. If your Operating Systems don't have any decent editors,
|
|
|
* get a proper Operating System.
|
|
|
*
|
|
|
* @todo Split the "Sprites" enum into smaller chunks and document them
|
|
|
*/
|
|
|
|
|
|
|
|
|
enum Sprites {
|
|
|
SPR_SELECT_TILE = 752,
|
|
|
SPR_DOT = 774, // corner marker for lower/raise land
|
|
|
SPR_DOT_SMALL = 4078,
|
|
|
SPR_WHITE_POINT = 4079,
|
|
|
|
|
|
/* ASCII */
|
|
|
SPR_ASCII_SPACE = 2,
|
|
|
SPR_ASCII_SPACE_SMALL = 226,
|
|
|
SPR_ASCII_SPACE_BIG = 450,
|
|
|
|
|
|
/* Extra graphic spritenumbers */
|
|
|
SPR_CANALS_BASE = 5382,
|
|
|
SPR_SLOPES_BASE = SPR_CANALS_BASE + 70,
|
|
|
SPR_AUTORAIL_BASE = SPR_SLOPES_BASE + 78,
|
|
|
SPR_ELRAIL_BASE = SPR_AUTORAIL_BASE + 55,
|
|
|
SPR_2CCMAP_BASE = SPR_ELRAIL_BASE + 53,
|
|
|
SPR_OPENTTD_BASE = SPR_2CCMAP_BASE + 256,
|
|
|
|
|
|
SPR_BLOT = SPR_OPENTTD_BASE + 29, // colored circle (mainly used as vehicle profit marker and for sever compatibility)
|
|
|
|
|
|
SPR_PIN_UP = SPR_OPENTTD_BASE + 55, // pin icon
|
|
@@ -205,50 +205,50 @@ enum Sprites {
|
|
|
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 + 15,
|
|
|
SPR_WAYPOINT_X_2 = SPR_OPENTTD_BASE + 16,
|
|
|
SPR_WAYPOINT_Y_1 = SPR_OPENTTD_BASE + 17,
|
|
|
SPR_WAYPOINT_Y_2 = SPR_OPENTTD_BASE + 18,
|
|
|
OFFSET_TILEH_IMPOSSIBLE = 0,
|
|
|
OFFSET_TILEH_1 = 14,
|
|
|
OFFSET_TILEH_2 = 15,
|
|
|
OFFSET_TILEH_3 = 22,
|
|
|
OFFSET_TILEH_4 = 13,
|
|
|
OFFSET_TILEH_6 = 21,
|
|
|
OFFSET_TILEH_7 = 17,
|
|
|
OFFSET_TILEH_8 = 12,
|
|
|
OFFSET_TILEH_9 = 23,
|
|
|
OFFSET_TILEH_11 = 18,
|
|
|
OFFSET_TILEH_12 = 20,
|
|
|
OFFSET_TILEH_13 = 19,
|
|
|
OFFSET_TILEH_14 = 16,
|
|
|
|
|
|
/* Elrail stuff */
|
|
|
/* Wires. First identifier is the direction of the track, second is the required placement of the pylon.
|
|
|
"short" denotes a wire that requires a pylon on each end. Third identifier is the direction of the slope
|
|
|
(in positive coordinate direction) */
|
|
|
* "short" denotes a wire that requires a pylon on each end. Third identifier is the direction of the slope
|
|
|
* (in positive coordinate direction) */
|
|
|
SPR_WIRE_X_SHORT = SPR_ELRAIL_BASE + 3,
|
|
|
SPR_WIRE_Y_SHORT = SPR_ELRAIL_BASE + 4,
|
|
|
SPR_WIRE_EW_SHORT = SPR_ELRAIL_BASE + 5,
|
|
|
SPR_WIRE_NS_SHORT = SPR_ELRAIL_BASE + 6,
|
|
|
SPR_WIRE_X_SHORT_DOWN = SPR_ELRAIL_BASE + 7,
|
|
|
SPR_WIRE_Y_SHORT_UP = SPR_ELRAIL_BASE + 8,
|
|
|
SPR_WIRE_X_SHORT_UP = SPR_ELRAIL_BASE + 9,
|
|
|
SPR_WIRE_Y_SHORT_DOWN = SPR_ELRAIL_BASE + 10,
|
|
|
|
|
|
SPR_WIRE_X_SW = SPR_ELRAIL_BASE + 11,
|
|
|
SPR_WIRE_Y_SE = SPR_ELRAIL_BASE + 12,
|
|
|
SPR_WIRE_EW_E = SPR_ELRAIL_BASE + 13,
|
|
|
SPR_WIRE_NS_S = SPR_ELRAIL_BASE + 14,
|
|
|
SPR_WIRE_X_SW_DOWN = SPR_ELRAIL_BASE + 15,
|
|
|
SPR_WIRE_Y_SE_UP = SPR_ELRAIL_BASE + 16,
|
|
|
SPR_WIRE_X_SW_UP = SPR_ELRAIL_BASE + 17,
|
|
|
SPR_WIRE_Y_SE_DOWN = SPR_ELRAIL_BASE + 18,
|
|
|
|
|
|
SPR_WIRE_X_NE = SPR_ELRAIL_BASE + 19,
|
|
|
SPR_WIRE_Y_NW = SPR_ELRAIL_BASE + 20,
|
|
|
SPR_WIRE_EW_W = SPR_ELRAIL_BASE + 21,
|
|
|
SPR_WIRE_NS_N = SPR_ELRAIL_BASE + 22,
|
|
|
SPR_WIRE_X_NE_DOWN = SPR_ELRAIL_BASE + 23,
|
|
|
SPR_WIRE_Y_NW_UP = SPR_ELRAIL_BASE + 24,
|
|
@@ -540,61 +540,60 @@ enum Sprites {
|
|
|
SPR_BTWDN_MGLV_RAMP_Y_UP = 4395, //between X and Y.
|
|
|
SPR_BTWDN_MGLV_Y_SLOPE_UP = 4396,
|
|
|
SPR_BTWDN_MGLV_X_SLOPE_UP = 4397,
|
|
|
SPR_BTWDN_MGLV_Y_SLOPE_DOWN = 4398,
|
|
|
SPR_BTWDN_MGLV_X_SLOPE_DOWN = 4399,
|
|
|
|
|
|
/* Steel Girder with arches */
|
|
|
/* BTSGA == Bridge Type Steel Girder Arched */
|
|
|
/* This is bridge type number 2 */
|
|
|
SPR_BTSGA_RAIL_X_REAR = 2499,
|
|
|
SPR_BTSGA_RAIL_Y_REAR = 2500,
|
|
|
SPR_BTSGA_ROAD_X_REAR = 2501,
|
|
|
SPR_BTSGA_ROAD_Y_REAR = 2502,
|
|
|
SPR_BTSGA_X_FRONT = 2503,
|
|
|
SPR_BTSGA_Y_FRONT = 2504,
|
|
|
SPR_BTSGA_X_PILLAR = 2505,
|
|
|
SPR_BTSGA_Y_PILLAR = 2606,
|
|
|
SPR_BTSGA_MONO_X_REAR = 4324,
|
|
|
SPR_BTSGA_MONO_Y_REAR = 4325,
|
|
|
SPR_BTSGA_MGLV_X_REAR = 4364,
|
|
|
SPR_BTSGA_MGLV_Y_REAR = 4365,
|
|
|
|
|
|
/* BTSUS == Suspension bridge */
|
|
|
/* TILE_* denotes the different tiles a suspension bridge
|
|
|
can have
|
|
|
TILE_A and TILE_B are the "beginnings" and "ends" of the
|
|
|
suspension system. they have small rectangluar endcaps
|
|
|
TILE_C and TILE_D look almost identical to TILE_A and
|
|
|
TILE_B, but they do not have the "endcaps". They form the
|
|
|
middle part
|
|
|
TILE_E is a condensed configuration of two pillars. while they
|
|
|
are usually 2 pillars apart, they only have 1 pillar separation
|
|
|
here
|
|
|
TILE_F is an extended configuration of pillars. they are
|
|
|
plugged in when pillars should be 3 tiles apart
|
|
|
|
|
|
*/
|
|
|
* can have
|
|
|
* TILE_A and TILE_B are the "beginnings" and "ends" of the
|
|
|
* suspension system. they have small rectangluar endcaps
|
|
|
* TILE_C and TILE_D look almost identical to TILE_A and
|
|
|
* TILE_B, but they do not have the "endcaps". They form the
|
|
|
* middle part
|
|
|
* TILE_E is a condensed configuration of two pillars. while they
|
|
|
* are usually 2 pillars apart, they only have 1 pillar separation
|
|
|
* here
|
|
|
* TILE_F is an extended configuration of pillars. they are
|
|
|
* plugged in when pillars should be 3 tiles apart
|
|
|
*/
|
|
|
SPR_BTSUS_ROAD_Y_REAR_TILE_A = 2453,
|
|
|
SPR_BTSUS_ROAD_Y_REAR_TILE_B = 2454,
|
|
|
SPR_BTSUS_Y_FRONT_TILE_A = 2455,
|
|
|
SPR_BTSUS_Y_FRONT_TILE_B = 2456,
|
|
|
SPR_BTSUS_ROAD_Y_REAR_TILE_D = 2457,
|
|
|
SPR_BTSUS_ROAD_Y_REAR_TILE_C = 2458,
|
|
|
SPR_BTSUS_Y_FRONT_TILE_D = 2459,
|
|
|
SPR_BTSUS_Y_FRONT_TILE_C = 2460,
|
|
|
SPR_BTSUS_ROAD_X_REAR_TILE_A = 2461,
|
|
|
SPR_BTSUS_ROAD_X_REAR_TILE_B = 2462,
|
|
|
SPR_BTSUS_X_FRONT_TILE_A = 2463,
|
|
|
SPR_BTSUS_X_FRONT_TILE_B = 2464,
|
|
|
SPR_BTSUS_ROAD_X_TILE_D = 2465,
|
|
|
SPR_BTSUS_ROAD_X_TILE_C = 2466,
|
|
|
SPR_BTSUS_X_FRONT_TILE_D = 2467,
|
|
|
SPR_BTSUS_X_FRONT_TILE_C = 2468,
|
|
|
SPR_BTSUS_RAIL_Y_REAR_TILE_A = 2469,
|
|
|
SPR_BTSUS_RAIL_Y_REAR_TILE_B = 2470,
|
|
|
SPR_BTSUS_RAIL_Y_REAR_TILE_D = 2471,
|
|
|
SPR_BTSUS_RAIL_Y_REAR_TILE_C = 2472,
|
|
|
SPR_BTSUS_RAIL_X_REAR_TILE_A = 2473,
|
|
|
SPR_BTSUS_RAIL_X_REAR_TILE_B = 2474,
|
|
|
SPR_BTSUS_RAIL_X_REAR_TILE_D = 2475,
|
|
|
SPR_BTSUS_RAIL_X_REAR_TILE_C = 2476,
|
|
@@ -692,52 +691,52 @@ enum Sprites {
|
|
|
SPR_BTCON_Y_FRONT = 2498,
|
|
|
SPR_BTCON_X_PILLAR = 2505,
|
|
|
SPR_BTCON_Y_PILLAR = 2506,
|
|
|
SPR_BTCON_MONO_X = 4344,
|
|
|
SPR_BTCON_MONO_Y = 4345,
|
|
|
SPR_BTCON_MGLV_X = 4384,
|
|
|
SPR_BTCON_MGLV_Y = 4385,
|
|
|
|
|
|
/* little steel girder bridge */
|
|
|
SPR_BTGIR_RAIL_X = 2553,
|
|
|
SPR_BTGIR_RAIL_Y = 2554,
|
|
|
SPR_BTGIR_ROAD_X = 2555,
|
|
|
SPR_BTGIR_ROAD_Y = 2556,
|
|
|
SPR_BTGIR_X_FRONT = 2557,
|
|
|
SPR_BTGIR_Y_FRONT = 2558,
|
|
|
SPR_BTGIR_X_PILLAR = 2505,
|
|
|
SPR_BTGIR_Y_PILLAR = 2506,
|
|
|
SPR_BTGIR_MONO_X = 4362,
|
|
|
SPR_BTGIR_MONO_Y = 4363,
|
|
|
SPR_BTGIR_MGLV_X = 4402,
|
|
|
SPR_BTGIR_MGLV_Y = 4403,
|
|
|
|
|
|
/* tubular bridges */
|
|
|
/* tubular bridges have 3 kinds of tiles:
|
|
|
a start tile (with only half a tube on the far side, marked _BEG
|
|
|
a middle tile (full tunnel), marked _MID
|
|
|
and an end tile (half a tube on the near side, maked _END
|
|
|
*/
|
|
|
* a start tile (with only half a tube on the far side, marked _BEG
|
|
|
* a middle tile (full tunnel), marked _MID
|
|
|
* and an end tile (half a tube on the near side, maked _END
|
|
|
*/
|
|
|
SPR_BTTUB_X_FRONT_BEG = 2559,
|
|
|
SPR_BTTUB_X_FRONT_MID = 2660,
|
|
|
SPR_BTTUB_X_FRONT_END = 2561,
|
|
|
SPR_BTTUB_Y_FRONT_END = 2562,
|
|
|
SPR_BTTUB_Y_FRONT_MID = 2563,
|
|
|
SPR_BTTUB_Y_FRONT_BEG = 2564,
|
|
|
SPR_BTTUB_X_RAIL_REAR_BEG = 2569,
|
|
|
SPR_BTTUB_X_RAIL_REAR_MID = 2570,
|
|
|
SPR_BTTUB_X_RAIL_REAR_END = 2571,
|
|
|
|
|
|
|
|
|
/* ramps (for all bridges except wood and tubular?)*/
|
|
|
SPR_BTGEN_RAIL_X_SLOPE_DOWN = 2437,
|
|
|
SPR_BTGEN_RAIL_X_SLOPE_UP = 2438,
|
|
|
SPR_BTGEN_RAIL_Y_SLOPE_DOWN = 2439,
|
|
|
SPR_BTGEN_RAIL_Y_SLOPE_UP = 2440,
|
|
|
SPR_BTGEN_RAIL_RAMP_X_UP = 2441,
|
|
|
SPR_BTGEN_RAIL_RAMP_X_DOWN = 2442,
|
|
|
SPR_BTGEN_RAIL_RAMP_Y_UP = 2443,
|
|
|
SPR_BTGEN_RAIL_RAMP_Y_DOWN = 2444,
|
|
|
SPR_BTGEN_ROAD_X_SLOPE_DOWN = 2445,
|
|
|
SPR_BTGEN_ROAD_X_SLOPE_UP = 2446,
|
|
|
SPR_BTGEN_ROAD_Y_SLOPE_DOWN = 2447,
|
|
|
SPR_BTGEN_ROAD_Y_SLOPE_UP = 2448,
|