Given a handle, frees the bumpmap memory and flags this bumpmap as unused
| 89 | |
| 90 | // Given a handle, frees the bumpmap memory and flags this bumpmap as unused |
| 91 | void bump_FreeBumpmap(int handle) { |
| 92 | ASSERT(GameBumpmaps[handle].flags & BUMPF_USED); |
| 93 | |
| 94 | if (GameBumpmaps[handle].data != NULL) |
| 95 | mem_free(GameBumpmaps[handle].data); |
| 96 | |
| 97 | Bumpmap_mem_used -= (GameBumpmaps[handle].width * GameBumpmaps[handle].height * 2); |
| 98 | |
| 99 | GameBumpmaps[handle].data = NULL; |
| 100 | GameBumpmaps[handle].flags &= ~BUMPF_USED; |
| 101 | |
| 102 | Free_bumpmap_list[--Num_of_bumpmaps] = handle; |
| 103 | } |
| 104 | |
| 105 | // returns a bumpmaps data else NULL if something is wrong |
| 106 | uint16_t *bump_data(int handle) { |
no outgoing calls
no test coverage detected