123 uint16_t num_signals_passed;
125 uint32_t inherited_flags;
129 bool last_signal_was_red;
137 this->base::Set(parent, tile, td, is_choice);
138 this->segment =
nullptr;
139 if (parent ==
nullptr) {
140 this->num_signals_passed = 0;
141 this->flags_u.inherited_flags = 0;
155 this->num_signals_passed = parent->num_signals_passed;
156 this->flags_u.inherited_flags = parent->flags_u.inherited_flags;
157 this->last_red_signal_type = parent->last_red_signal_type;
158 this->last_signal_type = parent->last_signal_type;
160 this->flags_u.flags_s.choice_seen |= is_choice;
165 assert(this->segment !=
nullptr);
166 return this->segment->last_tile;
169 inline Trackdir GetLastTrackdir()
const
171 assert(this->segment !=
nullptr);
172 return this->segment->last_td;
177 assert(this->segment !=
nullptr);
178 this->segment->last_tile = tile;
179 this->segment->last_td = td;
182 template <
class Tbase,
class Tfunc,
class Tpf>
185 typename Tbase::TrackFollower ft(v, yapf.GetCompatibleRailTypes());
187 Trackdir cur_td = this->base::GetTrackdir();
189 while (cur != this->GetLastTile() || cur_td != this->GetLastTrackdir()) {
190 if (!((obj.*func)(cur, cur_td)))
return false;
192 if (!ft.Follow(cur, cur_td))
break;
198 return (obj.*func)(cur, cur_td);
203 this->base::Dump(dmp);
205 dmp.
WriteValue(
"num_signals_passed", this->num_signals_passed);
206 dmp.
WriteValue(
"target_seen", this->flags_u.flags_s.target_seen ?
"Yes" :
"No");
207 dmp.
WriteValue(
"choice_seen", this->flags_u.flags_s.choice_seen ?
"Yes" :
"No");
208 dmp.
WriteValue(
"last_signal_was_red", this->flags_u.flags_s.last_signal_was_red ?
"Yes" :
"No");
209 dmp.
WriteEnumT(
"last_red_signal_type", this->last_red_signal_type);