forked from mirror/OpenTTD
Codechange: Simplify storage of WaterTileType in map. (#13030)
This commit is contained in:
@@ -1050,98 +1050,92 @@
|
||||
<li>m1 bits 4..0: <a href="#OwnershipInfo">owner</a> (for sea, rivers, and coasts normally <tt>11</tt>)</li>
|
||||
<li>m2: Depot index (for depots only)</li>
|
||||
<li>m4: Random data for canal or river tiles</li>
|
||||
<li>m5: tile type:
|
||||
<li>m5 bits 7..4: Water tile type:
|
||||
<table>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>00</tt> </td>
|
||||
<td align=left>water, canal or river</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>01</tt> </td>
|
||||
<td align=left>coast or riverbank</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>10</tt>..<tt>1B</tt> </td>
|
||||
<td align=left>canal locks
|
||||
<table>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>10</tt> </td>
|
||||
<td align=left>middle part, (SW-NE direction)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>11</tt> </td>
|
||||
<td align=left>middle part, (NW-SE direction)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>12</tt> </td>
|
||||
<td align=left>middle part, (NE-SW direction)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>13</tt> </td>
|
||||
<td align=left>middle part, (SE-NW direction)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>14</tt> </td>
|
||||
<td align=left>lower part, (SW-NE direction)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>15</tt> </td>
|
||||
<td align=left>lower part, (NW-SE direction)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>16</tt> </td>
|
||||
<td align=left>lower part, (NE-SW direction)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>17</tt> </td>
|
||||
<td align=left>lower part, (SE-NW direction)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>18</tt> </td>
|
||||
<td align=left>upper part, (SW-NE direction)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>19</tt> </td>
|
||||
<td align=left>upper part, (NW-SE direction)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>1A</tt> </td>
|
||||
<td align=left>upper part, (NE-SW direction)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>1B</tt> </td>
|
||||
<td align=left>upper part, (SE-NW direction)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>80</tt>..<tt>83</tt> </td>
|
||||
<td align=left>ship depots
|
||||
<table>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>80</tt> </td>
|
||||
<td align=left>ship depot, NE part (X direction)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>81</tt> </td>
|
||||
<td align=left>ship depot, SW part (X direction)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>82</tt> </td>
|
||||
<td align=left>ship depot, NW part (Y direction)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>83</tt> </td>
|
||||
<td align=left>ship depot, SE part (Y direction)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<tr>
|
||||
<td><tt>0</tt> </td>
|
||||
<td>water, canal or river</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>1</tt> </td>
|
||||
<td>coast or riverbank</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>2</tt> </td>
|
||||
<td>canal lock<br>
|
||||
<ul>
|
||||
<li>m5 bits 3..2: Lock part
|
||||
<table>
|
||||
<tr>
|
||||
<td><tt>0</tt> </td>
|
||||
<td>Middle part</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>1</tt> </td>
|
||||
<td>Lower part</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>2</tt> </td>
|
||||
<td>Upper part</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
<li>m5 bits 1..0: Lock direction
|
||||
<table>
|
||||
<tr>
|
||||
<td><tt>0</tt> </td>
|
||||
<td>NE raised</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>1</tt> </td>
|
||||
<td>SE raised</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>2</tt> </td>
|
||||
<td>SW raised</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>3</tt> </td>
|
||||
<td>NW raised</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap valign=top><tt>3</tt> </td>
|
||||
<td>depot<br>
|
||||
<ul>
|
||||
<li>m5 bit 1: Depot axis
|
||||
<table>
|
||||
<tr>
|
||||
<td><tt>0</tt> </td>
|
||||
<td>X direction (NE-SW)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>1</tt> </td>
|
||||
<td>Y direction (NW-SE)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
<li>m5 bit 0: Depot part
|
||||
<table>
|
||||
<tr>
|
||||
<td><tt>0</tt> </td>
|
||||
<td>North part</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>1</tt> </td>
|
||||
<td>South part</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
|
@@ -240,32 +240,37 @@ the array so you can quickly see what is used and what is not.
|
||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan=4>6</td>
|
||||
<td class="caption">sea, shore</td>
|
||||
<td class="bits" rowspan=4><span class="used" title="Ship docking tile status">X</span> <span class="used" title="Water class">XX</span> <span class="used" title="Owner">XXXXX</span></td>
|
||||
<td class="bits" rowspan=3><span class="free">OOOO OOOO OOOO OOOO</span></td>
|
||||
<td class="bits" rowspan=4><span class="free">OOOO OOOO</span></td>
|
||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">O<span class="usable">OO</span>O</span> <span class="free">OOO</span><span class="used" title="Sea shore flag">X</span></td>
|
||||
<td class="bits" rowspan=4><span class="free">OOOO OOOO</span></td>
|
||||
<td class="bits" rowspan=4><span class="free">OOOO OOOO</td>
|
||||
<td rowspan=5>6</td>
|
||||
<td class="caption">sea</td>
|
||||
<td class="bits" rowspan=5><span class="used" title="Ship docking tile status">X</span> <span class="used" title="Water class">XX</span> <span class="used" title="Owner">XXXXX</span></td>
|
||||
<td class="bits" rowspan=4><span class="free">OOOO OOOO OOOO OOOO</span></td>
|
||||
<td class="bits" rowspan=5><span class="free">OOOO OOOO</span></td>
|
||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">0000</span> <span class="free">OOO0</span></td>
|
||||
<td class="bits" rowspan=5><span class="free">OOOO OOOO</span></td>
|
||||
<td class="bits" rowspan=5><span class="free">OOOO OOOO</td>
|
||||
<td class="bits" rowspan=5><span class="free">OOOO OOOO OOOO OOOO</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">canal, river</td>
|
||||
<td class="bits"><span class="used" title="Canal/river random bits">XXXX XXXX</span></td>
|
||||
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">O<span class="usable">OO</span>O</span> <span class="free">OOOO</span></td>
|
||||
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">0000</span> <span class="free">OOOO</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">shore</td>
|
||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">0001</span> <span class="free">OOOO</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">lock</td>
|
||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">O<span class="usable">OO</span>1</span> <span class="used" title="Lock part">XX</span> <span class="used" title="Lock orientation m5[1..0]">XX</span></td>
|
||||
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">0010</span> <span class="used" title="Lock part">XX</span><span class="used" title="Lock orientation m5[1..0]">XX</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="caption">shipdepot</td>
|
||||
<td class="bits"><span class="pool" title="Depot index on pool">XXXX XXXX XXXX XXXX</span></td>
|
||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">1<span class="usable">OOO</span></span> <span class="free">OO</span><span class="used" title="Depot axis">X</span> <span class="used" title="Depot part">X</span></td>
|
||||
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">0011</span> <span class="free">OO</span><span class="used" title="Depot axis">X</span><span class="used" title="Depot part">X</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan=2>8</td>
|
||||
|
Reference in New Issue
Block a user