Changeset 3449 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Mar 2, 2005, 2:23:47 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/orxonox.cc
r3436 r3449 56 56 57 57 58 /* this is a singleton class to prevent duplicates */58 /** \brief this is a singleton class to prevent duplicates */ 59 59 Orxonox* Orxonox::singletonRef = 0; 60 60 61 /** 62 \returns reference or new Object of Orxonox if not existent. 63 */ 61 64 Orxonox* Orxonox::getInstance (void) 62 65 { … … 322 325 } 323 326 324 327 /** 328 \return The reference of the SDL-screen of orxonox 329 */ 325 330 SDL_Surface* Orxonox::getScreen () 326 331 { … … 328 333 } 329 334 330 335 /** 336 \brief main function 337 338 here the journey begins 339 */ 331 340 int main(int argc, char** argv) 332 341 { -
orxonox/trunk/src/orxonox.h
r3365 r3449 26 26 ~Orxonox (); 27 27 28 char configfilename[256]; 29 World* world; 30 DataTank* resources; 31 CommandNode* localinput; 32 Camera* localcamera; 33 SDL_Surface* screen; 34 GameLoader* gameLoader; 28 char configfilename[256]; //!< Filename of the configuration-file. 29 World* world; //!< Reference to the current running world. 30 DataTank* resources; //!< DataContainer 31 CommandNode* localinput; //!< Command Handler 32 Camera* localcamera; //!< The current Camera 33 SDL_Surface* screen; //!< The current Screen 34 GameLoader* gameLoader; //!< The gameLoader 35 35 36 bool bQuitOrxonox; 37 bool pause; 38 Uint32 lastframe; 36 bool bQuitOrxonox; //!< If Orxonox should Quit 37 bool pause; //!< Pause mode 38 Uint32 lastframe; //!< Time of the last Frame 39 39 40 40 void getConfigFile (int argc, char** argv); -
orxonox/trunk/src/vector.cc
r3365 r3449 151 151 152 152 /** 153 \br ef returns the voctor normalized to length 1.0153 \brief returns the voctor normalized to length 1.0 154 154 */ 155 155 … … 170 170 } 171 171 172 172 /** 173 \brief scales this Vector with Vector v. 174 \param v the vector to scale this vector with 175 */ 173 176 void Vector::scale(const Vector& v) 174 177 { … … 189 192 190 193 191 194 /** 195 \brief Vector is looking in the positive direction on all axes after this 196 */ 192 197 Vector Vector::abs() 193 198 { … … 473 478 } 474 479 475 480 /** 481 \brief performs a smooth move. 482 \param from from where 483 \param to to where 484 \param t the time this transformation should take 485 \param res The approximation-density 486 */ 476 487 void Quaternion::quatSlerp(const Quaternion* from, const Quaternion* to, float t, Quaternion* res) 477 488 { … … 802 813 /** 803 814 \brief create a plane from anchor point and normal 804 \param n : normal vector815 \param norm: normal vector 805 816 \param p: anchor point 806 817 */ -
orxonox/trunk/src/vector.h
r3365 r3449 10 10 11 11 #include <math.h> 12 //! PI the circle-constant 12 13 #define PI 3.14159265359f 13 14 … … 20 21 public: 21 22 22 float x, y, z; 23 float x; //!< The x Coordinate of the Vector. 24 float y; //!< The y Coordinate of the Vector. 25 float z; //!< The z Coordinate of the Vector. 23 26 24 27 Vector (float x, float y, float z) : x(x), y(y), z(z) {} //!< assignment constructor … … 51 54 public: 52 55 Vector v; //!< Imaginary Vector 53 float w; //!< Real part of the number56 float w; //!< Real part of the number 54 57 55 58 Quaternion (); … … 72 75 73 76 private: 74 float DELTA; 77 float DELTA; //!< resolution of calculation 75 78 76 79 }; -
orxonox/trunk/src/world.cc
r3444 r3449 46 46 } 47 47 48 /** 49 \brief creates a new World... 50 \param worldID with this ID 51 */ 48 52 World::World (int worldID) 49 53 { … … 96 100 {60.0, -10.0, 5.0}, {80.0, 10.0, 5.0}}; 97 101 98 102 /** 103 \brief initializes a new World 104 */ 99 105 ErrorMessage World::init() 100 106 { … … 114 120 115 121 116 122 /** 123 \brief starts the World 124 */ 117 125 ErrorMessage World::start() 118 126 { … … 123 131 } 124 132 133 /** 134 \brief stops the world. 135 136 This happens, when the player decides to end the Level. 137 */ 125 138 ErrorMessage World::stop() 126 139 { … … 129 142 } 130 143 144 /** 145 \brief pauses the Game 146 */ 131 147 ErrorMessage World::pause() 132 148 { … … 134 150 } 135 151 136 152 /** 153 \brief ends the pause Phase 154 */ 137 155 ErrorMessage World::resume() 138 156 { … … 140 158 } 141 159 142 160 /** 161 \brief destroys the World 162 */ 143 163 void World::destroy() 144 164 { … … 146 166 } 147 167 148 168 /** 169 \brief shows the loading screen 170 */ 149 171 void World::displayLoadScreen () 150 172 { … … 160 182 } 161 183 162 184 /** 185 \brief removes the loadscreen, and changes over to the game 186 187 \todo take out the delay 188 */ 163 189 void World::releaseLoadScreen () 164 190 { … … 169 195 } 170 196 171 197 /** 198 \brief loads the World by initializing all resources, and set their default values. 199 */ 172 200 void World::load() 173 201 { … … 334 362 this->nullParent->setName ("NullParent"); 335 363 336 // create some path nodes337 this->pathnodes = new Vector[6];338 this->pathnodes[0] = Vector(0, 0, 0);339 this->pathnodes[1] = Vector(20, 10, 10);340 this->pathnodes[2] = Vector(40, 0, 10);341 this->pathnodes[3] = Vector(60, 10, 0);342 this->pathnodes[4] = Vector(80, 20, 10);343 this->pathnodes[5] = Vector(30, 50, 0);344 345 346 364 347 365 … … 795 813 796 814 797 /* 815 /** 798 816 \brief main loop of the world: executing all world relevant function 799 817 … … 950 968 \brief add and spawn a new entity to this world 951 969 \param entity to be added 952 \param location where to add 970 \param absCoor At what coordinates to add this entity. 971 \param absDir In which direction should it look. 953 972 */ 954 973 void World::spawn(WorldEntity* entity, Vector* absCoor, Quaternion* absDir) … … 967 986 968 987 969 /* 988 /** 970 989 \brief commands that the world must catch 971 990 \returns false if not used by the world … … 978 997 979 998 980 999 /** 1000 \brief swaps two values 1001 \todo make this a global function, and take it out of world 1002 */ 981 1003 void World::swap (unsigned char &a, unsigned char &b) 982 1004 { -
orxonox/trunk/src/world.h
r3437 r3449 19 19 class Light; 20 20 21 //! The game environment 21 //! The game world 22 /** 23 this class initializes everything that should be displayed inside of the current level. 24 it is the main driving factor during gameplay. 25 */ 22 26 class World : public StoryEntity { 23 27 … … 55 59 void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir); 56 60 57 tList<WorldEntity>* entities; 61 tList<WorldEntity>* entities;//!< A template List of all entities. Every moving thing should be included here, and world automatically updates them. 58 62 59 63 // base level data 60 TrackManager* trackManager; 61 Vector* pathnodes; 62 Camera* localCamera; 64 TrackManager* trackManager; //!< The reference of the TrackManager that handles the course through the Level. 65 Camera* localCamera; //!< The current Camera 63 66 64 67 65 UPointCurve* testCurve;66 68 private: 67 Uint32 lastFrame; //!>last time of frame68 bool bQuitOrxonox; //!>quit this application69 bool bQuitCurrentGame; //!>quit only the current game and return to menu70 bool bPause; 69 Uint32 lastFrame; //!< last time of frame 70 bool bQuitOrxonox; //!< quit this application 71 bool bQuitCurrentGame; //!< quit only the current game and return to menu 72 bool bPause; //!< pause mode 71 73 72 GLMenuImageScreen* glmis; 74 GLMenuImageScreen* glmis; //!< The Level-Loader Display 73 75 74 char* worldName; 75 int debugWorldNr; 76 GLuint objectList; 77 SDL_Surface *loadImage; 78 Skysphere* skySphere; 79 Light* light; 76 char* worldName; //!< The name of this World 77 int debugWorldNr; //!< The Debug Nr. needed, if something goes wrong 78 GLuint objectList; //!< temporary: \todo this will be ereased soon 79 Skysphere* skySphere; //!< The Environmental Heaven of orxonox \todo insert this to environment insted 80 Light* light; //!< The Lights of the Level 80 81 81 WorldEntity* localPlayer; 82 WorldEntity* localPlayer; //!< The Player, you fly through the level. 82 83 83 PNode* nullParent; 84 PNode* nullParent; //!< The zero-point, that everything has as its parent. 84 85 85 86 void mainLoop (); -
orxonox/trunk/src/world_entity.cc
r3365 r3449 118 118 } 119 119 120 120 /** 121 \brief sets the drawable state of this entity. 122 \param bDraw TRUE if draweable, FALSE otherwise 123 */ 121 124 void WorldEntity::setDrawable (bool bDraw) 122 125 { -
orxonox/trunk/src/world_entity.h
r3396 r3449 22 22 virtual ~WorldEntity (); 23 23 24 OBJModel* model; 24 OBJModel* model; //!< The model that should be loaded for this entity. 25 25 26 26 void setCollision (CollisionCluster* newhull); … … 45 45 46 46 private: 47 const bool bFree; 48 bool bCollide; 49 bool bDraw; 47 const bool bFree; //!< If the entity is free. 48 bool bCollide; //!< If it should be considered for the collisiontest. 49 bool bDraw; //!< If it should be visible. 50 50 51 CollisionCluster* collisioncluster; 51 CollisionCluster* collisioncluster; //!< The collision-Cluster of this entity. 52 52 }; 53 53
Note: See TracChangeset
for help on using the changeset viewer.