Index: trunk/src/lib/graphics/render2D/element_2d.cc
===================================================================
--- trunk/src/lib/graphics/render2D/element_2d.cc	(revision 5214)
+++ trunk/src/lib/graphics/render2D/element_2d.cc	(revision 5215)
@@ -438,5 +438,5 @@
  * use this to add a child to this node.
  */
-void Element2D::addChild2D (Element2D* child, int parentingMod)
+void Element2D::addChild2D (Element2D* child, int parentingMode)
 {
   if( likely(child->parent != NULL))
@@ -445,5 +445,6 @@
     child->parent->children->remove(child);
   }
-  child->parentMode = parentMode;
+  if (parentingMode != E2D_PARENT_NONE)
+    child->parentMode = parentingMode;
   child->parent = this;
   this->children->add(child);
Index: trunk/src/lib/graphics/render2D/element_2d.h
===================================================================
--- trunk/src/lib/graphics/render2D/element_2d.h	(revision 5214)
+++ trunk/src/lib/graphics/render2D/element_2d.h	(revision 5215)
@@ -42,4 +42,5 @@
 typedef enum
 {
+  E2D_PARENT_NONE               =   0,
   E2D_PARENT_LOCAL_ROTATE       =   1,    //!< Rotates all the children around their centers.
   E2D_PARENT_ROTATE_MOVEMENT    =   2,    //!< Moves all the children around the center of their parent, without the rotation around their own centers.
@@ -138,5 +139,5 @@
 
 
-    void addChild2D (Element2D* child, int parentingMode = E2D_DEFAULT_PARENTING_MODE);
+    void addChild2D (Element2D* child, int parentingMode = E2D_PARENT_NONE);
     void addChild2D (const char* childName);
     void removeChild2D (Element2D* child);
Index: trunk/src/lib/graphics/spatial_separation/quadtree.cc
===================================================================
--- trunk/src/lib/graphics/spatial_separation/quadtree.cc	(revision 5214)
+++ trunk/src/lib/graphics/spatial_separation/quadtree.cc	(revision 5215)
@@ -53,8 +53,8 @@
   /* make an array with access to the leafs of the Quad-Tree */
   this->nodes = new QuadtreeNode*[(int)pow(4, treeDepth)];
-  int* index = new int; *index = 0;
+  int index = 0; //new int; *index = 0; // !!changed by bensch!!
   for(int i = 0; i < (int)pow(2, treeDepth); ++i)
   {
-    this->rootNode->buildHashTable(this->nodes, index);
+    this->rootNode->buildHashTable(this->nodes, &index);
   }
   /* sort and revert the hash table to fit the right position */
@@ -65,7 +65,7 @@
   this->quadLength = this->nodes[0]->getDimension()->getAxis() * 2.0f;
   Rectangle* r = this->rootNode->getDimension();
-  Vector* offset = new Vector();
-  float xOff = r->getCenter()->x - r->getAxis();
-  float yOff = r->getCenter()->z - r->getAxis();
+  //  Vector* offset = new Vector(); // unused removed by bensch
+  float xOff = r->getCenter().x - r->getAxis();
+  float yOff = r->getCenter().z - r->getAxis();
   this->offset = new Vector();
   this->offset->x = xOff;
@@ -136,6 +136,6 @@
       for( int k = j + 1; k < len; ++k)
       {
-        a = this->nodes[i * len + j]->getDimension()->getCenter()->z;
-        b = this->nodes[i * len + k]->getDimension()->getCenter()->z;
+        a = this->nodes[i * len + j]->getDimension()->getCenter().z;
+        b = this->nodes[i * len + k]->getDimension()->getCenter().z;
 
         if( b > a)
Index: trunk/src/lib/graphics/spatial_separation/quadtree_node.cc
===================================================================
--- trunk/src/lib/graphics/spatial_separation/quadtree_node.cc	(revision 5214)
+++ trunk/src/lib/graphics/spatial_separation/quadtree_node.cc	(revision 5215)
@@ -57,5 +57,5 @@
     PRINT(3)(" |");
   PRINT(3)(" | +-| (II) Rectangle Center (%5.2f, %5.2f), half axis length: %5.2f\n",
-  this->pDimension->getCenter()->x, this->pDimension->getCenter()->z, this->pDimension->getAxis());
+  this->pDimension->getCenter().x, this->pDimension->getCenter().z, this->pDimension->getAxis());
 
   this->init();
@@ -205,5 +205,5 @@
   tList<sTriangleExt*>*           listD = new tList<sTriangleExt*>();    //!< triangle list of nodeD
   const float*                    pVert;                                 //!< pointer to the vertices
-  const Vector*                   rectCenter;                            //!< vector to the center of the rect
+  Vector                          rectCenter;                            //!< vector to the center of the rect
 
   rectCenter = this->pDimension->getCenter();
@@ -213,11 +213,11 @@
     {
       pVert = &this->pVertices[this->pTriangles[i]->indexToVertices[j]];
-      if( pVert[0] > rectCenter->x + this->offset && pVert[2] > rectCenter->z + this->offset)
+      if( pVert[0] > rectCenter.x + this->offset && pVert[2] > rectCenter.z + this->offset)
         listA->add(&this->pTriangles[i]);
-      if( pVert[0] < rectCenter->x + this->offset && pVert[2] > rectCenter->z + this->offset)
+      if( pVert[0] < rectCenter.x + this->offset && pVert[2] > rectCenter.z + this->offset)
         listB->add(&this->pTriangles[i]);
-      if( pVert[0] < rectCenter->x + this->offset && pVert[2] < rectCenter->z + this->offset)
+      if( pVert[0] < rectCenter.x + this->offset && pVert[2] < rectCenter.z + this->offset)
         listC->add(&this->pTriangles[i]);
-      if( pVert[0] > rectCenter->x + this->offset && pVert[2] < rectCenter->z + this->offset)
+      if( pVert[0] > rectCenter.x + this->offset && pVert[2] < rectCenter.z + this->offset)
         listD->add(&this->pTriangles[i]);
     }
@@ -304,13 +304,13 @@
 
 
-  v.x = this->pDimension->getCenter()->x + this->pDimension->getAxis() / 2.0f;
+  v.x = this->pDimension->getCenter().x + this->pDimension->getAxis() / 2.0f;
   v.y = 0.0;
-  v.z = this->pDimension->getCenter()->z + this->pDimension->getAxis() / 2.0f;
+  v.z = this->pDimension->getCenter().z + this->pDimension->getAxis() / 2.0f;
   rA = new Rectangle(v, this->pDimension->getAxis() / 2.0f);
-  v.z = this->pDimension->getCenter()->z - this->pDimension->getAxis() / 2.0f;
+  v.z = this->pDimension->getCenter().z - this->pDimension->getAxis() / 2.0f;
   rB = new Rectangle(v, this->pDimension->getAxis() / 2.0f);
-  v.x = this->pDimension->getCenter()->x - this->pDimension->getAxis() / 2.0f;
+  v.x = this->pDimension->getCenter().x - this->pDimension->getAxis() / 2.0f;
   rC = new Rectangle(v, this->pDimension->getAxis() / 2.0f);
-  v.z = this->pDimension->getCenter()->z + this->pDimension->getAxis() / 2.0f;
+  v.z = this->pDimension->getCenter().z + this->pDimension->getAxis() / 2.0f;
   rD = new Rectangle(v, this->pDimension->getAxis() / 2.0f);
 
@@ -371,5 +371,5 @@
   for( int i = 0; i < this->treeDepth; ++i)
     PRINT(3)(" |");
-  PRINT(3)(" | +-| (II) Rectangle Dimension  (%5.2f, %5.2f) to (%5.2f, %5.2f), Center (%5.2f, %5.2f)\n", minX, minY, maxX, maxY, rect->getCenter()->x, rect->getCenter()->z, rect->getAxis());
+  PRINT(3)(" | +-| (II) Rectangle Dimension  (%5.2f, %5.2f) to (%5.2f, %5.2f), Center (%5.2f, %5.2f)\n", minX, minY, maxX, maxY, rect->getCenter().x, rect->getCenter().z, rect->getAxis());
   return rect;
 }
@@ -383,5 +383,5 @@
 bool QuadtreeNode::includesPoint(const Vector& v) const
 {
-  Vector center = *this->pDimension->getCenter();
+  Vector center = this->pDimension->getCenter();
   float ax = this->pDimension->getAxis();
 
@@ -492,5 +492,5 @@
   if( this->treeDepth == this->maxDepth)
   {
-    Vector t1 = *this->pDimension->getCenter();
+    Vector t1 = this->pDimension->getCenter();
     float ax = this->pDimension->getAxis();
     float h = 50.0f;
@@ -525,5 +525,5 @@
     return;
 
-  Vector t1 = *this->pDimension->getCenter();
+  Vector t1 = this->pDimension->getCenter();
   float ax = this->pDimension->getAxis();
   float h = 70.0f;
Index: trunk/src/lib/graphics/text_engine.cc
===================================================================
--- trunk/src/lib/graphics/text_engine.cc	(revision 5214)
+++ trunk/src/lib/graphics/text_engine.cc	(revision 5215)
@@ -405,5 +405,4 @@
   // setting default values.
   this->font = NULL;
-  this->fontFile = NULL;
   this->glyphArray = NULL;
   this->fastTextureID = 0;
@@ -446,11 +445,9 @@
 bool Font::loadFont(const char* fontFile)
 {
-  if (!this->fontFile)
+  if (!this->getName())
     {
       this->setName(fontFile);
-      this->fontFile = new char[strlen(fontFile)+1];
-      strcpy(this->fontFile, fontFile);
-
-      this->font = TTF_OpenFont(this->fontFile, this->fontSize);
+
+      this->font = TTF_OpenFont(this->getName(), this->fontSize);
       if(!this->font)
         {
Index: trunk/src/lib/graphics/text_engine.h
===================================================================
--- trunk/src/lib/graphics/text_engine.h	(revision 5214)
+++ trunk/src/lib/graphics/text_engine.h	(revision 5215)
@@ -190,5 +190,4 @@
   // information about the Font
   TTF_Font*     font;                //!< The font we use for this.
-  char*         fontFile;            //!< The fontfile from whitch the font was loaded.
   unsigned int  fontSize;            //!< The size of the font in pixels. each Font has one size.
   int           renderStyle;         //!< The Renderstyle
