railtypes.h
author celestar
Wed, 03 Aug 2005 11:08:13 +0000
changeset 2274 d94004c14b6c
parent 2269 8909e5f58e5c
child 2293 a71c210076be
permissions -rw-r--r--
(svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
request using the RailtypeInfo struct
2269
8909e5f58e5c (svn r2789) -Fix: Wrong Id tag :)
celestar
parents: 2263
diff changeset
     1
/* $Id$ */
2233
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
     2
2236
55f4d7353f52 (svn r2756) Renamed railtypes into _railtypes
ludde
parents: 2233
diff changeset
     3
/** @file railtypes.h
2233
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
     4
 * All the railtype-specific information is stored here.
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
     5
 */
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
     6
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
     7
/** Global Railtype definition
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
     8
 */
2236
55f4d7353f52 (svn r2756) Renamed railtypes into _railtypes
ludde
parents: 2233
diff changeset
     9
const RailtypeInfo _railtypes[RAILTYPE_END] = {
2274
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    10
	/** Railway */
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    11
	{ /* Main Sprites */
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    12
		{ SPR_RAIL_TRACK_Y, SPR_RAIL_TRACK_N_S, SPR_RAIL_TRACK_BASE, SPR_RAIL_SINGLE_Y, SPR_RAIL_SINGLE_X,
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    13
			SPR_RAIL_SINGLE_NORTH, SPR_RAIL_SINGLE_SOUTH, SPR_RAIL_SINGLE_EAST, SPR_RAIL_SINGLE_WEST },
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    14
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    15
		/* GUI sprites */
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    16
		{ 0x4E3, 0x4E4, 0x4E5, 0x4E6,
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    17
			SPR_OPENTTD_BASE + 0, 0x50E, 0x97E, SPR_OPENTTD_BASE + 25 },
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    18
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    19
		/* strings */
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    20
		{ STR_100A_RAILROAD_CONSTRUCTION },
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    21
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    22
		/* Offset of snow tiles */
2233
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
    23
		SPR_RAIL_SNOW_OFFSET,
2274
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    24
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    25
		/* Compatible railtypes */
2233
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
    26
		(1 << RAILTYPE_RAIL),
2274
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    27
	
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    28
		/* main offset */
2254
72f8883ff3ac (svn r2774) -Codechange: Removed TRACKTYPE_SPRITE_PITCH globally and replaced it by a member of RailtypeInfo
celestar
parents: 2236
diff changeset
    29
		0,
2233
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
    30
	},
2274
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    31
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    32
	/** Monorail */
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    33
	{ /* Main Sprites */
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    34
		{ SPR_MONO_TRACK_Y, SPR_MONO_TRACK_N_S, SPR_MONO_TRACK_BASE, SPR_MONO_SINGLE_Y, SPR_MONO_SINGLE_X,
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    35
			SPR_MONO_SINGLE_NORTH, SPR_MONO_SINGLE_SOUTH, SPR_MONO_SINGLE_EAST, SPR_MONO_SINGLE_WEST },
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    36
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    37
		/* GUI sprites */
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    38
		{ 0x4E7, 0x4E8, 0x4E9, 0x4EA,
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    39
			SPR_OPENTTD_BASE + 1, SPR_OPENTTD_BASE + 12, 0x97F, SPR_OPENTTD_BASE + 27 },
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    40
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    41
		/* strings */
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    42
		{ STR_100B_MONORAIL_CONSTRUCTION },
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    43
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    44
		/* Offset of snow tiles */
2233
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
    45
		SPR_MONO_SNOW_OFFSET,
2274
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    46
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    47
		/* Compatible Railtypes */
2233
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
    48
		(1 << RAILTYPE_MONO),
2274
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    49
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    50
		/* main offset */
2254
72f8883ff3ac (svn r2774) -Codechange: Removed TRACKTYPE_SPRITE_PITCH globally and replaced it by a member of RailtypeInfo
celestar
parents: 2236
diff changeset
    51
		82,
2233
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
    52
	},
2274
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    53
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    54
	/** Maglev */
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    55
	{ /* Main sprites */
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    56
		{ SPR_MGLV_TRACK_Y, SPR_MGLV_TRACK_N_S, SPR_MGLV_TRACK_BASE, SPR_MGLV_SINGLE_Y, SPR_MGLV_SINGLE_X,
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    57
			SPR_MGLV_SINGLE_NORTH, SPR_MGLV_SINGLE_SOUTH, SPR_MGLV_SINGLE_EAST, SPR_MGLV_SINGLE_WEST },
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    58
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    59
		/* GUI sprites */
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    60
		{ 0x4EB, 0x4EC, 0x4EE, 0x4ED,
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    61
			SPR_OPENTTD_BASE + 2, SPR_OPENTTD_BASE + 13, 0x980, SPR_OPENTTD_BASE + 29 },
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    62
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    63
		/* strings */
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    64
		{ STR_100C_MAGLEV_CONSTRUCTION },
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    65
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    66
		/* Offset of snow tiles */
2233
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
    67
		SPR_MGLV_SNOW_OFFSET,
2274
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    68
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    69
		/* Compatible Railtypes */
2233
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
    70
		(1 << RAILTYPE_MAGLEV),
2274
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    71
d94004c14b6c (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
celestar
parents: 2269
diff changeset
    72
		/* main offset */
2254
72f8883ff3ac (svn r2774) -Codechange: Removed TRACKTYPE_SPRITE_PITCH globally and replaced it by a member of RailtypeInfo
celestar
parents: 2236
diff changeset
    73
		164,
2233
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
    74
	},
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
    75
};
146e2e405ec1 (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
celestar
parents:
diff changeset
    76