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

Function RenderHUDTextFlags

Descent3/huddisplay.cpp:925–952  ·  view source on GitHub ↗

renders text, scaled, alphaed, saturated,

Source from the content-addressed store, hash-verified

923
924// renders text, scaled, alphaed, saturated,
925void RenderHUDTextFlags(int flags, ddgr_color col, uint8_t alpha, int sat_count, int x, int y, const char *fmt, ...) {
926 std::va_list arglist;
927 char buf[128];
928 int i;
929
930 va_start(arglist, fmt);
931 std::vsnprintf(buf, 128, fmt, arglist);
932 va_end(arglist);
933
934 grtext_SetAlpha(alpha);
935
936 if (sat_count)
937 grtext_SetFlags(GRTEXTFLAG_SATURATE);
938 else
939 grtext_SetFlags(0);
940
941 grtext_SetColor(col);
942
943 x = HUD_X(x);
944 y = HUD_Y(y);
945
946 for (i = 0; i < sat_count + 1; i++) {
947 if (flags & HUDTEXT_CENTERED)
948 grtext_CenteredPrintf(0, y, buf);
949 else
950 grtext_Puts(x, y, buf);
951 }
952}
953
954// Show the score
955void RenderHUDScore(tHUDItem *item) {

Callers 4

DoEnabledControlsLineFunction · 0.85
RenderHUDItemsFunction · 0.85
RenderMissileReticleFunction · 0.85
RenderZoomReticleFunction · 0.85

Calls 5

grtext_SetAlphaFunction · 0.85
grtext_SetFlagsFunction · 0.85
grtext_SetColorFunction · 0.85
grtext_CenteredPrintfFunction · 0.85
grtext_PutsFunction · 0.85

Tested by

no test coverage detected