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

Function paintRoadPCP

src/OpenLoco/src/Paint/PaintRoad.cpp:417–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415 }
416
417 static void paintRoadPCP(PaintSession& session, const World::RoadElement& elRoad, const RoadPaintCommon& roadSession, const uint8_t rotation, const RoadPaintCommonPiece& rpcp)
418 {
419 const auto height = elRoad.baseHeight();
420 if (elRoad.hasBridge())
421 {
422 auto newBridgeEntry = BridgeEntry(
423 height,
424 rpcp.bridgeType[rotation],
425 rpcp.bridgeEdges[rotation],
426 rpcp.bridgeQuarters[rotation],
427 elRoad.bridge(),
428 roadSession.bridgeColoursBaseImageId);
429 // There may be other bridge edge/quarters due to merging so OR them together
430 newBridgeEntry.edgesQuarters |= session.getBridgeEntry().edgesQuarters;
431 session.setBridgeEntry(newBridgeEntry);
432 }
433
434 session.insertTunnels(rpcp.tunnelHeights[rotation], height, roadSession.tunnelType);
435
436 session.set525CF8(session.get525CF8() | rpcp.segments[rotation]);
437 session.setOccupiedAdditionSupportSegments(session.getOccupiedAdditionSupportSegments() | rpcp.segments[rotation]);
438 }
439
440 // 0x004759A6
441 void paintRoad(PaintSession& session, const World::RoadElement& elRoad)

Callers 1

paintRoadFunction · 0.85

Calls 10

BridgeEntryClass · 0.85
baseHeightMethod · 0.80
setBridgeEntryMethod · 0.80
insertTunnelsMethod · 0.80
set525CF8Method · 0.80
get525CF8Method · 0.80
hasBridgeMethod · 0.45
bridgeMethod · 0.45

Tested by

no test coverage detected