home *** CD-ROM | disk | FTP | other *** search
/ Programming a Multiplayer FPS in DirectX / Programming a Multiplayer FPS in DirectX (Companion CD).iso / Source / Chapter 3 / Engine / State.h < prev   
Encoding:
C/C++ Source or Header  |  2004-10-01  |  1.1 KB  |  39 lines

  1. //-----------------------------------------------------------------------------
  2. // Base state functionality. Applications must derive new states from this
  3. // class to add to the engine.
  4. //
  5. // Programming a Multiplayer First Person Shooter in DirectX
  6. // Copyright (c) 2004 Vaughan Young
  7. //-----------------------------------------------------------------------------
  8. #ifndef STATE_H
  9. #define STATE_H
  10.  
  11. //-----------------------------------------------------------------------------
  12. // Viewer Setup Structure
  13. //-----------------------------------------------------------------------------
  14. struct ViewerSetup
  15. {
  16. };
  17.  
  18. //-----------------------------------------------------------------------------
  19. // State Class
  20. //-----------------------------------------------------------------------------
  21. class State
  22. {
  23. public:
  24.     State( unsigned long id = 0 );
  25.  
  26.     virtual void Load();
  27.     virtual void Close();
  28.  
  29.     virtual void RequestViewer( ViewerSetup *viewer );
  30.     virtual void Update( float elapsed );
  31.     virtual void Render();
  32.  
  33.     unsigned long GetID();
  34.  
  35. private:
  36.     unsigned long m_id; // Application defined ID (must be unique for state switching).
  37. };
  38.  
  39. #endif