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

Function bm_FreeBitmap

bitmap/bitmain.cpp:590–604  ·  view source on GitHub ↗

Given a handle, frees the bitmap memory and flags this bitmap as unused

Source from the content-addressed store, hash-verified

588}
589// Given a handle, frees the bitmap memory and flags this bitmap as unused
590void bm_FreeBitmap(int handle) {
591 if (!Bitmaps_initted) {
592 Int3();
593 mprintf(0, "Bitmaps not initted!!!\n");
594 return;
595 }
596 if (handle == BAD_BITMAP_HANDLE)
597 return;
598 if (GameBitmaps[handle].used < 1)
599 return;
600 GameBitmaps[handle].used--;
601 if (GameBitmaps[handle].used == 0) {
602 bm_FreeBitmapMain(handle);
603 }
604}
605// simply frees up a bitmap
606void bm_FreeBitmapData(int handle) {
607 if (GameBitmaps[handle].data16 != NULL && !(GameBitmaps[handle].flags & BF_NOT_RESIDENT)) {

Callers 15

FontKernFunction · 0.85
FontCreateFunction · 0.85
DestroyWindowMethod · 0.85
UpdateTextureViewsMethod · 0.85
OnDeleteMethod · 0.85
DestroyWindowMethod · 0.85
OnDeleteMegacellMethod · 0.85
OnImportTinyMethod · 0.85
OnImportSkyMethod · 0.85
OnImportSkyBandMethod · 0.85
OnOKMethod · 0.85

Calls 1

bm_FreeBitmapMainFunction · 0.85

Tested by

no test coverage detected