Index: trunk/src/lib/graphics/effects/atmospheric_engine.cc
===================================================================
--- trunk/src/lib/graphics/effects/atmospheric_engine.cc	(revision 9391)
+++ trunk/src/lib/graphics/effects/atmospheric_engine.cc	(revision 9406)
@@ -25,5 +25,5 @@
 
 
-using namespace std;
+
 
 /**
@@ -116,5 +116,5 @@
         std::list<BaseObject*>::const_iterator it;
         for (it = weatherEffects->begin(); it != weatherEffects->end(); it++) {
-            /*      printf("%s::%s \n", (*it)->getClassName(), (*it)->getName());*/
+            /*      printf("%s::%s \n", (*it)->getClassCName(), (*it)->getName());*/
             dynamic_cast<WeatherEffect*>(*it)->tick(dt);
         }
Index: trunk/src/lib/graphics/effects/cloud_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/cloud_effect.cc	(revision 9391)
+++ trunk/src/lib/graphics/effects/cloud_effect.cc	(revision 9406)
@@ -40,5 +40,5 @@
 float     CloudEffect::fadeTime;
 
-using namespace std;
+
 
 SHELL_COMMAND(activate, CloudEffect, activateCloud);
Index: trunk/src/lib/graphics/effects/fog_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/fog_effect.cc	(revision 9391)
+++ trunk/src/lib/graphics/effects/fog_effect.cc	(revision 9406)
@@ -28,5 +28,5 @@
 SHELL_COMMAND(fadeout, FogEffect, fadeOutFog);
 
-using namespace std;
+
 
 CREATE_SCRIPTABLE_CLASS(FogEffect, CL_FOG_EFFECT,
Index: trunk/src/lib/graphics/effects/graphics_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/graphics_effect.cc	(revision 9391)
+++ trunk/src/lib/graphics/effects/graphics_effect.cc	(revision 9406)
@@ -23,5 +23,5 @@
 
 
-using namespace std;
+
 
 
Index: trunk/src/lib/graphics/effects/lense_flare.cc
===================================================================
--- trunk/src/lib/graphics/effects/lense_flare.cc	(revision 9391)
+++ trunk/src/lib/graphics/effects/lense_flare.cc	(revision 9406)
@@ -34,5 +34,5 @@
 
 
-using namespace std;
+
 
 
Index: trunk/src/lib/graphics/effects/lightning_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/lightning_effect.cc	(revision 9391)
+++ trunk/src/lib/graphics/effects/lightning_effect.cc	(revision 9406)
@@ -34,5 +34,5 @@
 SHELL_COMMAND(deactivate, LightningEffect, deactivateLightning);
 
-using namespace std;
+
 
 CREATE_SCRIPTABLE_CLASS(LightningEffect, CL_LIGHTNING_EFFECT,
@@ -130,6 +130,4 @@
 
     //load sound
-    if (this->thunderBuffer != NULL)
-        ResourceManager::getInstance()->unload(this->thunderBuffer);
     this->thunderBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/thunder.wav", WAV);
 
Index: trunk/src/lib/graphics/effects/rain_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/rain_effect.cc	(revision 9391)
+++ trunk/src/lib/graphics/effects/rain_effect.cc	(revision 9406)
@@ -39,5 +39,5 @@
 SHELL_COMMAND(stopraining, RainEffect, stopRaining);
 
-using namespace std;
+
 
 CREATE_SCRIPTABLE_CLASS(RainEffect, CL_RAIN_EFFECT,
Index: trunk/src/lib/graphics/effects/snow_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/snow_effect.cc	(revision 9391)
+++ trunk/src/lib/graphics/effects/snow_effect.cc	(revision 9406)
@@ -1,14 +1,14 @@
 /*
-	orxonox - the future of 3D-vertical-scrollers
-
-	Copyright (C) 2004 orx
-
-	This program is free software; you can redistribute it and/or modify
-	it under the terms of the GNU General Public License as published by
-	the Free Software Foundation; either version 2, or (at your option)
-	any later version.
+        orxonox - the future of 3D-vertical-scrollers
+
+        Copyright (C) 2004 orx
+
+        This program is free software; you can redistribute it and/or modify
+        it under the terms of the GNU General Public License as published by
+        the Free Software Foundation; either version 2, or (at your option)
+        any later version.
 
 ### File Specific:
-	main-programmer: hdavid, amaechler
+        main-programmer: hdavid, amaechler
 */
 
@@ -35,5 +35,4 @@
 SHELL_COMMAND(deactivate, SnowEffect, deactivateSnow);
 
-using namespace std;
 
 CREATE_SCRIPTABLE_CLASS(SnowEffect, CL_SNOW_EFFECT,
@@ -46,20 +45,19 @@
 SnowEffect::SnowEffect(const TiXmlElement* root)
 {
-	this->setClassID(CL_SNOW_EFFECT, "SnowEffect");
-
-	this->init();
-
-	if (root != NULL)
-		this->loadParams(root);
-
-	//load wind sound
-	if (this->snowWindForce >= 1) {
-		if (this->windBuffer != NULL)
-			ResourceManager::getInstance()->unload(this->windBuffer);
-	  this->windBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/wind.wav", WAV);
-	}
+        this->setClassID(CL_SNOW_EFFECT, "SnowEffect");
+
+        this->init();
+
+        if (root != NULL)
+                this->loadParams(root);
+
+        this->windBuffer = NULL;
+        //load wind sound
+        if (this->snowWindForce >= 1) {
+          this->windBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/wind.wav", WAV);
+        }
 
   if(snowActivate) {
-		this->activate();
+                this->activate();
     SnowEffect::snowParticles->precache((int) this->snowLife);
   }
@@ -69,5 +67,5 @@
 SnowEffect::~SnowEffect()
 {
-	this->deactivate();
+        this->deactivate();
 }
 
@@ -76,52 +74,52 @@
 void SnowEffect::loadParams(const TiXmlElement* root)
 {
-	WeatherEffect::loadParams(root);
-
-	LoadParam(root, "numParticles", this, SnowEffect, numParticles);
-	LoadParam(root, "materialTexture", this, SnowEffect, materialTexture);
-	LoadParam(root, "lifeSpans", this, SnowEffect, lifeSpan);
-	LoadParam(root, "radius", this, SnowEffect, radius);
-	LoadParam(root, "mass", this, SnowEffect, mass);
-	LoadParam(root, "emissionRate", this, SnowEffect, emissionRate);
-	LoadParam(root, "emissionVelocity", this, SnowEffect, emissionVelocity);
-	LoadParam(root, "wind", this, SnowEffect, wind);
-	LoadParam(root, "size", this, SnowEffect, size);
-	LoadParam(root, "coord", this, SnowEffect, coord);
+        WeatherEffect::loadParams(root);
+
+        LoadParam(root, "numParticles", this, SnowEffect, numParticles);
+        LoadParam(root, "materialTexture", this, SnowEffect, materialTexture);
+        LoadParam(root, "lifeSpans", this, SnowEffect, lifeSpan);
+        LoadParam(root, "radius", this, SnowEffect, radius);
+        LoadParam(root, "mass", this, SnowEffect, mass);
+        LoadParam(root, "emissionRate", this, SnowEffect, emissionRate);
+        LoadParam(root, "emissionVelocity", this, SnowEffect, emissionVelocity);
+        LoadParam(root, "wind", this, SnowEffect, wind);
+        LoadParam(root, "size", this, SnowEffect, size);
+        LoadParam(root, "coord", this, SnowEffect, coord);
   LoadParam(root, "cloudcolor", this, SnowEffect, setCloudColor);
   LoadParam(root, "skycolor", this, SnowEffect, setSkyColor);
   LoadParam(root, "fadetime", this, SnowEffect, setFadeTime);
 
-	LOAD_PARAM_START_CYCLE(root, element);
-	{
-		LoadParam_CYCLE(element, "option", this, SnowEffect, setSnowOption);
-	}
-	LOAD_PARAM_END_CYCLE(element);
+        LOAD_PARAM_START_CYCLE(root, element);
+        {
+                LoadParam_CYCLE(element, "option", this, SnowEffect, setSnowOption);
+        }
+        LOAD_PARAM_END_CYCLE(element);
 }
 
 void SnowEffect::init()
 {
-	this->emitter = new PlaneEmitter();
-
-	// Default values
-	this->snowActivate = false;
-	this->snowMove = false;
-	this->particles = 12000;
-	this->texture = "maps/snow_flake_01_32x32.png";
-	this->snowLife = 8;
-	this->randomLife = 2;
-	this->snowRadius = 3.5;
-	this->randomRadius = 1;
-	this->snowMass = 1.0;
-	this->randomMass = 0.3;
-	this->rate = 900;
-	this->velocity = -100;
-	this->randomVelocity = 5;
-	this->angle = 0.5;
-	this->randomAngle = 0.2;
-	this->alpha = 0.5;
-	this->snowSize = Vector2D(2500, 2500);
-	this->snowCoord = Vector(100,450,400);
-	this->snowWindForce = 1;
-  
+        this->emitter = new PlaneEmitter();
+
+        // Default values
+        this->snowActivate = false;
+        this->snowMove = false;
+        this->particles = 12000;
+        this->texture = "maps/snow_flake_01_32x32.png";
+        this->snowLife = 8;
+        this->randomLife = 2;
+        this->snowRadius = 3.5;
+        this->randomRadius = 1;
+        this->snowMass = 1.0;
+        this->randomMass = 0.3;
+        this->rate = 900;
+        this->velocity = -100;
+        this->randomVelocity = 5;
+        this->angle = 0.5;
+        this->randomAngle = 0.2;
+        this->alpha = 0.5;
+        this->snowSize = Vector2D(2500, 2500);
+        this->snowCoord = Vector(100,450,400);
+        this->snowWindForce = 1;
+
   this->fadeTime = 10;
   this->cloudColor = Vector(0.2f, 0.2f, 0.2f);
@@ -131,31 +129,31 @@
 void SnowEffect::activate()
 {
-	PRINTF(3)("Activating SnowEffect\n");
-
-	this->snowActivate = true;
-
-	SnowEffect::snowParticles = new SpriteParticles(particles);
-	SnowEffect::snowParticles->setName("SnowEffectTrailParticles");
-	SnowEffect::snowParticles->setMaterialTexture(texture);
-	SnowEffect::snowParticles->setLifeSpan(snowLife, randomLife);
-	SnowEffect::snowParticles->setRadius(0.0, snowRadius, randomRadius);
-	SnowEffect::snowParticles->setRadius(0.2, snowRadius, randomRadius*0.8);
-	SnowEffect::snowParticles->setRadius(1.0, snowRadius, randomRadius*0.5);
-	SnowEffect::snowParticles->setMass(0, snowMass, randomMass);
-	SnowEffect::snowParticles->setColor(0,1, 1, 1, alpha);
-	SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2);
-	SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0);
-
-	this->emitter->setSystem(SnowEffect::snowParticles);
-
-	this->emitter->setRelCoor(snowCoord);
-	this->emitter->setEmissionRate(rate);
-	this->emitter->setEmissionVelocity(velocity, randomVelocity);
-	this->emitter->setSpread(angle * this->snowWindForce , randomAngle * this->snowWindForce);
-	this->emitter->setSize(snowSize);
+        PRINTF(3)("Activating SnowEffect\n");
+
+        this->snowActivate = true;
+
+        SnowEffect::snowParticles = new SpriteParticles(particles);
+        SnowEffect::snowParticles->setName("SnowEffectTrailParticles");
+        SnowEffect::snowParticles->setMaterialTexture(texture);
+        SnowEffect::snowParticles->setLifeSpan(snowLife, randomLife);
+        SnowEffect::snowParticles->setRadius(0.0, snowRadius, randomRadius);
+        SnowEffect::snowParticles->setRadius(0.2, snowRadius, randomRadius*0.8);
+        SnowEffect::snowParticles->setRadius(1.0, snowRadius, randomRadius*0.5);
+        SnowEffect::snowParticles->setMass(0, snowMass, randomMass);
+        SnowEffect::snowParticles->setColor(0,1, 1, 1, alpha);
+        SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2);
+        SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0);
+
+        this->emitter->setSystem(SnowEffect::snowParticles);
+
+        this->emitter->setRelCoor(snowCoord);
+        this->emitter->setEmissionRate(rate);
+        this->emitter->setEmissionVelocity(velocity, randomVelocity);
+        this->emitter->setSpread(angle * this->snowWindForce , randomAngle * this->snowWindForce);
+        this->emitter->setSize(snowSize);
 
   if (this->snowWindForce != 0)
     this->soundSource.play(this->windBuffer, 0.1f * this->snowWindForce, true);
-  
+
   // Store cloud- and sky color before the snow
   this->oldCloudColor = CloudEffect::cloudColor;
@@ -171,12 +169,12 @@
 void SnowEffect::deactivate()
 {
-	PRINTF(3)("Deactivating SnowEffect\n");
-
-	this->snowActivate = false;
-	this->emitter->setSystem(NULL);
-
-	if (this->windBuffer != NULL)
-		ResourceManager::getInstance()->unload(this->windBuffer);
-  
+        PRINTF(3)("Deactivating SnowEffect\n");
+
+        this->snowActivate = false;
+        this->emitter->setSystem(NULL);
+
+        if (this->windBuffer != NULL)
+                ResourceManager::getInstance()->unload(this->windBuffer);
+
   // Restore the old cloud- and sky color
   CloudEffect::changeCloudColor(this->oldCloudColor, this->fadeTime);
@@ -186,50 +184,50 @@
 void SnowEffect::draw() const
 {
-	if (!this->snowActivate)
-		return;
+        if (!this->snowActivate)
+                return;
 }
 
 void SnowEffect::tick(float dt)
 {
-	if (!this->snowActivate)
-		return;
-
-	/*
-	float distance = (State::getCameraNode()->getAbsCoor() - Vector(snowCoord.x, State::getCameraNode()->getAbsCoor().y, snowCoord.z)).len();
-
-	if(activated)
-	{
-	if(distance > 0.3*snowSize.x || distance > 0.3*snowSize.y)
-			this->deactivate();
-	else if(distance > 0.25*snowSize.x || distance > 0.25*snowSize.y)
-	this->alpha = 0.15;
-	else if(distance > 0.2*snowSize.x || distance > 0.2*snowSize.y)
-	this->alpha = 0.25;
-	else if(distance > 0.1*snowSize.x || distance > 0.1*snowSize.y)
-	this->alpha = 0.4;
-
-	SnowEffect::snowParticles->setColor(0,1, 1, 1, alpha);
-	SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2);
-	SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0);
-	}
-	else
-	{
-	if(distance < 0.3*snowSize.x || distance < 0.3*snowSize.y )
-	this->activate();
-	if( distance < 0.25*snowSize.x || distance < 0.25*snowSize.y )
-	this->alpha = 0.25;
-	else if( distance < 0.2*snowSize.x || distance < 0.2*snowSize.y )
-	this->alpha = 0.4;
-	else if( distance < 0.1*snowSize.x || distance < 0.1*snowSize.y )
-	this->alpha = 0.5;
-
-	SnowEffect::snowParticles->setColor(0,1, 1, 1, alpha);
-	SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2);
-	SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0);
-	}*/
-
-	if (this->snowMove) {
-		this->snowCoord = State::getCameraNode()->getAbsCoor();
-		this->emitter->setRelCoor(this->snowCoord.x , this->snowCoord.y+300, this->snowCoord.z);
-	}
-}
+        if (!this->snowActivate)
+                return;
+
+        /*
+        float distance = (State::getCameraNode()->getAbsCoor() - Vector(snowCoord.x, State::getCameraNode()->getAbsCoor().y, snowCoord.z)).len();
+
+        if(activated)
+        {
+        if(distance > 0.3*snowSize.x || distance > 0.3*snowSize.y)
+                        this->deactivate();
+        else if(distance > 0.25*snowSize.x || distance > 0.25*snowSize.y)
+        this->alpha = 0.15;
+        else if(distance > 0.2*snowSize.x || distance > 0.2*snowSize.y)
+        this->alpha = 0.25;
+        else if(distance > 0.1*snowSize.x || distance > 0.1*snowSize.y)
+        this->alpha = 0.4;
+
+        SnowEffect::snowParticles->setColor(0,1, 1, 1, alpha);
+        SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2);
+        SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0);
+        }
+        else
+        {
+        if(distance < 0.3*snowSize.x || distance < 0.3*snowSize.y )
+        this->activate();
+        if( distance < 0.25*snowSize.x || distance < 0.25*snowSize.y )
+        this->alpha = 0.25;
+        else if( distance < 0.2*snowSize.x || distance < 0.2*snowSize.y )
+        this->alpha = 0.4;
+        else if( distance < 0.1*snowSize.x || distance < 0.1*snowSize.y )
+        this->alpha = 0.5;
+
+        SnowEffect::snowParticles->setColor(0,1, 1, 1, alpha);
+        SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2);
+        SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0);
+        }*/
+
+        if (this->snowMove) {
+                this->snowCoord = State::getCameraNode()->getAbsCoor();
+                this->emitter->setRelCoor(this->snowCoord.x , this->snowCoord.y+300, this->snowCoord.z);
+        }
+}
Index: trunk/src/lib/graphics/effects/snow_effect.h
===================================================================
--- trunk/src/lib/graphics/effects/snow_effect.h	(revision 9391)
+++ trunk/src/lib/graphics/effects/snow_effect.h	(revision 9406)
@@ -101,31 +101,31 @@
 
 private:
-    int         particles;
+    int               particles;
     std::string       texture;
-    float       snowLife, randomLife;
-    float       snowRadius, randomRadius;
-    float       snowMass, randomMass;
-    float         rate;
-    float         velocity, randomVelocity;
-    float         angle, randomAngle;
-    float         alpha;
-    float         fadeTime;
-    Vector        snowCoord;
-    Vector2D      snowSize;
-    int       snowWindForce;
+    float             snowLife, randomLife;
+    float             snowRadius, randomRadius;
+    float             snowMass, randomMass;
+    float             rate;
+    float             velocity, randomVelocity;
+    float             angle, randomAngle;
+    float             alpha;
+    float             fadeTime;
+    Vector            snowCoord;
+    Vector2D          snowSize;
+    int               snowWindForce;
 
-    bool        snowMove;
-    bool        snowActivate;
+    bool              snowMove;
+    bool              snowActivate;
 
     PlaneEmitter*     emitter;
 
     static SpriteParticles*   snowParticles;
-    OrxSound::SoundSource   soundSource;
+    OrxSound::SoundSource     soundSource;
     OrxSound::SoundBuffer*    windBuffer;
 
-    Vector oldSkyColor;
-    Vector oldCloudColor;
-    Vector skyColor;
-    Vector cloudColor;
+    Vector            oldSkyColor;
+    Vector            oldCloudColor;
+    Vector            skyColor;
+    Vector            cloudColor;
 };
 
Index: trunk/src/lib/graphics/effects/sun_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/sun_effect.cc	(revision 9391)
+++ trunk/src/lib/graphics/effects/sun_effect.cc	(revision 9406)
@@ -21,5 +21,5 @@
 
 
-using namespace std;
+
 
 
Index: trunk/src/lib/graphics/effects/volfog_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/volfog_effect.cc	(revision 9391)
+++ trunk/src/lib/graphics/effects/volfog_effect.cc	(revision 9406)
@@ -47,5 +47,5 @@
 
 
-using namespace std;
+
 
 CREATE_FACTORY(VolFogEffect, CL_VOLFOG_EFFECT);
Index: trunk/src/lib/graphics/effects/weather_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/weather_effect.cc	(revision 9391)
+++ trunk/src/lib/graphics/effects/weather_effect.cc	(revision 9406)
@@ -21,5 +21,5 @@
 
 
-using namespace std;
+
 
 
Index: trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- trunk/src/lib/graphics/graphics_engine.cc	(revision 9391)
+++ trunk/src/lib/graphics/graphics_engine.cc	(revision 9406)
@@ -50,8 +50,7 @@
  #include "static_model.h"
 #endif
-using namespace std;
 
 SHELL_COMMAND(wireframe, GraphicsEngine, wireframe);
-
+SHELL_COMMAND(fps, GraphicsEngine, toggleFPSdisplay);
 
 /**
@@ -67,4 +66,5 @@
   this->bDisplayFPS = false;
   this->bAntialiasing = false;
+  this->bDedicated = false;
   this->minFPS = 9999;
   this->maxFPS = 0;
@@ -164,4 +164,8 @@
   MultiType textures = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO_ADVANCED, CONFIG_NAME_TEXTURES, "1");
   Texture::setTextureEnableState(textures.getBool());
+
+  // check it is a dedicated network node: so no drawings are made
+  MultiType dedicated = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO, CONFIG_NAME_NO_RENDER, "0");
+  this->bDedicated = dedicated.getBool();
 
   // searching for a usefull resolution
@@ -604,12 +608,13 @@
 }
 
+/**
+ * this draws the graphics engines graphics effecs
+ */
 void GraphicsEngine::draw() const
 {
-  //  LightManager::getInstance()->draw();
-
-  if (this->graphicsEffects != NULL)
+  if( this->graphicsEffects != NULL)
   {
     //draw the graphics effects
-    list<BaseObject*>::const_iterator it;
+    std::list<BaseObject*>::const_iterator it;
     for (it = this->graphicsEffects->begin(); it != this->graphicsEffects->end(); it++)
       dynamic_cast<GraphicsEffect*>(*it)->draw();
@@ -618,4 +623,10 @@
   Render2D::getInstance()->draw(E2D_LAYER_BOTTOM, E2D_LAYER_ABOVE_ALL);
   Shader::restoreShader();
+}
+
+
+void GraphicsEngine::toggleFPSdisplay()
+{
+  this->displayFPS(!this->bDisplayFPS);
 }
 
Index: trunk/src/lib/graphics/graphics_engine.h
===================================================================
--- trunk/src/lib/graphics/graphics_engine.h	(revision 9391)
+++ trunk/src/lib/graphics/graphics_engine.h	(revision 9406)
@@ -46,4 +46,5 @@
     void toggleFullscreen();
     static void setBackgroundColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha = 1.0);
+    inline bool isDedicated() { return this->bDedicated; }
 
     inline void setAntialiasing(bool flag) { this->bAntialiasing = flag; }
@@ -74,4 +75,5 @@
     void drawBackgroundElements() const;
     void draw() const;
+    void toggleFPSdisplay();
     void displayFPS(bool display);
 
@@ -113,4 +115,5 @@
     bool                       particlesEnabled;   //!< If particles should be enabled.
     bool                       bAntialiasing;      //!< true if antialiasing enabled
+    bool                       bDedicated;         //!< true if this server is a dedicated server and should not render the scene
 
     int                        particlesValue;     //!< How many particles
Index: trunk/src/lib/graphics/importer/bsp_file.cc
===================================================================
--- trunk/src/lib/graphics/importer/bsp_file.cc	(revision 9391)
+++ trunk/src/lib/graphics/importer/bsp_file.cc	(revision 9406)
@@ -40,5 +40,5 @@
 #include <vector>
 
-using namespace std;
+
 
 
@@ -96,5 +96,5 @@
   if (stat( name , &results) == 0) {
     PRINTF(0)("BSP FILE: Datei %s gefunden. \n", name);
-    ifstream bspFile (name, ios::in | ios::binary);
+    std::ifstream bspFile (name, std::ios::in | std::ios::binary);
     bspFile.read(this->header, 260);
     PRINTF(0)("BSP FILE: BSPVersion: %i. \n", ((int *)(header) )[1]);
Index: trunk/src/lib/graphics/importer/grid.cc
===================================================================
--- trunk/src/lib/graphics/importer/grid.cc	(revision 9391)
+++ trunk/src/lib/graphics/importer/grid.cc	(revision 9406)
@@ -18,5 +18,5 @@
 #include "grid.h"
 
-using namespace std;
+
 
 
Index: trunk/src/lib/graphics/importer/interactive_model.cc
===================================================================
--- trunk/src/lib/graphics/importer/interactive_model.cc	(revision 9391)
+++ trunk/src/lib/graphics/importer/interactive_model.cc	(revision 9406)
@@ -20,5 +20,5 @@
 #include "glincl.h"
 
-using namespace std;
+
 
 /**
Index: trunk/src/lib/graphics/importer/material.cc
===================================================================
--- trunk/src/lib/graphics/importer/material.cc	(revision 9391)
+++ trunk/src/lib/graphics/importer/material.cc	(revision 9406)
@@ -88,5 +88,5 @@
 Material::~Material()
 {
-  PRINTF(5)("delete Material %s.\n", this->getName());
+  PRINTF(5)("delete Material %s.\n", this->getCName());
 
   if (this->ambientTexture != NULL)
@@ -217,5 +217,5 @@
 void Material::setIllum (int illum)
 {
-  PRINTF(4)("setting illumModel of Material %s to %i\n", this->getName(), illum);
+  PRINTF(4)("setting illumModel of Material %s to %i\n", this->getCName(), illum);
   this->illumModel = illum;
 }
@@ -229,5 +229,5 @@
 void Material::setDiffuse (float r, float g, float b)
 {
-  PRINTF(4)("setting Diffuse Color of Material %s to r=%f g=%f b=%f.\n", this->getName(), r, g, b);
+  PRINTF(4)("setting Diffuse Color of Material %s to r=%f g=%f b=%f.\n", this->getCName(), r, g, b);
   this->diffuse = Color(r, g, b, this->diffuse.a() );
 }
@@ -242,5 +242,5 @@
 void Material::setAmbient (float r, float g, float b)
 {
-  PRINTF(4)("setting Ambient Color of Material %s to r=%f g=%f b=%f.\n", this->getName(), r, g, b);
+  PRINTF(4)("setting Ambient Color of Material %s to r=%f g=%f b=%f.\n", this->getCName(), r, g, b);
   this->ambient = Color(r, g, b, 1.0);
 }
@@ -254,5 +254,5 @@
 void Material::setSpecular (float r, float g, float b)
 {
-  PRINTF(4)("setting Specular Color of Material %s to r=%f g=%f b=%f.\n", this->getName(), r, g, b);
+  PRINTF(4)("setting Specular Color of Material %s to r=%f g=%f b=%f.\n", this->getCName(), r, g, b);
   this->specular = Color (r, g, b, 1.0);
 }
@@ -273,5 +273,5 @@
 void Material::setTransparency (float trans)
 {
-  PRINTF(4)("setting Transparency of Material %s to %f.\n", this->getName(), trans);
+  PRINTF(4)("setting Transparency of Material %s to %f.\n", this->getCName(), trans);
   this->diffuse.a() = trans;
 }
@@ -455,5 +455,5 @@
 void Material::debug() const
 {
-  PRINT(0)("Debug Material: %s\n", this->getName());
+  PRINT(0)("Debug Material: %s\n", this->getCName());
   PRINT(0)("illumModel: %d ; ShiniNess %f\n", this->illumModel, shininess);
   PRINT(0)("diffuseColor: "); diffuse.debug();
Index: trunk/src/lib/graphics/importer/md2/md2Model.cc
===================================================================
--- trunk/src/lib/graphics/importer/md2/md2Model.cc	(revision 9391)
+++ trunk/src/lib/graphics/importer/md2/md2Model.cc	(revision 9406)
@@ -22,5 +22,5 @@
 
 
-using namespace std;
+
 
 //! the model anorms
Index: trunk/src/lib/graphics/importer/md3/md3_animation_cfg.cc
===================================================================
--- trunk/src/lib/graphics/importer/md3/md3_animation_cfg.cc	(revision 9391)
+++ trunk/src/lib/graphics/importer/md3/md3_animation_cfg.cc	(revision 9406)
@@ -19,14 +19,12 @@
 #include "md3_animation.h"
 
-#include "tokenizer.h"
+#include "substring.h"
 #include "helper_functions.h"
 
 #include "debug.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-
-
-using namespace std;
+
+
+
 
 namespace md3
@@ -100,6 +98,5 @@
         if( inHeader && line.find("sex") == 0) {
           //parse line: sex [m | f | ...]
-          std::vector<std::string> tokens;
-          Tokenizer::tokenize(line, tokens, " \t\n\r\f/");
+          SubString tokens(line, " \t\n\r\f/");
 
           std::string sexStr = tokens.back();
@@ -117,6 +114,5 @@
         else if( inHeader && line.find("headoffset") == 0) {
           // parse line: headoffset X Y Z
-          std::vector<std::string> tokens;
-          Tokenizer::tokenize(line, tokens, " \t\n\r\f/");
+          SubString tokens(line, " \t\n\r\f/");
 
           float z = atof(tokens.back().c_str()); tokens.pop_back();
@@ -130,6 +126,5 @@
         else if( inHeader && line.find("footsteps") == 0) {
           //parse line: footsteps [normal | mech | ...]
-          std::vector<std::string> tokens;
-          Tokenizer::tokenize(line, tokens, " \t\n\r\f/");
+          SubString tokens (line, " \t\n\r\f/");
 
           this->footsteps = tokens.back();
@@ -190,6 +185,5 @@
     // parse the line:
     // first frame, num frames, looping frames, frames per second (fps)
-    std::vector<std::string> tokens;
-    Tokenizer::tokenize(line, tokens, " \t\n\r\f/");
+    SubString tokens(line, " \t\n\r\f/");
 
     anim->fps = atoi(tokens.back().c_str()); tokens.pop_back();
Index: trunk/src/lib/graphics/importer/model.cc
===================================================================
--- trunk/src/lib/graphics/importer/model.cc	(revision 9391)
+++ trunk/src/lib/graphics/importer/model.cc	(revision 9406)
@@ -20,5 +20,5 @@
 #include "glincl.h"
 
-using namespace std;
+
 
 /**
Index: trunk/src/lib/graphics/importer/primitive_model.cc
===================================================================
--- trunk/src/lib/graphics/importer/primitive_model.cc	(revision 9391)
+++ trunk/src/lib/graphics/importer/primitive_model.cc	(revision 9406)
@@ -21,5 +21,5 @@
 #include "debug.h"
 
-using namespace std;
+
 
 /**
Index: trunk/src/lib/graphics/importer/static_model.cc
===================================================================
--- trunk/src/lib/graphics/importer/static_model.cc	(revision 9391)
+++ trunk/src/lib/graphics/importer/static_model.cc	(revision 9406)
@@ -23,5 +23,5 @@
 #include <stdarg.h>
 
-using namespace std;
+
 
 
@@ -161,7 +161,7 @@
 {
   PRINTF(4)("Deleting Model ");
-  if (this->getName())
-  {
-    PRINT(4)("%s\n", this->getName());
+  if (!this->getName().empty())
+  {
+    PRINT(4)("%s\n", this->getCName());
   }
   else
@@ -178,5 +178,5 @@
 
   //! @todo do we really have to delete this material??
-  list<ModelMaterial*>::iterator modMat;
+  std::list<ModelMaterial*>::iterator modMat;
   for(modMat = this->materialList.begin(); modMat != this->materialList.end(); modMat++)
   {
@@ -214,5 +214,5 @@
 void StaticModel::rebuild()
 {
-  PRINTF(3)("Rebuilding Model '%s'\n", this->getName());
+  PRINTF(3)("Rebuilding Model '%s'\n", this->getCName());
   this->finalize();
 }
@@ -266,5 +266,5 @@
     tmpGroup = tmpGroup->next;
   }
-  PRINTF(2)("Model number %i in %s not Found.\n", groupNumber, this->getName());
+  PRINTF(2)("Model number %i in %s not Found.\n", groupNumber, this->getCName());
   return;
 }
@@ -291,5 +291,5 @@
     tmpGroup = tmpGroup->next;
   }
-  PRINTF(2)("Model Named %s in %s not Found.\n", groupName.c_str(), this->getName());
+  PRINTF(2)("Model Named %s in %s not Found.\n", groupName.c_str(), this->getCName());
   return;
 }
@@ -358,5 +358,5 @@
 Material* StaticModel::findMaterialByName(const std::string& materialName)
 {
-  list<ModelMaterial*>::iterator modMat;
+  std::list<ModelMaterial*>::iterator modMat;
   for  (modMat = this->materialList.begin(); modMat != this->materialList.end(); modMat++)
     if (materialName == (*modMat)->material->getName())
@@ -748,5 +748,5 @@
         {
           tmpFace->material->select();
-          PRINTF(5)("using material %s for coming Faces.\n", tmpFace->material->getName());
+          PRINTF(5)("using material %s for coming Faces.\n", tmpFace->material->getCName());
         }
       }
@@ -840,5 +840,5 @@
       else if( tmpFace->vertexCount > 4) {
         if (!warned)        {
-          PRINTF(2)("This model (%s) got over 4 vertices per face <=> conflicts in the CD engine!\n", this->getName());
+          PRINTF(2)("This model (%s) got over 4 vertices per face <=> conflicts in the CD engine!\n", this->getCName());
           warned = true;
         }
Index: trunk/src/lib/graphics/importer/texture.cc
===================================================================
--- trunk/src/lib/graphics/importer/texture.cc	(revision 9391)
+++ trunk/src/lib/graphics/importer/texture.cc	(revision 9406)
@@ -230,5 +230,5 @@
   if (this->data->getStoredImage() != NULL)
   {
-    PRINTF(3)("Reloading Texture of %s '%s'\n", this->getClassName(), this->getName());
+    PRINTF(3)("Reloading Texture of %s '%s'\n", this->getClassCName(), this->getCName());
     this->setTexture(Texture::loadTexToGL(this->data->getStoredImage()));
   }
Index: trunk/src/lib/graphics/importer/texture_sequence.cc
===================================================================
--- trunk/src/lib/graphics/importer/texture_sequence.cc	(revision 9391)
+++ trunk/src/lib/graphics/importer/texture_sequence.cc	(revision 9406)
@@ -225,5 +225,5 @@
 bool TextureSequence::rebuild()
 {
-  PRINTF(3)("Reloading TextureSequence of %s '%s'\n", this->getClassName(), this->getName());
+  PRINTF(3)("Reloading TextureSequence of %s '%s'\n", this->getClassCName(), this->getCName());
 
   for (unsigned int i = 0; i < this->textures.size(); i++)
Index: trunk/src/lib/graphics/importer/vertex_array_model.cc
===================================================================
--- trunk/src/lib/graphics/importer/vertex_array_model.cc	(revision 9391)
+++ trunk/src/lib/graphics/importer/vertex_array_model.cc	(revision 9406)
@@ -23,5 +23,5 @@
 #include "tc.h"
 
-using namespace std;
+
 
 /////////////
@@ -116,5 +116,5 @@
 VertexArrayModel::~VertexArrayModel()
 {
-  PRINTF(4)("Deleting VertexArrayModel %s\n", this->getName());
+  PRINTF(4)("Deleting VertexArrayModel %s\n", this->getCName());
 }
 
@@ -127,5 +127,5 @@
 void VertexArrayModel::draw() const
 {
-  PRINTF(4)("drawing 3D-VertexArrayModel %s\n", this->getName());
+  PRINTF(4)("drawing 3D-VertexArrayModel %s\n", this->getCName());
   glEnableClientState(GL_VERTEX_ARRAY );
   glEnableClientState(GL_TEXTURE_COORD_ARRAY );
@@ -343,5 +343,5 @@
 void VertexArrayModel::debug() const
 {
-  PRINT(0)("VertexArrayModel (%s): debug\n", this->getName());
+  PRINT(0)("VertexArrayModel (%s): debug\n", this->getCName());
   PRINT(0)("Stripes: %d; Indices: %d; Vertices: %d; Normals %d; TextCoords %d; Colors %d\n",
             this->stripes.size(),
Index: trunk/src/lib/graphics/render2D/element_2d.cc
===================================================================
--- trunk/src/lib/graphics/render2D/element_2d.cc	(revision 9391)
+++ trunk/src/lib/graphics/render2D/element_2d.cc	(revision 9406)
@@ -104,5 +104,5 @@
       deleteNode = tmp;
       tmp++;
-      //      printf("TEST::%s(%s) %s\n", (*deleteNode)->getName(), (*deleteNode)->getClassName(), this->getName());
+      //      printf("TEST::%s(%s) %s\n", (*deleteNode)->getName(), (*deleteNode)->getClassCName(), this->getName());
       if ((this->parentMode & E2D_PROHIBIT_CHILD_DELETE) ||
           ((*deleteNode)->parentMode & E2D_PROHIBIT_DELETE_WITH_PARENT))
@@ -214,7 +214,7 @@
   {
     PRINTF(2)("Unable to set %s to layer %s, because it's parent(%s) is of higher layer %s\n",
-              this->getName(),
+              this->getCName(),
               Element2D::layer2DToChar(layer),
-              this->parent->getName(),
+              this->parent->getCName(),
               Element2D::layer2DToChar(this->parent->getLayer()));
     layer = this->parent->getLayer();
@@ -602,6 +602,6 @@
       {
         PRINTF(2)("Layer '%s' of Child(%s::%s) lower than parents(%s::%s) layer '%s'. updating...\n",
-                  Element2D::layer2DToChar(child->getLayer()),child->getClassName(), child->getName(),
-                  this->getClassName(), this->getName(), Element2D::layer2DToChar(this->layer));
+                  Element2D::layer2DToChar(child->getLayer()),child->getClassCName(), child->getCName(),
+                  this->getClassCName(), this->getCName(), Element2D::layer2DToChar(this->layer));
         child->layer = this->layer;
         this->children.push_front(child);
@@ -627,5 +627,5 @@
     {
       PRINTF(1)("Tried to reparent2D to own child '%s::%s' to '%s::%s'.\n",
-                this->getClassName(), this->getName(), child->getClassName(), child->getName());
+                this->getClassCName(), this->getCName(), child->getClassCName(), child->getCName());
       child->parent = NULL;
     }
@@ -701,5 +701,5 @@
     {
       (*reparenter)->reparent2D();
-      PRINTF(5)("REPARENTED TO: %s::%s\n",(*reparenter)->getParent2D()->getClassName(),(*reparenter)->getParent2D()->getName());
+      PRINTF(5)("REPARENTED TO: %s::%s\n",(*reparenter)->getParent2D()->getClassCName(),(*reparenter)->getParent2D()->getCName());
     }
   }
@@ -723,5 +723,5 @@
   else
     PRINTF(2)("Not Found Element2D's (%s::%s) new Parent by Name: %s\n",
-              this->getClassName(), this->getName(), parentName.c_str());
+              this->getClassCName(), this->getCName(), parentName.c_str());
 }
 
@@ -865,5 +865,5 @@
         Vector2D tmp = *this->toCoordinate;
         this->setRelCoor2D(tmp);
-        PRINTF(5)("SmoothMove of %s finished\n", this->getName());
+        PRINTF(5)("SmoothMove of %s finished\n", this->getCName());
       }
     }
@@ -879,5 +879,5 @@
         float tmp = *this->toDirection;
         this->setRelDir2D(tmp);
-        PRINTF(5)("SmoothRotate of %s finished\n", this->getName());
+        PRINTF(5)("SmoothRotate of %s finished\n", this->getCName());
       }
     }
@@ -893,5 +893,5 @@
         delete this->toSize;
         this->toSize = NULL;
-        PRINTF(5)("SmoothRotate of %s finished\n", this->getName());
+        PRINTF(5)("SmoothRotate of %s finished\n", this->getCName());
       }
     }
@@ -900,5 +900,5 @@
     this->lastAbsCoordinate = this->absCoordinate;
 
-    PRINTF(5)("Element2D::update - %s - (%f, %f)\n", this->getName(), this->absCoordinate.x, this->absCoordinate.y);
+    PRINTF(5)("Element2D::update - %s - (%f, %f)\n", this->getCName(), this->absCoordinate.x, this->absCoordinate.y);
 
 
@@ -937,5 +937,5 @@
                  projectPos+1,
                  projectPos+2);
-      //       printf("%s::%s  == %f %f %f :: %f %f\n", this->getClassName(), this->getName(),
+      //       printf("%s::%s  == %f %f %f :: %f %f\n", this->getClassCName(), this->getName(),
       //              this->bindNode->getAbsCoor().x,
       //              this->bindNode->getAbsCoor().y,
@@ -1026,6 +1026,6 @@
     PRINT(0)(" -");
   PRINT(0)("E2D(%s::%s);AC:(%0.2f, %0.2f);RC:(%0.2f, %0.2f);AD(%0.2f)->%s;Layer:(%s)\n",
-           this->getClassName(),
-           this->getName(),
+           this->getClassCName(),
+           this->getCName(),
            this->absCoordinate.x,
            this->absCoordinate.y,
Index: trunk/src/lib/graphics/render2D/image_plane.cc
===================================================================
--- trunk/src/lib/graphics/render2D/image_plane.cc	(revision 9391)
+++ trunk/src/lib/graphics/render2D/image_plane.cc	(revision 9406)
@@ -25,5 +25,5 @@
 
 
-using namespace std;
+
 
 
Index: trunk/src/lib/graphics/render2D/render_2d.cc
===================================================================
--- trunk/src/lib/graphics/render2D/render_2d.cc	(revision 9391)
+++ trunk/src/lib/graphics/render2D/render_2d.cc	(revision 9406)
@@ -22,5 +22,5 @@
 #include "element_2d.h"
 
-using namespace std;
+
 
 /**
Index: trunk/src/lib/graphics/shader.cc
===================================================================
--- trunk/src/lib/graphics/shader.cc	(revision 9391)
+++ trunk/src/lib/graphics/shader.cc	(revision 9406)
@@ -32,5 +32,5 @@
 #endif
 
-using namespace std;
+
 
 
Index: trunk/src/lib/graphics/spatial_separation/quadtree.cc
===================================================================
--- trunk/src/lib/graphics/spatial_separation/quadtree.cc	(revision 9391)
+++ trunk/src/lib/graphics/spatial_separation/quadtree.cc	(revision 9406)
@@ -24,5 +24,5 @@
 #include "debug.h"
 
-using namespace std;
+
 #define QUADTREE_MATERIAL_COUNT       4
 
Index: trunk/src/lib/graphics/spatial_separation/quadtree_node.cc
===================================================================
--- trunk/src/lib/graphics/spatial_separation/quadtree_node.cc	(revision 9391)
+++ trunk/src/lib/graphics/spatial_separation/quadtree_node.cc	(revision 9406)
@@ -26,5 +26,5 @@
 #include "util/list.h"
 
-using namespace std;
+
 
 
Index: trunk/src/lib/graphics/spatial_separation/spatial_separation.cc
===================================================================
--- trunk/src/lib/graphics/spatial_separation/spatial_separation.cc	(revision 9391)
+++ trunk/src/lib/graphics/spatial_separation/spatial_separation.cc	(revision 9406)
@@ -23,5 +23,5 @@
 #include "compiler.h"
 
-using namespace std;
+
 
 
Index: trunk/src/lib/graphics/text_engine/limited_width_text.cc
===================================================================
--- trunk/src/lib/graphics/text_engine/limited_width_text.cc	(revision 9391)
+++ trunk/src/lib/graphics/text_engine/limited_width_text.cc	(revision 9406)
@@ -160,4 +160,4 @@
 void LimitedWidthText::debug() const
 {
-  printf("Debug %s::%s \n", this->getClassName(), this->getName() );
+  printf("Debug %s::%s \n", this->getClassCName(), this->getCName() );
 }
Index: trunk/src/lib/graphics/text_engine/multi_line_text.cc
===================================================================
--- trunk/src/lib/graphics/text_engine/multi_line_text.cc	(revision 9391)
+++ trunk/src/lib/graphics/text_engine/multi_line_text.cc	(revision 9406)
@@ -152,5 +152,5 @@
 void MultiLineText::debug() const
 {
- printf("Debug %s::%s: %d lines\n", this->getClassName(), this->getName(), this->getLineCount());
+ printf("Debug %s::%s: %d lines\n", this->getClassCName(), this->getCName(), this->getLineCount());
 
  std::string tmpText = this->text();
Index: trunk/src/lib/graphics/text_engine/text.cc
===================================================================
--- trunk/src/lib/graphics/text_engine/text.cc	(revision 9391)
+++ trunk/src/lib/graphics/text_engine/text.cc	(revision 9406)
@@ -28,9 +28,10 @@
  */
 Text::Text(const std::string& fontFile, unsigned int textSize)
-    : _font(fontFile, FONT_DEFAULT_RENDER_SIZE)
+    // : _font(fontFile, FONT_DEFAULT_RENDER_SIZE)
 {
   this->setClassID(CL_TEXT, "Text");
 
   // initialize this Text
+  this->setFont(fontFile, FONT_DEFAULT_RENDER_SIZE);
   this->_size = textSize;
   this->setSizeY2D(textSize);
@@ -278,5 +279,5 @@
 void Text::debug() const
 {
-  PRINT(0)("=== TEXT: %s (with Font:'%s')  displaying %s ===\n", this->getName(), this->_font.getName(), this->_text.c_str());
+  PRINT(0)("=== TEXT: %s (with Font:'%s')  displaying %s ===\n", this->getCName(), this->_font.getCName(), this->_text.c_str());
   //  PRINT(0)("Color: r=%0.2f g=%0.2f b=%0.2f a=%0.2f\n", this->_color.r(), this->_color.g(), this->_color.b(), this->_color.a());
 }
Index: trunk/src/lib/graphics/text_engine/text_engine.cc
===================================================================
--- trunk/src/lib/graphics/text_engine/text_engine.cc	(revision 9391)
+++ trunk/src/lib/graphics/text_engine/text_engine.cc	(revision 9406)
@@ -26,5 +26,5 @@
 #include "font.h"
 
-using namespace std;
+
 
 #include <stdlib.h>
@@ -122,5 +122,5 @@
 void TextEngine::debug() const
 {
-  const list<BaseObject*>* textList = ClassList::getList(CL_TEXT);
+  const std::list<BaseObject*>* textList = ClassList::getList(CL_TEXT);
   if (textList != NULL)
   {
@@ -130,5 +130,5 @@
     PRINT(0)("Reference: %p; Text Counts: %d\n", this, textList->size());
 
-    list<BaseObject*>::const_iterator text;
+    std::list<BaseObject*>::const_iterator text;
     for ( text = textList->begin(); text != textList->end(); text++)
       dynamic_cast<Text*>(*text)->debug();
