returns scaled text height
| 846 | |
| 847 | // returns scaled text height |
| 848 | int 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 | |
| 861 | void 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) { |
no test coverage detected