npc.h
资源名称:3DRPG.rar [点击查看]
上传用户:cjwanglu
上传日期:2013-07-10
资源大小:4744k
文件大小:1k
源码类别:
游戏
开发平台:
Visual C++
- #include <d3dx9.h>
- #include <mmsystem.h>
- #include "Game.h"
- #define SafeRelease(pObject) if(pObject!=NULL){pObject->Release();pObject=NULL;}
- #define MESH_D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX1)
- class CNpc
- {
- public:
- CNpc(LPDIRECT3DDEVICE9 d3dd, LPSTR str);
- virtual ~CNpc();
- void RenderNpc();
- void Translate();
- void Translation(float x,float y,float z,float a,float k);
- LPD3DXMESH m_pNpc;
- D3DXMATRIX matWorld;
- private:
- POSITION pos;
- LPDIRECT3DDEVICE9 m_pD3DDevice;
- D3DMATERIAL9 * m_pMaterial;
- LPDIRECT3DTEXTURE9 * m_pTexture;
- DWORD m_dwNumOfMaterials;
- };