Imported updates from Codebase

This commit is contained in:
Kayne Ruse
2013-05-15 19:49:27 +10:00
parent 9f76b19a3c
commit 613d9cec08
13 changed files with 383 additions and 50 deletions
+16 -15
View File
@@ -26,30 +26,31 @@
class Image {
public:
Image();
Image(SDL_Surface*);
Image(SDL_Surface*, SDL_Rect);
virtual ~Image() {}
SDL_Surface* SetSurface(SDL_Surface*);
SDL_Surface* SetSurface(SDL_Surface*, SDL_Rect);
SDL_Surface* GetSurface() const;
virtual SDL_Surface* SetSurface(SDL_Surface*);
virtual SDL_Surface* SetSurface(SDL_Surface*, SDL_Rect);
virtual SDL_Surface* GetSurface() const;
void DrawTo(SDL_Surface* const, Sint16 x, Sint16 y);
virtual void DrawTo(SDL_Surface* const, Sint16 x, Sint16 y);
//Clip handlers
SDL_Rect SetClip(SDL_Rect r) { return clip = r; }
SDL_Rect GetClip() const { return clip; }
virtual SDL_Rect SetClip(SDL_Rect r) { return clip = r; }
virtual SDL_Rect GetClip() const { return clip; }
Sint16 SetClipX(Sint16 x) { return clip.x = x; }
Sint16 SetClipY(Sint16 y) { return clip.y = y; }
Uint16 SetClipW(Uint16 w) { return clip.w = w; }
Uint16 SetClipH(Uint16 h) { return clip.h = h; }
virtual Sint16 SetClipX(Sint16 x) { return clip.x = x; }
virtual Sint16 SetClipY(Sint16 y) { return clip.y = y; }
virtual Uint16 SetClipW(Uint16 w) { return clip.w = w; }
virtual Uint16 SetClipH(Uint16 h) { return clip.h = h; }
Sint16 GetClipX() const { return clip.x; }
Sint16 GetClipY() const { return clip.y; }
Uint16 GetClipW() const { return clip.w; }
Uint16 GetClipH() const { return clip.h; }
private:
virtual Sint16 GetClipX() const { return clip.x; }
virtual Sint16 GetClipY() const { return clip.y; }
virtual Uint16 GetClipW() const { return clip.w; }
virtual Uint16 GetClipH() const { return clip.h; }
protected:
SDL_Surface* surface;
SDL_Rect clip;
};