Changeset 6424 in orxonox.OLD for trunk/src/story_entities/debug_world.h
- Timestamp:
- Jan 7, 2006, 11:07:22 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/debug_world.h
r6150 r6424 1 /*!2 * @file world.h3 * Holds and manages all game data4 */5 6 #ifndef _WORLD_H7 #define _WORLD_H8 9 #include "stdincl.h"10 #include "comincl.h"11 #include "story_entity.h"12 #include "p_node.h"13 #include "object_manager.h"14 15 16 class WorldEntity;17 class Camera;18 class Player;19 class GLMenuImageScreen;20 class Terrain;21 class TiXmlElement;22 23 class Shell;24 class OggPlayer;25 26 //! The game world27 /**28 this class initializes everything that should be displayed inside of the current level.29 it is the main driving factor during gameplay.30 */31 class World : public StoryEntity {32 33 public:34 World (const char* name);35 World (int worldID);36 World (const TiXmlElement* root = NULL);37 virtual ~World ();38 39 void loadParams(const TiXmlElement* root);40 41 double getGameTime();42 43 /* classes from story-entity */44 virtual ErrorMessage preLoad();45 virtual ErrorMessage load ();46 virtual ErrorMessage init ();47 virtual ErrorMessage start ();48 virtual ErrorMessage stop ();49 virtual ErrorMessage pause ();50 virtual ErrorMessage resume ();51 virtual ErrorMessage destroy ();52 53 void loadDebugWorld(int worldID);54 55 virtual void displayLoadScreen();56 virtual void releaseLoadScreen();57 58 /* command node functions */59 bool command (Command* cmd);60 61 /* interface to world */62 void spawn (WorldEntity* entity);63 void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir);64 void spawn(WorldEntity* entity, PNode* parentNode, Vector* relCoor, Quaternion* relDir);65 66 /** @param speed sets the speed of the Game */67 inline void setSpeed(float speed) { this->speed = speed; };68 const char* getPath();69 void setPath( const char* name);70 71 inline Camera* getLocalCamera() { return this->localCamera; };72 73 void togglePNodeVisibility() { this->showPNodes = !this->showPNodes; };74 void toggleBVVisibility() { this->showBV = !this->showBV; };75 76 private:77 void constuctorInit(const char* name, int worldID);78 /* function for main-loop */79 void mainLoop ();80 void synchronize ();81 void handleInput ();82 void tick (std::list<WorldEntity*> worldEntity, float dt);83 void tick ();84 void update ();85 void collide ();86 void draw ();87 void display ();88 void debug ();89 90 private:91 bool showPNodes; //!< if the PNodes should be visible.92 bool showBV; //!< if the Bounding Volumes should be visible.93 Uint32 lastFrame; //!< last time of frame94 Uint32 cycle; //!< The cycle we are in (starts with 0 and rises with every frame)95 Uint32 dt; //!< time needed to calculate this frame (in milliSeconds)96 float dtS; //!< The time needed for caluculations in seconds97 float speed; //!< how fast the game flows98 double gameTime; //!< this is where the game time is saved99 bool bQuitOrxonox; //!< quit this application100 bool bQuitCurrentGame; //!< quit only the current game and return to menu101 bool bPause; //!< pause mode102 103 ObjectManager objectManager; //!< The ObjectManager of this World.104 105 GLMenuImageScreen* glmis; //!< The Level-Loader Display106 107 int debugWorldNr; //!< The Debug Nr. needed, if something goes wrong108 char* path; //!< The file from which this world is loaded109 110 Shell* shell;111 OggPlayer* music;112 113 // IMPORTANT WORLD-ENTITIES114 Camera* localCamera; //!< The current Camera115 WorldEntity* sky; //!< The Environmental Heaven of orxonox @todo insert this to environment insted116 Terrain* terrain; //!< The Terrain of the World.117 118 GLuint objectList; //!< temporary: @todo this will be ereased soon119 120 Player* localPlayer; //!< The Player, you fly through the level.121 };122 123 #endif /* _WORLD_H */
Note: See TracChangeset
for help on using the changeset viewer.