| 202 | constexpr auto kStreetlightBoundingBoxSizes = World::Pos3{ 1, 1, 6 }; |
| 203 | |
| 204 | static void paintRoadStreetlight(PaintSession& session, const int16_t baseHeight, const uint8_t style, const int16_t streetlightHeight, const uint8_t rotation) |
| 205 | { |
| 206 | assert(style < static_cast<int32_t>(kStreetlightImageFromStyle.size())); |
| 207 | const auto imageIndexOffset = kStreetlightImageFromStyle[style][rotation]; |
| 208 | |
| 209 | const auto& streetlightObj = ObjectManager::get<StreetLightObject>(); |
| 210 | |
| 211 | const int16_t height = baseHeight + streetlightHeight; |
| 212 | const auto heightOffset = World::Pos3{ 0, |
| 213 | 0, |
| 214 | height }; |
| 215 | |
| 216 | session.addToPlotListAsParent( |
| 217 | ImageId(streetlightObj->image).withIndexOffset(imageIndexOffset), |
| 218 | heightOffset + kStreetlightOffsets[rotation], |
| 219 | heightOffset + kStreetlightBoundingBoxOffsets[rotation], |
| 220 | kStreetlightBoundingBoxSizes); |
| 221 | } |
| 222 | |
| 223 | static void paintRoadStreetlights(PaintSession& session, const World::RoadElement& elRoad, const std::array<int16_t, 4>& streetlightHeights) |
| 224 | { |
no test coverage detected