Index: /orxonox/trunk/src/debug.h
===================================================================
--- /orxonox/trunk/src/debug.h	(revision 3205)
+++ /orxonox/trunk/src/debug.h	(revision 3206)
@@ -9,8 +9,7 @@
 #define PRINTF1 \
     if (verbose >= 1 ) \
-     printf ("%s:%d:", __FILE__, __LINE__); \
-     if (verbose >= 1) printf
+        printf
 #else 
-#define PRINTF1
+#define PRINTF1 //
 #endif
      
@@ -18,8 +17,8 @@
 #define PRINTF2 \
      if (verbose >= 2 ) \
-     printf ("%s:%d:", __FILE__, __LINE__); \
-     if (verbose >= 2) printf
+          printf
+         
 #else 
-#define PRINTF2
+#define PRINTF2 //
 #endif
      
@@ -27,8 +26,7 @@
 #define PRINTF3 \
      if (verbose >= 3 ) \
-     printf ("%s:%d:", __FILE__, __LINE__); \
-     if (verbose >= 3) printf
+        printf
 #else 
-#define PRINTF3
+#define PRINTF3 //
 #endif
      
@@ -36,15 +34,16 @@
 #define PRINTF4 \
      if (verbose >= 4 ) \
-     printf ("%s:%d:", __FILE__, __LINE__); \
-     if (verbose >= 4) printf
+         printf
 #else 
-#define PRINTF4
+#define PRINTF4 //
 #endif
      
      
 #else  
-#define PRINTF(x)
+#define PRINTF(x) //
 #endif
 
+#define PRINTF0 \
+    printf
 
 #endif /* _DEBUG_H */
Index: /orxonox/trunk/src/importer/array.cc
===================================================================
--- /orxonox/trunk/src/importer/array.cc	(revision 3205)
+++ /orxonox/trunk/src/importer/array.cc	(revision 3206)
@@ -30,6 +30,5 @@
 Array::~Array()
 {
-  if (verbose >= 2)
-    printf("deleting array\n");
+  PRINTF(2)("deleting array\n");
   Entry* walker = this->firstEntry;
   Entry* previous;
@@ -50,6 +49,5 @@
 void Array::initializeArray ()
 {
-  if (verbose >= 2)
-    printf ("crating new Array\n");
+  PRINTF(2)("crating new Array\n");
   this->firstEntry = new Entry;
   this->firstEntry->next =NULL;
@@ -66,9 +64,8 @@
 void Array::finalizeArray (void)
 {
-  if (verbose >= 3)
-    printf ("Finalizing array. Length: %i\n", entryCount);  
+  PRINTF(3)("Finalizing array. Length: %i\n", entryCount);  
   //  if ((array = (GLfloat*)malloc( entryCount* sizeof(GLfloat))) == NULL)
-  if ((this->array = new GLfloat [this->entryCount]) == NULL)
-    printf ("could not allocate %i data Blocks\n", this->entryCount);
+  if (!(this->array = new GLfloat [this->entryCount]))
+    PRINTF(1)("could not allocate %i data Blocks\n", this->entryCount);
   Entry* walker = this->firstEntry;
   for (int i=0; i<this->entryCount; i++)
@@ -90,6 +87,5 @@
   if (!this->finalized)
     {
-      if (verbose >= 3)
-	printf ("adding new Entry to Array: %f\n", entry);
+      PRINTF(3)("adding new Entry to Array: %f\n", entry);
       
       this->currentEntry->value = entry;
@@ -100,6 +96,5 @@
     }
   else 
-    if (verbose >= 1)
-      printf ("adding failed, because list has been finalized\n");
+    PRINTF(1)("adding failed, because list has been finalized\n");
 }
 
@@ -136,4 +131,4 @@
 void Array::debug ()
 {
-  printf ("entryCount=%i, address=%p\n", this->entryCount, this->array);
+  PRINTF(0)("entryCount=%i, address=%p\n", this->entryCount, this->array);
 }
Index: /orxonox/trunk/src/importer/framework.cc
===================================================================
--- /orxonox/trunk/src/importer/framework.cc	(revision 3205)
+++ /orxonox/trunk/src/importer/framework.cc	(revision 3206)
@@ -63,10 +63,10 @@
   {
     // If an error is found, display a message, kill the GL and SDL screens (if they were created) and exit
-    printf("Could not initalize OpenGL :(\n\n");
+    PRINTF(1)("Could not initalize OpenGL :(\n\n");
     wHandler.KillGLWindow();
     return 0;
   }
   
-  printf ("%i, %i\n", wHandler.screen->w, wHandler.screen->h);
+  PRINTF(2)("screensize: %i, %i\n", wHandler.screen->w, wHandler.screen->h);
   if (argc>=3)
     obj = new Object (argv[1], atof(argv[2]));
@@ -125,8 +125,7 @@
       switch (event.type) {
       case SDL_MOUSEMOTION:
-	if (verbose >=3)
-	  printf("Mouse motion about %d,%d Pixels to (%d,%d).\n", 
-		 event.motion.xrel, event.motion.yrel,
-		 event.motion.x, event.motion.y);
+	PRINTF(3)("Mouse motion about %d,%d Pixels to (%d,%d).\n", 
+		  event.motion.xrel, event.motion.yrel,
+		  event.motion.x, event.motion.y);
 	// TRACKBALL
 	if (mouse1Down)
Index: /orxonox/trunk/src/importer/material.cc
===================================================================
--- /orxonox/trunk/src/importer/material.cc	(revision 3205)
+++ /orxonox/trunk/src/importer/material.cc	(revision 3206)
@@ -77,6 +77,5 @@
   if (pName[0] == '\0')
     {
-      if (verbose >=3)
-	printf("not Adding empty Path to the List.\n");
+      PRINTF(3)("not Adding empty Path to the List.\n");
       return;
     }
@@ -91,6 +90,5 @@
       if (status.st_mode & S_IFDIR)
 	{
-	  if (verbose >=2)
-	    printf ("Adding Path %s to the PathList.\n", pName);
+	  PRINTF(2)("Adding Path %s to the PathList.\n", pName);
 	  PathList* tmpPathList = this;
 	  while (tmpPathList->next)
@@ -99,10 +97,8 @@
 	}
       else
-	if (verbose >=1)
-	  printf ("You tried to add non-folder %s to a PathList.\n", tmpPName);
+	PRINTF(2)("You tried to add non-folder %s to a PathList.\n", tmpPName);
     }
   else
-    if (verbose >=1)
-      printf ("You tried to add non-existing folder %s to a PathList.\n", tmpPName);
+      PRINTF(2)("You tried to add non-existing folder %s to a PathList.\n", tmpPName);
   delete []tmpPName;
 }
@@ -135,6 +131,5 @@
 Material::~Material()
 {
-  if (verbose >= 2)
-    printf ("delete Material %s.\n", this->name);
+  PRINTF(2)("delete Material %s.\n", this->name);
   if (this->name)
     delete []this->name;
@@ -152,6 +147,5 @@
 Material* Material::addMaterial(char* mtlName)
 {
-  if (verbose >=2)
-    printf ("adding Material %s.\n", mtlName);
+  PRINTF(2)("adding Material %s.\n", mtlName);
    Material* tmpMat = this;
   while (tmpMat->nextMat != NULL)
@@ -169,6 +163,5 @@
 void Material::init(void)
 {
-  if (verbose >= 3)
-    printf ("initializing new Material.\n");
+  PRINTF(2)("initializing new Material.\n");
   this->nextMat = NULL;
   this->name ="";
@@ -200,21 +193,17 @@
 Material* Material::search (char* mtlName)
 {
-  if (verbose >=3)
-    printf ("Searching for material %s", mtlName);
+  PRINTF(2)("Searching for material %s", mtlName);
   Material* searcher = this;
   while (searcher != NULL)
     {
-      if (verbose >= 3)
-	printf (".");
+      PRINTF(2)(".");
       if (!strcmp (searcher->getName(), mtlName))
 	{
-	  if (verbose >= 3)
-	    printf ("found.\n");
+	  PRINTF(2)("found.\n");
 	  return searcher;
 	}
       searcher = searcher->nextMat;
     }
-  if (verbose >=3)
-    printf ("not found\n");
+  PRINTF(2)("not found\n");
   return NULL;
 }
@@ -258,12 +247,9 @@
 void Material::setName (char* mtlName)
 {
+  PRINTF(3)("setting Material Name to %s.\n", this->name);
   this->name = new char [strlen(mtlName)+1];
   strcpy(this->name, mtlName);
-  if (verbose >= 3)
-    printf("setting Material Name to %s.\n", this->name);
-
-  //  printf ("adding new Material: %s, %p\n", this->getName(), this);
-
-}
+}
+
 /**
    \returns The Name of The Material
@@ -280,6 +266,5 @@
 void Material::setIllum (int illum)
 {
-  if (verbose >= 3)
-    printf("setting illumModel of Material %s to %i\n", this->name, illum);
+  PRINTF(3)("setting illumModel of Material %s to %i\n", this->name, illum);
   this->illumModel = illum;
   //  printf ("setting illumModel to: %i\n", illumModel);
@@ -301,6 +286,5 @@
 void Material::setDiffuse (float r, float g, float b)
 {
-  if (verbose >= 3)
-    printf ("setting Diffuse Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
+  PRINTF(3)("setting Diffuse Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
   this->diffuse[0] = r;
   this->diffuse[1] = g;
@@ -328,6 +312,5 @@
 void Material::setAmbient (float r, float g, float b)
 {
-  if (verbose >=3)
-    printf ("setting Ambient Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
+  PRINTF(3)("setting Ambient Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
   this->ambient[0] = r;
   this->ambient[1] = g;
@@ -354,6 +337,5 @@
 void Material::setSpecular (float r, float g, float b)
 {
-  if (verbose >= 3)
-    printf ("setting Specular Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
+  PRINTF(3)("setting Specular Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
   this->specular[0] = r;
   this->specular[1] = g;
@@ -395,6 +377,5 @@
 void Material::setTransparency (float trans)
 {
-  if (verbose >= 3)
-    printf ("setting Transparency of Material %s to %f.\n", this->name, trans);
+  PRINTF(3)("setting Transparency of Material %s to %f.\n", this->name, trans);
   this->transparency = trans;
 }
@@ -439,5 +420,4 @@
 	}
       strcat(tmpName, texName);
-      printf("%s\n", tmpName);
       if (access (tmpName, F_OK) == 0)
 	return tmpName;
@@ -460,6 +440,5 @@
 void Material::setDiffuseMap(char* dMap)
 {
-  if (verbose>=2)
-    printf ("setting Diffuse Map %s\n", dMap);
+  PRINTF(3)("setting Diffuse Map %s\n", dMap);
 
   //  diffuseTextureSet = loadBMP(dMap, &diffuseTexture);
@@ -507,6 +486,5 @@
 bool Material::loadTexToGL (Image* pImage, GLuint* texture)
 {
-  if (verbose >=3)
-    printf ("Loading texture to OpenGL-Environment.\n");
+  PRINTF(2)("Loading texture to OpenGL-Environment.\n");
   glGenTextures(1, texture);
   glBindTexture(GL_TEXTURE_2D, *texture);
@@ -534,5 +512,5 @@
       if(!map)
 	{
-	  printf("IMG_Load: %s\n", IMG_GetError());
+	  PRINTF(1)("IMG_Load: %s\n", IMG_GetError());
 	  return false;
 	}
@@ -551,6 +529,5 @@
   else
     {
-      if (verbose >=1)
-	printf ("Image not Found: %s\n", imgNameWithPath);
+      PRINTF(1)("Image not Found: %s\n", imgNameWithPath);
       return false;
     }
@@ -571,6 +548,5 @@
       if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".bmp", 4))
 	{
-	  if (verbose >=2)
-	    printf ("Requested bmp-image. Trying to Import.\n");
+	  PRINTF(3)("Requested bmp-image. Trying to Import.\n");
 	  return this->loadBMP(imgNameWithPath, texture);
 	}
@@ -578,24 +554,20 @@
       else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".jpg", 4) || !strncmp(imgNameWithPath+strlen(imgNameWithPath)-5, ".jpg", 5))
 	{
-	  if (verbose >=2)
-	    printf ("Requested jpeg-image. Trying to Import\n");
+	  PRINTF(3)("Requested jpeg-image. Trying to Import\n");
 	  return this->loadJPG(imgNameWithPath, texture);
 	}
       else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".tga", 4))
 	{
-	  if (verbose >=2)
-	    printf ("Requested tga-image. Trying to Import\n");
+	  PRINTF(3)("Requested tga-image. Trying to Import\n");
 	  return this->loadTGA(imgNameWithPath, texture);
 	}
       else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".png", 4))
 	{
-	  if (verbose >=2)
-	    printf ("Requested png-image. Trying to Import\n");
+	  PRINTF(3)("Requested png-image. Trying to Import\n");
 	  return this->loadPNG(imgNameWithPath, texture);
 	}
       else
 	{
-	  if (verbose >=1)
-	    printf ("Requested Image was not recognized in its type. (Maybe a type-Cast-error.)\n FileName: %s", imgNameWithPath);
+	  PRINTF(1)("Requested Image was not recognized in its type. (Maybe a type-Cast-error.)\n FileName: %s", imgNameWithPath);
 	  return false;
 	}
@@ -603,6 +575,5 @@
   else
     {
-      if (verbose >=1)
-	printf ("Image not Found: %s\n", imgNameWithPath);
+      PRINTF(1)("Image not Found: %s\n", imgNameWithPath);
       return false;
     }
@@ -627,6 +598,5 @@
   if ((file = fopen(bmpName, "rb"))==NULL)
     {
-      if (verbose >=1)
-	printf("File Not Found : %s\n",bmpName);
+      PRINTF(1)("File Not Found : %s\n",bmpName);
       return false;
     }
@@ -637,6 +607,5 @@
   if ((i = fread(&pImage->width, 4, 1, file)) != 1) 
     {
-      if (verbose >=1)
-	printf("Error reading width from %s.\n", bmpName);
+      PRINTF(1)("Error reading width from %s.\n", bmpName);
       return false;
     }
@@ -644,6 +613,5 @@
   if ((i = fread(&pImage->height, 4, 1, file)) != 1) 
     {
-      if (verbose>=1)
-	printf("Error reading height from %s.\n", bmpName);
+      PRINTF(1)("Error reading height from %s.\n", bmpName);
       return false;
     }
@@ -655,12 +623,10 @@
   if ((fread(&planes, 2, 1, file)) != 1) 
     {
-      if (verbose>=1)
-	printf("Error reading planes from %s.\n", bmpName);
+      PRINTF(1)("Error reading planes from %s.\n", bmpName);
       return false;
     }
   if (planes != 1) 
     {
-      if (verbose>=1)
-	printf("Planes from %s is not 1: %u\n", bmpName, planes);
+      PRINTF(1)("Planes from %s is not 1: %u\n", bmpName, planes);
       return false;
     }
@@ -669,12 +635,10 @@
   if ((i = fread(&bpp, 2, 1, file)) != 1) 
     {
-      if (verbose>=1)
-	printf("Error reading bpp from %s.\n", bmpName);
+      PRINTF(1)("Error reading bpp from %s.\n", bmpName);
       return false;
     }
   if (bpp != 24) 
     {
-      if (verbose>=1)
-	printf("Bpp from %s is not 24: %u\n", bmpName, bpp);
+      PRINTF(1)("Bpp from %s is not 24: %u\n", bmpName, bpp);
       return false;
     }
@@ -687,6 +651,5 @@
   if (pImage->data == NULL) 
     {
-      if (verbose>=1)
-	printf("Error allocating memory for color-corrected image data");
+      PRINTF(1)("Error allocating memory for color-corrected image data");
       return false;	
     }
@@ -694,6 +657,5 @@
   if ((i = fread(pImage->data, size, 1, file)) != 1) 
     {
-      if (verbose>=1)
-	printf("Error reading image data from %s.\n", bmpName);
+      PRINTF(1)("Error reading image data from %s.\n", bmpName);
       return false;
     }
@@ -739,5 +701,5 @@
     {
       // Display an error message saying the file was not found, then return NULL
-      printf("Unable to load JPG File %s.\n", jpgName);
+      PRINTF(1)("Unable to load JPG File %s.\n", jpgName);
       return false;
     }
@@ -817,6 +779,5 @@
   return true;
 #else /* HAVE_JPEGLIB_H */
-  if (verbose >=1)
-    printf ("sorry, but you did not compile with jpeg-support.\nEither install SDL_image or jpeglib, and recompile to see the image\n");
+  PRINTF(1)("sorry, but you did not compile with jpeg-support.\nEither install SDL_image or jpeglib, and recompile to see the image\n");
   return false;
 #endif /* HAVE_JPEGLIB_H */
@@ -844,5 +805,5 @@
   if(fTGA == NULL)
     {
-      printf("Error could not open texture file: %s\n", tgaName);
+      PRINTF(1)("Error could not open texture file: %s\n", tgaName);
       return false;
     }
@@ -850,5 +811,5 @@
   if(fread(&tgaHeader, sizeof(TGAHeader), 1, fTGA) == 0)
     {
-      printf("Error could not read file header of %s\n", tgaName);
+      PRINTF(1)("Error could not read file header of %s\n", tgaName);
       if(fTGA != NULL)
 	{
@@ -872,5 +833,5 @@
   else
     {
-      printf("Error TGA file be type 2 or type 10\n");
+      PRINTF(1)("Error TGA file be type 2 or type 10\n");
       if (fTGA)
 	fclose(fTGA);
@@ -901,5 +862,5 @@
   if(fread(header, sizeof(header), 1, fTGA) == 0)
     {
-      printf("Error could not read info header\n");
+      PRINTF(1)("Error could not read info header\n");
       return false;
     }
@@ -911,5 +872,5 @@
   if((pImage->width <= 0) || (pImage->height <= 0) || ((pImage->bpp != 24) && (pImage->bpp !=32)))
     {
-      printf("Error invalid texture information\n");
+      PRINTF(1)("Error invalid texture information\n");
       return false;
     }
@@ -930,5 +891,5 @@
   if(pImage->data == NULL)
     {
-      printf("Error could not allocate memory for image\n");
+      PRINTF(1)("Error could not allocate memory for image\n");
       return false;
     }
@@ -936,5 +897,5 @@
   if(fread(pImage->data, 1, imageSize, fTGA) != imageSize)
     {
-      printf("Error could not read image data\n");
+      PRINTF(1)("Error could not read image data\n");
       if(pImage->data != NULL)
 	{
@@ -977,5 +938,5 @@
   if(fread(header, sizeof(header), 1, fTGA) == 0)
     {
-      printf("Error could not read info header\n");
+      PRINTF(1)("Error could not read info header\n");
       return false;
     }
@@ -993,5 +954,5 @@
   if((pImage->width <= 0) || (pImage->height <= 0) || ((pImage->bpp != 24) && (pImage->bpp !=32)))
     {
-      printf("Error Invalid pImage information\n");
+      PRINTF(1)("Error Invalid pImage information\n");
       return false;
     }
@@ -1003,5 +964,5 @@
   if(pImage->data == NULL)
     {
-      printf("Error could not allocate memory for image\n");
+      PRINTF(1)("Error could not allocate memory for image\n");
       return false;
     }
@@ -1013,5 +974,5 @@
       if(fread(&chunkheader, sizeof(GLubyte), 1, fTGA) == 0)
 	{
-	  printf("Error could not read RLE header\n");
+	  PRINTF(1)("Error could not read RLE header\n");
 	  if(pImage->data != NULL)
 	    {
@@ -1031,5 +992,5 @@
 	      if(fread(colorbuffer, 1, bytesPerPixel, fTGA) != bytesPerPixel)
 		{
-		  printf("Error could not read image data\n");
+		  PRINTF(1)("Error could not read image data\n");
 		  if(colorbuffer != NULL)
 		    {
@@ -1061,5 +1022,5 @@
 	      if(currentpixel > pixelcount)	
 		{
-		  printf("Error too many pixels read\n");
+		  PRINTF(1)("Error too many pixels read\n");
 		  if(colorbuffer != NULL)
 		    {
@@ -1083,5 +1044,5 @@
 	  if(fread(colorbuffer, 1, bytesPerPixel, fTGA) != bytesPerPixel) // Attempt to read following color values 
 	    {
-	      printf("Error could not read from file");
+	      PRINTF(1)("Error could not read from file");
 	      if(colorbuffer != NULL)
 		{
@@ -1114,5 +1075,5 @@
 	      if(currentpixel > pixelcount)
 		{
-		  printf("Error too many pixels read\n");
+		  PRINTF(1)("Error too many pixels read\n");
 		  if(colorbuffer != NULL)
 		    {
@@ -1167,6 +1128,5 @@
   if (png_sig_cmp(PNG_header, 0, 8) != 0)
     {
-      if (verbose >=2)
-	printf ("Not Recognized as a pngFile\n");
+      PRINTF(2)("Not Recognized as a pngFile\n");
       fclose (PNG_file);
       return 0;
@@ -1274,6 +1234,5 @@
   return true;
 #else /* HAVE_PNG_H */
-  if (verbose >=1)
-    printf ("sorry, but you did not compile with png-support.\nEither install SDL_image or libpng, and recompile to see the image\n");
+  PRINTF(1)("sorry, but you did not compile with png-support.\nEither install SDL_image or libpng, and recompile to see the image\n");
   return false;
 #endif /* HAVE_PNG_H */
Index: /orxonox/trunk/src/importer/object.cc
===================================================================
--- /orxonox/trunk/src/importer/object.cc	(revision 3205)
+++ /orxonox/trunk/src/importer/object.cc	(revision 3206)
@@ -74,6 +74,5 @@
 Object::~Object()
 {
-  if (verbose >= 2)
-    printf ("Deleting display Lists.\n");
+  PRINTF(2)("Deleting display Lists.\n");
   Group* walker = this->firstGroup;
   while (walker != NULL)
@@ -92,6 +91,5 @@
     delete []this->mtlFileName;
 
-  if (verbose >=2)
-    printf("Deleting Materials.\n");
+  PRINTF(2)("Deleting Materials.\n");
   if (this->material)
     delete this->material;
