Panel.h
资源名称:3DRPG.rar [点击查看]
上传用户:cjwanglu
上传日期:2013-07-10
资源大小:4744k
文件大小:1k
源码类别:
游戏
开发平台:
Visual C++
- #include <d3dx9.h>
- #include "Game.h"
- #define PANEL_D3DFVF_VERTEXBUFFER (D3DFVF_XYZ|D3DFVF_TEX2)
- class CPanel
- {
- private:
- HRESULT SetTexture();
- void SetVertexBuffer();
- void UpdateVertex();
- LPDIRECT3DDEVICE9 m_pD3DDevice;
- LPDIRECT3DVERTEXBUFFER9 m_pBuffer;
- LPDIRECT3DTEXTURE9 m_pTexture;
- LPDIRECT3DTEXTURE9 m_pTexture_1;
- int m_nWidth;
- int m_nHeight;
- RECT m_Rect;//面板
- int m_nScreenWidth;
- int m_nScreenHeight;
- struct VERTEX
- {
- float x,y,z;
- float tu,tv;
- float tu1,tv1;
- };
- LPDIRECT3DVERTEXBUFFER9 m_pIconBuffer;
- LPDIRECT3DTEXTURE9 m_pIconTx;
- LPDIRECT3DTEXTURE9 * m_ArrayOfTx;
- int IconVer;
- int TxOfIcon;
- POSS Calculate(RECT rect);
- POSS RolePanel;
- public:
- CPanel(LPDIRECT3DDEVICE9 d3dd,int nWidth,int nHeight,int nScreenWidth,int nScreenHeight);
- virtual ~CPanel();
- void RenderPanel();
- void Render();
- void Translate(int x,int y);
- POSS * NumOfPos;
- bool * ButtonPress;
- bool * CallPress;
- int NIcon;
- bool * Result;
- };