Changed *.h files to *.hpp

This commit is contained in:
Kayne Ruse
2013-05-01 21:11:04 +10:00
parent cf82679109
commit 63aa248056
21 changed files with 47 additions and 47 deletions
+44
View File
@@ -0,0 +1,44 @@
#ifndef SPRITESHEET_HPP_
#define SPRITESHEET_HPP_
#include "image.hpp"
#include "SDL/SDL.h"
class SpriteSheet : protected Image {
public:
SpriteSheet(SDL_Surface*, Uint16 w, Uint16 h);
virtual ~SpriteSheet() {}
void Update(int delta);
void SetSurface(SDL_Surface*, Uint16 w, Uint16 h);
using Image::GetSurface;
using Image::DrawTo;
//these aren't regulated; be careful
int SetWidth(int i) { return SetClipW(i); };
int SetHeight(int i) { return SetClipH(i); };
int SetFrames(int i) { currentFrame = 0; return maxFrames = i; };
int SetStrips(int i) { currentStrip = 0; return maxStrips = i; };
int GetWidth() const { return GetClipW(); }
int GetHeight() const { return GetClipH(); }
int GetFrames() const { return maxFrames; }
int GetStrips() const { return maxStrips; }
int SetCurrentFrame(int i) { return currentFrame = i; };
int SetCurrentStrip(int i) { return currentStrip = i; };
int SetInterval(int i) { return interval = i; }
int GetCurrentFrame() const { return currentFrame; };
int GetCurrentStrip() const { return currentStrip; };
int GetInterval() const { return interval; };
private:
int currentFrame, maxFrames;
int currentStrip, maxStrips;
int interval, ticks;
};
#endif