0x0046D6E1
| 1511 | |
| 1512 | // 0x0046D6E1 |
| 1513 | static void drawGraphKeyCompanies(Window* self, Gfx::DrawingContext& drawingCtx, uint16_t x, uint16_t& y) |
| 1514 | { |
| 1515 | auto tr = Gfx::TextRenderer(drawingCtx); |
| 1516 | |
| 1517 | for (const auto& company : CompanyManager::companies()) |
| 1518 | { |
| 1519 | auto index = company.id(); |
| 1520 | auto colour = Colours::getShade(company.mainColours.primary, 6); |
| 1521 | |
| 1522 | if (!(self->var_854 & (1 << enumValue(index))) || !(mapFrameNumber & (1 << 2))) |
| 1523 | { |
| 1524 | drawingCtx.drawRect(x, y + 3, 5, 5, colour, Gfx::RectFlags::none); |
| 1525 | } |
| 1526 | |
| 1527 | FormatArguments args{}; |
| 1528 | args.push(company.name); |
| 1529 | |
| 1530 | auto stringId = StringIds::small_black_string; |
| 1531 | |
| 1532 | if (self->var_854 & (1 << enumValue(index))) |
| 1533 | { |
| 1534 | stringId = StringIds::small_white_string; |
| 1535 | } |
| 1536 | |
| 1537 | auto point = Point(x + 6, y); |
| 1538 | tr.drawStringLeftClipped(point, 94, Colour::black, stringId, args); |
| 1539 | |
| 1540 | y += 10; |
| 1541 | } |
| 1542 | } |
| 1543 | |
| 1544 | // 0x0046D81F |
| 1545 | static void formatVehicleString(Window* self, FormatArguments& args) |
no test coverage detected