-/*
- * Texture.h
- *
- * Created on: Oct 21, 2012
- * Author: holy
- */
-
#ifndef GRAPHICS_TEXTURE_H_
#define GRAPHICS_TEXTURE_H_
class Texture {
public:
- Texture();
+ explicit Texture(
+ SDL_Surface *surface = 0,
+ const geometry::Vector<int> &size = geometry::Vector<int>(),
+ const geometry::Vector<int> &offset = geometry::Vector<int>());
~Texture();
+ static const int TYPE_ID = 410;
+
public:
void Render(SDL_Surface *dest, const geometry::Vector<int> &from, const geometry::Vector<int> &to) const;
public:
void SetSurface(SDL_Surface *s) { surface = s; }
- void SetOffset(const geometry::Vector<int> &o) { offset = o; }
void SetSize(const geometry::Vector<int> &s) { size = s; }
+ void SetOffset(const geometry::Vector<int> &o) { offset = o; }
+
+ static void CreateTypeDescription();
+ static void Construct(void *);
private:
SDL_Surface *surface;
- geometry::Vector<int> offset;
geometry::Vector<int> size;
+ geometry::Vector<int> offset;
};