| 1 | /*! | 
|---|
| 2 |  * @file game_world_data.h | 
|---|
| 3 |  *  container for all game world data | 
|---|
| 4 |  */ | 
|---|
| 5 |  | 
|---|
| 6 | #ifndef _GAME_WORLD_DATA_H | 
|---|
| 7 | #define _GAME_WORLD_DATA_H | 
|---|
| 8 |  | 
|---|
| 9 | #include "sdlincl.h" | 
|---|
| 10 | #include "data_tank.h" | 
|---|
| 11 | #include "error.h" | 
|---|
| 12 | #include "object_manager.h" | 
|---|
| 13 |  | 
|---|
| 14 | class Camera; | 
|---|
| 15 | class Player; | 
|---|
| 16 | class Terrain; | 
|---|
| 17 | class WorldEntity; | 
|---|
| 18 |  | 
|---|
| 19 | class GLMenuImageScreen; | 
|---|
| 20 |  | 
|---|
| 21 | namespace OrxSound {class OggPlayer;} | 
|---|
| 22 | class GameRules; | 
|---|
| 23 |  | 
|---|
| 24 |  | 
|---|
| 25 | //! The game world data | 
|---|
| 26 | /** | 
|---|
| 27 |  * this class is a containter for the data of the GameWorld. It just loads and unloads it | 
|---|
| 28 |  * the game start/stop process is not contained here and can be found in the GameWorld class. | 
|---|
| 29 |  */ | 
|---|
| 30 | class GameWorldData : public DataTank | 
|---|
| 31 | { | 
|---|
| 32 |   ObjectListDeclaration(GameWorldData); | 
|---|
| 33 |   public: | 
|---|
| 34 |     GameWorldData(); | 
|---|
| 35 |     virtual ~GameWorldData(); | 
|---|
| 36 |  | 
|---|
| 37 |     virtual ErrorMessage init(); | 
|---|
| 38 |     virtual ErrorMessage loadData(const TiXmlElement* root); | 
|---|
| 39 |     virtual ErrorMessage unloadData(); | 
|---|
| 40 |  | 
|---|
| 41 |     /* interface functions */ | 
|---|
| 42 |     void setSoundTrack(const std::string& name); | 
|---|
| 43 |     void loadGameRule(const TiXmlElement* root); | 
|---|
| 44 |  | 
|---|
| 45 |  | 
|---|
| 46 |   protected: | 
|---|
| 47 |     virtual ErrorMessage loadGUI(const TiXmlElement* root); | 
|---|
| 48 |     virtual ErrorMessage loadWorldEntities(const TiXmlElement* root); | 
|---|
| 49 |     virtual ErrorMessage loadScene(const TiXmlElement* root); | 
|---|
| 50 |  | 
|---|
| 51 |     virtual ErrorMessage unloadGUI(); | 
|---|
| 52 |     virtual ErrorMessage unloadWorldEntities(); | 
|---|
| 53 |     virtual ErrorMessage unloadScene(); | 
|---|
| 54 |  | 
|---|
| 55 |   public: | 
|---|
| 56 |     GLMenuImageScreen*            glmis;          //!< The Level-Loader Display | 
|---|
| 57 |  | 
|---|
| 58 |     Camera*                       localCamera;    //!< The current camera | 
|---|
| 59 |     Player*                       localPlayer;    //!< The player, you fly through the level. | 
|---|
| 60 |     WorldEntity*                  sky;            //!< The environmental sky of orxonox | 
|---|
| 61 |     Terrain*                      terrain;        //!< The terrain - ground | 
|---|
| 62 |  | 
|---|
| 63 |     OrxSound::OggPlayer*          music;          //!< Reference to the SoundEngine's music player (OggPlayer) | 
|---|
| 64 |     ObjectManager*                objectManager;  //!< Reference to the objects manager | 
|---|
| 65 |  | 
|---|
| 66 |     GameRules*                    gameRule;       //!< Reference to the game rules of this game | 
|---|
| 67 |  | 
|---|
| 68 |     std::vector<OM_LIST>          tickLists;      //!< The Lists in the GameWorld that should be ticked. | 
|---|
| 69 |     std::vector<OM_LIST>          drawLists;      //!< The Lists in the GameWorld, that should be drawn. | 
|---|
| 70 | }; | 
|---|
| 71 |  | 
|---|
| 72 | #endif /* _GAME_WORLD_DATA_H */ | 
|---|
| 73 |  | 
|---|