home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / XenonSource.exe / demo4 / gamestate.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-12  |  1.6 KB  |  81 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 CDemo4;
  25.  
  26. //-------------------------------------------------------------
  27. // File directories
  28.  
  29. #define DIRECTORY_ROOT            "..\\..\\"
  30. #define DIRECTORY_GRAPHICS        "..\\..\\graphics\\24bit\\"
  31. #define DIRECTORY_LEVELS        "..\\..\\Demo4\\Levels\\"
  32.  
  33. const int MAX_FILENAME_SIZE = 100;
  34.  
  35. //-------------------------------------------------------------
  36.  
  37. class CGameState
  38. {
  39.     private:
  40.  
  41.         static CDemo4 *m_demo4;
  42.  
  43.     protected:
  44.  
  45.         static gsCScreen m_screen;
  46.         static gsCKeyboard m_keyboard;
  47.  
  48.         static gsCFont m_small_font;
  49.         static gsCFont m_medium_font;
  50.         static gsCStarfield m_starfield;
  51.  
  52.         static CLevel m_level;
  53.         static CScene m_scene;
  54.  
  55.         static bool loadGraphics();
  56.  
  57.         gsCApplication *getApplication();
  58.  
  59.     public:
  60.  
  61.         CGameState();
  62.         virtual ~CGameState();
  63.  
  64.         static bool initialize(CDemo4 *demo4);
  65.         static bool shutdown();
  66.  
  67.         bool changeState(CGameState *new_game_state);
  68.  
  69.         virtual bool create();
  70.         virtual bool update();
  71.         virtual bool destroy();
  72.  
  73.         gsKeyCode getKey();
  74.         void getControl(Controls& controls,int player);
  75. };
  76.  
  77. //-------------------------------------------------------------
  78.  
  79. #endif
  80.  
  81.