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

Function grtext_GetTextHeight

grtext/grtext.cpp:744–757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

742}
743
744int grtext_GetTextHeight(const char *str) {
745 int cur_h = 0;
746 const char *spos = str;
747
748 do {
749 cur_h += (Grtext_line_spacing + CHAR_HEIGHT(Grtext_font));
750
751 spos = strchr(spos, '\n');
752 if (spos)
753 spos++;
754 } while (spos);
755
756 return cur_h;
757}
758
759int grtext_GetTextLineWidth(const char *str) {
760 int line_width = 0, max_width = 0;

Callers 4

FontKernFunction · 0.85
DoWaitPopupFunction · 0.85
BuddyDisplayFunction · 0.85
RenderHUDMessagesFunction · 0.85

Calls 1

CHAR_HEIGHTFunction · 0.85

Tested by

no test coverage detected