Signals: Add variable for restriction info, add bit for reserve through
This commit is contained in:
@@ -103,6 +103,22 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<h3><a href="https://newgrf-specs.tt-wiki.net/wiki/NML:Railtypes#Railtype_variables">Railtypes variables</a></h3>
|
||||||
|
<p>Variables in the table below which are not supported by the version of OpenTTD being used return a value of 0.</p>
|
||||||
|
<table>
|
||||||
|
<tr><th>Variable</th><th>Value range</th><th>Comment</th></tr>
|
||||||
|
<tr><td>signal_restriction_info</td><td>bitmask(SIGNAL_RESTRICTION_INFO_XXX, ...)</td>
|
||||||
|
<td>
|
||||||
|
Information about the restricted signal status of the signal being drawn:
|
||||||
|
<dl>
|
||||||
|
<dt>RESTRICTED</dt>
|
||||||
|
<dd>The signal is restricted (has a routing restriction program attached)</dd>
|
||||||
|
<dt>RESERVE_THROUGH_ALWAYS</dt>
|
||||||
|
<dd>The attached routing restriction program unconditionally sets reserve through</dd>
|
||||||
|
</dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<h3><a href="https://newgrf-specs.tt-wiki.net/wiki/NML:Roadtypes#Roadtype_properties">Roadtype properties</a></h3>
|
<h3><a href="https://newgrf-specs.tt-wiki.net/wiki/NML:Roadtypes#Roadtype_properties">Roadtype properties</a></h3>
|
||||||
<table>
|
<table>
|
||||||
<tr><th>Property</th><th>Value range</th><th>Comment</th></tr>
|
<tr><th>Property</th><th>Value range</th><th>Comment</th></tr>
|
||||||
@@ -400,6 +416,21 @@ item (FEAT_GLOBALVARS) {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<br />
|
||||||
|
<table>
|
||||||
|
<tr><th>Variable</th><th>Value range</th><th>Comment</th></tr>
|
||||||
|
<tr><td>signal_restriction_info</td><td>bitmask(SIGNAL_RESTRICTION_INFO_XXX, ...)</td>
|
||||||
|
<td>
|
||||||
|
Information about the restricted signal status of the signal being drawn:
|
||||||
|
<dl>
|
||||||
|
<dt>RESTRICTED</dt>
|
||||||
|
<dd>The signal is restricted (has a routing restriction program attached)</dd>
|
||||||
|
<dt>RESERVE_THROUGH_ALWAYS</dt>
|
||||||
|
<dd>The attached routing restriction program unconditionally sets reserve through</dd>
|
||||||
|
</dl>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<p>
|
<p>
|
||||||
Custom signal sprites example:
|
Custom signal sprites example:
|
||||||
<pre class="code">
|
<pre class="code">
|
||||||
|
@@ -241,6 +241,7 @@
|
|||||||
This flag should only be set if the Action 2/3 actually returns a different sprite when bit 24 of variable 18 is set.<br />
|
This flag should only be set if the Action 2/3 actually returns a different sprite when bit 24 of variable 18 is set.<br />
|
||||||
The property length is 1 byte. 0 is disabled (default). 1 is enabled.
|
The property length is 1 byte. 0 is disabled (default). 1 is enabled.
|
||||||
</p>
|
</p>
|
||||||
|
<p>See also: <a href="#railtype_signal_restriction_info">railtype_signal_restriction_info variable</a></p>
|
||||||
<p>This is indicated by the feature name: <font face="monospace">action0_railtype_restricted_signals</font>, version 1</p>
|
<p>This is indicated by the feature name: <font face="monospace">action0_railtype_restricted_signals</font>, version 1</p>
|
||||||
<h4 id="railtype_enable_signal_recolour">Enable recolouring for custom signal sprites (mappable property: railtype_enable_signal_recolour)</h4>
|
<h4 id="railtype_enable_signal_recolour">Enable recolouring for custom signal sprites (mappable property: railtype_enable_signal_recolour)</h4>
|
||||||
<p>This applies to <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Railtypes#Signal_sprites_.280B.29">Action 2/3 - Railtype custom signal sprites</a>.<br />
|
<p>This applies to <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Railtypes#Signal_sprites_.280B.29">Action 2/3 - Railtype custom signal sprites</a>.<br />
|
||||||
@@ -358,6 +359,7 @@
|
|||||||
The property length is 1 byte. 0 is disabled (default). 1 is enabled.<br />
|
The property length is 1 byte. 0 is disabled (default). 1 is enabled.<br />
|
||||||
The Action 0 Id field is not used, the value is ignored.
|
The Action 0 Id field is not used, the value is ignored.
|
||||||
</p>
|
</p>
|
||||||
|
<p>See also: <a href="#signals_signal_restriction_info">signals_signal_restriction_info variable</a></p>
|
||||||
<p>This is indicated by the feature name: <font face="monospace">action0_signals_restricted_signals</font>, version 1</p>
|
<p>This is indicated by the feature name: <font face="monospace">action0_signals_restricted_signals</font>, version 1</p>
|
||||||
<h4 id="signals_enable_signal_recolour">Enable recolouring for custom signal sprites (mappable property: signals_enable_signal_recolour)</h4>
|
<h4 id="signals_enable_signal_recolour">Enable recolouring for custom signal sprites (mappable property: signals_enable_signal_recolour)</h4>
|
||||||
<p>This applies to <a href="#a3signals_custom_signal_sprites">Action 2/3 Signals (Feature 0E) custom signal sprites</a> for this GRF.<br />
|
<p>This applies to <a href="#a3signals_custom_signal_sprites">Action 2/3 Signals (Feature 0E) custom signal sprites</a> for this GRF.<br />
|
||||||
@@ -547,6 +549,18 @@
|
|||||||
<h4 id="varaction2_station_var42">Track type in purchase list (42)</h4>
|
<h4 id="varaction2_station_var42">Track type in purchase list (42)</h4>
|
||||||
<p>This is indicated by the feature name: <font face="monospace">varaction2_station_var42</font>, version 1</p>
|
<p>This is indicated by the feature name: <font face="monospace">varaction2_station_var42</font>, version 1</p>
|
||||||
<br />
|
<br />
|
||||||
|
<h3 id="varaction2_railtypes"><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Railtypes">Variational Action 2 - Railtypes</a></h3>
|
||||||
|
<h4 id="railtype_signal_restriction_info">Signal routing restriction information (mappable variable: railtype_signal_restriction_info)</h4>
|
||||||
|
<p>This applies to <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Railtypes#Signal_sprites_.280B.29">Action 2/3 - Railtype custom signal sprites</a>.<br />
|
||||||
|
<table>
|
||||||
|
<tr><th>Bit</th><th>Value</th><th>Meaning</th></tr>
|
||||||
|
<tr><td>0</td><td>1</td><td>This signal has a routing restriction program attached</td></tr>
|
||||||
|
<tr><td>1</td><td>2</td><td>Reserve through is unconditionally set in the routing restriction program</td></tr>
|
||||||
|
</table>
|
||||||
|
</p>
|
||||||
|
<p>See also: <a href="#railtype_enable_restricted_signals">railtype_enable_restricted_signals property</a></p>
|
||||||
|
<p>This is indicated by the feature name: <font face="monospace">action0_railtype_restricted_signals</font>, version 2</p>
|
||||||
|
<br />
|
||||||
<h3 id="varaction2_object"><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Objects">Variational Action 2 - Objects</a></h3>
|
<h3 id="varaction2_object"><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Objects">Variational Action 2 - Objects</a></h3>
|
||||||
<h4 id="object_foundation_tile_slope">Tile slope after foundation applied (mappable variable: object_foundation_tile_slope)</h4>
|
<h4 id="object_foundation_tile_slope">Tile slope after foundation applied (mappable variable: object_foundation_tile_slope)</h4>
|
||||||
<p>This has the same format as bits 8-12 of object variable 41.</p>
|
<p>This has the same format as bits 8-12 of object variable 41.</p>
|
||||||
@@ -557,6 +571,18 @@
|
|||||||
This is useful for xoring with bits 8-12 of variable 41, because if this variable is unavailable then the result is still the underlying tile slope.</p>
|
This is useful for xoring with bits 8-12 of variable 41, because if this variable is unavailable then the result is still the underlying tile slope.</p>
|
||||||
<p>This is indicated by the feature name: <font face="monospace">action0_object_edge_foundation_mode</font>, version 2</p>
|
<p>This is indicated by the feature name: <font face="monospace">action0_object_edge_foundation_mode</font>, version 2</p>
|
||||||
<br />
|
<br />
|
||||||
|
<h3 id="varaction2_signals"><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2">Variational Action 2 - Signals (Feature 0E)</a></h3>
|
||||||
|
<h4 id="signals_signal_restriction_info">Signal routing restriction information (mappable variable: signals_signal_restriction_info)</h4>
|
||||||
|
<p>This applies to <a href="#a3signals_custom_signal_sprites">Action 2/3 Signals (Feature 0E) custom signal sprites</a>.<br />
|
||||||
|
<table>
|
||||||
|
<tr><th>Bit</th><th>Value</th><th>Meaning</th></tr>
|
||||||
|
<tr><td>0</td><td>1</td><td>This signal has a routing restriction program attached</td></tr>
|
||||||
|
<tr><td>1</td><td>2</td><td>Reserve through is unconditionally set in the routing restriction program</td></tr>
|
||||||
|
</table>
|
||||||
|
</p>
|
||||||
|
<p>See also: <a href="#signals_enable_restricted_signals">signals_enable_restricted_signals property</a></p>
|
||||||
|
<p>This is indicated by the feature name: <font face="monospace">action0_signals_restricted_signals</font>, version 2</p>
|
||||||
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<h3 id="a3signals"><a href="https://newgrf-specs.tt-wiki.net/wiki/Action3">Action 3 - Signals (Feature 0E)</a></h3>
|
<h3 id="a3signals"><a href="https://newgrf-specs.tt-wiki.net/wiki/Action3">Action 3 - Signals (Feature 0E)</a></h3>
|
||||||
<p>Note that Action 3 feature 0E is not supported (does nothing) in standard OpenTTD.</p>
|
<p>Note that Action 3 feature 0E is not supported (does nothing) in standard OpenTTD.</p>
|
||||||
|
@@ -34,7 +34,7 @@ extern const GRFFeatureInfo _grf_feature_list[] = {
|
|||||||
GRFFeatureInfo("action5_road_waypoints", 1),
|
GRFFeatureInfo("action5_road_waypoints", 1),
|
||||||
GRFFeatureInfo("action0_railtype_programmable_signals", 1),
|
GRFFeatureInfo("action0_railtype_programmable_signals", 1),
|
||||||
GRFFeatureInfo("action0_railtype_no_entry_signals", 1),
|
GRFFeatureInfo("action0_railtype_no_entry_signals", 1),
|
||||||
GRFFeatureInfo("action0_railtype_restricted_signals", 1),
|
GRFFeatureInfo("action0_railtype_restricted_signals", 2),
|
||||||
GRFFeatureInfo("action0_railtype_disable_realistic_braking", 1),
|
GRFFeatureInfo("action0_railtype_disable_realistic_braking", 1),
|
||||||
GRFFeatureInfo("action0_railtype_recolour", 1),
|
GRFFeatureInfo("action0_railtype_recolour", 1),
|
||||||
GRFFeatureInfo("action0_railtype_extra_aspects", 1),
|
GRFFeatureInfo("action0_railtype_extra_aspects", 1),
|
||||||
@@ -43,7 +43,7 @@ extern const GRFFeatureInfo _grf_feature_list[] = {
|
|||||||
GRFFeatureInfo("action0_global_default_object_generate_amount", 1),
|
GRFFeatureInfo("action0_global_default_object_generate_amount", 1),
|
||||||
GRFFeatureInfo("action0_signals_programmable_signals", 1),
|
GRFFeatureInfo("action0_signals_programmable_signals", 1),
|
||||||
GRFFeatureInfo("action0_signals_no_entry_signals", 1),
|
GRFFeatureInfo("action0_signals_no_entry_signals", 1),
|
||||||
GRFFeatureInfo("action0_signals_restricted_signals", 1),
|
GRFFeatureInfo("action0_signals_restricted_signals", 2),
|
||||||
GRFFeatureInfo("action0_signals_recolour", 1),
|
GRFFeatureInfo("action0_signals_recolour", 1),
|
||||||
GRFFeatureInfo("action0_signals_extra_aspects", 1),
|
GRFFeatureInfo("action0_signals_extra_aspects", 1),
|
||||||
GRFFeatureInfo("action3_signals_custom_signal_sprites", 1),
|
GRFFeatureInfo("action3_signals_custom_signal_sprites", 1),
|
||||||
@@ -126,6 +126,8 @@ extern const GRFVariableMapDefinition _grf_action2_remappable_variables[] = {
|
|||||||
GRFVariableMapDefinition(GSF_ROADSTOPS, 0x67, "roadstop_land_info_nearby_tiles"),
|
GRFVariableMapDefinition(GSF_ROADSTOPS, 0x67, "roadstop_land_info_nearby_tiles"),
|
||||||
GRFVariableMapDefinition(GSF_ROADSTOPS, 0x68, "roadstop_road_stop_info_nearby_tiles"),
|
GRFVariableMapDefinition(GSF_ROADSTOPS, 0x68, "roadstop_road_stop_info_nearby_tiles"),
|
||||||
GRFVariableMapDefinition(GSF_ROADSTOPS, 0x6A, "roadstop_road_stop_grfid_nearby_tiles"),
|
GRFVariableMapDefinition(GSF_ROADSTOPS, 0x6A, "roadstop_road_stop_grfid_nearby_tiles"),
|
||||||
|
GRFVariableMapDefinition(GSF_RAILTYPES, A2VRI_RAILTYPE_SIGNAL_RESTRICTION_INFO, "railtype_signal_restriction_info"),
|
||||||
|
GRFVariableMapDefinition(GSF_SIGNALS, A2VRI_SIGNALS_SIGNAL_RESTRICTION_INFO, "signals_signal_restriction_info"),
|
||||||
GRFVariableMapDefinition(),
|
GRFVariableMapDefinition(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -61,6 +61,8 @@ enum Action2VariableRemapIds {
|
|||||||
A2VRI_OBJECT_FOUNDATION_SLOPE = 0x100,
|
A2VRI_OBJECT_FOUNDATION_SLOPE = 0x100,
|
||||||
A2VRI_OBJECT_FOUNDATION_SLOPE_CHANGE,
|
A2VRI_OBJECT_FOUNDATION_SLOPE_CHANGE,
|
||||||
A2VRI_VEHICLE_CURRENT_SPEED_SCALED,
|
A2VRI_VEHICLE_CURRENT_SPEED_SCALED,
|
||||||
|
A2VRI_RAILTYPE_SIGNAL_RESTRICTION_INFO,
|
||||||
|
A2VRI_SIGNALS_SIGNAL_RESTRICTION_INFO,
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Action14 feature definition */
|
/** Action14 feature definition */
|
||||||
|
@@ -10,7 +10,9 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "newgrf_newsignals.h"
|
#include "newgrf_newsignals.h"
|
||||||
|
#include "newgrf_extension.h"
|
||||||
#include "map_func.h"
|
#include "map_func.h"
|
||||||
|
#include "tracerestrict.h"
|
||||||
|
|
||||||
#include "safeguards.h"
|
#include "safeguards.h"
|
||||||
|
|
||||||
@@ -27,11 +29,14 @@ std::vector<const GRFFile *> _new_signals_grfs;
|
|||||||
if (this->tile == INVALID_TILE) {
|
if (this->tile == INVALID_TILE) {
|
||||||
switch (variable) {
|
switch (variable) {
|
||||||
case 0x40: return 0;
|
case 0x40: return 0;
|
||||||
|
case A2VRI_SIGNALS_SIGNAL_RESTRICTION_INFO: return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (variable) {
|
switch (variable) {
|
||||||
case 0x40: return GetTerrainType(this->tile, this->context);
|
case 0x40: return GetTerrainType(this->tile, this->context);
|
||||||
|
case A2VRI_SIGNALS_SIGNAL_RESTRICTION_INFO:
|
||||||
|
return GetNewSignalsRestrictedSignalsInfo(this->prog, this->tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG(grf, 1, "Unhandled new signals tile variable 0x%X", variable);
|
DEBUG(grf, 1, "Unhandled new signals tile variable 0x%X", variable);
|
||||||
@@ -59,9 +64,19 @@ GrfSpecFeature NewSignalsResolverObject::GetFeature() const
|
|||||||
* @param context Are we resolving sprites for the upper halftile, or on a bridge?
|
* @param context Are we resolving sprites for the upper halftile, or on a bridge?
|
||||||
* @param param1 Extra parameter (first parameter of the callback, except railtypes do not have callbacks).
|
* @param param1 Extra parameter (first parameter of the callback, except railtypes do not have callbacks).
|
||||||
* @param param2 Extra parameter (second parameter of the callback, except railtypes do not have callbacks).
|
* @param param2 Extra parameter (second parameter of the callback, except railtypes do not have callbacks).
|
||||||
|
* @param prog Routing restriction program.
|
||||||
*/
|
*/
|
||||||
NewSignalsResolverObject::NewSignalsResolverObject(const GRFFile *grffile, TileIndex tile, TileContext context, uint32 param1, uint32 param2)
|
NewSignalsResolverObject::NewSignalsResolverObject(const GRFFile *grffile, TileIndex tile, TileContext context, uint32 param1, uint32 param2, const TraceRestrictProgram *prog)
|
||||||
: ResolverObject(grffile, CBID_NO_CALLBACK, param1, param2), newsignals_scope(*this, tile, context)
|
: ResolverObject(grffile, CBID_NO_CALLBACK, param1, param2), newsignals_scope(*this, tile, context, prog)
|
||||||
{
|
{
|
||||||
this->root_spritegroup = grffile != nullptr ? grffile->new_signals_group : nullptr;
|
this->root_spritegroup = grffile != nullptr ? grffile->new_signals_group : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint GetNewSignalsRestrictedSignalsInfo(const TraceRestrictProgram *prog, TileIndex tile)
|
||||||
|
{
|
||||||
|
if (prog == nullptr) return 0;
|
||||||
|
|
||||||
|
uint result = 1;
|
||||||
|
if ((prog->actions_used_flags & TRPAUF_RESERVE_THROUGH_ALWAYS) && !IsTileType(tile, MP_TUNNELBRIDGE)) result |= 2;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
@@ -15,10 +15,13 @@
|
|||||||
|
|
||||||
extern std::vector<const GRFFile *> _new_signals_grfs;
|
extern std::vector<const GRFFile *> _new_signals_grfs;
|
||||||
|
|
||||||
|
struct TraceRestrictProgram;
|
||||||
|
|
||||||
/** Resolver for the new signals scope. */
|
/** Resolver for the new signals scope. */
|
||||||
struct NewSignalsScopeResolver : public ScopeResolver {
|
struct NewSignalsScopeResolver : public ScopeResolver {
|
||||||
TileIndex tile; ///< Tracktile. For track on a bridge this is the southern bridgehead.
|
TileIndex tile; ///< Tracktile. For track on a bridge this is the southern bridgehead.
|
||||||
TileContext context; ///< Are we resolving sprites for the upper halftile, or on a bridge?
|
TileContext context; ///< Are we resolving sprites for the upper halftile, or on a bridge?
|
||||||
|
const TraceRestrictProgram *prog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor of the railtype scope resolvers.
|
* Constructor of the railtype scope resolvers.
|
||||||
@@ -26,8 +29,8 @@ struct NewSignalsScopeResolver : public ScopeResolver {
|
|||||||
* @param tile %Tile containing the track. For track on a bridge this is the southern bridgehead.
|
* @param tile %Tile containing the track. For track on a bridge this is the southern bridgehead.
|
||||||
* @param context Are we resolving sprites for the upper halftile, or on a bridge?
|
* @param context Are we resolving sprites for the upper halftile, or on a bridge?
|
||||||
*/
|
*/
|
||||||
NewSignalsScopeResolver(ResolverObject &ro, TileIndex tile, TileContext context)
|
NewSignalsScopeResolver(ResolverObject &ro, TileIndex tile, TileContext context, const TraceRestrictProgram *prog)
|
||||||
: ScopeResolver(ro), tile(tile), context(context)
|
: ScopeResolver(ro), tile(tile), context(context), prog(prog)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,7 +42,7 @@ struct NewSignalsScopeResolver : public ScopeResolver {
|
|||||||
struct NewSignalsResolverObject : public ResolverObject {
|
struct NewSignalsResolverObject : public ResolverObject {
|
||||||
NewSignalsScopeResolver newsignals_scope; ///< Resolver for the new signals scope.
|
NewSignalsScopeResolver newsignals_scope; ///< Resolver for the new signals scope.
|
||||||
|
|
||||||
NewSignalsResolverObject(const GRFFile *grffile, TileIndex tile, TileContext context, uint32 param1 = 0, uint32 param2 = 0);
|
NewSignalsResolverObject(const GRFFile *grffile, TileIndex tile, TileContext context, uint32 param1 = 0, uint32 param2 = 0, const TraceRestrictProgram *prog = nullptr);
|
||||||
|
|
||||||
ScopeResolver *GetScope(VarSpriteGroupScope scope = VSG_SCOPE_SELF, byte relative = 0) override
|
ScopeResolver *GetScope(VarSpriteGroupScope scope = VSG_SCOPE_SELF, byte relative = 0) override
|
||||||
{
|
{
|
||||||
@@ -54,4 +57,6 @@ struct NewSignalsResolverObject : public ResolverObject {
|
|||||||
GrfSpecFeature GetFeature() const override;
|
GrfSpecFeature GetFeature() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
uint GetNewSignalsRestrictedSignalsInfo(const TraceRestrictProgram *prog, TileIndex tile);
|
||||||
|
|
||||||
#endif /* NEWGRF_RAILTYPE_H */
|
#endif /* NEWGRF_RAILTYPE_H */
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "newgrf_railtype.h"
|
#include "newgrf_railtype.h"
|
||||||
#include "newgrf_newsignals.h"
|
#include "newgrf_newsignals.h"
|
||||||
|
#include "newgrf_extension.h"
|
||||||
#include "date_func.h"
|
#include "date_func.h"
|
||||||
#include "depot_base.h"
|
#include "depot_base.h"
|
||||||
#include "town.h"
|
#include "town.h"
|
||||||
@@ -32,6 +33,7 @@
|
|||||||
case 0x42: return 0;
|
case 0x42: return 0;
|
||||||
case 0x43: return _date;
|
case 0x43: return _date;
|
||||||
case 0x44: return HZB_TOWN_EDGE;
|
case 0x44: return HZB_TOWN_EDGE;
|
||||||
|
case A2VRI_RAILTYPE_SIGNAL_RESTRICTION_INFO: return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,6 +53,8 @@
|
|||||||
}
|
}
|
||||||
return t != nullptr ? GetTownRadiusGroup(t, this->tile) : HZB_TOWN_EDGE;
|
return t != nullptr ? GetTownRadiusGroup(t, this->tile) : HZB_TOWN_EDGE;
|
||||||
}
|
}
|
||||||
|
case A2VRI_RAILTYPE_SIGNAL_RESTRICTION_INFO:
|
||||||
|
return GetNewSignalsRestrictedSignalsInfo(this->prog, this->tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG(grf, 1, "Unhandled rail type tile variable 0x%X", variable);
|
DEBUG(grf, 1, "Unhandled rail type tile variable 0x%X", variable);
|
||||||
@@ -77,9 +81,10 @@ uint32 RailTypeResolverObject::GetDebugID() const
|
|||||||
* @param rtsg Railpart of interest
|
* @param rtsg Railpart of interest
|
||||||
* @param param1 Extra parameter (first parameter of the callback, except railtypes do not have callbacks).
|
* @param param1 Extra parameter (first parameter of the callback, except railtypes do not have callbacks).
|
||||||
* @param param2 Extra parameter (second parameter of the callback, except railtypes do not have callbacks).
|
* @param param2 Extra parameter (second parameter of the callback, except railtypes do not have callbacks).
|
||||||
|
* @param prog Routing restriction program.
|
||||||
*/
|
*/
|
||||||
RailTypeResolverObject::RailTypeResolverObject(const RailtypeInfo *rti, TileIndex tile, TileContext context, RailTypeSpriteGroup rtsg, uint32 param1, uint32 param2)
|
RailTypeResolverObject::RailTypeResolverObject(const RailtypeInfo *rti, TileIndex tile, TileContext context, RailTypeSpriteGroup rtsg, uint32 param1, uint32 param2, const TraceRestrictProgram *prog)
|
||||||
: ResolverObject(rti != nullptr ? rti->grffile[rtsg] : nullptr, CBID_NO_CALLBACK, param1, param2), railtype_scope(*this, rti, tile, context)
|
: ResolverObject(rti != nullptr ? rti->grffile[rtsg] : nullptr, CBID_NO_CALLBACK, param1, param2), railtype_scope(*this, rti, tile, context, prog)
|
||||||
{
|
{
|
||||||
this->root_spritegroup = rti != nullptr ? rti->group[rtsg] : nullptr;
|
this->root_spritegroup = rti != nullptr ? rti->group[rtsg] : nullptr;
|
||||||
}
|
}
|
||||||
@@ -116,7 +121,7 @@ inline uint8 RemapAspect(uint8 aspect, uint8 extra_aspects)
|
|||||||
return aspect + 1;
|
return aspect + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PalSpriteID GetRailTypeCustomSignalSprite(const RailtypeInfo *rti, TileIndex tile, SignalType type, SignalVariant var, uint8 aspect, bool gui, bool restricted)
|
static PalSpriteID GetRailTypeCustomSignalSprite(const RailtypeInfo *rti, TileIndex tile, SignalType type, SignalVariant var, uint8 aspect, bool gui, const TraceRestrictProgram *prog)
|
||||||
{
|
{
|
||||||
if (rti->group[RTSG_SIGNALS] == nullptr) return { 0, PAL_NONE };
|
if (rti->group[RTSG_SIGNALS] == nullptr) return { 0, PAL_NONE };
|
||||||
if (type == SIGTYPE_PROG && !HasBit(rti->ctrl_flags, RTCF_PROGSIG)) return { 0, PAL_NONE };
|
if (type == SIGTYPE_PROG && !HasBit(rti->ctrl_flags, RTCF_PROGSIG)) return { 0, PAL_NONE };
|
||||||
@@ -124,8 +129,8 @@ static PalSpriteID GetRailTypeCustomSignalSprite(const RailtypeInfo *rti, TileIn
|
|||||||
|
|
||||||
uint32 param1 = gui ? 0x10 : 0x00;
|
uint32 param1 = gui ? 0x10 : 0x00;
|
||||||
uint32 param2 = (type << 16) | (var << 8) | RemapAspect(aspect, rti->signal_extra_aspects);
|
uint32 param2 = (type << 16) | (var << 8) | RemapAspect(aspect, rti->signal_extra_aspects);
|
||||||
if (restricted && HasBit(rti->ctrl_flags, RTCF_RESTRICTEDSIG)) SetBit(param2, 24);
|
if ((prog != nullptr) && HasBit(rti->ctrl_flags, RTCF_RESTRICTEDSIG)) SetBit(param2, 24);
|
||||||
RailTypeResolverObject object(rti, tile, TCX_NORMAL, RTSG_SIGNALS, param1, param2);
|
RailTypeResolverObject object(rti, tile, TCX_NORMAL, RTSG_SIGNALS, param1, param2, prog);
|
||||||
|
|
||||||
const SpriteGroup *group = object.Resolve();
|
const SpriteGroup *group = object.Resolve();
|
||||||
if (group == nullptr || group->GetNumResults() == 0) return { 0, PAL_NONE };
|
if (group == nullptr || group->GetNumResults() == 0) return { 0, PAL_NONE };
|
||||||
@@ -144,11 +149,11 @@ static PalSpriteID GetRailTypeCustomSignalSprite(const RailtypeInfo *rti, TileIn
|
|||||||
* @param gui Is the sprite being used on the map or in the GUI?
|
* @param gui Is the sprite being used on the map or in the GUI?
|
||||||
* @return The sprite to draw.
|
* @return The sprite to draw.
|
||||||
*/
|
*/
|
||||||
CustomSignalSpriteResult GetCustomSignalSprite(const RailtypeInfo *rti, TileIndex tile, SignalType type, SignalVariant var, uint8 aspect, bool gui, bool restricted)
|
CustomSignalSpriteResult GetCustomSignalSprite(const RailtypeInfo *rti, TileIndex tile, SignalType type, SignalVariant var, uint8 aspect, bool gui, const TraceRestrictProgram *prog)
|
||||||
{
|
{
|
||||||
if (_settings_client.gui.show_all_signal_default) return { { 0, PAL_NONE }, false };
|
if (_settings_client.gui.show_all_signal_default) return { { 0, PAL_NONE }, false };
|
||||||
|
|
||||||
PalSpriteID spr = GetRailTypeCustomSignalSprite(rti, tile, type, var, aspect, gui, restricted);
|
PalSpriteID spr = GetRailTypeCustomSignalSprite(rti, tile, type, var, aspect, gui, prog);
|
||||||
if (spr.sprite != 0) return { spr, HasBit(rti->ctrl_flags, RTCF_RESTRICTEDSIG) };
|
if (spr.sprite != 0) return { spr, HasBit(rti->ctrl_flags, RTCF_RESTRICTEDSIG) };
|
||||||
|
|
||||||
for (const GRFFile *grf : _new_signals_grfs) {
|
for (const GRFFile *grf : _new_signals_grfs) {
|
||||||
@@ -157,8 +162,8 @@ CustomSignalSpriteResult GetCustomSignalSprite(const RailtypeInfo *rti, TileInde
|
|||||||
|
|
||||||
uint32 param1 = gui ? 0x10 : 0x00;
|
uint32 param1 = gui ? 0x10 : 0x00;
|
||||||
uint32 param2 = (type << 16) | (var << 8) | RemapAspect(aspect, grf->new_signal_extra_aspects);
|
uint32 param2 = (type << 16) | (var << 8) | RemapAspect(aspect, grf->new_signal_extra_aspects);
|
||||||
if (restricted && HasBit(grf->new_signal_ctrl_flags, NSCF_RESTRICTEDSIG)) SetBit(param2, 24);
|
if ((prog != nullptr) && HasBit(grf->new_signal_ctrl_flags, NSCF_RESTRICTEDSIG)) SetBit(param2, 24);
|
||||||
NewSignalsResolverObject object(grf, tile, TCX_NORMAL, param1, param2);
|
NewSignalsResolverObject object(grf, tile, TCX_NORMAL, param1, param2, prog);
|
||||||
|
|
||||||
const SpriteGroup *group = object.Resolve();
|
const SpriteGroup *group = object.Resolve();
|
||||||
if (group != nullptr && group->GetNumResults() != 0) {
|
if (group != nullptr && group->GetNumResults() != 0) {
|
||||||
|
@@ -14,11 +14,14 @@
|
|||||||
#include "newgrf_commons.h"
|
#include "newgrf_commons.h"
|
||||||
#include "newgrf_spritegroup.h"
|
#include "newgrf_spritegroup.h"
|
||||||
|
|
||||||
|
struct TraceRestrictProgram;
|
||||||
|
|
||||||
/** Resolver for the railtype scope. */
|
/** Resolver for the railtype scope. */
|
||||||
struct RailTypeScopeResolver : public ScopeResolver {
|
struct RailTypeScopeResolver : public ScopeResolver {
|
||||||
TileIndex tile; ///< Tracktile. For track on a bridge this is the southern bridgehead.
|
TileIndex tile; ///< Tracktile. For track on a bridge this is the southern bridgehead.
|
||||||
TileContext context; ///< Are we resolving sprites for the upper halftile, or on a bridge?
|
TileContext context; ///< Are we resolving sprites for the upper halftile, or on a bridge?
|
||||||
const RailtypeInfo *rti;
|
const RailtypeInfo *rti;
|
||||||
|
const TraceRestrictProgram *prog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor of the railtype scope resolvers.
|
* Constructor of the railtype scope resolvers.
|
||||||
@@ -26,8 +29,8 @@ struct RailTypeScopeResolver : public ScopeResolver {
|
|||||||
* @param tile %Tile containing the track. For track on a bridge this is the southern bridgehead.
|
* @param tile %Tile containing the track. For track on a bridge this is the southern bridgehead.
|
||||||
* @param context Are we resolving sprites for the upper halftile, or on a bridge?
|
* @param context Are we resolving sprites for the upper halftile, or on a bridge?
|
||||||
*/
|
*/
|
||||||
RailTypeScopeResolver(ResolverObject &ro, const RailtypeInfo *rti, TileIndex tile, TileContext context)
|
RailTypeScopeResolver(ResolverObject &ro, const RailtypeInfo *rti, TileIndex tile, TileContext context, const TraceRestrictProgram *prog)
|
||||||
: ScopeResolver(ro), tile(tile), context(context), rti(rti)
|
: ScopeResolver(ro), tile(tile), context(context), rti(rti), prog(prog)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,7 +42,7 @@ struct RailTypeScopeResolver : public ScopeResolver {
|
|||||||
struct RailTypeResolverObject : public ResolverObject {
|
struct RailTypeResolverObject : public ResolverObject {
|
||||||
RailTypeScopeResolver railtype_scope; ///< Resolver for the railtype scope.
|
RailTypeScopeResolver railtype_scope; ///< Resolver for the railtype scope.
|
||||||
|
|
||||||
RailTypeResolverObject(const RailtypeInfo *rti, TileIndex tile, TileContext context, RailTypeSpriteGroup rtsg, uint32 param1 = 0, uint32 param2 = 0);
|
RailTypeResolverObject(const RailtypeInfo *rti, TileIndex tile, TileContext context, RailTypeSpriteGroup rtsg, uint32 param1 = 0, uint32 param2 = 0, const TraceRestrictProgram *prog = nullptr);
|
||||||
|
|
||||||
ScopeResolver *GetScope(VarSpriteGroupScope scope = VSG_SCOPE_SELF, byte relative = 0) override
|
ScopeResolver *GetScope(VarSpriteGroupScope scope = VSG_SCOPE_SELF, byte relative = 0) override
|
||||||
{
|
{
|
||||||
@@ -59,7 +62,7 @@ struct CustomSignalSpriteResult {
|
|||||||
};
|
};
|
||||||
|
|
||||||
SpriteID GetCustomRailSprite(const RailtypeInfo *rti, TileIndex tile, RailTypeSpriteGroup rtsg, TileContext context = TCX_NORMAL, uint *num_results = nullptr);
|
SpriteID GetCustomRailSprite(const RailtypeInfo *rti, TileIndex tile, RailTypeSpriteGroup rtsg, TileContext context = TCX_NORMAL, uint *num_results = nullptr);
|
||||||
CustomSignalSpriteResult GetCustomSignalSprite(const RailtypeInfo *rti, TileIndex tile, SignalType type, SignalVariant var, uint8 aspect, bool gui = false, bool restricted = false);
|
CustomSignalSpriteResult GetCustomSignalSprite(const RailtypeInfo *rti, TileIndex tile, SignalType type, SignalVariant var, uint8 aspect, bool gui = false, const TraceRestrictProgram *prog = nullptr);
|
||||||
|
|
||||||
RailType GetRailTypeTranslation(uint8 railtype, const GRFFile *grffile);
|
RailType GetRailTypeTranslation(uint8 railtype, const GRFFile *grffile);
|
||||||
uint8 GetReverseRailTypeTranslation(RailType railtype, const GRFFile *grffile);
|
uint8 GetReverseRailTypeTranslation(RailType railtype, const GRFFile *grffile);
|
||||||
|
@@ -2721,8 +2721,10 @@ static void GetSignalXY(TileIndex tile, uint pos, uint &x, uint &y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DrawSingleSignal(TileIndex tile, const RailtypeInfo *rti, Track track, SignalState condition, SignalOffsets image, uint pos, SignalType type,
|
void DrawSingleSignal(TileIndex tile, const RailtypeInfo *rti, Track track, SignalState condition, SignalOffsets image, uint pos, SignalType type,
|
||||||
SignalVariant variant, bool show_restricted, bool exit_signal = false)
|
SignalVariant variant, const TraceRestrictProgram *prog, bool exit_signal = false)
|
||||||
{
|
{
|
||||||
|
bool show_restricted = (prog != nullptr);
|
||||||
|
|
||||||
if (type == SIGTYPE_NO_ENTRY) pos ^= 1;
|
if (type == SIGTYPE_NO_ENTRY) pos ^= 1;
|
||||||
|
|
||||||
uint x, y;
|
uint x, y;
|
||||||
@@ -2742,7 +2744,7 @@ void DrawSingleSignal(TileIndex tile, const RailtypeInfo *rti, Track track, Sign
|
|||||||
aspect = 0;
|
aspect = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CustomSignalSpriteResult result = GetCustomSignalSprite(rti, tile, type, variant, aspect, false, show_restricted);
|
const CustomSignalSpriteResult result = GetCustomSignalSprite(rti, tile, type, variant, aspect, false, prog);
|
||||||
SpriteID sprite = result.sprite.sprite;
|
SpriteID sprite = result.sprite.sprite;
|
||||||
PaletteID pal = PAL_NONE;
|
PaletteID pal = PAL_NONE;
|
||||||
bool is_custom_sprite = (sprite != 0);
|
bool is_custom_sprite = (sprite != 0);
|
||||||
@@ -2822,8 +2824,8 @@ static void DrawSingleSignal(TileIndex tile, const RailtypeInfo *rti, Track trac
|
|||||||
SignalType type = GetSignalType(tile, track);
|
SignalType type = GetSignalType(tile, track);
|
||||||
SignalVariant variant = GetSignalVariant(tile, track);
|
SignalVariant variant = GetSignalVariant(tile, track);
|
||||||
|
|
||||||
bool show_restricted = IsRestrictedSignal(tile) && (GetExistingTraceRestrictProgram(tile, track) != nullptr);
|
const TraceRestrictProgram *prog = IsRestrictedSignal(tile) ? GetExistingTraceRestrictProgram(tile, track) : nullptr;
|
||||||
DrawSingleSignal(tile, rti, track, condition, image, pos, type, variant, show_restricted);
|
DrawSingleSignal(tile, rti, track, condition, image, pos, type, variant, prog);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename F>
|
template <typename F>
|
||||||
|
@@ -1323,6 +1323,20 @@ bool TraceRestrictRemoveProgramMapping(TraceRestrictRefId ref)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TraceRestrictCheckRefreshSignals(const TraceRestrictProgram *prog, TileIndex tile, size_t old_size, TraceRestrictProgramActionsUsedFlags old_actions_used_flags)
|
||||||
|
{
|
||||||
|
if (_network_dedicated) return;
|
||||||
|
|
||||||
|
if (!((old_actions_used_flags ^ prog->actions_used_flags) & TRPAUF_RESERVE_THROUGH_ALWAYS)) return;
|
||||||
|
|
||||||
|
if (old_size == 0 && prog->refcount == 1) return; // Program is new, no need to refresh again
|
||||||
|
|
||||||
|
const TraceRestrictRefId *data = prog->GetRefIdsPtr();
|
||||||
|
for (uint i = 0; i < prog->refcount; i++) {
|
||||||
|
MarkTileDirtyByTile(GetTraceRestrictRefIdTileIndex(data[i]), VMDF_NOT_MAP_MODE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the signal program for the tile ref @p ref
|
* Gets the signal program for the tile ref @p ref
|
||||||
* An empty program will be constructed if none exists, and @p create_new is true, unless the pool is full
|
* An empty program will be constructed if none exists, and @p create_new is true, unless the pool is full
|
||||||
@@ -1687,6 +1701,9 @@ CommandCost CmdProgramSignalTraceRestrict(TileIndex tile, DoCommandFlag flags, u
|
|||||||
if (flags & DC_EXEC) {
|
if (flags & DC_EXEC) {
|
||||||
assert(prog);
|
assert(prog);
|
||||||
|
|
||||||
|
size_t old_size = prog->items.size();
|
||||||
|
TraceRestrictProgramActionsUsedFlags old_actions_used_flags = prog->actions_used_flags;
|
||||||
|
|
||||||
// move in modified program
|
// move in modified program
|
||||||
prog->items.swap(items);
|
prog->items.swap(items);
|
||||||
prog->actions_used_flags = actions_used_flags;
|
prog->actions_used_flags = actions_used_flags;
|
||||||
@@ -1695,6 +1712,8 @@ CommandCost CmdProgramSignalTraceRestrict(TileIndex tile, DoCommandFlag flags, u
|
|||||||
// program is empty, and this tile is the only reference to it
|
// program is empty, and this tile is the only reference to it
|
||||||
// so delete it, as it's redundant
|
// so delete it, as it's redundant
|
||||||
TraceRestrictRemoveProgramMapping(MakeTraceRestrictRefId(tile, track));
|
TraceRestrictRemoveProgramMapping(MakeTraceRestrictRefId(tile, track));
|
||||||
|
} else {
|
||||||
|
TraceRestrictCheckRefreshSignals(prog, tile, old_size, old_actions_used_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
// update windows
|
// update windows
|
||||||
@@ -1788,9 +1807,14 @@ CommandCost CmdProgramSignalTraceRestrictProgMgmt(TileIndex tile, DoCommandFlag
|
|||||||
return CMD_ERROR;
|
return CMD_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t old_size = prog->items.size();
|
||||||
|
TraceRestrictProgramActionsUsedFlags old_actions_used_flags = prog->actions_used_flags;
|
||||||
|
|
||||||
prog->items.reserve(prog->items.size() + source_prog->items.size()); // this is in case prog == source_prog
|
prog->items.reserve(prog->items.size() + source_prog->items.size()); // this is in case prog == source_prog
|
||||||
prog->items.insert(prog->items.end(), source_prog->items.begin(), source_prog->items.end()); // append
|
prog->items.insert(prog->items.end(), source_prog->items.begin(), source_prog->items.end()); // append
|
||||||
prog->Validate();
|
prog->Validate();
|
||||||
|
|
||||||
|
TraceRestrictCheckRefreshSignals(prog, tile, old_size, old_actions_used_flags);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -1758,7 +1758,8 @@ static void DrawTunnelBridgeRampSingleSignal(const TileInfo *ti, bool is_green,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool show_restricted = IsTunnelBridgeRestrictedSignal(ti->tile);
|
bool show_restricted = IsTunnelBridgeRestrictedSignal(ti->tile);
|
||||||
const CustomSignalSpriteResult result = GetCustomSignalSprite(rti, ti->tile, type, variant, aspect, false, show_restricted);
|
const TraceRestrictProgram *prog = show_restricted ? GetExistingTraceRestrictProgram(ti->tile, FindFirstTrack(GetAcrossTunnelBridgeTrackBits(ti->tile))) : nullptr;
|
||||||
|
const CustomSignalSpriteResult result = GetCustomSignalSprite(rti, ti->tile, type, variant, aspect, false, prog);
|
||||||
PalSpriteID sprite = result.sprite;
|
PalSpriteID sprite = result.sprite;
|
||||||
bool is_custom_sprite = (sprite.sprite != 0);
|
bool is_custom_sprite = (sprite.sprite != 0);
|
||||||
|
|
||||||
@@ -2142,7 +2143,7 @@ static void DrawTile_TunnelBridge(TileInfo *ti, DrawTileProcParams params)
|
|||||||
|
|
||||||
if (IsTunnelBridgeWithSignalSimulation(ti->tile)) {
|
if (IsTunnelBridgeWithSignalSimulation(ti->tile)) {
|
||||||
extern void DrawSingleSignal(TileIndex tile, const RailtypeInfo *rti, Track track, SignalState condition,
|
extern void DrawSingleSignal(TileIndex tile, const RailtypeInfo *rti, Track track, SignalState condition,
|
||||||
SignalOffsets image, uint pos, SignalType type, SignalVariant variant, bool show_restricted, bool exit_signal = false);
|
SignalOffsets image, uint pos, SignalType type, SignalVariant variant, const TraceRestrictProgram *prog, bool exit_signal = false);
|
||||||
|
|
||||||
DiagDirection dir = GetTunnelBridgeDirection(ti->tile);
|
DiagDirection dir = GetTunnelBridgeDirection(ti->tile);
|
||||||
SignalVariant variant = IsTunnelBridgeSemaphore(ti->tile) ? SIG_SEMAPHORE : SIG_ELECTRIC;
|
SignalVariant variant = IsTunnelBridgeSemaphore(ti->tile) ? SIG_SEMAPHORE : SIG_ELECTRIC;
|
||||||
@@ -2154,15 +2155,16 @@ static void DrawTile_TunnelBridge(TileInfo *ti, DrawTileProcParams params)
|
|||||||
position ^= 1;
|
position ^= 1;
|
||||||
image = (SignalOffsets)(image ^ 1);
|
image = (SignalOffsets)(image ^ 1);
|
||||||
}
|
}
|
||||||
|
const TraceRestrictProgram *prog = IsTunnelBridgeRestrictedSignal(ti->tile) ? GetExistingTraceRestrictProgram(ti->tile, t) : nullptr;
|
||||||
if (IsTunnelBridgeSignalSimulationEntrance(ti->tile)) {
|
if (IsTunnelBridgeSignalSimulationEntrance(ti->tile)) {
|
||||||
DrawSingleSignal(ti->tile, rti, t, GetTunnelBridgeEntranceSignalState(ti->tile), image, position, SIGTYPE_NORMAL, variant, IsTunnelBridgeRestrictedSignal(ti->tile), false);
|
DrawSingleSignal(ti->tile, rti, t, GetTunnelBridgeEntranceSignalState(ti->tile), image, position, SIGTYPE_NORMAL, variant, prog, false);
|
||||||
}
|
}
|
||||||
if (IsTunnelBridgeSignalSimulationExit(ti->tile)) {
|
if (IsTunnelBridgeSignalSimulationExit(ti->tile)) {
|
||||||
SignalType type = SIGTYPE_NORMAL;
|
SignalType type = SIGTYPE_NORMAL;
|
||||||
if (IsTunnelBridgePBS(ti->tile)) {
|
if (IsTunnelBridgePBS(ti->tile)) {
|
||||||
type = IsTunnelBridgeSignalSimulationEntrance(ti->tile) ? SIGTYPE_PBS : SIGTYPE_PBS_ONEWAY;
|
type = IsTunnelBridgeSignalSimulationEntrance(ti->tile) ? SIGTYPE_PBS : SIGTYPE_PBS_ONEWAY;
|
||||||
}
|
}
|
||||||
DrawSingleSignal(ti->tile, rti, t, GetTunnelBridgeExitSignalState(ti->tile), (SignalOffsets)(image ^ 1), position ^ 1, type, variant, IsTunnelBridgeRestrictedSignal(ti->tile), true);
|
DrawSingleSignal(ti->tile, rti, t, GetTunnelBridgeExitSignalState(ti->tile), (SignalOffsets)(image ^ 1), position ^ 1, type, variant, prog, true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
switch (t) {
|
switch (t) {
|
||||||
|
Reference in New Issue
Block a user