Move signal style mask variables into a single struct
This commit is contained in:
@@ -21,11 +21,16 @@
|
||||
|
||||
extern uint8 _extra_aspects;
|
||||
extern uint64 _aspect_cfg_hash;
|
||||
extern uint16 _non_aspect_inc_style_mask;
|
||||
extern uint16 _next_only_style_mask;
|
||||
extern uint16 _always_reserve_through_style_mask;
|
||||
extern uint16 _no_tunnel_bridge_style_mask;
|
||||
extern uint16 _signal_opposite_side_style_mask;
|
||||
|
||||
struct SignalStyleMasks {
|
||||
uint16 non_aspect_inc = 0;
|
||||
uint16 next_only = 0;
|
||||
uint16 always_reserve_through = 0;
|
||||
uint16 no_tunnel_bridge = 0;
|
||||
uint16 signal_opposite_side = 0;
|
||||
};
|
||||
extern SignalStyleMasks _signal_style_masks;
|
||||
|
||||
extern bool _signal_sprite_oversized;
|
||||
|
||||
/**
|
||||
@@ -187,7 +192,7 @@ void InitialiseExtraAspectsVariable();
|
||||
inline void AdjustSignalAspectIfNonIncStyle(TileIndex tile, Track track, uint8 &aspect)
|
||||
{
|
||||
extern void AdjustSignalAspectIfNonIncStyleIntl(TileIndex tile, Track track, uint8 &aspect);
|
||||
if (aspect > 0 && _non_aspect_inc_style_mask != 0) AdjustSignalAspectIfNonIncStyleIntl(tile, track, aspect);
|
||||
if (aspect > 0 && _signal_style_masks.non_aspect_inc != 0) AdjustSignalAspectIfNonIncStyleIntl(tile, track, aspect);
|
||||
}
|
||||
|
||||
inline uint8 GetForwardAspectFollowingTrackAndIncrement(TileIndex tile, Trackdir trackdir)
|
||||
|
Reference in New Issue
Block a user