Simpler that that. All the text file has is the image type (DDS, PCX, TGA, JPG) and the number of frames. I'm using EFF as the format extension just because I don't have anything better, but it's basically like this:So, for this to work, we'd make a text file for the explosion, it'd specify the name of the first image, how many images there are, and also the format, and the game will display them on the fly?
The animation name you call, Maxim_Particle.eff, is just:
Code: Select all
$Type: TGA
$Frames: 12
Maxim_Particle_0000.tga
Maxim_Particle_0001.tga
...
Maxim_Particle_0011.tga
And that's it. Every image has to be the same format and there has to be less than 254 frames. Those are the only restrictions. To the rest of the game all you've done is load an animation called Maxim_Particle.eff that has 12 frames. The game handles ANIs this same way already. The additional filename and file type are saved and used for the functions that actually lock the data into memory. As far as the rest of the code is concered, or most of bmpman for that matter, it's just an ANI with an EFF extension. No big deal.