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 <stdio.h>
  11. #include "Helper.h"
  12. #include "Cuboid.h"
  13. class CGame  
  14. {
  15. public:
  16. void EnableLogging();
  17. void WriteToLog(char *lpszText, ...);
  18. bool Initialise(HWND hWnd, UINT nWidth, UINT nHeight);
  19. void GameLoop();
  20. LPDIRECT3DDEVICE8 GetDevice();
  21. CGame();
  22. virtual ~CGame();
  23. private:
  24. bool InitialiseLights();
  25. bool m_fEnableLogging;
  26. D3DFORMAT CheckDisplayMode(UINT nWidth, UINT nHeight, UINT nDepth);
  27. bool InitialiseGame();
  28. HRESULT 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. CCuboid* m_pCube1;
  37. CCuboid* m_pCube2;
  38. CCuboid* m_pCube3;
  39. CCuboid* m_pCube4;
  40. };
  41. #endif // !defined(AFX_GAME_H__687221F3_ACFF_4D66_97DB_88AB70E0CA59__INCLUDED_)