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

Function setTextColours

src/OpenLoco/src/Graphics/TextRenderer.cpp:60–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 }
59
60 static void setTextColours(TextDrawingState& drawState, PaletteIndex_t pal1, PaletteIndex_t pal2, PaletteIndex_t pal3)
61 {
62 if ((drawState.fontFlags & TextDrawFlags::inset) != TextDrawFlags::none)
63 {
64 return;
65 }
66
67 drawState.textColours[PaletteIndex::textRemap0] = pal1;
68 drawState.textColours[PaletteIndex::textRemap1] = PaletteIndex::transparent;
69 drawState.textColours[PaletteIndex::textRemap2] = PaletteIndex::transparent;
70 if ((drawState.fontFlags & TextDrawFlags::outline) != TextDrawFlags::none)
71 {
72 drawState.textColours[PaletteIndex::textRemap1] = pal2;
73 drawState.textColours[PaletteIndex::textRemap2] = pal3;
74 }
75 }
76
77 static void setTextColour(TextDrawingState& drawState, int colour)
78 {

Callers 5

setTextColourFunction · 0.85
loopNewlineFunction · 0.85
drawStringFunction · 0.85
drawStringYOffsetsFunction · 0.85
drawStringMaxCharsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected