home *** CD-ROM | disk | FTP | other *** search
/ Programming a Multiplayer FPS in DirectX / Programming a Multiplayer FPS in DirectX (Companion CD).iso / Source / Chapter 5 / Engine / State.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2004-10-01  |  2.1 KB  |  64 lines

  1. //-----------------------------------------------------------------------------
  2. // State.h implementation.
  3. // Refer to the State.h interface for more details.
  4. //
  5. // Programming a Multiplayer First Person Shooter in DirectX
  6. // Copyright (c) 2004 Vaughan Young
  7. //-----------------------------------------------------------------------------
  8. #include "Engine.h"
  9.  
  10. //-----------------------------------------------------------------------------
  11. // The state class constructor.
  12. //-----------------------------------------------------------------------------
  13. State::State( unsigned long id )
  14. {
  15.     m_id = id;
  16. }
  17.  
  18. //-----------------------------------------------------------------------------
  19. // Allows the state to preform any pre-processing construction.
  20. //-----------------------------------------------------------------------------
  21. void State::Load()
  22. {
  23.  
  24. }
  25.  
  26. //-----------------------------------------------------------------------------
  27. // Allows the state to preform any post-processing destruction.
  28. //-----------------------------------------------------------------------------
  29. void State::Close()
  30. {
  31.  
  32. }
  33.  
  34. //-----------------------------------------------------------------------------
  35. // Returns the view setup details for the given frame.
  36. //-----------------------------------------------------------------------------
  37. void State::RequestViewer( ViewerSetup *viewer )
  38. {
  39.     viewer->viewClearFlags = 0;
  40. }
  41.  
  42. //-----------------------------------------------------------------------------
  43. // Updates the state.
  44. //-----------------------------------------------------------------------------
  45. void State::Update( float elapsed )
  46. {
  47.  
  48. }
  49.  
  50. //-----------------------------------------------------------------------------
  51. // Renders the state.
  52. //-----------------------------------------------------------------------------
  53. void State::Render()
  54. {
  55.  
  56. }
  57.  
  58. //-----------------------------------------------------------------------------
  59. // Returns the state's ID.
  60. //-----------------------------------------------------------------------------
  61. unsigned long State::GetID()
  62. {
  63.     return m_id;
  64. }