Public Member Functions | |
| char * | GetName () |
| This function returns the animation script file name in a string of characters. | |
| int | GetNumSequences () |
| This function returns the total number of animation sequences. | |
| int | GetNumTotalFrames () |
| This function returns the total number of animation frames. | |
| IND_Image * | GetImage (int pFrame) |
| This function returns the pointer to the object IND_Image that contains the frame received or NULL in case that the object has not been loaded. | |
| IND_Surface * | GetSurface (int pFrame) |
| This function returns the pointer to the object IND_Surface that contains the frame received or NULL in case that the object has not been loaded. | |
| int | GetHighWidth (int pSequence) |
| This function returns the maximum width of the sequence. It means, the width of the widest frame of the sequence. | |
| int | GetHighHeight (int pSequence) |
| This function returns the maximum height of the sequence. It means, the height of the highest frame of the sequence. | |
| int | GetNumFrames (int pSequence) |
| This function returns the number of frames which are referenced by the sequeence received as a parameter. | |
| char * | GetName (int pSequence) |
| This function returns the name, in a string of characters, of the sequence received as a paramater. | |
| void | SetImage (int pFrame, IND_Image *pNewImage) |
| This function establish a IND_Image object in a frame. It can be useful for modifying some frames of animations.Note: It is convenient to eliminate any IND_Image object that would be there before setting the actual one. | |
| void | SetSurface (int pFrame, IND_Surface *pNewSurface) |
| This function establish a IND_Surface object in a frame. It can be useful for modifying some frames of animations.Note: It is convenient to eliminate any IND_Surface object that would be there before setting the actual one. | |
Friends | |
| class | IND_AnimationManager |
| class | IND_Render |
| class | IND_Entity2dManager |
In each animation script you define first the frames (each of the sprites) that you will use for the sequences that you want to create. Later, you create sequences, using references to these frames, and specifying the time delay between frames.
So, you can set different sequences using the same frames.
The schema of one animation would be as follows:
Animation
{
Frames {Frame_1, Frame_2, Frame_3... Frame_n}
Sequences
{
Sequence_1 (list of n frames)
Sequence_2 (list of n frames)
Sequence_3 (list of n frames)
...
Sequence_n
}
}
The tokens or keywords of a IndieLib animation file are:
<< Relative to frames >>
Animations example in IndieLib.
1.5.4