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