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

Function FormatTokenToTextColour

src/openrct2/localisation/FormatCodes.cpp:143–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141 }
142
143 Drawing::TextColour FormatTokenToTextColour(FormatToken token)
144 {
145 uint8_t value = EnumValue(token) - EnumValue(FormatToken::colourBlack);
146 if (value >= Drawing::kNumTextColours)
147 return Drawing::TextColour::black;
148
149 return static_cast<Drawing::TextColour>(value);
150 }
151
152 FormatToken FormatTokenFromTextColour(Drawing::TextColour textColour)
153 {

Callers 3

processFormatCodeFunction · 0.85
setBitmapForSpriteFunction · 0.85
setBitmapForTTFFunction · 0.85

Calls 1

EnumValueFunction · 0.85

Tested by

no test coverage detected