Adjust signal on bridge/tunnel map bits, rename accessors, add docs.

Use same bit to store red/green state for entrances and exits.
No longer re-use exit bit to store red/green state of entrance.
Avoid modifying the M2 of tunnel entrances/exits.
Rename and rationalise map accessor functions.
Document bits used in landscape HTML docs.
This commit is contained in:
Jonathan G Rennison
2016-09-18 14:23:02 +01:00
parent 161f70eb4a
commit 0d2e9f91bf
13 changed files with 175 additions and 131 deletions

View File

@@ -1446,7 +1446,7 @@
<li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of tram</li>
<li>m3 bits 3..0: <a href="#TrackType">track type</a> for railway</li>
<li>m5 bit 4: pbs reservation state for railway</li>
<li>m5 bits 7 clear: tunnel entrance/exit</li>
<li>m5 bit 7 clear: tunnel entrance/exit</li>
<li>m5 bit 7 set: bridge ramp
<ul>
<li>m6 bits 5..2: <a name="BridgeType">bridge type</a>:
@@ -1538,6 +1538,31 @@
</li>
</ul>
</li>
<li style="color: blue">m5 bits 6..5: signal simulation (signals on bridge/tunnels patch)
<table style="color: blue">
<tr>
<td><tt>0</tt>&nbsp;</td>
<td>no signal simulation</td>
</tr>
<tr>
<td><tt>1</tt>&nbsp;</td>
<td>signal simulation entrance (bit 5 set)</td>
</tr>
<tr>
<td><tt>2</tt>&nbsp;</td>
<td>signal simulation exit (bit 6 set)</td>
</tr>
</table>
If signal simulation entrance or exit:
<ul>
<li>m6 bit 6: set = PBS signals, clear = block signals</li>
<li>m6 bit 1: set = semaphore signals, clear = light signals</li>
<li>m6 bit 0: set = signal shows green, clear = signal shows red</li>
<li>m2 bits 15..0: for bridges only: for signals 0..15 on bridge, signal is visually red if corresponding bit in 0..15 is set</li>
</ul>
</li>
<li>m5 bits 3..2: transport type
<table>
<tr>

View File

@@ -9,6 +9,7 @@
span.option{ font-family: "Courier New", Courier, mono; background-color: rgb(255,255, 30); }
span.free { font-family: "Courier New", Courier, mono; background-color: rgb(30, 178, 54); }
span.used { font-family: "Courier New", Courier, mono; }
span.used_p{ font-family: "Courier New", Courier, mono; background-color: cyan; }
td.bits { white-space: nowrap; text-align: center; font-family: "Courier New", Courier, mono; }
td.caption { white-space: nowrap; text-align: left; }
td li { white-space: nowrap; text-align: left; }
@@ -23,6 +24,7 @@ the array so you can quickly see what is used and what is not.
<ul>
<li><span style="font-weight: bold;"><span class="free">O</span></span> - bit is free</li>
<li><span style="font-weight: bold;"><span class="used">X</span></span> - bit is used</li>
<li><span style="font-weight: bold;"><span class="used_p">P</span></span> - bit is used by patch feature</li>
<li><span style="font-weight: bold;"><span class="abuse">&nbsp;</span></span> - bit of attribute is abused for different purposes, i.e. other bits define the actual meaning.</li>
<li><span style="font-weight: bold;"><span class="option">~</span></span> - bit is accessed, but does not really have a meaning (e.g. owner of clear land is always OWNER_NONE)</li>
</ul>
@@ -334,8 +336,8 @@ the array so you can quickly see what is used and what is not.
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
<td class="bits">XXXX XXXX</td>
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">X<span class="free">OO</span>X XXXX</td>
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits">X<span class="used_p">PP</span>X XXXX</td>
<td class="bits"><span class="free">O</span><span class="used_p">P</span><span class="free">OO OO</span><span class="used_p">PP</span></td>
<td class="bits">XXXX XXXX</td>
</tr>
<tr>
@@ -343,11 +345,11 @@ the array so you can quickly see what is used and what is not.
<td class="bits">-inherit-</td>
<td class="bits">-inherit-</td>
<td class="bits">-inherit-</td>
<td class="bits"><span class="used_p">PPPP PPPP PPPP PPPP</span></td>
<td class="bits">-inherit-</td>
<td class="bits">-inherit-</td>
<td class="bits">-inherit-</td>
<td class="bits">-inherit-</td>
<td class="bits"><span class="free">OO</span>XX XX<span class="free">OO</span></td>
<td class="bits"><span class="free">O</span><span class="used_p">P</span>XX XX<span class="used_p">PP</span></td>
<td class="bits">-inherit-</td>
</tr>
<tr>