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

Function FreeProceduralForTexture

Descent3/gametexture.cpp:809–820  ·  view source on GitHub ↗

Frees all the procedural memory for a texture

Source from the content-addressed store, hash-verified

807
808// Frees all the procedural memory for a texture
809void FreeProceduralForTexture(int n) {
810 if (GameTextures[n].procedural != NULL) {
811 FreeStaticProceduralsForTexture(n);
812 mem_free(GameTextures[n].procedural->proc1);
813 mem_free(GameTextures[n].procedural->proc2);
814 bm_FreeBitmap(GameTextures[n].procedural->procedural_bitmap);
815 mem_free(GameTextures[n].procedural->palette);
816 mem_free(GameTextures[n].procedural);
817
818 GameTextures[n].procedural = NULL;
819 }
820}
821
822// Frees a texture that is being used and
823// Decrements number of textures in use

Callers 4

OnCopyProceduralMethod · 0.85
OnCopyProceduralMethod · 0.85
FreeTextureFunction · 0.85

Calls 2

bm_FreeBitmapFunction · 0.85

Tested by

no test coverage detected