#ifndef PLAYER_HPP
#define PLAYER_HPP

class BgMap;
class Enemy;

class Player
{
public:
	enum
	{
		LIMIT_Y = (Screen::HEIGHT - 10) * 1000,
		START_X = 32000,
		START_Y = (Screen::HEIGHT - 20) * 1000,
		ACCEL_SPEED = 300,
		STOP_SPEED = 300,
		GRAVITY = 2 * 1000,
		JUMP_FORTH = 9 * 1000,
		JUMP_KEEP_ACCEL = 3 * 1000,
		JUMP_KEEP_COUNT = 6,
		VX_MAX = 2 * 1000,
		VY_MAX = 9 * 1000,
		// Scroll
		SCROLL_LEFT = 32 * 1000,
		SCROLL_RIGHT = (Screen::WIDTH - 42) * 1000,
		// Status
		STATUS_DEAD = 0,
		STATUS_ALIVE,
	};
	Player(void);
	~Player(void);
	void Initialize(BgMap* bg_map);
	void Update(int& map_x, int& map_y);
	void Draw(void);
	unsigned int GetStatus(void);
	bool Collision(Enemy* enemy);
	void SetFootHit(void);
	void GetPosition(int& x, int& y);
	void Dead(void);
private:
	Player(Player&);
	Player& operator = (Player&);
	int x;
	int y;
	int vx;
	int vy;
	bool permit_jump;
	bool jump;
	int jump_keep_count;
	bool jump_keep;
	int anime_count;
	BgMap* bg_map;
	bool alive;
	int dead_count;
};

#endif
