Game.h
上传用户:whgydz
上传日期:2007-01-12
资源大小:2259k
文件大小:1k
源码类别:

其他书籍

开发平台:

HTML/CSS

  1. // Game.h: interface for the CGame class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_GAME_H__687221F3_ACFF_4D66_97DB_88AB70E0CA59__INCLUDED_)
  5. #define AFX_GAME_H__687221F3_ACFF_4D66_97DB_88AB70E0CA59__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include <d3dx8.h>
  10. #include "Base.h"
  11. #include "Cuboid.h"
  12. #include "Terrain.h"
  13. #include "Sphere.h"
  14. #include "Cone.h"
  15. #include "Cylinder.h"
  16. class CGame : public CBase
  17. {
  18. public:
  19. bool Initialise(HWND hWnd, UINT nWidth, UINT nHeight);
  20. void GameLoop();
  21. LPDIRECT3DDEVICE8 GetDevice();
  22. CGame();
  23. virtual ~CGame();
  24. private:
  25. bool InitialiseLights();
  26. D3DFORMAT CheckDisplayMode(UINT nWidth, UINT nHeight, UINT nDepth);
  27. bool InitialiseGame();
  28. bool InitialiseD3D(HWND hWnd, UINT nWidth, UINT nHeight);
  29. void Render();
  30. LPDIRECT3D8 m_pD3D;
  31. LPDIRECT3DDEVICE8 m_pD3DDevice;
  32. void SetupCamera();
  33. DWORD m_dwFrames;
  34. DWORD m_dwStartTime;
  35. DWORD m_dwEndTime;
  36. DWORD m_dwTotalPolygons;
  37. CSphere* m_pSphere1;
  38. CSphere* m_pSphere2;
  39. CSphere* m_pSphere3;
  40. CCylinder* m_pCylinder1;
  41. CCylinder* m_pCylinder2;
  42. CCone* m_pCone1;
  43. CCone* m_pCone2;
  44. };
  45. #endif // !defined(AFX_GAME_H__687221F3_ACFF_4D66_97DB_88AB70E0CA59__INCLUDED_)