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

Function getWidthVehicleInline

src/OpenLoco/src/Vehicles/VehicleDraw.cpp:650–661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

648 }
649
650 int16_t getWidthVehicleInline(const Vehicles::Car& car)
651 {
652 auto* vehObject = ObjectManager::get<VehicleObject>(car.front->objectId);
653
654 const auto yaw = 40;
655
656 const auto drawItems = getDrawItemsForVehicle(*vehObject, yaw, car, VehicleInlineMode::basic);
657
658 auto screenDistDrawItems = toScreenDistDrawItems(drawItems, yaw);
659
660 return screenDistDrawItems.totalDistance;
661 }
662
663 // 0x004B6D43
664 int16_t drawTrainInline(Gfx::DrawingContext& drawingCtx, const Vehicles::Vehicle& train, Ui::Point loc)

Callers 2

drawScrollFunction · 0.85
openFunction · 0.85

Calls 2

getDrawItemsForVehicleFunction · 0.85
toScreenDistDrawItemsFunction · 0.85

Tested by

no test coverage detected