| 69 | } |
| 70 | |
| 71 | LPCSTR 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 | |
| 95 | void CFontManager::InitializeFont(CGameFont*& F, LPCSTR section, u32 flags) |
| 96 | { |
nothing calls this directly
no test coverage detected