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

Function OPEN_FONT

2dlib/font.cpp:170–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170inline FONTFILE OPEN_FONT(char *filename, bool &success) {
171 FONTFILE fp;
172 int file_id;
173
174 success = false;
175 fp = (FONTFILE)cfopen(filename, "rb");
176 if (!fp)
177 return NULL;
178
179 file_id = READ_FONT_INT(fp);
180 if (file_id != 0xfeedbaba)
181 return (FONTFILE)(-1);
182
183 success = true;
184 return fp;
185}
186
187inline void CLOSE_FONT(FONTFILE ffile) { cfclose(ffile); }
188

Callers 1

loadMethod · 0.70

Calls 2

cfopenFunction · 0.85
READ_FONT_INTFunction · 0.70

Tested by

no test coverage detected