diff options
author | rubidium <rubidium@openttd.org> | 2014-09-21 11:20:29 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-09-21 11:20:29 +0000 |
commit | 18b98afabdc04874942b451b281ad28be967d1ae (patch) | |
tree | c83940920657e591566e77a37e645e64dbae676e /docs/landscape.html | |
parent | 0ac2d3b3247041e0690e12ac7270dde5377390de (diff) | |
download | openttd-18b98afabdc04874942b451b281ad28be967d1ae.tar.xz |
(svn r26877) -Update: documentation about the map array
Diffstat (limited to 'docs/landscape.html')
-rw-r--r-- | docs/landscape.html | 92 |
1 files changed, 45 insertions, 47 deletions
diff --git a/docs/landscape.html b/docs/landscape.html index abf01c9d8..2101ea965 100644 --- a/docs/landscape.html +++ b/docs/landscape.html @@ -15,20 +15,60 @@ For a graphical representation of the tile-layout have a look at <a href="landscape_grid.html">Landscape grid</a> page. </p> - <p>Eight attributes (counting "<span style="font-weight: bold;">type_height</span>") hold the informations about a tile.<BR> + <p>Nine attributes (counting "<span style="font-weight: bold;">type</span>" and + "<span style="font-weight: bold;">height</span>") hold the informations about a tile.<BR> These attributes are referred to as - "<span style="font-weight: bold;">type_height</span>", + "<span style="font-weight: bold;">type</span>", + "<span style="font-weight: bold;">height</span>", "<span style="font-weight: bold;">m1</span>", "<span style="font-weight: bold;">m2</span>", "<span style="font-weight: bold;">m3</span>", "<span style="font-weight: bold;">m4</span>", "<span style="font-weight: bold;">m5</span>", "<span style="font-weight: bold;">m6</span>" and "<span style="font-weight: bold;">m7</span>".<br> The most important value is the class of a tile, stored in the upper 4 bits - of the <span style="font-weight: bold;">type_height</span> attribute. The lower 4 bits are used to encode the height and - slope data. + of the <span style="font-weight: bold;">type</span> attribute. </p> Frequently repeating patterns: <ul> + <li><span style="font-weight: bold;">type</span> + <ul> + <li> + <a name="type"></a> + Bits 7..4: + <table border="1" style="width: 30em;"> + <tr bgcolor="#CCCCCC"><td colspan="2">The tile type.</td></tr> + <tr><td style="width: 5em;"><tt>00</tt></td><td>Ground</td></tr> + <tr><td><tt>01</tt></td><td>Railway tracks</td></tr> + <tr><td><tt>02</tt></td><td>Roads</td></tr> + <tr><td><tt>03</tt></td><td>Town building</td></tr> + <tr><td><tt>04</tt></td><td>Trees</td></tr> + <tr><td><tt>05</tt></td><td>Station tiles</td></tr> + <tr><td><tt>06</tt></td><td>Water</td></tr> + <tr><td><tt>07</tt></td><td>Void</td></tr> + <tr><td><tt>08</tt></td><td>Industries</td></tr> + <tr><td><tt>09</tt></td><td>Tunnel / bridge</td></tr> + <tr><td><tt>0A</tt></td><td>Objects</td></tr> + </table> + </li> + Bits 3..2: + <table border="1" style="width: 30em;"> + <tr bgcolor="#CCCCCC"><td colspan="2">Presence and direction of bridge above.</td></tr> + <tr><td style="width: 5em;"><tt>00</tt></td><td>no bridge</td></tr> + <tr><td><tt>01</tt></td><td>Axis X (North-East)</td></tr> + <tr><td><tt>02</tt></td><td>Axis Y (South-West)</td></tr> + </table> + <li> + <a name="tropic_zone"></a> + Bits 1..0: + <table border="1" style="width: 30em;"> + <tr bgcolor="#CCCCCC"><td colspan="2">Only meaningfull in tropic climate. It contains the definition of the available zones</td></tr> + <tr><td style="width: 5em;"><tt>00</tt></td><td>normal</td></tr> + <tr><td><tt>01</tt></td><td>desert</td></tr> + <tr><td><tt>02</tt></td><td>rain forest</td></tr> + </table> + In any other climate these 2 bits are theoretically free of use, however using them does not seem useful. + </li> + </ul> <li><span style="font-weight: bold;">m1</span> <ul> <li> @@ -58,32 +98,6 @@ </li> </ul> </li> - <li><span style="font-weight: bold;">m6</span> - <ul> - <li> - <a name="bridge_direction"></a> - Bits 7..6: - <table border="1" style="width: 30em;"> - <tr bgcolor="#CCCCCC"><td colspan="2">Presence and direction of bridge above, for tiles that support this.</td></tr> - <tr><td style="width: 5em;"><tt>00</tt></td><td>no bridge</td></tr> - <tr><td><tt>01</tt></td><td>Axis X (North-East)</td></tr> - <tr><td><tt>02</tt></td><td>Axis Y (South-West)</td></tr> - </table> - Some tiles, such as houses do not support bridges over them and use these bits for other purposes. - </li> - <li> - <a name="tropic_zone"></a> - Bits 1..0: - <table border="1" style="width: 30em;"> - <tr bgcolor="#CCCCCC"><td colspan="2">Only meaningfull in tropic climate. It contains the definition of the available zones</td></tr> - <tr><td style="width: 5em;"><tt>00</tt></td><td>normal</td></tr> - <tr><td><tt>01</tt></td><td>desert</td></tr> - <tr><td><tt>02</tt></td><td>rain forest</td></tr> - </table> - In any other climate these 2 bits are theoretically free of use, however using them does not seem useful. - </li> - </ul> - </li> <li><span style="font-weight: bold;">m7:</span><br> Animation frame/state. Used for houses, industries, objects and stations. </li> @@ -196,9 +210,7 @@ </tr> </table> </li> - <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li> <li>m6 bits 4..2: type of hedge on NW border of the tile</li> - <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li> </ul> </td> </tr> @@ -510,8 +522,6 @@ <li>m5 bit 4: pbs reservation state</li> </ul> </li> - <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li> - <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li> </ul> </td> </tr> @@ -665,8 +675,6 @@ </li> </ul> </li> - <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li> - <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li> </ul> </td> </tr> @@ -713,7 +721,6 @@ <li>bits 7..2 : lift position (for houses type 04 and 05)</li> </ul> </li> - <li>bits 1..0 : tropic zone specifier</li> </ul> </li> <li>m7 : @@ -835,7 +842,6 @@ </tr> </table> </li> - <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li> </ul> </td> </tr> @@ -969,7 +975,6 @@ <li>m6 bits 5..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy, waypoint)</li> <li>m6 bit 2: pbs reservation state for railway stations/waypoints</li> - <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li> <li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road (road stops)</li> <li>m7 bits 7..6: present road types (road stops)</li> <li>m7: animation frame (railway stations/waypoints, airports)</li> @@ -1082,8 +1087,6 @@ </tr> </table> </li> - <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li> - <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li> </ul> </td> </tr> @@ -1101,7 +1104,7 @@ <tr bgcolor="#CCCCCC"> <td valign=top nowrap><strong><a name="Class8"><tt> 8</tt></a></strong></td> - <td><strong>Industry tile </strong></td> + <td><strong>Industries </strong></td> </tr> <tr> <td valign=top nowrap> </td> @@ -1425,7 +1428,6 @@ </li> <li>m6 bits 5..3: random triggers (NewGRF)</li> <li>m6 bit 2: bit 8 of type (see m5)</li> - <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li> <li>m7: animation frame</li> </ul> </td> @@ -1576,8 +1578,6 @@ </tr> </table> </li> - <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li> - <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li> <li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road</li> <li>m7 bit 5 set = on snow or desert</li> <li>m7 bits 7..6: present road types for road</li> @@ -1598,8 +1598,6 @@ <li>m2: index into the array of objects, bits 0 to 15 (upper bits in m5)</li> <li>m3: random bits</li> <li>m5: index into the array of objects, bits 16 to 23 (lower bits in m2)</li> - <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li> - <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li> <li>m7: animation counter</li> </ul> </td> |