MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / grtext_SetColor

Function grtext_SetColor

grtext/grtext.cpp:298–312  ·  view source on GitHub ↗

sets the color for text

Source from the content-addressed store, hash-verified

296
297// sets the color for text
298void grtext_SetColor(ddgr_color col) {
299 struct {
300 char op;
301 ddgr_color col;
302 } cmd;
303
304 ASSERT((Grtext_ptr + sizeof(cmd)) < GRTEXT_BUFLEN);
305
306 cmd.op = GRTEXTOP_SETCOLOR;
307 cmd.col = col;
308
309 memcpy(&Grtext_buffer[Grtext_ptr], &cmd, sizeof(cmd));
310 Grtext_ptr += sizeof(cmd);
311 Grtext_color = col;
312}
313
314// returns color set by grtext_SetColor (does not count intra-string color changes)
315ddgr_color grtext_GetColor() { return Grtext_color; }

Callers 15

FontKernFunction · 0.85
message_boxFunction · 0.85
FontCreateFunction · 0.85
FontViewFunction · 0.85
ui_DrawStringFunction · 0.85
ui_DrawCenteredStringFunction · 0.85
DrawPlayerNameOnHudFunction · 0.85
RenderHUDItemsFunction · 0.85
PaintPLRSinglePlayerTextFunction · 0.85
RenderHUDTextFlagsFunction · 0.85
TCMainMenuRenderCallbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected