#include <Sprite.h>
Inheritance diagram for Sprite:
Public Member Functions | |
Sprite () | |
Sprite (std::string filename) | |
Sprite (std::string filename, int width, int height) | |
Sprite (Sprite *sprite) | |
virtual Sprite * | instance () |
virtual void | draw (int x, int y, bool origin=LEVEL) |
int | width () |
int | height () |
void | setHeight (int h) |
void | setWidth (int w) |
SDL_Rect | rect () |
void | setRect (SDL_Rect r) |
std::string | filename () |
virtual void | update () |
virtual void | reset () |
xDirection | getDirection () |
void | setDirection (xDirection direction) |
Static Public Member Functions | |
static Sprite * | loadSprite (std::string filename) |
static Sprite * | loadText (std::string filename) |
Static Public Attributes | |
static const bool | LEVEL = true |
static const bool | SCREEN = false |
Protected Attributes | |
std::string | _filename |
int | _hTexture |
GLfloat | _coords [4] |
SDL_Rect | _rect |
xDirection | _direction |
Static Protected Attributes | |
static std::map< std::string, Sprite * > | SPRITES |
Definition at line 12 of file Sprite.h.
|
|
|
Definition at line 17 of file Sprite.cpp. References _coords, _filename, _hTexture, _rect, glfuncs::instance(), and glfuncs::loadTexture(). |
|
Definition at line 31 of file Sprite.cpp. References _coords, _filename, _hTexture, _rect, glfuncs::instance(), and glfuncs::loadTexture(). |
|
Definition at line 39 of file Sprite.cpp. References _direction, _filename, and _rect. |
|
Reimplemented in AnimatedSprite, and ShowOneSprite. Definition at line 46 of file Sprite.cpp. References _coords, _direction, _hTexture, _rect, Screen::drawLevel(), Screen::drawScreen(), Screen::instance(), LEVEL, RIGHT, and SCREEN. Referenced by Tile::draw(), EventPoint::draw(), Door::draw(), Bullet::draw(), and Level::drawHUD(). |
|
Definition at line 34 of file Sprite.h. References _filename. |
|
Definition at line 43 of file Sprite.h. References _direction. |
|
Definition at line 29 of file Sprite.h. References _rect. Referenced by Bullet::Bullet(), Background::draw(), Door::setOpen(), and Tile::Tile(). |
|
Reimplemented in AnimatedSprite, and ShowOneSprite. Definition at line 12 of file Sprite.cpp. Referenced by loadSprite(). |
|
Definition at line 70 of file Sprite.cpp. References instance(), and SPRITES. Referenced by AnimatedSprite::AnimatedSprite(), Bullet::Bullet(), Level::drawHUD(), Person::load(), Door::load(), Level::readTextures(), and ShowOneSprite::ShowOneSprite(). |
|
Definition at line 95 of file Sprite.cpp. References List::firstString(), Parser::parse(), and List::rest(). |
|
Definition at line 32 of file Sprite.h. References _rect. |
|
Reimplemented in AnimatedSprite, and ShowOneSprite. |
|
Definition at line 44 of file Sprite.h. References _direction. Referenced by Bullet::Bullet(), Person::draw(), and Bullet::draw(). |
|
Definition at line 30 of file Sprite.h. References _rect. Referenced by Person::crouch(), and Person::uncrouch(). |
|
Definition at line 33 of file Sprite.h. References _rect. |
|
Definition at line 31 of file Sprite.h. References _rect. |
|
Reimplemented in AnimatedSprite. Definition at line 36 of file Sprite.h. Referenced by Tile::update(). |
|
Definition at line 28 of file Sprite.h. References _rect. Referenced by Bullet::Bullet(), Background::draw(), Level::drawHUD(), Door::setOpen(), and Tile::Tile(). |
|
Definition at line 58 of file Sprite.h. Referenced by draw(), Background::draw(), and Sprite(). |
|
Definition at line 60 of file Sprite.h. Referenced by draw(), ShowOneSprite::draw(), getDirection(), setDirection(), and Sprite(). |
|
Definition at line 56 of file Sprite.h. Referenced by AnimatedSprite::AnimatedSprite(), filename(), ShowOneSprite::ShowOneSprite(), and Sprite(). |
|
Definition at line 57 of file Sprite.h. Referenced by draw(), Background::draw(), and Sprite(). |
|
Definition at line 59 of file Sprite.h. Referenced by draw(), ShowOneSprite::draw(), height(), rect(), setHeight(), setRect(), setWidth(), Sprite(), and width(). |
|
Definition at line 48 of file Sprite.h. Referenced by draw(). |
|
Definition at line 49 of file Sprite.h. Referenced by draw(), and Level::drawHUD(). |
|
Definition at line 53 of file Sprite.h. Referenced by loadSprite(). |