Update readme.md
[openttd-joker.git] / src / table / road_land.h
blob2b2828679b897fe71aebc7821f04d37f12e0fa81
1 /* $Id: road_land.h 19056 2010-02-07 22:22:54Z peter1138 $ */
3 /*
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/>.
8 */
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)
17 TILE_SEQ_END()
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)
23 TILE_SEQ_END()
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)
29 TILE_SEQ_END()
32 static const DrawTileSeqStruct _road_depot_NW[] = {
33 TILE_SEQ_LINE(0x585 | (1 << PALETTE_MODIFIER_COLOUR), PAL_NONE, 15, 0, 1, 16)
34 TILE_SEQ_END()
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)
51 TILE_SEQ_END()
54 static const DrawTileSprites _crossing_layout = {
55 {0, PAL_NONE}, _crossing_layout_ALL
58 #undef TILE_SEQ_LINE
59 #undef TILE_SEQ_END
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[] = {
79 ENDLINE
82 static const DrawRoadTileStruct _road_display_datas2_3[] = {
83 MAKELINE(0x57f, 1, 8)
84 ENDLINE
87 static const DrawRoadTileStruct _road_display_datas2_5[] = {
88 MAKELINE(0x57f, 1, 8)
89 MAKELINE(0x57e, 14, 8)
90 ENDLINE
93 static const DrawRoadTileStruct _road_display_datas2_6[] = {
94 MAKELINE(0x57e, 8, 1)
95 ENDLINE
98 static const DrawRoadTileStruct _road_display_datas2_7[] = {
99 MAKELINE(0x57f, 1, 8)
100 ENDLINE
103 static const DrawRoadTileStruct _road_display_datas2_9[] = {
104 MAKELINE(0x57f, 8, 14)
105 ENDLINE
108 static const DrawRoadTileStruct _road_display_datas2_10[] = {
109 MAKELINE(0x57f, 8, 14)
110 MAKELINE(0x57e, 8, 1)
111 ENDLINE
114 static const DrawRoadTileStruct _road_display_datas2_11[] = {
115 MAKELINE(0x57f, 8, 14)
116 ENDLINE
119 static const DrawRoadTileStruct _road_display_datas2_12[] = {
120 MAKELINE(0x57e, 8, 1)
121 ENDLINE
124 static const DrawRoadTileStruct _road_display_datas2_13[] = {
125 MAKELINE(0x57e, 14, 8)
126 ENDLINE
129 static const DrawRoadTileStruct _road_display_datas2_14[] = {
130 MAKELINE(0x57e, 8, 1)
131 ENDLINE
134 static const DrawRoadTileStruct _road_display_datas2_19[] = {
135 MAKELINE(0x1212, 0, 2)
136 MAKELINE(0x1212, 3, 9)
137 MAKELINE(0x1212, 10, 12)
138 ENDLINE
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)
146 ENDLINE
149 static const DrawRoadTileStruct _road_display_datas2_22[] = {
150 MAKELINE(0x1212, 10, 0)
151 MAKELINE(0x1212, 3, 3)
152 MAKELINE(0x1212, 0, 10)
153 ENDLINE
156 static const DrawRoadTileStruct _road_display_datas2_23[] = {
157 MAKELINE(0x1212, 0, 2)
158 MAKELINE(0x1212, 0, 10)
159 ENDLINE
162 static const DrawRoadTileStruct _road_display_datas2_25[] = {
163 MAKELINE(0x1212, 12, 2)
164 MAKELINE(0x1212, 9, 9)
165 MAKELINE(0x1212, 2, 12)
166 ENDLINE
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)
174 ENDLINE
177 static const DrawRoadTileStruct _road_display_datas2_27[] = {
178 MAKELINE(0x1212, 2, 12)
179 MAKELINE(0x1212, 10, 12)
180 ENDLINE
183 static const DrawRoadTileStruct _road_display_datas2_28[] = {
184 MAKELINE(0x1212, 2, 0)
185 MAKELINE(0x1212, 9, 3)
186 MAKELINE(0x1212, 12, 10)
187 ENDLINE
190 static const DrawRoadTileStruct _road_display_datas2_29[] = {
191 MAKELINE(0x1212, 12, 2)
192 MAKELINE(0x1212, 12, 10)
193 ENDLINE
196 static const DrawRoadTileStruct _road_display_datas2_30[] = {
197 MAKELINE(0x1212, 2, 0)
198 MAKELINE(0x1212, 10, 0)
199 ENDLINE
202 #undef MAKELINE
203 #undef ENDLINE
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[] = {
217 _roadside_nothing,
218 _roadside_nothing,
219 _roadside_nothing,
220 _road_display_datas2_3,
221 _roadside_nothing,
222 _road_display_datas2_5,
223 _road_display_datas2_6,
224 _road_display_datas2_7,
225 _roadside_nothing,
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,
232 _roadside_nothing,
235 static const DrawRoadTileStruct * const _roadside_trees[] = {
236 _roadside_nothing,
237 _roadside_nothing,
238 _roadside_nothing,
239 _road_display_datas2_19,
240 _roadside_nothing,
241 _road_display_datas2_21,
242 _road_display_datas2_22,
243 _road_display_datas2_23,
245 _roadside_nothing,
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,
252 _roadside_nothing,
255 static const DrawRoadTileStruct * const * const _road_display_table[] = {
256 _roadside_none,
257 _roadside_none,
258 _roadside_none,
259 _roadside_lamps,
260 _roadside_none,
261 _roadside_trees,