class Frame {
public:
- Frame(SDL_Surface *s, int borderWidth, int borderHeight, int repeatWidth = 1, int repeatHeight = 1, int xOffset = 0, int yOffset = 0)
+ explicit Frame(SDL_Surface *s = 0, int borderWidth = 1, int borderHeight = 1, int repeatWidth = 1, int repeatHeight = 1, int xOffset = 0, int yOffset = 0)
: surface(s), borderSize(borderWidth, borderHeight), repeatSize(repeatWidth, repeatHeight), offset(xOffset, yOffset) { }
public:
const geometry::Vector<int> RepeatSize() const { return repeatSize; }
void Draw(SDL_Surface *dest, const geometry::Vector<int> &position, int width, int height) const;
+public:
+ void SetSurface(SDL_Surface *s) { surface = s; }
+ void SetBorderSize(const geometry::Vector<int> &s) { borderSize = s; }
+ void SetRepeatSize(const geometry::Vector<int> &s) { repeatSize = s; }
+ void SetOffset(const geometry::Vector<int> &o) { offset = o; }
+
private:
SDL_Surface *surface;
geometry::Vector<int> borderSize;