MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / GetFontTexName

Method GetFontTexName

ogsr_engine/xrGame/HUDManager.cpp:71–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71LPCSTR CFontManager::GetFontTexName(LPCSTR section)
72{
73 constexpr const char* tex_names[] = {"texture800", "texture", "texture1600"};
74 int def_idx = 1; // default 1024x768
75 int idx = def_idx;
76
77 u32 h = Device.dwHeight;
78
79 if (h <= 600)
80 idx = 0;
81 else if (h < 1024)
82 idx = 1;
83 else
84 idx = 2;
85
86 while (idx >= 0)
87 {
88 if (pSettings->line_exist(section, tex_names[idx]))
89 return pSettings->r_string(section, tex_names[idx]);
90 --idx;
91 }
92 return pSettings->r_string(section, tex_names[def_idx]);
93}
94
95void CFontManager::InitializeFont(CGameFont*& F, LPCSTR section, u32 flags)
96{

Callers

nothing calls this directly

Calls 2

line_existMethod · 0.80
r_stringMethod · 0.45

Tested by

no test coverage detected