MirGameMap.h
资源名称:盛大传奇外挂原代码.rar [点击查看]
上传用户:marco7834
上传日期:2010-02-24
资源大小:82k
文件大小:2k
源码类别:
游戏引擎
开发平台:
Visual C++
- // MirGameMap.h: interface for the CMirGameMap class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_MIRGAMEMAP_H__B9FBC32F_6149_4584_9845_4E26E7E71DE9__INCLUDED_)
- #define AFX_MIRGAMEMAP_H__B9FBC32F_6149_4584_9845_4E26E7E71DE9__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- enum __MAPOBJECT
- {
- MOBJ_PLAYER,
- MOBJ_NPC,
- MOBJ_MONSTER,
- MOBJ_ATTACKER,
- MOBJ_TARGET,
- MOBJ_GROUP,
- MOBJ_GUILD,
- MOBJ_TEACHER,
- MOBJ_STUDENT,
- MOBJ_HUSBAND,
- MOBJ_WIFE,
- MOBJ_UNREACH,
- MOBJ_CANREACH,
- MOBJ_TELEPORT,
- };
- typedef struct
- {
- short tile;
- short smtile;
- short object;
- char flag;
- char offset;
- char framecount;
- char delaytime;
- char objgroup;
- char unused;
- }MIRMAPBLOCK;
- typedef struct
- {
- WORD width;
- WORD height;
- char t[48];
- }MIRMAPHEADER;
- typedef struct
- {
- HBRUSH hbr;
- DWORD dwColor;
- }MAPDRAWCOLOR;
- class CMirGameMap
- {
- public:
- BOOL TestMap( int x, int y );
- BOOL TestMapTo( int x, int y, int dir );
- void SetPersonInfo( DWORD x, DWORD y, DWORD dir );
- BOOL SetGameMap( char * mapname, DWORD x, DWORD y );
- void Draw( HDC dc, int dx, int dy);
- CMirGameMap();
- virtual ~CMirGameMap();
- private:
- MIRMAPBLOCK* Loadmap( char * map );
- MIRMAPHEADER m_Header;
- MIRMAPBLOCK * m_pData;
- DWORD m_xpos;
- DWORD m_ypos;
- DWORD m_dir;
- int m_DrawWidth;
- int m_DrawHeight;
- int m_DrawMapWidth;
- int m_DrawMapHeight;
- MAPDRAWCOLOR m_DrawColor[MOBJ_TELEPORT + 1];
- };
- #endif // !defined(AFX_MIRGAMEMAP_H__B9FBC32F_6149_4584_9845_4E26E7E71DE9__INCLUDED_)