X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FTexture.h;h=0de987a3d6355ab9f46386183c7b4326db9705c9;hb=a3ba4dc677ad7c92eeb78b20b642241563605c9d;hp=3b6357eef477525f2b9632ca3bc8b0be291eb6da;hpb=816bc61d7e14ffcb3846eadd41bd86de9174e36f;p=l2e.git diff --git a/src/graphics/Texture.h b/src/graphics/Texture.h index 3b6357e..0de987a 100644 --- a/src/graphics/Texture.h +++ b/src/graphics/Texture.h @@ -1,14 +1,7 @@ -/* - * Texture.h - * - * Created on: Oct 21, 2012 - * Author: holy - */ - #ifndef GRAPHICS_TEXTURE_H_ #define GRAPHICS_TEXTURE_H_ -#include "../geometry/Vector.h" +#include "../math/Vector.h" #include @@ -17,21 +10,29 @@ namespace graphics { class Texture { public: - Texture(); + explicit Texture( + SDL_Surface *surface = 0, + const math::Vector &size = math::Vector(), + const math::Vector &offset = math::Vector()); ~Texture(); + static const int TYPE_ID = 410; + public: - void Render(SDL_Surface *dest, const geometry::Vector &from, const geometry::Vector &to) const; + void Render(SDL_Surface *dest, const math::Vector &from, const math::Vector &to) const; public: void SetSurface(SDL_Surface *s) { surface = s; } - void SetOffset(const geometry::Vector &o) { offset = o; } - void SetSize(const geometry::Vector &s) { size = s; } + void SetSize(const math::Vector &s) { size = s; } + void SetOffset(const math::Vector &o) { offset = o; } + + static void CreateTypeDescription(); + static void Construct(void *); private: SDL_Surface *surface; - geometry::Vector offset; - geometry::Vector size; + math::Vector size; + math::Vector offset; };