Changeset 9235 in orxonox.OLD for trunk/src/story_entities/game_world.h
- Timestamp:
- Jul 5, 2006, 4:39:02 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/game_world.h
r8740 r9235 31 31 class GameWorld : public StoryEntity 32 32 { 33 34 35 33 public: 34 GameWorld (); 35 virtual ~GameWorld (); 36 36 37 37 virtual void loadParams(const TiXmlElement* root); 38 38 39 40 41 42 39 /* functions from story-entity */ 40 virtual ErrorMessage init(); 41 virtual ErrorMessage loadData(); 42 virtual ErrorMessage unloadData(); 43 43 44 45 46 47 48 44 virtual bool start(); 45 virtual bool stop(); 46 virtual bool pause(); 47 virtual bool resume(); 48 virtual void run(); 49 49 50 void setPlaymode(Playable::Playmode playmode); 51 void setPlaymode(const std::string& playmode); 52 /** this returns the current game time @returns elapsed game time */ 53 inline double getGameTime() { return this->gameTime; } 54 /** sets the game speed @param speed speed of the Game */ 55 inline void setSpeed(float speed) { this->speed = speed; }; 56 /** returns the track path of this world @returns the track path */ 57 58 void togglePNodeVisibility(); 59 void toggleBVVisibility(int level); 60 61 inline void setSky(WorldEntity* sky) { this->dataTank->sky = sky; } 50 void setPlaymode(Playable::Playmode playmode); 51 void setPlaymode(const std::string& playmode); 52 /** this returns the current game time @returns elapsed game time */ 53 inline double getGameTime() { return this->gameTime; } 54 /** sets the game speed @param speed speed of the Game */ 55 inline void setSpeed(float speed) { this->speed = speed; }; 56 /** returns the track path of this world @returns the track path */ 62 57 63 58 64 protected: 65 /* world - running functions */ 66 virtual void synchronize(); 67 virtual void handleInput(); 68 virtual void tick(ObjectManager::EntityList worldEntity, float dt); 69 virtual void tick(); 70 virtual void update(); 71 virtual void checkGameRules(); 72 virtual void collisionDetection(); 73 virtual void collisionReaction(); 59 void setSoundtrack(const std::string& soundTrack); 60 void togglePNodeVisibility(); 61 void toggleBVVisibility(int level); 74 62 75 void applyCameraSettings(); 76 void drawEntityList(const ObjectManager::EntityList& drawList ) const; 77 virtual void renderPassReflection(); 78 virtual void renderPassRefraction(); 79 virtual void renderPassAll(); 63 inline void setSky(WorldEntity* sky) { this->dataTank->sky = sky; } 80 64 81 65 82 virtual void display(); 66 protected: 67 /* world - running functions */ 68 virtual void synchronize(); 69 virtual void handleInput(); 70 virtual void tick(ObjectManager::EntityList worldEntity, float dt); 71 virtual void tick(); 72 virtual void update(); 73 virtual void checkGameRules(); 74 virtual void collisionDetection(); 75 virtual void collisionReaction(); 76 77 void applyCameraSettings(); 78 void drawEntityList(const ObjectManager::EntityList& drawList ) const; 79 virtual void renderPassReflection(); 80 virtual void renderPassRefraction(); 81 virtual void renderPassAll(); 83 82 84 83 85 private: 86 void displayLoadScreen(); 87 void releaseLoadScreen(); 84 virtual void display(); 88 85 89 86 90 protected:91 GameWorldData* dataTank; //!< reference to the GameWorld Data Tank92 TiXmlElement* dataXML; //!< The XML-Element this World has been loaded with.87 private: 88 void displayLoadScreen(); 89 void releaseLoadScreen(); 93 90 94 bool showPNodes; //!< if the PNodes should be visible.95 bool showBV; //!< if the Bounding Volumes should be visible.96 int showBVLevel; //!< the depth level of the displayed bounding volumes97 91 98 /* world timing */ 99 double lastFrame; //!< last time of frame (in MiliSeconds) 100 Uint32 cycle; //!< The cycle we are in (starts with 0 and rises with every frame) 101 float dtS; //!< The time needed for caluculations in seconds 102 float speed; //!< how fast the game flows 103 double gameTime; //!< this is where the game time is saved 104 double frameTimes[TICK_SMOOTH_VALUE];//!< The time used for the last TICK_SMOOTH_VALUE's frames. 92 protected: 93 GameWorldData* dataTank; //!< reference to the GameWorld Data Tank 94 TiXmlElement* dataXML; //!< The XML-Element this World has been loaded with. 105 95 106 GameRules* gameRules; //!< Pointer to the data structure containig the game rules 96 bool showPNodes; //!< if the PNodes should be visible. 97 bool showBV; //!< if the Bounding Volumes should be visible. 98 int showBVLevel; //!< the depth level of the displayed bounding volumes 107 99 108 private: 109 /* external modules interfaces */ 110 ScriptManager scriptManager; 111 OrxShell::Shell* shell; 100 /* world timing */ 101 double lastFrame; //!< last time of frame (in MiliSeconds) 102 Uint32 cycle; //!< The cycle we are in (starts with 0 and rises with every frame) 103 float dtS; //!< The time needed for caluculations in seconds 104 float speed; //!< how fast the game flows 105 double gameTime; //!< this is where the game time is saved 106 double frameTimes[TICK_SMOOTH_VALUE];//!< The time used for the last TICK_SMOOTH_VALUE's frames. 107 108 GameRules* gameRules; //!< Pointer to the data structure containig the game rules 109 110 private: 111 /* external modules interfaces */ 112 ScriptManager scriptManager; 113 OrxShell::Shell* shell; 112 114 }; 113 115
Note: See TracChangeset
for help on using the changeset viewer.