⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gamemap.h

📁 纸牌源码
💻 H
字号:
#ifndef __GAMEMAP
#define __GAMEMAP

struct ANI_WIN
{
	//总开关
	int iStart;

	int x,y;
	int xoff,yoff;
	int id;	
	//行列
	int i,j;
};

class GAMEMAP
{
public:
	void Show();
	void SetDC(HDC hdest,HDC hsrc);
	void Init(HINSTANCE hInstance);
	void SetPaper();
	void DrawPaper(int id,int x,int y);
	void DrawClosePaper(int x,int y);
	
	void ShowRestPaper();
	void ShowFinishPaper();

	//mouse
	void LUPproc(int x,int y);
	void LDOWNproc(int x,int y);
	void LMOVEproc(int x,int y);
	void DrawCatchPaper();

	//
	void GetOneRestPaper();
	void ClearPaper();

	//
	int GetPutCol(int x,int y);
	int GetPutFinish(int x,int y);
	void GetPickCol(int x,int y);

	//
	int AddFinish(int icol);
	int AddCol(int iCol);

	int CheckWin();

	void ShowWin();
	void ShowWinStart();

	//
	void SetLevel(int i);

	//bug01
	//如果鼠标在窗口外松开,在mousemove中要清除移动的牌
	void ClearCatchPaper();

	void ShowBack();
	void SetShowBack(int i);

	GAMEMAP();
	~GAMEMAP();

//HANDLE
	HDC hdcdest;
	HDC hdcsrc;	
	HBITMAP hPaperBack;
	HBITMAP hPaper;

	HBRUSH hBrushEmpty;
	HBRUSH hback;

//DATA
	//剩余的牌
	int pRest[24];
	int iRestNum;

	//下边七列的牌
	int pCol[140];
	int pColNum[7];
	int pColTopY[7];

	//右上角四列牌
	int pFinish[52];
	int pFinishNum[4];

	int iRestPaperNow;

	int CatchPaper[13];

	int moveposx;
	int moveposy;
	int moveoffx;
	int moveoffy;
	
	int ipaperfrom;

	//是否处于移动状态
	int IsMove[52];
	int iColFrom;

	//难度等级
	int iLevel;

	//过关动画
	struct ANI_WIN aniwin;

	//显示
	int iShowBack;
};
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -