Index: orxonox/branches/levelloader/src/defs/debug.h
===================================================================
--- orxonox/branches/levelloader/src/defs/debug.h	(revision 3542)
+++ orxonox/branches/levelloader/src/defs/debug.h	(revision 3605)
@@ -17,4 +17,8 @@
     \file debug.h
     \brief Handles output to console for different Verbose-Modes.
+
+    There are two main modes HARD and SOFT. HARD is precessed during compileTime where SOFT is for runtime.
+    \li HARD: One can choose between different modes. see: // DEFINE_MODULES \\
+    \li SOFT: If you want each module can have its own variable for processing. just pass it to DEBUG_MODULE_SOFT
 */ 
 
@@ -28,8 +32,5 @@
 #include <stdio.h>
 
-#ifndef DEBUG
-#define DEBUG 4
-#endif
-
+// DEFINE ERROR MODES
 #define NO              0
 #define ERR             1
@@ -37,25 +38,62 @@
 #define INFO            3
 #define DEBUGING        4
-
+#define vDEBUGING       5
+
+extern int verbose;
+
+//definitions
+#ifndef MODULAR_DEBUG
+#define HARD_DEBUG_LEVEL DEBUG
+#define SOFT_DEBUG_LEVEL verbose
+#else /* MODULAR_DEBUG */
+#ifndef DEBUG_MODULE_SOFT 
+#define SOFT_DEBUG_LEVEL verbose
+#else /* DEBUG_MODULE_SOFT */
+#define SOFT_DEBUG_LEVEL DEBUG_MODULE_SOFT
+#endif /* DEBUG_MODULE_SOFT */
+
+#ifndef DEBUG_SPECIAL_MODULE
+#define HARD_DEBUG_LEVEL DEBUG
+#else /* DEBUG_SPECIAL_MODULE */
+// DEFINE MODULES \\
+#define DEBUG_MODULE_ORXONOX            0
+#define DEBUG_MODULE_WORLD              0
+#define DEBUG_MODULE_PNODE              2
+#define DEBUG_MODULE_WORLD_ENTITY       0
+#define DEBUG_MODULE_COMMAND_NODE       0
+
+#define DEBUG_MODULE_IMPORTER           0
+#define DEBUG_MODULE_TRACK_MANAGER      0
+#define DEBUG_MODULE_LIGHT              3
+#define DEBUG_MODULE_PLAYER             0
+#define DEBUG_MODULE_MATH               0
+
+#define DEBUG_MODULE_NULL_PARENT        0
+
+
+#define HARD_DEBUG_LEVEL DEBUG_SPECIAL_MODULE
+#endif /* DEBUG_SPECIAL_MODULE */
+#endif /* MODULAR_DEBUG */
 ///////////////////////////////////////////////////
 /// PRINTF: prints with filename and linenumber ///
 ///////////////////////////////////////////////////
+
 #ifdef DEBUG
-extern int verbose;
+
 #define PRINTF(x) \
            PRINTF ## x
-           
-#if DEBUG >= ERR
+
+#if HARD_DEBUG_LEVEL >= ERR
 #define PRINTF1 \
-    if (verbose >= ERR) \
-      printf("%s:%d::ERROR:", __FILE__, __LINE__) && printf
+    if (SOFT_DEBUG_LEVEL >= ERR) \
+      printf("ERROR::%s:%d:", __FILE__, __LINE__) && printf
 #else 
 #define PRINTF1 if (NO)
 #endif
      
-#if DEBUG >= WARN
+#if HARD_DEBUG_LEVEL >= WARN
 #define PRINTF2 \
-     if (verbose >= WARN) \
-       printf("%s:%d::WARNING:", __FILE__, __LINE__) && printf
+     if (SOFT_DEBUG_LEVEL >= WARN) \
+       printf("WARNING::%s:%d:", __FILE__, __LINE__) && printf
          
 #else 
@@ -63,21 +101,28 @@
 #endif
      
-#if DEBUG >= INFO
+#if HARD_DEBUG_LEVEL >= INFO
 #define PRINTF3 \
-     if (verbose >= INFO) \
-       printf("%s:%d::INFO:", __FILE__, __LINE__) && printf
+     if (SOFT_DEBUG_LEVEL >= INFO) \
+       printf("INFO::%s:%d:", __FILE__, __LINE__) && printf
 #else 
 #define PRINTF3 if (NO)
 #endif
      
-#if DEBUG >= DEBUGING
+#if HARD_DEBUG_LEVEL >= DEBUGING
 #define PRINTF4 \
-     if (verbose >= DEBUGING) \
-       printf("%s:%d::DEBUG:", __FILE__, __LINE__) && printf
+     if (SOFT_DEBUG_LEVEL >= DEBUGING) \
+       printf("DEBUG::%s:%d:", __FILE__, __LINE__) && printf
 #else 
 #define PRINTF4 if (NO)
 #endif
      
-     
+#if HARD_DEBUG_LEVEL >= vDEBUGING
+#define PRINTF5 \
+     if (SOFT_DEBUG_LEVEL >= vDEBUGING) \
+       printf("VERYDEBUG::%s:%d:", __FILE__, __LINE__) && printf
+#else 
+#define PRINTF5 if (NO)
+#endif
+    
 #else  
 #define PRINTF(x) if (NO)
@@ -92,11 +137,10 @@
 ///////////////////////////////////////////////////
 #ifdef  DEBUG
-extern int verbose;
 #define PRINT(x) \
   PRINT ## x
-  
-#if DEBUG >= ERR
+
+#if HARD_DEBUG_LEVEL >= ERR
 #define PRINT1	\
-  if (verbose >= ERR)	\
+  if (SOFT_DEBUG_LEVEL >= ERR)	\
     printf
 #else 
@@ -104,7 +148,7 @@
 #endif
 
-#if DEBUG >= WARN
+#if HARD_DEBUG_LEVEL >= WARN
 #define PRINT2 \
-  if (verbose >= WARN) \
+  if (SOFT_DEBUG_LEVEL >= WARN) \
     printf
 
@@ -113,7 +157,7 @@
 #endif
 
-#if DEBUG >= INFO
+#if HARD_DEBUG_LEVEL >= INFO
 #define PRINT3 \
-  if (verbose >= INFO) \
+  if (SOFT_DEBUG_LEVEL >= INFO) \
     printf
 #else 
@@ -121,10 +165,18 @@
 #endif
 
-#if DEBUG >= DEBUGING
+#if HARD_DEBUG_LEVEL >= DEBUGING
 #define PRINT4 \
-  if (verbose >= DEBUGING) \
+  if (SOFT_DEBUG_LEVEL >= DEBUGING) \
     printf
 #else 
 #define PRINT4 if (NO)
+#endif
+
+#if HARD_DEBUG_LEVEL >= vDEBUGING
+#define PRINT5 \
+     if (SOFT_DEBUG_LEVEL >= vDEBUGING) \
+       printf("VERYDEBUG::%s:%d:", __FILE__, __LINE__) && printf
+#else 
+#define PRINT5 if (NO)
 #endif
 
@@ -144,7 +196,7 @@
            COUT ## x
 
-#if DEBUG >= 1
+#if HARD_DEBUG_LEVEL >= 1
 #define COUT1 \
-    if (verbose >= 1 ) \
+    if (SOFT_DEBUG_LEVEL >= 1 ) \
       cout
 #else 
@@ -152,7 +204,7 @@
 #endif
      
-#if DEBUG >= 2
+#if HARD_DEBUG_LEVEL >= 2
 #define COUT2 \
-     if (verbose >= 2 ) \
+     if (SOFT_DEBUG_LEVEL >= 2 ) \
        cout
 
@@ -161,7 +213,7 @@
 #endif
      
-#if DEBUG >= 3
+#if HARD_DEBUG_LEVEL >= 3
 #define COUT3 \
-     if (verbose >= 3 ) \
+     if (SOFT_DEBUG_LEVEL >= 3 ) \
        cout
 #else
@@ -169,7 +221,7 @@
 #endif
      
-#if DEBUG >= 4
+#if HARD_DEBUG_LEVEL >= 4
 #define COUT4 \
-     if (verbose >= 4 ) \
+     if (SOFT_DEBUG_LEVEL >= 4 ) \
        cout
 #else 
