diff options
Diffstat (limited to 'src/libjin/graphics/je_sprite.h')
-rw-r--r-- | src/libjin/graphics/je_sprite.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/libjin/graphics/je_sprite.h b/src/libjin/graphics/je_sprite.h index 4050ed8..c7c5a8b 100644 --- a/src/libjin/graphics/je_sprite.h +++ b/src/libjin/graphics/je_sprite.h @@ -6,6 +6,7 @@ #include "je_color.h" #include "je_graphic.h" +#include "je_renderable.h" namespace JinEngine { @@ -15,23 +16,10 @@ namespace JinEngine /// /// A sprite is unit of rendering. Animation is based on sprite, but not texture or other graphic stuff. /// - class Sprite + class Sprite : public IRenderable { public: - enum Origin - { - TopLeft, - TopCenter, - TopRight, - MiddleLeft, - MiddleCenter, - MiddleRight, - BottomLeft, - BottomCenter, - BottomRight - }; - Sprite(const Graphic* graphic, const Math::Quad& quad, Origin origin); Sprite(const Graphic* graphic, const Math::Quad& quad, float ox, float oy); @@ -44,7 +32,7 @@ namespace JinEngine Math::Vector2<int> getSize(); - void render(float x, float y, float sx, float sy, float r) const; + void render(float x, float y, float sx, float sy, float r) const override; private: |