40 enum EndSegmentReasonBits {
61 ESRB_POSSIBLE_TARGET = ESRB_DEPOT | ESRB_WAYPOINT | ESRB_STATION | ESRB_SAFE_TILE,
64 ESRB_CACHED_MASK = ESRB_DEAD_END | ESRB_RAIL_TYPE | ESRB_INFINITE_LOOP | ESRB_SEGMENT_TOO_LONG | ESRB_CHOICE_FOLLOWS | ESRB_DEPOT | ESRB_WAYPOINT | ESRB_STATION | ESRB_SAFE_TILE,
67 ESRB_ABORT_PF_MASK = ESRB_DEAD_END | ESRB_PATH_TOO_LONG | ESRB_INFINITE_LOOP | ESRB_FIRST_TWO_WAY_RED,
72 inline std::string
ValueStr(EndSegmentReasonBits bits)
74 static const char *
const end_segment_reason_names[] = {
75 "DEAD_END",
"RAIL_TYPE",
"INFINITE_LOOP",
"SEGMENT_TOO_LONG",
"CHOICE_FOLLOWS",
76 "DEPOT",
"WAYPOINT",
"STATION",
"SAFE_TILE",
77 "PATH_TOO_LONG",
"FIRST_TWO_WAY_RED",
"LOOK_AHEAD_END",
"TARGET_REACHED"
81 ss <<
"0x" << std::setfill(
'0') << std::setw(4) << std::hex << bits;
82 ss <<
" (" <<
ComposeNameT(bits, end_segment_reason_names,
"UNK", ESRB_NONE,
"NONE") <<
")";