
#include <iostream>
#include <fstream>  
using namespace std;
class cRenderClass
{
public:

	cRenderClass(const int, const int);
	~cRenderClass();

	void create(int argc, _TCHAR* argv[]);
	void loop();

	void clear();

	void render();
	void setColour(float, float, float);
	void setPointSize(int);
	void drawPixel(int, int);

private:

	int		 m_sw, m_sh;
	int		 m_point_size;
	float	*m_buffer;
	sRGB	 m_colour;
};



//先把烟花开放的时候弄成结构体
struct Jet
{
	int x, y; //坐标
	int hx, hy;  //最高点
	int height;
	bool shoot;
	DWORD t1, t2, dt;
	int img[2];
	byte n : 1;
};

//搞个烟花结构体
struct Fire //int a;
{
	int r;
	int maxr;
	int x, y; //坐标
	int cen_x, cen_y; //中心点，后面用得上
	int width, height;//img size
	int xy[100][100]; //240*240
	bool show;
	bool draw;
	DWORD t1, t2, dt; //模拟爆炸过程会用到的速度等参数
};


class Fireworks {
public :
	Fire fire;
	Jet jet;
	int game = 1;
	class Fireworks *fireworks;
	Fireworks();
	//初始化
	void Init();
	void Load();
	void Shoot();

	void ShowFire(float m_buffer[], int m_sw,int m_sh);
	void ChoiseRelu();
	~Fireworks();

};