#ifndef __BULLET_H__
#define __BULLET_H__

#define DIR_UP 1
#define DIR_DOWN 2

#include <allegro.h>

#include "collide.h"

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

	void Set(int direction, float speed);
	void Draw(BITMAP *bmp);
	void SetBitmap(BITMAP *bmp);
	BITMAP *GetBitmap();
	CMask *GetMask();

	void Update();

	bool Active();
	void SetActive(bool which);

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

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

    private:
	float x, y;
	float dir;
	bool active;
	BITMAP *bullet;
	CMask *bulletmask;
};

#endif // __BULLET_H__