home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / XenonSource.exe / demo2 / gamestate.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-13  |  1.5 KB  |  79 lines

  1. //-------------------------------------------------------------
  2. //
  3. // Class:    CGameState
  4. //
  5. // Author:    John M Phillips
  6. //
  7. // Started:    06/05/00
  8. //
  9. // Base:    None
  10. //
  11. // Derived:    CMainMenuState
  12. //            COptionsMenuState
  13. //            CPlayGameState
  14. //            CScoreEntryState
  15. //            CScoreTableState
  16. //
  17. //-------------------------------------------------------------
  18.  
  19. #ifndef _INCLUDE_GAMESTATE_H
  20. #define _INCLUDE_GAMESTATE_H
  21.  
  22. //-------------------------------------------------------------
  23.  
  24. class CDemo2;
  25.  
  26. //-------------------------------------------------------------
  27. // File directories
  28.  
  29. #define DIRECTORY_ROOT            "..\\..\\"
  30. #define DIRECTORY_GRAPHICS        "..\\..\\graphics\\24bit\\"
  31.  
  32. const int MAX_FILENAME_SIZE = 100;
  33.  
  34. //-------------------------------------------------------------
  35.  
  36. class CGameState
  37. {
  38.     private:
  39.  
  40.         static CDemo2 *m_demo2;
  41.  
  42.     protected:
  43.  
  44.         static gsCScreen m_screen;
  45.         static gsCKeyboard m_keyboard;
  46.  
  47.         static gsCFont m_small_font;
  48.         static gsCFont m_medium_font;
  49.         static gsCStarfield m_starfield;
  50.  
  51.         static CScene m_scene;
  52.  
  53.         static bool loadGraphics();
  54.  
  55.         gsCApplication *getApplication();
  56.  
  57.     public:
  58.  
  59.         CGameState();
  60.         virtual ~CGameState();
  61.  
  62.         static bool initialize(CDemo2 *demo2);
  63.         static bool shutdown();
  64.  
  65.         bool changeState(CGameState *new_game_state);
  66.  
  67.         virtual bool create();
  68.         virtual bool update();
  69.         virtual bool destroy();
  70.  
  71.         gsKeyCode getKey();
  72.         void getControl(Controls& controls,int player);
  73. };
  74.  
  75. //-------------------------------------------------------------
  76.  
  77. #endif
  78.  
  79.