[6402] | 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" |
---|
[6404] | 10 | #include "data_tank.h" |
---|
[6402] | 11 | #include "error.h" |
---|
[7368] | 12 | #include "object_manager.h" |
---|
[6402] | 13 | |
---|
| 14 | class Camera; |
---|
| 15 | class Player; |
---|
| 16 | class Terrain; |
---|
| 17 | class WorldEntity; |
---|
| 18 | |
---|
| 19 | class GLMenuImageScreen; |
---|
| 20 | |
---|
[7460] | 21 | namespace OrxSound {class OggPlayer;} |
---|
[7020] | 22 | class GameRules; |
---|
[6402] | 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 | */ |
---|
[6404] | 30 | class GameWorldData : public DataTank |
---|
[6402] | 31 | { |
---|
| 32 | public: |
---|
| 33 | GameWorldData(); |
---|
| 34 | virtual ~GameWorldData(); |
---|
| 35 | |
---|
| 36 | virtual ErrorMessage init(); |
---|
[7370] | 37 | virtual ErrorMessage loadData(const TiXmlElement* root); |
---|
[6402] | 38 | virtual ErrorMessage unloadData(); |
---|
| 39 | |
---|
[6634] | 40 | /* interface functions */ |
---|
[7221] | 41 | void setSoundTrack(const std::string& name); |
---|
[7020] | 42 | void loadGameRule(const TiXmlElement* root); |
---|
[6402] | 43 | |
---|
[9406] | 44 | |
---|
[6404] | 45 | protected: |
---|
[7370] | 46 | virtual ErrorMessage loadGUI(const TiXmlElement* root); |
---|
| 47 | virtual ErrorMessage loadWorldEntities(const TiXmlElement* root); |
---|
| 48 | virtual ErrorMessage loadScene(const TiXmlElement* root); |
---|
[6402] | 49 | |
---|
| 50 | virtual ErrorMessage unloadGUI(); |
---|
| 51 | virtual ErrorMessage unloadWorldEntities(); |
---|
| 52 | virtual ErrorMessage unloadScene(); |
---|
| 53 | |
---|
| 54 | public: |
---|
[7368] | 55 | GLMenuImageScreen* glmis; //!< The Level-Loader Display |
---|
[6402] | 56 | |
---|
[7368] | 57 | Camera* localCamera; //!< The current camera |
---|
| 58 | Player* localPlayer; //!< The player, you fly through the level. |
---|
| 59 | WorldEntity* sky; //!< The environmental sky of orxonox |
---|
| 60 | Terrain* terrain; //!< The terrain - ground |
---|
[6402] | 61 | |
---|
[7460] | 62 | OrxSound::OggPlayer* music; //!< Reference to the SoundEngine's music player (OggPlayer) |
---|
[7368] | 63 | ObjectManager* objectManager; //!< Reference to the objects manager |
---|
[7020] | 64 | |
---|
[7368] | 65 | GameRules* gameRule; //!< Reference to the game rules of this game |
---|
| 66 | |
---|
[7370] | 67 | std::vector<OM_LIST> tickLists; //!< The Lists in the GameWorld that should be ticked. |
---|
| 68 | std::vector<OM_LIST> drawLists; //!< The Lists in the GameWorld, that should be drawn. |
---|
[6402] | 69 | }; |
---|
| 70 | |
---|
| 71 | #endif /* _GAME_WORLD_DATA_H */ |
---|
| 72 | |
---|