1 /* $Id: road_land.h 19056 2010-02-07 22:22:54Z peter1138 $ */
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
10 /** @file road_land.h Sprite constructs for road depots. */
12 #define TILE_SEQ_LINE(img, pal, dx, dy, sx, sy) { dx, dy, 0, sx, sy, 20, {img, pal} },
13 #define TILE_SEQ_END() { (int8)0x80, 0, 0, 0, 0, 0, {0, 0} }
15 static const DrawTileSeqStruct _road_depot_NE
[] = {
16 TILE_SEQ_LINE(0x584 | (1 << PALETTE_MODIFIER_COLOUR
), PAL_NONE
, 0, 15, 16, 1)
20 static const DrawTileSeqStruct _road_depot_SE
[] = {
21 TILE_SEQ_LINE(0x580 | (1 << PALETTE_MODIFIER_COLOUR
), PAL_NONE
, 0, 0, 1, 16)
22 TILE_SEQ_LINE(0x581 | (1 << PALETTE_MODIFIER_COLOUR
), PAL_NONE
, 15, 0, 1, 16)
26 static const DrawTileSeqStruct _road_depot_SW
[] = {
27 TILE_SEQ_LINE(0x582 | (1 << PALETTE_MODIFIER_COLOUR
), PAL_NONE
, 0, 0, 16, 1)
28 TILE_SEQ_LINE(0x583 | (1 << PALETTE_MODIFIER_COLOUR
), PAL_NONE
, 0, 15, 16, 1)
32 static const DrawTileSeqStruct _road_depot_NW
[] = {
33 TILE_SEQ_LINE(0x585 | (1 << PALETTE_MODIFIER_COLOUR
), PAL_NONE
, 15, 0, 1, 16)
37 static const DrawTileSprites _road_depot
[] = {
38 { {0xA4A, PAL_NONE
}, _road_depot_NE
},
39 { {0xA4A, PAL_NONE
}, _road_depot_SE
},
40 { {0xA4A, PAL_NONE
}, _road_depot_SW
},
41 { {0xA4A, PAL_NONE
}, _road_depot_NW
}
44 /* Sprite layout for level crossings. The SpriteIDs are actually offsets
45 * from the base SpriteID returned from the NewGRF sprite resolver. */
46 static const DrawTileSeqStruct _crossing_layout_ALL
[] = {
47 TILE_SEQ_LINE(2, PAL_NONE
, 0, 0, 3, 3)
48 TILE_SEQ_LINE(4, PAL_NONE
, 0, 13, 3, 3)
49 TILE_SEQ_LINE(6, PAL_NONE
, 13, 0, 3, 3)
50 TILE_SEQ_LINE(8, PAL_NONE
, 13, 13, 3, 3)
54 static const DrawTileSprites _crossing_layout
= {
55 {0, PAL_NONE
}, _crossing_layout_ALL
62 static const SpriteID _road_tile_sprites_1
[16] = {
63 0, 0x546, 0x545, 0x53B, 0x544, 0x534, 0x53E, 0x539,
64 0x543, 0x53C, 0x535, 0x538, 0x53D, 0x537, 0x53A, 0x536
67 static const SpriteID _road_frontwire_sprites_1
[16] = {
68 0, 0x54, 0x55, 0x5B, 0x54, 0x54, 0x5E, 0x5A, 0x55, 0x5C, 0x55, 0x58, 0x5D, 0x57, 0x59, 0x56
71 static const SpriteID _road_backpole_sprites_1
[16] = {
72 0, 0x38, 0x39, 0x40, 0x38, 0x38, 0x43, 0x3E, 0x39, 0x41, 0x39, 0x3C, 0x42, 0x3B, 0x3D, 0x3A
75 #define MAKELINE(a, b, c) { a, b, c },
76 #define ENDLINE { 0, 0, 0 }
78 static const DrawRoadTileStruct _roadside_nothing
[] = {
82 static const DrawRoadTileStruct _road_display_datas2_3
[] = {
87 static const DrawRoadTileStruct _road_display_datas2_5
[] = {
89 MAKELINE(0x57e, 14, 8)
93 static const DrawRoadTileStruct _road_display_datas2_6
[] = {
98 static const DrawRoadTileStruct _road_display_datas2_7
[] = {
103 static const DrawRoadTileStruct _road_display_datas2_9
[] = {
104 MAKELINE(0x57f, 8, 14)
108 static const DrawRoadTileStruct _road_display_datas2_10
[] = {
109 MAKELINE(0x57f, 8, 14)
110 MAKELINE(0x57e, 8, 1)
114 static const DrawRoadTileStruct _road_display_datas2_11
[] = {
115 MAKELINE(0x57f, 8, 14)
119 static const DrawRoadTileStruct _road_display_datas2_12
[] = {
120 MAKELINE(0x57e, 8, 1)
124 static const DrawRoadTileStruct _road_display_datas2_13
[] = {
125 MAKELINE(0x57e, 14, 8)
129 static const DrawRoadTileStruct _road_display_datas2_14
[] = {
130 MAKELINE(0x57e, 8, 1)
134 static const DrawRoadTileStruct _road_display_datas2_19
[] = {
135 MAKELINE(0x1212, 0, 2)
136 MAKELINE(0x1212, 3, 9)
137 MAKELINE(0x1212, 10, 12)
141 static const DrawRoadTileStruct _road_display_datas2_21
[] = {
142 MAKELINE(0x1212, 0, 2)
143 MAKELINE(0x1212, 0, 10)
144 MAKELINE(0x1212, 12, 2)
145 MAKELINE(0x1212, 12, 10)
149 static const DrawRoadTileStruct _road_display_datas2_22
[] = {
150 MAKELINE(0x1212, 10, 0)
151 MAKELINE(0x1212, 3, 3)
152 MAKELINE(0x1212, 0, 10)
156 static const DrawRoadTileStruct _road_display_datas2_23
[] = {
157 MAKELINE(0x1212, 0, 2)
158 MAKELINE(0x1212, 0, 10)
162 static const DrawRoadTileStruct _road_display_datas2_25
[] = {
163 MAKELINE(0x1212, 12, 2)
164 MAKELINE(0x1212, 9, 9)
165 MAKELINE(0x1212, 2, 12)
169 static const DrawRoadTileStruct _road_display_datas2_26
[] = {
170 MAKELINE(0x1212, 2, 0)
171 MAKELINE(0x1212, 10, 0)
172 MAKELINE(0x1212, 2, 12)
173 MAKELINE(0x1212, 10, 12)
177 static const DrawRoadTileStruct _road_display_datas2_27
[] = {
178 MAKELINE(0x1212, 2, 12)
179 MAKELINE(0x1212, 10, 12)
183 static const DrawRoadTileStruct _road_display_datas2_28
[] = {
184 MAKELINE(0x1212, 2, 0)
185 MAKELINE(0x1212, 9, 3)
186 MAKELINE(0x1212, 12, 10)
190 static const DrawRoadTileStruct _road_display_datas2_29
[] = {
191 MAKELINE(0x1212, 12, 2)
192 MAKELINE(0x1212, 12, 10)
196 static const DrawRoadTileStruct _road_display_datas2_30
[] = {
197 MAKELINE(0x1212, 2, 0)
198 MAKELINE(0x1212, 10, 0)
205 static const DrawRoadTileStruct
* const _roadside_none
[] = {
206 _roadside_nothing
, _roadside_nothing
,
207 _roadside_nothing
, _roadside_nothing
,
208 _roadside_nothing
, _roadside_nothing
,
209 _roadside_nothing
, _roadside_nothing
,
210 _roadside_nothing
, _roadside_nothing
,
211 _roadside_nothing
, _roadside_nothing
,
212 _roadside_nothing
, _roadside_nothing
,
213 _roadside_nothing
, _roadside_nothing
216 static const DrawRoadTileStruct
* const _roadside_lamps
[] = {
220 _road_display_datas2_3
,
222 _road_display_datas2_5
,
223 _road_display_datas2_6
,
224 _road_display_datas2_7
,
226 _road_display_datas2_9
,
227 _road_display_datas2_10
,
228 _road_display_datas2_11
,
229 _road_display_datas2_12
,
230 _road_display_datas2_13
,
231 _road_display_datas2_14
,
235 static const DrawRoadTileStruct
* const _roadside_trees
[] = {
239 _road_display_datas2_19
,
241 _road_display_datas2_21
,
242 _road_display_datas2_22
,
243 _road_display_datas2_23
,
246 _road_display_datas2_25
,
247 _road_display_datas2_26
,
248 _road_display_datas2_27
,
249 _road_display_datas2_28
,
250 _road_display_datas2_29
,
251 _road_display_datas2_30
,
255 static const DrawRoadTileStruct
* const * const _road_display_table
[] = {