]> git.localhorst.tv Git - l2e.git/blobdiff - src/graphics/Sprite.h
added Frame class for drawing bordered windows
[l2e.git] / src / graphics / Sprite.h
index 475d863638d060e3a2bad0d1ff4a1575d7fb2fb4..202b96f3f5a05e2a2eb95ffc2f03b1f8d8c9a08d 100644 (file)
@@ -17,8 +17,8 @@ namespace graphics {
 class Sprite {
 
 public:
-       Sprite(SDL_Surface *s, int width, int height)
-       : surface(s), width(width), height(height) { }
+       Sprite(SDL_Surface *s, int width, int height, int xOffset = 0, int yOffset = 0)
+       : surface(s), width(width), height(height), xOffset(xOffset), yOffset(yOffset) { }
 
 public:
        int Width() const { return width; }
@@ -35,6 +35,8 @@ private:
        SDL_Surface *surface;
        int width;
        int height;
+       int xOffset;
+       int yOffset;
 
 };