Index: orxonox/trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/graphics_engine.cc	(revision 4596)
+++ orxonox/trunk/src/lib/graphics/graphics_engine.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -29,10 +29,11 @@
    \todo this constructor is not jet implemented - do it
 */
-GraphicsEngine::GraphicsEngine () 
-{
+GraphicsEngine::GraphicsEngine ()
+{
+  this->setClassID(CL_GRAPHICS_ENGINE, "GraphicsEngine");
+  this->setName("GraphicsEngine");
   this->bDisplayFPS = false;
   this->minFPS = 9999;
   this->maxFPS = 0;
-  this->setClassID(CL_GRAPHICS_ENGINE, "GraphicsEngine");
 
   this->fullscreen = false;
@@ -51,5 +52,5 @@
    \brief destructs the graphicsEngine.
 */
-GraphicsEngine::~GraphicsEngine () 
+GraphicsEngine::~GraphicsEngine ()
 {
   // delete what has to be deleted here
@@ -79,10 +80,10 @@
   if( videoInfo == NULL)
     {
-      PRINTF(1)("Failed getting Video Info :%s\n", SDL_GetError()); 
+      PRINTF(1)("Failed getting Video Info :%s\n", SDL_GetError());
       SDL_Quit ();
     }
   if( videoInfo->hw_available)
     this->videoFlags |= SDL_HWSURFACE;
-  else 
+  else
     this->videoFlags |= SDL_SWSURFACE;
   /*
@@ -93,12 +94,12 @@
   // setting up the Resolution
   this->setResolution(800, 600, 16);
-  
+
   // Set window labeling
   SDL_WM_SetCaption ("Orxonox " PACKAGE_VERSION, "Orxonox " PACKAGE_VERSION);
-  
+
   // TO DO: Create a cool icon and use it here
   char* loadPic = new char[strlen(ResourceManager::getInstance()->getDataDir())+ 100];
   sprintf(loadPic, "%s%s", ResourceManager::getInstance()->getDataDir(),  "pictures/orxonox-icon32x32.bmp");
-  SDL_WM_SetIcon(SDL_LoadBMP(loadPic), NULL);  
+  SDL_WM_SetIcon(SDL_LoadBMP(loadPic), NULL);
   delete loadPic;
   // Enable default GL stuff
@@ -117,9 +118,9 @@
   //SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
   //SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
-  
-
-  SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );   
-  SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16);    
-  SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 0);  
+
+
+  SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
+  SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16);
+  SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 0);
   SDL_GL_SetAttribute( SDL_GL_ACCUM_RED_SIZE, 0);
   SDL_GL_SetAttribute( SDL_GL_ACCUM_GREEN_SIZE, 0);
@@ -144,5 +145,5 @@
   else
     fullscreenFlag = 0;
-  
+
   printf ("ok\n");
   if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags | fullscreenFlag)) == NULL)
@@ -195,5 +196,5 @@
 /**
    \brief entering 2D Mode
-   
+
    this is a GL-Projection-mode, that is orthogonal, for placing the font in fron of everything else
 */
@@ -202,5 +203,5 @@
   GraphicsEngine::storeMatrices();
   SDL_Surface *screen = SDL_GetVideoSurface();
-  
+
   /* Note, there may be other things you need to change,
      depending on how you have your OpenGL state set up.
@@ -215,17 +216,17 @@
   glEnable(GL_BLEND);
   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-  
+
   glViewport(0, 0, screen->w, screen->h);
-  
+
   glMatrixMode(GL_PROJECTION);
   glPushMatrix();
   glLoadIdentity();
-  
+
   glOrtho(0.0, (GLdouble)screen->w, (GLdouble)screen->h, 0.0, 0.0, 1.0);
-  
+
   glMatrixMode(GL_MODELVIEW);
   glPushMatrix();
   glLoadIdentity();
-  
+
   glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 }
@@ -238,13 +239,13 @@
   glMatrixMode(GL_MODELVIEW);
   glPopMatrix();
-  
+
   glMatrixMode(GL_PROJECTION);
   glPopMatrix();
-  
+
   glPopAttrib();
 }
 
 /**
-   \brief stores the GL_matrices 
+   \brief stores the GL_matrices
 */
 void GraphicsEngine::storeMatrices(void)
@@ -271,5 +272,5 @@
   /* Get available fullscreen/hardware modes */
   this->videoModes=SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_HWSURFACE);
-  
+
   /* Check is there are any modes available */
   if(this->videoModes == (SDL_Rect **)0){
@@ -277,5 +278,5 @@
     exit(-1);
   }
-  
+
   /* Check if our resolution is restricted */
   if(this->videoModes == (SDL_Rect **)-1){
@@ -301,5 +302,5 @@
       if( unlikely(this->currentFPS > this->maxFPS)) this->maxFPS = this->currentFPS;
       if( unlikely(this->currentFPS < this->minFPS)) this->minFPS = this->currentFPS;
-      
+
 #ifndef NO_TEXT
       char tmpChar1[20];
@@ -315,5 +316,5 @@
     }
 }
-  
+
 /**
    \brief displays the Frames per second
@@ -335,5 +336,5 @@
       this->geTextMinFPS = TextEngine::getInstance()->createText("fonts/druid.ttf", 35, TEXT_DYNAMIC, 0, 255, 0);
       this->geTextMinFPS->setAlignment(TEXT_ALIGN_LEFT);
-      this->geTextMinFPS->setPosition(5, 560);	
+      this->geTextMinFPS->setPosition(5, 560);
 #endif /* NO_TEXT */
     }
@@ -341,3 +342,3 @@
 }
 
-  
+
Index: orxonox/trunk/src/lib/graphics/light.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/light.cc	(revision 4596)
+++ orxonox/trunk/src/lib/graphics/light.cc	(revision 4597)
@@ -1,5 +1,5 @@
 
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -36,6 +36,6 @@
 {
   this->setClassID(CL_LIGHT, "Light");
-  char tmpName[7];
-  sprintf(tmpName, "Light%d", lightNumber);
+  char tmpName[10];
+  sprintf(tmpName, "Light[%d]", lightNumber);
   this->setName(tmpName);
 
@@ -43,5 +43,5 @@
   // enable The light
   glEnable(lightsV[lightNumber]); // postSpawn
-  
+
   // set values (defaults)
   this->lightNumber = lightNumber;
@@ -179,5 +179,5 @@
 /**
    \brief draws this Light. Being a World-entity the possibility to do this lies at hand.
-*/ 
+*/
 void Light::draw()
 {
@@ -195,5 +195,5 @@
   PRINT(0)(":: %d ::  -- reference %p\n", this->lightNumber, this);
   PRINT(0)(" GL-state: ");
-  GLboolean param; 
+  GLboolean param;
   glGetBooleanv(lightsV[this->lightNumber], &param);
   if (param)
@@ -201,5 +201,5 @@
   else
     PRINT(0)("OFF\n");
-  
+
   PRINT(0)(" Position:      %f/%f/%f\n", this->lightPosition[0], this->lightPosition[1], this->lightPosition[2]);
   PRINT(0)(" DiffuseColor:  %f/%f/%f\n", this->diffuseColor[0], this->diffuseColor[1], this->diffuseColor[2]);
@@ -215,5 +215,5 @@
    \brief standard constructor for a Light
 */
-LightManager::LightManager () 
+LightManager::LightManager ()
 {
   this->setClassID(CL_LIGHT_MANAGER, "LightManager");
@@ -229,5 +229,5 @@
 /**
    \brief standard deconstructor
-   
+
    first disables Lighting
 
@@ -235,8 +235,8 @@
    and in the end sets the singleton Reference to zero.
 */
-LightManager::~LightManager () 
+LightManager::~LightManager ()
 {
   glDisable(GL_LIGHTING);
-  
+
   // this will be done either by worldEntity, or by pNode as each light is one of them
   //  for (int i = 0; i < NUMBEROFLIGHTS; i++)
@@ -270,5 +270,5 @@
   for (int i = 0; i < NUMBEROFLIGHTS; i++)
     if (!this->lights[i])
-      return addLight(i); 
+      return addLight(i);
   PRINTF(1)("no more light slots availiable. All %d already taken\n", NUMBEROFLIGHTS);
   return -1;
@@ -302,5 +302,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n");
       return;
@@ -316,5 +316,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(1)("no Light defined yet. So you cannot delete any Light right now.\n");
       return;
@@ -392,5 +392,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n");
       return;
@@ -409,5 +409,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n");
       return;
@@ -426,5 +426,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n");
       return;
@@ -443,5 +443,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n");
       return;
@@ -458,5 +458,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n");
       return;
@@ -473,5 +473,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(2)("no Light defined yet. Please define at least one light first befor editing.\n");
       return;
@@ -488,5 +488,5 @@
 {
   if (!this->currentLight)
-    { 
+    {
       PRINTF(2)("no Light defined yet\n");
       return Vector(.0, .0, .0);
@@ -498,5 +498,5 @@
 
 /**
-   \returns the Position of Light 
+   \returns the Position of Light
    \param lightNumber lightnumber
 */
@@ -539,5 +539,5 @@
     if (this->lights[i])
       {
-	this->lights[i]->debug();
+        this->lights[i]->debug();
       }
   PRINT(0)("--------------------------------\n");
Index: orxonox/trunk/src/lib/graphics/text_engine.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/text_engine.cc	(revision 4596)
+++ orxonox/trunk/src/lib/graphics/text_engine.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -16,5 +16,5 @@
 
    !! IMPORTANT !! When using ttf fonts clear the license issues prior to
-   adding them to orxonox. This is really important, because we do not 
+   adding them to orxonox. This is really important, because we do not
    want to offend anyone.
 */
@@ -46,5 +46,5 @@
    \param type The renderType to display this font in
 
-   this constructor is private, because the user should initialize 
+   this constructor is private, because the user should initialize
    a text with the TextEngine.
 */
@@ -68,5 +68,5 @@
 /**
    \brief deletes a Text out of memory
-   
+
    This also ereases the text from the textList of the TextEngine
 */
@@ -117,11 +117,11 @@
       char* tmpText = this->text;
       while (*tmpText != '\0')
-	{
-	  if(glyphArray[*tmpText])
-	    {
-	      width += glyphArray[*tmpText]->width;
-	    }
-	  tmpText++;
-	}
+        {
+          if(glyphArray[*tmpText])
+            {
+              width += glyphArray[*tmpText]->width;
+            }
+          tmpText++;
+        }
       this->posSize.w = width;
     }
@@ -174,6 +174,6 @@
   if (likely(this->font != NULL))
     tmpSurf = TTF_RenderText_Blended(this->font->font,
-				     this->text,
-				     this->color);
+                                     this->text,
+                                     this->color);
   if (tmpSurf)
     this->texture = loadTexture(tmpSurf, &this->texCoord);
@@ -208,5 +208,5 @@
       pos.z = tmp[2];
     }
-  else 
+  else
     {
       pos.x = this->posSize.x;
@@ -232,17 +232,17 @@
       glEnable(GL_TEXTURE_2D);
       glBegin(GL_QUADS);
-      
+
       glTexCoord2f(this->texCoord.minU, this->texCoord.minV);
       glVertex2f(pos.x,   pos.y  );
-      
+
       glTexCoord2f(this->texCoord.maxU, this->texCoord.minV);
       glVertex2f(pos.x + this->posSize.w, pos.y  );
-      
+
       glTexCoord2f(this->texCoord.maxU, this->texCoord.maxV);
       glVertex2f(pos.x + this->posSize.w, pos.y + this->posSize.h);
-      
+
       glTexCoord2f(this->texCoord.minU, this->texCoord.maxV);
       glVertex2f(pos.x, pos.y + this->posSize.h);
-      
+
       glEnd();
     }
@@ -257,12 +257,12 @@
       char* tmpText = this->text;
       while (*tmpText != '\0')
-	{
-	  if(glyphArray[*tmpText])
-	    {
-	      glCallList(glyphArray[*tmpText]->displayList);
-	      glTranslatef(glyphArray[*tmpText]->width, 0, 0);
-	    }
-	  tmpText++;
-	}
+        {
+          if(glyphArray[*tmpText])
+            {
+              glCallList(glyphArray[*tmpText]->displayList);
+              glTranslatef(glyphArray[*tmpText]->width, 0, 0);
+            }
+          tmpText++;
+        }
     }
   glPopMatrix();
@@ -299,5 +299,5 @@
   Uint32 saved_flags;
   Uint8  saved_alpha;
-  
+
   /* Use the surface width and height expanded to powers of 2 */
   w = powerOfTwo(surface->w);
@@ -311,22 +311,22 @@
     }
   image = SDL_CreateRGBSurface(SDL_SWSURFACE,
-			       w, h,
-			       32,
+                               w, h,
+                               32,
 #if SDL_BYTEORDER == SDL_LIL_ENDIAN /* OpenGL RGBA masks */
-			       0x000000FF, 
-			       0x0000FF00, 
-			       0x00FF0000, 
-			       0xFF000000
+                               0x000000FF,
+                               0x0000FF00,
+                               0x00FF0000,
+                               0xFF000000
 #else
-			       0xFF000000,
-			       0x00FF0000, 
-			       0x0000FF00, 
-			       0x000000FF
+                               0xFF000000,
+                               0x00FF0000,
+                               0x0000FF00,
+                               0x000000FF
 #endif
-			       );
+                               );
   if ( image == NULL ) {
     return 0;
   }
-  
+
   /* Save the alpha blending attributes */
   saved_flags = surface->flags&(SDL_SRCALPHA|SDL_RLEACCELOK);
@@ -335,5 +335,5 @@
     SDL_SetAlpha(surface, 0, 0);
   }
-  
+
   /* Copy the surface into the GL texture image */
   area.x = 0;
@@ -342,10 +342,10 @@
   area.h = surface->h;
   SDL_BlitSurface(surface, &area, image, &area);
-  
+
   /* Restore the alpha blending attributes */
   if ( (saved_flags & SDL_SRCALPHA) == SDL_SRCALPHA ) {
     SDL_SetAlpha(surface, saved_flags, saved_alpha);
   }
-  
+
   /* Create an OpenGL texture for the image */
   glGenTextures(1, &texture);
@@ -354,18 +354,18 @@
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
   glTexImage2D(GL_TEXTURE_2D,
-	       0,
-	       GL_RGBA,
-	       w, h,
-	       0,
-	       GL_RGBA,
-	       GL_UNSIGNED_BYTE,
-	       image->pixels);
+               0,
+               GL_RGBA,
+               w, h,
+               0,
+               GL_RGBA,
+               GL_UNSIGNED_BYTE,
+               image->pixels);
   SDL_FreeSurface(image); /* No longer needed */
-  
+
   return texture;
 }
 
 /**
-   \brief Quick utility function for texture creation 
+   \brief Quick utility function for texture creation
    \param input an integer
    \returns the next bigger 2^n-integer than input
@@ -374,5 +374,5 @@
 {
   int value = 1;
-  
+
   while ( value < input ) {
     value <<= 1;
@@ -395,10 +395,11 @@
 Font::Font(const char* fontFile, unsigned int fontSize, Uint8 r, Uint8 g, Uint8 b)
 {
+  this->setClassID(CL_FONT, "Font");
   // setting default values.
   this->font = NULL;
   this->fontFile = NULL;
   this->glyphArray = NULL;
-  this->fastTextureID = 0;  
-  
+  this->fastTextureID = 0;
+
   this->setSize(fontSize);
 
@@ -423,5 +424,5 @@
     {
       for (int i = 0; i < FONT_HIGHEST_KNOWN_CHAR; i++)
-	delete this->glyphArray[i];
+        delete this->glyphArray[i];
       delete []this->glyphArray;
     }
@@ -441,15 +442,16 @@
   if (!this->fontFile)
     {
+      this->setName(fontFile);
       this->fontFile = new char[strlen(fontFile)+1];
       strcpy(this->fontFile, fontFile);
-      
+
       this->font = TTF_OpenFont(this->fontFile, this->fontSize);
       if(!this->font)
-	{
-	  PRINTF(1)("TTF_OpenFont: %s\n", TTF_GetError());
-	  return false;
-	}
+        {
+          PRINTF(1)("TTF_OpenFont: %s\n", TTF_GetError());
+          return false;
+        }
       else
-	  return true;
+          return true;
     }
   else
@@ -468,11 +470,11 @@
 {
   this->renderStyle = TTF_STYLE_NORMAL;
-  
+
   for (int i = 0; i < strlen(renderStyle); i++)
-    if (strncmp(renderStyle+i, "b", 1) == 0) 
+    if (strncmp(renderStyle+i, "b", 1) == 0)
       this->renderStyle |= TTF_STYLE_BOLD;
     else if (strncmp(renderStyle+i, "i", 1) == 0)
       this->renderStyle |= TTF_STYLE_ITALIC;
-    else if (strncmp(renderStyle+i, "u", 1) == 0) 
+    else if (strncmp(renderStyle+i, "u", 1) == 0)
       this->renderStyle |= TTF_STYLE_UNDERLINE;
 
@@ -547,5 +549,5 @@
    and MUST be deleted by the user..
 
-   This only works for horizontal fonts. see 
+   This only works for horizontal fonts. see
    http://freetype.sourceforge.net/freetype2/docs/tutorial/step2.html
    for more info about vertical Fonts
@@ -557,7 +559,7 @@
   if (likely (this->font!= NULL))
     TTF_GlyphMetrics(this->font, rg->character,
-		     &rg->minX, &rg->maxX,
-		     &rg->minY, &rg->maxY,
-		     &rg->advance);
+                     &rg->minX, &rg->maxX,
+                     &rg->minY, &rg->maxY,
+                     &rg->advance);
   rg->height = rg->maxY - rg->minY;
   rg->width = rg->maxX - rg->minX;
@@ -569,5 +571,5 @@
 GLuint Font::createFastTexture(void)
 {
-  /* interesting GLYPHS: 
+  /* interesting GLYPHS:
    *  32: space
    *  33-47: Special Characters.
@@ -589,18 +591,18 @@
   SDL_Rect tmpRect; // this represents a Rectangle for blitting.
   SDL_Surface* tmpSurf =  SDL_CreateRGBSurface(SDL_SWSURFACE,
-					       rectSize, rectSize,
-					       32,
+                                               rectSize, rectSize,
+                                               32,
 #if SDL_BYTEORDER == SDL_LIL_ENDIAN /* OpenGL RGBA masks */
-					       0x000000FF, 
-					       0x0000FF00, 
-					       0x00FF0000, 
-					       0xFF000000
+                                               0x000000FF,
+                                               0x0000FF00,
+                                               0x00FF0000,
+                                               0xFF000000
 #else
-					       0xFF000000,
-					       0x00FF0000, 
-					       0x0000FF00, 
-					       0x000000FF
+                                               0xFF000000,
+                                               0x00FF0000,
+                                               0x0000FF00,
+                                               0x000000FF
 #endif
-					       );
+                                               );
   tmpRect.x = 0; tmpRect.y = 0; tmpRect.w = tmpSurf->w; tmpRect.h = tmpSurf->h;
   SDL_SetClipRect(tmpSurf, &tmpRect);
@@ -614,64 +616,64 @@
 
       if (tmpGlyph = this->glyphArray[i])
-	{
-	  if (tmpGlyph->height > maxLineHeight)
-	    maxLineHeight = tmpGlyph->height;
-	  
-	  if (tmpRect.x+tmpGlyph->width > tmpSurf->w)
-	    {
-	      tmpRect.x = 0;
-	      tmpRect.y = tmpRect.y + maxLineHeight + 1;
-	      maxLineHeight = 0;
-	    }
-	  if (tmpRect.y + maxLineHeight > tmpSurf->h)
-	    {
-	      PRINTF(1)("Protection, so font cannot write over the boundraries error (this should not heappen\n");
-	      break;
-	    }
-	  // reading in the new Glyph
-	  if (likely(this->font != NULL))
-	    glyphSurf = TTF_RenderGlyph_Blended(this->font, i, this->fastColor);
-	  if( glyphSurf != NULL )
-	    {
-
-	      SDL_SetAlpha(glyphSurf, 0, 0);
-
-	      SDL_BlitSurface(glyphSurf, NULL, tmpSurf, &tmpRect);
-	      TexCoord tmpTexCoord;
-	      tmpTexCoord.minU = (float)tmpRect.x/(float)tmpSurf->w;
-	      tmpTexCoord.maxU = (float)(tmpRect.x+tmpGlyph->width)/(float)tmpSurf->w;
-	      tmpTexCoord.minV = (float)tmpRect.y/(float)tmpSurf->w;
-	      tmpTexCoord.maxV = (float)(tmpRect.y+tmpGlyph->height)/(float)tmpSurf->w;
-	      tmpGlyph->displayList = glGenLists(1);
-
-	      glNewList(tmpGlyph->displayList, GL_COMPILE);
-	      glBegin(GL_QUADS);
-	      glTexCoord2f(tmpTexCoord.minU, tmpTexCoord.minV);
-	      glVertex2d(0, 0);
-	      glTexCoord2f(tmpTexCoord.minU, tmpTexCoord.maxV);
-	      glVertex2d(0, tmpGlyph->height);
-	      glTexCoord2f(tmpTexCoord.maxU, tmpTexCoord.maxV);
-	      glVertex2d(tmpGlyph->width, tmpGlyph->height);
-	      glTexCoord2f(tmpTexCoord.maxU, tmpTexCoord.minV);
-	      glVertex2d(tmpGlyph->width, 0);
-	      glEnd();
-	      glEndList();
-	      SDL_FreeSurface(glyphSurf);
-
-	      tmpRect.x += tmpGlyph->width + 1;
-
-	      // Outputting Glyphs to BMP-files.
-	      /*
-		char outname[64];
-		if (i < 10)
-		sprintf( outname, "glyph-00%d.bmp", i );
-		else if (i <100)
-		sprintf( outname, "glyph-0%d.bmp", i );
-		else
-		sprintf( outname, "glyph-%d.bmp", i );
-		SDL_SaveBMP(tmpSurf, outname);
-	      */
-	    }
-	}
+        {
+          if (tmpGlyph->height > maxLineHeight)
+            maxLineHeight = tmpGlyph->height;
+
+          if (tmpRect.x+tmpGlyph->width > tmpSurf->w)
+            {
+              tmpRect.x = 0;
+              tmpRect.y = tmpRect.y + maxLineHeight + 1;
+              maxLineHeight = 0;
+            }
+          if (tmpRect.y + maxLineHeight > tmpSurf->h)
+            {
+              PRINTF(1)("Protection, so font cannot write over the boundraries error (this should not heappen\n");
+              break;
+            }
+          // reading in the new Glyph
+          if (likely(this->font != NULL))
+            glyphSurf = TTF_RenderGlyph_Blended(this->font, i, this->fastColor);
+          if( glyphSurf != NULL )
+            {
+
+              SDL_SetAlpha(glyphSurf, 0, 0);
+
+              SDL_BlitSurface(glyphSurf, NULL, tmpSurf, &tmpRect);
+              TexCoord tmpTexCoord;
+              tmpTexCoord.minU = (float)tmpRect.x/(float)tmpSurf->w;
+              tmpTexCoord.maxU = (float)(tmpRect.x+tmpGlyph->width)/(float)tmpSurf->w;
+              tmpTexCoord.minV = (float)tmpRect.y/(float)tmpSurf->w;
+              tmpTexCoord.maxV = (float)(tmpRect.y+tmpGlyph->height)/(float)tmpSurf->w;
+              tmpGlyph->displayList = glGenLists(1);
+
+              glNewList(tmpGlyph->displayList, GL_COMPILE);
+              glBegin(GL_QUADS);
+              glTexCoord2f(tmpTexCoord.minU, tmpTexCoord.minV);
+              glVertex2d(0, 0);
+              glTexCoord2f(tmpTexCoord.minU, tmpTexCoord.maxV);
+              glVertex2d(0, tmpGlyph->height);
+              glTexCoord2f(tmpTexCoord.maxU, tmpTexCoord.maxV);
+              glVertex2d(tmpGlyph->width, tmpGlyph->height);
+              glTexCoord2f(tmpTexCoord.maxU, tmpTexCoord.minV);
+              glVertex2d(tmpGlyph->width, 0);
+              glEnd();
+              glEndList();
+              SDL_FreeSurface(glyphSurf);
+
+              tmpRect.x += tmpGlyph->width + 1;
+
+              // Outputting Glyphs to BMP-files.
+              /*
+                char outname[64];
+                if (i < 10)
+                sprintf( outname, "glyph-00%d.bmp", i );
+                else if (i <100)
+                sprintf( outname, "glyph-0%d.bmp", i );
+                else
+                sprintf( outname, "glyph-%d.bmp", i );
+                SDL_SaveBMP(tmpSurf, outname);
+              */
+            }
+        }
     }
 
@@ -682,11 +684,11 @@
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
   glTexImage2D(GL_TEXTURE_2D,
-	       0,
-	       GL_RGBA,
-	       tmpSurf->w, tmpSurf->h,
-	       0,
-	       GL_RGBA,
-	       GL_UNSIGNED_BYTE,
-	       tmpSurf->pixels);
+               0,
+               GL_RGBA,
+               tmpSurf->w, tmpSurf->h,
+               0,
+               GL_RGBA,
+               GL_UNSIGNED_BYTE,
+               tmpSurf->pixels);
   SDL_FreeSurface(tmpSurf);
   return texture;
@@ -707,9 +709,9 @@
       this->glyphArray = new Glyph*[FONT_HIGHEST_KNOWN_CHAR];
       for (int i = 0; i < FONT_HIGHEST_KNOWN_CHAR; i++)
-	this->glyphArray[i] = NULL;
-    }
-  
+        this->glyphArray[i] = NULL;
+    }
+
   Uint16 lastGlyph = from + count;
-  
+
   for (int i = from; i <= lastGlyph; i++)
     {
@@ -723,8 +725,8 @@
    \returns the optimal size to use as the texture size
 
-   \todo: this algorithm can be a lot more faster, althought it does 
+   \todo: this algorithm can be a lot more faster, althought it does
    not really matter within the init-context, and 128 glyphs.
 
-   This function searches for a 2^n sizes texture-size, this is for 
+   This function searches for a 2^n sizes texture-size, this is for
    openGL-version < 1.2 compatibility ( and because it is realy easy like this :))
 */
@@ -743,27 +745,27 @@
       maxLineHeight = 0;
       for (i = 0; i < FONT_HIGHEST_KNOWN_CHAR; i++)
-	{
-	  if(tmpGlyph = this->glyphArray[i])
-	    {
-	      // getting the height of the highest Glyph in the Line.
-	      if (tmpGlyph->height > maxLineHeight)
-		maxLineHeight = tmpGlyph->height;
-
-	      if (x + tmpGlyph->width > size)
-		{
-		  x = 0;
-		  y = y + maxLineHeight;
-		  maxLineHeight = 0;
-		}
-	      if (y + maxLineHeight + 1 > size)
-		break;
-	      x += tmpGlyph->width + 1;
-
-	    }
-	}
+        {
+          if(tmpGlyph = this->glyphArray[i])
+            {
+              // getting the height of the highest Glyph in the Line.
+              if (tmpGlyph->height > maxLineHeight)
+                maxLineHeight = tmpGlyph->height;
+
+              if (x + tmpGlyph->width > size)
+                {
+                  x = 0;
+                  y = y + maxLineHeight;
+                  maxLineHeight = 0;
+                }
+              if (y + maxLineHeight + 1 > size)
+                break;
+              x += tmpGlyph->width + 1;
+
+            }
+        }
       if (i == FONT_HIGHEST_KNOWN_CHAR)
-	sizeOK = true;
+        sizeOK = true;
       else
-	size *= 2;
+        size *= 2;
     }
   return size;
@@ -801,7 +803,8 @@
    \brief standard constructor
 */
-TextEngine::TextEngine () 
+TextEngine::TextEngine ()
 {
    this->setClassID(CL_TEXT_ENGINE, "TextEngine");
+   this->setName("TextEngine");
    this->enableFonts();
 
@@ -818,8 +821,8 @@
 
 */
-TextEngine::~TextEngine () 
+TextEngine::~TextEngine ()
 {
   this->disableFonts();
-  
+
   delete this->textList;
 
@@ -835,5 +838,5 @@
     {
       if(TTF_Init()==-1)
-	PRINTF(1)("TTF_Init: %s\n", TTF_GetError());
+        PRINTF(1)("TTF_Init: %s\n", TTF_GetError());
 
       TextEngine::checkVersion();
@@ -932,5 +935,5 @@
 /**
    \brief outputs some nice Debug information
-   
+
    \todo there should also be something outputted about Font
 */
@@ -941,5 +944,5 @@
   PRINT(0)("+-------------------------------+\n");
   PRINT(0)("Reference: %p; Text Counts: %d\n", this, this->textList->getSize());
-  
+
   tIterator<Text>* textIterator = textList->getIterator();
   Text* text = textIterator->nextElement();
@@ -973,13 +976,13 @@
   else
     {
-      PRINTF(2)("compiled with SDL_ttf version: %d.%d.%d\n", 
-		compile_version.major,
-		compile_version.minor,
-		compile_version.patch);
-      
-      PRINTF(2)("running with SDL_ttf version: %d.%d.%d\n", 
-		link_version.major,
-		link_version.minor,
-		link_version.patch);
+      PRINTF(2)("compiled with SDL_ttf version: %d.%d.%d\n",
+                compile_version.major,
+                compile_version.minor,
+                compile_version.patch);
+
+      PRINTF(2)("running with SDL_ttf version: %d.%d.%d\n",
+                link_version.major,
+                link_version.minor,
+                link_version.patch);
       return false;
     }
Index: orxonox/trunk/src/lib/graphics/text_engine.h
===================================================================
--- orxonox/trunk/src/lib/graphics/text_engine.h	(revision 4596)
+++ orxonox/trunk/src/lib/graphics/text_engine.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file text_engine.h
     \brief Definition of textEngine, the Font and the Text
@@ -30,12 +30,15 @@
 
 //! An enumerator for the text alignment.
-enum TEXT_ALIGNMENT { TEXT_ALIGN_LEFT,
-		      TEXT_ALIGN_RIGHT,
-		      TEXT_ALIGN_CENTER,
-		      TEXT_ALIGN_SCREEN_CENTER };
+ enum TEXT_ALIGNMENT
+{
+  TEXT_ALIGN_LEFT,
+  TEXT_ALIGN_RIGHT,
+  TEXT_ALIGN_CENTER,
+  TEXT_ALIGN_SCREEN_CENTER
+};
 
 /* some default values */
 #define FONT_DEFAULT_SIZE       50                   //!< default size of the Text
-#define FONT_DEFAULT_TEXT	"orxonox 1234567890" //!< default text to display
+#define FONT_DEFAULT_TEXT       "orxonox 1234567890" //!< default text to display
 #define FONT_DEFAULT_COLOR_R    255                  //!< default red part (color) of the text
 #define FONT_DEFAULT_COLOR_G    255                  //!< default red green (color) of the text
@@ -86,5 +89,5 @@
   int      bearingY;          //!< How much is above the Origin
   int      advance;           //!< How big a Glyph would be in monospace-mode
-  
+
   // OpenGL-specific
   //  TexCoord texCoord;      //!< A Texture Coordinate for this glyph.
@@ -117,10 +120,10 @@
 
   void draw(void) const;
-  
+
   void debug(void) const;
 
  private:
   Text(Font* font, int type = TEXT_DYNAMIC);
-  
+
   static GLuint loadTexture(SDL_Surface* surface, TexCoord* texCoord);
   static int powerOfTwo(int input);
@@ -139,5 +142,5 @@
   TexCoord          texCoord;       //!< Texture-coordinates \todo fix this to have a struct
   SDL_Rect          posSize;        //!< An SDL-Rectangle representing the position and size of the Text on the screen.
-  
+
   PNode*            bindNode;       //!< A node the Text is bind to. (if NULL thr node will not be bound to anything.)
 };
@@ -147,5 +150,5 @@
 ////////////
 //! A class to handle a Font of a certain ttf-File, Size and Color.
-class Font
+class Font : public BaseObject
 {
   friend class Text;
@@ -170,5 +173,5 @@
   /** \returns the texture to the fast-texture */
   inline GLuint getFastTextureID(void) const {return fastTextureID;}
-  
+
  private:
   int getMaxHeight(void);
@@ -193,5 +196,5 @@
   unsigned int  fontSize;            //!< The size of the font in pixels. each Font has one size.
   int           renderStyle;         //!< The Renderstyle
-  
+
   Glyph**       glyphArray;          //!< An Array of all the Glyphs stored in the Array of Glyphs.
   GLuint        fastTextureID;       //!< The fast textureID.
@@ -205,5 +208,5 @@
 ///////////////////
 //! A singleton Class that operates as a Handler for generating and rendering Text in 2D
-class TextEngine : public BaseObject 
+class TextEngine : public BaseObject
 {
  public:
@@ -213,15 +216,15 @@
 
   Text* createText(const char* fontFile,
-		   unsigned int fontSize = FONT_DEFAULT_SIZE,
-		   int textType = TEXT_DYNAMIC,
-		   Uint8 r = FONT_DEFAULT_COLOR_R,
-		   Uint8 g = FONT_DEFAULT_COLOR_G,
-		   Uint8 b = FONT_DEFAULT_COLOR_B);
-  
+                   unsigned int fontSize = FONT_DEFAULT_SIZE,
+                   int textType = TEXT_DYNAMIC,
+                   Uint8 r = FONT_DEFAULT_COLOR_R,
+                   Uint8 g = FONT_DEFAULT_COLOR_G,
+                   Uint8 b = FONT_DEFAULT_COLOR_B);
+
   void deleteText(Text* text);
   void flush(void);
 
   void draw(void) const;
- 
+
   void debug(void) const;
 
Index: orxonox/trunk/src/lib/math/curve.h
===================================================================
--- orxonox/trunk/src/lib/math/curve.h	(revision 4596)
+++ orxonox/trunk/src/lib/math/curve.h	(revision 4597)
@@ -1,9 +1,9 @@
 
-/*! 
+/*!
     \file curve.h
     \brief A basic 3D curve framework
-    
+
     Contains classes to handle curves
-*/ 
+*/
 
 #ifndef _CURVE_H
@@ -49,5 +49,5 @@
   /** \param t the value on the curve [0-1] \returns quaternion of the rotation */
   virtual Quaternion calcQuat(float t) = 0;
- 
+
   // DEBUG
   void debug(void);
@@ -86,6 +86,6 @@
   virtual Vector calcAcc(float t);
   virtual Quaternion calcQuat(float t);
-  
-  
+
+
   Vector getPos(void) const;
 
Index: orxonox/trunk/src/lib/particles/particle_emitter.cc
===================================================================
--- orxonox/trunk/src/lib/particles/particle_emitter.cc	(revision 4596)
+++ orxonox/trunk/src/lib/particles/particle_emitter.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -31,7 +31,8 @@
    \brief standard constructor
 */
-ParticleEmitter::ParticleEmitter(const Vector& direction, float angle, float emissionRate, 
-		  float velocity)
-{
+ParticleEmitter::ParticleEmitter(const Vector& direction, float angle, float emissionRate,
+                  float velocity)
+{
+  this->setClassID(CL_PARTICLE_EMITTER, "ParticleEmitter");
   this->type = EMITTER_DOT;
   this->emitterSize = 1.0;
@@ -64,5 +65,5 @@
    removes the EmitterSystem from the ParticleEngine
 */
-ParticleEmitter::~ParticleEmitter () 
+ParticleEmitter::~ParticleEmitter ()
 {
   ParticleEngine::getInstance()->removeEmitter(this);
@@ -91,5 +92,5 @@
   LoadParam<ParticleEmitter>(root, "emission-velocity", this, &ParticleEmitter::setEmissionVelocity)
     .describe("How fast the particles are emittet (their initial speed)");
-  
+
   LoadParam<ParticleEmitter>(root, "spread", this, &ParticleEmitter::setSpread)
     .describe("The angle the particles are emitted from (angle, deviation)");
@@ -224,34 +225,34 @@
     float count = (dt+this->saveTime) * this->emissionRate;
     this->saveTime = modff(count, &count) / this->emissionRate;
-    PRINTF(5)("emitting %f particles, saving %f seconds for the next round\n", count, this->saveTime); 
-    
+    PRINTF(5)("emitting %f particles, saving %f seconds for the next round\n", count, this->saveTime);
+
     if (likely(count > 0))
       {
-	Vector inheritVelocity = this->getVelocity() * this->inheritSpeed;
-	for (int i = 0; i < count; i++)
-	  // emmits from EMITTER_DOT,
-	  {
-	    Vector randDir = Vector(rand()-RAND_MAX/2, rand()-RAND_MAX/2, rand()-RAND_MAX/2);
-	    randDir.normalize();
-	    randDir = (this->getAbsDir()*Quaternion(angle + randomAngle *((float)rand()/RAND_MAX -.5), randDir)).apply(this->direction);
-	    Vector velocityV = randDir.getNormalized()*this->velocity + inheritVelocity;
-
-	    // this should spread the Particles evenly. if the Emitter is moved around quickly
-	    Vector equalSpread = this->getVelocity() * rand()/RAND_MAX * dt;
-	    Vector extension; // the Vector for different fields.
-
-	    if (this->type & 2)
-	      {
-		extension = Vector(this->emitterSize * ((float)rand()/RAND_MAX -.5), 0, this->emitterSize * ((float)rand()/RAND_MAX - .5));
-		extension = this->getAbsDir().apply(extension);
-	      }
-	    else if (this->type & 8)
-	      {
-		extension = Vector((float)rand()/RAND_MAX -.5, (float)rand()/RAND_MAX -.5, (float)rand()/RAND_MAX -.5) * this->emitterSize;
-	      }
-
-	    system->addParticle(this->getAbsCoor() + extension - equalSpread, velocityV);
-	    
-	  }
+        Vector inheritVelocity = this->getVelocity() * this->inheritSpeed;
+        for (int i = 0; i < count; i++)
+          // emmits from EMITTER_DOT,
+          {
+            Vector randDir = Vector(rand()-RAND_MAX/2, rand()-RAND_MAX/2, rand()-RAND_MAX/2);
+            randDir.normalize();
+            randDir = (this->getAbsDir()*Quaternion(angle + randomAngle *((float)rand()/RAND_MAX -.5), randDir)).apply(this->direction);
+            Vector velocityV = randDir.getNormalized()*this->velocity + inheritVelocity;
+
+            // this should spread the Particles evenly. if the Emitter is moved around quickly
+            Vector equalSpread = this->getVelocity() * rand()/RAND_MAX * dt;
+            Vector extension; // the Vector for different fields.
+
+            if (this->type & 2)
+              {
+                extension = Vector(this->emitterSize * ((float)rand()/RAND_MAX -.5), 0, this->emitterSize * ((float)rand()/RAND_MAX - .5));
+                extension = this->getAbsDir().apply(extension);
+              }
+            else if (this->type & 8)
+              {
+                extension = Vector((float)rand()/RAND_MAX -.5, (float)rand()/RAND_MAX -.5, (float)rand()/RAND_MAX -.5) * this->emitterSize;
+              }
+
+            system->addParticle(this->getAbsCoor() + extension - equalSpread, velocityV);
+
+          }
       }
   }
Index: orxonox/trunk/src/lib/particles/particle_emitter.h
===================================================================
--- orxonox/trunk/src/lib/particles/particle_emitter.h	(revision 4596)
+++ orxonox/trunk/src/lib/particles/particle_emitter.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file particle_emitter.h
     \brief Definition of a ParticleEmitter
@@ -9,13 +9,16 @@
 #include "p_node.h"
 
-// FORWARD DEFINITION 
+// FORWARD DEFINITION
 class ParticleSystem;
 class TiXmlElement;
 
 //! The form of the Emitter to emit from
-typedef enum EMITTER_TYPE { EMITTER_DOT   = 1,
-			    EMITTER_PLANE = 2,
-			    EMITTER_SPHERE= 4,
-			    EMITTER_CUBE  = 8 };
+  typedef enum EMITTER_TYPE
+{
+  EMITTER_DOT     = 1,
+  EMITTER_PLANE   = 2,
+  EMITTER_SPHERE  = 4,
+  EMITTER_CUBE    = 8
+};
 
 //! A class to handle an Emitter.
@@ -24,8 +27,8 @@
  public:
   ParticleEmitter(const Vector& direction, float angle = .5,
-		  float emissionRate = 1.0, float velocity = 1.0);
+                  float emissionRate = 1.0, float velocity = 1.0);
   ParticleEmitter(const TiXmlElement* root);
   virtual ~ParticleEmitter(void);
-  
+
   void loadParams(const TiXmlElement* root);
 
Index: orxonox/trunk/src/lib/particles/particle_engine.cc
===================================================================
--- orxonox/trunk/src/lib/particles/particle_engine.cc	(revision 4596)
+++ orxonox/trunk/src/lib/particles/particle_engine.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -30,7 +30,8 @@
    \brief standard constructor
 */
-ParticleEngine::ParticleEngine () 
+ParticleEngine::ParticleEngine ()
 {
    this->setClassID(CL_PARTICLE_ENGINE, "ParticleEngine");
+   this->setName("ParticleEngine");
 
    this->systemList = new tList<ParticleSystem>;
@@ -47,5 +48,5 @@
    \brief deletes all the system, emitters, connections and Lists
 */
-ParticleEngine::~ParticleEngine () 
+ParticleEngine::~ParticleEngine ()
 {
   // delete all remaining systems
@@ -113,14 +114,14 @@
     {
       if (tmpConnection->emitter == emitter && tmpConnection->system == system)
-	{
-	  PRINTF(2)("Connection between Emitter and System already added\n");
-	  delete tmpConIt;
-	  return;
-	}
-      
+        {
+          PRINTF(2)("Connection between Emitter and System already added\n");
+          delete tmpConIt;
+          return;
+        }
+
       tmpConnection = tmpConIt->nextElement();
     }
   delete tmpConIt;
-  
+
 
 
@@ -144,5 +145,5 @@
     {
       if (tmpConnection->system == system)
-	this->breakConnection(tmpConnection);
+        this->breakConnection(tmpConnection);
       tmpConnection = tmpConIt->nextElement();
     }
@@ -165,5 +166,5 @@
     {
       if (tmpConnection->emitter == emitter)
-	this->breakConnection(tmpConnection);
+        this->breakConnection(tmpConnection);
       tmpConnection = tmpConIt->nextElement();
     }
@@ -191,7 +192,7 @@
     if (tmpConnection->emitter == emitter && tmpConnection->system == system)
       {
-	this->breakConnection(tmpConnection);
-	delete tmpConIt;
-	return true;
+        this->breakConnection(tmpConnection);
+        delete tmpConIt;
+        return true;
       }
     tmpConnection = tmpConIt->nextElement();
@@ -268,8 +269,8 @@
     {
       if (!strcmp(systemName, tmpSys->getName()))
-	{
-	  delete tmpIt;
-	  return tmpSys;
-	}
+        {
+          delete tmpIt;
+          return tmpSys;
+        }
       tmpSys = tmpIt->nextElement();
     }
@@ -291,8 +292,8 @@
       count++;
       if ( count == number)
-	{
-	  delete tmpIt;
-	  return tmpSys;
-	}
+        {
+          delete tmpIt;
+          return tmpSys;
+        }
       tmpSys = tmpIt->nextElement();
     }
@@ -312,8 +313,8 @@
     {
       if (!strcmp(emitterName, tmpEmit->getName()))
-	{
-	  delete tmpIt;
-	  return tmpEmit;
-	}
+        {
+          delete tmpIt;
+          return tmpEmit;
+        }
       tmpEmit = tmpIt->nextElement();
     }
@@ -336,8 +337,8 @@
       count++;
       if ( count == number)
-	{
-	  delete tmpIt;
-	  return tmpEmit;
-	}
+        {
+          delete tmpIt;
+          return tmpEmit;
+        }
       tmpEmit = tmpIt->nextElement();
     }
@@ -356,5 +357,5 @@
   PRINT(0)(" Reference: %p\n", ParticleEngine::singletonRef);
   PRINT(0)(" Count: Emitters: %d; Systems: %d, Connections: %d\n",
-	    this->emitterList->getSize(), this->systemList->getSize(), this->connectionList->getSize());
+            this->emitterList->getSize(), this->systemList->getSize(), this->connectionList->getSize());
   if (this->connectionList->getSize() > 0)
     {
@@ -365,8 +366,8 @@
       ParticleConnection* tmpConnection = tmpConIt->nextElement();
       while(tmpConnection)
-	{
-	  PRINT(0)(" Emitter '%s' emitts into System '%s'\n", tmpConnection->emitter->getName(), tmpConnection->system->getName());
-	  tmpConnection = tmpConIt->nextElement();
-	}
+        {
+          PRINT(0)(" Emitter '%s' emitts into System '%s'\n", tmpConnection->emitter->getName(), tmpConnection->system->getName());
+          tmpConnection = tmpConIt->nextElement();
+        }
       delete tmpConIt;
     }
@@ -376,8 +377,8 @@
       ParticleSystem* tmpSys = tmpIt->nextElement();
       while(tmpSys)
-	{
-	  tmpSys->debug();
-	  tmpSys = tmpIt->nextElement();
-	}
+        {
+          tmpSys->debug();
+          tmpSys = tmpIt->nextElement();
+        }
       delete tmpIt;
     }
Index: orxonox/trunk/src/lib/particles/particle_system.cc
===================================================================
--- orxonox/trunk/src/lib/particles/particle_system.cc	(revision 4596)
+++ orxonox/trunk/src/lib/particles/particle_system.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -41,4 +41,5 @@
 {
   this->setClassID(CL_PARTICLE_SYSTEM, "ParticleSystem");
+
   this->material = NULL;
   this->maxCount = maxCount;
@@ -125,5 +126,5 @@
 /**
    \brief Sets the lifespan of newly created particles
-*/   
+*/
 void ParticleSystem::setLifeSpan(float lifeSpan, float randomLifeSpan)
 {
@@ -197,19 +198,19 @@
 {
   Particle* tickPart = particles;  // the particle to Tick
-  Particle* prevPart = NULL;       // 
+  Particle* prevPart = NULL;       //
   while (likely(tickPart != NULL))
     {
       // applying force to the System.
       if (likely (tickPart->mass > 0.0))
-	tickPart->velocity += tickPart->extForce / tickPart->mass * dt;
+        tickPart->velocity += tickPart->extForce / tickPart->mass * dt;
 
       // rendering new position.
       tickPart->position = tickPart->position + tickPart->velocity * dt;
       tickPart->radius = radiusAnim.getValue(tickPart->lifeCycle)
-	+ randRadiusAnim.getValue(tickPart->lifeCycle) * tickPart->radiusRand;
+        + randRadiusAnim.getValue(tickPart->lifeCycle) * tickPart->radiusRand;
 
       tickPart->mass = massAnim.getValue(tickPart->lifeCycle)
-	+ randMassAnim.getValue(tickPart->lifeCycle) * tickPart->massRand;
-      
+        + randMassAnim.getValue(tickPart->lifeCycle) * tickPart->massRand;
+
       tickPart->extForce = Vector(0,0,0);
 
@@ -223,35 +224,35 @@
 
       if (this->conserve < 1.0)
-	tickPart->velocity = tickPart->velocity * this->conserve;
+        tickPart->velocity = tickPart->velocity * this->conserve;
       // find out if we have to delete tickPart
       if (unlikely((tickPart->lifeCycle += dt/tickPart->lifeTime) >= 1.0))
-	{
-	  // remove the particle from the list
-	  if (likely(prevPart != NULL))
-	    {
-	      prevPart->next = tickPart->next;
-	      tickPart->next = this->deadList;
-	      this->deadList = tickPart;
-	      tickPart = prevPart->next;
-	    }
-	  else
-	    {
-	      prevPart = NULL;
-	      this->particles = tickPart->next;
-	      tickPart->next = this->deadList;
-	      this->deadList = tickPart;
-	      tickPart = this->particles;
-	    }
-	  --this->count;
-	}
+        {
+          // remove the particle from the list
+          if (likely(prevPart != NULL))
+            {
+              prevPart->next = tickPart->next;
+              tickPart->next = this->deadList;
+              this->deadList = tickPart;
+              tickPart = prevPart->next;
+            }
+          else
+            {
+              prevPart = NULL;
+              this->particles = tickPart->next;
+              tickPart->next = this->deadList;
+              this->deadList = tickPart;
+              tickPart = this->particles;
+            }
+          --this->count;
+        }
       else
-	{      
-	  prevPart = tickPart;
-	  tickPart = tickPart->next;
-	}
-    }
-}
-
-/** 
+        {
+          prevPart = tickPart;
+          tickPart = tickPart->next;
+        }
+    }
+}
+
+/**
     \brief applies some force to a Particle.
     \param field the Field to apply.
@@ -281,5 +282,5 @@
 
   Particle* drawPart = particles;
-      
+
   switch (this->particleType)
     {
@@ -289,48 +290,48 @@
       glDepthMask(GL_FALSE);
 
-      material->select(); 
+      material->select();
       //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-      
+
 
       while (likely(drawPart != NULL))
-	{
-	  glColor4fv(drawPart->color);
-	  //! \todo implement a faster code for the look-at Camera algorithm.
-
-	  const PNode* camera = State::getInstance()->getCamera();  //!< \todo MUST be different
-	  Vector cameraPos = camera->getAbsCoor();
-	  Vector cameraTargetPos = State::getInstance()->getCameraTarget()->getAbsCoor();
-	  Vector view = cameraTargetPos - cameraPos;
-	  Vector up = Vector(0, 1, 0);
-	  up = camera->getAbsDir().apply(up);
-	  Vector h = up.cross(view);
-	  Vector v = h.cross(view);
-	  h.normalize();
-	  v.normalize();
-	  v *= .5 * drawPart->radius;
-	  h *= .5 * drawPart->radius;
-
-	  glBegin(GL_TRIANGLE_STRIP);
-	  glTexCoord2i(1, 1);
-	  glVertex3f(drawPart->position.x - h.x - v.x,
-		     drawPart->position.y - h.y - v.y,
-		     drawPart->position.z - h.z - v.z);
-	  glTexCoord2i(0, 1);
-	  glVertex3f(drawPart->position.x - h.x + v.x,
-		     drawPart->position.y - h.y + v.y,
-		     drawPart->position.z - h.z + v.z);
-	  glTexCoord2i(1, 0);
-	  glVertex3f(drawPart->position.x + h.x - v.x,
-		     drawPart->position.y + h.y - v.y,
-		     drawPart->position.z + h.z - v.z);
-	  glTexCoord2i(0, 0);
-	  glVertex3f(drawPart->position.x + h.x + v.x,
-		     drawPart->position.y + h.y + v.y,
-		     drawPart->position.z + h.z + v.z);
-
-	  glEnd();
-  
-	  drawPart = drawPart->next;
-	}
+        {
+          glColor4fv(drawPart->color);
+          //! \todo implement a faster code for the look-at Camera algorithm.
+
+          const PNode* camera = State::getInstance()->getCamera();  //!< \todo MUST be different
+          Vector cameraPos = camera->getAbsCoor();
+          Vector cameraTargetPos = State::getInstance()->getCameraTarget()->getAbsCoor();
+          Vector view = cameraTargetPos - cameraPos;
+          Vector up = Vector(0, 1, 0);
+          up = camera->getAbsDir().apply(up);
+          Vector h = up.cross(view);
+          Vector v = h.cross(view);
+          h.normalize();
+          v.normalize();
+          v *= .5 * drawPart->radius;
+          h *= .5 * drawPart->radius;
+
+          glBegin(GL_TRIANGLE_STRIP);
+          glTexCoord2i(1, 1);
+          glVertex3f(drawPart->position.x - h.x - v.x,
+                     drawPart->position.y - h.y - v.y,
+                     drawPart->position.z - h.z - v.z);
+          glTexCoord2i(0, 1);
+          glVertex3f(drawPart->position.x - h.x + v.x,
+                     drawPart->position.y - h.y + v.y,
+                     drawPart->position.z - h.z + v.z);
+          glTexCoord2i(1, 0);
+          glVertex3f(drawPart->position.x + h.x - v.x,
+                     drawPart->position.y + h.y - v.y,
+                     drawPart->position.z + h.z - v.z);
+          glTexCoord2i(0, 0);
+          glVertex3f(drawPart->position.x + h.x + v.x,
+                     drawPart->position.y + h.y + v.y,
+                     drawPart->position.z + h.z + v.z);
+
+          glEnd();
+
+          drawPart = drawPart->next;
+        }
       glDepthMask(GL_TRUE);
       break;
@@ -340,26 +341,26 @@
       glBegin(GL_LINES);
       while (likely(drawPart != NULL))
-	{
-	  glColor4fv(drawPart->color);
-	  glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z);
-	  glVertex3f(drawPart->position.x - drawPart->velocity.x,
-		     drawPart->position.y - drawPart->velocity.y,
-		     drawPart->position.z - drawPart->velocity.z);
-	  drawPart = drawPart->next;
-	}
+        {
+          glColor4fv(drawPart->color);
+          glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z);
+          glVertex3f(drawPart->position.x - drawPart->velocity.x,
+                     drawPart->position.y - drawPart->velocity.y,
+                     drawPart->position.z - drawPart->velocity.z);
+          drawPart = drawPart->next;
+        }
       glEnd();
       break;
-      
+
     case PARTICLE_DOT:
       glBegin(GL_POINTS);
       while (likely(drawPart != NULL))
-	{
-	  glColor4fv(drawPart->color);
-
-	  glLineWidth(drawPart->radius);
-
-	  glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z);
-	  drawPart = drawPart->next;
-	}
+        {
+          glColor4fv(drawPart->color);
+
+          glLineWidth(drawPart->radius);
+
+          glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z);
+          drawPart = drawPart->next;
+        }
       glEnd();
       break;
@@ -380,35 +381,35 @@
       // if it is the first Particle
       if (unlikely(particles == NULL))
-	{
-	  if (likely(deadList != NULL))
-	    {
-	      this->particles = this->deadList;
-	      deadList = deadList->next;
-	    }
-	  else
-	    {
-	      PRINTF(5)("Generating new Particle\n");
-	      this->particles = new Particle;
-	    }
-	  this->particles->next = NULL;
-	}
+        {
+          if (likely(deadList != NULL))
+            {
+              this->particles = this->deadList;
+              deadList = deadList->next;
+            }
+          else
+            {
+              PRINTF(5)("Generating new Particle\n");
+              this->particles = new Particle;
+            }
+          this->particles->next = NULL;
+        }
       // filling the List from the beginning
       else
-	{
-	  Particle* tmpPart;
-	  if (likely(deadList != NULL))
-	    {
-	      tmpPart = this->deadList;
-	      deadList = deadList->next;
-	    }
-	  else
-	    {
-	      PRINTF(5)("Generating new Particle\n");
-	      tmpPart = new Particle;
-	    }
-	  tmpPart->next = this->particles;
-	  this->particles = tmpPart;
-	}
-      
+        {
+          Particle* tmpPart;
+          if (likely(deadList != NULL))
+            {
+              tmpPart = this->deadList;
+              deadList = deadList->next;
+            }
+          else
+            {
+              PRINTF(5)("Generating new Particle\n");
+              tmpPart = new Particle;
+            }
+          tmpPart->next = this->particles;
+          this->particles = tmpPart;
+        }
+
       particles->lifeTime = this->lifeSpan + (float)(rand()/RAND_MAX)* this->randomLifeSpan;
       particles->lifeCycle = 0.0;
Index: orxonox/trunk/src/lib/particles/particle_system.h
===================================================================
--- orxonox/trunk/src/lib/particles/particle_system.h	(revision 4596)
+++ orxonox/trunk/src/lib/particles/particle_system.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file particle_system.h
 
@@ -23,10 +23,13 @@
 
 //! An enumerator for the different types of particles.
-typedef enum PARTICLE_TYPE { PARTICLE_DOT           =  PARTICLE_DOT_MASK,
-			     PARTICLE_SPARK         =  PARTICLE_SPARK_MASK,
-			     PARTICLE_SPRITE        =  PARTICLE_SPRITE_MASK,
-			     PARTICLE_MULTI_SPRITE  =  PARTICLE_SPRITE_MASK | PARTICLE_MULTI_MASK,
-			     PARTICLE_MODEL         =  PARTICLE_MODEL_MASK,
-			     PARTICLE_MULTI_MODE    =  PARTICLE_MODEL_MASK | PARTICLE_MULTI_MASK };
+typedef enum PARTICLE_TYPE
+{
+  PARTICLE_DOT           =  PARTICLE_DOT_MASK,
+  PARTICLE_SPARK         =  PARTICLE_SPARK_MASK,
+  PARTICLE_SPRITE        =  PARTICLE_SPRITE_MASK,
+  PARTICLE_MULTI_SPRITE  =  PARTICLE_SPRITE_MASK | PARTICLE_MULTI_MASK,
+  PARTICLE_MODEL         =  PARTICLE_MODEL_MASK,
+  PARTICLE_MULTI_MODE    =  PARTICLE_MODEL_MASK | PARTICLE_MULTI_MASK
+};
 
 #define PARTICLE_DEFAULT_MAX_COUNT    200               //!< A default count of particles in the system.
@@ -59,8 +62,8 @@
 //! A class to handle ParticleSystems
 class ParticleSystem : public WorldEntity, public PhysicsInterface {
-  
+
  public:
   ParticleSystem(unsigned int maxCount = PARTICLE_DEFAULT_MAX_COUNT,
-		 PARTICLE_TYPE type = PARTICLE_DEFAULT_TYPE);
+                 PARTICLE_TYPE type = PARTICLE_DEFAULT_TYPE);
   virtual ~ParticleSystem();
 
@@ -116,5 +119,5 @@
 
   GLuint*           glID;                //!< A List of different gl-List-ID's
-  GLuint            dialectCount;        //!< How many different types of particles are there in the Particle System  
+  GLuint            dialectCount;        //!< How many different types of particles are there in the Particle System
 
   // per particle attributes
Index: orxonox/trunk/src/lib/particles/quick_animation.cc
===================================================================
--- orxonox/trunk/src/lib/particles/quick_animation.cc	(revision 4596)
+++ orxonox/trunk/src/lib/particles/quick_animation.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -27,5 +27,4 @@
 using namespace std;
 
-
 /**
    \brief standard constructor
@@ -33,5 +32,5 @@
 QuickAnimation::QuickAnimation (void)
 {
-   this->setClassName("QuickAnimation");
+   this->setClassID(CL_QUICK_ANIMATION, "QuickAnimation");
 
    this->first = this->current = NULL;
@@ -47,5 +46,5 @@
   this->current = this->first;
   QuickKeyFrame delKF;
-  
+
   while (this->current != NULL)
     {
@@ -54,5 +53,4 @@
       this->current = this->first;
     }
-
 }
 
@@ -70,9 +68,9 @@
       // if it is between some keyframes
       if ((!this->current->next && this->current->position < position)
-	  || (this->current->position < position && this->current->next->position > position))
-	break;
+          || (this->current->position < position && this->current->next->position > position))
+        break;
       // if it is the same as an already existing keyframe
       else if (this->current->position == position)
-	return false;
+        return false;
       this->current = this->current->next;
     }
@@ -92,5 +90,5 @@
   newKey->value = value;
   newKey->position = position;
-  
+
   this->current = this->first;
 
@@ -110,9 +108,9 @@
     {
       if (this->current->position < position+region && this->current->position > position-region)
-	{
-	  this->current->value = value;
-	  return true;
-	}
-      this->current = this->current->next;  
+        {
+          this->current->value = value;
+          return true;
+        }
+      this->current = this->current->next;
     }
   this->current = this->first;
@@ -122,18 +120,18 @@
 /*
   \param position The position where to find the Node to kill
-  
+
   bool QuickAnimation::removeEntry(float position)
   {
   this->current = this->first;
-  QuickKeyFrame* last = 
-  
+  QuickKeyFrame* last =
+
   while (this->current)
   {
   if (this->current->position == position)
   {
-  
-  
+
+
   }
-  this->current = this->current->next;  
+  this->current = this->current->next;
   }
   this->current = this->first;
@@ -145,5 +143,5 @@
    \param position the position to get the value from :)
 */
-float QuickAnimation::getValue(float position) 
+float QuickAnimation::getValue(float position)
 {
   if (unlikely(this->first == NULL))
@@ -154,16 +152,16 @@
     {
       if (unlikely(position < this->current->position))
-	{
-	  if (position <= this->first->position)
-	    return this->first->value;
-	  this->current = this->first;
-	}
+        {
+          if (position <= this->first->position)
+            return this->first->value;
+          this->current = this->first;
+        }
       while (likely(this->current->next != NULL && position > this->current->next->position))
-	this->current = this->current->next;
+        this->current = this->current->next;
       if (this->current->next == NULL)
-	return this->current->value;
-	       
+        return this->current->value;
+
       return this->current->value + (this->current->next->value - this->current->value)
-	* ((position-this->current->position) / (this->current->next->position -this->current->position));
+        * ((position-this->current->position) / (this->current->next->position -this->current->position));
     }
 }
Index: orxonox/trunk/src/lib/particles/quick_animation.h
===================================================================
--- orxonox/trunk/src/lib/particles/quick_animation.h	(revision 4596)
+++ orxonox/trunk/src/lib/particles/quick_animation.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
     \file quick_animation.h
     \brief Definition of the QuickAnimation-class
@@ -21,4 +21,5 @@
    this class is optimized for a raising value. eg. 100 particles sorted
    by age.
+  \todo speedUP this stuff (especially getValue)
 */
 class QuickAnimation : public BaseObject {
Index: orxonox/trunk/src/lib/physics/physics_connection.cc
===================================================================
--- orxonox/trunk/src/lib/physics/physics_connection.cc	(revision 4596)
+++ orxonox/trunk/src/lib/physics/physics_connection.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -31,4 +31,5 @@
 PhysicsConnection::PhysicsConnection(PhysicsInterface* subject, Field* field)
 {
+  this->setClassID(CL_PHYSICS_CONNECTION, "PhysicsConnection");
   this->type = PCON_PhysIField;
   this->subject = subject;
@@ -43,10 +44,10 @@
 
 */
-PhysicsConnection::~PhysicsConnection () 
+PhysicsConnection::~PhysicsConnection ()
 {
   PhysicsEngine::getInstance()->removeConnection(this);
 }
 
-/** 
+/**
     \brief applies the Force to some Object.
 */
Index: orxonox/trunk/src/lib/physics/physics_connection.h
===================================================================
--- orxonox/trunk/src/lib/physics/physics_connection.h	(revision 4596)
+++ orxonox/trunk/src/lib/physics/physics_connection.h	(revision 4597)
@@ -1,8 +1,8 @@
-/*! 
+/*!
     \file physics_connection.h
     \brief Definition of The Physical Connection Class.
 */
 
-#ifndef _PHYSICS_CONNECTION_H 
+#ifndef _PHYSICS_CONNECTION_H
 #define _PHYSICS_CONNECTION_H
 
@@ -14,6 +14,9 @@
 
 //! An enumerator for different ConnectionTypes
-typedef enum PCON_Type { PCON_PhysIPhysI = 0,
-			 PCON_PhysIField = 1};
+typedef enum PCON_Type
+{
+  PCON_PhysIPhysI = 1,
+  PCON_PhysIField = 2
+};
 
 
@@ -34,8 +37,8 @@
  private:
   PCON_Type type;                    //!< What kind of connection this is.
-  
+
   PhysicsInterface* subject;         //!< The main Subject of this Connection.
   PhysicsInterface* partner2;        //!< The second partner of this Connection.
-  
+
   Field* field;                      //!< The field to connect either subject of ParticleSystem to.
 };
Index: orxonox/trunk/src/lib/physics/physics_engine.cc
===================================================================
--- orxonox/trunk/src/lib/physics/physics_engine.cc	(revision 4596)
+++ orxonox/trunk/src/lib/physics/physics_engine.cc	(revision 4597)
@@ -30,9 +30,9 @@
 PhysicsEngine::PhysicsEngine()
 {
-   this->setClassName ("PhysicsEngine");
-
-   this->connections = new tList<PhysicsConnection>;
-   this->interfaces = new tList<PhysicsInterface>;
-   this->fields = new tList<Field>;
+  this->setClassID(CL_PHYSICS_ENGINE, "PhysicsEngine");
+  this->setName("PhysicsEngine");
+  this->connections = new tList<PhysicsConnection>;
+  this->interfaces = new tList<PhysicsInterface>;
+  this->fields = new tList<Field>;
 }
 
Index: orxonox/trunk/src/lib/physics/physics_interface.cc
===================================================================
--- orxonox/trunk/src/lib/physics/physics_interface.cc	(revision 4596)
+++ orxonox/trunk/src/lib/physics/physics_interface.cc	(revision 4597)
@@ -35,14 +35,14 @@
 /**
    \brief standard constructor
-*/
+ */
 PhysicsInterface::PhysicsInterface (void* objectPointer)
 {
+  this->setClassID(CL_PHYSICS_INTERFACE, "PhysicsInterface");
   this->objectPointer = objectPointer;
 
-  //   this->setClassName ("PhysicsInterface");
-   this->mass = 1;
-   this->massChildren = 0;
-   this->forceSum = Vector(0, 0, 0);
-   this->bForceApplied = false;
+  this->mass = 1;
+  this->massChildren = 0;
+  this->forceSum = Vector(0, 0, 0);
+  this->bForceApplied = false;
 
    PhysicsEngine::getInstance()->addPhysicsInterface(this);
Index: orxonox/trunk/src/lib/physics/physics_interface.h
===================================================================
--- orxonox/trunk/src/lib/physics/physics_interface.h	(revision 4596)
+++ orxonox/trunk/src/lib/physics/physics_interface.h	(revision 4597)
@@ -28,5 +28,4 @@
 class PhysicsInterface : virtual public BaseObject
 {
-
  public:
   PhysicsInterface(void* objectPointer);
Index: orxonox/trunk/src/lib/sound/sound_engine.cc
===================================================================
--- orxonox/trunk/src/lib/sound/sound_engine.cc	(revision 4596)
+++ orxonox/trunk/src/lib/sound/sound_engine.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -40,4 +40,7 @@
 SoundBuffer::SoundBuffer(const char* fileName)
 {
+  this->setClassID(CL_SOUND_BUFFER, "SoundBuffer");
+  this->setName(fileName);
+
   SoundEngine::getInstance()->addBuffer(this);
 
@@ -45,5 +48,5 @@
   ALvoid* data;
   ALsizei freq;
-  
+
   ALenum result;
 
@@ -57,5 +60,5 @@
   if ((result = alGetError()) != AL_NO_ERROR)
     SoundEngine::PrintALErrorString(result);
-  
+
   // send the loaded wav data to the buffer
   alBufferData(this->bufferID, format, data, this->size, freq);
@@ -83,4 +86,6 @@
 SoundSource::SoundSource(SoundBuffer* buffer, PNode* sourceNode)
 {
+  this->setClassID(CL_SOUND_SOURCE, "SoundSource");
+
   ALenum result;
 
@@ -161,8 +166,9 @@
    \brief standard constructor
 */
-SoundEngine::SoundEngine () 
-{
-  this->setClassName ("SoundEngine");
-  
+SoundEngine::SoundEngine ()
+{
+  this->setClassID(CL_SOUND_ENGINE, "SoundEngine");
+  this->setName("SoundEngine");
+
   this->listener = NULL;
   this->bufferList = new tList<SoundBuffer>;
@@ -179,5 +185,5 @@
 
 */
-SoundEngine::~SoundEngine () 
+SoundEngine::~SoundEngine ()
 {
   SoundEngine::singletonRef = NULL;
@@ -262,5 +268,5 @@
     {
       if (buffer == enumSource->getBuffer())
-	delete enumSource;
+        delete enumSource;
       enumSource = sourceIterator->nextElement();
     }
@@ -300,11 +306,11 @@
     {
       alListener3f(AL_POSITION,
-		   this->listener->getAbsCoor().x,
-		   this->listener->getAbsCoor().y,
-		   this->listener->getAbsCoor().z);
+                   this->listener->getAbsCoor().x,
+                   this->listener->getAbsCoor().y,
+                   this->listener->getAbsCoor().z);
       alListener3f(AL_VELOCITY,
-		   this->listener->getVelocity().x,
-		   this->listener->getVelocity().y,
-		   this->listener->getVelocity().z);
+                   this->listener->getVelocity().x,
+                   this->listener->getVelocity().y,
+                   this->listener->getVelocity().z);
       Vector absDirV = this->listener->getAbsDirV();
       ALfloat orientation [6] = {1,0,0, absDirV.x, absDirV.y, absDirV.z};
@@ -321,12 +327,12 @@
       if (likely(enumSource->getNode()!=NULL))
       {
-	alSource3f(enumSource->getID(), AL_POSITION,
-		   enumSource->getNode()->getAbsCoor().x,
-		   enumSource->getNode()->getAbsCoor().y,
-		   enumSource->getNode()->getAbsCoor().z);
-	alSource3f(enumSource->getID(), AL_VELOCITY,
-		   enumSource->getNode()->getVelocity().x,
-		   enumSource->getNode()->getVelocity().y,
-		   enumSource->getNode()->getVelocity().z);
+        alSource3f(enumSource->getID(), AL_POSITION,
+                   enumSource->getNode()->getAbsCoor().x,
+                   enumSource->getNode()->getAbsCoor().y,
+                   enumSource->getNode()->getAbsCoor().z);
+        alSource3f(enumSource->getID(), AL_VELOCITY,
+                   enumSource->getNode()->getVelocity().x,
+                   enumSource->getNode()->getVelocity().y,
+                   enumSource->getNode()->getVelocity().z);
       }
       enumSource = iterator->nextElement();
@@ -347,12 +353,12 @@
       SoundSource* enumSource = sourceIterator->nextElement();
       while (enumSource)
-	{
-	  if (enumBuffer == enumSource->getBuffer())
-	    break;
-	  enumSource = sourceIterator->nextElement();
-	}
+        {
+          if (enumBuffer == enumSource->getBuffer())
+            break;
+          enumSource = sourceIterator->nextElement();
+        }
       delete sourceIterator;
       if (enumSource == NULL)
-	ResourceManager::getInstance()->unload(enumBuffer);
+        ResourceManager::getInstance()->unload(enumBuffer);
       enumBuffer = bufferIterator->nextElement();
     }
@@ -402,5 +408,5 @@
       PRINTF(4)("AL_NO_ERROR\n");
       break;
-      
+
     case AL_INVALID_NAME:
       PRINTF(2)("AL_INVALID_NAME\n");
Index: orxonox/trunk/src/lib/sound/sound_engine.h
===================================================================
--- orxonox/trunk/src/lib/sound/sound_engine.h	(revision 4596)
+++ orxonox/trunk/src/lib/sound/sound_engine.h	(revision 4597)
@@ -1,5 +1,5 @@
-/*! 
+/*!
     \file sound_engine.h
-    \brief Definition of the SoundEngine singleton Class  
+    \brief Definition of the SoundEngine singleton Class
 */
 
@@ -20,5 +20,5 @@
 
 //! A class that represents a datastructure to play Sounds.
-class SoundBuffer
+class SoundBuffer : public BaseObject
 {
  public:
@@ -37,10 +37,10 @@
 
 //! A class that represents a SoundSource
-class SoundSource
+class SoundSource : virtual public BaseObject
 {
  public:
   SoundSource(SoundBuffer* buffer, PNode* sourceNode = NULL);
   ~SoundSource(void);
-  
+
   // user interaction
   void play();
@@ -48,10 +48,10 @@
   void pause();
   void rewind();
-  
+
   // development functions
   /** \returns The ID of this Source */
   inline ALuint getID(void) const { return this->sourceID; }
   /** \returns the SoundBuffer of this Source */
-  inline SoundBuffer* getBuffer(void) const { return this->buffer; } 
+  inline SoundBuffer* getBuffer(void) const { return this->buffer; }
   /** \returns the SourceNode of this Source */
   inline PNode* getNode(void) const { return this->sourceNode;}
Index: orxonox/trunk/src/lib/util/ini_parser.cc
===================================================================
--- orxonox/trunk/src/lib/util/ini_parser.cc	(revision 4596)
+++ orxonox/trunk/src/lib/util/ini_parser.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -28,4 +28,6 @@
 IniParser::IniParser (const char* filename)
 {
+  this->setClassID(CL_INI_PARSER, "IniParser");
+
   stream = NULL;
   bInSection = false;
@@ -50,5 +52,5 @@
   char* tmpName = ResourceManager::homeDirCheck(filename);
   if( filename == NULL) return -1;
-  if( stream != NULL)	fclose (stream);
+  if( stream != NULL)   fclose (stream);
   if( (stream = fopen (tmpName, "r")) == NULL)
     {
@@ -71,9 +73,9 @@
   bInSection = false;
   if( stream == NULL) return -1;
-  
+
   char linebuffer[PARSELINELENGHT];
   char secbuffer[PARSELINELENGHT];
   char* ptr;
-  
+
   rewind (stream);
   while( !feof( stream))
@@ -85,15 +87,15 @@
       // check for section identifyer
       if( sscanf (linebuffer, "[%s", secbuffer) == 1)
-	{
-	  if( (ptr = strchr( secbuffer, ']')) != NULL)
-	    {
-	      *ptr = 0;
-	      if( !strcmp( secbuffer, section))
-		{
-		  bInSection = true;
-		  return 0;
-		}
-	    }
-	}
+        {
+          if( (ptr = strchr( secbuffer, ']')) != NULL)
+            {
+              *ptr = 0;
+              if( !strcmp( secbuffer, section))
+                {
+                  bInSection = true;
+                  return 0;
+                }
+            }
+        }
     }
   return -1;
@@ -114,8 +116,8 @@
     }
   if( !bInSection) return -1;
-  
+
   char linebuffer[PARSELINELENGHT];
   char* ptr;
-  
+
   while( !feof( stream))
     {
@@ -125,22 +127,22 @@
       if( (ptr = strchr( linebuffer, '\n')) != NULL) *ptr = 0;
       if( linebuffer[0] == '[')
-	{
-	  bInSection = false;
-	  return -1;
-	}
+        {
+          bInSection = false;
+          return -1;
+        }
       sscanf(linebuffer, "%s = %s", name, value);
       return 0;
       /*
-	if( (ptr = strchr( tmpBuffer, '=')) != NULL)
-	{
-	if( ptr == linebuffer) continue;
-	strcpy (value, &ptr[1]);
-	strncpy (name, linebuffer, strlen (linebuffer) - strlen (value) - 1);
-	printf ("%s, %s\n", value, name);
-	return 0;
-	}
+        if( (ptr = strchr( tmpBuffer, '=')) != NULL)
+        {
+        if( ptr == linebuffer) continue;
+        strcpy (value, &ptr[1]);
+        strncpy (name, linebuffer, strlen (linebuffer) - strlen (value) - 1);
+        printf ("%s, %s\n", value, name);
+        return 0;
+        }
       */
     }
-  return -1;	
+  return -1;
 }
 
@@ -151,5 +153,5 @@
    \param defvalue: what should be returned in case the entry cannot be found
    \return a pointer to a buffer conatining the value of the specified entry. This buffer will contain the data specified in defvalue in case the entry wasn't found
-   
+
    The returned pointer points to an internal buffer, so do not free it on your own. Do not give a NULL pointer to defvalue, this will certainly
    lead to unwanted behaviour.
@@ -159,15 +161,15 @@
   strcpy (internbuf, defvalue);
   if( getSection (section) == -1) return internbuf;
-  
+
   char namebuf[PARSELINELENGHT];
   char valuebuf[PARSELINELENGHT];
-  
+
   while( nextVar (namebuf, valuebuf) != -1)
     {
       if( !strcmp (name, namebuf))
-	{
-	  strcpy (internbuf, valuebuf);
-	  return internbuf;
-	}
+        {
+          strcpy (internbuf, valuebuf);
+          return internbuf;
+        }
     }
   return internbuf;
Index: orxonox/trunk/src/lib/util/ini_parser.h
===================================================================
--- orxonox/trunk/src/lib/util/ini_parser.h	(revision 4596)
+++ orxonox/trunk/src/lib/util/ini_parser.h	(revision 4597)
@@ -2,5 +2,5 @@
     \file ini_parser.h
     \brief A small ini file parser
-    
+
     Can be used to find a defined [Section] in an ini file and get the VarName=Value entries
 */
@@ -12,4 +12,5 @@
 #include <string.h>
 #include <stdlib.h>
+#include "base_object.h"
 
 #define PARSELINELENGHT     512       //!< how many chars to read at once
@@ -17,11 +18,12 @@
 //! ini-file parser
 /**
-	This class can be used to load an initializer file and parse it's contents for variablename=value pairs.
+        This class can be used to load an initializer file and parse it's contents for variablename=value pairs.
 */
-class IniParser {
+class IniParser : public BaseObject
+{
  public:
   IniParser (const char* filename);
   ~IniParser ();
-  
+
   char* getVar(const char* name, char* section, char* defvalue);
   int openFile(const char* name);
@@ -33,5 +35,5 @@
   bool          bInSection;                   //!< if the requested parameter is in the section.
   char          internbuf[PARSELINELENGHT];   //!< a buffer
-	
+
 
 };
Index: orxonox/trunk/src/lib/util/substring.cc
===================================================================
--- orxonox/trunk/src/lib/util/substring.cc	(revision 4596)
+++ orxonox/trunk/src/lib/util/substring.cc	(revision 4597)
@@ -1,3 +1,3 @@
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -11,5 +11,7 @@
    ### File Specific:
    main-programmer: Christian Meyer
-   co-programmer: ...
+   co-programmer: Benjamin Grauer
+
+   2005-06-10: some naming conventions
 */
 
@@ -28,18 +30,18 @@
 {
   n = 0;
-	
+
   assert( string != NULL);
-	
+
   for( int i = 0; i < strlen(string); i++) if( string[i] == ',') n++;
 
   n += 1;
-	
+
   strings = new char*[n];
 
   assert (strings != NULL);
-	
+
   int i = 0;
   int l = 0;
-	
+
   const char* offset = string;
   char* end = strchr( string, ',');
@@ -57,5 +59,5 @@
       end = strchr( offset, ',');
     }
-	
+
   strings[i] = new char[l + 1];
   l = strlen( offset);
@@ -73,5 +75,5 @@
       delete strings[i];
     }
-	
+
   delete strings;
 }
Index: orxonox/trunk/src/lib/util/substring.h
===================================================================
--- orxonox/trunk/src/lib/util/substring.h	(revision 4596)
+++ orxonox/trunk/src/lib/util/substring.h	(revision 4597)
@@ -1,3 +1,3 @@
-/*! 
+/*!
   \file substring.h
   \brief a small class to get the parts of a string separated by commas
@@ -13,8 +13,8 @@
   SubString(const char* string);
   ~SubString();
-		
+
   int getCount();
   const char* getString( int i);
-		
+
  private:
   char**     strings;         //!< strings produced from a single string splitted in multiple strings
