| 219 | } |
| 220 | |
| 221 | void 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 |
no test coverage detected