MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / setSignalsOccupiedState

Function setSignalsOccupiedState

src/OpenLoco/src/Vehicles/Routing.cpp:476–489  ·  view source on GitHub ↗

0x004A2CE7

Source from the content-addressed store, hash-verified

474
475 // 0x004A2CE7
476 static void setSignalsOccupiedState(const RoutingResults& results, const uint16_t& routingTransformData)
477 {
478 for (const auto& interest : results.reachableLocs)
479 {
480 if (!(interest.trackAndDirection & World::Track::AdditionalTaDFlags::hasSignal))
481 {
482 continue;
483 }
484
485 bool isOccupied = routingTransformData & 1;
486 uint32_t flags = (1ULL << 31) | (isOccupied ? 8ULL : 9ULL);
487 setSignalState(interest.loc, interest.tad(), interest.trackType, flags);
488 }
489 }
490
491 // 0x004A2D4C
492 static bool sub_4A2D4C(const LocationOfInterest& interest, uint16_t& unk)

Callers 1

sub_4A2AD7Function · 0.85

Calls 2

setSignalStateFunction · 0.85
tadMethod · 0.80

Tested by

no test coverage detected