Changeset 6352 in orxonox.OLD for branches/network/src
- Timestamp:
- Dec 30, 2005, 7:12:10 PM (19 years ago)
- Location:
- branches/network/src/story_entities
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/story_entities/world.h
r6152 r6352 1 1 /*! 2 2 * @file world.h 3 4 */3 * Holds and manages all game data 4 */ 5 5 6 6 #ifndef _WORLD_H 7 7 #define _WORLD_H 8 8 9 #include "sdlincl.h" 10 #include "story_entity.h" 11 #include "object_manager.h" 9 #include "game_world.h" 12 10 13 11 class WorldEntity; … … 23 21 //! The game world 24 22 /** 25 this class initializes everything that should be displayed inside of the current level. 26 it is the main driving factor during gameplay. 27 */ 28 class World : public StoryEntity { 23 * this class initializes everything that should be displayed inside of the current level. 24 * it is the main driving factor during gameplay. 25 */ 26 class Planet : public GameWorld 27 { 29 28 30 public:31 World(const TiXmlElement* root = NULL);32 virtual ~World();29 public: 30 Planet (const TiXmlElement* root = NULL); 31 virtual ~Planet (); 33 32 34 void loadParams(const TiXmlElement* root);33 void loadParams(const TiXmlElement* root); 35 34 36 double getGameTime();37 35 38 /* classes from story-entity */39 virtual ErrorMessage preLoad();40 virtual ErrorMessage load ();41 virtual ErrorMessage postLoad();36 /* classes from story-entity */ 37 virtual ErrorMessage preLoad(); 38 virtual ErrorMessage load (); 39 virtual ErrorMessage postLoad(); 42 40 43 virtual ErrorMessage preStart();44 virtual ErrorMessage start ();45 virtual ErrorMessage stop ();46 virtual ErrorMessage pause ();47 virtual ErrorMessage resume ();48 virtual ErrorMessage destroy ();41 virtual ErrorMessage preStart(); 42 virtual ErrorMessage start (); 43 virtual ErrorMessage stop (); 44 virtual ErrorMessage pause (); 45 virtual ErrorMessage resume (); 46 virtual ErrorMessage destroy (); 49 47 50 void displayLoadScreen();51 void releaseLoadScreen();48 virtual void displayLoadScreen(); 49 virtual void releaseLoadScreen(); 52 50 53 /* interface to world */54 void spawn (WorldEntity* entity);51 /* interface to world */ 52 virtual void spawn (WorldEntity* entity); 55 53 56 /** @param speed sets the speed of the Game */57 inline void setSpeed(float speed) { this->speed = speed; };58 const char* getPath();59 void setPath( const char* name);60 54 61 void togglePNodeVisibility() { this->showPNodes = !this->showPNodes; };62 void toggleBVVisibility() { this->showBV = !this->showBV; };55 protected: 56 virtual void constuctorInit(const char* name, int worldID); 63 57 64 private: 65 void constuctorInit(const char* name, int worldID); 66 /* function for main-loop */ 67 void synchronize (); 68 void handleInput (); 69 void tick (std::list<WorldEntity*> worldEntity, float dt); 70 void tick (); 71 void update (); 72 void collide (); 73 void draw (); 74 void mainLoop (); 58 /* world - running functions */ 59 virtual void mainLoop (); 75 60 76 void display (); 77 void debug (); 61 virtual void synchronize (); 62 virtual void handleInput (); 63 virtual void tick (std::list<WorldEntity*> worldEntity, float dt); 64 virtual void tick (); 65 virtual void update (); 66 virtual void collide (); 67 virtual void draw (); 68 virtual void display (); 69 70 virtual void debug (); 71 78 72 79 73 private: 80 char* path; //!< The file from which this world is loaded 81 82 // FLAGS // 83 bool bQuitWorld; //!< quit only the current game and return to menu 84 bool bPause; //!< pause mode 85 86 bool showPNodes; //!< if the PNodes should be visible. 87 bool showBV; //!< if the Bounding Volumes should be visible. 88 89 // TIMING // 90 Uint32 lastFrame; //!< last time of frame 91 Uint32 cycle; //!< The cycle we are in (starts with 0 and rises with every frame) 92 Uint32 dt; //!< time needed to calculate this frame (in milliSeconds) 93 float dtS; //!< The time needed for caluculations in seconds 94 float speed; //!< how fast the game flows 95 double gameTime; //!< this is where the game time is saved 96 97 // INTERNAL ENGINES 98 ObjectManager objectManager; //!< The ObjectManager of this World. 74 /* external modules interfaces */ 99 75 Shell* shell; 100 76 OggPlayer* music; … … 102 78 GLMenuImageScreen* glmis; //!< The Level-Loader Display 103 79 104 105 // IMPORTANT ENTITIES106 Camera* localCamera; //!< The current Camera107 Player* localPlayer; //!< The Player, you fly through the level.108 109 WorldEntity* sky; //!< The Environmental Heaven of orxonox @todo insert this to environment insted110 Terrain* terrain; //!< The Terrain of the World.111 80 }; 112 81
Note: See TracChangeset
for help on using the changeset viewer.