Index: /branches/new_class_id/src/lib/graphics/importer/material.cc
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/material.cc	(revision 9822)
+++ /branches/new_class_id/src/lib/graphics/importer/material.cc	(revision 9823)
@@ -99,27 +99,4 @@
 
 const Material* Material::selectedMaterial = NULL;
-
-
-/// TODO FIX THIS
-// Material& Material::operator=(const Material& m)
-// {
-//   this->setIllum(m.illumModel);
-//   this->setDiffuse(m.diffuse[0],m.diffuse[1],m.diffuse[2]);
-//   this->setAmbient(m.ambient[0],m.ambient[1],m.ambient[2]);
-//   this->setSpecular(m.specular[0],m.specular[1],m.specular[2]);
-//   this->setShininess(m.shininess);
-//   this->setTransparency(m.transparency);
-//
-//   if (this->diffuseTexture != NULL)
-//     ResourceManager::getInstance()->unload(this->diffuseTexture);
-//   if (m.diffuseTexture != NULL)
-//     this->diffuseTexture = (Texture*)ResourceManager::getInstance()->copy(m.diffuseTexture);
-//   this->ambientTexture = NULL; /// FIXME
-//   this->specularTexture = NULL; /// FIXME
-//
-//   this->setName(m.getName());
-// }
-
-
 
 /**
@@ -296,7 +273,4 @@
   //ResourceManager::getInstance()->addImageDir(pathName);
 }
-
-// MAPPING //
-
 
 /**
Index: /branches/new_class_id/src/lib/graphics/importer/material.h
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/material.h	(revision 9822)
+++ /branches/new_class_id/src/lib/graphics/importer/material.h	(revision 9823)
@@ -29,7 +29,7 @@
   virtual ~Material ();
 
+  Material& operator=(const Material& material);
+
   void loadParams(const TiXmlElement* root);
-
-  Material& operator=(const Material& material);
 
   bool select () const;
Index: /branches/new_class_id/src/lib/graphics/importer/resource_texture.cc
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/resource_texture.cc	(revision 9822)
+++ /branches/new_class_id/src/lib/graphics/importer/resource_texture.cc	(revision 9823)
@@ -1,4 +1,6 @@
 
 #include "resource_texture.h"
+#include "substring.h"
+#include "multi_type.h"
 #include "debug.h"
 
@@ -23,6 +25,20 @@
 }
 
+ResourceTexture ResourceTexture::createFromString(const std::string& loadString)
+{
+  SubString loadValues(loadString, ',');
+  std::string imageName;
+  GLenum target = GL_TEXTURE_2D;
+  if (loadValues.size() > 0)
+    imageName = loadValues[0];
+  if (loadValues.size() > 1)
+    target = (GLenum)MultiType(loadValues[2]).getInt();
 
-Resources::Type ResourceTexture::type("Texture");
+  return ResourceTexture(imageName, target);
+}
+
+
+
+Resources::tType<ResourceTexture> ResourceTexture::type("Texture");
 
 
Index: /branches/new_class_id/src/lib/graphics/importer/resource_texture.h
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/resource_texture.h	(revision 9822)
+++ /branches/new_class_id/src/lib/graphics/importer/resource_texture.h	(revision 9823)
@@ -16,5 +16,5 @@
 public:
   ResourceTexture(const std::string& imageName, GLenum target = GL_TEXTURE_2D);
-
+  static ResourceTexture createFromString(const std::string& loadString);
 
 private:
@@ -24,10 +24,10 @@
     TextureResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const TextureData::Pointer& data);
     inline const TextureData::Pointer& ptr() const { return pointer; }
-  private:
+private:
     TextureData::Pointer pointer;
   };
 
 private:
-  static Resources::Type type;
+  static Resources::tType<ResourceTexture> type;
 };
 
Index: /branches/new_class_id/src/lib/graphics/resource_shader.cc
===================================================================
--- /branches/new_class_id/src/lib/graphics/resource_shader.cc	(revision 9822)
+++ /branches/new_class_id/src/lib/graphics/resource_shader.cc	(revision 9823)
@@ -2,10 +2,10 @@
 #include "resource_shader.h"
 #include "debug.h"
-
+#include "substring.h"
 
 ResourceShader::ResourceShader(const std::string& vertexShaderName, const std::string& fragmentShaderName)
     : NewResource(&ResourceShader::type)
 {
-  Resources::StorePointer* ptr = this->acquireResource(vertexShaderName +'|'+fragmentShaderName);
+  Resources::StorePointer* ptr = this->acquireResource(vertexShaderName +','+fragmentShaderName);
 
   if (ptr)
@@ -23,14 +23,23 @@
 
     this->Shader::load(vertexFileName, fragmentFileName);
-    this->NewResource::addResource(new ResourceShader::ShaderResourcePointer(vertexShaderName+'|'+fragmentShaderName, Resources::KeepLevel(0), this->Shader::dataPointer()));
+    this->NewResource::addResource(new ResourceShader::ShaderResourcePointer(vertexShaderName+','+fragmentShaderName, Resources::KeepLevel(0), this->Shader::dataPointer()));
   }
 }
 
+ResourceShader ResourceShader::createFromString(const std::string& loadString)
+{
+  std::string vertexShaderName;
+  std::string fragmentShaderName;
 
-Resources::Type ResourceShader::type("Shader");
+  SubString shaderNames(loadString, ',');
+  if (shaderNames.size() > 0)
+    vertexShaderName = shaderNames[0];
+  if (shaderNames.size() > 1)
+    fragmentShaderName = shaderNames[1];
 
+  return ResourceShader(vertexShaderName, fragmentShaderName);
+}
 
-
-
+Resources::tType<ResourceShader> ResourceShader::type("Shader");
 
 ResourceShader::ShaderResourcePointer::ShaderResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const ShaderData::Pointer& data)
Index: /branches/new_class_id/src/lib/graphics/resource_shader.h
===================================================================
--- /branches/new_class_id/src/lib/graphics/resource_shader.h	(revision 9822)
+++ /branches/new_class_id/src/lib/graphics/resource_shader.h	(revision 9823)
@@ -16,5 +16,5 @@
 public:
   ResourceShader(const std::string& vertexShaderName, const std::string& fragmentShaderName);
-
+  static ResourceShader createFromString(const std::string& loadString);
 
 private:
@@ -29,5 +29,5 @@
 
 private:
-  static Resources::Type type;
+  static Resources::tType<ResourceShader> type;
 };
 
Index: /branches/new_class_id/src/lib/sound/resource_sound_buffer.cc
===================================================================
--- /branches/new_class_id/src/lib/sound/resource_sound_buffer.cc	(revision 9822)
+++ /branches/new_class_id/src/lib/sound/resource_sound_buffer.cc	(revision 9823)
@@ -9,5 +9,5 @@
 
   ResourceSoundBuffer::ResourceSoundBuffer(const std::string& soundName)
-  : SoundBuffer(), NewResource(&ResourceSoundBuffer::type)
+      : SoundBuffer(), NewResource(&ResourceSoundBuffer::type)
   {
     this->registerObject(this, ResourceSoundBuffer::_objectList);
@@ -30,8 +30,7 @@
 
 
-  Resources::Type ResourceSoundBuffer::type("SoundBuffer");
+  Resources::tType<ResourceSoundBuffer> ResourceSoundBuffer::type("SoundBuffer");
 
   ResourceSoundBuffer::SoundBufferResourcePointer::SoundBufferResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const SoundBufferData::Pointer& data)
       : Resources::StorePointer(loadString, keepLevel) , pointer(data)
-{}
-}
+{}}
Index: /branches/new_class_id/src/lib/sound/resource_sound_buffer.h
===================================================================
--- /branches/new_class_id/src/lib/sound/resource_sound_buffer.h	(revision 9822)
+++ /branches/new_class_id/src/lib/sound/resource_sound_buffer.h	(revision 9823)
@@ -18,4 +18,5 @@
   public:
     ResourceSoundBuffer(const std::string& soundName);
+    static ResourceSoundBuffer createFromString(const std::string& loadString) { return ResourceSoundBuffer(loadString); };
 
   private:
@@ -30,5 +31,5 @@
 
   private:
-    static Resources::Type type;
+    static Resources::tType<ResourceSoundBuffer> type;
   };
 }
Index: /branches/new_class_id/src/lib/util/filesys/directory.cc
===================================================================
--- /branches/new_class_id/src/lib/util/filesys/directory.cc	(revision 9822)
+++ /branches/new_class_id/src/lib/util/filesys/directory.cc	(revision 9823)
@@ -215,4 +215,4 @@
 File operator+(const Directory& dir, const File& file)
 {
-   return File(dir.name() + '/' + file.name());
-}
+  return File(dir.name() + Directory::delimiter + file.name());
+}
Index: /branches/new_class_id/src/lib/util/filesys/directory.h
===================================================================
--- /branches/new_class_id/src/lib/util/filesys/directory.h	(revision 9822)
+++ /branches/new_class_id/src/lib/util/filesys/directory.h	(revision 9823)
@@ -65,5 +65,5 @@
   const std::string& operator[](unsigned int fileNumber) const { return this->_fileNames[fileNumber]; };
   /** @returns a formated string containing the FileName, prepended with the directory-Name */
-  std::string fileNameInDir(unsigned int fileNumber) const { return this->name() + "/" + _fileNames[fileNumber]; };
+  std::string fileNameInDir(unsigned int fileNumber) const { return this->name() + Directory::delimiter + _fileNames[fileNumber]; };
   /** @returns a File pointing to the File @param fileNumber the fileNumber (must not bigger than fileCount()) */
   File getFile(unsigned int fileNumber) const { return File(fileNameInDir(fileNumber)); };
Index: /branches/new_class_id/src/lib/util/loading/resource.h
===================================================================
--- /branches/new_class_id/src/lib/util/loading/resource.h	(revision 9822)
+++ /branches/new_class_id/src/lib/util/loading/resource.h	(revision 9823)
@@ -61,5 +61,5 @@
   public:
     Type(const std::string& typeName);
-    ~Type();
+    virtual ~Type();
     /** @returns true if the names match @param resourceName the Name to compare. @brief compare the Type with a Name */
     bool operator==(const std::string& resourceName) const { return this->_typeName == resourceName; };
@@ -82,4 +82,6 @@
     const std::vector<Resources::StorePointer*>& storedResources() const { return _storedResources; };
 
+    virtual void createFromString(const std::string& loadString) = 0;
+
     void setID(int id);
     void addResource(Resources::StorePointer* resource);
@@ -95,4 +97,11 @@
 
     std::vector<Resources::StorePointer*> _storedResources;   //!< An array of all the stored Resources.
+  };
+
+  template<class T> class tType : public Type
+  {
+  public:
+    tType(const std::string& typeName) : Type(typeName) {};
+    virtual void createFromString(const std::string& loadString) { T::createFromString(loadString); }
   };
 
Index: /branches/new_class_id/src/story_entities/game_world.cc
===================================================================
--- /branches/new_class_id/src/story_entities/game_world.cc	(revision 9822)
+++ /branches/new_class_id/src/story_entities/game_world.cc	(revision 9823)
@@ -694,5 +694,5 @@
  *  removes the loadscreen, and changes over to the game
  */
-void GameWorld::releaseLoadScreen ()
+void GameWorld::releaseLoadScreen()
 {
   PRINTF(3)("GameWorld::releaseLoadScreen - start\n");
Index: /branches/new_class_id/src/world_entities/environments/water.cc
===================================================================
--- /branches/new_class_id/src/world_entities/environments/water.cc	(revision 9822)
+++ /branches/new_class_id/src/world_entities/environments/water.cc	(revision 9823)
@@ -23,6 +23,5 @@
 #include "material.h"
 
-#include "util/loading/resource_manager.h"
-#include "shader.h"
+#include "resource_shader.h"
 
 #include "skybox.h"
@@ -56,5 +55,5 @@
 
   this->rebuildGrid();
-  this->waterShader = (Shader*)ResourceManager::getInstance()->load("shaders/water.vert", SHADER, RP_GAME, "shaders/water.frag");
+  this->waterShader = ResourceShader("shaders/water.vert", "shaders/water.frag");
 
   // To test the Wave equation
Index: /branches/new_class_id/src/world_entities/environments/water.h
===================================================================
--- /branches/new_class_id/src/world_entities/environments/water.h	(revision 9822)
+++ /branches/new_class_id/src/world_entities/environments/water.h	(revision 9823)
@@ -13,9 +13,8 @@
 #include "world_entity.h"
 #include "material.h"
-
+#include "shader.h"
 
 /* FORWARD DECLARATION */
 class Grid;
-class Shader;
 
 //! A Class to handle a WaterEffects
@@ -52,5 +51,5 @@
 
     Material        waterMaterial;
-    Shader*         waterShader;
+    Shader          waterShader;
 
     float           height;          //!< The hight of the Water
Index: /branches/new_class_id/src/world_entities/skybox.cc
===================================================================
--- /branches/new_class_id/src/world_entities/skybox.cc	(revision 9822)
+++ /branches/new_class_id/src/world_entities/skybox.cc	(revision 9823)
@@ -27,5 +27,5 @@
 #include "network_game_manager.h"
 #include "converter.h"
-#include "util/loading/resource_manager.h"
+#include "resource_texture.h"
 
 #include "debug.h"
@@ -113,6 +113,4 @@
     if (this->material[i])
       delete this->material[i];
-    if (this->cubeTexture[i])
-      ResourceManager::getInstance()->unload(this->cubeTexture[i]);
   }
 }
@@ -175,12 +173,12 @@
                                   const std::string& posZ, const std::string& posX, const std::string& negX)
 {
-  this->cubeTexture[0] = (Texture*)ResourceManager::getInstance()->load(negX, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT);
-  this->cubeTexture[1] = (Texture*)ResourceManager::getInstance()->load(posX, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT);
-
-  this->cubeTexture[2] = (Texture*)ResourceManager::getInstance()->load(negY, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT);
-  this->cubeTexture[3] = (Texture*)ResourceManager::getInstance()->load(posY, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT);
-
-  this->cubeTexture[4] = (Texture*)ResourceManager::getInstance()->load(negZ, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT);
-  this->cubeTexture[5] = (Texture*)ResourceManager::getInstance()->load(posZ, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT);
+  this->cubeTexture[0] = ResourceTexture(negX, GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT);
+  this->cubeTexture[1] = ResourceTexture(posX, GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT);
+
+  this->cubeTexture[2] = ResourceTexture(negY, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT);
+  this->cubeTexture[3] = ResourceTexture(posY, GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT);
+
+  this->cubeTexture[4] = ResourceTexture(negZ, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT);
+  this->cubeTexture[5] = ResourceTexture(posZ, GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT);
 }
 
Index: /branches/new_class_id/src/world_entities/skybox.h
===================================================================
--- /branches/new_class_id/src/world_entities/skybox.h	(revision 9822)
+++ /branches/new_class_id/src/world_entities/skybox.h	(revision 9823)
@@ -65,5 +65,5 @@
 
   Material*       material[6];     //!< Materials for the SkyBox. sorted by number (0-5) top, bottom, left, right, front, back
-  Texture*        cubeTexture[6];  //!< Textures for the CubeMap.
+  Texture         cubeTexture[6];  //!< Textures for the CubeMap.
 
   float           size;            //!< Size of the SkyBox. This should match the frustum maximum range.
