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

Method drawDescription

src/OpenLoco/src/Objects/CompetitorObject.cpp:27–55  ·  view source on GitHub ↗

0x00434DA7

Source from the content-addressed store, hash-verified

25
26 // 0x00434DA7
27 void CompetitorObject::drawDescription(Gfx::DrawingContext& drawingCtx, const int16_t x, const int16_t y, [[maybe_unused]] const int16_t width) const
28 {
29 auto tr = Gfx::TextRenderer(drawingCtx);
30
31 Ui::Point rowPosition = { x, y };
32 {
33 FormatArguments args{};
34 args.push<uint16_t>(intelligence);
35 args.push(aiRatingToLevel(intelligence));
36
37 tr.drawStringLeft(rowPosition, Colour::black, StringIds::company_details_intelligence, args);
38 rowPosition.y += kDescriptionRowHeight;
39 }
40 {
41 FormatArguments args{};
42 args.push<uint16_t>(aggressiveness);
43 args.push(aiRatingToLevel(aggressiveness));
44
45 tr.drawStringLeft(rowPosition, Colour::black, StringIds::company_details_aggressiveness, args);
46 rowPosition.y += kDescriptionRowHeight;
47 }
48 {
49 FormatArguments args{};
50 args.push<uint16_t>(competitiveness);
51 args.push(aiRatingToLevel(competitiveness));
52
53 tr.drawStringLeft(rowPosition, Colour::black, StringIds::company_details_competitiveness, args);
54 }
55 }
56
57 // 0x00434D24
58 bool CompetitorObject::validate() const

Callers

nothing calls this directly

Calls 4

TextRendererClass · 0.85
aiRatingToLevelFunction · 0.85
drawStringLeftMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected