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

Method init_system

2dlib/font.cpp:196–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194grMemorySurface *grFont::m_CharSurf = NULL;
195
196void 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
215void grFont::close_system() {
216 if (grFont::m_CharSurf) {

Callers

nothing calls this directly

Calls 1

initMethod · 0.45

Tested by

no test coverage detected