Road stops: Add bit for whether stop is being drawn in the build window

This commit is contained in:
Jonathan G Rennison 2023-04-02 12:34:01 +01:00
parent c9e62ca29b
commit 706d8f17a3
4 changed files with 8 additions and 1 deletions

View File

@ -145,6 +145,7 @@
<tr><td>random_bits_tile</td><td>0..255</td><td>Random bits (per tile), see also <a href="https://newgrf-specs.tt-wiki.net/wiki/NML:Stations#Base_station_variables">random_bits_station</a></td></tr> <tr><td>random_bits_tile</td><td>0..255</td><td>Random bits (per tile), see also <a href="https://newgrf-specs.tt-wiki.net/wiki/NML:Stations#Base_station_variables">random_bits_station</a></td></tr>
<tr><td>one_way_info</td><td>RST_OWI_XXX</td><td>One-way road information of drive-through stop tile<br />XXX = TWO_WAY | WEST_BOUND | EAST_BOUND | NO_ENTRY</td></tr> <tr><td>one_way_info</td><td>RST_OWI_XXX</td><td>One-way road information of drive-through stop tile<br />XXX = TWO_WAY | WEST_BOUND | EAST_BOUND | NO_ENTRY</td></tr>
<tr><td>one_way_info_inferred</td><td>RST_OWI_XXX</td><td>Inferred one-way road information of drive-through stop tile<br />XXX = TWO_WAY | WEST_BOUND | EAST_BOUND | NO_ENTRY</td></tr> <tr><td>one_way_info_inferred</td><td>RST_OWI_XXX</td><td>Inferred one-way road information of drive-through stop tile<br />XXX = TWO_WAY | WEST_BOUND | EAST_BOUND | NO_ENTRY</td></tr>
<tr><td>drawn_in_gui</td><td>0 | 1</td><td>1 if this road stop is being drawn in the build window</td></tr>
</table> </table>
<br /> <br />
Variables that require one or more parameters: Variables that require one or more parameters:

View File

@ -318,6 +318,10 @@
3 - No entry<br /> 3 - No entry<br />
This requires <font face="monospace">road_stops</font>, version 8. This requires <font face="monospace">road_stops</font>, version 8.
</td></tr> </td></tr>
<tr><td>4</td><td>
1 if the road stop is being drawn in the build window<br />
This requires <font face="monospace">road_stops</font>, version 9.
</td></tr>
</table> </table>
<br /> <br />
The remaining bits are reserved for future use and should be masked. The remaining bits are reserved for future use and should be masked.

View File

@ -58,7 +58,7 @@ extern const GRFFeatureInfo _grf_feature_list[] = {
GRFFeatureInfo("action0_object_edge_foundation_mode", 2), GRFFeatureInfo("action0_object_edge_foundation_mode", 2),
GRFFeatureInfo("action0_object_flood_resistant", 1), GRFFeatureInfo("action0_object_flood_resistant", 1),
GRFFeatureInfo("action0_object_viewport_map_tile_type", 1), GRFFeatureInfo("action0_object_viewport_map_tile_type", 1),
GRFFeatureInfo("road_stops", 8), GRFFeatureInfo("road_stops", 9),
GRFFeatureInfo("new_landscape", 2), GRFFeatureInfo("new_landscape", 2),
GRFFeatureInfo("more_objects_per_grf", 1, GFTOF_MORE_OBJECTS_PER_GRF), GRFFeatureInfo("more_objects_per_grf", 1, GFTOF_MORE_OBJECTS_PER_GRF),
GRFFeatureInfo("more_action2_ids", 1, GFTOF_MORE_ACTION2_IDS), GRFFeatureInfo("more_action2_ids", 1, GFTOF_MORE_ACTION2_IDS),

View File

@ -164,6 +164,8 @@ uint32 RoadStopScopeResolver::GetVariable(uint16 variable, uint32 parameter, Get
RoadCachedOneWayState rcows = GetRoadCachedOneWayState(this->tile); RoadCachedOneWayState rcows = GetRoadCachedOneWayState(this->tile);
if (rcows <= RCOWS_NO_ACCESS) result |= (rcows << 2); if (rcows <= RCOWS_NO_ACCESS) result |= (rcows << 2);
} }
} else {
SetBit(result, 4);
} }
return result; return result;
} }