map.h

来自「diablo图形引擎例子」· C头文件 代码 · 共 55 行

H
55
字号
// Map.h: interface for the Map class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MAP_H__297D1E25_69E1_11D3_AC0B_0000E8CED079__INCLUDED_)
#define AFX_MAP_H__297D1E25_69E1_11D3_AC0B_0000E8CED079__INCLUDED_

#include <windows.h>
#include "Internal.h"
#include "ImageList.h"
#include "Charactar.h"

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

typedef struct tapZorderBuffer
{
	int x,y;
	int type;
	int index;
	int tx,ty;
	int xa,ya;
	int k;
}ZorderBuffer;


class Map  
{
public:
	void SortY();
	int m_ztt;
	void DrawIt(WORD *lpBitmap,long lPitch);
	void SaveAllPos(int x,int y);
	ZorderBuffer ZBuffer[10000];
	Charactar * m_lpCharactar;
	bool GetMoveStatus(int x,int y);
	void CreateCharactar(bool bColorMode);
	void DrawMapLayer(int x,int y,WORD *lpBitmap,long lPitch);
	bool LoadMapCGL(char *lpszFilename,bool bColorMode);
	bool LoadMapFile(char *lpszFilename);
	POINT m_Cursor;
	ImageList * m_lpImageList;
	MAPFILEHEADER * m_lpMapFileHeader;
	MAPBLOCK *m_lpMapBlock; // 地图单元
	
	
	void ConvertPosition(int & x,int & y);
	Map();
	virtual ~Map();

};

#endif // !defined(AFX_MAP_H__297D1E25_69E1_11D3_AC0B_0000E8CED079__INCLUDED_)

⌨️ 快捷键说明

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