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