0x004B7711 & 0x004B745B
| 569 | |
| 570 | // 0x004B7711 & 0x004B745B |
| 571 | int16_t drawVehicleInline(Gfx::DrawingContext& drawingCtx, int16_t vehicleTypeIdx, CompanyId company, Ui::Point loc) |
| 572 | { |
| 573 | // This has been simplified from vanilla. |
| 574 | |
| 575 | loc.y += 19; |
| 576 | auto* vehObject = ObjectManager::get<VehicleObject>(vehicleTypeIdx); |
| 577 | |
| 578 | loc.y += getVehicleObjectYDisplayOffset(*vehObject); |
| 579 | |
| 580 | auto colourScheme = getCompanyVehicleColourScheme(company, *vehObject); |
| 581 | |
| 582 | const auto yaw = 40; |
| 583 | |
| 584 | const auto drawItems = getDrawItemsForVehicle(*vehObject, yaw, 0, colourScheme); |
| 585 | |
| 586 | auto screenDistDrawItems = toScreenDistDrawItems(drawItems, yaw); |
| 587 | |
| 588 | // Draw all bogies |
| 589 | for (auto& item : screenDistDrawItems.items) |
| 590 | { |
| 591 | if (item.isBody) |
| 592 | { |
| 593 | continue; |
| 594 | } |
| 595 | drawingCtx.drawImage(loc + Ui::Point(item.dist, 0), item.image); |
| 596 | } |
| 597 | // Then draw the bodies |
| 598 | for (auto& item : screenDistDrawItems.items) |
| 599 | { |
| 600 | if (!item.isBody) |
| 601 | { |
| 602 | continue; |
| 603 | } |
| 604 | drawingCtx.drawImage(loc + Ui::Point(item.dist, 0), item.image); |
| 605 | } |
| 606 | return screenDistDrawItems.totalDistance; |
| 607 | } |
| 608 | |
| 609 | // 0x004B6D93 |
| 610 | int16_t drawVehicleInline(Gfx::DrawingContext& drawingCtx, const Vehicles::Car& car, Ui::Point loc, VehicleInlineMode mode, VehiclePartsToDraw parts, std::optional<Colour> disabled) |
no test coverage detected