home *** CD-ROM | disk | FTP | other *** search
/ Programming a Multiplayer FPS in DirectX / Programming a Multiplayer FPS in DirectX (Companion CD).iso / Source / Chapter 9 / Engine / State.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2004-10-01  |  2.1 KB  |  65 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->viewer = NULL;
  40.     viewer->viewClearFlags = 0;
  41. }
  42.  
  43. //-----------------------------------------------------------------------------
  44. // Updates the state.
  45. //-----------------------------------------------------------------------------
  46. void State::Update( float elapsed )
  47. {
  48.  
  49. }
  50.  
  51. //-----------------------------------------------------------------------------
  52. // Renders the state.
  53. //-----------------------------------------------------------------------------
  54. void State::Render()
  55. {
  56.  
  57. }
  58.  
  59. //-----------------------------------------------------------------------------
  60. // Returns the state's ID.
  61. //-----------------------------------------------------------------------------
  62. unsigned long State::GetID()
  63. {
  64.     return m_id;
  65. }