Update: Translations from eints
[openttd-github.git] / docs / landscape.html
blob24739af619c36fec3a5c605646ff065b1ba35be7
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
4 <head>
5 <meta name="Author" content="Marcin Grzegorczyk">
6 <meta name="Description" content="Structure of OpenTTD (OTTD) landscape arrays">
7 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
8 <title>OpenTTD Landscape Internals</title>
9 </head>
11 <body>
13 <h3><a name="Landscape">Landscape</a></h3>
14 <p>
15 For a graphical representation of the tile-layout have a look at
16 <a href="landscape_grid.html">Landscape grid</a> page.
17 </p>
18 <p>Nine attributes (counting &quot;<span style="font-weight: bold;">type</span>&quot; and
19 &quot;<span style="font-weight: bold;">height</span>&quot;) hold the information about a tile.<BR>
20 These attributes are referred to as
21 &quot;<span style="font-weight: bold;">type</span>",
22 &quot;<span style="font-weight: bold;">height</span>",
23 &quot;<span style="font-weight: bold;">m1</span>&quot;, &quot;<span style="font-weight: bold;">m2</span>&quot;,
24 &quot;<span style="font-weight: bold;">m3</span>&quot;, &quot;<span style="font-weight: bold;">m4</span>&quot;,
25 &quot;<span style="font-weight: bold;">m5</span>&quot;, &quot;<span style="font-weight: bold;">m6</span>&quot;
26 and "<span style="font-weight: bold;">m7</span>".<br>
27 The most important value is the class of a tile, stored in the upper 4 bits
28 of the <span style="font-weight: bold;">type</span> attribute.
29 </p>
31 Frequently repeating patterns:
32 <ul>
33 <li><span style="font-weight: bold;">type</span>
34 <ul>
35 <li>
36 <a name="type"></a>
37 Bits 7..4:
38 <table border="1" style="width: 30em;">
39 <tr bgcolor="#CCCCCC"><td colspan="2">The tile type.</td></tr>
40 <tr><td style="width: 5em;"><tt>00</tt></td><td>Ground</td></tr>
41 <tr><td><tt>01</tt></td><td>Railway tracks</td></tr>
42 <tr><td><tt>02</tt></td><td>Roads</td></tr>
43 <tr><td><tt>03</tt></td><td>Town building</td></tr>
44 <tr><td><tt>04</tt></td><td>Trees</td></tr>
45 <tr><td><tt>05</tt></td><td>Station tiles</td></tr>
46 <tr><td><tt>06</tt></td><td>Water</td></tr>
47 <tr><td><tt>07</tt></td><td>Void</td></tr>
48 <tr><td><tt>08</tt></td><td>Industries</td></tr>
49 <tr><td><tt>09</tt></td><td>Tunnel / bridge</td></tr>
50 <tr><td><tt>0A</tt></td><td>Objects</td></tr>
51 </table>
52 </li>
53 Bits 3..2:
54 <table border="1" style="width: 30em;">
55 <tr bgcolor="#CCCCCC"><td colspan="2">Presence and direction of bridge above.</td></tr>
56 <tr><td style="width: 5em;"><tt>00</tt></td><td>no bridge</td></tr>
57 <tr><td><tt>01</tt></td><td>Axis X (North-East)</td></tr>
58 <tr><td><tt>02</tt></td><td>Axis Y (South-West)</td></tr>
59 </table>
60 <li>
61 <a name="tropic_zone"></a>
62 Bits 1..0:
63 <table border="1" style="width: 30em;">
64 <tr bgcolor="#CCCCCC"><td colspan="2">Only meaningful in tropic climate. It contains the definition of the available zones</td></tr>
65 <tr><td style="width: 5em;"><tt>00</tt></td><td>normal</td></tr>
66 <tr><td><tt>01</tt></td><td>desert</td></tr>
67 <tr><td><tt>02</tt></td><td>rain forest</td></tr>
68 </table>
69 In any other climate these 2 bits are theoretically free of use, however using them does not seem useful.
70 </li>
71 </ul>
72 <li><span style="font-weight: bold;">m1</span>
73 <ul>
74 <li>
75 <a name="WaterClass"></a>
76 Bits 6..5:
77 <table border="1" style="width: 30em;">
78 <tr bgcolor="#CCCCCC"><td colspan="2">The type of water that is on a tile.
79 <tr><td style="width: 5em;"><tt>00</tt></td><td align=left>Sea</td></tr>
80 <tr><td><tt>01</tt></td><td align=left>Canal</td></tr>
81 <tr><td><tt>02</tt></td><td align=left>River</td></tr>
82 <tr><td><tt>03</tt></td><td align=left>Invalid, i.e. no water on this tile</td></tr>
83 </table>
84 Some tiles, such as houses, reuse these bits of other purposes.
85 </li>
86 <li>
87 <a name="OwnershipInfo"></a>
88 Bits 4..0:
89 <table border="1" style="width: 30em;">
90 <tr bgcolor="#CCCCCC"><td colspan="2">The owner of a tile can be either companies (human or AI) or "Game entities".
91 <tr><td style="width: 5em;"><tt>00..0E</tt></td><td align=left>Normal companies</td></tr>
92 <tr><td><tt>0F</tt></td><td align=left>a town owns the tile</td></tr>
93 <tr><td><tt>10</tt></td><td align=left>nobody owns the tile</td></tr>
94 <tr><td><tt>11</tt></td><td align=left>"water" owns the tile</td></tr>
95 <tr><td><tt>FF</tt></td><td align=left>spectator in MP or in scenario editor</td></tr>
96 </table>
97 Some tiles, such as houses and industries, reuse these bits of other purposes.
98 </li>
99 </ul>
100 </li>
101 <li><span style="font-weight: bold;">m4:</span><br>
102 <a name="RoadType"></a>
103 Road roadtype. Used for all tiles with road (road, station, tunnelbridge).
104 <ul>
105 <li>
106 Bits 5..0: Road roadtype, 0x3F for no road.
107 </li>
108 </ul>
109 </li>
110 <li><span style="font-weight: bold;">m8:</span><br>
111 <a name="TramType"></a>
112 Tram roadtype. Used for all tiles with road (road, station, tunnelbridge).
113 <ul>
114 <li>
115 Bits 11..6: Tram roadtype, 0x3F for no tram.
116 </li>
117 </ul>
118 </li>
119 <li><span style="font-weight: bold;">m8:</span><br>
120 <ul>
121 <li>
122 <a name="RailType"></a>
123 Bits 5..0: Railtype. Used for all tiles with rail (road, rail, station, tunnelbridge).
124 </li>
125 </ul>
126 </li>
127 <li><span style="font-weight: bold;">m7:</span><br>
128 Animation frame/state. Used for houses, industries, objects and stations.
129 </li>
130 </ul>
132 <p>OTTD's class-specific periodic tile processing routine is called once every +256 ticks for each tile.</p>
134 <table border=1 cellpadding=3>
135 <tr bgcolor="#0099FF">
136 <th align=left><font color="#FFFFFF">Class</font></th>
137 <th align=left><font color="#FFFFFF">Meaning &amp; details of encoding</font></th>
138 </tr>
139 <tr bgcolor="#CCCCCC">
140 <td align=left><strong><a name="Class0"><tt> 0 </tt></a></strong></td>
141 <td align=left>&nbsp;<strong>Ground </strong></td>
142 </tr>
143 <tr>
144 <td valign=top nowrap>&nbsp;</td>
145 <td>
146 <ul>
147 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the tile (normally <tt>10</tt>)</li>
148 <li>m2: see fields</li>
149 <li>m3 bits 7..5: type of hedge on NE border of the tile</li>
150 <li>m3 bits 3..0: see fields</li>
151 <li>m3 bit 4: set if the tile is covered with snow</li>
152 <li>m4 bits 7..5: type of hedge on the SW border of the tile (1 through 6, or 0=none)</li>
153 <li>m4 bits 4..2: same as 7..5, but for the SE border</li>
154 <li>m5 bits 7..5: update counter, incremented on every periodic processing for tile types,
155 other than <tt>03</tt>, <tt>07</tt>, <tt>0B</tt>, <tt>10</tt> and above.<BR>
156 on wraparound, the tile is updated (for fields, the type of fields in m3 is increased, for other types the tile type in m5 is increased).<BR>
157 For snow and desert, these bits are not used, tile is updated on every periodic processing.</li>
158 <li>m5 bits 4..2: tile type:
159 <table>
160 <tr>
161 <td nowrap valign=top><tt>0</tt>&nbsp; </td>
162 <td align=left>bare land / grass</td>
163 </tr>
165 <tr>
166 <td nowrap valign=top><tt>1</tt>&nbsp; </td>
167 <td align=left>rough land (density must be 3)</td>
168 </tr>
170 <tr>
171 <td nowrap valign=top><tt>2</tt>&nbsp; </td>
172 <td align=left>rocks (density must be 3)</td>
173 </tr>
175 <tr>
176 <td nowrap valign=top><tt>3</tt>&nbsp; </td>
177 <td align=left>fields (density must be 3)
178 <ul>
179 <li>m2: index into the array of industries (farms), INVALID_INDUSTRY (0xFFFF) if farm has been removed</li>
180 <li>m3 bits 3..0: field type (legal values: 0 through 9)</li>
181 </ul>
182 </td>
183 </tr>
185 <tr>
186 <td nowrap valign=top><tt>4</tt>&nbsp; </td>
187 <td align=left>snow</td>
188 </tr>
190 <tr>
191 <td nowrap valign=top><tt>5</tt>&nbsp; </td>
192 <td align=left>desert (density must be 1 or 3)</td>
193 </tr>
194 </table>
195 </li>
196 <li>m5 bits 1..0: density:
197 <table>
198 <tr>
199 <td nowrap valign=top><tt>0</tt>&nbsp; </td>
200 <td>bare land</td>
201 <td></td>
202 <td></td>
203 <td></td>
204 <td>1/4 snow</td>
205 <td></td>
206 </tr>
208 <tr>
209 <td nowrap valign=top><tt>1</tt>&nbsp; </td>
210 <td>1/3 grass</td>
211 <td></td>
212 <td></td>
213 <td></td>
214 <td>2/4 snow;&nbsp;</td>
215 <td>1/2 desert</td>
216 </tr>
218 <tr>
219 <td nowrap valign=top><tt>2</tt>&nbsp; </td>
220 <td>2/3 grass</td>
221 <td></td>
222 <td></td>
223 <td></td>
224 <td>3/4 snow</td>
225 <td></td>
226 </tr>
228 <tr>
229 <td nowrap valign=top><tt>3</tt>&nbsp; </td>
230 <td>full grass;&nbsp;</td>
231 <td>rough land;&nbsp;</td>
232 <td>rocks;&nbsp;</td>
233 <td>fields;&nbsp;</td>
234 <td>full snow;&nbsp;</td>
235 <td>full desert</td>
236 </tr>
237 </table>
238 </li>
239 <li>m6 bits 4..2: type of hedge on NW border of the tile</li>
240 </ul>
241 </td>
242 </tr>
244 <tr bgcolor="#CCCCCC">
245 <td valign=top nowrap><strong><a name="Class1"><tt> 1</tt></a></strong></td>
246 <td><strong>Railway tracks</strong></td>
247 </tr>
248 <tr>
249 <td valign=top nowrap>&nbsp;</td>
250 <td>
251 <ul>
252 <li>m1 bit 7: Ship docking tile status (for half-tile with water)</li>
253 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the tile</li>
254 <li>m2: see signals</li>
255 <li>m3 bits 7..4: see signals</li>
256 <li>m8 bits 5..0 = <a name="TrackType">track type</a>:
257 <table>
258 <tr>
259 <td><tt>0</tt>&nbsp; </td>
260 <td>conventional railway</td>
261 </tr>
263 <tr>
264 <td><tt>1</tt>&nbsp; </td>
265 <td>electrified railway</td>
266 </tr>
268 <tr>
269 <td><tt>2</tt>&nbsp; </td>
270 <td>monorail</td>
271 </tr>
273 <tr>
274 <td><tt>3</tt>&nbsp; </td>
275 <td>maglev</td>
276 </tr>
277 </table>
278 </li>
279 <li>m4 bits 7..4: see signals</li>
280 <li>m4 bits 3..0: Ground type (values with fences are not valid for depots and checkpoints)
281 <table>
282 <tr>
283 <td nowrap valign=top><tt>0</tt>&nbsp; </td>
284 <td align=left>on bare land</td>
285 </tr>
287 <tr>
288 <td nowrap valign=top><tt>1</tt>&nbsp; </td>
289 <td align=left>on grass, no fences</td>
290 </tr>
292 <tr>
293 <td nowrap valign=top><tt>2</tt>&nbsp; </td>
294 <td align=left>fence on the NW side</td>
295 </tr>
297 <tr>
298 <td nowrap valign=top><tt>3</tt>&nbsp; </td>
299 <td align=left>fence on the SE side</td>
300 </tr>
302 <tr>
303 <td nowrap valign=top><tt>4</tt>&nbsp; </td>
304 <td align=left>fences on the NW and SE sides</td>
305 </tr>
307 <tr>
308 <td nowrap valign=top><tt>5</tt>&nbsp; </td>
309 <td align=left>fence on the NE side</td>
310 </tr>
312 <tr>
313 <td nowrap valign=top><tt>6</tt>&nbsp; </td>
314 <td align=left>fence on the SW side</td>
315 </tr>
317 <tr>
318 <td nowrap valign=top><tt>7</tt>&nbsp; </td>
319 <td align=left>fences on the NE and SW sides</td>
320 </tr>
322 <tr>
323 <td nowrap valign=top><tt>8</tt>&nbsp; </td>
324 <td align=left>fence on the E side (track in the W corner)</td>
325 </tr>
327 <tr>
328 <td nowrap valign=top><tt>9</tt>&nbsp; </td>
329 <td align=left>fence on the W side (track in the E corner)</td>
330 </tr>
332 <tr>
333 <td nowrap valign=top><tt>A</tt>&nbsp; </td>
334 <td align=left>fence on the S side (track in the N corner)</td>
335 </tr>
337 <tr>
338 <td nowrap valign=top><tt>B</tt>&nbsp; </td>
339 <td align=left>fence on the N side (track in the S corner)</td>
340 </tr>
342 <tr>
343 <td nowrap valign=top><tt>C</tt>&nbsp; </td>
344 <td align=left>on snow or desert</td>
345 </tr>
347 <tr>
348 <td nowrap valign=top><tt>D</tt>&nbsp; </td>
349 <td align=left>on grass with fence and shore or water on the free halftile</td>
350 </tr>
352 <tr>
353 <td nowrap valign=top><tt>E</tt>&nbsp; </td>
354 <td align=left>higher part on foundation with snow, lower without snow</td>
355 </tr>
356 </table>
357 </li>
358 <li>m5 bit 7 clear: railway track
359 <ul>
360 <li>m5 bits 5..0: track layout: bit set = track present:
361 <table>
362 <tr>
363 <td nowrap valign=top>bit 0: </td>
364 <td align=left>in the X direction</td>
365 </tr>
367 <tr>
368 <td nowrap valign=top>bit 1: </td>
369 <td align=left>in the Y direction</td>
370 </tr>
372 <tr>
373 <td nowrap valign=top>bit 2: </td>
374 <td align=left>in the north corner (direction W-E)</td>
375 </tr>
377 <tr>
378 <td nowrap valign=top>bit 3: </td>
379 <td align=left>in the south corner (direction W-E)</td>
380 </tr>
382 <tr>
383 <td nowrap valign=top>bit 4: </td>
384 <td align=left>in the west corner (direction N-S)</td>
385 </tr>
387 <tr>
388 <td nowrap valign=top>bit 5: </td>
389 <td align=left>in the east corner (direction N-S)</td>
390 </tr>
391 </table>
392 </li>
393 <li>m5 bit 6 set = with signals:<BR>
394 There are at most 4 signals on a tile. The signals 0..3 belong to the directions:
395 <table>
396 <tr>
397 <td></td>
398 <td>Track <tt>0</tt> (X)&nbsp;</td>
399 <td>Track <tt>1</tt> (Y)&nbsp;</td>
400 <td>Track <tt>2</tt> (north)&nbsp;</td>
401 <td>Track <tt>3</tt> (south)&nbsp;</td>
402 <td>Track <tt>4</tt> (west)&nbsp;</td>
403 <td>Track <tt>5</tt> (east)</td>
404 </tr>
406 <tr>
407 <td align=left>Signal <tt>0</tt>&nbsp;</td>
408 <td></td>
409 <td></td>
410 <td></td>
411 <td>west</td>
412 <td></td>
413 <td>south</td>
414 </tr>
416 <tr>
417 <td align=left>Signal <tt>1</tt>&nbsp;</td>
418 <td></td>
419 <td></td>
420 <td></td>
421 <td>east</td>
422 <td></td>
423 <td>north</td>
424 </tr>
426 <tr>
427 <td align=left>Signal <tt>2</tt>&nbsp;</td>
428 <td>south-west</td>
429 <td>north-west</td>
430 <td>west</td>
431 <td></td>
432 <td>south</td>
433 <td></td>
434 </tr>
436 <tr>
437 <td align=left>Signal <tt>3</tt>&nbsp;</td>
438 <td>north-east</td>
439 <td>south-east</td>
440 <td>east</td>
441 <td></td>
442 <td>north</td>
443 <td></td>
444 </tr>
445 </table>
446 <ul>
447 <li>m2 bit 7: Signal 0 and 1: set = semaphore signals, clear = light signals</li>
448 <li>m2 bit 3: Signal 2 and 3: set = semaphore signals, clear = light signals</li>
449 <li>m2 bits 6..4: type of signal 0 and 1 (same values as m2 bits 2..0)</li>
450 <li>m2 bits 2..0: type of signal 2 and 3
451 <table>
452 <tr>
453 <td nowrap="nowrap" valign="top"><tt>000</tt>: </td>
454 <td align="left">normal signals</td>
455 </tr>
457 <tr>
458 <td nowrap="nowrap" valign="top"><tt>001</tt>: </td>
459 <td align="left">pre-signals</td>
460 </tr>
462 <tr>
463 <td nowrap="nowrap" valign="top"><tt>010</tt>: </td>
464 <td align="left">exit-signals</td>
465 </tr>
467 <tr>
468 <td nowrap="nowrap" valign="top"><tt>011</tt>: </td>
469 <td align="left">combo-signals</td>
470 </tr>
472 <tr>
473 <td nowrap="nowrap" valign="top"><tt>100</tt>: </td>
474 <td align="left">pbs signals</td>
475 </tr>
477 <tr>
478 <td nowrap="nowrap" valign="top"><tt>101</tt>: </td>
479 <td align="left">no-entry signals</td>
480 </tr>
481 </table>
482 </li>
484 <li>m3 bits 7..4: bit set = signal 3..0 present</li>
485 <li>m4 bits 7..4: bit clear = signal 3..0 shows red</li>
486 </ul>
487 </li>
488 <li>m2 bits 8..10: track reserved for pbs
489 <table>
490 <tr>
491 <td><tt>0</tt>&nbsp; </td>
492 <td>not reserved</td>
493 </tr>
494 <tr>
495 <td><tt>1</tt>&nbsp; </td>
496 <td>X direction</td>
497 </tr>
498 <tr>
499 <td><tt>2</tt>&nbsp; </td>
500 <td>Y direction</td>
501 </tr>
502 <tr>
503 <td><tt>3</tt>&nbsp; </td>
504 <td>north corner (W-E)</td>
505 </tr>
506 <tr>
507 <td><tt>4</tt>&nbsp; </td>
508 <td>south corner (W-E)</td>
509 </tr>
510 <tr>
511 <td><tt>5</tt>&nbsp; </td>
512 <td>west corner (N-S)</td>
513 </tr>
514 <tr>
515 <td><tt>6</tt>&nbsp; </td>
516 <td>east corner (N-S)</td>
517 </tr>
518 </table>
519 </li>
520 <li>m2 bit 11: opposite track is reserved, too</li>
521 </ul>
522 </li>
523 <li>m5 bit 7 set, bit 6 set: railway depot
524 <ul>
525 <li>m2: Depot index</li>
526 <li>m5 bits 1..0: exit towards
527 <table>
528 <tr>
529 <td><tt>0</tt>&nbsp; </td>
530 <td>NE</td>
531 </tr>
533 <tr>
534 <td><tt>1</tt>&nbsp; </td>
535 <td>SE</td>
536 </tr>
538 <tr>
539 <td><tt>2</tt>&nbsp; </td>
540 <td>SW</td>
541 </tr>
543 <tr>
544 <td><tt>3</tt>&nbsp; </td>
545 <td>NW</td>
546 </tr>
547 </table>
548 </li>
549 <li>m5 bit 4: pbs reservation state</li>
550 </ul>
551 </li>
552 </ul>
553 </td>
554 </tr>
556 <tr bgcolor="#CCCCCC">
557 <td valign=top nowrap><strong><a name="Class2"><tt> 2</tt></a></strong></td>
558 <td><strong>Roads</strong></td>
559 </tr>
560 <tr>
561 <td valign=top nowrap>&nbsp;</td>
562 <td>
563 <ul>
564 <li>m2: Index into the array of towns (owning town for town roads; closest town otherwise, INVALID_TOWN if there is no town or we are creating a town)</li>
565 <li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of road type 1 (tram); OWNER_NONE (<tt>10</tt>) is stored as OWNER_TOWN (<tt>0F</tt>)
566 <li>m4 bits 5..0: <a href="#RoadType">Roadtype</a></li>
567 <li>m7 bit 5 set = on snow or desert</li>
568 <li>m8 bits 11..6: <a href="#TramType">Tramtype</a></li>
569 <li>m5 bits 7 clear: road or level-crossing
570 <ul>
571 <li>m6 bits 5..3:
572 <table>
573 <tr>
574 <td><tt>0</tt>&nbsp; </td>
575 <td>on bare land</td>
576 </tr>
577 <tr>
578 <td><tt>1</tt>&nbsp; </td>
579 <td>on grass</td>
580 </tr>
581 <tr>
582 <td><tt>2</tt>&nbsp; </td>
583 <td>paved</td>
584 </tr>
585 <tr>
586 <td><tt>3</tt>&nbsp; </td>
587 <td>with streetlights</td>
588 </tr>
589 <tr>
590 <td><tt>5</tt>&nbsp; </td>
591 <td>tree-lined</td>
592 </tr>
593 <tr>
594 <td><tt>6</tt>&nbsp; </td>
595 <td>on grass with road works</td>
596 </tr>
597 <tr>
598 <td><tt>7</tt>&nbsp; </td>
599 <td>paved with road works</td>
600 </tr>
601 </table>
602 </li>
603 <li>m5 bit 6 clear: road
604 <ul>
605 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the road type 0 (normal road)</li>
606 <li>m7 bits 3..0: counter for the roadworks</li>
607 <li>m5 bits 3..0: road layout road type 0 (normal road): bit set = road piece present:
608 <table>
609 <tr>
610 <td align=left>bit 0: </td>
611 <td>NW piece</td>
612 </tr>
613 <tr>
614 <td align=left>bit 1: </td>
615 <td>SW piece</td>
616 </tr>
617 <tr>
618 <td align=left>bit 2: </td>
619 <td>SE piece</td>
620 </tr>
621 <tr>
622 <td align=left>bit 3: </td>
623 <td>NE piece</td>
624 </tr>
625 </table>
626 </li>
627 <li>m3 bits 0..3: road layout road type 1 (tram)</li>
628 <li>m5 bits 5..4: bits to disallow vehicles to go a specific direction
629 <table>
630 <tr>
631 <td align=left>bit 0: </td>
632 <td>set = disallow driving in south-west or south-east direction</td>
633 </tr>
634 <tr>
635 <td align=left>bit 1: </td>
636 <td>set = disallow driving in north-west or north-east direction</td>
637 </tr>
638 </table>
639 </li>
640 </ul>
641 </li>
642 <li>m5 bit 6 set: level crossing
643 <ul>
644 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the railway track</li>
645 <li>m5 bit 5: set if crossing lights are on</li>
646 <li>m5 bit 4: pbs reservation state</li>
647 <li>m5 bit 0: direction
648 <table>
649 <tr>
650 <td align=left><tt>0</tt>&nbsp; </td>
651 <td align=left>road in the X direction, rail in Y</td>
652 </tr>
653 <tr>
654 <td align=left><tt>1</tt>&nbsp; </td>
655 <td align=left>road in the Y direction, rail in X</td>
656 </tr>
657 </table>
658 </li>
659 <li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of the road type 0 (normal road)</li>
660 <li>m8 bits 5..0: <a href="#TrackType">railway track type</a></li>
661 </ul>
662 </li>
663 </ul>
664 </li>
665 <li>m5 bit 7 set, bit 6 clear: road depot
666 <ul>
667 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the depot</li>
668 <li>m2: Depot index</li>
669 <li>m5 bits 1..0: exit towards:
670 <table>
671 <tr>
672 <td><tt>0</tt>&nbsp; </td>
673 <td>NE</td>
674 </tr>
676 <tr>
677 <td><tt>1</tt>&nbsp; </td>
678 <td>SE</td>
679 </tr>
681 <tr>
682 <td><tt>2</tt>&nbsp; </td>
683 <td>SW</td>
684 </tr>
686 <tr>
687 <td><tt>3</tt>&nbsp; </td>
688 <td>NW</td>
689 </tr>
690 </table>
691 </li>
692 <li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of the road type 0 (normal road)</li>
693 </ul>
694 </li>
695 </ul>
696 </td>
697 </tr>
699 <tr bgcolor="#CCCCCC">
700 <td valign=top nowrap><strong><a name="Class3"><tt> 3</tt></a></strong></td>
701 <td><strong>Town building </strong></td>
702 </tr>
703 <tr>
704 <td valign=top nowrap>&nbsp;</td>
705 <td>
706 <ul>
707 <li>m1 : Random bits <a href="#newhouses">(newhouses)</a> </li>
708 <li>m2 : index into the array of towns</li>
709 <li>m3 bit 7 :
710 <ul>
711 <li> set : House is complete
712 <ul>
713 <li>m5 : Age of house in years, clamped at 255</li>
714 </ul>
715 </li>
716 <li> clear : House is in construction
717 <ul>
718 <li>m5 bits 7..5 : free</li>
719 <li>m5 bits 4..3 : construction stage</li>
720 <li>m5 bits 2..0 : construction counter</li>
721 </ul>
722 </li>
723 </ul>
724 <li>m3 bit 6 : bit 8 of house type (m4), allowing 512 different types.</li>
725 <li>m3 bit 5 : free</li>
726 <li>m3 bits 4..0 : triggers activated <a href="#newhouses">(newhouses)</a></li>
727 <li>m4 : <a href="landscape_externals.html">town building type</a> (with m3[6] bit)</li>
728 <li>m5 : see m3 bit 7</li>
729 <li>m6 :
730 <ul>
731 <li>If <a href="#newhouses">newhouses</a> is activated
732 <ul>
733 <li>bits 7..2 : Periodic processing time remaining</li>
734 </ul>
735 </li>
736 <li>Standard behaviour
737 <ul>
738 <li>bits 7..2 : lift position (for houses type 04 and 05)</li>
739 </ul>
740 </li>
741 </ul>
742 </li>
743 <li>m7 :
744 <ul>
745 <li>If <a href="#newhouses">newhouses</a> is activated
746 <ul>
747 <li>Current animation frame</li>
748 </ul>
749 </li>
750 <li>Standard behaviour (only for houses type 04 and 05)
751 <ul>
752 <li>bits 7..4 : free</li>
753 <li>bits 3..1 : lift destination. Values can be 0..6, except 1.<br>
754 So the building has 6 effective floors. This is due to the fact that the first floor is 2 'normal' floors high.<br>
755 One 'normal' floor has a height of 6 lift positions.
756 </li>
757 <li>bit 0 : Lift has destination when set</li>
758 </ul>
759 </li>
760 </ul>
761 </li>
762 </ul>
763 <small><a name="newhouses"></a>Newhouses is the name englobing a newGRF feature developed by TTDPatch devs (mainly Csaboka).<br>
764 It allows the replacement of the properties as well as the graphics of houses in the game.<br>
765 To distinguish between the standard behaviour and the newGRF one, HouseID (m4 + m3[6]) is tested for anything above 110.<br>
766 110 is the count of standard houses. So above 110 means there is a new definition of at least one house</small>
767 </td>
768 </tr>
770 <tr bgcolor="#CCCCCC">
771 <td valign=top nowrap><strong><a name="Class4"><tt> 4 </tt></a></strong></td>
772 <td><strong>Trees </strong></td>
773 </tr>
774 <tr>
775 <td valign=top nowrap>&nbsp;</td>
776 <td>
777 <ul>
778 <li>m1 bits 6..5: water class (sea or land)</li>
779 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> (normally <tt>10</tt>)</li>
780 <li>m2 bits 8..6: ground
781 <table>
783 <tr>
784 <td align=left><tt>0</tt>&nbsp; </td>
785 <td>on grass</td>
786 </tr>
788 <tr>
789 <td align=left><tt>1</tt>&nbsp; </td>
790 <td>on rough land (density must be 3)</td>
791 </tr>
793 <tr>
794 <td align=left><tt>2</tt>&nbsp; </td>
795 <td>on snow or desert</td>
796 </tr>
798 <tr>
799 <td align=left><tt>3</tt>&nbsp; </td>
800 <td>on shore (density must be 3)</td>
801 </tr>
803 <tr>
804 <td align=left><tt>4</tt>&nbsp; </td>
805 <td>on snow with rough land underneath</td>
806 </tr>
807 </table>
808 </li>
809 <li>m2 bits 5..4: ground density</li>
810 <li>m3 bits 7..0: type of trees:
811 <table>
812 <tr>
813 <td nowrap valign=top><tt>00</tt>..<tt>0B</tt>&nbsp; </td>
814 <td align=left>temperate climate trees</td>
815 </tr>
817 <tr>
818 <td nowrap valign=top><tt>0C</tt>..<tt>13</tt>&nbsp; </td>
819 <td align=left>sub-arctic climate trees</td>
820 </tr>
822 <tr>
823 <td nowrap valign=top><tt>14</tt>..<tt>1A</tt>&nbsp; </td>
824 <td align=left>rainforest trees</td>
825 </tr>
827 <tr>
828 <td nowrap valign=top><tt>1B</tt> </td>
829 <td align=left>cactus plants</td>
830 </tr>
832 <tr>
833 <td nowrap valign=top><tt>1C</tt>..<tt>1F</tt>&nbsp; </td>
834 <td align=left>sub-tropical climate, non-rainforest, non-desert trees</td>
835 </tr>
837 <tr>
838 <td nowrap valign=top><tt>20</tt>..<tt>28</tt>&nbsp; </td>
839 <td align=left>toyland trees</td>
840 </tr>
841 </table>
842 <small>Note: the actually displayed set of trees depends on both type and number of trees</small>
843 </li>
844 <li>m5 bits 7..6: number of trees minus one</li>
845 <li>m5 bits 2..0: growth status:
846 <table border="0">
847 <tr>
848 <td><tt>0</tt>..<tt>2</tt>&nbsp;</td>
849 <td>one of trees is growing&nbsp;</td>
850 </tr>
851 <tr>
852 <td><tt>3</tt>&nbsp;</td>
853 <td>all trees are fully grown&nbsp;</td>
854 </tr>
855 <tr>
856 <td><tt>4</tt>..<tt>6</tt>&nbsp;</td>
857 <td>one of trees is withering&nbsp;</td>
858 </tr>
859 </table>
860 </li>
861 </ul>
862 </td>
863 </tr>
865 <tr bgcolor="#CCCCCC">
866 <td valign=top nowrap><strong><a name="Class5"><tt> 5</tt></a></strong></td>
867 <td><strong>Station tiles</strong></td>
868 </tr>
869 <tr>
870 <td valign=top nowrap>&nbsp;</td>
871 <td>
872 <ul>
873 <li>m1 bit 7: Ship docking tile status (for buoys)</li>
874 <li>m1 bits 6..5: water class for buoys, water part of docks and for airport tiles</li>
875 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the station</li>
876 <li>m2: index into the array of stations</li>
877 <li>m3 bits 7..4: persistent random data for railway stations/waypoints and airports)</li>
878 <li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of tram tracks (road stop)</li>
879 <li>m3 bits 3..2: ground type (road waypoints)
880 <table>
881 <tr>
882 <td><tt>0</tt>&nbsp; </td>
883 <td>on bare land</td>
884 </tr>
885 <tr>
886 <td><tt>1</tt>&nbsp; </td>
887 <td>on grass</td>
888 </tr>
889 <tr>
890 <td><tt>2</tt>&nbsp; </td>
891 <td>paved</td>
892 </tr>
893 </table>
894 </li>
895 <li>m4: custom station id; 0 means standard graphics</li>
896 <li>m4: <a href="#RoadType">Roadtype</a> for road stops</li>
897 <li>m5: graphics index (range from 0..255 for each station type):
898 <table>
899 <tr>
900 <td nowrap valign=top><tt>00</tt>..<tt>07</tt>&nbsp; </td>
901 <td align=left>railway station
902 <table>
903 <tr>
904 <td><tt>00</tt>..<tt>01</tt>&nbsp; </td>
905 <td align=left>open platform</td>
906 </tr>
907 <tr>
908 <td><tt>02</tt>..<tt>03</tt>&nbsp; </td>
909 <td align=left>open platform with station building</td>
910 </tr>
911 <tr>
912 <td><tt>04</tt>....<tt>07</tt>&nbsp; </td>
913 <td align=left>roofed platform</td>
914 </tr>
915 <tr>
916 <td colspan=2>bit 0: clear = in X direction, set = in Y direction</td>
917 </tr>
918 </table>
919 </td>
920 </tr>
922 <tr>
923 <td nowrap valign=top><tt>00</tt>..<tt>01</tt></td>
924 <td align=left>waypoints
925 <table>
926 <tr>
927 <td><tt>00</tt>&nbsp; </td>
928 <td align=left>in X direction</td>
929 </tr>
930 <tr>
931 <td><tt>01</tt>&nbsp; </td>
932 <td align=left>in Y direction</td>
933 </tr>
934 </table>
935 </td>
936 </tr>
938 <tr>
939 <td nowrap valign=top><tt>00</tt>..<tt>FF</tt></td>
940 <td align=left>all airports</td>
941 </tr>
943 <tr>
944 <td nowrap valign=top><tt>00</tt>..<tt>05</tt>&nbsp; </td>
945 <td align=left>road stops
946 <table>
947 <tr>
948 <td><tt>00</tt>&nbsp; </td>
949 <td align=left>exit towards NE</td>
950 </tr>
951 <tr>
952 <td><tt>01</tt>&nbsp; </td>
953 <td align=left>exit towards SE</td>
954 </tr>
955 <tr>
956 <td><tt>02</tt>&nbsp; </td>
957 <td align=left>exit towards SW</td>
958 </tr>
959 <tr>
960 <td><tt>03</tt>&nbsp; </td>
961 <td align=left>exit towards NW</td>
962 </tr>
963 <tr>
964 <td><tt>04</tt>&nbsp; </td>
965 <td align=left>drive through X</td>
966 </tr>
967 <tr>
968 <td><tt>05</tt>&nbsp; </td>
969 <td align=left>drive through Y</td>
970 </tr>
971 </table>
972 </td>
973 </tr>
975 <tr>
976 <td nowrap valign=top><tt>04</tt>..<tt>05</tt>&nbsp; </td>
977 <td align=left>road waypoints
978 <table>
979 <tr>
980 <td><tt>04</tt>&nbsp; </td>
981 <td align=left>drive through X</td>
982 </tr>
983 <tr>
984 <td><tt>05</tt>&nbsp; </td>
985 <td align=left>drive through Y</td>
986 </tr>
987 </table>
988 </td>
989 </tr>
991 <tr>
992 <td nowrap valign=top><tt>00</tt>..<tt>05</tt>&nbsp; </td>
993 <td align=left>ship dock
994 <table>
995 <tr>
996 <td><tt>00</tt>&nbsp; </td>
997 <td align=left>SW coast part</td>
998 </tr>
999 <tr>
1000 <td><tt>01</tt>&nbsp; </td>
1001 <td align=left>NW coast part</td>
1002 </tr>
1003 <tr>
1004 <td><tt>02</tt>&nbsp; </td>
1005 <td align=left>NE coast part</td>
1006 </tr>
1007 <tr>
1008 <td><tt>03</tt>&nbsp; </td>
1009 <td align=left>SE coast part</td>
1010 </tr>
1011 <tr>
1012 <td><tt>04</tt>&nbsp; </td>
1013 <td align=left>X direction water part</td>
1014 </tr>
1015 <tr>
1016 <td><tt>05</tt>&nbsp; </td>
1017 <td align=left>Y direction water part</td>
1018 </tr>
1019 </table>
1020 </td>
1021 </tr>
1022 </table>
1023 </li>
1024 <li>m6 bit 7: rail station / waypoint may have catenary pylons</li>
1025 <li>m6 bits 6..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy, waypoint, road waypoint)</li>
1026 <li>m6 bit 2: pbs reservation state for railway stations/waypoints</li>
1027 <li>m6 bit 1: rail station / waypoint may have catenary wires</li>
1028 <li>m6 bit 0: rail station / waypoint is blocked</li>
1030 <li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road (road stops)</li>
1031 <li>m7: animation frame (railway stations/waypoints, airports)</li>
1032 <li>m8 bit 15: Snow or desert present (road waypoints)</li>
1033 <li>m8 bits 11..6: <a href="#TramType">Tramtype</a></li>
1034 <li>m8 bits 5..0: <a href="#TrackType">track type</a> for railway stations/waypoints</li>
1035 <li>m8 bits 5..0: custom road stop/waypoint id; 0 means standard graphics</li>
1036 </ul>
1037 </td>
1038 </tr>
1040 <tr bgcolor="#CCCCCC">
1041 <td valign=top nowrap><strong><a name="Class6"><tt> 6 </tt></a></strong></td>
1042 <td><strong>Water</strong></td>
1043 </tr>
1044 <tr>
1045 <td valign=top nowrap>&nbsp;</td>
1046 <td>
1047 <ul>
1048 <li>m1 bit 7: Ship docking tile status</li>
1049 <li>m1 bits 6..5 : Water class (sea, canal or river)
1050 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> (for sea, rivers, and coasts normally <tt>11</tt>)</li>
1051 <li>m2: Depot index (for depots only)</li>
1052 <li>m4: Random data for canal or river tiles</li>
1053 <li>m5 bits 7..4: Water tile type:
1054 <table>
1055 <tr>
1056 <td><tt>0</tt>&nbsp; </td>
1057 <td>water, canal or river</td>
1058 </tr>
1059 <tr>
1060 <td><tt>1</tt>&nbsp; </td>
1061 <td>coast or riverbank</td>
1062 </tr>
1063 <tr>
1064 <td nowrap valign=top><tt>2</tt>&nbsp; </td>
1065 <td>canal lock<br>
1066 <ul>
1067 <li>m5 bits 3..2: Lock part
1068 <table>
1069 <tr>
1070 <td><tt>0</tt>&nbsp; </td>
1071 <td>Middle part</td>
1072 </tr>
1073 <tr>
1074 <td><tt>1</tt>&nbsp; </td>
1075 <td>Lower part</td>
1076 </tr>
1077 <tr>
1078 <td><tt>2</tt>&nbsp; </td>
1079 <td>Upper part</td>
1080 </tr>
1081 </table>
1082 </li>
1083 <li>m5 bits 1..0: Lock direction
1084 <table>
1085 <tr>
1086 <td><tt>0</tt>&nbsp; </td>
1087 <td>NE raised</td>
1088 </tr>
1089 <tr>
1090 <td><tt>1</tt>&nbsp; </td>
1091 <td>SE raised</td>
1092 </tr>
1093 <tr>
1094 <td><tt>2</tt>&nbsp; </td>
1095 <td>SW raised</td>
1096 </tr>
1097 <tr>
1098 <td><tt>3</tt>&nbsp; </td>
1099 <td>NW raised</td>
1100 </tr>
1101 </table>
1102 </li>
1103 </ul>
1104 </td>
1105 </tr>
1106 <tr>
1107 <td nowrap valign=top><tt>3</tt>&nbsp; </td>
1108 <td>depot<br>
1109 <ul>
1110 <li>m5 bit 1: Depot axis
1111 <table>
1112 <tr>
1113 <td><tt>0</tt>&nbsp; </td>
1114 <td>X direction (NE-SW)</td>
1115 </tr>
1116 <tr>
1117 <td><tt>1</tt>&nbsp; </td>
1118 <td>Y direction (NW-SE)</td>
1119 </tr>
1120 </table>
1121 </li>
1122 <li>m5 bit 0: Depot part
1123 <table>
1124 <tr>
1125 <td><tt>0</tt>&nbsp; </td>
1126 <td>North part</td>
1127 </tr>
1128 <tr>
1129 <td><tt>1</tt>&nbsp; </td>
1130 <td>South part</td>
1131 </tr>
1132 </table>
1133 </li>
1134 </ul>
1135 </td>
1136 </tr>
1137 </table>
1138 </li>
1139 </li>
1140 </ul>
1141 </td>
1142 </tr>
1144 <tr bgcolor="#CCCCCC">
1145 <td valign=top nowrap><strong><a name="Class7"><tt> 7 </tt></a></strong></td>
1146 <td><strong>Void </strong></td>
1147 </tr>
1148 <tr>
1149 <td valign=top nowrap>&nbsp;</td>
1150 <td>Tiles of this class form an invisible, one tile wide border at the south (bottom) edges of the map,<br>
1151 so as to protect several algorithms from the consequences of a wraparound at the edges.
1152 </td>
1153 </tr>
1155 <tr bgcolor="#CCCCCC">
1156 <td valign=top nowrap><strong><a name="Class8"><tt> 8</tt></a></strong></td>
1157 <td><strong>Industries </strong></td>
1158 </tr>
1159 <tr>
1160 <td valign=top nowrap>&nbsp;</td>
1161 <td>
1162 <ul>
1163 <li>m1 bit 7: clear = under construction
1164 <ul>
1165 <li>m1 bits 6..5 : Water class (sea, canal, river or land)
1166 <li>m1 bits 3..2: construction counter, for buildings under construction incremented on every periodic tile processing</li>
1167 <li>m1 bits 1..0: stage of construction (<tt>3</tt> = completed), incremented when the construction counter wraps around<br>
1168 the meaning is different for some animated tiles which are never under construction (types <tt>01</tt>, <tt>1E</tt>..<tt>20</tt>, <tt>30</tt>, <tt>58</tt>; see above)</li>
1169 </ul>
1170 </li>
1171 <li>m2: index into the array of industries</li>
1172 <li>m3: random bits (NewGRF)</li>
1173 <li>m4: animation loop</li>
1174 <li>m5: type (plus m6 bit 2):<br>
1175 <small>(note: this is not the same as the industry type, which is stored in the array of industries)</small>
1177 <table>
1178 <tr>
1179 <td nowrap valign=top><tt>00</tt>..<tt>06</tt>&nbsp; </td>
1180 <td align=left>coal mine
1181 <table>
1182 <tr>
1183 <td nowrap valign=top><tt>00</tt>&nbsp; </td>
1184 <td align=left>wheel tower when not animated</td>
1185 </tr>
1186 <tr>
1187 <td nowrap valign=top><tt>01</tt>&nbsp; </td>
1188 <td align=left>wheel tower when animated<br>
1189 animation state in m7 bits 5..0; m7 bit 6 set = sound already generated</td>
1190 </tr>
1191 </table>
1192 </td>
1193 </tr>
1195 <tr>
1196 <td nowrap valign=top><tt>07</tt>..<tt>0A</tt>&nbsp; </td>
1197 <td align=left>power station
1198 <table>
1199 <tr>
1200 <td nowrap valign=top><tt>08</tt>&nbsp; </td>
1201 <td align=left>chimney</td>
1202 </tr>
1203 <tr>
1204 <td nowrap valign=top><tt>0A</tt>&nbsp; </td>
1205 <td align=left>transformer; animation progress in m7(valid range <tt>0</tt>..<tt>7</tt>)</td>
1206 </tr>
1207 </table>
1208 </td>
1209 </tr>
1211 <tr>
1212 <td nowrap valign=top><tt>0B</tt>..<tt>0F</tt>&nbsp; </td>
1213 <td align=left>sawmill</td>
1214 </tr>
1216 <tr>
1217 <td nowrap valign=top><tt>10</tt>..<tt>11</tt>&nbsp; </td>
1218 <td align=left>forest
1219 <table>
1220 <tr>
1221 <td nowrap valign=top><tt>11</tt>&nbsp; </td>
1222 <td align=left>trees cut down</td>
1223 </tr>
1224 </table>
1225 </td>
1226 </tr>
1228 <tr>
1229 <td nowrap valign=top><tt>12</tt>..<tt>17</tt>&nbsp; </td>
1230 <td align=left>oil refinery</td>
1231 </tr>
1233 <tr>
1234 <td nowrap valign=top><tt>18</tt>..<tt>1C</tt>&nbsp; </td>
1235 <td align=left>oil rig</td>
1236 </tr>
1238 <tr>
1239 <td nowrap valign=top><tt>1D</tt>..<tt>20</tt>&nbsp; </td>
1240 <td align=left>oil wells
1241 <table>
1242 <tr>
1243 <td nowrap valign=top><tt>1D</tt>&nbsp; </td>
1244 <td align=left>not animated</td>
1245 </tr>
1246 <tr>
1247 <td nowrap valign=top><tt>1E</tt>..<tt>20</tt>&nbsp; </td>
1248 <td align=left>various stages of animation; progress of animation in m7</td>
1249 </tr>
1250 </table>
1251 </td>
1252 </tr>
1254 <tr>
1255 <td nowrap valign=top><tt>21</tt>..<tt>26</tt>&nbsp; </td>
1256 <td align=left>farm</td>
1257 </tr>
1259 <tr>
1260 <td nowrap valign=top><tt>27</tt>..<tt>2A</tt>&nbsp; </td>
1261 <td align=left>factory (temperate climate)</td>
1262 </tr>
1264 <tr>
1265 <td nowrap valign=top><tt>2B</tt>..<tt>2E</tt>&nbsp; </td>
1266 <td align=left>printing works</td>
1267 </tr>
1269 <tr>
1270 <td nowrap valign=top><tt>2F</tt>..<tt>33</tt>&nbsp; </td>
1271 <td align=left>copper ore mine
1272 <table>
1273 <tr>
1274 <td nowrap valign=top><tt>2F</tt>&nbsp; </td>
1275 <td align=left>wheel tower when not animated</td>
1276 </tr>
1277 <tr>
1278 <td nowrap valign=top><tt>30</tt>&nbsp; </td>
1279 <td align=left>wheel tower when animated; animation state in m7 bits 5..0; m7 bit 6 set = sound already generated</td>
1280 </tr>
1281 <tr>
1282 <td nowrap valign=top><tt>31</tt>&nbsp; </td>
1283 <td align=left>chimney</td>
1284 </tr>
1285 </table>
1286 </td>
1287 </tr>
1289 <tr>
1290 <td nowrap valign=top><tt>34</tt>..<tt>39</tt>&nbsp; </td>
1291 <td align=left>steel mill</td>
1292 </tr>
1294 <tr>
1295 <td nowrap valign=top><tt>3A</tt>..<tt>3B</tt>&nbsp; </td>
1296 <td align=left>bank (temperate climate)</td>
1297 </tr>
1299 <tr>
1300 <td nowrap valign=top><tt>3C</tt>..<tt>3F</tt>&nbsp; </td>
1301 <td align=left>food processing plant</td>
1302 </tr>
1304 <tr>
1305 <td nowrap valign=top><tt>40</tt>..<tt>47</tt>&nbsp; </td>
1306 <td align=left>paper mill</td>
1307 </tr>
1309 <tr>
1310 <td nowrap valign=top><tt>48</tt>..<tt>58</tt>&nbsp; </td>
1311 <td align=left>gold mine
1312 <table>
1313 <tr>
1314 <td nowrap valign=top><tt>4F</tt>&nbsp; </td>
1315 <td align=left>wheel tower when not animated</td>
1316 </tr>
1317 <tr>
1318 <td nowrap valign=top><tt>58</tt>&nbsp; </td>
1319 <td align=left>wheel tower when animated; animation state in m7 bits 5..0; m7 bit 6 set = sound already generated</td>
1320 </tr>
1321 </table></td>
1322 </tr>
1324 <tr>
1325 <td nowrap valign=top><tt>59</tt>..<tt>5A</tt>&nbsp; </td>
1326 <td align=left>bank (sub-arctic or sub-tropical climate)</td>
1327 </tr>
1329 <tr>
1330 <td nowrap valign=top><tt>5B</tt>..<tt>63</tt>&nbsp; </td>
1331 <td align=left>diamond mine</td>
1332 </tr>
1334 <tr>
1335 <td nowrap valign=top><tt>64</tt>..<tt>73</tt>&nbsp; </td>
1336 <td align=left>iron ore mine</td>
1337 </tr>
1339 <tr>
1340 <td nowrap valign=top><tt>74</tt></td>
1341 <td align=left>fruit plantation</td>
1342 </tr>
1344 <tr>
1345 <td nowrap valign=top><tt>75</tt></td>
1346 <td align=left>rubber plantation</td>
1347 </tr>
1349 <tr>
1350 <td nowrap valign=top><tt>76</tt>..<tt>77</tt>&nbsp; </td>
1351 <td align=left>water supply</td>
1352 </tr>
1354 <tr>
1355 <td nowrap valign=top><tt>78</tt></td>
1356 <td align=left>water tower</td>
1357 </tr>
1359 <tr>
1360 <td nowrap valign=top><tt>79</tt>..<tt>7C</tt>&nbsp; </td>
1361 <td align=left>factory (sub-tropical climate)</td>
1362 </tr>
1364 <tr>
1365 <td nowrap valign=top><tt>7D</tt>..<tt>80</tt>&nbsp; </td>
1366 <td align=left>lumber mill</td>
1367 </tr>
1369 <tr>
1370 <td nowrap valign=top><tt>81</tt>..<tt>82</tt>&nbsp; </td>
1371 <td align=left>candyfloss forest
1372 <table>
1373 <tr>
1374 <td nowrap valign=top><tt>82</tt>&nbsp; </td>
1375 <td align=left>candyfloss 'trees' cut down</td>
1376 </tr>
1377 </table>
1378 </td>
1379 </tr>
1381 <tr>
1382 <td nowrap valign=top><tt>83</tt>..<tt>86</tt>&nbsp; </td>
1383 <td align=left>sweet factory</td>
1384 </tr>
1386 <tr>
1387 <td nowrap valign=top><tt>87</tt>..<tt>88</tt>&nbsp; </td>
1388 <td align=left>battery farm
1389 <table>
1390 <tr>
1391 <td nowrap valign=top><tt>88</tt>&nbsp; </td>
1392 <td align=left>batteries 'reaped'</td>
1393 </tr>
1394 </table>
1395 </td>
1396 </tr>
1398 <tr>
1399 <td nowrap valign=top><tt>89</tt></td>
1400 <td align=left>cola wells</td>
1401 </tr>
1403 <tr>
1404 <td nowrap valign=top><tt>8A</tt>..<tt>8D</tt>&nbsp; </td>
1405 <td align=left>toy shop</td>
1406 </tr>
1408 <tr>
1409 <td nowrap valign=top><tt>8E</tt>..<tt>93</tt>&nbsp; </td>
1410 <td align=left>toy factory
1411 <table>
1412 <tr>
1413 <td nowrap valign=top><tt>8F</tt>&nbsp; </td>
1414 <td align=left>Animated part; animation state in m7 (valid range <tt>00</tt>..<tt>31</tt>)<br>
1415 Tile animation is started (m4 zeroed) on the periodic processing.<br>
1416 While the animation is in progress, m4 holds the number
1417 of animation cycles that have already taken place.<br>
1418 when this number reaches 8 the animation is stopped.</td>
1419 </tr>
1420 </table>
1421 </td>
1422 </tr>
1424 <tr>
1425 <td nowrap valign=top><tt>94</tt>..<tt>9B</tt>&nbsp; </td>
1426 <td align=left>plastic fountains (various stages of cyclic animation)</td>
1427 </tr>
1429 <tr>
1430 <td nowrap valign=top><tt>9C</tt>..<tt>9F</tt>&nbsp; </td>
1431 <td align=left>fizzy drink factory</td>
1432 </tr>
1434 <tr>
1435 <td nowrap valign=top><tt>A0</tt>..<tt>A3</tt>&nbsp; </td>
1436 <td align=left>bubble generator
1437 <table>
1438 <tr>
1439 <td nowrap valign=top><tt>A1</tt>&nbsp; </td>
1440 <td align=left>generators</td>
1441 </tr>
1442 <tr>
1443 <td nowrap valign=top><tt>A2</tt>&nbsp; </td>
1444 <td align=left>bubble capture facility; animation state in m7 (valid range <tt>00</tt>..<tt>27</tt>)</td>
1445 </tr>
1446 </table>
1447 </td>
1448 </tr>
1450 <tr>
1451 <td nowrap valign=top><tt>A4</tt>..<tt>A6</tt>&nbsp; </td>
1452 <td align=left>toffee quarry
1453 <table>
1454 <tr>
1455 <td nowrap valign=top><tt>A5</tt>&nbsp; </td>
1456 <td align=left>animated part; animation state in m3 (valid range <tt>00</tt>..<tt>45</tt>)</td>
1457 </tr>
1458 </table>
1459 </td>
1460 </tr>
1462 <tr>
1463 <td nowrap valign=top><tt>A7</tt>..<tt>AE</tt>&nbsp; </td>
1464 <td align=left>sugar mine
1465 <table>
1466 <tr>
1467 <td nowrap valign=top><tt>AE</tt>&nbsp; </td>
1468 <td align=left>animated part; animation state in m3 (valid range <tt>00</tt>..<tt>5F</tt>)</td>
1469 </tr>
1470 </table>
1471 </td>
1472 </tr>
1473 <tr>
1474 <td nowrap valign=top><tt>AF</tt>..<tt>1FF</tt>&nbsp; </td>
1475 <td align=left>NewGRF industries industry</td>
1476 </tr>
1477 </table>
1478 </li>
1479 <li>m6 bits 5..3: random triggers (NewGRF)</li>
1480 <li>m6 bit 2: bit 8 of type (see m5)</li>
1481 <li>m7: animation frame</li>
1482 </ul>
1483 </td>
1484 </tr>
1486 <tr bgcolor="#CCCCCC">
1487 <td valign=top nowrap><strong><a name="Class9"><tt> 9</tt></a></strong></td>
1488 <td><strong>Tunnel / bridge</strong></td>
1489 </tr>
1490 <tr>
1491 <td valign=top nowrap>&nbsp;</td>
1492 <td>
1493 <ul>
1494 <li>m1 bit 7: Ship docking tile status (for aqueducts)</li>
1495 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a></li>
1496 <li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of tram</li>
1497 <li>m4: <a href="#RoadType">Roadtype</a></li>
1498 <li>m5 bit 4: pbs reservation state for railway</li>
1499 <li>m5 bits 7 clear: tunnel entrance/exit</li>
1500 <li>m5 bit 7 set: bridge ramp
1501 <ul>
1502 <li>m6 bits 5..2: <a name="BridgeType">bridge type</a>:
1503 <table>
1504 <tr>
1505 <th align=left>Type&nbsp;</th>
1506 <th align=left>Max. speed (mph)&nbsp;</th>
1507 <th align=left>Description</th>
1508 </tr>
1510 <tr>
1511 <td nowrap valign=top><tt>0</tt>&nbsp; </td>
1512 <td align=center>20</td>
1513 <td align=left>wooden</td>
1514 </tr>
1516 <tr>
1517 <td nowrap valign=top><tt>1</tt>&nbsp; </td>
1518 <td align=center>30</td>
1519 <td align=left>concrete</td>
1520 </tr>
1522 <tr>
1523 <td nowrap valign=top><tt>2</tt>&nbsp; </td>
1524 <td align=center>40</td>
1525 <td align=left>girder, steel</td>
1526 </tr>
1528 <tr>
1529 <td nowrap valign=top><tt>3</tt>&nbsp; </td>
1530 <td align=center>50</td>
1531 <td align=left>suspension, concrete</td>
1532 </tr>
1534 <tr>
1535 <td nowrap valign=top><tt>4</tt>&nbsp; </td>
1536 <td align=center>60</td>
1537 <td align=left>suspension, steel</td>
1538 </tr>
1540 <tr>
1541 <td nowrap valign=top><tt>5</tt>&nbsp; </td>
1542 <td align=center>70</td>
1543 <td align=left>suspension, steel</td>
1544 </tr>
1546 <tr>
1547 <td nowrap valign=top><tt>6</tt>&nbsp; </td>
1548 <td align=center>100</td>
1549 <td align=left>cantilever, steel</td>
1550 </tr>
1552 <tr>
1553 <td nowrap valign=top><tt>7</tt>&nbsp; </td>
1554 <td align=center>130</td>
1555 <td align=left>cantilever, steel</td>
1556 </tr>
1558 <tr>
1559 <td nowrap valign=top><tt>8</tt>&nbsp; </td>
1560 <td align=center>150</td>
1561 <td align=left>cantilever, steel</td>
1562 </tr>
1564 <tr>
1565 <td nowrap valign=top><tt>9</tt>&nbsp; </td>
1566 <td align=center>160</td>
1567 <td align=left>girder, steel</td>
1568 </tr>
1570 <tr>
1571 <td nowrap valign=top><tt>A</tt>&nbsp; </td>
1572 <td align=center>200</td>
1573 <td align=left>tubular, steel</td>
1574 </tr>
1576 <tr>
1577 <td nowrap valign=top><tt>B</tt>&nbsp; </td>
1578 <td align=center>320</td>
1579 <td align=left>tubular, steel</td>
1580 </tr>
1582 <tr>
1583 <td nowrap valign=top><tt>C</tt>&nbsp; </td>
1584 <td align=center>380</td>
1585 <td align=left>tubular, silicon</td>
1586 </tr>
1587 </table>
1588 </li>
1589 </ul>
1590 </li>
1591 <li>m5 bits 3..2: transport type
1592 <table>
1593 <tr>
1594 <td><tt>0</tt>&nbsp;</td>
1595 <td>railway</td>
1596 </tr>
1598 <tr>
1599 <td><tt>1</tt>&nbsp;</td>
1600 <td>road</td>
1601 </tr>
1603 <tr>
1604 <td><tt>2</tt>&nbsp;</td>
1605 <td>water</td>
1606 </tr>
1607 </table>
1608 </li>
1609 <li>m5 bits 1..0: direction onto the bridge / out of the tunnel
1610 <table>
1611 <tr>
1612 <td><tt>0</tt>&nbsp; </td>
1613 <td>NE</td>
1614 </tr>
1616 <tr>
1617 <td><tt>1</tt>&nbsp; </td>
1618 <td>SE</td>
1619 </tr>
1621 <tr>
1622 <td><tt>2</tt>&nbsp; </td>
1623 <td>SW</td>
1624 </tr>
1626 <tr>
1627 <td><tt>3</tt>&nbsp; </td>
1628 <td>NW</td>
1629 </tr>
1630 </table>
1631 </li>
1632 <li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road</li>
1633 <li>m7 bit 5 set = on snow or desert</li>
1634 <li>m8 bits 11..6: <a href="#TramType">Tramtype</a></li>
1635 <li>m8 bits 5..0: <a href="#TrackType">track type</a> for railway</li>
1636 </ul>
1637 </td>
1638 </tr>
1640 <tr bgcolor="#CCCCCC">
1641 <td valign=top nowrap><strong><a name="ClassA"><tt> A</tt></a></strong></td>
1642 <td><strong><tt>Objects</tt></strong></td>
1643 </tr>
1644 <tr>
1645 <td valign=top nowrap>&nbsp;</td>
1646 <td>
1647 <ul>
1648 <li>m1 bits 6..5 : Water class (sea, canal, river or land)</li>
1649 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the object (for lighthouses and transmitters normally <tt>10</tt>)</li>
1650 <li>m2: index into the array of objects, bits 0 to 15 (upper bits in m5)</li>
1651 <li>m3: random bits</li>
1652 <li>m5: index into the array of objects, bits 16 to 23 (lower bits in m2)</li>
1653 <li>m7: animation counter</li>
1654 </ul>
1655 </td>
1656 </tr>
1657 <tr>
1658 <td colspan=2>Classes <tt>B</tt> through <tt>F</tt> are reserved. The presence
1659 of a tile in one of the reserved classes will crash OTTD.</td>
1660 </tr>
1661 </table>
1664 <hr>
1665 Original Copyright &copy; 2003 by Marcin Grzegorczyk for TTDLX.<br>
1666 Transport Tycoon and Transport Tycoon Deluxe are Copyright &copy; by Chris Sawyer.<br>
1667 All the other trademarks are the property of their respective owners.<br>
1668 </body>
1670 </html>