Returns the next free viseffect
| 518 | |
| 519 | // Returns the next free viseffect |
| 520 | int 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 |
| 537 | int VisEffectFree(int visnum) { |
no outgoing calls
no test coverage detected