Open.h
资源名称:3DRPG.rar [点击查看]
上传用户:cjwanglu
上传日期:2013-07-10
资源大小:4744k
文件大小:2k
源码类别:
游戏
开发平台:
Visual C++
- #include <d3dx9.h>
- #include <dinput.h>
- #include <dinputd.h>
- #include "Sound.h"
- //#include "Music.h"
- #define OPEN_D3DFVF_VERTEXBUFFER (D3DFVF_XYZ|D3DFVF_TEX2)
- struct POS
- {
- float ltx,lty,lbx,lby,rtx,rty,rbx,rby;
- };
- class COpen
- {
- private:
- void SetTexture();
- void SetVertexBuffer();
- void UpdateVertex();
- void SetCamera2D();
- void Render2D();
- HINSTANCE hInst;
- HWND hWnd;
- LPDIRECT3D9 m_pD3D;
- LPDIRECT3DDEVICE9 m_pD3DDevice;
- LPDIRECT3DVERTEXBUFFER9 m_pBuffer;
- LPDIRECT3DTEXTURE9 m_pTexture;
- LPDIRECT3DVERTEXBUFFER9 m_pIconBuffer;
- LPDIRECT3DTEXTURE9 m_pIconTx;
- LPDIRECT3DTEXTURE9 * m_ArrayOfTx;
- LPDIRECT3DTEXTURE9 * m_pTx;
- 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;
- };
- LPDIRECTINPUT8 m_pInput;
- LPDIRECTINPUTDEVICE8 m_pInputDevice;
- DIMOUSESTATE m_MouseState;
- DIMOUSESTATE m_MouseStateOld;
- LPDIRECTINPUTDEVICE8 m_pMouseInput;
- POINT m_Point;
- int NIcon;
- int IconVer;
- int TxOfIcon;
- POS Calculate(RECT rect);
- POS * NumOfPos;
- BOOL window;
- bool * ButtonPress;
- //CSound * m_pSound;
- //CMusic * m_pMusic;
- CSound * m_pMusic;
- CSound * m_pSound;
- bool * mygod;
- bool * motherfuck;
- bool * present;
- public:
- bool bOpen;//开场判断
- COpen(HINSTANCE hinst,HWND hwnd);
- virtual ~COpen();
- void OpenLoop();
- void RenderOpen();
- void Translate(int x,int y);
- void Update();
- void Control(bool * fuck);
- };