X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgraphics%2FSprite.h;fp=src%2Fgraphics%2FSprite.h;h=5710ee58639b3eebf439dd975794968c03e39620;hb=5421c812b9fc64371c7f8ce3886b0b091eef458f;hp=0000000000000000000000000000000000000000;hpb=5ef75aee810e5a687fae24e3f95886241e36efda;p=l2e.git diff --git a/src/graphics/Sprite.h b/src/graphics/Sprite.h new file mode 100644 index 0000000..5710ee5 --- /dev/null +++ b/src/graphics/Sprite.h @@ -0,0 +1,35 @@ +/* + * Sprite.h + * + * Created on: Aug 5, 2012 + * Author: holy + */ + +#ifndef GRAPHICS_SPRITE_H_ +#define GRAPHICS_SPRITE_H_ + +#include + +namespace graphics { + +class Sprite { + +public: + Sprite(SDL_Surface *s, int width, int height) + : surface(s), width(width), height(height) { } + +public: + int Width() const { return width; } + int Height() const { return height; } + void Draw(SDL_Surface *dest, int x, int y, int col = 0, int row = 0) const; + +private: + SDL_Surface *surface; + int width; + int height; + +}; + +} + +#endif /* GRAPHICS_SPRITE_H_ */