Revert "Fix colour definition for conditional order invalid slot string"
[openttd-joker.git] / docs / landscape.html
blob58736b5f154c53155c7a72b2980b02890bc356ff
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>
456 <li style="color: blue">m2 bit 12: this signal tile has 1 or more restricted signals (tracerestrict patch)</li>
458 <li>m3 bits 7..4: bit set = signal 3..0 present</li>
459 <li>m4 bits 7..4: bit clear = signal 3..0 shows red</li>
460 </ul>
461 </li>
462 <li>m2 bits 8..10: track reserved for pbs
463 <table>
464 <tr>
465 <td><tt>0</tt>&nbsp; </td>
466 <td>not reserved</td>
467 </tr>
468 <tr>
469 <td><tt>1</tt>&nbsp; </td>
470 <td>X direction</td>
471 </tr>
472 <tr>
473 <td><tt>2</tt>&nbsp; </td>
474 <td>Y direction</td>
475 </tr>
476 <tr>
477 <td><tt>3</tt>&nbsp; </td>
478 <td>north corner (W-E)</td>
479 </tr>
480 <tr>
481 <td><tt>4</tt>&nbsp; </td>
482 <td>south corner (W-E)</td>
483 </tr>
484 <tr>
485 <td><tt>5</tt>&nbsp; </td>
486 <td>west corner (N-S)</td>
487 </tr>
488 <tr>
489 <td><tt>6</tt>&nbsp; </td>
490 <td>east corner (N-S)</td>
491 </tr>
492 </table>
493 </li>
494 <li>m2 bit 11: opposite track is reserved, too</li>
495 </ul>
496 </li>
497 <li>m5 bit 7 set, bit 6 set: railway depot
498 <ul>
499 <li>m2: Depot index</li>
500 <li>m5 bits 1..0: exit towards
501 <table>
502 <tr>
503 <td><tt>0</tt>&nbsp; </td>
504 <td>NE</td>
505 </tr>
507 <tr>
508 <td><tt>1</tt>&nbsp; </td>
509 <td>SE</td>
510 </tr>
512 <tr>
513 <td><tt>2</tt>&nbsp; </td>
514 <td>SW</td>
515 </tr>
517 <tr>
518 <td><tt>3</tt>&nbsp; </td>
519 <td>NW</td>
520 </tr>
521 </table>
522 </li>
523 <li>m5 bit 4: pbs reservation state</li>
524 </ul>
525 </li>
526 <li style="color: blue">m7: Track age used to show overgrowth (not used for depots)</li>
527 </ul>
528 </td>
529 </tr>
531 <tr bgcolor="#CCCCCC">
532 <td valign=top nowrap><strong><a name="Class2"><tt> 2</tt></a></strong></td>
533 <td><strong>Roads</strong></td>
534 </tr>
535 <tr>
536 <td valign=top nowrap>&nbsp;</td>
537 <td>
538 <ul>
539 <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>
540 <li>m7 bit 5 set = on snow or desert</li>
541 <li>m7 bits 7..6: present road types
542 <table>
543 <tr>
544 <td>bit 0&nbsp; </td>
545 <td>normal road</td>
546 </tr>
548 <tr>
549 <td>bit 1&nbsp; </td>
550 <td>tram</td>
551 </tr>
552 </table>
553 </li>
554 <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>)
555 <li>m5 bits 7 clear: road or level-crossing
556 <ul>
557 <li>m6 bits 5..3:
558 <table>
559 <tr>
560 <td><tt>0</tt>&nbsp; </td>
561 <td>on bare land</td>
562 </tr>
563 <tr>
564 <td><tt>1</tt>&nbsp; </td>
565 <td>on grass</td>
566 </tr>
567 <tr>
568 <td><tt>2</tt>&nbsp; </td>
569 <td>paved</td>
570 </tr>
571 <tr>
572 <td><tt>3</tt>&nbsp; </td>
573 <td>with streetlights</td>
574 </tr>
575 <tr>
576 <td><tt>5</tt>&nbsp; </td>
577 <td>tree-lined</td>
578 </tr>
579 <tr>
580 <td><tt>6</tt>&nbsp; </td>
581 <td>on grass with road works</td>
582 </tr>
583 <tr>
584 <td><tt>7</tt>&nbsp; </td>
585 <td>paved with road works</td>
586 </tr>
587 </table>
588 </li>
589 <li>m5 bit 6 clear: road
590 <ul>
591 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the road type 0 (normal road)</li>
592 <li>m7 bits 3..0: counter for the roadworks</li>
593 <li>m5 bits 3..0: road layout road type 0 (normal road): bit set = road piece present:
594 <table>
595 <tr>
596 <td align=left>bit 0: </td>
597 <td>NW piece</td>
598 </tr>
599 <tr>
600 <td align=left>bit 1: </td>
601 <td>SW piece</td>
602 </tr>
603 <tr>
604 <td align=left>bit 2: </td>
605 <td>SE piece</td>
606 </tr>
607 <tr>
608 <td align=left>bit 3: </td>
609 <td>NE piece</td>
610 </tr>
611 </table>
612 </li>
613 <li>m3 bits 0..3: road layout road type 1 (tram)</li>
614 <li>m5 bits 5..4: bits to disallow vehicles to go a specific direction
615 <table>
616 <tr>
617 <td align=left>bit 0: </td>
618 <td>set = disallow driving in south-west or south-east direction</td>
619 </tr>
620 <tr>
621 <td align=left>bit 1: </td>
622 <td>set = disallow driving in north-west or north-east direction</td>
623 </tr>
624 </table>
625 </li>
626 </ul>
627 </li>
628 <li>m5 bit 6 set: level crossing
629 <ul>
630 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the railway track</li>
631 <li>m3 bits 3..0: <a href="#TrackType">railway track type</a></li>
632 <li>m5 bit 0: direction
633 <table>
634 <tr>
635 <td align=left><tt>0</tt>&nbsp; </td>
636 <td align=left>road in the X direction, rail in Y</td>
637 </tr>
638 <tr>
639 <td align=left><tt>1</tt>&nbsp; </td>
640 <td align=left>road in the Y direction, rail in X</td>
641 </tr>
642 </table>
643 </li>
644 <li>m5 bit 5: set if crossing lights are on</li>
645 <li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of the road type 0 (normal road)</li>
646 <li>m5 bit 4: pbs reservation state</li>
647 </ul>
648 </li>
649 </ul>
650 </li>
651 <li>m5 bit 7 set, bit 6 clear: road depot
652 <ul>
653 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the depot</li>
654 <li>m2: Depot index</li>
655 <li>m5 bits 1..0: exit towards:
656 <table>
657 <tr>
658 <td><tt>0</tt>&nbsp; </td>
659 <td>NE</td>
660 </tr>
662 <tr>
663 <td><tt>1</tt>&nbsp; </td>
664 <td>SE</td>
665 </tr>
667 <tr>
668 <td><tt>2</tt>&nbsp; </td>
669 <td>SW</td>
670 </tr>
672 <tr>
673 <td><tt>3</tt>&nbsp; </td>
674 <td>NW</td>
675 </tr>
676 </table>
677 </li>
678 <li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of the road type 0 (normal road)</li>
679 </ul>
680 </li>
681 </ul>
682 </td>
683 </tr>
685 <tr bgcolor="#CCCCCC">
686 <td valign=top nowrap><strong><a name="Class3"><tt> 3</tt></a></strong></td>
687 <td><strong>Town building </strong></td>
688 </tr>
689 <tr>
690 <td valign=top nowrap>&nbsp;</td>
691 <td>
692 <ul>
693 <li>m1 : Random bits <a href="#newhouses">(newhouses)</a> </li>
694 <li>m2 : index into the array of towns</li>
695 <li>m3 bit 7 :
696 <ul>
697 <li> set : House is complete
698 <ul>
699 <li>m5 : Age of house in years, clamped at 255</li>
700 </ul>
701 </li>
702 <li> clear : House is in construction
703 <ul>
704 <li>m5 bits 7..5 : free</li>
705 <li>m5 bits 4..3 : construction stage</li>
706 <li>m5 bits 2..0 : construction counter</li>
707 </ul>
708 </li>
709 </ul>
710 <li>m3 bit 6 : bit 8 of house type (m4), allowing 512 different types.</li>
711 <li>m3 bit 5 : free</li>
712 <li>m3 bits 4..0 : triggers activated <a href="#newhouses">(newhouses)</a></li>
713 <li>m4 : <a href="landscape_externals.html">town building type</a> (with m3[6] bit)</li>
714 <li>m5 : see m3 bit 7</li>
715 <li>m6 :
716 <ul>
717 <li>If <a href="#newhouses">newhouses</a> is activated
718 <ul>
719 <li>bits 7..2 : Periodic processing time remaining</li>
720 </ul>
721 </li>
722 <li>Standard behaviour
723 <ul>
724 <li>bits 7..2 : lift position (for houses type 04 and 05)</li>
725 </ul>
726 </li>
727 </ul>
728 </li>
729 <li>m7 :
730 <ul>
731 <li>If <a href="#newhouses">newhouses</a> is activated
732 <ul>
733 <li>Current animation frame</li>
734 </ul>
735 </li>
736 <li>Standard behaviour (only for houses type 04 and 05)
737 <ul>
738 <li>bits 7..4 : free</li>
739 <li>bits 3..1 : lift destination. Values can be 0..6, except 1.<br>
740 So the building has 6 effective floors. This is due to the fact that the first floor is 2 'normal' floors high.<br>
741 One 'normal' floor has a height of 6 lift positions.
742 </li>
743 <li>bit 0 : Lift has destination when set</li>
744 </ul>
745 </li>
746 </ul>
747 </li>
748 </ul>
749 <small><a name="newhouses"></a>Newhouses is the name englobing a newGRF feature developped by TTDPatch devs (mainly Csaboka).<br>
750 It allows the replacement of the properties as well as the graphics of houses in the game.<br>
751 To distinguish between the standard behaviour and the newGRF one, HouseID (m4 + m3[6]) is tested for anything above 110.<br>
752 110 is the count of standard houses. So above 110 means there is a new definition of at least one house</small>
753 </td>
754 </tr>
756 <tr bgcolor="#CCCCCC">
757 <td valign=top nowrap><strong><a name="Class4"><tt> 4 </tt></a></strong></td>
758 <td><strong>Trees </strong></td>
759 </tr>
760 <tr>
761 <td valign=top nowrap>&nbsp;</td>
762 <td>
763 <ul>
764 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> (normally <tt>10</tt>)</li>
765 <li>m2 bits 8..6: ground
766 <table>
768 <tr>
769 <td align=left><tt>0</tt>&nbsp; </td>
770 <td>on grass</td>
771 </tr>
773 <tr>
774 <td align=left><tt>1</tt>&nbsp; </td>
775 <td>on rough land (density must be 3)</td>
776 </tr>
778 <tr>
779 <td align=left><tt>2</tt>&nbsp; </td>
780 <td>on snow or desert</td>
781 </tr>
783 <tr>
784 <td align=left><tt>3</tt>&nbsp; </td>
785 <td>on shore (density must be 3)</td>
786 </tr>
788 <tr>
789 <td align=left><tt>4</tt>&nbsp; </td>
790 <td>on snow with rough land underneed</td>
791 </tr>
792 </table>
793 </li>
794 <li>m2 bits 5..4: ground density</li>
795 <li>m2 bits 3..0: update counter, incremented on every periodic processing.<br>
796 on wraparound the growth status is updated (or, if it's <tt>3</tt>, a random action is taken)</li>
797 <li>m3 bits 7..0: type of trees:
798 <table>
799 <tr>
800 <td nowrap valign=top><tt>00</tt>..<tt>0B</tt>&nbsp; </td>
801 <td align=left>temperate climate trees</td>
802 </tr>
804 <tr>
805 <td nowrap valign=top><tt>0C</tt>..<tt>13</tt>&nbsp; </td>
806 <td align=left>sub-arctic climate trees</td>
807 </tr>
809 <tr>
810 <td nowrap valign=top><tt>14</tt>..<tt>1A</tt>&nbsp; </td>
811 <td align=left>rainforest trees</td>
812 </tr>
814 <tr>
815 <td nowrap valign=top><tt>1B</tt> </td>
816 <td align=left>cactus plants</td>
817 </tr>
819 <tr>
820 <td nowrap valign=top><tt>1C</tt>..<tt>1F</tt>&nbsp; </td>
821 <td align=left>sub-tropical climate, non-rainforest, non-desert trees</td>
822 </tr>
824 <tr>
825 <td nowrap valign=top><tt>20</tt>..<tt>28</tt>&nbsp; </td>
826 <td align=left>toyland trees</td>
827 </tr>
828 </table>
829 <small>Note: the actually displayed set of trees depends on both type and number of trees</small>
830 </li>
831 <li>m5 bits 7..6: number of trees minus one</li>
832 <li>m5 bits 2..0: growth status:
833 <table border="0">
834 <tr>
835 <td><tt>0</tt>..<tt>2</tt>&nbsp;</td>
836 <td>one of trees is growing&nbsp;</td>
837 </tr>
838 <tr>
839 <td><tt>3</tt>&nbsp;</td>
840 <td>all trees are fully grown&nbsp;</td>
841 </tr>
842 <tr>
843 <td><tt>4</tt>..<tt>6</tt>&nbsp;</td>
844 <td>one of trees is withering&nbsp;</td>
845 </tr>
846 </table>
847 </li>
848 </ul>
849 </td>
850 </tr>
852 <tr bgcolor="#CCCCCC">
853 <td valign=top nowrap><strong><a name="Class5"><tt> 5</tt></a></strong></td>
854 <td><strong>Station tiles</strong></td>
855 </tr>
856 <tr>
857 <td valign=top nowrap>&nbsp;</td>
858 <td>
859 <ul>
860 <li>m1 bits 6..5: water class for buoys, water part of docks and for airport tiles</li>
861 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the station</li>
862 <li>m2: index into the array of stations</li>
863 <li>m3 bits 7..4: persistent random data for railway stations/waypoints and airports)</li>
864 <li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of tram tracks (road stop)</li>
865 <li>m3 bits 3..0: <a href="#TrackType">track type</a> for railway stations/waypoints</li>
866 <li>m4: custom station id; 0 means standard graphics</li>
867 <li>m5: graphics index (range from 0..255 for each station type):
868 <table>
869 <tr>
870 <td nowrap valign=top><tt>00</tt>..<tt>07</tt>&nbsp; </td>
871 <td align=left>railway station
872 <table>
873 <tr>
874 <td><tt>00</tt>..<tt>01</tt>&nbsp; </td>
875 <td align=left>open platform</td>
876 </tr>
877 <tr>
878 <td><tt>02</tt>..<tt>03</tt>&nbsp; </td>
879 <td align=left>open platform with station building</td>
880 </tr>
881 <tr>
882 <td><tt>04</tt>....<tt>07</tt>&nbsp; </td>
883 <td align=left>roofed platform</td>
884 </tr>
885 <tr>
886 <td colspan=2>bit 0: clear = in X direction, set = in Y direction</td>
887 </tr>
888 </table>
889 </td>
890 </tr>
892 <tr>
893 <td nowrap valign=top><tt>00</tt>..<tt>01</tt></td>
894 <td align=left>waypoints
895 <table>
896 <tr>
897 <td><tt>00</tt>&nbsp; </td>
898 <td align=left>in X direction</td>
899 </tr>
900 <tr>
901 <td><tt>01</tt>&nbsp; </td>
902 <td align=left>in Y direction</td>
903 </tr>
904 </table>
905 </td>
906 </tr>
908 <tr>
909 <td nowrap valign=top><tt>00</tt>..<tt>FF</tt></td>
910 <td align=left>all airports</td>
911 </tr>
913 <tr>
914 <td nowrap valign=top><tt>00</tt>..<tt>05</tt>&nbsp; </td>
915 <td align=left>road stops
916 <table>
917 <tr>
918 <td><tt>00</tt>&nbsp; </td>
919 <td align=left>exit towards NE</td>
920 </tr>
921 <tr>
922 <td><tt>01</tt>&nbsp; </td>
923 <td align=left>exit towards SE</td>
924 </tr>
925 <tr>
926 <td><tt>02</tt>&nbsp; </td>
927 <td align=left>exit towards SW</td>
928 </tr>
929 <tr>
930 <td><tt>03</tt>&nbsp; </td>
931 <td align=left>exit towards NW</td>
932 </tr>
933 <tr>
934 <td><tt>04</tt>&nbsp; </td>
935 <td align=left>drive through X</td>
936 </tr>
937 <tr>
938 <td><tt>05</tt>&nbsp; </td>
939 <td align=left>drive through Y</td>
940 </tr>
941 </table>
942 </td>
943 </tr>
945 <tr>
946 <td nowrap valign=top><tt>00</tt>..<tt>05</tt>&nbsp; </td>
947 <td align=left>ship dock
948 <table>
949 <tr>
950 <td><tt>00</tt>&nbsp; </td>
951 <td align=left>SW coast part</td>
952 </tr>
953 <tr>
954 <td><tt>01</tt>&nbsp; </td>
955 <td align=left>NW coast part</td>
956 </tr>
957 <tr>
958 <td><tt>02</tt>&nbsp; </td>
959 <td align=left>NE coast part</td>
960 </tr>
961 <tr>
962 <td><tt>03</tt>&nbsp; </td>
963 <td align=left>SE coast part</td>
964 </tr>
965 <tr>
966 <td><tt>04</tt>&nbsp; </td>
967 <td align=left>X direction water part</td>
968 </tr>
969 <tr>
970 <td><tt>05</tt>&nbsp; </td>
971 <td align=left>Y direction water part</td>
972 </tr>
973 </table>
974 </td>
975 </tr>
976 </table>
977 </li>
978 <li>m6 bits 5..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy, waypoint)</li>
979 <li>m6 bit 2: pbs reservation state for railway stations/waypoints</li>
981 <li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road (road stops)</li>
982 <li>m7 bits 7..6: present road types (road stops)</li>
983 <li>m7: animation frame (railway stations/waypoints, airports)</li>
984 </ul>
985 </td>
986 </tr>
988 <tr bgcolor="#CCCCCC">
989 <td valign=top nowrap><strong><a name="Class6"><tt> 6 </tt></a></strong></td>
990 <td><strong>Water</strong></td>
991 </tr>
992 <tr>
993 <td valign=top nowrap>&nbsp;</td>
994 <td>
995 <ul>
996 <li>m1 bits 6..5 : Water class (sea, canal or river)
997 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> (for sea, rivers, and coasts normally <tt>11</tt>)</li>
998 <li>m2: Depot index (for depots only)</li>
999 <li>m4: Random data for canal or river tiles</li>
1000 <li>m5: tile type:
1001 <table>
1002 <tr>
1003 <td nowrap valign=top><tt>00</tt>&nbsp; </td>
1004 <td align=left>water, canal or river</td>
1005 </tr>
1007 <tr>
1008 <td nowrap valign=top><tt>01</tt>&nbsp; </td>
1009 <td align=left>coast or riverbank</td>
1010 </tr>
1012 <tr>
1013 <td nowrap valign=top><tt>10</tt>..<tt>1B</tt>&nbsp; </td>
1014 <td align=left>canal locks
1015 <table>
1016 <tr>
1017 <td nowrap valign=top><tt>10</tt>&nbsp; </td>
1018 <td align=left>middle part, (SW-NE direction)</td>
1019 </tr>
1020 <tr>
1021 <td nowrap valign=top><tt>11</tt>&nbsp; </td>
1022 <td align=left>middle part, (NW-SE direction)</td>
1023 </tr>
1024 <tr>
1025 <td nowrap valign=top><tt>12</tt>&nbsp; </td>
1026 <td align=left>middle part, (NE-SW direction)</td>
1027 </tr>
1028 <tr>
1029 <td nowrap valign=top><tt>13</tt>&nbsp; </td>
1030 <td align=left>middle part, (SE-NW direction)</td>
1031 </tr>
1032 <tr>
1033 <td nowrap valign=top><tt>14</tt>&nbsp; </td>
1034 <td align=left>lower part, (SW-NE direction)</td>
1035 </tr>
1036 <tr>
1037 <td nowrap valign=top><tt>15</tt>&nbsp; </td>
1038 <td align=left>lower part, (NW-SE direction)</td>
1039 </tr>
1040 <tr>
1041 <td nowrap valign=top><tt>16</tt>&nbsp; </td>
1042 <td align=left>lower part, (NE-SW direction)</td>
1043 </tr>
1044 <tr>
1045 <td nowrap valign=top><tt>17</tt>&nbsp; </td>
1046 <td align=left>lower part, (SE-NW direction)</td>
1047 </tr>
1048 <tr>
1049 <td nowrap valign=top><tt>18</tt>&nbsp; </td>
1050 <td align=left>upper part, (SW-NE direction)</td>
1051 </tr>
1052 <tr>
1053 <td nowrap valign=top><tt>19</tt>&nbsp; </td>
1054 <td align=left>upper part, (NW-SE direction)</td>
1055 </tr>
1056 <tr>
1057 <td nowrap valign=top><tt>1A</tt>&nbsp; </td>
1058 <td align=left>upper part, (NE-SW direction)</td>
1059 </tr>
1060 <tr>
1061 <td nowrap valign=top><tt>1B</tt>&nbsp; </td>
1062 <td align=left>upper part, (SE-NW direction)</td>
1063 </tr>
1064 </table>
1065 </td>
1066 </tr>
1068 <tr>
1069 <td nowrap valign=top><tt>80</tt>..<tt>83</tt>&nbsp; </td>
1070 <td align=left>ship depots
1071 <table>
1072 <tr>
1073 <td nowrap valign=top><tt>80</tt>&nbsp; </td>
1074 <td align=left>ship depot, NE part (X direction)</td>
1075 </tr>
1076 <tr>
1077 <td nowrap valign=top><tt>81</tt>&nbsp; </td>
1078 <td align=left>ship depot, SW part (X direction)</td>
1079 </tr>
1080 <tr>
1081 <td nowrap valign=top><tt>82</tt>&nbsp; </td>
1082 <td align=left>ship depot, NW part (Y direction)</td>
1083 </tr>
1084 <tr>
1085 <td nowrap valign=top><tt>83</tt>&nbsp; </td>
1086 <td align=left>ship depot, SE part (Y direction)</td>
1087 </tr>
1088 </table>
1089 </td>
1090 </tr>
1091 </table>
1092 </li>
1093 </ul>
1094 </td>
1095 </tr>
1097 <tr bgcolor="#CCCCCC">
1098 <td valign=top nowrap><strong><a name="Class7"><tt> 7 </tt></a></strong></td>
1099 <td><strong>Void </strong></td>
1100 </tr>
1101 <tr>
1102 <td valign=top nowrap>&nbsp;</td>
1103 <td>Tiles of this class form an invisible, one tile wide border at the south (bottom) edges of the map,<br>
1104 so as to protect several algorithms from the consequences of a wraparound at the edges.
1105 </td>
1106 </tr>
1108 <tr bgcolor="#CCCCCC">
1109 <td valign=top nowrap><strong><a name="Class8"><tt> 8</tt></a></strong></td>
1110 <td><strong>Industries </strong></td>
1111 </tr>
1112 <tr>
1113 <td valign=top nowrap>&nbsp;</td>
1114 <td>
1115 <ul>
1116 <li>m1 bit 7: clear = under construction
1117 <ul>
1118 <li>m1 bits 6..5 : Water class (sea, canal, river or land)
1119 <li>m1 bits 3..2: construction counter, for buildings under construction incremented on every periodic tile processing</li>
1120 <li>m1 bits 1..0: stage of construction (<tt>3</tt> = completed), incremented when the construction counter wraps around<br>
1121 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>
1122 </ul>
1123 </li>
1124 <li>m2: index into the array of industries</li>
1125 <li>m3: random bits (NewGRF)</li>
1126 <li>m4: animation loop</li>
1127 <li>m5: type (plus m6 bit 2):<br>
1128 <small>(note: this is not the same as the industry type, which is stored in the array of industries)</small>
1130 <table>
1131 <tr>
1132 <td nowrap valign=top><tt>00</tt>..<tt>06</tt>&nbsp; </td>
1133 <td align=left>coal mine
1134 <table>
1135 <tr>
1136 <td nowrap valign=top><tt>00</tt>&nbsp; </td>
1137 <td align=left>wheel tower when not animated</td>
1138 </tr>
1139 <tr>
1140 <td nowrap valign=top><tt>01</tt>&nbsp; </td>
1141 <td align=left>wheel tower when animated<br>
1142 animation state in m7 bits 5..0; m7 bit 6 set = sound already generated</td>
1143 </tr>
1144 </table>
1145 </td>
1146 </tr>
1148 <tr>
1149 <td nowrap valign=top><tt>07</tt>..<tt>0A</tt>&nbsp; </td>
1150 <td align=left>power station
1151 <table>
1152 <tr>
1153 <td nowrap valign=top><tt>08</tt>&nbsp; </td>
1154 <td align=left>chimney</td>
1155 </tr>
1156 <tr>
1157 <td nowrap valign=top><tt>0A</tt>&nbsp; </td>
1158 <td align=left>transformer; animation progress in m7(valid range <tt>0</tt>..<tt>7</tt>)</td>
1159 </tr>
1160 </table>
1161 </td>
1162 </tr>
1164 <tr>
1165 <td nowrap valign=top><tt>0B</tt>..<tt>0F</tt>&nbsp; </td>
1166 <td align=left>sawmill</td>
1167 </tr>
1169 <tr>
1170 <td nowrap valign=top><tt>10</tt>..<tt>11</tt>&nbsp; </td>
1171 <td align=left>forest
1172 <table>
1173 <tr>
1174 <td nowrap valign=top><tt>11</tt>&nbsp; </td>
1175 <td align=left>trees cut down</td>
1176 </tr>
1177 </table>
1178 </td>
1179 </tr>
1181 <tr>
1182 <td nowrap valign=top><tt>12</tt>..<tt>17</tt>&nbsp; </td>
1183 <td align=left>oil refinery</td>
1184 </tr>
1186 <tr>
1187 <td nowrap valign=top><tt>18</tt>..<tt>1C</tt>&nbsp; </td>
1188 <td align=left>oil rig</td>
1189 </tr>
1191 <tr>
1192 <td nowrap valign=top><tt>1D</tt>..<tt>20</tt>&nbsp; </td>
1193 <td align=left>oil wells
1194 <table>
1195 <tr>
1196 <td nowrap valign=top><tt>1D</tt>&nbsp; </td>
1197 <td align=left>not animated</td>
1198 </tr>
1199 <tr>
1200 <td nowrap valign=top><tt>1E</tt>..<tt>20</tt>&nbsp; </td>
1201 <td align=left>various stages of animation; progress of animation in m7</td>
1202 </tr>
1203 </table>
1204 </td>
1205 </tr>
1207 <tr>
1208 <td nowrap valign=top><tt>21</tt>..<tt>26</tt>&nbsp; </td>
1209 <td align=left>farm</td>
1210 </tr>
1212 <tr>
1213 <td nowrap valign=top><tt>27</tt>..<tt>2A</tt>&nbsp; </td>
1214 <td align=left>factory (temperate climate)</td>
1215 </tr>
1217 <tr>
1218 <td nowrap valign=top><tt>2B</tt>..<tt>2E</tt>&nbsp; </td>
1219 <td align=left>printing works</td>
1220 </tr>
1222 <tr>
1223 <td nowrap valign=top><tt>2F</tt>..<tt>33</tt>&nbsp; </td>
1224 <td align=left>copper ore mine
1225 <table>
1226 <tr>
1227 <td nowrap valign=top><tt>2F</tt>&nbsp; </td>
1228 <td align=left>wheel tower when not animated</td>
1229 </tr>
1230 <tr>
1231 <td nowrap valign=top><tt>30</tt>&nbsp; </td>
1232 <td align=left>wheel tower when animated; animation state in m7 bits 5..0; m7 bit 6 set = sound already generated</td>
1233 </tr>
1234 <tr>
1235 <td nowrap valign=top><tt>31</tt>&nbsp; </td>
1236 <td align=left>chimney</td>
1237 </tr>
1238 </table>
1239 </td>
1240 </tr>
1242 <tr>
1243 <td nowrap valign=top><tt>34</tt>..<tt>39</tt>&nbsp; </td>
1244 <td align=left>steel mill</td>
1245 </tr>
1247 <tr>
1248 <td nowrap valign=top><tt>3A</tt>..<tt>3B</tt>&nbsp; </td>
1249 <td align=left>bank (temperate climate)</td>
1250 </tr>
1252 <tr>
1253 <td nowrap valign=top><tt>3C</tt>..<tt>3F</tt>&nbsp; </td>
1254 <td align=left>food processing plant</td>
1255 </tr>
1257 <tr>
1258 <td nowrap valign=top><tt>40</tt>..<tt>47</tt>&nbsp; </td>
1259 <td align=left>paper mill</td>
1260 </tr>
1262 <tr>
1263 <td nowrap valign=top><tt>48</tt>..<tt>58</tt>&nbsp; </td>
1264 <td align=left>gold mine
1265 <table>
1266 <tr>
1267 <td nowrap valign=top><tt>4F</tt>&nbsp; </td>
1268 <td align=left>wheel tower when not animated</td>
1269 </tr>
1270 <tr>
1271 <td nowrap valign=top><tt>58</tt>&nbsp; </td>
1272 <td align=left>wheel tower when animated; animation state in m7 bits 5..0; m7 bit 6 set = sound already generated</td>
1273 </tr>
1274 </table></td>
1275 </tr>
1277 <tr>
1278 <td nowrap valign=top><tt>59</tt>..<tt>5A</tt>&nbsp; </td>
1279 <td align=left>bank (sub-arctic or sub-tropical climate)</td>
1280 </tr>
1282 <tr>
1283 <td nowrap valign=top><tt>5B</tt>..<tt>63</tt>&nbsp; </td>
1284 <td align=left>diamond mine</td>
1285 </tr>
1287 <tr>
1288 <td nowrap valign=top><tt>64</tt>..<tt>73</tt>&nbsp; </td>
1289 <td align=left>iron ore mine</td>
1290 </tr>
1292 <tr>
1293 <td nowrap valign=top><tt>74</tt></td>
1294 <td align=left>fruit plantation</td>
1295 </tr>
1297 <tr>
1298 <td nowrap valign=top><tt>75</tt></td>
1299 <td align=left>rubber plantation</td>
1300 </tr>
1302 <tr>
1303 <td nowrap valign=top><tt>76</tt>..<tt>77</tt>&nbsp; </td>
1304 <td align=left>water supply</td>
1305 </tr>
1307 <tr>
1308 <td nowrap valign=top><tt>78</tt></td>
1309 <td align=left>water tower</td>
1310 </tr>
1312 <tr>
1313 <td nowrap valign=top><tt>79</tt>..<tt>7C</tt>&nbsp; </td>
1314 <td align=left>factory (sub-tropical climate)</td>
1315 </tr>
1317 <tr>
1318 <td nowrap valign=top><tt>7D</tt>..<tt>80</tt>&nbsp; </td>
1319 <td align=left>lumber mill</td>
1320 </tr>
1322 <tr>
1323 <td nowrap valign=top><tt>81</tt>..<tt>82</tt>&nbsp; </td>
1324 <td align=left>candyfloss forest
1325 <table>
1326 <tr>
1327 <td nowrap valign=top><tt>82</tt>&nbsp; </td>
1328 <td align=left>candyfloss 'trees' cut down</td>
1329 </tr>
1330 </table>
1331 </td>
1332 </tr>
1334 <tr>
1335 <td nowrap valign=top><tt>83</tt>..<tt>86</tt>&nbsp; </td>
1336 <td align=left>sweet factory</td>
1337 </tr>
1339 <tr>
1340 <td nowrap valign=top><tt>87</tt>..<tt>88</tt>&nbsp; </td>
1341 <td align=left>battery farm
1342 <table>
1343 <tr>
1344 <td nowrap valign=top><tt>88</tt>&nbsp; </td>
1345 <td align=left>batteries 'reaped'</td>
1346 </tr>
1347 </table>
1348 </td>
1349 </tr>
1351 <tr>
1352 <td nowrap valign=top><tt>89</tt></td>
1353 <td align=left>cola wells</td>
1354 </tr>
1356 <tr>
1357 <td nowrap valign=top><tt>8A</tt>..<tt>8D</tt>&nbsp; </td>
1358 <td align=left>toy shop</td>
1359 </tr>
1361 <tr>
1362 <td nowrap valign=top><tt>8E</tt>..<tt>93</tt>&nbsp; </td>
1363 <td align=left>toy factory
1364 <table>
1365 <tr>
1366 <td nowrap valign=top><tt>8F</tt>&nbsp; </td>
1367 <td align=left>Animated part; animation state in m7 (valid range <tt>00</tt>..<tt>31</tt>)<br>
1368 Tile animation is started (m4 zeroed) on the periodic processing.<br>
1369 While the animation is in progress, m4 holds the number
1370 of animation cycles that have already taken place.<br>
1371 when this number reaches 8 the animation is stopped.</td>
1372 </tr>
1373 </table>
1374 </td>
1375 </tr>
1377 <tr>
1378 <td nowrap valign=top><tt>94</tt>..<tt>9B</tt>&nbsp; </td>
1379 <td align=left>plastic fountains (various stages of cyclic animation)</td>
1380 </tr>
1382 <tr>
1383 <td nowrap valign=top><tt>9C</tt>..<tt>9F</tt>&nbsp; </td>
1384 <td align=left>fizzy drink factory</td>
1385 </tr>
1387 <tr>
1388 <td nowrap valign=top><tt>A0</tt>..<tt>A3</tt>&nbsp; </td>
1389 <td align=left>bubble generator
1390 <table>
1391 <tr>
1392 <td nowrap valign=top><tt>A1</tt>&nbsp; </td>
1393 <td align=left>generators</td>
1394 </tr>
1395 <tr>
1396 <td nowrap valign=top><tt>A2</tt>&nbsp; </td>
1397 <td align=left>bubble capture facility; animation state in m7 (valid range <tt>00</tt>..<tt>27</tt>)</td>
1398 </tr>
1399 </table>
1400 </td>
1401 </tr>
1403 <tr>
1404 <td nowrap valign=top><tt>A4</tt>..<tt>A6</tt>&nbsp; </td>
1405 <td align=left>toffee quarry
1406 <table>
1407 <tr>
1408 <td nowrap valign=top><tt>A5</tt>&nbsp; </td>
1409 <td align=left>animated part; animation state in m3 (valid range <tt>00</tt>..<tt>45</tt>)</td>
1410 </tr>
1411 </table>
1412 </td>
1413 </tr>
1415 <tr>
1416 <td nowrap valign=top><tt>A7</tt>..<tt>AE</tt>&nbsp; </td>
1417 <td align=left>sugar mine
1418 <table>
1419 <tr>
1420 <td nowrap valign=top><tt>AE</tt>&nbsp; </td>
1421 <td align=left>animated part; animation state in m3 (valid range <tt>00</tt>..<tt>5F</tt>)</td>
1422 </tr>
1423 </table>
1424 </td>
1425 </tr>
1426 <tr>
1427 <td nowrap valign=top><tt>AF</tt>..<tt>1FF</tt>&nbsp; </td>
1428 <td align=left>NewGRF industries industry</td>
1429 </tr>
1430 </table>
1431 </li>
1432 <li>m6 bits 5..3: random triggers (NewGRF)</li>
1433 <li>m6 bit 2: bit 8 of type (see m5)</li>
1434 <li>m7: animation frame</li>
1435 </ul>
1436 </td>
1437 </tr>
1439 <tr bgcolor="#CCCCCC">
1440 <td valign=top nowrap><strong><a name="Class9"><tt> 9</tt></a></strong></td>
1441 <td><strong>Tunnel / bridge</strong></td>
1442 </tr>
1443 <tr>
1444 <td valign=top nowrap>&nbsp;</td>
1445 <td>
1446 <ul>
1447 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a></li>
1448 <li style="color: blue">m2 bits 7..0: custom road bridge heads (flat bridge heads only)<br>
1449 Road/tram bits below are XORed with the axial bridge direction road bits.<br>
1450 A non-custom bridge head configuration will have a value of 0.
1451 <ul>
1452 <li>m2 bits 7..4: Road bits<br>
1453 Valid only if m7 bit 6 is set
1454 </li>
1455 <li>m2 bits 3..0: Tram bits<br>
1456 Valid only if m7 bit 7 is set
1457 </li>
1458 </ul>
1459 <table style="color: blue">
1460 <tr>
1461 <td align=left>bit 0: </td>
1462 <td>NW piece</td>
1463 </tr>
1464 <tr>
1465 <td align=left>bit 1: </td>
1466 <td>SW piece</td>
1467 </tr>
1468 <tr>
1469 <td align=left>bit 2: </td>
1470 <td>SE piece</td>
1471 </tr>
1472 <tr>
1473 <td align=left>bit 3: </td>
1474 <td>NE piece</td>
1475 </tr>
1476 </table>
1477 </li>
1478 <li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of tram</li>
1479 <li>m3 bits 3..0: <a href="#TrackType">track type</a> for railway</li>
1480 <li>m5 bit 4: pbs reservation state for railway</li>
1481 <li>m5 bit 7 clear: tunnel entrance/exit</li>
1482 <li>m5 bit 7 set: bridge ramp
1483 <ul>
1484 <li>m6 bits 5..2: <a name="BridgeType">bridge type</a>:
1485 <table>
1486 <tr>
1487 <th align=left>Type&nbsp;</th>
1488 <th align=left>Max. speed (mph)&nbsp;</th>
1489 <th align=left>Description</th>
1490 </tr>
1492 <tr>
1493 <td nowrap valign=top><tt>0</tt>&nbsp; </td>
1494 <td align=center>20</td>
1495 <td align=left>wooden</td>
1496 </tr>
1498 <tr>
1499 <td nowrap valign=top><tt>1</tt>&nbsp; </td>
1500 <td align=center>30</td>
1501 <td align=left>concrete</td>
1502 </tr>
1504 <tr>
1505 <td nowrap valign=top><tt>2</tt>&nbsp; </td>
1506 <td align=center>40</td>
1507 <td align=left>girder, steel</td>
1508 </tr>
1510 <tr>
1511 <td nowrap valign=top><tt>3</tt>&nbsp; </td>
1512 <td align=center>50</td>
1513 <td align=left>suspension, concrete</td>
1514 </tr>
1516 <tr>
1517 <td nowrap valign=top><tt>4</tt>&nbsp; </td>
1518 <td align=center>60</td>
1519 <td align=left>suspension, steel</td>
1520 </tr>
1522 <tr>
1523 <td nowrap valign=top><tt>5</tt>&nbsp; </td>
1524 <td align=center>70</td>
1525 <td align=left>suspension, steel</td>
1526 </tr>
1528 <tr>
1529 <td nowrap valign=top><tt>6</tt>&nbsp; </td>
1530 <td align=center>100</td>
1531 <td align=left>cantilever, steel</td>
1532 </tr>
1534 <tr>
1535 <td nowrap valign=top><tt>7</tt>&nbsp; </td>
1536 <td align=center>130</td>
1537 <td align=left>cantilever, steel</td>
1538 </tr>
1540 <tr>
1541 <td nowrap valign=top><tt>8</tt>&nbsp; </td>
1542 <td align=center>150</td>
1543 <td align=left>cantilever, steel</td>
1544 </tr>
1546 <tr>
1547 <td nowrap valign=top><tt>9</tt>&nbsp; </td>
1548 <td align=center>160</td>
1549 <td align=left>girder, steel</td>
1550 </tr>
1552 <tr>
1553 <td nowrap valign=top><tt>A</tt>&nbsp; </td>
1554 <td align=center>200</td>
1555 <td align=left>tubular, steel</td>
1556 </tr>
1558 <tr>
1559 <td nowrap valign=top><tt>B</tt>&nbsp; </td>
1560 <td align=center>320</td>
1561 <td align=left>tubular, steel</td>
1562 </tr>
1564 <tr>
1565 <td nowrap valign=top><tt>C</tt>&nbsp; </td>
1566 <td align=center>380</td>
1567 <td align=left>tubular, silicon</td>
1568 </tr>
1569 </table>
1570 </li>
1571 </ul>
1572 </li>
1573 <li style="color: blue">m5 bits 6..5: signal simulation (signals on bridge/tunnels patch)
1574 <table style="color: blue">
1575 <tr>
1576 <td><tt>0</tt>&nbsp;</td>
1577 <td>no signal simulation</td>
1578 </tr>
1580 <tr>
1581 <td><tt>1</tt>&nbsp;</td>
1582 <td>signal simulation entrance (bit 5 set)</td>
1583 </tr>
1585 <tr>
1586 <td><tt>2</tt>&nbsp;</td>
1587 <td>signal simulation exit (bit 6 set)</td>
1588 </tr>
1589 </table>
1590 If signal simulation entrance or exit:
1591 <ul>
1592 <li>m6 bit 6: set = PBS signals, clear = block signals</li>
1593 <li>m6 bit 1: set = semaphore signals, clear = light signals</li>
1594 <li>m6 bit 0: set = signal shows green, clear = signal shows red</li>
1595 <li>m2 bit 15: for bridge entrances only: storage for visual red/green state of signals starting from 15 is allocated outside the map array</li>
1596 <li>m2 bits 14..0: for bridge entrances only: for signals 0..14 on bridge, signal is visually red if corresponding bit in 0..14 is set</li>
1597 </ul>
1598 </li>
1599 <li>m5 bits 3..2: transport type
1600 <table>
1601 <tr>
1602 <td><tt>0</tt>&nbsp;</td>
1603 <td>railway</td>
1604 </tr>
1606 <tr>
1607 <td><tt>1</tt>&nbsp;</td>
1608 <td>road</td>
1609 </tr>
1611 <tr>
1612 <td><tt>2</tt>&nbsp;</td>
1613 <td>water</td>
1614 </tr>
1615 </table>
1616 </li>
1617 <li>m5 bits 1..0: direction onto the bridge / out of the tunnel
1618 <table>
1619 <tr>
1620 <td><tt>0</tt>&nbsp; </td>
1621 <td>NE</td>
1622 </tr>
1624 <tr>
1625 <td><tt>1</tt>&nbsp; </td>
1626 <td>SE</td>
1627 </tr>
1629 <tr>
1630 <td><tt>2</tt>&nbsp; </td>
1631 <td>SW</td>
1632 </tr>
1634 <tr>
1635 <td><tt>3</tt>&nbsp; </td>
1636 <td>NW</td>
1637 </tr>
1638 </table>
1639 </li>
1640 <li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road</li>
1641 <li>m7 bit 5 set = on snow or desert</li>
1642 <li>m7 bits 7..6: present road types for road</li>
1643 </ul>
1644 </td>
1645 </tr>
1647 <tr bgcolor="#CCCCCC">
1648 <td valign=top nowrap><strong><a name="ClassA"><tt> A</tt></a></strong></td>
1649 <td><strong><tt>Objects</tt></strong></td>
1650 </tr>
1651 <tr>
1652 <td valign=top nowrap>&nbsp;</td>
1653 <td>
1654 <ul>
1655 <li>m1 bits 6..5 : Water class (sea, canal, river or land)</li>
1656 <li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> of the object (for lighthouses and transmitters normally <tt>10</tt>)</li>
1657 <li>m2: index into the array of objects, bits 0 to 15 (upper bits in m5)</li>
1658 <li>m3: random bits</li>
1659 <li>m5: index into the array of objects, bits 16 to 23 (lower bits in m2)</li>
1660 <li>m7: animation counter</li>
1661 </ul>
1662 </td>
1663 </tr>
1664 <tr>
1665 <td colspan=2>Classes <tt>B</tt> through <tt>F</tt> are reserved. The presence
1666 of a tile in one of the reserved classes will crash OTTD.</td>
1667 </tr>
1668 </table>
1671 <hr>
1672 Original Copyright &copy; 2003 by Marcin Grzegorczyk for TTDLX.<br>
1673 Transport Tycoon and Transport Tycoon Deluxe are Copyright &copy; by Chris Sawyer.<br>
1674 All the other trademarks are the property of their respective owners.<br>
1675 </body>
1677 </html>