Maze.h
上传用户:sycq158
上传日期:2008-10-22
资源大小:15361k
文件大小:1k
- // 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_)