#ifndef __ANIM_H__
#define __ANIM_H__

#include <allegro.h>
#include <vector>

#include "collide.h"

class Anim
{
    public:
	Anim();
	~Anim();

	void AddFrame(BITMAP *bmp);
	void Clear();

	void Draw(BITMAP *bmp);
	void NextFrame();
	void PrevFrame();

	const Anim &operator=(const Anim &src);

	void SetX(float newx);
	void SetY(float newy);
	float X();
	float Y();

	int W();
	int H();

	bool Collide(CMask *mask, float bmpx, float bmpy);

	void SetActive(bool newactive);
	bool Active();

    private:
	vector<BITMAP *> bitmaps;
	vector<CMask *> masks;
	int curframe;

	float x,y;

	bool active;
};

#endif // __ANIM_H__