Index: code/branches/FICN/src/loader/LevelLoader.cc
===================================================================
--- code/branches/FICN/src/loader/LevelLoader.cc	(revision 505)
+++ code/branches/FICN/src/loader/LevelLoader.cc	(revision 507)
@@ -1,4 +1,7 @@
-#include <string.h>
+#include <string>
+#include <vector>
 #include <iostream>
+#include <algorithm>
+#include <iterator>
 
 #include "LevelLoader.h"
@@ -127,134 +130,26 @@
 	}
 	
-	
-	//orxonox::BaseObject* bla = orxonox::ID("classname")->fabricate();
-	//bla->loadParams();
+	LevelLoader::~LevelLoader()
+	{
+
+	}
 	
 	
-	/*
-  	rootNode = XMLNode::openFileHelper(dir.c_str(),"orxonoxworld");
-  	// TODO: Error handling
-
-	// Assing general level infos to class variables
+	string LevelLoader::name()
+	{
+		return this->name_;
+	}
 	
-  	this->name_ = rootNode.getAttribute("name");
-  	this->image_ = rootNode.getAttribute("image");
-  	this->description_ = rootNode.getChildNode("description").getText();
-  
-  	loadingScreenNode = rootNode.getChildNode("loading");
-  	if (!loadingScreenNode.isEmpty())
-  	{
-  		this->showLoadingScreen();
-  	}
-
-  	worldNode = rootNode.getChildNode("world");
-  	if (!worldNode.isEmpty())
-  	{
-  		
-  	}
-  	*/
-
-  
-  /*
-  // Assign sub-nodes
-  if (rootNode.nChildNode("LightManager")==1)
-  {
-  	// Init Luightmanager...
-  }*/
-  
-  /*
-  
-	worldNode = rootNode.getChildNode("WorldEntities");
-	scriptNode = rootNode.getChildNode("ScriptManager");
-	cameraNode = rootNode.getChildNode("CameraMan");
-	lightNode = rootNode.getChildNode("LightManager");
-*/
-
-
-
-LevelLoader::~LevelLoader()
-{
+	string LevelLoader::description()
+	{
+		return this->description_;
+	}
+	
+	string LevelLoader::image()
+	{
+		return this->image_;
+	}
 
 
 }
 
-
-string LevelLoader::name()
-{
-	return this->name_;
-}
-
-string LevelLoader::description()
-{
-	return this->description_;
-}
-
-string LevelLoader::image()
-{
-	return this->image_;
-}
-
-
-/*
-
-
-void LevelLoader::loadWorld(WorldManager* wm)
-{
-	if (!worldNode.getChildNode("lights").isEmpty())
-	{
-		
-		
-	}
-}
-
-
-void LevelLoader::loadLights(LightManager* lm)
-{
-	if (!lightNode.getChildNode("lights").isEmpty())
-	{
-		int nLights = lightNode.getChildNode("lights").nChildNode("light");
-		for (int i=0; i<nLights;i++)
-		{
-			XMLNode t = lightNode.getChildNode("lights").getChildNode("light",i);
-			const char* diffuse = t.getAttribute("diffuse-color");
-			const char* coor = t.getAttribute("abs-coor");
-			lm->addLight(diffuse,coor);	
-		}
-	}
-	lm->setAmbient(lightNode.getChildNode("ambient").getAttribute("color"));	
-}
-
-void LevelLoader::loadCameras(CameraManager* cm)
-{
-	if (!cameraNode.getChildNode("cameras").isEmpty())
-	{
-		int nCameras = cameraNode.getChildNode("cameras").nChildNode("camera");
-		for (int i=0; i<nCameras;i++)
-		{
-			XMLNode t = cameraNode.getChildNode("cameras").getChildNode("camera",i);
-			
-			
-			cm->addCamera();
-		}
-	}
-}
-
-
-void LevelLoader::loadScripts(ScriptManager* sm)
-{
-	if (!scriptNode.getChildNode("scripts").isEmpty())
-	{
-		int nScripts = scriptNode.getChildNode("scripts").nChildNode("script");
-		for (int i=0; i<nScripts;i++)
-		{
-			XMLNode t = scriptNode.getChildNode("scripts").getChildNode("script",i);
-			sm->addScript(t.getAttribute("file"));
-		}
-	
-	}
-}
-*/
-
-
-}
-
Index: code/branches/FICN/src/loader/LevelLoader.h
===================================================================
--- code/branches/FICN/src/loader/LevelLoader.h	(revision 505)
+++ code/branches/FICN/src/loader/LevelLoader.h	(revision 507)
@@ -7,4 +7,5 @@
 
 #include <string>
+#include <vector>
 #include <iostream>
 
@@ -23,4 +24,18 @@
 	class _LoaderExport LevelLoader
 	{
+	public:
+		// Constructors, loads the level file and some information data
+		LevelLoader(string file, string dir="levels");
+		// Destructor
+		~LevelLoader();
+		// Shows a simple loading screen
+		void showLoadingScreen();
+		// Loads all level data
+		void loadLevel();
+	
+		// Getters
+		string name();
+		string description();
+		string image();		
 	private:
 		// Level information
@@ -36,24 +51,11 @@
 		std::string loadingBarHeight_;
 		
+		// Set to true if it was possible to load the level file
 		bool valid_;
 			
+		// Xml-Stuff
 		TiXmlDocument doc;
 		TiXmlElement* rootElement;	
-	public:
 
-		// Constructors
-		LevelLoader(string file, string dir="levels");
-		~LevelLoader();
-		
-		void showLoadingScreen();
-		void loadLevel();
-		
-		// Getters
-		string name();
-		string description();
-		string image();		
-		
-		// Managers 
-		
 			
 	};	
Index: code/branches/FICN/src/loader/Light.cc
===================================================================
--- code/branches/FICN/src/loader/Light.cc	(revision 505)
+++ 	(revision )
@@ -1,27 +1,0 @@
-
-#include "xml/xmlParser.h"
-#include "Light.h"
-
-namespace light
-{								
-	Light::Light()
-	{		
-		
-	}
-
-  Light::~Light()
-  {
-  }
-	
-	Light::Light(XMLNode xml)
-	{
-		this->loadParams(xml);	
-	}
-	
-	void Light::loadParams(XMLNode xml)
-	{
-		// Here comes the tricky part... convert strings to int
-		const char* diffuse = xml.getAttribute("diffuse-color");
-		const char* coor = xml.getAttribute("abs-coor");
-	}
-}
Index: code/branches/FICN/src/loader/Light.h
===================================================================
--- code/branches/FICN/src/loader/Light.h	(revision 505)
+++ 	(revision )
@@ -1,29 +1,0 @@
-
-#include "loader_platform.h"
-#include "xml/xmlParser.h"
-
-#ifndef __MODULE_LIGHT__
-#define __MODULE_LIGHT__
-
-namespace light
-{
-	class _LoaderExport Light
-	{
-	public:      
-		Light();
-		Light(XMLNode xml);
-		~Light();
-		void loadParams(XMLNode xml);
-	
-	private:
-		float diffuseColor_r_;
-		float diffuseColor_g_;
-		float diffuseColor_b_;
-
-		int coord_x_;
-		int coord_y_;
-		int coord_z_;
-	};
-}
-
-#endif
Index: code/branches/FICN/src/loader/LightManager.cc
===================================================================
--- code/branches/FICN/src/loader/LightManager.cc	(revision 505)
+++ 	(revision )
@@ -1,28 +1,0 @@
-
-#include "xml/xmlParser.h"
-#include "LightManager.h"
-
-namespace light
-{
-	LightManager::LightManager()
-	{
-    std::vector<Light> elements_ = *(new std::vector<Light>);
-	}
-	
-	void LightManager::loadParams(XMLNode xml)
-	{
-		if (!xml.isEmpty())
-		{
-			int nLights = xml.nChildNode("light");
-			for (int i=0; i<nLights;i++)
-			{
-				Light l = *(new Light(xml.getChildNode("light",i)));
-        this->elements_.insert(elements_.end(),l);
-			}
-		}		
-		
-	}	
-		
-	
-}
-
Index: code/branches/FICN/src/loader/LightManager.h
===================================================================
--- code/branches/FICN/src/loader/LightManager.h	(revision 505)
+++ 	(revision )
@@ -1,27 +1,0 @@
-#include <vector>
-
-#include "loader_platform.h"
-#include "xml/xmlParser.h"
-#include "Light.h"
-
-#ifndef __MODULE_LIGHTMANAGER__
-#define __MODULE_LIGHTMANAGER__
-
-namespace light
-{
-	class _LoaderExport LightManager
-	{      
-	public:
-		LightManager();
-		~LightManager();
-		void loadParams(XMLNode xml);		
-				
-	private:
-		float ambient_r_;
-		float ambient_g_;
-		float ambient_b_;
-    std::vector<Light> elements_;
-	};
-}
-
-#endif
Index: code/branches/FICN/src/misc/String2Number.h
===================================================================
--- code/branches/FICN/src/misc/String2Number.h	(revision 507)
+++ code/branches/FICN/src/misc/String2Number.h	(revision 507)
@@ -0,0 +1,47 @@
+#ifndef __STRING2NUMBER_H__
+#define __STRING2NUMBER_H__
+
+#include <string>
+#include <sstream>
+#include <iostream>
+
+/**
+* String to number conversion
+*
+* This class converts a number inside a std::string
+* into a numeric type number (int,float,double)
+* Number in string can be decimal, hexadecimal or octal
+*
+* @autor Nicolas Perrenoud<nicolape@ee.ethz.ch>
+*
+* @example
+* float f; 
+* String2Number<float>(f, std::string(" 123.45 "));
+*/
+template <class T>
+class String2Number
+{
+private:
+	bool success_;
+public:
+	/**
+	* Constructor
+	*
+	* First value is the target variable, the second vector is the
+	* string where the number is taken from, the third parameter 
+	* should be one of std::hex, std::dec or std::oct (dec is default value)
+	*/
+	inline String2Number(T& t, const std::string& s, std::ios_base& (*f)(std::ios_base&) =  std::dec, int haltOnError=1)
+	{
+	  std::istringstream iss(s);
+	  success_ = !(iss >> f >> t).fail();
+	  
+	  if (!success_ && haltOnError==1)
+	  {
+	  	std::cout << "Conversion error from string to number in \"" << s << "\"" << std::endl;
+	  	exit(1);
+	  }
+	}
+};
+
+#endif
Index: code/branches/FICN/src/misc/Tokenizer.h
===================================================================
--- code/branches/FICN/src/misc/Tokenizer.h	(revision 507)
+++ code/branches/FICN/src/misc/Tokenizer.h	(revision 507)
@@ -0,0 +1,39 @@
+#ifndef __TOKEINZER_H__
+#define __TOKEINZER_H__
+
+#include <string>
+#include <iostream>
+
+/**
+* String tokenizer
+*
+* Splits a given string into several smaller strings
+* using a delmiter (default is the comma).
+* Returns the result as a vector<string> object
+*
+* @autor Nicolas Perrenoud<nicolape@ee.ethz.ch>
+*/
+
+inline std::vector<std::string> tokenize(const std::string& str, const std::string& delimiters = ",")
+{
+	vector<std::string> tokens;
+	
+  // Skip delimiters at beginning.
+  std::string::size_type lastPos = str.find_first_not_of(delimiters, 0);
+  // Find first "non-delimiter".
+  std::string::size_type pos     = str.find_first_of(delimiters, lastPos);
+
+  while (std::string::npos != pos || std::string::npos != lastPos)
+  {
+      // Found a token, add it to the vector.
+      tokens.push_back(str.substr(lastPos, pos - lastPos));
+      // Skip delimiters.  Note the "not_of"
+      lastPos = str.find_first_not_of(delimiters, pos);
+      // Find next "non-delimiter"
+      pos = str.find_first_of(delimiters, lastPos);
+  }	
+  return tokens;    
+}
+
+
+#endif
Index: code/branches/FICN/src/orxonox/objects/Ambient.cc
===================================================================
--- code/branches/FICN/src/orxonox/objects/Ambient.cc	(revision 507)
+++ code/branches/FICN/src/orxonox/objects/Ambient.cc	(revision 507)
@@ -0,0 +1,42 @@
+#include <OgreSceneManager.h>
+#include <string>
+
+#include "../orxonox.h"
+#include "../../tinyxml/tinyxml.h"
+#include "../../misc/Tokenizer.h"
+#include "../../misc/String2Number.h"
+
+#include "Ambient.h"
+
+namespace orxonox
+{
+    CreateFactory(Ambient);
+
+    Ambient::Ambient()
+    {
+        RegisterObject(Ambient);
+    }
+
+    Ambient::~Ambient()
+    {
+    }
+
+    void Ambient::loadParams(TiXmlElement* xmlElem)
+    {
+    	Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
+    	
+    	if (xmlElem->Attribute("colourvalue"))
+    	{
+	    	
+	    	std::vector<std::string> colourvalues = tokenize(xmlElem->Attribute("colourvalue"),",");
+	    	float r, g, b;
+    	 	String2Number<float>(r, colourvalues[0]);
+	    	String2Number<float>(g, colourvalues[1]);
+	    	String2Number<float>(b, colourvalues[2]);
+	    	 
+	    	mgr->setAmbientLight(ColourValue(r,g,b));
+	    	
+	    	std::cout << "Loader: Set ambient light: "<<r<<" " << g << " " << b  << std::endl << std::endl;
+    	}   	
+   }
+}
Index: code/branches/FICN/src/orxonox/objects/Ambient.h
===================================================================
--- code/branches/FICN/src/orxonox/objects/Ambient.h	(revision 507)
+++ code/branches/FICN/src/orxonox/objects/Ambient.h	(revision 507)
@@ -0,0 +1,24 @@
+#ifndef _OBJECT_AMBIENT_H__
+#define _OBJECT_AMBIENT_H__
+
+#include "BaseObject.h"
+#include "../../tinyxml/tinyxml.h"
+
+namespace orxonox
+{
+    class Ambient : public BaseObject
+    {
+        public:
+            Ambient();
+            virtual ~Ambient();
+
+            
+            void loadParams(TiXmlElement* xmlElem);
+
+        private:
+            
+
+    };
+}
+
+#endif
Index: code/branches/FICN/src/orxonox/objects/CMakeLists.txt
===================================================================
--- code/branches/FICN/src/orxonox/objects/CMakeLists.txt	(revision 505)
+++ code/branches/FICN/src/orxonox/objects/CMakeLists.txt	(revision 507)
@@ -7,4 +7,6 @@
   test2.cc
   test3.cc
+  Ambient.cc
+  Skybox.cc
 )
 
Index: code/branches/FICN/src/orxonox/objects/Skybox.cc
===================================================================
--- code/branches/FICN/src/orxonox/objects/Skybox.cc	(revision 507)
+++ code/branches/FICN/src/orxonox/objects/Skybox.cc	(revision 507)
@@ -0,0 +1,36 @@
+#include <OgreSceneManager.h>
+#include <string>
+
+#include "../orxonox.h"
+#include "../../tinyxml/tinyxml.h"
+#include "../../misc/Tokenizer.h"
+#include "../../misc/String2Number.h"
+
+#include "Skybox.h"
+
+namespace orxonox
+{
+    CreateFactory(Skybox);
+
+    Skybox::Skybox()
+    {
+        RegisterObject(Skybox);
+    }
+
+    Skybox::~Skybox()
+    {
+    }
+
+    void Skybox::loadParams(TiXmlElement* xmlElem)
+    {
+    	Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
+    	
+    	if (xmlElem->Attribute("src"))
+    	{
+    		std::string skyboxSrc = xmlElem->Attribute("src");
+	    	mgr->setSkyBox(true, skyboxSrc);
+	    	
+	    	std::cout << "Loader: Set skybox: "<< skyboxSrc << std::endl << std::endl;
+    	}   	
+   }
+}
Index: code/branches/FICN/src/orxonox/objects/Skybox.h
===================================================================
--- code/branches/FICN/src/orxonox/objects/Skybox.h	(revision 507)
+++ code/branches/FICN/src/orxonox/objects/Skybox.h	(revision 507)
@@ -0,0 +1,24 @@
+#ifndef _OBJECT_SKYBOX_H__
+#define _OBJECT_SKYBOX_H__
+
+#include "BaseObject.h"
+#include "../../tinyxml/tinyxml.h"
+
+namespace orxonox
+{
+    class Skybox : public BaseObject
+    {
+        public:
+            Skybox();
+            virtual ~Skybox();
+
+            
+            void loadParams(TiXmlElement* xmlElem);
+
+        private:
+            
+
+    };
+}
+
+#endif
Index: code/branches/FICN/src/orxonox/objects/test1.cc
===================================================================
--- code/branches/FICN/src/orxonox/objects/test1.cc	(revision 505)
+++ code/branches/FICN/src/orxonox/objects/test1.cc	(revision 507)
@@ -72,11 +72,5 @@
     void Test1::loadParams(TiXmlElement* xmlElem)
     {
-    	Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
-    	
-    	mgr->setAmbientLight(ColourValue(1,0,0));
-    	
-    	
-    	
-    	std::cout<< xmlElem->GetText()<<std::endl;
+
     	
     	
Index: code/branches/FICN/src/orxonox/orxonox.cc
===================================================================
--- code/branches/FICN/src/orxonox/orxonox.cc	(revision 505)
+++ code/branches/FICN/src/orxonox/orxonox.cc	(revision 507)
@@ -56,5 +56,4 @@
 #include "core/Factory.h"
 
-#include "../xml/xmlParser.h"
 #include "../loader/LevelLoader.h"
 #include "../audio/AudioManager.h"
@@ -360,4 +359,5 @@
   {
     SceneManager *mgr = ogre_->getSceneManager();
+    
     Camera *cam = mgr->createCamera("Camera");
     cam->setPosition(Vector3(0,0,-250));
@@ -370,5 +370,6 @@
     node->attachObject(head);
     node->attachObject(cam);
-    mgr->setSkyBox(true, "Examples/SceneSkyBox2");
+    
+    
 
     Entity* head1 = mgr->createEntity("head1", "ogrehead.mesh");
