MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / drawStringWithYOffsets

Function drawStringWithYOffsets

src/openrct2/drawing/Drawing.String.cpp:811–834  ·  view source on GitHub ↗

* * rct2: 0x00682F28 */

Source from the content-addressed store, hash-verified

809 * rct2: 0x00682F28
810 */
811 void drawStringWithYOffsets(
812 RenderTarget& rt, const utf8* text, ColourWithFlags colour, const ScreenCoordsXY& coords, const int8_t* yOffsets,
813 bool forceSpriteFont, FontStyle fontStyle)
814 {
815 TextDrawInfo info{};
816 info.fontStyle = fontStyle;
817 info.start = coords;
818 info.current = coords;
819 info.yOffset = yOffsets;
820
821 info.textDrawFlags.set(TextDrawFlag::yOffsetEffect);
822
823 if (!forceSpriteFont && LocalisationService_UseTrueTypeFont())
824 {
825 info.textDrawFlags.set(TextDrawFlag::ttf);
826 }
827
828 info.palette = _savedTextPalette;
829 processInitialColour(colour, info);
830 processString(rt, text, info);
831 _savedTextPalette = info.palette;
832
833 rt.lastStringPos = info.current;
834 }
835
836 u8string shortenPath(const u8string& path, int32_t availableWidth, FontStyle fontStyle)
837 {

Callers 1

PaintDrawMoneyStructsFunction · 0.85

Calls 4

processInitialColourFunction · 0.85
processStringFunction · 0.85
setMethod · 0.65

Tested by

no test coverage detected