#ifndef _SPRITE_H_
#define _SPRITE_H_

#include "Visualisation.h"
#include "Colour.h"
struct SDL_Surface;

class Sprite
{
	public:
	Sprite(const SpriteID &id);
	~Sprite();

	void InitFromFile(char* filename);
	void Draw(const unsigned int &x, const unsigned int &y, unsigned int frame = 0);
	void Shutdown();

	SpriteID GetID() { return m_ID; }

	unsigned int GetNumFrames() { return m_numFrames; }
	unsigned int GetWidth() { return m_width; }
	unsigned int GetHeight() { return m_height; }
	ColourRGB GetColour() { return m_colour; }
	
	protected:
	void WritePixel(SDL_Surface *surface, int x, int y, const ColourRGB &colour);

	unsigned int m_numFrames, m_width, m_height;
	SDL_Surface* m_pFrames;
	ColourRGB m_colour;
	SpriteID m_ID;
};

#endif
