|
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.
|
|
Surface * | surfaceFromSDL (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.
|
Friends |
|
class | GraphicContext |
Classes |
| struct | RotatedImage |
| | Struct holding a surface and its rotated versions around hue. More...
|
| struct | Surface |
| | Struct holding an SDL surface. More...
|