| 194 | grMemorySurface *grFont::m_CharSurf = NULL; |
| 195 | |
| 196 | void grFont::init_system() { |
| 197 | for (int i = 0; i < MAX_FONTS; i++) { |
| 198 | grFont::m_FontList[i].references = 0; |
| 199 | grFont::m_FontList[i].filename[0] = 0; |
| 200 | } |
| 201 | |
| 202 | if (grFont::m_CharSurf) { |
| 203 | delete grFont::m_CharSurf; |
| 204 | grFont::m_CharSurf = NULL; |
| 205 | } |
| 206 | |
| 207 | if (!grFont::m_CharSurf) { |
| 208 | grFont::m_CharSurf = new grMemorySurface; |
| 209 | grFont::m_CharSurf->init(0, 0, BPP_16, NULL, 0, 0, "char_surf"); |
| 210 | } |
| 211 | |
| 212 | atexit(grFont::close_system); |
| 213 | } |
| 214 | |
| 215 | void grFont::close_system() { |
| 216 | if (grFont::m_CharSurf) { |