Add road stop flag to not show one-way road overlays

This commit is contained in:
Jonathan G Rennison
2022-02-25 12:42:32 +00:00
parent 2ce5a93527
commit e24d7c88bc
4 changed files with 6 additions and 2 deletions

View File

@@ -70,7 +70,9 @@
<tr><td>animation_triggers</td><td>bitmask(ANIM_TRIGGER_ROAD_STOP_XXX, ...)</td><td>Bitmask of triggers that will trigger the <span class="code">anim_control</span> callback, see the <a href="#roadstop_anim_triggers">table</a> below.</td></tr> <tr><td>animation_triggers</td><td>bitmask(ANIM_TRIGGER_ROAD_STOP_XXX, ...)</td><td>Bitmask of triggers that will trigger the <span class="code">anim_control</span> callback, see the <a href="#roadstop_anim_triggers">table</a> below.</td></tr>
<tr><td>general_flags</td><td>bitmask(RST_GENERAL_FLAG_XXX, ...)</td><td> <tr><td>general_flags</td><td>bitmask(RST_GENERAL_FLAG_XXX, ...)</td><td>
<p><b>RST_GENERAL_FLAG_RANDOM_ANIMATION</b><br /> <p><b>RST_GENERAL_FLAG_RANDOM_ANIMATION</b><br />
<span class="indent">animation callback requires random bits in variable <span class="code">extra_callback_info1</span>.</span></p> <span class="indent">Animation callback requires random bits in variable <span class="code">extra_callback_info1</span>.</span></p>
<p><b>RST_GENERAL_FLAG_NO_ONE_WAY_OVERLAY</b><br />
<span class="indent">Do not show one way road overlay sprites, this should only be set if different graphics are provided for the different one-way states using the <span class="code">one_way_info</span> variable.</span></p>
</td></tr> </td></tr>
<tr><td>minimum_bridge_height</td><td>Array of 6 items [0..255, ...]</td><td>Minimum clearances required for a bridge for each of the <a href="#roadstop_views">6 views/rotations</a> (or 0 to not allow any bridge). Values are given in height level units (1 level == 8px).</td></tr> <tr><td>minimum_bridge_height</td><td>Array of 6 items [0..255, ...]</td><td>Minimum clearances required for a bridge for each of the <a href="#roadstop_views">6 views/rotations</a> (or 0 to not allow any bridge). Values are given in height level units (1 level == 8px).</td></tr>
<tr><td>disallowed_bridge_pillars</td><td>Array of 6 items [bitmask(RST_BRIDGE_PILLAR_FLAG_, ...), ...]</td><td> <tr><td>disallowed_bridge_pillars</td><td>Array of 6 items [bitmask(RST_BRIDGE_PILLAR_FLAG_, ...), ...]</td><td>

View File

@@ -148,6 +148,7 @@
<table> <table>
<tr><th>Bit</th><th>Value</th><th>Meaning</th></tr> <tr><th>Bit</th><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>1</td><td>Callback 141 needs random bits in variable 10</td></tr> <tr><td>0</td><td>1</td><td>Callback 141 needs random bits in variable 10</td></tr>
<tr><td>1</td><td>2</td><td>Do not show one way road overlay sprites, this should only be set if different graphics are provided for the different one-way states using bits 0..1 of variable 50.</td></tr>
</table> </table>
The default value is 0 (no flags enabled). The default value is 0 (no flags enabled).
</p> </p>

View File

@@ -65,6 +65,7 @@ DECLARE_ENUM_AS_BIT_SET(RoadStopDrawMode)
enum RoadStopSpecFlags { enum RoadStopSpecFlags {
RSF_CB141_RANDOM_BITS, ///< Callback 141 needs random bits. RSF_CB141_RANDOM_BITS, ///< Callback 141 needs random bits.
RSF_NO_ONE_WAY_OVERLAY, ///< Do not show one-way road overlays.
}; };
enum RoadStopSpecIntlFlags { enum RoadStopSpecIntlFlags {

View File

@@ -3546,7 +3546,7 @@ draw_default_foundation:
} }
DisallowedRoadDirections drd = GetDriveThroughStopDisallowedRoadDirections(ti->tile); DisallowedRoadDirections drd = GetDriveThroughStopDisallowedRoadDirections(ti->tile);
if (drd != DRD_NONE) { if (drd != DRD_NONE && (stopspec == nullptr || !HasBit(stopspec->flags, RSF_NO_ONE_WAY_OVERLAY))) {
DrawGroundSpriteAt(SPR_ONEWAY_BASE + drd - 1 + ((axis == AXIS_X) ? 0 : 3), PAL_NONE, 8, 8, 0); DrawGroundSpriteAt(SPR_ONEWAY_BASE + drd - 1 + ((axis == AXIS_X) ? 0 : 3), PAL_NONE, 8, 8, 0);
} }
} else { } else {