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

Function RenderHUDGetTextHeight

Descent3/huddisplay.cpp:848–859  ·  view source on GitHub ↗

returns scaled text height

Source from the content-addressed store, hash-verified

846
847// returns scaled text height
848int RenderHUDGetTextHeight(const char *string) {
849 float aspect_y;
850 int str_height_curfont = grtext_GetHeight(string);
851
852 if (grtext_GetFont() == HUD_FONT) {
853 aspect_y = ((float)grtext_GetHeightTemplate(&Hud_font_template, string)) / ((float)str_height_curfont);
854 } else {
855 aspect_y = 1.0f;
856 }
857
858 return (int)((str_height_curfont * aspect_y));
859}
860
861void RenderHUDQuad(int x, int y, int w, int h, float u0, float v0, float u1, float v1, int bm, uint8_t alpha,
862 int sat_count) {

Callers 1

RenderHUDInventoryFunction · 0.85

Calls 1

grtext_GetFontFunction · 0.85

Tested by

no test coverage detected