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. #include "Mesh.h"
  17. class CGame : public CBase
  18. {
  19. public:
  20. bool Initialise(HWND hWnd, UINT nWidth, UINT nHeight);
  21. void GameLoop();
  22. LPDIRECT3DDEVICE8 GetDevice();
  23. CGame();
  24. virtual ~CGame();
  25. private:
  26. bool InitialiseLights();
  27. D3DFORMAT CheckDisplayMode(UINT nWidth, UINT nHeight, UINT nDepth);
  28. bool InitialiseGame();
  29. bool InitialiseD3D(HWND hWnd, UINT nWidth, UINT nHeight);
  30. void Render();
  31. LPDIRECT3D8 m_pD3D;
  32. LPDIRECT3DDEVICE8 m_pD3DDevice;
  33. void SetupCamera();
  34. DWORD m_dwFrames;
  35. DWORD m_dwStartTime;
  36. DWORD m_dwEndTime;
  37. DWORD m_dwTotalPolygons;
  38. CMesh* m_pMesh1;
  39. CMesh* m_pMesh2;
  40. CMesh* m_pMesh3;
  41. };
  42. #endif // !defined(AFX_GAME_H__687221F3_ACFF_4D66_97DB_88AB70E0CA59__INCLUDED_)