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

Function drawTrainInline

src/OpenLoco/src/Vehicles/VehicleDraw.cpp:664–677  ·  view source on GitHub ↗

0x004B6D43

Source from the content-addressed store, hash-verified

662
663 // 0x004B6D43
664 int16_t drawTrainInline(Gfx::DrawingContext& drawingCtx, const Vehicles::Vehicle& train, Ui::Point loc)
665 {
666 const auto startX = loc.x;
667 for (auto& car : train.cars)
668 {
669 loc.x += drawVehicleInline(drawingCtx, car, loc, VehicleInlineMode::animated, VehiclePartsToDraw::bogies);
670 }
671 loc.x = startX;
672 for (auto& car : train.cars)
673 {
674 loc.x += drawVehicleInline(drawingCtx, car, loc, VehicleInlineMode::animated, VehiclePartsToDraw::bodies);
675 }
676 return loc.x;
677 }
678}

Callers 2

drawScrollFunction · 0.85
drawScrollFunction · 0.85

Calls 1

drawVehicleInlineFunction · 0.85

Tested by

no test coverage detected