0001:
0002:
0003:
0004:
0005:
0006: #pragma once
0007:
0008:
0009:
0010:
0011:
0012:
0013:
0014: struct UserInput
0015: {
0016: BOOL bRotateUp;
0017: BOOL bRotateDown;
0018: BOOL bRotateLeft;
0019: BOOL bRotateRight;
0020: };
0021:
0022:
0023:
0024:
0025:
0026:
0027:
0028:
0029: class CMyD3DApplication : public CD3DApplication
0030: {
0031: LPDIRECT3DTEXTURE9 m_pTex;
0032: FLOAT m_TexWidth;
0033: FLOAT m_TexHeight;
0034:
0035:
0036: LPD3DXEFFECT m_pEffect;
0037: D3DXHANDLE m_hTechnique;
0038:
0039: BOOL m_bLoadingApp;
0040: CD3DFont* m_pFont;
0041: UserInput m_UserInput;
0042:
0043: protected:
0044: virtual HRESULT OneTimeSceneInit();
0045: virtual HRESULT InitDeviceObjects();
0046: virtual HRESULT RestoreDeviceObjects();
0047: virtual HRESULT InvalidateDeviceObjects();
0048: virtual HRESULT DeleteDeviceObjects();
0049: virtual HRESULT Render();
0050: virtual HRESULT FrameMove();
0051: virtual HRESULT FinalCleanup();
0052: virtual HRESULT ConfirmDevice( D3DCAPS9*, DWORD, D3DFORMAT );
0053:
0054: HRESULT RenderText();
0055:
0056: void UpdateInput( UserInput* pUserInput );
0057: public:
0058: LRESULT MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam );
0059: CMyD3DApplication();
0060: virtual ~CMyD3DApplication();
0061: };
0062:
0063: