📄 maze.h
字号:
// Maze.h: interface for the CMaze class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_MAZE_H__75BF515B_BF5A_4235_A0FF_A432AB917CAC__INCLUDED_)
#define AFX_MAZE_H__75BF515B_BF5A_4235_A0FF_A432AB917CAC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CMaze
{
public:
void GetPathFindingArray(short* nPathArray, int nCols);
const char* GetName();
POINT GetRandDeployPoint();
void DisplayDeployRects(SIZE& sz, bool bDisplay = true);
bool IsHit(RECT& rcRect);
void DisplayGrid(bool bDisplay =false);
void Draw(CSurface *pSurface);
bool LoadMaze(char* pFilename);
CMaze(char* pszTextureBMP);
virtual ~CMaze();
protected:
BITMAP m_bmpTexture;
char* m_pszTextureBMP;
char m_szName[200]; // Name loaded from the first line in the file
bool m_bDisplayGrid;
bool m_bDisplayDeploy;
struct SMazeCoord {
union {
struct {
int nY;
int nX1, nX2;
};
struct {
int nX;
int nY1, nY2;
};
};
};
std::list<SMazeCoord> m_lVLines; // Vertical lines in the maze 迷宫竖直列的数据
std::list<SMazeCoord> m_lHLines; // Horizontal lines in the maze 迷宫水平行的数据
POINT *m_pPtDeploy; // Location of sprite deploy points on the maze 物品放置点
long m_nNoOfDeployPt;
SIZE m_szDeploy;
};
#endif // !defined(AFX_MAZE_H__75BF515B_BF5A_4235_A0FF_A432AB917CAC__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -