Index: branches/new_class_id/src/lib/util/filesys/directory.cc
===================================================================
--- branches/new_class_id/src/lib/util/filesys/directory.cc	(revision 9784)
+++ branches/new_class_id/src/lib/util/filesys/directory.cc	(revision 9785)
@@ -212,2 +212,7 @@
 
 }
+
+File operator+(const Directory& dir, const File& file)
+{
+   return File(dir.name() + '/' + file.name());
+}
Index: branches/new_class_id/src/lib/util/filesys/directory.h
===================================================================
--- branches/new_class_id/src/lib/util/filesys/directory.h	(revision 9784)
+++ branches/new_class_id/src/lib/util/filesys/directory.h	(revision 9785)
@@ -77,4 +77,6 @@
 };
 
+File operator+(const Directory& dir, const File& file);
+
 #endif /* __DIRECTORY_H_ */
 
Index: branches/new_class_id/src/lib/util/loading/resource.cc
===================================================================
--- branches/new_class_id/src/lib/util/loading/resource.cc	(revision 9784)
+++ branches/new_class_id/src/lib/util/loading/resource.cc	(revision 9785)
@@ -17,6 +17,14 @@
 
 #include "resource.h"
+#include "filesys/file.h"
 
 ObjectListDefinition(Resource);
+
+
+std::vector<Resource::Type*>    Resource::_resourceTypes;
+
+//! GLOBALS
+Directory Resource::_mainGlobalPath;
+std::vector<Directory>        Resource::_globalPaths;
 
 
@@ -24,8 +32,14 @@
  * standard constructor
 */
-Resource::Resource ()
-    : _pointer(NULL)
+Resource::Resource (Resource::Type* type)
+    : _pointer(NULL), _type(type)
 {
   this->registerObject(this, Resource::_objectList);
+
+  if(this->_type->id() == -1)
+  {
+    Resource::_resourceTypes.push_back(this->_type);
+    this->_type->setID(Resource::_resourceTypes.size()-1);
+  }
 
 }
@@ -40,20 +54,49 @@
 
 
+std::string Resource::locateFile(const std::string& fileName)
+{
+  if (File(fileName).exists())
+    return fileName;
+  else if ((Resource::_mainGlobalPath+File(fileName)) . exists() )
+    return (Resource::_mainGlobalPath + File(fileName)).name();
 
-Resource::Pointer* Resource::acquireResource(Resource::Type& resourceType, const std::string& loadString)
+
+  return std::string("/home/bensch/svn/orxonox/data/") + fileName;
+
+}
+
+
+Resource::Pointer* Resource::acquireResource(const std::string& loadString)
 {
-  if(resourceType.id() == -1)
-  {
-    Resource::_resourceTypes.push_back(&resourceType);
-    resourceType.setID(Resource::_resourceTypes.size());
-  }
-  const Resource::Type* const type = Resource::_resourceTypes[resourceType.id()];
+  //const Resource::Type* const type = Resource::_resourceTypes[this->_type->id()];
 
-  for (unsigned int i = 0; i < type->storedResources().size(); ++i)
-    if (type->storedResources()[i]->_pointer->loadString() == loadString)
-      return type->storedResources()[i]->_pointer;
+  for (unsigned int i = 0; i < _type->storedResources().size(); ++i)
+    if (_type->storedResources()[i]->_pointer->loadString() == loadString)
+      return _type->storedResources()[i]->_pointer;
 
   return NULL;
 }
+
+void Resource::setMainGlobalPath(const Directory& directory)
+{
+  Resource::_mainGlobalPath = directory;
+  Resource::_mainGlobalPath.open();
+}
+
+void Resource::addGlobalPath(const Directory& directory)
+{
+  std::vector<Directory>::const_iterator it = std::find(Resource::_globalPaths.begin(), Resource::_globalPaths.end(), directory);
+  if (it == Resource::_globalPaths.end())
+    Resource::_globalPaths.push_back(directory);
+}
+
+
+
+void Resource::addResource(Resource::Pointer* pointer)
+{}
+
+
+
+
 
 
@@ -68,2 +111,20 @@
   _keepLevelName[level] = name;
 }
+
+
+
+
+
+
+
+
+
+
+Resource::Pointer::Pointer(const std::string& loadString, const Resource::KeepLevel& keeplevel)
+{
+}
+
+void Resource::Type::setID(int id)
+{
+  this->_id = id;
+}
Index: branches/new_class_id/src/lib/util/loading/resource.h
===================================================================
--- branches/new_class_id/src/lib/util/loading/resource.h	(revision 9784)
+++ branches/new_class_id/src/lib/util/loading/resource.h	(revision 9785)
@@ -12,4 +12,6 @@
 #include <vector>
 #include <set>
+
+#include "filesys/directory.h"
 
 //! A Resource is an Object, that can be loaded from Disk
@@ -48,4 +50,5 @@
 
     void setID(int id);
+    void addResource(Resource* resource);
 
   private:
@@ -73,15 +76,25 @@
 
 public:
-  Resource();
+  Resource(Resource::Type* type);
   virtual ~Resource();
 
-  virtual bool reload();
-  virtual bool unload();
+  virtual bool reload() { return false; };
+  virtual bool unload() { return false; };
+
+  std::string locateFile(const std::string& fileName);
+
+
+  public:
+    static void setMainGlobalPath(const Directory& directory);
+    static void addGlobalPath(const Directory& directory);
+
 
 protected:
-  Resource::Pointer* acquireResource(Resource::Type& resourceType, const std::string& loadString);
+  Resource::Pointer* acquireResource(const std::string& loadString);
+  void addResource(Resource::Pointer* pointer);
 
 private:
   Resource::Pointer*       _pointer;                //!< Virtual Pointer to the ResourceData.
+  Resource::Type*          _type;                   //!< Type of the Resource.
 
 
@@ -89,6 +102,6 @@
 
   //! GLOBALS
-  static std::string                     _mainGlobalPath;
-  static std::vector<std::string>        _globalPaths;
+  static Directory                       _mainGlobalPath;
+  static std::vector<Directory>          _globalPaths;
 };
 
