/******************************************************************************
*******************************************************************************

	Bubble Fight EX
	relminator
	http://rel.betterwebber.com


	CircleSaw class


*******************************************************************************
******************************************************************************/

#include <nds.h>
#include <vector>
#include "Vector2df32.h"

#include "Spline.h"
#include "EntityContainer.h"
#include "StarFighter.h"
#include "Explosion.h"

#include "BossEntity.h"

#ifndef CIRCLESAW_H
#define CIRCLESAW_H

//------------------------------------------------------------------------------
//	CircleSaw Enemy
//------------------------------------------------------------------------------
class CircleSaw  : public BossEntity
{

public:
	
	CircleSaw();
	~CircleSaw();
	
	virtual void Init(int Palette, glImage* const Sprites );
	virtual void Update();
	virtual void Draw();
	virtual bool Collide( StarFighter &Star );
	virtual void Spawn();
	
	void LoadPath( int _sx, int _sy, int _ex, int _ey );
	
	
	virtual s32 GetX()
	{
		return x;
	}
	
	virtual s32 GetY()
	{
		return y;
	}
	
	virtual bool IsAlive()
	{
		return Alive;
	}
	
	virtual bool IsActive()
	{
		return Active;
	}
	
	virtual int GetDestroyedCounter()
	{
		return DestroyedCounter;
	}
	
	
	virtual void SetX( int _x )
	{
		x = _x;
	}
	
	virtual void SetY( int _y )
	{
		y = _y;
	}
	
	virtual void DecDestroyedCounter()
	{
		DestroyedCounter--;
	}
	
	virtual void SetDestroyedCounter( int val )
	{
		DestroyedCounter = val;
	}
	
	virtual void SetAlive( bool alive )
	{
		Alive = alive;
	}
	
	virtual void SetActive( bool active )
	{
		Active = active;
	}
		
private:
	s32		x;
	s32		y;
	bool	Alive;
	bool	Active;
	
	int		DestroyedCounter;
	
	
	s32		Rotation;
	s32  	Delta;
	int		Radius;
	
	int		Frame;
	int 	Counter;
	int 	Hp;
	
	EN_DRAW_MODE DrawMode;

	int ColorTable;		// init needed data for drawing
	glImage *Images;
	
	Spline Path;

	void ClosePath();
	
};

#endif // CIRCLESAW_H
