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

Method free

2dlib/font.cpp:313–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311}
312
313void grFont::free() {
314 if (m_FontHandle == -1)
315 return;
316
317 return;
318
319 //!! Removed the following assert because there are bugs in the reference count system. Matt, 11-15-97.
320 //!! ASSERT(grFont::m_FontList[m_FontHandle].references > 0);
321 //@@
322 // free font if there was only one reference left.
323 //@@ if (grFont::m_FontList[m_FontHandle].references == 1) {
324 //@@ gr_font_record *ft;
325 //@@
326 //@@ // free up all memory allocated to this font.
327 //@@ ft = &grFont::m_FontList[m_FontHandle];
328 //@@
329 //@@ grFont::free_font(ft);
330 //@@ }
331 //@@
332 //@@ grFont::m_FontList[m_FontHandle].references--;
333 m_FontHandle = -1;
334}
335
336void grFont::free_font(gr_font_record *ft) {
337 int i;

Callers 15

CloseHemicubeFunction · 0.45
DestroyWindowMethod · 0.45
UpdateRobotViewMethod · 0.45
UpdateTextureViewsMethod · 0.45
DrawDoorwayDoorPicMethod · 0.45
DestroyWindowMethod · 0.45
UpdateTextureViewMethod · 0.45
UpdateMegacellViewMethod · 0.45
UpdateViewMethod · 0.45
UpdateWeaponViewMethod · 0.45
UpdateDoorViewMethod · 0.45
UpdateAnimStateViewMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected