home *** CD-ROM | disk | FTP | other *** search
/ Programming an RTS Game with Direct3D / Programming an RTS Game with Direct3D.iso / Examples / Chapter 15 / Example 15.2 / app.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-07-17  |  893 b   |  46 lines

  1. #ifndef _RTS_APP_
  2. #define _RTS_APP_
  3.  
  4. #include <windows.h>
  5. #include <d3dx9.h>
  6. #include "debug.h"
  7. #include "mouse.h"
  8. #include "network.h"
  9. #include "lobby.h"
  10. #include "camera.h"
  11. #include "terrain.h"
  12. #include "player.h"
  13.  
  14. extern NETWORK network;
  15.  
  16. class APPLICATION
  17. {
  18.     friend class LOBBY;
  19.     public:
  20.         
  21.         APPLICATION();
  22.         HRESULT Init(HINSTANCE hInstance, int width, int height, bool windowed);
  23.         HRESULT Update(float deltaTime);
  24.         HRESULT Render();
  25.         HRESULT Cleanup();
  26.         HRESULT Quit();
  27.         DWORD FtoDword(float f){return *((DWORD*)&f);}
  28.         void AddPlayers(int num, int activePlayer);
  29.         void HandleNetworkOrder(RTS_MSG *msg);
  30.  
  31.         //Public variables
  32.         TERRAIN m_terrain;
  33.         CAMERA m_camera;
  34.         MOUSE m_mouse;
  35.         LOBBY m_lobby;    
  36.         std::vector<PLAYER*> m_players;        
  37.  
  38.     private:
  39.  
  40.         IDirect3DDevice9* m_pDevice;
  41.         int m_thisPlayer;
  42.         HWND m_mainWindow;            
  43. };
  44.  
  45. #endif
  46.