| 190 | } |
| 191 | |
| 192 | static void paintTrackPPStandard(PaintSession& session, const World::TrackElement& elTrack, const TrackPaintCommon& trackSession, const uint8_t rotation, const TrackPaintPiece& tpp) |
| 193 | { |
| 194 | const auto height = elTrack.baseHeight(); |
| 195 | const auto heightOffset = World::Pos3{ 0, |
| 196 | 0, |
| 197 | height }; |
| 198 | if (elTrack.hasBridge()) |
| 199 | { |
| 200 | auto newBridgeEntry = BridgeEntry( |
| 201 | height, |
| 202 | tpp.bridgeType[rotation], |
| 203 | tpp.bridgeEdges[rotation], |
| 204 | tpp.bridgeQuarters[rotation], |
| 205 | elTrack.bridge(), |
| 206 | trackSession.bridgeColoursBaseImageId); |
| 207 | // There may be other bridge edge/quarters due to merging so OR them together |
| 208 | newBridgeEntry.edgesQuarters |= session.getBridgeEntry().edgesQuarters; |
| 209 | session.setBridgeEntry(newBridgeEntry); |
| 210 | } |
| 211 | |
| 212 | const auto baseImage = trackSession.trackBaseImageId; |
| 213 | |
| 214 | session.addToPlotList4FD150( |
| 215 | baseImage.withIndexOffset(tpp.imageIndexOffsets[rotation][0]), |
| 216 | heightOffset, |
| 217 | tpp.boundingBoxOffsets[rotation] + heightOffset, |
| 218 | tpp.boundingBoxSizes[rotation]); |
| 219 | |
| 220 | session.insertTunnels(tpp.tunnelHeights[rotation], height, trackSession.tunnelType); |
| 221 | |
| 222 | session.set525CF8(session.get525CF8() | tpp.segments[rotation]); |
| 223 | session.setOccupiedAdditionSupportSegments(session.getOccupiedAdditionSupportSegments() | tpp.segments[rotation]); |
| 224 | } |
| 225 | |
| 226 | static void paintTrackPP(PaintSession& session, const World::TrackElement& elTrack, const TrackPaintCommon& trackSession, const uint8_t rotation, const TrackPaintPiece& tpp) |
| 227 | { |
no test coverage detected