Given a handle, frees the bitmap memory and flags this bitmap as unused
| 588 | } |
| 589 | // Given a handle, frees the bitmap memory and flags this bitmap as unused |
| 590 | void 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 |
| 606 | void bm_FreeBitmapData(int handle) { |
| 607 | if (GameBitmaps[handle].data16 != NULL && !(GameBitmaps[handle].flags & BF_NOT_RESIDENT)) { |
no test coverage detected