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

Function OPEN_FONT

grtext/grfont.cpp:182–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182inline FONTFILE OPEN_FONT(const char *filename) {
183 FONTFILE fp;
184 int file_id;
185
186 fp = (FONTFILE)cfopen(filename, "rb");
187 if (!fp)
188 return nullptr;
189
190 file_id = READ_FONT_INT(fp);
191 if (file_id != 0xfeedbaba)
192 return (FONTFILE)(-1);
193
194 return fp;
195}
196
197inline void CLOSE_FONT(FONTFILE ffile) { cfclose(ffile); }
198

Callers 3

grfont_LoadFunction · 0.70
grfont_LoadTemplateFunction · 0.70
grfont_SetTemplateFunction · 0.70

Calls 2

cfopenFunction · 0.85
READ_FONT_INTFunction · 0.70

Tested by

no test coverage detected