//

//CPlayerObject.h


/*******************************************************
//
//	Name: CPlayerObject.h
//
//	Author: Dave Ratti
//
//	Date: 2-26-02
//
//	Modified: 2-26-02
//
//	Notes: This is the bomberman class. The actual player that
//	moves around on the screen and drops bombs
//
//
//
*********************************************************/

#ifndef CPLAYER_OBJECT
#define CPLAYER_OBJECT

#include "CGameObject.h"
#include "CMap.h"
#include "STRINGC.h"
#include "CAnimation.h"
#include "CBombObject.h"

enum PlayerAnimation
{
	walkN = 0,
	walkW = 1,
	walkS = 2,
	walkE = 3,
	die   = 4	
};

#define TOTAL_PLAYER_ANIMATIONS 5

class CPlayerObject: public CGameObject
{

public:

	CPlayerObject();
	virtual ~CPlayerObject();

	void			Init(STRINGC fn);
	void			Move(Direction d);

	virtual void	Update();
	virtual void	Draw();
	virtual void	Collision(CGameObject* obj);

	Direction		getDirection(){ return m_Direction; };
	void			setDirection(Direction d){ m_Direction=d;};

	CBombObject*	getLastBombPlaced(){ return m_lastBombPlaced;};
	void			setLastBombPlaced(CBombObject* i);

	void			dropBomb();

	//these methods will be called by power oobjects
	//Note: All parameters are RELATIVE. ie - modifyMaxBombs(1) increases max bombs by 1. Not set maxBombs to 1
	void			modifyMaxBombs(int nbr=1);
	void			modifyBombStrength(int nbr=1);	
	void			modifyCurrentBombs(int nbr=-1);	//This should only be called when a bomb explodes

	virtual void	doAI(){ };
	virtual void	doAICollision(CGameObject* obj){ };
		
	
protected:

	Direction		m_Direction;
	PlayerAnimation m_currentAnimation;
	CAnimation		m_Animations[TOTAL_PLAYER_ANIMATIONS];
	POINT			m_lastPosition;
	POINT			m_AnchorDisplacement;	//This is the displacement from (0,0) on the image to the actual start of the collision box	

	//Last 2 bombs places. So we dont get stuck.
	//I really dont like how this is implemented. I need to think of something better.
	CBombObject*	m_lastBombPlaced;
	CBombObject*	m_lastBombPlaced2;
	int				m_bomb1ID;
	int				m_bomb2ID;

	//This are members that will be modded by powerups
	int				m_bombStrength;			//number of tiles to shoot bomb
	int				m_maxBombs;				//max boms that can be places at once
	int				m_currentBombsPlaced;	//current bombs places. Should never exceeed maxBombs
		


	

	

};


#endif