39 enum EndSegmentReasonBits {
60 ESRB_POSSIBLE_TARGET = ESRB_DEPOT | ESRB_WAYPOINT | ESRB_STATION | ESRB_SAFE_TILE,
63 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,
66 ESRB_ABORT_PF_MASK = ESRB_DEAD_END | ESRB_PATH_TOO_LONG | ESRB_INFINITE_LOOP | ESRB_FIRST_TWO_WAY_RED,
73 static const char *
const end_segment_reason_names[] = {
74 "DEAD_END",
"RAIL_TYPE",
"INFINITE_LOOP",
"SEGMENT_TOO_LONG",
"CHOICE_FOLLOWS",
75 "DEPOT",
"WAYPOINT",
"STATION",
"SAFE_TILE",
76 "PATH_TOO_LONG",
"FIRST_TWO_WAY_RED",
"LOOK_AHEAD_END",
"TARGET_REACHED" 80 out.Format(
"0x%04X (%s)", bits,
ComposeNameT(bits, end_segment_reason_names,
"UNK", ESRB_NONE,
"NONE").Data());
81 return out.Transfer();
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
CStrA ComposeNameT(E value, T &t, const char *t_unk, E val_inv, const char *name_inv)
Helper template function that returns compound bitfield name that is concatenation of names of each s...
CStrA ValueStr(Trackdir td)
Return name of given Trackdir.
we have just passed the last look-ahead signal
station encountered (could be a target next time)
the next tile has a different rail type than our tiles
the path is too long (searching for the nearest depot in the given radius)
we have just reached the destination
safe waiting position found (could be a target)
no reason to end the segment here
Blob based case sensitive ANSI/UTF-8 string.
the segment is too long (possible infinite loop)
first signal was 2-way and it was red
waypoint encountered (could be a target next time)
stop in the depot (could be a target next time)
the next tile contains a choice (the track splits to more than one segments)