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