diff options
author | KUDr <KUDr@openttd.org> | 2006-06-07 21:16:43 +0000 |
---|---|---|
committer | KUDr <KUDr@openttd.org> | 2006-06-07 21:16:43 +0000 |
commit | 68372f4c16825f2dad27d61184b37781d65a11a8 (patch) | |
tree | ec0d2f5e5f9b8c22f38e6f35337163991e2511ba /yapf/yapf_node_rail.hpp | |
parent | 7fd88e57981e15cd8f2c11a2134e289dbe1b856e (diff) | |
download | openttd-68372f4c16825f2dad27d61184b37781d65a11a8.tar.xz |
(svn r5162) - CodeChange: [YAPF] added flag "choice seen" into YAPF node for trains
Diffstat (limited to 'yapf/yapf_node_rail.hpp')
-rw-r--r-- | yapf/yapf_node_rail.hpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/yapf/yapf_node_rail.hpp b/yapf/yapf_node_rail.hpp index 2d566ab4f..df0186989 100644 --- a/yapf/yapf_node_rail.hpp +++ b/yapf/yapf_node_rail.hpp @@ -70,17 +70,18 @@ struct CYapfRailNodeT CYapfRailSegment *m_segment; uint16 m_num_signals_passed; union { - byte m_inherited_flags; + uint32 m_inherited_flags; struct { bool m_targed_seen : 1; + bool m_choice_seen : 1; bool m_last_signal_was_red : 1; } flags_s; } flags_u; SignalType m_last_red_signal_type; - FORCEINLINE void Set(CYapfRailNodeT* parent, TileIndex tile, Trackdir td) + FORCEINLINE void Set(CYapfRailNodeT* parent, TileIndex tile, Trackdir td, bool is_choice) { - base::Set(parent, tile, td); + base::Set(parent, tile, td, is_choice); m_segment = NULL; if (parent == NULL) { m_num_signals_passed = 0; @@ -91,6 +92,7 @@ struct CYapfRailNodeT flags_u.m_inherited_flags = parent->flags_u.m_inherited_flags; m_last_red_signal_type = parent->m_last_red_signal_type; } + flags_u.flags_s.m_choice_seen |= is_choice; } FORCEINLINE TileIndex GetLastTile() const {assert(m_segment != NULL); return m_segment->m_last_tile;} |