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

Function SelectHUDFont

Descent3/gamefont.cpp:186–197  ·  view source on GitHub ↗

Set the HUD font resolution based on the render width

Source from the content-addressed store, hash-verified

184
185// Set the HUD font resolution based on the render width
186void SelectHUDFont(int rend_width) {
187 int fontres = (rend_width >= SUPERHIRES_THRESHOLD_W) ? HUD_FONT_HIGHRES : HUD_FONT_LOWRES;
188
189 if (fontres == HUD_font_resolution)
190 return;
191
192 HUD_font_resolution = fontres;
193
194 grfont_Free(HUD_FONT);
195
196 HUD_FONT = LoadFont(HUD_FONT_FILE);
197}

Callers 1

SetScreenModeFunction · 0.85

Calls 2

grfont_FreeFunction · 0.85
LoadFontFunction · 0.85

Tested by

no test coverage detected