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

Function FreeVClip

Descent3/vclip.cpp:221–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221void FreeVClip(int num) {
222 ASSERT(GameVClips[num].used > 0);
223
224 GameVClips[num].used--;
225 if (GameVClips[num].used > 0)
226 return; // other things are using this vclip
227
228 if (!(GameVClips[num].flags & VCF_NOT_RESIDENT)) {
229 for (int i = 0; i < GameVClips[num].num_frames; i++)
230 bm_FreeBitmap(GameVClips[num].frames[i]);
231 }
232
233 mem_free(GameVClips[num].frames);
234
235 Num_vclips--;
236 ASSERT(Num_vclips >= 0);
237}
238
239// Saves a given video clip to a file
240// Returns 1 if everything ok, 0 otherwise

Callers 12

OnDeleteMethod · 0.85
OnDeleteMegacellMethod · 0.85
OnDeleteWeaponMethod · 0.85
OnImportBitmapMethod · 0.85
OnDeletePowerupMethod · 0.85
FreeAllVClipsFunction · 0.85
AllocLoadVClipFunction · 0.85
AllocLoadIFLVClipFunction · 0.85
PltSelectShipFunction · 0.85
CustomCallBackFunction · 0.85
PlayerSetCustomTextureFunction · 0.85

Calls 1

bm_FreeBitmapFunction · 0.85

Tested by

no test coverage detected