#ifndef GLOBAL_HPP
#define GLOBAL_HPP

#include "Game.hpp"

class Global
{
public:
	enum
	{
		PHASE_TITLE = 0,
		PHASE_LOGO,
		PHASE_TITLE2,
		PHASE_INITIALIZE_GAME,
		PHASE_GAME,
	};
	struct GameData
	{
		int highscore;
		int score;
		int volume;
	};
	Global(void);
	~Global(void);
	static Global* global;
	static Global& GetInstance();
	static void Initialize(void);
	static void Finalize(void);
	int phase;
	unsigned char back_color;
	Game game;
	int stage;
	int bgm_handle;
	int piyo_handle;
	int jump_handle;
	int knockdown_handle;
	int count;
	int draw_volume_count;
	unsigned int button_before;
	GameData gamedata;
	unsigned long micros_time;
	unsigned long interval_time;
	bool display_fps;
	unsigned long screen_flip_time;
private:
	Global(Global&);
	Global& operator = (Global&);
};

#endif
