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

Function drawStringRight

src/OpenLoco/src/Graphics/TextRenderer.cpp:531–549  ·  view source on GitHub ↗

0x00494C78 al: colour bx: string id cx: x dx: y esi: args edi: rt

Source from the content-addressed store, hash-verified

529 // esi: args
530 // edi: rt
531 static Ui::Point drawStringRight(
532 TextDrawingState& drawState,
533 DrawingContext& ctx,
534 const RenderTarget& rt,
535 Ui::Point origin,
536 AdvancedColour colour,
537 StringId stringId,
538 FormatArgumentsView args)
539 {
540 char buffer[512];
541 StringManager::formatString(buffer, std::size(buffer), stringId, args);
542
543 uint16_t width = getStringWidth(drawState.font, buffer);
544
545 auto point = origin;
546 point.x -= width;
547
548 return drawString(drawState, ctx, rt, point, colour, buffer);
549 }
550
551 // 0x00494CB2
552 // al: colour

Callers 1

drawStringRightMethod · 0.85

Calls 3

formatStringFunction · 0.85
getStringWidthFunction · 0.85
drawStringFunction · 0.85

Tested by

no test coverage detected