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

Function bump_FreeBumpmap

bitmap/bumpmap.cpp:91–103  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

89
90// Given a handle, frees the bumpmap memory and flags this bumpmap as unused
91void 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
106uint16_t *bump_data(int handle) {

Callers 2

bump_ShutdownBumpmapsFunction · 0.85
FreeTextureBumpmapsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected