Index: orxonox/trunk/src/world.cc
===================================================================
--- orxonox/trunk/src/world.cc	(revision 3222)
+++ orxonox/trunk/src/world.cc	(revision 3225)
@@ -72,7 +72,4 @@
 
 
-/** 
-    \brief initialize the world before use.
-*/
 ErrorMessage World::init()
 {
@@ -118,4 +115,10 @@
       switch(this->debugWorldNr)
 	{
+	  /*
+	    this loads the hard-coded debug world. this only for simplicity and will be 
+	    removed by a reald world-loader, which interprets a world-file.
+	    if you want to add an own debug world, just add a case DEBUG_WORLD_[nr] and
+	    make whatever you want...
+	   */
 	case DEBUG_WORLD_0:
 	  {
@@ -497,7 +500,7 @@
       else
 	{
-	  /* TO DO: implement check whether this particular free entity 
+	  /* \todo: implement check whether this particular free entity 
 	     is out of the game area
-	     TO DO: call function to notify the entity that it left 
+	     \todo: call function to notify the entity that it left 
 	     the game area
 	  */
@@ -513,5 +516,5 @@
     \param deltaT: the time passed since the last frame in milliseconds
 */
-void World::time_slice (Uint32 deltaT)
+void World::timeSlice (Uint32 deltaT)
 {
   //List<WorldEntity> *l;
@@ -544,5 +547,5 @@
    Camera Placement
 */
-void World::calc_camera_pos (Location* loc, Placement* plc)
+void World::calcCameraPos (Location* loc, Placement* plc)
 {
   track[loc->part].map_camera (loc, plc);
@@ -560,4 +563,10 @@
 }
 
+
+
+/**
+   \brief function to put your own debug stuff into it. it can display informations about
+   the current class/procedure
+*/
 void World::debug()
 {
@@ -576,4 +585,11 @@
 
 
+/*
+  \brief main loop of the world: executing all world relevant function
+
+  in this loop we synchronize (if networked), handle input events, give the heart-beat to
+  all other member-entities of the world (tick to player, enemies etc.), checking for
+  collisions drawing everything to the screen.
+*/
 void World::mainLoop()
 {
@@ -582,6 +598,4 @@
   while( !this->bQuitOrxonox && !this->bQuitCurrentGame) /* \todo implement pause */
     {
-      //debug routine
-      //debug();
       // Network
       synchronize();
@@ -594,5 +608,5 @@
 	}
       // Process time
-      time_slice();
+      timeSlice();
       // Process collision
       collision();
@@ -616,9 +630,12 @@
 /**
    \brief run all input processing
-*/
-void World::handle_input ()
+
+   the command node is the central input event dispatcher. the node uses the even-queue from
+   sdl and has its own event-passing-queue.
+*/
+void World::handleInput ()
 {
   // localinput
-  CommandNode* cn = Orxonox::getInstance()->get_localinput();
+  CommandNode* cn = Orxonox::getInstance()->getLocalInput();
   cn->process();
   // remoteinput
@@ -627,6 +644,10 @@
 /**
    \brief advance the timeline
-*/
-void World::time_slice ()
+
+   this calculates the time used to process one frame (with all input handling, drawing, etc)
+   the time is mesured in ms and passed to all world-entities and other classes that need
+   a heart-beat.
+*/
+void World::timeSlice ()
 {
   Uint32 currentFrame = SDL_GetTicks();
@@ -642,12 +663,14 @@
       else
 	{
+	  /* the frame-rate is limited to 100 frames per second, all other things are for
+	     nothing.
+	  */
 	  printf("fps = 1000 - frame rate is adjusted\n");
 	  SDL_Delay(10);
 	  dt = 10;
 	}
-      
-      this->time_slice (dt);
+      this->timeSlice (dt);
       this->update ();
-      this->localCamera->time_slice (dt);
+      this->localCamera->timeSlice(dt);
     }
   this->lastFrame = currentFrame;
@@ -665,5 +688,7 @@
 
 /**
-	\brief render the current frame
+   \brief render the current frame
+   
+   clear all buffers and draw the world
 */
 void World::display ()
@@ -680,4 +705,10 @@
 }
 
+/**
+   \brief give back active camera
+   
+   this passes back the actualy active camera
+   \todo ability to define more than one camera or camera-places
+*/
 Camera* World::getCamera()
 {
@@ -686,4 +717,8 @@
 
 
+/**
+   \brief add and spawn a new entity to this world
+   \param entity to be added
+*/
 void World::spawn(WorldEntity* entity)
 {
@@ -707,4 +742,9 @@
 
 
+/**
+   \brief add and spawn a new entity to this world
+   \param entity to be added
+   \param location where to add
+*/
 void World::spawn(WorldEntity* entity, Location* loc)
 {
@@ -730,4 +770,9 @@
 
 
+/**
+   \brief add and spawn a new entity to this world
+   \param entity to be added
+   \param place where to be added
+*/
 void World::spawn(WorldEntity* entity, Placement* plc)
 {
@@ -747,4 +792,8 @@
 
 
+/*
+  \brief commands that the world must catch
+  \returns false if not used by the world
+*/
 bool World::command(Command* cmd)
 {
