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

Function VisEffectAllocate

Descent3/viseffect.cpp:520–534  ·  view source on GitHub ↗

Returns the next free viseffect

Source from the content-addressed store, hash-verified

518
519// Returns the next free viseffect
520int VisEffectAllocate() {
521 if (Num_vis_effects == max_vis_effects) {
522 mprintf(0, "Couldn't allocate vis effect!\n");
523 return -1;
524 }
525
526 int n = Vis_free_list[Num_vis_effects++];
527 ASSERT(VisEffects[n].type == VIS_NONE); // Get Jason
528
529 if (n > Highest_vis_effect_index) {
530 Highest_vis_effect_index = n;
531 }
532
533 return n;
534}
535
536// Frees up a viseffect for use
537int VisEffectFree(int visnum) {

Callers 2

LGSVisEffectsFunction · 0.85
VisEffectCreateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected