docs/landscape.html
branchNewGRF_ports
changeset 6877 889301acc299
parent 6872 1c4a4a609f85
child 6878 7d1ff2f621c7
equal deleted inserted replaced
6876:2c40faeef7a5 6877:889301acc299
    36   </li>
    36   </li>
    37   <li>
    37   <li>
    38    <a name = "tropic_zone">
    38    <a name = "tropic_zone">
    39    Bits 1..0 :
    39    Bits 1..0 :
    40    <table border="1">
    40    <table border="1">
    41     <tr bgcolor="#CCCCCC"><td colspan="2">Only meaningfull in tropic climate.<br>It contains the definition of the two available zones</td></tr>
    41     <tr bgcolor="#CCCCCC"><td colspan="2">Only meaningfull in tropic climate.<br>It contains the definition of the available zones</td></tr>
    42     <tr><td><tt>00</tt>&nbsp; </td><td>invalid zone</td></tr>
    42     <tr><td><tt>00</tt>&nbsp; </td><td>normal</td></tr>
    43     <tr><td><tt>01</tt>&nbsp; </td><td>desert</td></tr>
    43     <tr><td><tt>01</tt>&nbsp; </td><td>desert</td></tr>
    44     <tr><td><tt>02</tt>&nbsp; </td><td>rain forest</td></tr>
    44     <tr><td><tt>02</tt>&nbsp; </td><td>rain forest</td></tr>
    45    </table>
    45    </table>
    46    In any other climate, those 2 bits are free of use.
    46    In any other climate, those 2 bits are free of use.
    47   </li>
    47   </li>
    77   <tr>
    77   <tr>
    78    <td valign=top nowrap>&nbsp;</td>
    78    <td valign=top nowrap>&nbsp;</td>
    79    <td>
    79    <td>
    80     <ul>
    80     <ul>
    81      <li>m1: <a href="#OwnershipInfo">owner</a> of the tile (normally <tt>10</tt>)</li>
    81      <li>m1: <a href="#OwnershipInfo">owner</a> of the tile (normally <tt>10</tt>)</li>
       
    82      <li>m2: see fields</li>
       
    83      <li>m3 bits 3..0: see fields</li>
    82      <li>m4 bits 7..5: type of hedge on the SW border of the tile (1 through 6, or 0=none)</li>
    84      <li>m4 bits 7..5: type of hedge on the SW border of the tile (1 through 6, or 0=none)</li>
    83      <li>m4 bits 4..2: same as 7..5, but for the SE border</li>
    85      <li>m4 bits 4..2: same as 7..5, but for the SE border</li>
    84      <li>m5 bits 7..5: update counter, incremented on every periodic processing for tile types,
    86      <li>m5 bits 7..5: update counter, incremented on every periodic processing for tile types,
    85          other than <tt>03</tt>, <tt>07</tt>, <tt>0B</tt>, <tt>10</tt> and above.<BR>
    87          other than <tt>03</tt>, <tt>07</tt>, <tt>0B</tt>, <tt>10</tt> and above.<BR>
    86          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>
    88          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>
    87          For snow and desert, these bits are not used, tile is updated on every periodic processing.</li>
    89          For snow and desert, these bits are not used, tile is updated on every periodic processing.</li>
    88      <li>m5 bits 4..0: tile type:
    90      <li>m5 bits 4..2: tile type:
    89       <table>
    91       <table>
    90        <tr>
    92        <tr>
    91         <td nowrap valign=top><tt>00</tt>&nbsp; </td>
    93         <td nowrap valign=top><tt>0</tt>&nbsp; </td>
    92         <td align=left>bare land</td>
    94         <td align=left>bare land / grass</td>
    93        </tr>
    95        </tr>
    94 
    96 
    95        <tr>
    97        <tr>
    96         <td nowrap valign=top><tt>01</tt>&nbsp; </td>
    98         <td nowrap valign=top><tt>1</tt>&nbsp; </td>
    97         <td align=left>1/3 grass</td>
    99         <td align=left>rough land (density must be 3)</td>
    98        </tr>
   100        </tr>
    99 
   101 
   100        <tr>
   102        <tr>
   101         <td nowrap valign=top><tt>02</tt>&nbsp; </td>
   103         <td nowrap valign=top><tt>2</tt>&nbsp; </td>
   102         <td align=left>2/3 grass</td>
   104         <td align=left>rocks (density must be 3)</td>
   103        </tr>
   105        </tr>
   104 
   106 
   105        <tr>
   107        <tr>
   106         <td nowrap valign=top><tt>03</tt>&nbsp; </td>
   108         <td nowrap valign=top><tt>3</tt>&nbsp; </td>
   107         <td align=left>full grass</td>
   109         <td align=left>fields (density must be 3)
   108        </tr>
   110          <ul>
   109 
   111           <li>m2: index into the array of industries (farms), INVALID_INDUSTRY (0xFFFF) if farm has been removed</li>
   110        <tr>
   112           <li>m3 bits 3..0: field type (legal values: 0 through 9)</li>
   111         <td nowrap valign=top><tt>07</tt>&nbsp; </td>
   113          </ul>
   112         <td align=left>rough land</td>
   114         </td>
   113        </tr>
   115        </tr>
   114 
   116 
   115        <tr>
   117        <tr>
   116         <td nowrap valign=top><tt>0B</tt>&nbsp; </td>
   118         <td nowrap valign=top><tt>4</tt>&nbsp; </td>
   117         <td align=left>rocks</td>
   119         <td align=left>snow</td>
   118        </tr>
   120        </tr>
   119 
   121 
   120        <tr>
   122        <tr>
   121         <td nowrap valign=top><tt>0F</tt>&nbsp; </td>
   123         <td nowrap valign=top><tt>5</tt>&nbsp; </td>
   122         <td align=left>fields; type of fields in m3 bits 3..0 (legal values: 0 through 9)<br>
   124         <td align=left>desert (density must be 1 or 3)</td>
   123              m2: Index into the array of industries (farms), INVALID_INDUSTRY (0xFFFF) if farm has been removed</td>
   125        </tr>
   124        </tr>
   126       </table>
   125 
   127      </li>
   126        <tr>
   128      <li>m5 bits 1..0: density:
   127         <td nowrap valign=top><tt>10</tt>&nbsp; </td>
   129       <table>
   128         <td align=left>1/4 snow</td>
   130        <tr>
   129        </tr>
   131         <td nowrap valign=top><tt>0</tt>&nbsp; </td>
   130 
   132         <td>bare land</td>
   131        <tr>
   133         <td></td>
   132         <td nowrap valign=top><tt>11</tt>&nbsp; </td>
   134         <td></td>
   133         <td align=left>2/4 snow</td>
   135         <td></td>
   134        </tr>
   136         <td>1/4 snow</td>
   135 
   137         <td></td>
   136        <tr>
   138        </tr>
   137         <td nowrap valign=top><tt>12</tt>&nbsp; </td>
   139 
   138         <td align=left>3/4 snow</td>
   140        <tr>
   139        </tr>
   141         <td nowrap valign=top><tt>1</tt>&nbsp; </td>
   140 
   142         <td>1/3 grass</td>
   141        <tr>
   143         <td></td>
   142         <td nowrap valign=top><tt>13</tt>&nbsp; </td>
   144         <td></td>
   143         <td align=left>full snow</td>
   145         <td></td>
   144        </tr>
   146         <td>2/4 snow;&nbsp;</td>
   145 
   147         <td>1/2 desert</td>
   146        <tr>
   148        </tr>
   147         <td nowrap valign=top><tt>15</tt>&nbsp; </td>
   149 
   148         <td align=left>partial desert</td>
   150        <tr>
   149        </tr>
   151         <td nowrap valign=top><tt>2</tt>&nbsp; </td>
   150 
   152         <td>2/3 grass</td>
   151        <tr>
   153         <td></td>
   152         <td nowrap valign=top><tt>17</tt>&nbsp; </td>
   154         <td></td>
   153         <td align=left>full desert</td>
   155         <td></td>
       
   156         <td>3/4 snow</td>
       
   157         <td></td>
       
   158        </tr>
       
   159 
       
   160        <tr>
       
   161         <td nowrap valign=top><tt>3</tt>&nbsp; </td>
       
   162         <td>full grass;&nbsp;</td>
       
   163         <td>rough land;&nbsp;</td>
       
   164         <td>rocks;&nbsp;</td>
       
   165         <td>fields;&nbsp;</td>
       
   166         <td>full snow;&nbsp;</td>
       
   167         <td>full desert</td>
   154        </tr>
   168        </tr>
   155       </table>
   169       </table>
   156      </li>
   170      </li>
   157      <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li>
   171      <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li>
   158      <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
   172      <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
   166   </tr>
   180   </tr>
   167   <tr>
   181   <tr>
   168    <td valign=top nowrap>&nbsp;</td>
   182    <td valign=top nowrap>&nbsp;</td>
   169    <td>
   183    <td>
   170     <ul>
   184     <ul>
       
   185      <li>m1: <a href="#OwnershipInfo">owner</a> of the tile</li>
       
   186      <li>m2: see waypoint and signals</li>
       
   187      <li>m3 bits 7..4: see signals</li>
       
   188      <li>m3 bits 3..0 = <a name="TrackType">track type</a>:
       
   189       <table>
       
   190        <tr>
       
   191         <td><tt>0</tt>&nbsp; </td>
       
   192         <td>conventional railway</td>
       
   193        </tr>
       
   194 
       
   195        <tr>
       
   196         <td><tt>1</tt>&nbsp; </td>
       
   197         <td>electrified railway</td>
       
   198        </tr>
       
   199 
       
   200        <tr>
       
   201         <td><tt>2</tt>&nbsp; </td>
       
   202         <td>monorail</td>
       
   203        </tr>
       
   204 
       
   205        <tr>
       
   206         <td><tt>3</tt>&nbsp; </td>
       
   207         <td>maglev</td>
       
   208        </tr>
       
   209       </table>
       
   210      </li>
       
   211      <li>m4 bits 7..4: see signals</li>
       
   212      <li>m4 bits 3..0: Ground type (values with fences are not valid for depots and checkpoints)
       
   213       <table>
       
   214        <tr>
       
   215         <td nowrap valign=top><tt>0</tt>&nbsp; </td>
       
   216         <td align=left>on bare land</td>
       
   217        </tr>
       
   218 
       
   219        <tr>
       
   220         <td nowrap valign=top><tt>1</tt>&nbsp; </td>
       
   221         <td align=left>on grass, no fences</td>
       
   222        </tr>
       
   223 
       
   224        <tr>
       
   225         <td nowrap valign=top><tt>2</tt>&nbsp; </td>
       
   226         <td align=left>fence on the NW side</td>
       
   227        </tr>
       
   228 
       
   229        <tr>
       
   230         <td nowrap valign=top><tt>3</tt>&nbsp; </td>
       
   231         <td align=left>fence on the SE side</td>
       
   232        </tr>
       
   233 
       
   234        <tr>
       
   235         <td nowrap valign=top><tt>4</tt>&nbsp; </td>
       
   236         <td align=left>fences on the NW and SE sides</td>
       
   237        </tr>
       
   238 
       
   239        <tr>
       
   240         <td nowrap valign=top><tt>5</tt>&nbsp; </td>
       
   241         <td align=left>fence on the NE side</td>
       
   242        </tr>
       
   243 
       
   244        <tr>
       
   245         <td nowrap valign=top><tt>6</tt>&nbsp; </td>
       
   246         <td align=left>fence on the SW side</td>
       
   247        </tr>
       
   248 
       
   249        <tr>
       
   250         <td nowrap valign=top><tt>7</tt>&nbsp; </td>
       
   251         <td align=left>fences on the NE and SW sides</td>
       
   252        </tr>
       
   253 
       
   254        <tr>
       
   255         <td nowrap valign=top><tt>8</tt>&nbsp; </td>
       
   256         <td align=left>fence on the E side (track in the W corner)</td>
       
   257        </tr>
       
   258 
       
   259        <tr>
       
   260         <td nowrap valign=top><tt>9</tt>&nbsp; </td>
       
   261         <td align=left>fence on the W side (track in the E corner)</td>
       
   262        </tr>
       
   263 
       
   264        <tr>
       
   265         <td nowrap valign=top><tt>A</tt>&nbsp; </td>
       
   266         <td align=left>fence on the S side (track in the N corner)</td>
       
   267        </tr>
       
   268 
       
   269        <tr>
       
   270         <td nowrap valign=top><tt>B</tt>&nbsp; </td>
       
   271         <td align=left>fence on the N side (track in the S corner)</td>
       
   272        </tr>
       
   273 
       
   274        <tr>
       
   275         <td nowrap valign=top><tt>C</tt>&nbsp; </td>
       
   276         <td align=left>on snow or desert</td>
       
   277        </tr>
       
   278 
       
   279        <tr>
       
   280         <td nowrap valign=top><tt>D</tt>&nbsp; </td>
       
   281         <td align=left>on grass with fence and shore or water on the free halftile</td>
       
   282        </tr>
       
   283       </table>
       
   284      </li>
   171      <li>m5 bit 7 clear: railway track
   285      <li>m5 bit 7 clear: railway track
   172       <ul>
   286       <ul>
   173        <li>m1: <a href="#OwnershipInfo">owner</a> of the track</li>
   287        <li>m5 bits 5..0: track layout: bit set = track present:
   174        <li>m3 bits 3..0 = <a name="TrackType">track type</a>:
       
   175         <table>
   288         <table>
   176          <tr>
   289          <tr>
   177           <td><tt>0</tt>&nbsp; </td>
   290           <td nowrap valign=top>bit 0: </td>
   178           <td>conventional railway</td>
   291           <td align=left>in the X direction</td>
   179          </tr>
   292          </tr>
   180 
   293 
   181          <tr>
   294          <tr>
   182           <td><tt>1</tt>&nbsp; </td>
   295           <td nowrap valign=top>bit 1: </td>
   183           <td>electrified railway</td>
   296           <td align=left>in the Y direction</td>
   184          </tr>
   297          </tr>
   185 
   298 
   186          <tr>
   299          <tr>
   187           <td><tt>2</tt>&nbsp; </td>
   300           <td nowrap valign=top>bit 2: </td>
   188           <td>monorail</td>
   301           <td align=left>in the north corner (direction W-E)</td>
   189          </tr>
   302          </tr>
   190 
   303 
   191          <tr>
   304          <tr>
   192           <td><tt>3</tt>&nbsp; </td>
   305           <td nowrap valign=top>bit 3: </td>
   193           <td>maglev</td>
   306           <td align=left>in the south corner (direction W-E)</td>
       
   307          </tr>
       
   308 
       
   309          <tr>
       
   310           <td nowrap valign=top>bit 4: </td>
       
   311           <td align=left>in the west corner (direction N-S)</td>
       
   312          </tr>
       
   313 
       
   314          <tr>
       
   315           <td nowrap valign=top>bit 5: </td>
       
   316           <td align=left>in the east corner (direction N-S)</td>
   194          </tr>
   317          </tr>
   195         </table>
   318         </table>
   196        </li>
   319        </li>
   197        <li>m4 bits 3..0:
   320        <li>m5 bit 6 set = with signals:<BR>
       
   321         There are at most 4 signals on a tile. The signals 0..3 belong to the directions:
   198         <table>
   322         <table>
   199          <tr>
   323          <tr>
   200           <td nowrap valign=top><tt>0</tt>&nbsp; </td>
   324           <td></td>
   201           <td align=left>on bare land</td>
   325           <td>Track <tt>0</tt> (X)&nbsp;</td>
   202          </tr>
   326           <td>Track <tt>1</tt> (Y)&nbsp;</td>
   203 
   327           <td>Track <tt>2</tt> (north)&nbsp;</td>
   204          <tr>
   328           <td>Track <tt>3</tt> (south)&nbsp;</td>
   205           <td nowrap valign=top><tt>1</tt>&nbsp; </td>
   329           <td>Track <tt>4</tt> (west)&nbsp;</td>
   206           <td align=left>on grass, no fences</td>
   330           <td>Track <tt>5</tt> (east)</td>
   207          </tr>
   331          </tr>
   208 
   332 
   209          <tr>
   333          <tr>
   210           <td nowrap valign=top><tt>2</tt>&nbsp; </td>
   334           <td align=left>Signal <tt>0</tt>&nbsp;</td>
   211           <td align=left>fence on the NW side</td>
   335           <td></td>
   212          </tr>
   336           <td></td>
   213 
   337           <td></td>
   214          <tr>
   338           <td>west</td>
   215           <td nowrap valign=top><tt>3</tt>&nbsp; </td>
   339           <td></td>
   216           <td align=left>fence on the SE side</td>
   340           <td>south</td>
   217          </tr>
   341          </tr>
   218 
   342 
   219          <tr>
   343          <tr>
   220           <td nowrap valign=top><tt>4</tt>&nbsp; </td>
   344           <td align=left>Signal <tt>1</tt>&nbsp;</td>
   221           <td align=left>fences on the NW and SE sides</td>
   345           <td></td>
   222          </tr>
   346           <td></td>
   223 
   347           <td></td>
   224          <tr>
   348           <td>east</td>
   225           <td nowrap valign=top><tt>5</tt>&nbsp; </td>
   349           <td></td>
   226           <td align=left>fence on the NE side</td>
   350           <td>north</td>
   227          </tr>
   351          </tr>
   228 
   352 
   229          <tr>
   353          <tr>
   230           <td nowrap valign=top><tt>6</tt>&nbsp; </td>
   354           <td align=left>Signal <tt>2</tt>&nbsp;</td>
   231           <td align=left>fence on the SW side</td>
   355           <td>south-west</td>
   232          </tr>
   356           <td>north-west</td>
   233 
   357           <td>west</td>
   234          <tr>
   358           <td></td>
   235           <td nowrap valign=top><tt>7</tt>&nbsp; </td>
   359           <td>south</td>
   236           <td align=left>fences on the NE and SW sides</td>
   360           <td></td>
   237          </tr>
   361          </tr>
   238 
   362 
   239          <tr>
   363          <tr>
   240           <td nowrap valign=top><tt>8</tt>&nbsp; </td>
   364           <td align=left>Signal <tt>3</tt>&nbsp;</td>
   241           <td align=left>fence on the E side (track in the W corner)</td>
   365           <td>north-east</td>
   242          </tr>
   366           <td>south-east</td>
   243 
   367           <td>east</td>
   244          <tr>
   368           <td></td>
   245           <td nowrap valign=top><tt>9</tt>&nbsp; </td>
   369           <td>north</td>
   246           <td align=left>fence on the W side (track in the E corner)</td>
   370           <td></td>
   247          </tr>
       
   248 
       
   249          <tr>
       
   250           <td nowrap valign=top><tt>A</tt>&nbsp; </td>
       
   251           <td align=left>fence on the S side (track in the N corner)</td>
       
   252          </tr>
       
   253 
       
   254          <tr>
       
   255           <td nowrap valign=top><tt>B</tt>&nbsp; </td>
       
   256           <td align=left>fence on the N side (track in the S corner)</td>
       
   257          </tr>
       
   258 
       
   259          <tr>
       
   260           <td nowrap valign=top><tt>C</tt>&nbsp; </td>
       
   261           <td align=left>on snow or desert</td>
       
   262          </tr>
       
   263 
       
   264          <tr>
       
   265           <td nowrap valign=top><tt>D</tt>&nbsp; </td>
       
   266           <td align=left>on grass with fence and water on the lower halftile</td>
       
   267          </tr>
   371          </tr>
   268         </table>
   372         </table>
       
   373         <ul>
       
   374          <li>m2 bit 6: Signal 0 and 1: set = semaphore signals, clear = light signals</li>
       
   375          <li>m2 bit 2: Signal 2 and 3: set = semaphore signals, clear = light signals</li>
       
   376          <li>m2 bits 5..4: type of signal 0 and 1 (same values as m2 bits 1..0)</li>
       
   377          <li>m2 bits 1..0: type of signal 2 and 3
       
   378           <table>
       
   379            <tr>
       
   380             <td nowrap="nowrap" valign="top"><tt>00</tt>: </td>
       
   381             <td align="left">normal signals</td>
       
   382            </tr>
       
   383 
       
   384            <tr>
       
   385             <td nowrap="nowrap" valign="top"><tt>01</tt>: </td>
       
   386             <td align="left">pre-signals</td>
       
   387            </tr>
       
   388 
       
   389            <tr>
       
   390             <td nowrap="nowrap" valign="top"><tt>10</tt>: </td>
       
   391             <td align="left">exit-signals</td>
       
   392            </tr>
       
   393 
       
   394            <tr>
       
   395             <td nowrap="nowrap" valign="top"><tt>11</tt>: </td>
       
   396             <td align="left">combo-signals</td>
       
   397            </tr>
       
   398           </table>
       
   399          </li>
       
   400 
       
   401          <li>m3 bits 7..4: bit set = signal 3..0 present</li>
       
   402          <li>m4 bits 7..4: bit clear = signal 3..0 shows red</li>
       
   403         </ul>
   269        </li>
   404        </li>
   270        <li>m5 bits 5..0: track layout: bit set = track present:
   405       </ul>
       
   406      </li>
       
   407      <li>m5 bit 7 set, bit 6 clear: checkpoint
       
   408       <ul>
       
   409        <li>m2: index into the array of waypoints.</li>
       
   410        <li>m5 bit 0:
   271         <table>
   411         <table>
   272          <tr>
   412          <tr>
   273           <td nowrap valign=top>bit 0: </td>
   413           <td><tt>0</tt>&nbsp; </td>
   274           <td align=left>in the X direction</td>
   414           <td>in X direction</td>
   275          </tr>
   415          </tr>
   276 
   416 
   277          <tr>
   417          <tr>
   278           <td nowrap valign=top>bit 1: </td>
   418           <td><tt>1</tt>&nbsp; </td>
   279           <td align=left>in the Y direction</td>
   419           <td>in Y direction</td>
   280          </tr>
       
   281 
       
   282          <tr>
       
   283           <td nowrap valign=top>bit 2: </td>
       
   284           <td align=left>in the north corner (direction W-E)</td>
       
   285          </tr>
       
   286 
       
   287          <tr>
       
   288           <td nowrap valign=top>bit 3: </td>
       
   289           <td align=left>in the south corner (direction W-E)</td>
       
   290          </tr>
       
   291 
       
   292          <tr>
       
   293           <td nowrap valign=top>bit 4: </td>
       
   294           <td align=left>in the west corner (direction N-S)</td>
       
   295          </tr>
       
   296 
       
   297          <tr>
       
   298           <td nowrap valign=top>bit 5: </td>
       
   299           <td align=left>in the east corner (direction N-S)</td>
       
   300          </tr>
   420          </tr>
   301         </table>
   421         </table>
   302        </li>
   422        </li>
   303       </ul>
   423       </ul>
   304      </li>
   424      </li>
   305      <li>m5 bit 7 set: railway depot / checkpoints
   425      <li>m5 bit 7 set, bit 6 set: railway depot
   306       <ul>
   426       <ul>
   307        <li>m1: <a href="#OwnershipInfo">owner</a> of the depot / checkpoint</li>
   427        <li>m5 bits 1..0: exit towards
   308        <li>m2: For waypoints, index into the array of waypoints.</li>
       
   309        <li>m3 bits 3..0 = <a href="#TrackType">track type</a></li>
       
   310        <li>m4 bits 3..0 = ground type, as per m4 bits 3..0 for railway tiles.</li>
       
   311        <li>m5 value C0..C3: railway depot
       
   312         <table>
   428         <table>
   313          <tr>
   429          <tr>
   314           <td colspan=2>m5 bits 1..0</td>
   430           <td><tt>0</tt>&nbsp; </td>
   315          </tr>
       
   316 
       
   317          <tr>
       
   318           <td colspan=2>direction: exit towards:</td>
       
   319          </tr>
       
   320 
       
   321          <tr>
       
   322           <td><tt>00</tt>&nbsp; </td>
       
   323           <td>NE</td>
   431           <td>NE</td>
   324          </tr>
   432          </tr>
   325 
   433 
   326          <tr>
   434          <tr>
   327           <td><tt>01</tt>&nbsp; </td>
   435           <td><tt>1</tt>&nbsp; </td>
   328           <td>SE</td>
   436           <td>SE</td>
   329          </tr>
   437          </tr>
   330 
   438 
   331          <tr>
   439          <tr>
   332           <td><tt>02</tt>&nbsp; </td>
   440           <td><tt>2</tt>&nbsp; </td>
   333           <td>SW</td>
   441           <td>SW</td>
   334          </tr>
   442          </tr>
   335 
   443 
   336          <tr>
   444          <tr>
   337           <td><tt>03</tt>&nbsp; </td>
   445           <td><tt>3</tt>&nbsp; </td>
   338           <td>NW</td>
   446           <td>NW</td>
   339          </tr>
       
   340         </table>
       
   341        </li>
       
   342        <li>m5 value 80..81: checkpoint
       
   343         <table>
       
   344          <tr>
       
   345           <td colspan=2>bit 0</td>
       
   346          </tr>
       
   347 
       
   348          <tr>
       
   349           <td>clear</td>
       
   350           <td>in X direction</td>
       
   351          </tr>
       
   352 
       
   353          <tr>
       
   354           <td>set</td>
       
   355           <td>in Y direction</td>
       
   356          </tr>
   447          </tr>
   357         </table>
   448         </table>
   358        </li>
   449        </li>
   359       </ul>
   450       </ul>
   360     </li>
   451      </li>
   361     <li>m5 bit 6 set = with signals:
   452      <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li>
   362      <ul>
   453      <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
   363       <li>m4 bits 7..4: bit clear = signal shows red; same bits as in m3</li>
   454     </ul>
   364       <li>m2 bit 2 <i>(6)</i>: set = semaphore signals, clear = light signals <i>(lower and right tracks)</i></li>
   455    </td>
   365       <li>m2 bits 1..0 <i>(5..4)</i>: type of signal <i>(lower and right tracks)</i>
   456   </tr>
   366        <table>
   457 
   367          <tr>
   458   <tr bgcolor="#CCCCCC">
   368           <td nowrap="nowrap" valign="top"><tt>00</tt>: </td>
   459    <td valign=top nowrap><strong><a name="Class2"><tt> 2</tt></a></strong></td>
   369           <td align="left">normal signals</td>
   460    <td><strong>Roads</strong></td>
   370          </tr>
   461   </tr>
   371 
   462   <tr>
   372          <tr>
   463    <td valign=top nowrap>&nbsp;</td>
   373           <td nowrap="nowrap" valign="top"><tt>01</tt>: </td>
   464    <td>
   374           <td align="left">pre-signals</td>
   465     <ul>
   375          </tr>
   466      <li>m3 bit 7 set = on snow or desert</li>
   376 
   467      <li>m7 bits 7..5: present road types
   377          <tr>
   468       <table>
   378           <td nowrap="nowrap" valign="top"><tt>10</tt>: </td>
   469        <tr>
   379           <td align="left">exit-signals</td>
   470         <td>bit 0&nbsp; </td>
   380          </tr>
   471         <td>normal road</td>
   381 
   472        </tr>
   382          <tr>
   473 
   383           <td nowrap="nowrap" valign="top"><tt>11</tt>: </td>
   474        <tr>
   384           <td align="left">combo-signals</td>
   475         <td>bit 1&nbsp; </td>
       
   476         <td>tram</td>
       
   477        </tr>
       
   478 
       
   479        <tr>
       
   480         <td>bit 2&nbsp; </td>
       
   481         <td>reserved</td>
       
   482        </tr>
       
   483       </table>
       
   484      </li>
       
   485      <li>m5 bits 7 clear: road or level-crossing
       
   486       <ul>
       
   487        <li>m2: Index into the array of towns, 0 for non-town roads</li>
       
   488        <li>m3 bits 6..4:
       
   489         <table>
       
   490          <tr>
       
   491           <td><tt>0</tt>&nbsp; </td>
       
   492           <td>on bare land</td>
       
   493          </tr>
       
   494          <tr>
       
   495           <td><tt>1</tt>&nbsp; </td>
       
   496           <td>on grass</td>
       
   497          </tr>
       
   498          <tr>
       
   499           <td><tt>2</tt>&nbsp; </td>
       
   500           <td>paved</td>
       
   501          </tr>
       
   502          <tr>
       
   503           <td><tt>3</tt>&nbsp; </td>
       
   504           <td>with streetlights</td>
       
   505          </tr>
       
   506          <tr>
       
   507           <td><tt>5</tt>&nbsp; </td>
       
   508           <td>tree-lined</td>
       
   509          </tr>
       
   510          <tr>
       
   511           <td><tt>6</tt>&nbsp; </td>
       
   512           <td>on grass with road works</td>
       
   513          </tr>
       
   514          <tr>
       
   515           <td><tt>7</tt>&nbsp; </td>
       
   516           <td>paved with road works</td>
   385          </tr>
   517          </tr>
   386         </table>
   518         </table>
   387        </li>
   519        </li>
   388 
   520        <li>m5 bits 3..0: <a href="#OwnershipInfo">owner</a> of road type 1 (tram); OWNER_NONE (<tt>10</tt>) is stored as OWNER_TOWN (<tt>0F</tt>)
   389        <li>m3 bits 7..4: bit set = signal present:
   521        <li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road type 2 (reserved)
       
   522        <li>m5 bit 6 clear: road
   390         <ul>
   523         <ul>
   391          <li>For track in the X direction:
   524          <li>m1: <a href="#OwnershipInfo">owner</a> of the road type 0 (normal road)</li>
       
   525          <li>m3 bits 3..0: counter for the roadworks</li>
       
   526          <li>m4 bits 3..0: road layout road type 0 (normal road): bit set = road piece present:
   392           <table>
   527           <table>
   393            <tr>
   528            <tr>
   394             <td nowrap="nowrap" valign="top">bit 6: </td>
   529             <td align=left>bit 0: </td>
   395             <td align="left">signal in the SW direction</td>
   530             <td>NW piece</td>
   396            </tr>
   531            </tr>
   397 
       
   398            <tr>
   532            <tr>
   399             <td nowrap="nowrap" valign="top">bit 7: </td>
   533             <td align=left>bit 1: </td>
   400             <td align="left">signal in the NE direction</td>
   534             <td>SW piece</td>
       
   535            </tr>
       
   536            <tr>
       
   537             <td align=left>bit 2: </td>
       
   538             <td>SE piece</td>
       
   539            </tr>
       
   540            <tr>
       
   541             <td align=left>bit 3: </td>
       
   542             <td>NE piece</td>
   401            </tr>
   543            </tr>
   402           </table>
   544           </table>
   403          </li>
   545          </li>
   404 
   546          <li>m4 bits 7..4: road layout road type 1 (tram)</li>
   405          <li>For track in the Y direction:
   547          <li>m6 bits 5..2: road layout road type 2 (reserved)</li>
       
   548          <li>m5 bits 5..4: bits to disallow vehicles to go a specific direction
   406           <table>
   549           <table>
   407            <tr>
   550            <tr>
   408             <td nowrap="nowrap" valign="top">bit 6: </td>
   551             <td align=left>bit 0: </td>
   409             <td align="left">signal in the NW direction</td>
   552             <td>set = disallow driving in south-west or south-east direction</td>
   410            </tr>
       
   411 
       
   412            <tr>
       
   413             <td nowrap="nowrap" valign="top">bit 7: </td>
       
   414             <td align="left">signal in the SE direction</td>
       
   415            </tr>
       
   416           </table>
       
   417          </li>
       
   418 
       
   419          <li>For tracks in the W-E direction:
       
   420           <table>
       
   421            <tr>
       
   422             <td nowrap="nowrap" valign="top">bit 4: </td>
       
   423             <td align="left">signal in the W direction on the track in the S corner</td>
       
   424            </tr>
       
   425 
       
   426            <tr>
       
   427             <td nowrap="nowrap" valign="top">bit 5: </td>
       
   428             <td align="left">signal in the E direction on the track in the S corner</td>
       
   429            </tr>
       
   430 
       
   431            <tr>
       
   432             <td nowrap="nowrap" valign="top">bit 6: </td>
       
   433             <td align="left">signal in the W direction on the track in the N corner</td>
       
   434            </tr>
   553            </tr>
   435            <tr>
   554            <tr>
   436             <td nowrap="nowrap" valign="top">bit 7: </td>
   555             <td align=left>bit 1: </td>
   437             <td align="left">signal in the E direction on the track in the N corner</td>
   556             <td>set = disallow driving in north-west or north-east direction</td>
   438            </tr>
       
   439           </table>
       
   440          </li>
       
   441 
       
   442          <li>For tracks in the N-S direction:
       
   443           <table>
       
   444            <tr>
       
   445             <td nowrap="nowrap" valign="top">bit 4: </td>
       
   446             <td align="left">signal in the S direction on the track in the E corner</td>
       
   447            </tr>
       
   448 
       
   449            <tr>
       
   450             <td nowrap="nowrap" valign="top">bit 5: </td>
       
   451             <td align="left">signal in the N direction on the track in the E corner</td>
       
   452            </tr>
       
   453 
       
   454            <tr>
       
   455             <td nowrap="nowrap" valign="top">bit 6: </td>
       
   456             <td align="left">signal in the S direction on the track in the W corner</td>
       
   457            </tr>
       
   458 
       
   459            <tr>
       
   460             <td nowrap="nowrap" valign="top">bit 7: </td>
       
   461             <td align="left">signal in the N direction on the track in the W corner</td>
       
   462            </tr>
   557            </tr>
   463           </table>
   558           </table>
   464          </li>
   559          </li>
   465         </ul>
   560         </ul>
   466        </li>
   561        </li>
   467       </ul>
   562        <li>m5 bit 6 set: level crossing
   468      </li>
   563         <ul>
   469      <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li>
   564          <li>m1: <a href="#OwnershipInfo">owner</a> of the railway track</li>
   470      <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
   565          <li>m3 bits 3..0: <a href="#TrackType">railway track type</a></li>
   471     </ul>
   566          <li>m4 bit 6: direction
   472    </td>
   567           <table>
   473   </tr>
   568            <tr>
   474 
   569             <td align=left><tt>0</tt>&nbsp; </td>
   475   <tr bgcolor="#CCCCCC">
   570             <td align=left>road in the X direction, rail in Y</td>
   476    <td valign=top nowrap><strong><a name="Class2"><tt> 2</tt></a></strong></td>
   571            </tr>
   477    <td><strong>Roads</strong></td>
   572            <tr>
   478   </tr>
   573             <td align=left><tt>1</tt>&nbsp; </td>
   479   <tr>
   574             <td align=left>road in the Y direction, rail in X</td>
   480    <td valign=top nowrap>&nbsp;</td>
   575            </tr>
   481    <td>
   576           </table>
   482     <ul>
   577          </li>
   483      <li>m5 bits 7..6 clear: road
   578           <li>m4 bit 5: set if crossing lights are on</li>
   484       <ul>
   579          <li>m4 bits 4..0: <a href="#OwnershipInfo">owner</a> of the road type 0 (normal road)</li>
   485        <li>m1: <a href="#OwnershipInfo">owner</a> of the road type #1</li>
   580         </ul>
   486        <li>m2: Index into the array of towns, 0 for non-town roads</li>
       
   487        <li>m3 bit 7 set = on snow or desert</li>
       
   488        <li>m3 bits 6..4:
       
   489         <table>
       
   490          <tr>
       
   491           <td><tt>0</tt>&nbsp; </td>
       
   492           <td>on bare land</td>
       
   493          </tr>
       
   494          <tr>
       
   495           <td><tt>1</tt>&nbsp; </td>
       
   496           <td>on grass</td>
       
   497          </tr>
       
   498          <tr>
       
   499           <td><tt>2</tt>&nbsp; </td>
       
   500           <td>paved</td>
       
   501          </tr>
       
   502          <tr>
       
   503           <td><tt>3</tt>&nbsp; </td>
       
   504           <td>with streetlights</td>
       
   505          </tr>
       
   506          <tr>
       
   507           <td><tt>5</tt>&nbsp; </td>
       
   508           <td>tree-lined</td>
       
   509          </tr>
       
   510          <tr>
       
   511           <td><tt>6</tt>&nbsp; </td>
       
   512           <td>on grass with road works</td>
       
   513          </tr>
       
   514          <tr>
       
   515           <td><tt>7</tt>&nbsp; </td>
       
   516           <td>paved with road works</td>
       
   517          </tr>
       
   518         </table>
       
   519        </li>
       
   520        <li>m3 bits 3..0: counter for the roadworks</li>
       
   521        <li>m4 bits 3..0: road layout road type #1: bit set = road piece present:
       
   522         <table>
       
   523          <tr>
       
   524           <td nowrap valign=top>bit 0: </td>
       
   525           <td align=left>NW piece</td>
       
   526          </tr>
       
   527          <tr>
       
   528           <td nowrap valign=top>bit 1: </td>
       
   529           <td align=left>SW piece</td>
       
   530          </tr>
       
   531          <tr>
       
   532           <td nowrap valign=top>bit 2: </td>
       
   533           <td align=left>SE piece</td>
       
   534          </tr>
       
   535          <tr>
       
   536           <td nowrap valign=top>bit 3: </td>
       
   537           <td align=left>NE piece</td>
       
   538          </tr>
       
   539         </table>
       
   540        </li>
       
   541        <li>m4 bits 7..4: road layout road type #2
       
   542        <li>m5 bits 5..4: bits to disallow vehicles to go a specific direction
       
   543        <li>m5 bits 3..0: owner of road type #2
       
   544        <li>m6 bits 5..2: road layout road type #3
       
   545        <li>m7 bits 7..5: road types
       
   546        <li>m7 bits 4..0: owner of road type #3
       
   547        </li>
   581        </li>
   548       </ul>
   582       </ul>
   549      </li>
   583      </li>
   550      <li>m5 bit 7 set, bit 6 clear: road depot
   584      <li>m5 bit 7 set, bit 6 clear: road depot
   551       <ul>
   585       <ul>
   552        <li>m1: <a href="#OwnershipInfo">owner</a> of the depot</li>
   586        <li>m1: <a href="#OwnershipInfo">owner</a> of the depot</li>
   553        <li>m3 bit 7 set = on snow or desert (not displayed, but set internally)</li>
   587        <li>m5 bits 3..0: exit towards:
   554        <li>m5 bits 3..0 - direction: exit towards: <tt>0</tt> = NE, <tt>1</tt> = SE, <tt>2</tt> = SW, <tt>3</tt> = NW</li>
   588         <table>
   555        <li>m7 bits 7..5: road types
   589          <tr>
   556       </ul>
   590           <td><tt>0</tt>&nbsp; </td>
   557      </li>
   591           <td>NE</td>
   558      <li>m5 bit 6 set, bit 7 clear: level crossing
   592          </tr>
   559       <ul>
   593 
   560        <li>m1: <a href="#OwnershipInfo">owner</a> of the railway track</li>
   594          <tr>
   561        <li>m2: Index into the array of towns, 0 for non-town roads</li>
   595           <td><tt>1</tt>&nbsp; </td>
   562        <li>m3 bit 7 set = on snow or desert</li>
   596           <td>SE</td>
   563        <li>m3 bits 6..4: <tt>0</tt> - on bare land, <tt>1</tt> - on grass, <tt>2</tt> or higher - paved</li>
   597          </tr>
   564        <li>m3 bits 3..0: <a href="#TrackType">track type</a></li>
   598 
   565        <li>m4 bit 6: clear - road in the X direction, set - road in the Y direction (railway track always perpendicular)</li>
   599          <tr>
   566        <li>m4 bit 5: set if crossing lights are on</li>
   600           <td><tt>2</tt>&nbsp; </td>
   567        <li>m4 bits 4..0: <a href="#OwnershipInfo">owner</a> of the road type #1</li>
   601           <td>SW</td>
   568        <li>m5 bits 3..0: owner of road type #2
   602          </tr>
   569        <li>m7 bits 7..5: road types
   603 
   570        <li>m7 bits 4..0: owner of road type #3
   604          <tr>
       
   605           <td><tt>3</tt>&nbsp; </td>
       
   606           <td>NW</td>
       
   607          </tr>
       
   608         </table>
       
   609        </li>
   571       </ul>
   610       </ul>
   572      </li>
   611      </li>
   573      <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li>
   612      <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li>
   574      <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
   613      <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
   575     </ul>
   614     </ul>
   583   <tr>
   622   <tr>
   584    <td valign=top nowrap>&nbsp;</td>
   623    <td valign=top nowrap>&nbsp;</td>
   585    <td>
   624    <td>
   586     <ul>
   625     <ul>
   587      <li>m1 : Random bits <a href="#newhouses">(newhouses)</a> </li>
   626      <li>m1 : Random bits <a href="#newhouses">(newhouses)</a> </li>
   588      <li>m2 : index into the array of industries</li>
   627      <li>m2 : index into the array of towns</li>
   589      <li>m3 bit 7 :
   628      <li>m3 bit 7 :
   590       <ul>
   629       <ul>
   591        <li> set : House is complete
   630        <li> set : House is complete
   592         <ul>
   631         <ul>
   593          <li>m5 : age of House. Maximum been 255, which means 255 years and more</li>
   632          <li>m5 : year of house construction (relative to 1920); clamped to 0..255 (1920..2175)</li>
   594         </ul>
   633         </ul>
   595        </li>
   634        </li>
   596        <li> clear : House is in construction
   635        <li> clear : House is in construction
   597         <ul>
   636         <ul>
   598          <li>m5 bits 7..5 : free</li>
   637          <li>m5 bits 7..5 : free</li>
   599          <li>m5 bits 4..3 : construction stage</li>
   638          <li>m5 bits 4..3 : construction stage</li>
   600          <li>m5 bits 2..0 : construction counter</li>
   639          <li>m5 bits 2..0 : construction counter</li>
   601         </ul>
   640         </ul>
   602        </li>
   641        </li>
   603       </ul>
   642       </ul>
   604      <li>m3 bit 6 : 9th bit of house type (m4), allowing 512 different types.</li>
   643      <li>m3 bit 6 : bit 8 of house type (m4), allowing 512 different types.</li>
   605      <li>m3 bits 5..0 : triggers activated <a href="#newhouses">(newhouses)</a></li>
   644      <li>m3 bits 4..0 : triggers activated <a href="#newhouses">(newhouses)</a></li>
   606      <li>m4 : <a href="landscape_externals.html">town building type</a> (with m3[6] bit)</li>
   645      <li>m4 : <a href="landscape_externals.html">town building type</a> (with m3[6] bit)</li>
   607      <li>m5 : see m3 bit 7</li>
   646      <li>m5 : see m3 bit 7</li>
   608      <li>m6 :
   647      <li>m6 :
   609       <ul>
   648       <ul>
   610        <li>If <a href="#newhouses">newhouses</a> is activated
   649        <li>If <a href="#newhouses">newhouses</a> is activated
   655   <tr>
   694   <tr>
   656    <td valign=top nowrap>&nbsp;</td>
   695    <td valign=top nowrap>&nbsp;</td>
   657    <td>
   696    <td>
   658     <ul>
   697     <ul>
   659      <li>m1: <a href="#OwnershipInfo">owner</a> (normally <tt>10</tt>)</li>
   698      <li>m1: <a href="#OwnershipInfo">owner</a> (normally <tt>10</tt>)</li>
   660      <li>m2 bits 5..4:
   699      <li>m2 bits 7..6: ground density
       
   700      <li>m2 bits 5..4: ground
   661       <table>
   701       <table>
   662 
   702 
   663        <tr>
   703        <tr>
   664         <td nowrap valign=top><tt>0</tt>&nbsp; </td>
   704         <td align=left><tt>0</tt>&nbsp; </td>
   665         <td align=left>on grass</td>
   705         <td>on grass</td>
   666        </tr>
   706        </tr>
   667 
   707 
   668        <tr>
   708        <tr>
   669         <td nowrap valign=top><tt>1</tt>&nbsp; </td>
   709         <td align=left><tt>1</tt>&nbsp; </td>
   670         <td align=left>on rough land</td>
   710         <td>on rough land (density must be 3)</td>
   671        </tr>
   711        </tr>
   672 
   712 
   673        <tr>
   713        <tr>
   674         <td nowrap valign=top><tt>2</tt>&nbsp; </td>
   714         <td align=left><tt>2</tt>&nbsp; </td>
   675         <td align=left>on snow or desert; m2 bits 7..6 - amount of snow or desert (for desert always set to 3 in TTD)</td>
   715         <td>on snow or desert</td>
       
   716        </tr>
       
   717 
       
   718        <tr>
       
   719         <td align=left><tt>3</tt>&nbsp; </td>
       
   720         <td>on shore (density must be 3)</td>
   676        </tr>
   721        </tr>
   677       </table>
   722       </table>
   678      </li>
   723      </li>
   679      <li>m2 bits 3..0: update counter, incremented on every periodic processing.<br>
   724      <li>m2 bits 3..0: update counter, incremented on every periodic processing.<br>
   680           on wraparound the growth status is updated (or, if it's <tt>3</tt>, a random action is taken)</li>
   725           on wraparound the growth status is updated (or, if it's <tt>3</tt>, a random action is taken)</li>
   745    <td>
   790    <td>
   746     <ul>
   791     <ul>
   747      <li>m1: <a href="#OwnershipInfo">owner</a> of the station</li>
   792      <li>m1: <a href="#OwnershipInfo">owner</a> of the station</li>
   748      <li>m2: index into the array of stations</li>
   793      <li>m2: index into the array of stations</li>
   749      <li>m3 bits 7..4: persistent random data for newstations</li>
   794      <li>m3 bits 7..4: persistent random data for newstations</li>
   750      <li>m3 bits 3..0: <a href="#TrackType">track type</a> for railway stations, must be 0 for all the other stations</li>
   795      <li>m3 bits 3..0: <a href="#TrackType">track type</a> for railway stations</li>
       
   796      <li>m3 bits 2..0: present road types for road stops</li>
       
   797      <li>m3 bits 1..0: water class for buoys and water part of docks</li>
   751      <li>m4: custom station id; 0 means standard graphics</li>
   798      <li>m4: custom station id; 0 means standard graphics</li>
   752      <li>m5: graphics index (range from 0..255 for each station type):
   799      <li>m5: graphics index (range from 0..255 for each station type):
   753       <table>
   800       <table>
   754        <tr>
   801        <tr>
   755         <td nowrap valign=top><tt>00</tt>..<tt>07</tt>&nbsp; </td>
   802         <td nowrap valign=top><tt>00</tt>..<tt>07</tt>&nbsp; </td>
   778         <td nowrap valign=top><tt>00</tt>..<tt>8F</tt></td>
   825         <td nowrap valign=top><tt>00</tt>..<tt>8F</tt></td>
   779         <td align=left>all airports</td>
   826         <td align=left>all airports</td>
   780        </tr>
   827        </tr>
   781 
   828 
   782        <tr>
   829        <tr>
   783         <td nowrap valign=top><tt>00</tt>..<tt>03</tt>&nbsp; </td>
   830         <td nowrap valign=top><tt>00</tt>..<tt>05</tt>&nbsp; </td>
   784         <td align=left>lorry loading area/truck station : exit towards:
   831         <td align=left>road stops:
   785          <table>
   832          <table>
   786           <tr>
   833           <tr>
   787            <td><tt>00</tt>&nbsp; </td>
   834            <td><tt>00</tt>&nbsp; </td>
   788            <td align=left>NE</td>
   835            <td align=left>exit towards NE</td>
   789           </tr>
   836           </tr>
   790           <tr>
   837           <tr>
   791            <td><tt>01</tt>&nbsp; </td>
   838            <td><tt>01</tt>&nbsp; </td>
   792            <td align=left>SE</td>
   839            <td align=left>exit towards SE</td>
   793           </tr>
   840           </tr>
   794           <tr>
   841           <tr>
   795            <td><tt>02</tt>&nbsp; </td>
   842            <td><tt>02</tt>&nbsp; </td>
   796            <td align=left>SW</td>
   843            <td align=left>exit towards SW</td>
   797           </tr>
   844           </tr>
   798           <tr>
   845           <tr>
   799            <td><tt>03</tt>&nbsp; </td>
   846            <td><tt>03</tt>&nbsp; </td>
   800            <td align=left>NW</td>
   847            <td align=left>exit towards NW</td>
       
   848           </tr>
       
   849           <tr>
       
   850            <td><tt>04</tt>&nbsp; </td>
       
   851            <td align=left>drive through X</td>
       
   852           </tr>
       
   853           <tr>
       
   854            <td><tt>05</tt>&nbsp; </td>
       
   855            <td align=left>drive through Y</td>
   801           </tr>
   856           </tr>
   802          </table>
   857          </table>
   803         </td>
   858         </td>
   804        </tr>
   859        </tr>
   805 
   860 
   835         </td>
   890         </td>
   836        </tr>
   891        </tr>
   837       </table>
   892       </table>
   838      </li>
   893      </li>
   839      <li>m6 bit 7: 1 when newstation is an fsmport, otherwise 0</li>
   894      <li>m6 bit 7: 1 when newstation is an fsmport, otherwise 0</li>
   840      <li>m6 bits 3..5: the station type (rail, airport, truck, bus, oilrig, dock, buoy)</li>
   895      <li>m6 bits 5..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy)</li>
   841      <li>m6 bit 2: 1 when a drive through road stop is built over a town owned road, otherwise 0</li>
   896      <li>m6 bit 2: 1 when a drive through road stop is built over a town owned road, otherwise 0</li>
   842      <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
   897      <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
   843     </ul>
   898     </ul>
   844    </td>
   899    </td>
   845   </tr>
   900   </tr>
   850   </tr>
   905   </tr>
   851   <tr>
   906   <tr>
   852    <td valign=top nowrap>&nbsp;</td>
   907    <td valign=top nowrap>&nbsp;</td>
   853    <td>
   908    <td>
   854     <ul>
   909     <ul>
   855      <li>m1: <a href="#OwnershipInfo">owner</a> (for water and coasts normally <tt>11</tt>)</li>
   910      <li>m1: <a href="#OwnershipInfo">owner</a> (for sea, rivers, and coasts normally <tt>11</tt>)</li>
       
   911      <li>m3 bits 1..0 : Water class (sea, canal or river)
       
   912      <li>m4: Owner of the water when ship depot</li>
       
   913      <li>m4: Random data for canal or river tiles</li>
   856      <li>m5: tile type:
   914      <li>m5: tile type:
   857       <table>
   915       <table>
   858        <tr>
   916        <tr>
   859         <td nowrap valign=top><tt>00</tt>&nbsp; </td>
   917         <td nowrap valign=top><tt>00</tt>&nbsp; </td>
   860         <td align=left>water</td>
   918         <td align=left>water, canal or river</td>
   861        </tr>
   919        </tr>
   862 
   920 
   863        <tr>
   921        <tr>
   864         <td nowrap valign=top><tt>01</tt>&nbsp; </td>
   922         <td nowrap valign=top><tt>01</tt>&nbsp; </td>
   865         <td align=left>coast or riverbank</td>
   923         <td align=left>coast or riverbank</td>
   866        </tr>
   924        </tr>
   867 
   925 
   868        <tr>
   926        <tr>
   869         <td noswap valign=top><tt>02</tt>&nbsp; </td>
       
   870         <td align=left>river</td>
       
   871        </tr>
       
   872 
       
   873        <tr>
       
   874         <td nowrap valign=top><tt>10</tt>..<tt>1B</tt>&nbsp; </td>
   927         <td nowrap valign=top><tt>10</tt>..<tt>1B</tt>&nbsp; </td>
   875         <td align=left>canal locks
   928         <td align=left>canal locks
   876          <table>
   929          <table>
   877           <tr>
   930           <tr>
   878            <td nowrap valign=top><tt>10</tt>&nbsp; </td>
   931            <td nowrap valign=top><tt>10</tt>&nbsp; </td>
   949          </table>
  1002          </table>
   950         </td>
  1003         </td>
   951        </tr>
  1004        </tr>
   952       </table>
  1005       </table>
   953      </li>
  1006      </li>
   954      <li>m4: Owner of the water when ship depot</li>
       
   955      <li>m4: Random data for canal or river tiles</li>
       
   956      <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li>
  1007      <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li>
   957      <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
  1008      <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
   958     </ul>
  1009     </ul>
   959    </td>
  1010    </td>
   960   </tr>
  1011   </tr>
   978    <td valign=top nowrap>&nbsp;</td>
  1029    <td valign=top nowrap>&nbsp;</td>
   979    <td>
  1030    <td>
   980     <ul>
  1031     <ul>
   981      <li>m1 bit 7: clear = under construction
  1032      <li>m1 bit 7: clear = under construction
   982       <ul>
  1033       <ul>
   983        <li>m1 bits 4..2: construction counter, for buildings under construction incremented on every periodic tile processing</li>
  1034        <li>m1 bits 3..2: construction counter, for buildings under construction incremented on every periodic tile processing</li>
   984        <li>m1 bits 1..0: stage of construction (<tt>3</tt> = completed), incremented when the construction counter wraps around<br>
  1035        <li>m1 bits 1..0: stage of construction (<tt>3</tt> = completed), incremented when the construction counter wraps around<br>
   985            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>
  1036            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>
   986       </ul>
  1037       </ul>
   987      </li>
  1038      </li>
   988      <li>m2: index into the array of industries</li>
  1039      <li>m2: index into the array of industries</li>
       
  1040      <li>m3: animation state</li>
       
  1041      <li>m4: animation loop</li>
   989      <li>m5: type (plus m6 bit 2):<br>
  1042      <li>m5: type (plus m6 bit 2):<br>
   990       <small>(note: this is not the same as the industry type, which is stored in the array of industries)</small>
  1043       <small>(note: this is not the same as the industry type, which is stored in the array of industries)</small>
   991 
  1044 
   992       <table>
  1045       <table>
   993        <tr>
  1046        <tr>
  1289         <td nowrap valign=top><tt>AF</tt>..<tt>1FF</tt>&nbsp; </td>
  1342         <td nowrap valign=top><tt>AF</tt>..<tt>1FF</tt>&nbsp; </td>
  1290         <td align=left>NewGRF industries industry</td>
  1343         <td align=left>NewGRF industries industry</td>
  1291        </tr>
  1344        </tr>
  1292       </table>
  1345       </table>
  1293      </li>
  1346      </li>
       
  1347      <li>m6 bits 5..3: random triggers (NewGRF)</li>
       
  1348      <li>m6 bit 2: bit 8 of type (see m5)</li>
  1294      <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
  1349      <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
  1295      <li>m3: animation state</li>
       
  1296      <li>m4: animation loop</li>
       
  1297      <li>m6 bits 3..5: random triggers (NewGRF)</li>
       
  1298      <li>m7: random bits (NewGRF)</li>
  1350      <li>m7: random bits (NewGRF)</li>
  1299     </ul>
  1351     </ul>
  1300    </td>
  1352    </td>
  1301   </tr>
  1353   </tr>
  1302 
  1354 
  1306   </tr>
  1358   </tr>
  1307   <tr>
  1359   <tr>
  1308    <td valign=top nowrap>&nbsp;</td>
  1360    <td valign=top nowrap>&nbsp;</td>
  1309    <td>
  1361    <td>
  1310     <ul>
  1362     <ul>
  1311      <li>m5 bits 7..4 clear: tunnel entrance/exit
  1363      <li>m1: <a href="#OwnershipInfo">owner</a></li>
  1312       <ul>
  1364      <li>m2 bits 7..4: see bridge ramp</li>
  1313        <li>m1: <a href="#OwnershipInfo">owner</a> of the tunnel</li>
  1365      <li>m3 bits 3..0: <a href="#TrackType">track type</a> for railway</li>
  1314        <li>m3 bits 3..0 = <a href="#TrackType">track type</a> for railway tunnel, must be 0 for road tunnel</li>
  1366      <li>m3 bits 2..0: present road types for road</li>
  1315        <li>m4 bit 7 set = on snow or desert</li>
  1367      <li>m4 bit 7 set = on snow or desert</li>
  1316        <li>m5 bits 3..2: <tt>0</tt> - railway tunnel, <tt>1</tt> - road tunnel</li>
  1368      <li>m5 bits 7 clear: tunnel entrance/exit</li>
  1317        <li>m5 bits 1..0 - direction: entrance towards: <tt>0</tt> = NE, <tt>1</tt> = SE, <tt>2</tt> = SW, <tt>3</tt> = NW</li>
       
  1318       </ul>
       
  1319      </li>
       
  1320      <li>m5 bit 7 set: bridge ramp
  1369      <li>m5 bit 7 set: bridge ramp
  1321       <ul>
  1370       <ul>
  1322        <li>m1: <a href="#OwnershipInfo">owner</a> of the bridge</li>
       
  1323        <li>m2 bits 7..4: <a name="BridgeType">bridge type</a>:
  1371        <li>m2 bits 7..4: <a name="BridgeType">bridge type</a>:
  1324         <table>
  1372         <table>
  1325          <tr>
  1373          <tr>
  1326           <th align=left>Type&nbsp;</th>
  1374           <th align=left>Type&nbsp;</th>
  1327           <th align=left>Max. speed (mph)&nbsp;</th>
  1375           <th align=left>Max. speed (mph)&nbsp;</th>
  1391          <tr>
  1439          <tr>
  1392           <td nowrap valign=top><tt>A</tt>&nbsp; </td>
  1440           <td nowrap valign=top><tt>A</tt>&nbsp; </td>
  1393           <td align=center>200</td>
  1441           <td align=center>200</td>
  1394           <td align=left>tubular, steel</td>
  1442           <td align=left>tubular, steel</td>
  1395          </tr>
  1443          </tr>
       
  1444 
       
  1445          <tr>
       
  1446           <td nowrap valign=top><tt>B</tt>&nbsp; </td>
       
  1447           <td align=center>320</td>
       
  1448           <td align=left>tubular, steel</td>
       
  1449          </tr>
       
  1450 
       
  1451          <tr>
       
  1452           <td nowrap valign=top><tt>C</tt>&nbsp; </td>
       
  1453           <td align=center>380</td>
       
  1454           <td align=left>tubular, silicon</td>
       
  1455          </tr>
  1396         </table>
  1456         </table>
  1397        </li>
  1457        </li>
  1398        <li>m3 bits 3..0 = <a href="#TrackType">type of track</a> on the bridge, must be 0 for road bridge</li>
       
  1399        <li>m4 bit 7 set = on snow or desert</li>
       
  1400        <li>m5 bits 3..2: <tt>0</tt> - railway bridge, <tt>1</tt> - road bridge</li>
       
  1401        <li>m5 bits 1..0: DiagDirection onto the bridge</li>
       
  1402       </ul>
  1458       </ul>
       
  1459      </li>
       
  1460      <li>m5 bits 3..2: transport type
       
  1461       <table>
       
  1462        <tr>
       
  1463         <td><tt>0</tt>&nbsp;</td>
       
  1464         <td>railway</td>
       
  1465        </tr>
       
  1466 
       
  1467        <tr>
       
  1468         <td><tt>1</tt>&nbsp;</td>
       
  1469         <td>road</td>
       
  1470        </tr>
       
  1471      </li>
       
  1472      <li>m5 bits 1..0: direction onto the bridge / out of the tunnel
       
  1473       <table>
       
  1474        <tr>
       
  1475         <td><tt>0</tt>&nbsp; </td>
       
  1476         <td>NE</td>
       
  1477        </tr>
       
  1478 
       
  1479        <tr>
       
  1480         <td><tt>1</tt>&nbsp; </td>
       
  1481         <td>SE</td>
       
  1482        </tr>
       
  1483 
       
  1484        <tr>
       
  1485         <td><tt>2</tt>&nbsp; </td>
       
  1486         <td>SW</td>
       
  1487        </tr>
       
  1488 
       
  1489        <tr>
       
  1490         <td><tt>3</tt>&nbsp; </td>
       
  1491         <td>NW</td>
       
  1492        </tr>
       
  1493       </table>
  1403      </li>
  1494      </li>
  1404      <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li>
  1495      <li>m6 bits 7..6 : Possibility of a bridge above, in the <a href="#bridge_direction">direction specified</a></li>
  1405      <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
  1496      <li>m6 bits 1..0 : <a href="#tropic_zone">Tropic zone definition</a></li>
  1406     </ul>
  1497     </ul>
  1407    </td>
  1498    </td>
  1413   </tr>
  1504   </tr>
  1414   <tr>
  1505   <tr>
  1415    <td valign=top nowrap>&nbsp;</td>
  1506    <td valign=top nowrap>&nbsp;</td>
  1416    <td>
  1507    <td>
  1417     <ul>
  1508     <ul>
  1418      <li>m1 : <a href="#OwnershipInfo">owner</a> of the object (for lighthouses and transmitters normally <tt>10</tt>)</li>
  1509      <li>m1: <a href="#OwnershipInfo">owner</a> of the object (for lighthouses and transmitters normally <tt>10</tt>)</li>
  1419      <li>m2 :
  1510      <li>m2: see company statue
  1420       <ul>
  1511      <li>m5: tile type:
  1421        <li>for company statue (m5 = 02), TownID on which the statue is built in</li>
       
  1422       </ul>
       
  1423      </li>
       
  1424      <li>m5 : tile type:
       
  1425       <table>
  1512       <table>
  1426        <tr>
  1513        <tr>
  1427         <td nowrap valign=top><tt>00</tt>&nbsp; </td>
  1514         <td nowrap valign=top><tt>00</tt>&nbsp; </td>
  1428         <td align=left>transmitter</td>
  1515         <td align=left>transmitter</td>
  1429        </tr>
  1516        </tr>
  1433         <td align=left>lighthouse</td>
  1520         <td align=left>lighthouse</td>
  1434        </tr>
  1521        </tr>
  1435 
  1522 
  1436        <tr>
  1523        <tr>
  1437         <td nowrap valign=top><tt>02</tt>&nbsp; </td>
  1524         <td nowrap valign=top><tt>02</tt>&nbsp; </td>
  1438         <td align=left>company statue</td>
  1525         <td align=left>company statue
       
  1526          <ul>
       
  1527           <li>m2: TownID on which the statue is built in</li>
       
  1528          </ul>
       
  1529         </td>
  1439        </tr>
  1530        </tr>
  1440 
  1531 
  1441        <tr>
  1532        <tr>
  1442         <td nowrap valign=top><tt>03</tt>&nbsp; </td>
  1533         <td nowrap valign=top><tt>03</tt>&nbsp; </td>
  1443         <td align=left>company-owned land</td>
  1534         <td align=left>company-owned land</td>