Index: orxonox/trunk/src/util/resource_manager.cc
===================================================================
--- orxonox/trunk/src/util/resource_manager.cc	(revision 4533)
+++ orxonox/trunk/src/util/resource_manager.cc	(revision 4534)
@@ -19,10 +19,18 @@
 
 // different resource Types
+#ifndef NO_MODEL
 #include "objModel.h"
 #include "primitive_model.h"
 #include "md2Model.h"
+#endif /* NO_MODEL */
+#ifndef NO_TEXTURES
 #include "texture.h"
+#endif /* NO_TEXTURES */
+#ifndef NO_TEXT
 #include "text_engine.h"
+#endif /* NO_TEXT */
+#ifndef NO_AUDIO
 #include "sound_engine.h"
+#endif /* NO_AUDIO */
 
 #include "list.h"
@@ -117,4 +125,5 @@
 }
 
+#ifndef NO_TEXTURE
 /**
    \brief adds a new Path for Images
@@ -155,4 +164,5 @@
     }
 }
+#endif /* NO_TEXTURES */
 
 /**
@@ -168,9 +178,17 @@
 {
   ResourceType tmpType;
-
+#ifndef NO_MODEL
   if (!strncmp(fileName+(strlen(fileName)-4), ".obj", 4))
     tmpType = OBJ;
-  if (!strncmp(fileName+(strlen(fileName)-4), ".md2", 4))
+  else if (!strncmp(fileName+(strlen(fileName)-4), ".md2", 4))
     tmpType = MD2;
+  else if (!strcmp(fileName, "cube") ||
+           !strcmp(fileName, "sphere") ||
+	   !strcmp(fileName, "plane") ||
+           !strcmp(fileName, "cylinder") ||
+           !strcmp(fileName, "cone"))
+    tmpType = PRIM;
+#endif /* NO_MODEL */
+#ifndef NO_AUDIO
   else if (!strncmp(fileName+(strlen(fileName)-4), ".wav", 4))
     tmpType = WAV;
@@ -179,14 +197,13 @@
   else if (!strncmp(fileName+(strlen(fileName)-4), ".ogg", 4))
     tmpType = OGG;
-  else if (!strcmp(fileName, "cube") ||
-           !strcmp(fileName, "sphere") ||
-	   !strcmp(fileName, "plane") ||
-           !strcmp(fileName, "cylinder") ||
-           !strcmp(fileName, "cone"))
-    tmpType = PRIM;
+#endif /* NO_AUDIO */
+#ifndef NO_TEXT
   else if (!strncmp(fileName+(strlen(fileName)-4), ".ttf", 4))
     tmpType = TTF;
+#endif /* NO_TEXT */
+#ifndef NO_TEXTURES
   else 
     tmpType = IMAGE;
+#endif /* NO_TEXTURES */
 
   return this->load(fileName, tmpType, prio, param1, param2, param3);
@@ -232,4 +249,5 @@
       switch(type)
 	{
+#ifndef NO_MODEL
 	case OBJ:
 	  if (param1)
@@ -276,4 +294,6 @@
 	    }
 	      break;
+#endif /* NO_MODEL */
+#ifndef NO_TEXT
 	case TTF:
 	    if (param1)
@@ -304,8 +324,12 @@
 	    PRINTF(2)("Sorry, %s does not exist. Not loading Font\n", fullName);
 	  break;
+#endif /* NO_TEXT */
+#ifndef NO_AUDIO
 	case WAV:
 	  if(isFile(fullName))
 	    tmpResource->pointer = new SoundBuffer(fullName);
 	  break;
+#endif /* NO_AUDIO */
+#ifndef NO_TEXTURES
 	case IMAGE:
 	  if(isFile(fullName))
@@ -338,4 +362,5 @@
 	     PRINTF(2)("!!Image %s not Found!!\n", fileName);
 	  break;
+#endif /* NO_TEXTURES */
 	default:
 	  tmpResource->pointer = NULL;
@@ -392,4 +417,5 @@
 	  switch(resource->type)
 	    {
+#ifndef NO_MODEL
 	    case OBJ:
 	    case PRIM:
@@ -399,13 +425,20 @@
 	      delete (MD2Data*)resource->pointer;
 	      break;
+#endif /* NO_MODEL */
+#ifndef NO_AUDIO
+	    case WAV:
+	      delete (SoundBuffer*)resource->pointer;
+	      break;
+#endif /* NO_AUDIO */
+#ifndef NO_TEXT
+	    case TTF:
+	      delete (Font*)resource->pointer;
+	      break;
+#endif /* NO_TEXT */
+#ifndef NO_TEXTURES
 	    case IMAGE:
 	      delete (Texture*)resource->pointer;
 	      break;
-	    case WAV:
-	      delete (SoundBuffer*)resource->pointer;
-	      break;
-	    case TTF:
-	      delete (Font*)resource->pointer;
-	      break;
+#endif /* NO_TEXTURES */
 	    default:
 	      PRINTF(1)("NOT YET IMPLEMENTED !!FIX FIX!!\n");
@@ -473,4 +506,5 @@
 	  switch (type)
 	    {
+#ifndef NO_MODEL
 	    case PRIM:
 	    case OBJ:
@@ -492,4 +526,6 @@
 		match = true;
 	      break;
+#endif /* NO_MODEL */
+#ifndef NO_TEXT
 	    case TTF:
 	      if (!param1)
@@ -515,6 +551,6 @@
 		    match = true;
 		}
-
-	      break;
+	      break;
+#endif /* NO_TEXT */
 	    default:
 	      match = true;
Index: orxonox/trunk/src/util/resource_manager.h
===================================================================
--- orxonox/trunk/src/util/resource_manager.h	(revision 4533)
+++ orxonox/trunk/src/util/resource_manager.h	(revision 4534)
@@ -7,4 +7,11 @@
     Otherwise it will instruct the coresponding resource-loader to load,
     and receive a pointer to it.
+
+    it is possible to compile the resource Manager without some modules by
+    just adding the compile flag -D.... 
+    (NO_MODEL)
+    (NO_AUDIO)
+    (NO_TEXT)
+    (NO_TEXTURES)
 */
 
@@ -20,12 +27,22 @@
 
 //! An eumerator for different fileTypes the resourceManager supports
-typedef enum ResourceType { OBJ,          //!< loading .obj file
-			    PRIM,         //!< loading primitive model
-			    MD2,          //!< loading md2-file
-			    WAV,          //!< loading wav
-			    MP3,          //!< loading mp3
-			    OGG,          //!< loading ogg
-			    TTF,          //!< loading a TrueTypeFont
-			    IMAGE };      //!< loading an image
+typedef enum ResourceType { 
+#ifndef NO_MODEL
+  OBJ,                  //!< loading .obj file
+  PRIM,                 //!< loading primitive model
+  MD2,                  //!< loading md2-file
+#endif /* NO_MODEL */
+#ifndef NO_AUDIO
+  WAV,                  //!< loading wav
+  MP3,                  //!< loading mp3
+  OGG,                  //!< loading ogg
+#endif /* NO_AUDIO */
+#ifndef NO_TEXT
+  TTF,                  //!< loading a TrueTypeFont
+#endif /* NO_TEXT */
+#ifndef NO_TEXTURES
+  IMAGE                 //!< loading an image
+#endif /* NO_TEXTURES */
+};
 
 //! An enumerator for different UNLOAD-types. 
@@ -52,10 +69,14 @@
 
   // more specific
+#ifndef NO_MODEL
   float             modelSize;         //!< the size of the model (OBJ/PRIM)
+  char*             skinFileName;      //!< skinFileName (MD2)
+#endif /* NO_MODEL */
+#ifndef NO_TEXT
   unsigned int      ttfSize;           //!< the size of the ttf-font (TTF)
   unsigned char     ttfColorR;         //!< red Color (TTF)
   unsigned char     ttfColorG;         //!< green Color (TTF)
   unsigned char     ttfColorB;         //!< blue Color (TTF)
-  char*             skinFileName;      //!< skinFileName (MD2)
+#endif /* NO_TEXT */
 };
 
