Let HandleWindowDragging return a boolean status
[openttd/fttd.git] / src / table / road_land.cpp
blobb6c2baf864d743073b26717ab1de1124c440f4da
1 /* $Id$ */
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.cpp Sprite constructs for road depots. */
12 #include "road_land.h"
14 const SpriteID _road_tile_sprites_1[16] = {
15 0, 0x546, 0x545, 0x53B, 0x544, 0x534, 0x53E, 0x539,
16 0x543, 0x53C, 0x535, 0x538, 0x53D, 0x537, 0x53A, 0x536
19 const SpriteID _road_frontwire_sprites_1[16] = {
20 0, 0x54, 0x55, 0x5B, 0x54, 0x54, 0x5E, 0x5A, 0x55, 0x5C, 0x55, 0x58, 0x5D, 0x57, 0x59, 0x56
23 const SpriteID _road_backpole_sprites_1[16] = {
24 0, 0x38, 0x39, 0x40, 0x38, 0x38, 0x43, 0x3E, 0x39, 0x41, 0x39, 0x3C, 0x42, 0x3B, 0x3D, 0x3A
27 #define MAKELINE(a, b, c) { a, b, c },
28 #define ENDLINE { 0, 0, 0 }
30 static const DrawRoadTileStruct _roadside_nothing[] = {
31 ENDLINE
34 static const DrawRoadTileStruct _roadside_lamps_ne[] = {
35 MAKELINE(0x57f, 1, 8) // lamp at ne side
36 ENDLINE
39 static const DrawRoadTileStruct _roadside_lamps_sw[] = {
40 MAKELINE(0x57e, 14, 8) // lamp at sw side
41 ENDLINE
44 static const DrawRoadTileStruct _roadside_lamps_y[] = {
45 MAKELINE(0x57f, 1, 8) // lamp at ne side
46 MAKELINE(0x57e, 14, 8) // lamp at sw side
47 ENDLINE
50 static const DrawRoadTileStruct _roadside_lamps_nw[] = {
51 MAKELINE(0x57e, 8, 1) // lamp at nw side
52 ENDLINE
55 static const DrawRoadTileStruct _roadside_lamps_se[] = {
56 MAKELINE(0x57f, 8, 14) // lamp at se side
57 ENDLINE
60 static const DrawRoadTileStruct _roadside_lamps_x[] = {
61 MAKELINE(0x57f, 8, 14) // lamp at se side
62 MAKELINE(0x57e, 8, 1) // lamp at nw side
63 ENDLINE
66 static const DrawRoadTileStruct _roadside_trees_w[] = {
67 MAKELINE(0x1212, 0, 2)
68 MAKELINE(0x1212, 3, 9)
69 MAKELINE(0x1212, 10, 12)
70 ENDLINE
73 static const DrawRoadTileStruct _roadside_trees_y[] = {
74 MAKELINE(0x1212, 0, 2)
75 MAKELINE(0x1212, 0, 10)
76 MAKELINE(0x1212, 12, 2)
77 MAKELINE(0x1212, 12, 10)
78 ENDLINE
81 static const DrawRoadTileStruct _roadside_trees_s[] = {
82 MAKELINE(0x1212, 10, 0)
83 MAKELINE(0x1212, 3, 3)
84 MAKELINE(0x1212, 0, 10)
85 ENDLINE
88 static const DrawRoadTileStruct _roadside_trees_3sw[] = {
89 MAKELINE(0x1212, 0, 2)
90 MAKELINE(0x1212, 0, 10)
91 ENDLINE
94 static const DrawRoadTileStruct _roadside_trees_n[] = {
95 MAKELINE(0x1212, 12, 2)
96 MAKELINE(0x1212, 9, 9)
97 MAKELINE(0x1212, 2, 12)
98 ENDLINE
101 static const DrawRoadTileStruct _roadside_trees_x[] = {
102 MAKELINE(0x1212, 2, 0)
103 MAKELINE(0x1212, 10, 0)
104 MAKELINE(0x1212, 2, 12)
105 MAKELINE(0x1212, 10, 12)
106 ENDLINE
109 static const DrawRoadTileStruct _roadside_trees_3nw[] = {
110 MAKELINE(0x1212, 2, 12)
111 MAKELINE(0x1212, 10, 12)
112 ENDLINE
115 static const DrawRoadTileStruct _roadside_trees_e[] = {
116 MAKELINE(0x1212, 2, 0)
117 MAKELINE(0x1212, 9, 3)
118 MAKELINE(0x1212, 12, 10)
119 ENDLINE
122 static const DrawRoadTileStruct _roadside_trees_3ne[] = {
123 MAKELINE(0x1212, 12, 2)
124 MAKELINE(0x1212, 12, 10)
125 ENDLINE
128 static const DrawRoadTileStruct _roadside_trees_3se[] = {
129 MAKELINE(0x1212, 2, 0)
130 MAKELINE(0x1212, 10, 0)
131 ENDLINE
134 #undef MAKELINE
135 #undef ENDLINE
137 static const DrawRoadTileStruct * const _roadside_none[16] = {
138 _roadside_nothing, _roadside_nothing,
139 _roadside_nothing, _roadside_nothing,
140 _roadside_nothing, _roadside_nothing,
141 _roadside_nothing, _roadside_nothing,
142 _roadside_nothing, _roadside_nothing,
143 _roadside_nothing, _roadside_nothing,
144 _roadside_nothing, _roadside_nothing,
145 _roadside_nothing, _roadside_nothing
148 static const DrawRoadTileStruct * const _roadside_lamps[16] = {
149 _roadside_nothing, // ROAD_NONE
150 _roadside_nothing, // ROAD_NW
151 _roadside_nothing, // ROAD_SW
152 _roadside_lamps_ne, // ROAD_W
153 _roadside_nothing, // ROAD_SE
154 _roadside_lamps_y, // ROAD_Y
155 _roadside_lamps_nw, // ROAD_S
156 _roadside_lamps_ne, // ROAD_NW | ROAD_SW | ROAD_SE
157 _roadside_nothing, // ROAD_NE
158 _roadside_lamps_se, // ROAD_N
159 _roadside_lamps_x, // ROAD_X
160 _roadside_lamps_se, // ROAD_NW | ROAD_SW | ROAD_NE
161 _roadside_lamps_nw, // ROAD_E
162 _roadside_lamps_sw, // ROAD_NW | ROAD_SE | ROAD_NE
163 _roadside_lamps_nw, // ROAD_SW | ROAD_SE | ROAD_NE
164 _roadside_nothing, // ROAD_ALL
167 static const DrawRoadTileStruct * const _roadside_trees[16] = {
168 _roadside_nothing, // ROAD_NONE
169 _roadside_nothing, // ROAD_NW
170 _roadside_nothing, // ROAD_SW
171 _roadside_trees_w, // ROAD_W
172 _roadside_nothing, // ROAD_SE
173 _roadside_trees_y, // ROAD_Y
174 _roadside_trees_s, // ROAD_S
175 _roadside_trees_3sw, // ROAD_NW | ROAD_SW | ROAD_SE
176 _roadside_nothing, // ROAD_NE
177 _roadside_trees_n, // ROAD_N
178 _roadside_trees_x, // ROAD_X
179 _roadside_trees_3nw, // ROAD_NW | ROAD_SW | ROAD_NE
180 _roadside_trees_e, // ROAD_E
181 _roadside_trees_3ne, // ROAD_NW | ROAD_SE | ROAD_NE
182 _roadside_trees_3se, // ROAD_SW | ROAD_SE | ROAD_NE
183 _roadside_nothing, // ROAD_ALL
186 const DrawRoadTileStruct * const * const _road_display_table[] = {
187 _roadside_none,
188 _roadside_none,
189 _roadside_none,
190 _roadside_lamps,
191 _roadside_none,
192 _roadside_trees,