ANIM * LoadAnim (char *fileName, uint32 memTypeBits)
The animation file can be single-CCB or multi-CCB format. An optional ANIM chunk may appear at the start of the file. The file can contain pixel and color chunks in either PDAT, PLUT or PLUT, PDAT order, but the chunks must appear in the same order throughout the file. (3DO Animator creates PLUT, PDAT files; PDAT, PLUT files result from concatenating cel files using MPW.)
When you are finished with the animation, use UnloadAnim()
to
free all resources acquired by LoadAnim()
for a given
animation file.
The frames within an animation are allocated incrementally. Initially a block large enough to hold N_FRAMES_PER_CHUNK frames is allocated. If this is exceeded while reading the ANIM then a block with space for N_FRAMES_PER_CHUNK additional frames is allocated, the previously computed frames are copied into this new space, and the old full buffer space is deallocated
The tag_AnimFrame and tag_ANIM structures, defined in
animutils.h, are used by LoadAnim()
.
The frames within an ANIM are allocated incrementally. Initially a block large enough to hold N_FRAMES_PER_CHUNK frames is allocated. If this is exceeded while reading the ANIM then a block with space for N_FRAMES_PER_CHUNK additional AnimFrames is allocated, the previously computed frames are copied into this new space, and the old full AnimFrame buffer space is deallocated
UnloadAnim
, GetAnimCel
, DrawAnimCel