/*
 *  Sprite.h
 *  iphone-gl-app
 *
 *  Created by John Ryland on 8/06/09.
 *  Copyright 2009 InvertedLogic. All rights reserved.
 *
 */

#ifndef SPRITE_H
#define SPRITE_H


#include "Iterators.h"
#include "Texture.h"
#include "PointF.h"


class Sprite
{
public:
	Sprite(const float verts[4], Texture *tex, int x1 = -1, int y1 = -1, int w = -1, int h = -1, int xAdv = -1, int yAdv = -1, int frames = -1);
	~Sprite();

	void reset();
	void translate(float x, float y);
	void rotate(float rot);
	void scale(float s);
	void scale(float x, float y);

	void advance(int frames = 1);
	void draw();

	void setFrame(int f);
	void setAlpha(float a);
	void setTextureRect(int x, int y, int w, int h);

private:
	void *dptr;
};


#endif // SPRITE_H
