Index: /orxonox/trunk/src/Makefile.am
===================================================================
--- /orxonox/trunk/src/Makefile.am	(revision 3654)
+++ /orxonox/trunk/src/Makefile.am	(revision 3655)
@@ -66,7 +66,8 @@
 		 lib/util/ini_parser.cc \
 		 lib/util/list.cc \
+		 lib/util/resource_manager.cc \
 		 lib/math/vector.cc \
 		 lib/math/curve.cc \
-		 glmenu/glmenu_imagescreen.cc 
+		 glmenu/glmenu_imagescreen.cc
 
 noinst_HEADERS = orxonox.h \
@@ -76,5 +77,4 @@
 		 camera.h \
 		 keynames.h \
-		 proto_class.h \
 		 command_node.h \
 		 message_structures.h \
@@ -117,4 +117,5 @@
 		 lib/util/list.h \
 		 lib/util/list_template.h \
+		 lib/util/resource_manager.h \
 		 lib/util/ini_parser.h \
 		 lib/math/vector.h \
@@ -124,5 +125,9 @@
 
 ## orxonox.conf will be used from home-dir instead.
-EXTRA_DIST = orxonox.conf
+EXTRA_DIST = orxonox.conf \
+	     proto/proto_class.h \
+	     proto/proto_class.cc \
+	     proto/proto_singleton.h \
+	     proto/proto_singleton.cc
 
 if SUB_PROJECTS
Index: /orxonox/trunk/src/Makefile.in
===================================================================
--- /orxonox/trunk/src/Makefile.in	(revision 3654)
+++ /orxonox/trunk/src/Makefile.in	(revision 3655)
@@ -67,6 +67,6 @@
 	model.$(OBJEXT) material.$(OBJEXT) texture.$(OBJEXT) \
 	base_entity.$(OBJEXT) base_object.$(OBJEXT) \
-	ini_parser.$(OBJEXT) list.$(OBJEXT) vector.$(OBJEXT) \
-	curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT)
+	ini_parser.$(OBJEXT) list.$(OBJEXT) resource_manager.$(OBJEXT) \
+	vector.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
 orxonox_LDADD = $(LDADD)
@@ -94,4 +94,5 @@
 @AMDEP_TRUE@	./$(DEPDIR)/player.Po ./$(DEPDIR)/primitive.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/projectile.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/resource_manager.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/simple_animation.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/skysphere.Po \
@@ -270,7 +271,8 @@
 		 lib/util/ini_parser.cc \
 		 lib/util/list.cc \
+		 lib/util/resource_manager.cc \
 		 lib/math/vector.cc \
 		 lib/math/curve.cc \
-		 glmenu/glmenu_imagescreen.cc 
+		 glmenu/glmenu_imagescreen.cc
 
 noinst_HEADERS = orxonox.h \
@@ -280,5 +282,4 @@
 		 camera.h \
 		 keynames.h \
-		 proto_class.h \
 		 command_node.h \
 		 message_structures.h \
@@ -321,4 +322,5 @@
 		 lib/util/list.h \
 		 lib/util/list_template.h \
+		 lib/util/resource_manager.h \
 		 lib/util/ini_parser.h \
 		 lib/math/vector.h \
@@ -326,5 +328,10 @@
 		 glmenu/glmenu_imagescreen.h 
 
-EXTRA_DIST = orxonox.conf
+EXTRA_DIST = orxonox.conf \
+	     proto/proto_class.h \
+	     proto/proto_class.cc \
+	     proto/proto_singleton.h \
+	     proto/proto_singleton.cc
+
 @SUB_PROJECTS_FALSE@SUB_PROGS = 
 @SUB_PROJECTS_TRUE@SUB_PROGS = lib subprojects
@@ -428,4 +435,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primitive.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/projectile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource_manager.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_animation.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skysphere.Po@am__quote@
@@ -936,4 +944,20 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o list.obj `if test -f 'lib/util/list.cc'; then $(CYGPATH_W) 'lib/util/list.cc'; else $(CYGPATH_W) '$(srcdir)/lib/util/list.cc'; fi`
+
+resource_manager.o: lib/util/resource_manager.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT resource_manager.o -MD -MP -MF "$(DEPDIR)/resource_manager.Tpo" -c -o resource_manager.o `test -f 'lib/util/resource_manager.cc' || echo '$(srcdir)/'`lib/util/resource_manager.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/resource_manager.Tpo" "$(DEPDIR)/resource_manager.Po"; else rm -f "$(DEPDIR)/resource_manager.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/util/resource_manager.cc' object='resource_manager.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/resource_manager.Po' tmpdepfile='$(DEPDIR)/resource_manager.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o resource_manager.o `test -f 'lib/util/resource_manager.cc' || echo '$(srcdir)/'`lib/util/resource_manager.cc
+
+resource_manager.obj: lib/util/resource_manager.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT resource_manager.obj -MD -MP -MF "$(DEPDIR)/resource_manager.Tpo" -c -o resource_manager.obj `if test -f 'lib/util/resource_manager.cc'; then $(CYGPATH_W) 'lib/util/resource_manager.cc'; else $(CYGPATH_W) '$(srcdir)/lib/util/resource_manager.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/resource_manager.Tpo" "$(DEPDIR)/resource_manager.Po"; else rm -f "$(DEPDIR)/resource_manager.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/util/resource_manager.cc' object='resource_manager.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/resource_manager.Po' tmpdepfile='$(DEPDIR)/resource_manager.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o resource_manager.obj `if test -f 'lib/util/resource_manager.cc'; then $(CYGPATH_W) 'lib/util/resource_manager.cc'; else $(CYGPATH_W) '$(srcdir)/lib/util/resource_manager.cc'; fi`
 
 vector.o: lib/math/vector.cc
@@ -1107,5 +1131,5 @@
 
 distdir: $(DISTFILES)
-	$(mkdir_p) $(distdir)/ai $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/data $(distdir)/lib/graphics $(distdir)/lib/graphics/font $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/network $(distdir)/story_entities $(distdir)/world_entities
+	$(mkdir_p) $(distdir)/ai $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/data $(distdir)/lib/graphics $(distdir)/lib/graphics/font $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/network $(distdir)/proto $(distdir)/story_entities $(distdir)/world_entities
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
Index: /orxonox/trunk/src/defs/debug.h
===================================================================
--- /orxonox/trunk/src/defs/debug.h	(revision 3654)
+++ /orxonox/trunk/src/defs/debug.h	(revision 3655)
@@ -57,18 +57,19 @@
 #else /* DEBUG_SPECIAL_MODULE */
 // DEFINE MODULES \\
-#define DEBUG_MODULE_ORXONOX            2
-#define DEBUG_MODULE_WORLD              3
-#define DEBUG_MODULE_PNODE              2
-#define DEBUG_MODULE_WORLD_ENTITY       2
-#define DEBUG_MODULE_COMMAND_NODE       2
-#define DEBUG_MODULE_GRAPHICS           2
-
-#define DEBUG_MODULE_IMPORTER           2
-#define DEBUG_MODULE_TRACK_MANAGER      2
-#define DEBUG_MODULE_LIGHT              2
-#define DEBUG_MODULE_PLAYER             2
-#define DEBUG_MODULE_MATH               2
-
-#define DEBUG_MODULE_NULL_PARENT        2
+#define DEBUG_MODULE_ORXONOX            0
+#define DEBUG_MODULE_WORLD              0
+#define DEBUG_MODULE_PNODE              0
+#define DEBUG_MODULE_WORLD_ENTITY       0
+#define DEBUG_MODULE_COMMAND_NODE       0
+#define DEBUG_MODULE_GRAPHICS           0
+#define DEBUG_MODULE_LOAD               4
+
+#define DEBUG_MODULE_IMPORTER           0
+#define DEBUG_MODULE_TRACK_MANAGER      0
+#define DEBUG_MODULE_LIGHT              0
+#define DEBUG_MODULE_PLAYER             3
+#define DEBUG_MODULE_MATH               0
+
+#define DEBUG_MODULE_NULL_PARENT        0
 
 
Index: /orxonox/trunk/src/lib/graphics/importer/material.cc
===================================================================
--- /orxonox/trunk/src/lib/graphics/importer/material.cc	(revision 3654)
+++ /orxonox/trunk/src/lib/graphics/importer/material.cc	(revision 3655)
@@ -23,4 +23,7 @@
 #include <stdlib.h>
 #include <string.h>
+
+//! \todo check if we are in RESOURCE MANAGER-mode
+#include "resource_manager.h"
 
 using namespace std;
@@ -104,6 +107,4 @@
   this->ambientTextureSet = false;
   this->specularTextureSet = false;
-
-  
 }
 
@@ -333,7 +334,9 @@
 {
   PRINTF(4)("setting Diffuse Map %s\n", dMap);
-  diffuseTexture = new Texture();
-  this->diffuseTextureSet = diffuseTexture->loadImage(dMap);
-
+    diffuseTexture = new Texture();
+    this->diffuseTextureSet = diffuseTexture->loadImage(dMap);
+
+  //! \todo check if RESOURCE MANAGER is availiable
+  //this->diffuseTextureSet = this->diffuseTexture = (Texture*)ResourceManager::load(dMap, IMAGE);
 }
 
Index: /orxonox/trunk/src/lib/graphics/importer/objModel.cc
===================================================================
--- /orxonox/trunk/src/lib/graphics/importer/objModel.cc	(revision 3654)
+++ /orxonox/trunk/src/lib/graphics/importer/objModel.cc	(revision 3655)
@@ -21,19 +21,4 @@
 
 #include "debug.h"
-
-/**
-   \brief Crates a 3D-Model and loads in a File.
-   \param fileName file to parse and load (must be a .obj file)
-*/
-OBJModel::OBJModel(char* fileName)
-{
-  this->initializeOBJ();
-
-  this->importFile (fileName);
-
-  this->importToGL ();
-
-  this->cleanup();
-}
 
 /**
@@ -193,5 +178,5 @@
       else if (!strncmp(Buffer, "s ", 2)) //! \todo smoothing groups have to be implemented
 	{
-	  PRINTF(3)("smoothing groups not supportet yet. line: %s\n", Buffer);
+	  PRINTF(2)("smoothing groups not supportet yet. line: %s\n", Buffer);
 	}
     }
Index: /orxonox/trunk/src/lib/graphics/importer/objModel.h
===================================================================
--- /orxonox/trunk/src/lib/graphics/importer/objModel.h	(revision 3654)
+++ /orxonox/trunk/src/lib/graphics/importer/objModel.h	(revision 3655)
@@ -13,6 +13,5 @@
 {
  public:
-  OBJModel(char* fileName);
-  OBJModel(char* fileName, float scaling);
+  OBJModel(char* fileName, float scaling = 1.0);
   virtual ~OBJModel();
   void initializeOBJ(void);
@@ -28,5 +27,4 @@
   bool readFromObjFile (void);
   bool readMtlLib (char* matFile);
-
 };
 
Index: /orxonox/trunk/src/lib/graphics/importer/texture.cc
===================================================================
--- /orxonox/trunk/src/lib/graphics/importer/texture.cc	(revision 3654)
+++ /orxonox/trunk/src/lib/graphics/importer/texture.cc	(revision 3655)
@@ -131,4 +131,16 @@
 
 /**
+   \brief Constructor for a Texture
+*/
+Texture::Texture(const char* imageName)
+{
+  this->pImage = new Image;
+  this->pImage->data = NULL;
+  this->map = NULL;
+  this->texture = 0;
+  this->loadImage(imageName);
+}  
+
+/**
    \brief Destructor of a Texture
    
@@ -149,5 +161,5 @@
    \returns pathName+texName if texName was found in the pathList. NULL if the Texture is not found.
 */
-char* Texture::searchTextureInPaths(char* texName) const
+char* Texture::searchTextureInPaths(const char* texName) const
 {
   char* tmpName = NULL;
@@ -215,5 +227,5 @@
 
 #ifdef HAVE_SDL_SDL_IMAGE_H
-bool Texture::loadImage(char* imageName)
+bool Texture::loadImage(const char* imageName)
 {
   if (GraphicsEngine::texturesEnabled)
@@ -269,5 +281,5 @@
    \todo Checks where to find the Image
 */
-bool Texture::loadImage(char* imageName)
+bool Texture::loadImage(const char* imageName)
 {
   if (GraphicsEngine::texturesEnabled)
Index: /orxonox/trunk/src/lib/graphics/importer/texture.h
===================================================================
--- /orxonox/trunk/src/lib/graphics/importer/texture.h	(revision 3654)
+++ /orxonox/trunk/src/lib/graphics/importer/texture.h	(revision 3655)
@@ -70,8 +70,9 @@
   GLuint texture;   //!< The Texture-ID of opengl from this Texture.
   SDL_Surface* map; //!< The map SDL initializes for this element.
-  char* searchTextureInPaths(char* texName) const;
+  char* searchTextureInPaths(const char* texName) const;
   inline void swap(unsigned char &a, unsigned char &b);
  public:
   Texture(void);
+  Texture(const char* imageName);
   ~Texture(void);
   /** \returns The textureID of this texture.  */
@@ -79,5 +80,5 @@
   bool loadTexToGL (Image* pImage);
 
-  bool loadImage(char* imageName);
+  bool loadImage(const char* imageName);
 #ifndef HAVE_SDL_SDL_IMAGE_H
 
Index: /orxonox/trunk/src/lib/util/resource_manager.cc
===================================================================
--- /orxonox/trunk/src/lib/util/resource_manager.cc	(revision 3655)
+++ /orxonox/trunk/src/lib/util/resource_manager.cc	(revision 3655)
@@ -0,0 +1,166 @@
+/* 
+   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: Benjamin Grauer
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOAD
+
+#include "resource_manager.h"
+
+// different resource Types
+#include "objModel.h"
+#include "texture.h"
+
+// File Handling Includes
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+
+using namespace std;
+
+
+/**
+   \brief standard constructor
+*/
+ResourceManager::ResourceManager () 
+{
+   this->setClassName ("ResourceManager");
+   this->dataDir = NULL;
+}
+
+ResourceManager* ResourceManager::getInstance(void)
+{
+  if (!ResourceManager::singletonRef)
+    ResourceManager::singletonRef = new ResourceManager();
+  return ResourceManager::singletonRef;
+}
+
+ResourceManager* ResourceManager::singletonRef = NULL;
+
+/**
+   \brief standard deconstructor
+*/
+ResourceManager::~ResourceManager (void) 
+{
+  ResourceManager::singletonRef = NULL;
+}
+
+
+
+/**
+   \brief sets the data main directory
+   \param dataDir the DataDirectory.
+*/
+bool ResourceManager::setDataDir(char* dataDir)
+{
+  if (isDir(dataDir))
+    {
+      this->dataDir = new char[strlen(dataDir)+1];
+      strcpy(this->dataDir, dataDir);
+    }
+  else
+    {
+      PRINTF(1)("%s is not a Directory, and can not be the Data Directory\n", dataDir);
+    }
+}
+
+/**
+   \brief loads resources
+   \param fileName The fileName of the resource to load
+   \returns a pointer to a desired Resource.
+*/
+void* ResourceManager::load(const char* fileName)
+{
+  ResourceType tmpType;
+  if (!strncmp(fileName+(strlen(fileName)-4), ".obj", 4))
+    tmpType = OBJ;
+
+  return ResourceManager::load(fileName, tmpType);
+}
+
+/**
+   \brief loads resources
+   \param fileName The fileName of the resource to load
+   \param type The Type of Resource to load (\see ResourceType)
+   \returns a pointer to a desired Resource.
+*/
+void* ResourceManager::load(const char* fileName, ResourceType type)
+{
+  void* tmpResource = NULL;
+  char* tmpName = new char[strlen(fileName)+1];
+  strcpy(tmpName, fileName);
+  // Checking for the type of resource \see ResourceType
+  switch(type)
+    {
+    case OBJ:
+      if(isFile(tmpName))
+	tmpResource = new OBJModel(tmpName);
+      else
+	{
+	  PRINTF(2)("Sorry, %s does not exist. Loading a cube-Model instead\n", tmpName);
+	  tmpResource = new Model(CUBE);
+	}
+      break;
+    case IMAGE:
+      if(isFile(tmpName))
+	{
+	  tmpResource = new Texture(tmpName);
+	}
+      else
+	PRINTF(1)("!!Texture %s not Found!!\n", tmpName);
+      break;
+    default:
+      tmpResource = NULL;
+      PRINTF(2)("No type found for %s.\n   !!This should not happen unless the Type is not supported yet.!!\n", tmpName);
+      break;
+    }
+
+  // checking if the File really exists.
+  if(!isFile(tmpName))
+    {
+      PRINTF(2)("Sorry, %s is not a regular file.\n", tmpName);
+      tmpResource = NULL;
+    }
+  return tmpResource;
+}
+
+/**
+   \brief Checks if it is a Directory
+   \param directoryName the Directory to check for
+   \returns true if it is a directory/symlink false otherwise
+*/
+bool ResourceManager::isDir(const char* directoryName)
+{
+  struct stat status;
+  stat(directoryName, &status);
+  if (status.st_mode & (S_IFDIR | S_IFLNK))
+    return true;
+  else 
+    return false;
+}
+
+/**
+   \brief Checks if the file is either a Regular file or a Symlink
+   \param fileName the File to check for
+   \returns true if it is a regular file/symlink, false otherwise
+*/
+bool ResourceManager::isFile(const char* fileName)
+{
+  struct stat status;
+  stat(fileName, &status);
+  if (status.st_mode & (S_IFREG | S_IFLNK))
+    return true;
+  else
+    return false;
+}
Index: /orxonox/trunk/src/lib/util/resource_manager.h
===================================================================
--- /orxonox/trunk/src/lib/util/resource_manager.h	(revision 3655)
+++ /orxonox/trunk/src/lib/util/resource_manager.h	(revision 3655)
@@ -0,0 +1,64 @@
+/*! 
+    \file resource_manager.h
+    \brief The Resource Manager checks if a file/resource is loaded.
+
+    If a file/resource was already loaded the resourceManager will 
+    return a void pointer to the desired resource.
+    Otherwise it will instruct the coresponding resource-loader to load,
+    and receive a pointer to it.
+*/
+
+#ifndef _RESOURCE_MANAGER_H
+#define _RESOURCE_MANAGER_H
+
+#include "base_object.h"
+
+// FORWARD DEFINITION \\
+
+
+enum ResourceType {OBJ, WAV, MP3, OGG, IMAGE};
+
+//! The ResourceManager is a class, that decides if a file/resource should be loaded
+/**
+   If a file/resource was already loaded the resourceManager will 
+   return a void pointer to the desired resource.
+   Otherwise it will instruct the corresponding resource-loader to load,
+   and receive the pointer to it.
+
+   It does it by looking, if a desired file has already been loaded.
+*/
+class ResourceManager : public BaseObject 
+{
+ public:
+  static ResourceManager* getInstance();
+  virtual ~ResourceManager();
+
+  bool setDataDir(char* dataDir);
+  static void* load(const char* fileName);
+  static void* load(const char* fileName, ResourceType type);
+
+ private:
+  ResourceManager();
+  static ResourceManager* singletonRef;
+
+
+  struct file;
+  struct folder
+  {
+    char* name;
+    folder** subfolders;             //!< 
+    file** files;                    //!< Files in the directory
+  };
+  struct file
+  {
+    char* name;                      //!< exact Name of a file
+    void* pointer;
+  };
+
+  char* dataDir;                     //!< The main data directory
+
+  static bool isDir(const char* directory);
+  static bool isFile(const char* directory);  
+};
+
+#endif /* _RESOURCE_MANAGER_H */
Index: /orxonox/trunk/src/orxonox.cc
===================================================================
--- /orxonox/trunk/src/orxonox.cc	(revision 3654)
+++ /orxonox/trunk/src/orxonox.cc	(revision 3655)
@@ -31,4 +31,5 @@
 #include "game_loader.h"
 #include "graphics_engine.h"
+#include "resource_manager.h"
 
 #include <string.h>
@@ -159,5 +160,8 @@
 int Orxonox::initResources() 
 {
-  printf("Not yet implemented\n");
+  //  printf("Not yet implemented\n");
+  PRINT(3)("initializing ResourceManager\n");
+  resourceManager = ResourceManager::getInstance();
+  resourceManager->setDataDir("../data");
   return 0;
 }
Index: /orxonox/trunk/src/orxonox.h
===================================================================
--- /orxonox/trunk/src/orxonox.h	(revision 3654)
+++ /orxonox/trunk/src/orxonox.h	(revision 3655)
@@ -16,4 +16,5 @@
 class Camera;
 class GameLoader;
+class ResourceManager;
 
 //! Orxonox core singleton class
@@ -33,4 +34,5 @@
   SDL_Surface* screen;        //!< The current Screen
   GameLoader* gameLoader;     //!< The gameLoader
+  ResourceManager* resourceManager; //!< The ResourceManager
   
   bool bQuitOrxonox;          //!< If Orxonox should Quit
Index: /orxonox/trunk/src/proto/proto_class.cc
===================================================================
--- /orxonox/trunk/src/proto/proto_class.cc	(revision 3655)
+++ /orxonox/trunk/src/proto/proto_class.cc	(revision 3655)
@@ -0,0 +1,53 @@
+
+
+/* 
+   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: ...
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
+
+#include "proto_class.h"
+
+#include "stdincl.h" // maybe
+
+using namespace std;
+
+
+/**
+   \brief standard constructor
+   \todo this constructor is not jet implemented - do it
+*/
+ProtoClass::ProtoClass () 
+{
+   this->setClassName ("ProtoClass");
+}
+
+
+/**
+   \brief standard deconstructor
+
+*/
+ProtoClass::~ProtoClass () 
+{
+  // delete what has to be deleted here
+}
+
+/**
+   \brief nonsense - delete this method
+   \param realy nothing to give
+   \returns true or false - probably nothing?
+
+   this is just to show the doxygen abilities (this for example is an extension for a long comment)
+*/
+bool ProtoClass::doNonSense (int nothing) {}
Index: /orxonox/trunk/src/proto/proto_class.h
===================================================================
--- /orxonox/trunk/src/proto/proto_class.h	(revision 3655)
+++ /orxonox/trunk/src/proto/proto_class.h	(revision 3655)
@@ -0,0 +1,39 @@
+/*! 
+    \file proto_class.h
+    \brief Definition of the proto class template, used quickly start work
+    \todo Example: this shows how to use simply add a Marker that here has to be done something.
+
+    The Protoclass exists, to help you quikly getting the run for how to develop in orxonox.
+    It is an example for the CODING-CONVENTION, and a starting-point for every class.
+*/
+
+#ifndef _PROTO_CLASS_H
+#define _PROTO_CLASS_H
+
+#include "what realy has to be included"
+#include "base_object.h"
+
+// FORWARD DEFINITION \\
+class someClassWeNeed;
+
+
+/*class Test;*/ /* forward definition of class Test (without including it here!)*/
+
+//! A default class that aids you to start creating a new class
+/**
+   here can be some longer description of this class
+*/
+class ProtoClass : public BaseObject {
+
+ public:
+  ProtoClass();
+  virtual ~ProtoClass();
+
+  bool doNonSense (int nothing);
+
+ private:
+  int nonSense;  //!< doxygen tag here like this for all the variables - delete this variable if you use this
+
+};
+
+#endif /* _PROTO_CLASS_H */
Index: /orxonox/trunk/src/proto/proto_singleton.cc
===================================================================
--- /orxonox/trunk/src/proto/proto_singleton.cc	(revision 3655)
+++ /orxonox/trunk/src/proto/proto_singleton.cc	(revision 3655)
@@ -0,0 +1,55 @@
+/* 
+   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: ...
+   co-programmer: ...
+*/
+
+//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
+
+#include "proto_singleton.h"
+
+using namespace std;
+
+
+/**
+   \brief standard constructor
+*/
+ProtoSingleton::ProtoSingleton () 
+{
+   this->setClassName ("ProtoSingleton");
+
+}
+
+/**
+   \brief the singleton reference to this class
+*/
+ProtoSingleton* ProtoSingleton::singletonRef = NULL;
+
+/**
+   \returns a Pointer to this Class
+*/
+ProtoSingleton* ProtoSingleton::getInstance(void)
+{
+  if (!ProtoSingleton::singletonRef)
+    ProtoSingleton::singletonRef = new ProtoSingleton();
+  return ProtoSingleton::singletonRef;
+}
+
+/**
+   \brief standard deconstructor
+
+*/
+ProtoSingleton::~ProtoSingleton () 
+{
+  ProtoSingleton::singletonRef = NULL;
+
+}
Index: /orxonox/trunk/src/proto/proto_singleton.h
===================================================================
--- /orxonox/trunk/src/proto/proto_singleton.h	(revision 3655)
+++ /orxonox/trunk/src/proto/proto_singleton.h	(revision 3655)
@@ -0,0 +1,27 @@
+/*! 
+    \file proto_singleton.h
+    \brief Definition of the proto class template, used quickly start work
+    
+    a simple file to copy and create a singleton-class from
+*/
+
+#ifndef _PROTO_SINGLETON_H
+#define _PROTO_SINGLETON_H
+
+#include "base_object.h"
+
+// FORWARD DEFINITION \\
+
+//! A default singleton class.
+class ProtoSingleton : public BaseObject {
+
+ public:
+  static ProtoSingleton* getInstance(void);
+  virtual ~ProtoSingleton(void);
+
+ private:
+  ProtoSingleton(void);
+  static ProtoSingleton* singletonRef;
+};
+
+#endif /* _PROTO_SINGLETON_H */
Index: xonox/trunk/src/proto_class.cc
===================================================================
--- /orxonox/trunk/src/proto_class.cc	(revision 3654)
+++ 	(revision )
@@ -1,53 +1,0 @@
-
-
-/* 
-   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: ...
-   co-programmer: ...
-*/
-
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
-
-#include "proto_class.h"
-
-#include "stdincl.h" // maybe
-
-using namespace std;
-
-
-/**
-   \brief standard constructor
-   \todo this constructor is not jet implemented - do it
-*/
-ProtoClass::ProtoClass () 
-{
-   this->setClassName ("ProtoClass");
-}
-
-
-/**
-   \brief standard deconstructor
-
-*/
-ProtoClass::~ProtoClass () 
-{
-  // delete what has to be deleted here
-}
-
-/**
-   \brief nonsense - delete this method
-   \param realy nothing to give
-   \returns true or false - probably nothing?
-
-   this is just to show the doxygen abilities (this for example is an extension for a long comment)
-*/
-bool ProtoClass::doNonSense (int nothing) {}
Index: xonox/trunk/src/proto_class.h
===================================================================
--- /orxonox/trunk/src/proto_class.h	(revision 3654)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/*! 
-    \file proto_class.h
-    \brief Definition of the proto class template, used quickly start work
-    \todo Example: this shows how to use simply add a Marker that here has to be done something.
-
-    The Protoclass exists, to help you quikly getting the run for how to develop in orxonox.
-    It is an example for the CODING-CONVENTION, and a starting-point for every class.
-*/
-
-#ifndef _PROTO_CLASS_H
-#define _PROTO_CLASS_H
-
-#include "what realy has to be included"
-#include "base_object.h"
-
-// FORWARD DEFINITION \\
-class someClassWeNeed;
-
-
-/*class Test;*/ /* forward definition of class Test (without including it here!)*/
-
-//! A default class that aids you to start creating a new class
-/**
-   here can be some longer description of this class
-*/
-class ProtoClass : public BaseObject {
-
- public:
-  ProtoClass();
-  virtual ~ProtoClass();
-
-  bool doNonSense (int nothing);
-
- private:
-  int nonSense;  //!< doxygen tag here like this for all the variables - delete this variable if you use this
-
-};
-
-#endif /* _PROTO_CLASS_H */
Index: /orxonox/trunk/src/world_entities/player.cc
===================================================================
--- /orxonox/trunk/src/world_entities/player.cc	(revision 3654)
+++ /orxonox/trunk/src/world_entities/player.cc	(revision 3655)
@@ -22,4 +22,5 @@
 #include "track_manager.h"
 #include "objModel.h"
+#include "resource_manager.h"
 #include "weapon.h"
 #include "test_gun.h"
@@ -44,5 +45,5 @@
      the player.cc for debug also
   */
-  this->model = new OBJModel("../data/models/reaplow.obj");
+  this->model = (Model*) ResourceManager::load("../data/models/reaplow.obj", OBJ);
   travelSpeed = 15.0;
   velocity = new Vector();
Index: /orxonox/trunk/src/world_entities/player.h
===================================================================
--- /orxonox/trunk/src/world_entities/player.h	(revision 3654)
+++ /orxonox/trunk/src/world_entities/player.h	(revision 3655)
@@ -10,5 +10,4 @@
 
 template<class T> class tList;
-class OBJModel;
 class Weapon;
 class Vector;
Index: /orxonox/trunk/src/world_entities/world_entity.h
===================================================================
--- /orxonox/trunk/src/world_entities/world_entity.h	(revision 3654)
+++ /orxonox/trunk/src/world_entities/world_entity.h	(revision 3655)
@@ -12,5 +12,5 @@
 //class CollisionCluster;
 class CharacterAttributes;
-class OBJModel;
+class Model;
 
 
@@ -48,5 +48,5 @@
   
  protected:
-  OBJModel* model;                  //!< The model that should be loaded for this entity.
+  Model* model;                  //!< The model that should be loaded for this entity.
   CharacterAttributes* charAttr;      //!< the character attributes of a world_entity
   
