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

Function grtext_SetFont

grtext/grtext.cpp:387–401  ·  view source on GitHub ↗

sets the font for text

Source from the content-addressed store, hash-verified

385
386// sets the font for text
387void grtext_SetFont(int font_handle) {
388 struct {
389 char op;
390 int handle;
391 } cmd;
392
393 ASSERT((Grtext_ptr + sizeof(cmd)) < GRTEXT_BUFLEN);
394 cmd.op = GRTEXTOP_SETFONT;
395 cmd.handle = font_handle;
396 Grtext_font = cmd.handle;
397 Grtext_spacing = 1 + grfont_GetTracking(Grtext_font);
398
399 memcpy(&Grtext_buffer[Grtext_ptr], &cmd, sizeof(cmd));
400 Grtext_ptr += sizeof(cmd);
401}
402
403// puts a formatted string in the text buffer
404void grtext_Printf(int x, int y, const char *fmt, ...) {

Callers 15

FontKernFunction · 0.85
message_boxFunction · 0.85
FontCreateFunction · 0.85
FontViewFunction · 0.85
CreateMethod · 0.85
ui_DrawSetFontFunction · 0.85
GameRenderFrameFunction · 0.85
DrawPlayerNameOnHudFunction · 0.85
RenderHUDItemsFunction · 0.85
DoMultiAllowedFunction · 0.85
PaintPLRSinglePlayerTextFunction · 0.85
TCMainMenuRenderCallbackFunction · 0.85

Calls 1

grfont_GetTrackingFunction · 0.85

Tested by

no test coverage detected