Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

GAG::Sprite Class Reference
[Libgag graphic library]

#include <GraphicContext.h>

List of all members.

Detailed Description

A sprite is a collection of images (frames) that can be displayed one after another to make an animation.

Public Member Functions

 Sprite ()
 Constructor, empty sprite.
virtual ~Sprite ()
 Destructor, release all frames.
virtual void drawSDL (SDL_Surface *dest, const SDL_Rect *clip, int x, int y, int index)
 Draw the sprite frame index at pos (x,y) on an SDL Surface with the clipping rect clip.
virtual void setBaseColor (Uint8 r, Uint8 g, Uint8 b)
 Set the (r,g,b) color to a sprite's base color.
virtual int getW (int index)
 Return the width of index frame of the sprite.
virtual int getH (int index)
 //! Return the height of index frame of the sprite

Protected Member Functions

void loadFrame (SDL_RWops *frameStream, SDL_RWops *rotatedStream)
 Load both types of frames (rotated and not rotated ones) from streams.
SurfacesurfaceFromSDL (SDL_Surface *s)
 Create a surface from an SDL one.

Protected Attributes

std::vector< Surface * > images
 Non-rotated frames.
std::vector< RotatedImage * > rotated
 Rotated frames.
Color32 actColor
 Starting color from which hue rotation will be defined.


class GraphicContext


struct  RotatedImage
 Struct holding a surface and its rotated versions around hue. More...
struct  Surface
 Struct holding an SDL surface. More...

The documentation for this class was generated from the following files:
Generated on Mon Oct 24 17:38:26 2005 for Teem by  doxygen 1.4.2