1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
5 <meta name=
"Description" content=
"Structure of OpenTTD (OTTD) landscape arrays #2">
6 <title>OpenTTD Landscape Internals - #
2</title>
7 <style type=
"text/css">
8 span
.abuse
{ font-family: "Courier New", Courier
, mono
; background-color: rgb
(255, 58, 31); }
9 span
.option
{ font-family: "Courier New", Courier
, mono
; background-color: rgb
(255,255, 30); }
10 span
.free
{ font-family: "Courier New", Courier
, mono
; background-color: rgb
(30, 178, 54); }
11 span
.used
{ font-family: "Courier New", Courier
, mono
; }
12 span
.used_p
{ font-family: "Courier New", Courier
, mono
; background-color: cyan
; }
13 td
.bits
{ white-space: nowrap
; text-align: center
; font-family: "Courier New", Courier
, mono
; }
14 td
.caption
{ white-space: nowrap
; text-align: left
; }
15 td li
{ white-space: nowrap
; text-align: left
; }
16 th
{ white-space: nowrap
; text-align: center
; }
19 <body style=
"direction: ltr;">
20 <h3 style=
"font-weight: bold;">Landscape
</h3>
21 <span style=
"font-weight: bold;"></span>Nine attributes hold the information about a tile.
22 This can be seen in the
<a href=
"landscape.html">Landscape
</a> document. This page tries to give an overview of used and free bits of
23 the array so you can quickly see what is used and what is not.
25 <li><span style=
"font-weight: bold;"><span class=
"free">O
</span></span> - bit is free
</li>
26 <li><span style=
"font-weight: bold;"><span class=
"used">X
</span></span> - bit is used
</li>
27 <li><span style=
"font-weight: bold;"><span class=
"used_p">P
</span></span> - bit is used by patch feature
</li>
28 <li><span style=
"font-weight: bold;"><span class=
"abuse"> </span></span> - bit of attribute is abused for different purposes, i.e. other bits define the actual meaning.
</li>
29 <li><span style=
"font-weight: bold;"><span class=
"option">~
</span></span> - bit is accessed, but does not really have a meaning (e.g. owner of clear land is always OWNER_NONE)
</li>
33 <li><span style=
"font-weight: bold;">type
</span> -
8 bits in size, tile class (bits
4.
.7), bridge (bits
2.
.3) tropic zone (bits
0.
.1, only valid in tropic climate)
</li>
34 <li><span style=
"font-weight: bold;">height
</span> -
8 bits in size, stores tile height
</li>
35 <li><span style=
"font-weight: bold;">m1
</span> -
8 bits in size, used to identify the owner of that tile (eg piece of rail, bridge, etc.)
</li>
36 <li><span style=
"font-weight: bold;">m2
</span> -
16 bits in size, used to identify the index of the given tile (object) in the (object-)array
</li>
37 <li><span style=
"font-weight: bold;">m3
</span> -
8 bits in size, is used for general storage; often used for the RailType
</li>
38 <li><span style=
"font-weight: bold;">m4
</span> -
8 bits in size, is used for general storage; often used for the Road-(Sub-)Types
</li>
39 <li><span style=
"font-weight: bold;">m5
</span> -
8 bits in size, is used for general storage
</li>
40 <li><span style=
"font-weight: bold;">m6
</span> -
8 bits in size, is used for general storage
</li>
41 <li><span style=
"font-weight: bold;">m7
</span> -
8 bits in size, is used for general storage; often used for NewGRF animation
</li>
44 <table align=center
border=
"1" cellpadding=
"2" cellspacing=
"2">
47 <th colspan=
2>class
</th>
59 <td colspan=
2 class=
"caption">bits
</td>
60 <td class=
"bits">7654 3210</td>
61 <td class=
"bits">7654 3210</td>
62 <td class=
"bits">7654 3210</td>
63 <td class=
"bits">FEDC BA98
7654 3210</td>
64 <td class=
"bits">7654 3210</td>
65 <td class=
"bits">7654 3210</td>
66 <td class=
"bits">7654 3210</td>
67 <td class=
"bits">7654 3210</td>
68 <td class=
"bits">7654 3210</td>
71 <td rowspan=
"2">0</td>
72 <td class=
"caption">ground
</td>
73 <td class=
"bits">XXXX XXXX
</td>
74 <td class=
"bits">XXXX XXXX
</td>
75 <td class=
"bits"><span class=
"free">OOO
</span><span class=
"option">~ ~~~~
</span></td>
76 <td class=
"bits"><span class=
"free">OOOO OOOO OOOO OOOO
</span></td>
77 <td class=
"bits">XXXX
<span class=
"free">OOOO
</span></td>
78 <td class=
"bits">XXXX XX
<span class=
"free">OO
</span></td>
79 <td class=
"bits">XXXX XXXX
</td>
80 <td class=
"bits"><span class=
"free">OOO
</span>X XX
<span class=
"free">OO
</span></td>
81 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
84 <td class=
"caption">farmland
</td>
85 <td class=
"bits">-inherit-
</td>
86 <td class=
"bits">-inherit-
</td>
87 <td class=
"bits">-inherit-
</td>
88 <td class=
"bits">XXXX XXXX XXXX XXXX
</td>
89 <td class=
"bits">XXXX XXXX
</td>
90 <td class=
"bits">-inherit-
</td>
91 <td class=
"bits">-inherit-
</td>
92 <td class=
"bits"><span class=
"free">OOO
</span>X XX
<span class=
"free">OO
</span></td>
93 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
97 <td class=
"caption">rail
</td>
98 <td class=
"bits">XXXX XXXX
</td>
99 <td class=
"bits">XXXX XXXX
</td>
100 <td class=
"bits"><span class=
"used_p">P
</span><span class=
"free">OO
</span>X XXXX
</td>
101 <td class=
"bits"><span class=
"free">OOOO
</span> XXXX
<span class=
"free">OOOO OOOO
</span></td>
102 <td class=
"bits"><span class=
"free">OOOO
</span> XXXX
</td>
103 <td class=
"bits"><span class=
"free">OOOO
</span> XXXX
</td>
104 <td class=
"bits">XXXX XXXX
</td>
105 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
106 <td class=
"bits"><span class=
"used_p">PPPP PPPP
</span></td>
109 <td class=
"caption">rail with signals
</td>
110 <td class=
"bits">-inherit-
</td>
111 <td class=
"bits">-inherit-
</td>
112 <td class=
"bits">-inherit-
</td>
113 <td class=
"bits"><span class=
"free">OOO
</span><span class=
"used_p">P
</span> XXXX XXXX XXXX
</td>
114 <td class=
"bits">XXXX XXXX
</td>
115 <td class=
"bits">XXXX XXXX
</td>
116 <td class=
"bits">-inherit-
</td>
117 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
118 <td class=
"bits"><span class=
"used_p">PPPP PPPP
</span></td>
121 <td class=
"caption">depot
</td>
122 <td class=
"bits">-inherit-
</td>
123 <td class=
"bits">-inherit-
</td>
124 <td class=
"bits">-inherit-
</td>
125 <td class=
"bits">XXXX XXXX XXXX XXXX
</td>
126 <td class=
"bits"><span class=
"free">OOOO
</span> XXXX
</td>
127 <td class=
"bits"><span class=
"free">OOOO
</span> XXXX
</td>
128 <td class=
"bits">XX
<span class=
"free">O
</span>X
<span class=
"free">OO
</span>XX
</td>
129 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
130 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
134 <td class=
"caption">road
</td>
135 <td class=
"bits">XXXX XXXX
</td>
136 <td class=
"bits">XXXX XXXX
</td>
137 <td class=
"bits"><span class=
"free">OOO
</span>X XXXX
</td>
138 <td class=
"bits">XXXX XXXX XXXX XXXX
</td>
139 <td class=
"bits">XXXX XXXX
</td>
140 <td class=
"bits">XXXX XXXX
</td>
141 <td class=
"bits">XXXX XXXX
</td>
142 <td class=
"bits"><span class=
"free">OO
</span>XX X
<span class=
"free">OOO
</span></td>
143 <td class=
"bits"><span class=
"used_p">PP
</span>X
<span class=
"free">O
</span> XXXX
</td>
146 <td class=
"caption">level crossing
</td>
147 <td class=
"bits">-inherit-
</td>
148 <td class=
"bits">-inherit-
</td>
149 <td class=
"bits"><span class=
"used_p">P
</span><span class=
"free">OO
</span>X XXXX
</td>
150 <td class=
"bits">-inherit-
</td>
151 <td class=
"bits">XXXX XXXX
</td>
152 <td class=
"bits">-inherit-
</td>
153 <td class=
"bits">XXXX
<span class=
"free"> OOO
</span>X
</td>
154 <td class=
"bits"><span class=
"free">OO
</span>XX X
<span class=
"free">OOO
</span></td>
155 <td class=
"bits"><span class=
"used_p">PP
</span>XX XXXX
</td>
158 <td class=
"caption">road depot
</td>
159 <td class=
"bits">-inherit-
</td>
160 <td class=
"bits">-inherit-
</td>
161 <td class=
"bits"><span class=
"free">OOO
</span>X XXXX
</td>
162 <td class=
"bits">-inherit-
</td>
163 <td class=
"bits">XXXX
<span class=
"free">OOOO
</span></td>
164 <td class=
"bits">-inherit-
</td>
165 <td class=
"bits">XX
<span class=
"free">OO OO
</span>XX
</td>
166 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
167 <td class=
"bits"><span class=
"used_p">PP
</span>X
<span class=
"free">O
</span> XXXX
</td>
171 <td class=
"caption">house
</td>
172 <td class=
"bits">XXXX XXXX
</td>
173 <td class=
"bits">XXXX XXXX
</td>
174 <td class=
"bits">XXXX XXXX
</td>
175 <td class=
"bits">XXXX XXXX XXXX XXXX
</td>
176 <td class=
"bits">XX
<span class=
"free">O
</span><span class=
"option">~ ~~
</span>XX
</td>
177 <td class=
"bits">XXXX XXXX
</td>
178 <td class=
"bits">XXX
<span class=
"abuse">X XXXX
</span></td>
179 <td class=
"bits"><span class=
"abuse">XXXX XX
</span><span class=
"free">OO
</span></td>
180 <td class=
"bits">XXXX
<span class=
"abuse">XXXX
</span></td>
184 <td class=
"caption">trees
</td>
185 <td class=
"bits">XXXX XXXX
</td>
186 <td class=
"bits">XXXX XXXX
</td>
187 <td class=
"bits"><span class=
"free">OOO
</span><span class=
"option">~ ~~~~
</span></td>
188 <td class=
"bits"><span class=
"free">OOOO OOO
</span>X XXXX XXXX
</td>
189 <td class=
"bits"><span class=
"option">~~
</span>XX XXXX
</td>
190 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
191 <td class=
"bits">XX
<span class=
"free">OO O
</span>XXX
</td>
192 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
193 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
197 <td class=
"caption">rail station
</td>
198 <td class=
"bits">XXXX XXXX
</td>
199 <td class=
"bits">XXXX XXXX
</td>
200 <td class=
"bits"><span class=
"used_p">P
</span>XXX XXXX
</td>
201 <td class=
"bits">XXXX XXXX XXXX XXXX
</td>
202 <td class=
"bits">XXXX XXXX
</td>
203 <td class=
"bits">XXXX XXXX
</td>
204 <td class=
"bits">XXXX XXXX
</td>
205 <td class=
"bits"><span class=
"free">OO
</span>XX XX
<span class=
"free">OO
</span></td>
206 <td class=
"bits">XXXX XXXX
</td>
209 <td class=
"caption">rail waypoint
</td>
210 <td class=
"bits">-inherit-
</td>
211 <td class=
"bits">-inherit-
</td>
212 <td class=
"bits">-inherit-
</td>
213 <td class=
"bits">-inherit-
</td>
214 <td class=
"bits">-inherit-
</td>
215 <td class=
"bits">-inherit-
</td>
216 <td class=
"bits">-inherit-
</td>
217 <td class=
"bits">-inherit-
</td>
218 <td class=
"bits">-inherit-
</td>
221 <td class=
"caption">road stop
</td>
222 <td class=
"bits">-inherit-
</td>
223 <td class=
"bits">-inherit-
</td>
224 <td class=
"bits">-inherit-
</td>
225 <td class=
"bits">-inherit-
</td>
226 <td class=
"bits">XXXX
<span class=
"free">OOOO
</span></td>
227 <td class=
"bits">XXXX XXXX
</td>
228 <td class=
"bits"><span class=
"option">~~~~ ~
</span>XXX
</td>
229 <td class=
"bits"><span class=
"free">OO
</span>XX XX
<span class=
"free">OO
</span></td>
230 <td class=
"bits"><span class=
"used_p">PP
</span><span class=
"free">O
</span>X XXXX
</td>
233 <td class=
"caption">dock
</td>
234 <td class=
"bits">-inherit-
</td>
235 <td class=
"bits">-inherit-
</td>
236 <td class=
"bits">-inherit-
</td>
237 <td class=
"bits">-inherit-
</td>
238 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
239 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
240 <td class=
"bits"><span class=
"option">~~~~ ~
</span>XXX
</td>
241 <td class=
"bits"><span class=
"free">OO
</span>XX XX
<span class=
"free">OO
</span></td>
242 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
245 <td class=
"caption">airport
</td>
246 <td class=
"bits">-inherit-
</td>
247 <td class=
"bits">-inherit-
</td>
248 <td class=
"bits">-inherit-
</td>
249 <td class=
"bits">-inherit-
</td>
250 <td class=
"bits">XXXX
<span class=
"free">OOOO
</span></td>
251 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
252 <td class=
"bits">XXXX XXXX
</td>
253 <td class=
"bits"><span class=
"free">OO
</span>XX XX
<span class=
"free">OO
</span></td>
254 <td class=
"bits">XXXX XXXX
</td>
257 <td class=
"caption">buoy
</td>
258 <td class=
"bits">-inherit-
</td>
259 <td class=
"bits">-inherit-
</td>
260 <td class=
"bits">-inherit-
</td>
261 <td class=
"bits">-inherit-
</td>
262 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
263 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
264 <td class=
"bits"><span class=
"option">~~~~ ~~~~
</span></td>
265 <td class=
"bits"><span class=
"free">OO
</span>XX XX
<span class=
"free">OO
</span></td>
266 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
269 <td class=
"caption">oilrig
</td>
270 <td class=
"bits">-inherit-
</td>
271 <td class=
"bits">-inherit-
</td>
272 <td class=
"bits">-inherit-
</td>
273 <td class=
"bits">-inherit-
</td>
274 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
275 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
276 <td class=
"bits"><span class=
"option">~~~~ ~~~~
</span></td>
277 <td class=
"bits"><span class=
"free">OO
</span>XX XX
<span class=
"free">OO
</span></td>
278 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
282 <td class=
"caption">sea, shore
</td>
283 <td class=
"bits">XXXX XXXX
</td>
284 <td class=
"bits">XXXX XXXX
</td>
285 <td class=
"bits"><span class=
"free">O
</span>XXX XXXX
</td>
286 <td class=
"bits"><span class=
"free">OOOO OOOO OOOO OOOO
</span></td>
287 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
288 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
289 <td class=
"bits">X
<span class=
"option">~~
</span>X XXXX
</td>
290 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
291 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
294 <td class=
"caption">canal, river
</td>
295 <td class=
"bits">-inherit-
</td>
296 <td class=
"bits">-inherit-
</td>
297 <td class=
"bits">-inherit-
</td>
298 <td class=
"bits"><span class=
"free">OOOO OOOO OOOO OOOO
</span></td>
299 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
300 <td class=
"bits">XXXX XXXX
</td>
301 <td class=
"bits">-inherit-
</td>
302 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
303 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
306 <td class=
"caption">shipdepot
</td>
307 <td class=
"bits">-inherit-
</td>
308 <td class=
"bits">-inherit-
</td>
309 <td class=
"bits">-inherit-
</td>
310 <td class=
"bits">XXXX XXXX XXXX XXXX
</td>
311 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
312 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
313 <td class=
"bits">-inherit-
</td>
314 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
315 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
319 <td class=
"caption">industry
</td>
320 <td class=
"bits">XXXX XXXX
</td>
321 <td class=
"bits">XXXX XXXX
</td>
322 <td class=
"bits">XXX
<span class=
"free">O
</span> <span class=
"abuse">XXXX
</span></td>
323 <td class=
"bits">XXXX XXXX XXXX XXXX
</td>
324 <td class=
"bits">XXXX XXXX
</td>
325 <td class=
"bits">XXXX XXXX
</td>
326 <td class=
"bits">XXXX XXXX
</td>
327 <td class=
"bits"><span class=
"free">OO
</span>XX XX
<span class=
"free">OO
</span></td>
328 <td class=
"bits">XXXX XXXX
</td>
332 <td class=
"caption">tunnel entrance
</td>
333 <td class=
"bits">XXXX XXXX
</td>
334 <td class=
"bits">XXXX XXXX
</td>
335 <td class=
"bits"><span class=
"used_p">P
</span><span class=
"free">OO
</span>X XXXX
</td>
336 <td class=
"bits"><span class=
"used_p">PPPP PPPP PPPP PPPP
</span></td>
337 <td class=
"bits">XXXX XXXX
</td>
338 <td class=
"bits">XXXX XXXX
</td>
339 <td class=
"bits">X
<span class=
"used_p">PP
</span>X XXXX
</td>
340 <td class=
"bits"><span class=
"free">O
</span><span class=
"used_p">P
</span><span class=
"free">OO OO
</span><span class=
"used_p">PP
</span></td>
341 <td class=
"bits"><span class=
"used_p">PP
</span>XX XXXX
</td>
345 <td class=
"bits">-inherit-
</td>
346 <td class=
"bits">-inherit-
</td>
347 <td class=
"bits">-inherit-
</td>
348 <td class=
"bits"><span class=
"used_p">PPPP PPPP PPPP PPPP
</span></td>
349 <td class=
"bits">-inherit-
</td>
350 <td class=
"bits">-inherit-
</td>
351 <td class=
"bits">-inherit-
</td>
352 <td class=
"bits"><span class=
"free">O
</span><span class=
"used_p">P
</span>XX XX
<span class=
"used_p">PP
</span></td>
353 <td class=
"bits">-inherit-
</td>
357 <td class=
"caption">objects
</td>
358 <td class=
"bits">XXXX XXXX
</td>
359 <td class=
"bits">XXXX XXXX
</td>
360 <td class=
"bits"><span class=
"free">O
</span>XXX XXXX
</td>
361 <td class=
"bits">XXXX XXXX XXXX XXXX
</td>
362 <td class=
"bits">XXXX XXXX
</td>
363 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
364 <td class=
"bits">XXXX XXXX
</td>
365 <td class=
"bits"><span class=
"free">OOOO OOOO
</span></td>
366 <td class=
"bits">XXXX XXXX
</td>