IND_Animation Class Reference
[IND_Animation]

List of all members.

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_ImageGetImage (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_SurfaceGetSurface (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


Detailed Description

IND_Animation objects are loaded trough the methods of IND_AnimationManager. In order to load an animation it is necessary to create an animation script in xml format. The structure of the script is quite easy to understand.

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 >>

<< Relative to sequences >>

Note: "//" can be used before a phrase for writing comments.

surfa1.jpg

Animations example in IndieLib.


The documentation for this class was generated from the following files:
Generated on Fri Jan 2 17:16:46 2009 for IndieLib by  doxygen 1.5.4