Index: trunk/src/lib/collision_reaction/collision_handle.cc
===================================================================
--- trunk/src/lib/collision_reaction/collision_handle.cc	(revision 8361)
+++ trunk/src/lib/collision_reaction/collision_handle.cc	(revision 8362)
@@ -24,4 +24,6 @@
 
 #include "cr_object_damage.h"
+
+#include "debug.h"
 
 using namespace std;
Index: trunk/src/lib/collision_reaction/cr_engine.cc
===================================================================
--- trunk/src/lib/collision_reaction/cr_engine.cc	(revision 8361)
+++ trunk/src/lib/collision_reaction/cr_engine.cc	(revision 8362)
@@ -24,4 +24,6 @@
 
 #include "cr_engine.h"
+
+#include "debug.h"
 
 using namespace std;
Index: trunk/src/lib/collision_reaction/cr_object_damage.cc
===================================================================
--- trunk/src/lib/collision_reaction/cr_object_damage.cc	(revision 8361)
+++ trunk/src/lib/collision_reaction/cr_object_damage.cc	(revision 8362)
@@ -23,4 +23,6 @@
 #include "world_entity.h"
 #include "cr_object_damage.h"
+
+#include "debug.h"
 
 using namespace std;
Index: trunk/src/lib/graphics/effects/fog_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/fog_effect.cc	(revision 8361)
+++ trunk/src/lib/graphics/effects/fog_effect.cc	(revision 8362)
@@ -17,6 +17,4 @@
 #include "util/loading/load_param.h"
 #include "util/loading/factory.h"
-
-#include "glincl.h"
 
 #include "shell_command.h"
Index: trunk/src/lib/graphics/effects/fog_effect.h
===================================================================
--- trunk/src/lib/graphics/effects/fog_effect.h	(revision 8361)
+++ trunk/src/lib/graphics/effects/fog_effect.h	(revision 8362)
@@ -9,4 +9,6 @@
 
 #include "weather_effect.h"
+#include "glincl.h"
+
 
 class FogEffect : public WeatherEffect
@@ -43,5 +45,5 @@
 		GLfloat				fogFadeDuration;
 		float				localTimer;
-		
+
 		GLint				fogMode;
 		GLfloat				fogDensity;
Index: trunk/src/lib/graphics/effects/lense_flare.cc
===================================================================
--- trunk/src/lib/graphics/effects/lense_flare.cc	(revision 8361)
+++ trunk/src/lib/graphics/effects/lense_flare.cc	(revision 8362)
@@ -22,5 +22,4 @@
 #include "util/loading/factory.h"
 
-#include "glincl.h"
 #include "texture.h"
 
Index: trunk/src/lib/graphics/effects/lense_flare.h
===================================================================
--- trunk/src/lib/graphics/effects/lense_flare.h	(revision 8361)
+++ trunk/src/lib/graphics/effects/lense_flare.h	(revision 8362)
@@ -13,4 +13,5 @@
 #include "vector2D.h"
 #include "plane.h"
+#include "glincl.h"
 
 
Index: trunk/src/lib/graphics/effects/volfog_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/volfog_effect.cc	(revision 8361)
+++ trunk/src/lib/graphics/effects/volfog_effect.cc	(revision 8362)
@@ -21,6 +21,4 @@
 #include "state.h"
 
-#include "glincl.h"
-//#include "shell_command.h"
 
 #define GLX_GLXEXT_PROTOTYPES
Index: trunk/src/lib/graphics/effects/volfog_effect.h
===================================================================
--- trunk/src/lib/graphics/effects/volfog_effect.h	(revision 8361)
+++ trunk/src/lib/graphics/effects/volfog_effect.h	(revision 8362)
@@ -9,4 +9,5 @@
 
 #include "weather_effect.h"
+#include "glincl.h"
 
 class VolFogEffect : public WeatherEffect
Index: trunk/src/lib/graphics/importer/material.cc
===================================================================
--- trunk/src/lib/graphics/importer/material.cc	(revision 8361)
+++ trunk/src/lib/graphics/importer/material.cc	(revision 8362)
@@ -21,4 +21,5 @@
 #include "texture.h"
 #include "debug.h"
+#include "compiler.h"
 #include "util/loading/resource_manager.h"
 
Index: trunk/src/lib/graphics/importer/static_model.cc
===================================================================
--- trunk/src/lib/graphics/importer/static_model.cc	(revision 8361)
+++ trunk/src/lib/graphics/importer/static_model.cc	(revision 8362)
@@ -20,5 +20,5 @@
 #include "static_model.h"
 
-#include "stdlibincl.h"
+#include "debug.h"
 #include <stdarg.h>
 
Index: trunk/src/lib/graphics/importer/vertex_array_model.cc
===================================================================
--- trunk/src/lib/graphics/importer/vertex_array_model.cc	(revision 8361)
+++ trunk/src/lib/graphics/importer/vertex_array_model.cc	(revision 8362)
@@ -18,6 +18,6 @@
 #include "vertex_array_model.h"
 
-#include "stdlibincl.h"
 #include <stdarg.h>
+#include "debug.h"
 
 #include "tc.h"
Index: trunk/src/lib/gui/gui_saveable.cc
===================================================================
--- trunk/src/lib/gui/gui_saveable.cc	(revision 8361)
+++ trunk/src/lib/gui/gui_saveable.cc	(revision 8362)
@@ -19,4 +19,6 @@
 #include "gui.h"
 #include "preferences.h"
+
+#include "debug.h"
 
 namespace OrxGui
Index: trunk/src/lib/gui/qt/gui_video.cc
===================================================================
--- trunk/src/lib/gui/qt/gui_video.cc	(revision 8361)
+++ trunk/src/lib/gui/qt/gui_video.cc	(revision 8362)
@@ -30,4 +30,6 @@
 #include "globals.h"
 #include "debug.h"
+
+#include "sdlincl.h"
 
 #include "qt_gui_elements.h"
Index: trunk/src/lib/lang/base_object.h
===================================================================
--- trunk/src/lib/lang/base_object.h	(revision 8361)
+++ trunk/src/lib/lang/base_object.h	(revision 8362)
@@ -11,8 +11,5 @@
 
 #include "class_id.h"
-#include "debug.h"
 #include <string>
-
-#include "stdincl.h"
 
 class TiXmlNode;
Index: trunk/src/lib/network/connection_monitor.h
===================================================================
--- trunk/src/lib/network/connection_monitor.h	(revision 8361)
+++ trunk/src/lib/network/connection_monitor.h	(revision 8362)
@@ -11,4 +11,5 @@
 
 #include <map>
+#include <list>
 
 #define N_PACKETS_FOR_PING 20
@@ -24,27 +25,27 @@
     void processUnzippedOutgoingPacket( int tick, byte * data, int length, int stateId );
     void processUnzippedIncomingPacket( int tick, byte * data, int length, int stateId, int ackedState );
-    
+
     void processZippedOutgoingPacket( int tick, byte * data, int length, int stateId );
     void processZippedIncomingPacket( int tick, byte * data, int length );
-    
+
     void calculatePing();
-    
+
     bool hasTimedOut();
-    
+
     void printStatis();
-    
+
   private:
     float calculateBandWidth( std::map<int,int> packetHistory, int tick );
-    
-    int userId;       //!< user's id 
+
+    int userId;       //!< user's id
 
     std::map<int,int>   sentStateTicks;
-    
+
     std::map<int,int>   incomingUnzippedPacketHistory;
     std::map<int,int>   outgoingUnzippedPacketHistory;
-    
+
     std::map<int,int>   incomingZippedPacketHistory;
     std::map<int,int>   outgoingZippedPacketHistory;
-    
+
     std::list<int>      ackDelay;
     int                 ping;
@@ -52,16 +53,16 @@
     float               incomingUnzippedBandWidth;
     float               outgoingUnzippedBandWidth;
-    
+
     float               incomingZippedBandWidth;
     float               outgoingZippedBandWidth;
-    
+
     int                 nIncomingPackets;
     int                 nOutgoingPackets;
-    
+
     int                 nZIncomingPackets;
     int                 nZOutgoingPackets;
-    
+
     int                 lastPacketTick;
-    
+
     int                 lastPrintTick;
   };
Index: trunk/src/lib/network/converter.cc
===================================================================
--- trunk/src/lib/network/converter.cc	(revision 8361)
+++ trunk/src/lib/network/converter.cc	(revision 8362)
@@ -23,5 +23,5 @@
 #include "converter.h"
 #include "shell_command.h"
-
+#include "debug.h"
 #include <limits>
 
@@ -489,5 +489,5 @@
   {
     PRINTF(1)("something went wrong length > remaining bytes in buffer\n" );
-    
+
     //TODO remove this
     for ( int i = -1000; i < 1001; i++ )
@@ -499,5 +499,5 @@
     }
     printf("\n");
-    
+
     s = "";
     return -1;
Index: trunk/src/lib/network/handshake.cc
===================================================================
--- trunk/src/lib/network/handshake.cc	(revision 8361)
+++ trunk/src/lib/network/handshake.cc	(revision 8362)
@@ -23,4 +23,5 @@
 
 #include <cassert>
+#include "debug.h"
 
 Handshake::Handshake( bool server, int clientId, int networkGameManagerId, int messageManagerId )
@@ -31,5 +32,5 @@
 
   this->setIsServer(server);
- 
+
   orxId_handler = registerVarId( new SynchronizeableInt( &localState.orxId, &remoteState.orxId, "orxonoxId", PERMISSION_ALL ) );
   version_handler = registerVarId( new SynchronizeableInt( &localState.version, &remoteState.version, "version", PERMISSION_ALL ) );
@@ -40,7 +41,7 @@
   error_handler = registerVarId( new SynchronizeableInt( &localState.error, &remoteState.error, "error", PERMISSION_ALL ) );
   errorString_handler = registerVarId( new SynchronizeableString( &localState.errorString, &remoteState.errorString, "errorString", PERMISSION_ALL ) );
-  
+
   candel_id = registerVarId( new SynchronizeableInt( &localState.canDel, &remoteState.canDel, "canDel", PERMISSION_ALL ) );
-  
+
   localState.completed = 0;
   localState.error = 0;
@@ -52,5 +53,5 @@
   localState.version = _ORXONOX_VERSION;
   localState.canDel = 0;
-  
+
   remoteState.completed = 0;
   remoteState.error = 0;
@@ -86,5 +87,5 @@
 
     }
-     
+
     if ( *it == version_handler )
     {
@@ -98,12 +99,12 @@
 
     }
-    
+
     if ( *it == candel_id )
     {
       PRINTF(0)("handshake finished candel changed\n");
     }
-    
+
   }
-  
+
   if (
       remoteState.orxId == _ORXONOX_ID &&
Index: trunk/src/lib/network/network_game_manager.cc
===================================================================
--- trunk/src/lib/network/network_game_manager.cc	(revision 8361)
+++ trunk/src/lib/network/network_game_manager.cc	(revision 8362)
@@ -39,4 +39,6 @@
 #include "network_game_manager.h"
 
+#include "debug.h"
+
 
 /* using namespace std is default, this needs to be here */
@@ -57,8 +59,8 @@
 
   this->setSynchronized(true);
-  
+
   MessageManager::getInstance()->registerMessageHandler( MSGID_DELETESYNCHRONIZEABLE, delSynchronizeableHandler, NULL );
   MessageManager::getInstance()->registerMessageHandler( MSGID_PREFEREDTEAM, preferedTeamHandler, NULL );
-  
+
   this->gameState = 0;
   registerVar( new SynchronizeableInt( &gameState, &gameState, "gameState" ) );
@@ -75,6 +77,6 @@
 /**
  * insert new player into game
- * @param userId 
- * @return 
+ * @param userId
+ * @return
  */
 bool NetworkGameManager::signalNewPlayer( int userId )
@@ -83,34 +85,34 @@
   assert( State::getGameRules() );
   assert( State::getGameRules()->isA( CL_NETWORK_GAME_RULES ) );
-  
+
   NetworkGameRules & rules = *(dynamic_cast<NetworkGameRules*>(State::getGameRules()));
-  
+
   int team = rules.getTeamForNewUser();
   ClassID playableClassId = rules.getPlayableClassId( userId, team );
   std::string playableModel = rules.getPlayableModelFileName( userId, team, playableClassId );
-  
+
   BaseObject * bo = Factory::fabricate( playableClassId );
-  
+
   assert( bo != NULL );
   assert( bo->isA( CL_PLAYABLE ) );
-  
+
   Playable & playable = *(dynamic_cast<Playable*>(bo));
-  
+
   playable.loadModel( playableModel );
   playable.setOwner( userId );
   playable.setUniqueID( SharedNetworkData::getInstance()->getNewUniqueID() );
   playable.setSynchronized( true );
-  
+
   PlayerStats * stats = rules.getNewPlayerStats( userId );
-  
+
   stats->setUniqueID( SharedNetworkData::getInstance()->getNewUniqueID() );
   stats->setSynchronized( true );
   stats->setOwner( getHostID() );
-  
+
   stats->setTeamId( team );
   stats->setPlayableClassId( playableClassId );
   stats->setPlayableUniqueId( playable.getUniqueID() );
   stats->setModelFileName( playableModel );
-  
+
   return true;
 }
@@ -119,6 +121,6 @@
 /**
  * remove player from game
- * @param userID 
- * @return 
+ * @param userID
+ * @return
  */
 bool NetworkGameManager::signalLeftPlayer(int userID)
@@ -130,5 +132,5 @@
     delete PlayerStats::getStats( userID );
   }
-  
+
   return true;
 }
@@ -138,9 +140,9 @@
 /**
  * handler for remove synchronizeable messages
- * @param messageId 
- * @param data 
- * @param dataLength 
- * @param someData 
- * @param userId 
+ * @param messageId
+ * @param data
+ * @param dataLength
+ * @param someData
+ * @param userId
  * @return true on successfull handling else handler will be called again
  */
@@ -152,8 +154,8 @@
     return true;
   }
-  
+
   int uniqueId = 0;
   int len = Converter::byteArrayToInt( data, &uniqueId );
-  
+
   if ( len != dataLength )
   {
@@ -161,7 +163,7 @@
     return true;
   }
-  
+
   const std::list<BaseObject*> * list = ClassList::getList( CL_SYNCHRONIZEABLE );
-  
+
   for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
   {
@@ -173,10 +175,10 @@
         return true;
       }
-      
+
       delete dynamic_cast<Synchronizeable*>(*it);
       return true;
     }
   }
-  
+
   return true;
 }
@@ -189,7 +191,7 @@
 {
   byte buf[INTSIZE];
-  
+
   assert( Converter::intToByteArray( uniqueId, buf, INTSIZE ) == INTSIZE );
-  
+
   MessageManager::getInstance()->sendMessage( MSGID_DELETESYNCHRONIZEABLE, buf, INTSIZE, RT_ALL_NOT_ME, 0, MP_HIGHBANDWIDTH );
 }
@@ -199,18 +201,18 @@
 /**
  * handler for MSGID_PREFEREDTEAM message
- * @param messageId 
- * @param data 
- * @param dataLength 
- * @param someData 
- * @param userId 
- * @return 
+ * @param messageId
+ * @param data
+ * @param dataLength
+ * @param someData
+ * @param userId
+ * @return
  */
 bool NetworkGameManager::preferedTeamHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId )
 {
   assert( NetworkGameManager::getInstance()->isServer() );
-  
+
   int teamId = 0;
   int len = Converter::byteArrayToInt( data, &teamId );
-  
+
   if ( len != dataLength )
   {
@@ -218,7 +220,7 @@
     return true;
   }
-  
+
   NetworkGameManager::getInstance()->setPreferedTeam( userId, teamId );
-  
+
   return true;
 }
@@ -228,7 +230,7 @@
   if ( !PlayerStats::getStats( userId ) )
     return;
-  
+
   PlayerStats & stats = *(PlayerStats::getStats( userId ));
-  
+
   stats.setPreferedTeamId( teamId );
 }
@@ -236,5 +238,5 @@
 /**
  * set prefered team for this host
- * @param teamId 
+ * @param teamId
  */
 void NetworkGameManager::prefereTeam( int teamId )
@@ -245,7 +247,7 @@
   {
     byte buf[INTSIZE];
-    
+
     assert( Converter::intToByteArray( teamId, buf, INTSIZE) == INTSIZE );
-    
+
     MessageManager::getInstance()->sendMessage( MSGID_PREFEREDTEAM, buf, INTSIZE, RT_USER, 0, MP_HIGHBANDWIDTH );
   }
Index: trunk/src/lib/network/player_stats.cc
===================================================================
--- trunk/src/lib/network/player_stats.cc	(revision 8361)
+++ trunk/src/lib/network/player_stats.cc	(revision 8362)
@@ -23,4 +23,6 @@
 #include "shared_network_data.h"
 
+#include "debug.h"
+
 
 CREATE_FACTORY(PlayerStats, CL_PLAYER_STATS);
@@ -32,5 +34,5 @@
 {
   init();
-  
+
   this->userId = userId;
 }
@@ -54,5 +56,5 @@
   this->playableClassId = 0;
   this->modelFileName = "";
-  
+
   userId_handle = registerVarId( new SynchronizeableInt( &userId, &userId, "userId" ) );
   teamId_handle = registerVarId( new SynchronizeableInt( &teamId, &teamId, "teamId" ) );
@@ -62,5 +64,5 @@
   playableUniqueId_handle = registerVarId( new SynchronizeableInt( &playableUniqueId, &playableUniqueId, "playableUniqueId" ) );
   modelFileName_handle = registerVarId( new SynchronizeableString( &modelFileName, &modelFileName, "modelFileName" ) );
-  
+
   PRINTF(0)("PlayerStats created\n");
 }
@@ -85,5 +87,5 @@
   {
     this->setPlayableUniqueId( this->playableUniqueId );
-    
+
     PRINTF(0)("uniqueID changed %d %d %d\n", userId, getHostID(), getUniqueID());
   }
@@ -98,10 +100,10 @@
 {
   const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYER_STATS );
-  
+
   if ( !list )
   {
     return NULL;
   }
-  
+
   for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
   {
@@ -111,5 +113,5 @@
     }
   }
-  
+
   return NULL;
 }
@@ -121,5 +123,5 @@
 {
   const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYABLE );
-  
+
   if ( !list )
   {
@@ -127,5 +129,5 @@
     return;
   }
-  
+
   this->playable = NULL;
   for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
@@ -139,10 +141,10 @@
     }
   }
-  
+
   if ( this->playable && userId == getHostID() )
   {
     State::getPlayer()->setPlayable( this->playable );
   }
-  
+
   this->playableUniqueId = uniqueId;
 }
@@ -156,11 +158,11 @@
   if ( playable )
     return playable;
-  
+
   assert( playableUniqueId > 0 );
-  
+
   setPlayableUniqueId( playableUniqueId );
-  
+
   assert( playable );
-  
+
   return playable;
 }
Index: trunk/src/lib/network/udp_server_socket.cc
===================================================================
--- trunk/src/lib/network/udp_server_socket.cc	(revision 8361)
+++ trunk/src/lib/network/udp_server_socket.cc	(revision 8362)
@@ -15,4 +15,5 @@
 
 #include "udp_server_socket.h"
+#include "debug.h"
 
 
@@ -20,20 +21,20 @@
 /**
  * constructor
- * @param port port to listen on 
+ * @param port port to listen on
  */
 UdpServerSocket::UdpServerSocket( int port ) : ServerSocket( port )
 {
   packet = SDLNet_AllocPacket( UDP_PACKET_SIZE );
-  
+
   if ( !packet )
   {
     PRINTF(1)("SDLNet_AllocPacket: %s\n", SDLNet_GetError());
-    
+
     assert( false );
     bOk = false;
   }
-  
+
   memset( packet->data, 0, UDP_PACKET_SIZE );
-  
+
   listen( port );
 }
@@ -46,8 +47,8 @@
   for ( int i = 0; i < (int)packetBuffer.size(); i++ )
     removeUserPackets( i );
-  
+
   if ( packet )
     SDLNet_FreePacket( packet );
-  
+
   if ( socket )
     SDLNet_UDP_Close( socket );
@@ -62,14 +63,14 @@
 {
   socket = SDLNet_UDP_Open( port );
-  
+
   PRINTF(0)("listening on port: %d\n", port);
-  
+
   if ( !socket )
   {
-    
+
     bOk = false;
     return false;
   }
-  
+
   return true;
 }
@@ -82,12 +83,12 @@
 {
   NetworkSocket * result = NULL;
-  
+
   if ( newSocketList.size() > 0 )
   {
     result = newSocketList.front();
-  
+
     newSocketList.pop_front();
   }
-  
+
   return result;
 }
@@ -98,11 +99,11 @@
 void UdpServerSocket::close( )
 {
-  
+
   for ( int i = 0; i < (int)packetBuffer.size(); i++ )
     removeUserPackets( i );
-  
+
   packetBuffer.clear();
   userList.clear();
-  
+
   SDLNet_UDP_Close( socket );
   socket = NULL;
@@ -117,5 +118,5 @@
   if ( userId >= (int)packetBuffer.size() )
     return;
-  
+
   for ( NetworkPacketList::iterator it = packetBuffer[userId].begin(); it!=packetBuffer[userId].end(); it++ )
   {
@@ -126,5 +127,5 @@
     }
   }
-  
+
   packetBuffer[userId].clear();
 }
@@ -140,5 +141,5 @@
   res.data = NULL;
   res.length = 0;
-  
+
   if ( (int)packetBuffer.size() > userId && (int)packetBuffer[userId].size() > 0 )
   {
@@ -146,9 +147,9 @@
     res.length = packetBuffer[userId].front().length;
     packetBuffer[userId].pop_front();
-    
+
     if ( res.length == 0 )
       res.length = -1;
   }
-  
+
   return res;
 }
@@ -163,10 +164,10 @@
   if ( userId >= (int)packetBuffer.size() )
     return -1;
-  
+
   return packetBuffer[userId].size();
 }
 
 /**
- * will set user state 
+ * will set user state
  * @param userId users id
  * @param ip users host / port
@@ -175,5 +176,5 @@
 {
   int channel = SDLNet_UDP_Bind( socket, userId, &ip );
-  if( channel != userId ) 
+  if( channel != userId )
   {
     PRINTF(1)("SDLNet_UDP_Bind: %s\n", SDLNet_GetError());
@@ -181,14 +182,14 @@
     return;
   }
-  
+
   if ( userId < (int)packetBuffer.size() )
     removeUserPackets( userId );
-  
+
   if ( (int)packetBuffer.size() <= userId )
     packetBuffer.resize( userId + 1 );
-  
+
   if ( (int)userList.size() <= userId )
     userList.resize( userId + 1 );
-  
+
   userList[ userId ] = ip;
 }
@@ -201,11 +202,11 @@
 {
   removeUserPackets( userId );
-  
+
   if ( userId >= (int)userList.size() )
     return;
-  
+
   userList[userId].host = 0;
   userList[userId].port = 0;
-  
+
   SDLNet_UDP_Unbind( socket, userId );
 }
@@ -220,9 +221,9 @@
 {
   assert( networkPacket.length <= UDP_PACKET_SIZE );
-  
+
   memcpy( packet->data, networkPacket.data, networkPacket.length );
   packet->len = networkPacket.length;
   packet->channel = -1;
-  
+
   if ( SDLNet_UDP_Send( socket, userId, packet ) == 0 )
   {
@@ -230,5 +231,5 @@
     return false;
   }
-  
+
   return true;
 }
@@ -241,20 +242,20 @@
   int res;
   int newConn = 0;
-  
+
   for ( res = SDLNet_UDP_Recv( socket, packet ); res == 1; res = SDLNet_UDP_Recv( socket, packet ) )
   {
     int userId;
     bool isNewConnection = false;
-    
+
     for ( userId =0; userId < (int)userList.size(); userId++ )
       if ( userList[userId].host == packet->address.host && userList[userId].port == packet->address.port )
         break;
-    
+
     if ( userId >= (int)userList.size() )
     {
-      
+
       newConn++;
       isNewConnection = true;
-      
+
       if ( newConn > MAX_NEW_CONNECTIONS )
       {
@@ -262,9 +263,9 @@
         continue;
       }
-      
+
       for ( userId =0; userId < (int)userList.size(); userId++ )
         if ( userList[userId].host == 0 && userList[userId].port == 0 )
           break;
-      
+
       initUser( userId, packet->address );
       UdpSocket * sock = new UdpSocket( this, packet->address, userId );
@@ -272,5 +273,5 @@
       PRINTF(0)("NEW CONNECTION %x\n", packet->address.host );
     }
-    
+
     //add new packet to packetbuffer
 
@@ -290,5 +291,5 @@
 
   }
-  
+
   assert( res == 0 );
 }
Index: trunk/src/lib/network/udp_socket.cc
===================================================================
--- trunk/src/lib/network/udp_socket.cc	(revision 8361)
+++ trunk/src/lib/network/udp_socket.cc	(revision 8362)
@@ -16,4 +16,5 @@
 #include "udp_socket.h"
 #include "udp_server_socket.h"
+#include "debug.h"
 
 
@@ -36,10 +37,10 @@
   init();
   this->packet = SDLNet_AllocPacket( UDP_PACKET_SIZE );
-  
+
   assert( this->packet );
-  
+
   memset( packet->data, 0, UDP_PACKET_SIZE );
   PRINTF(0)("PACKET DATA: %x\n", packet->data);
-  
+
   this->connectToServer( host, port );
 }
@@ -52,13 +53,13 @@
   this->init();
   this->packet = SDLNet_AllocPacket( UDP_PACKET_SIZE );
-  
+
   if ( !packet )
   {
     PRINTF(1)("SDLNet_AllocPacket: %s\n", SDLNet_GetError());
-    
+
     assert( false );
     bOk = false;
   }
-  
+
 }
 
@@ -82,5 +83,5 @@
 {
   this->disconnectServer();
-  
+
   if ( serverSocket )
     serverSocket->removeUser( userId );
@@ -88,5 +89,5 @@
   if ( this->packet )
     SDLNet_FreePacket( this->packet );
-  
+
   if ( socket )
     SDLNet_UDP_Close( socket );
@@ -101,9 +102,9 @@
 {
   assert( serverSocket == NULL );
-  
+
   IPaddress ip;
-  
+
   PRINTF(0)("connect to server %s on port %d\n", host.c_str(), port);
-  
+
   if ( SDLNet_ResolveHost( &ip, host.c_str(), port ) != 0 )
   {
@@ -112,5 +113,5 @@
     return;
   }
-  
+
   socket = SDLNet_UDP_Open(0);
   if ( !socket )
@@ -120,7 +121,7 @@
     return;
   }
-  
+
   int channel = SDLNet_UDP_Bind(socket, 1, &ip);
-  if ( channel == -1 ) 
+  if ( channel == -1 )
   {
     PRINTF(1)("SDLNet_UDP_Bind: %s\n", SDLNet_GetError());
@@ -167,8 +168,8 @@
   {
     assert( length <= packet->maxlen );
-    
+
     memcpy( packet->data, data, length );
     packet->len = length;
-    
+
     if ( socket && SDLNet_UDP_Send( socket, 1, packet) == 0 )
     {
@@ -177,5 +178,5 @@
       return false;
     }
-    
+
     return true;
   }
@@ -191,9 +192,9 @@
 {
   assert( maxLength <= UDP_PACKET_SIZE );
-  
+
   if ( serverSocket )
   {
     NetworkPacket networkPacket = serverSocket->getPacket( this->userId );
-    
+
     if ( networkPacket.length == -1 )
     {
@@ -201,12 +202,12 @@
       return 0;
     }
-    
+
     if ( networkPacket.length > 0 )
     {
       assert( maxLength > networkPacket.length );
-      
+
       memcpy( data, networkPacket.data, networkPacket.length );
     }
-    
+
     if ( networkPacket.data )
     {
@@ -214,5 +215,5 @@
       networkPacket.data = NULL;
     }
-    
+
     return networkPacket.length;
   }
@@ -220,8 +221,8 @@
   {
     int numrecv = SDLNet_UDP_Recv( socket, packet);
-    if ( numrecv > 0) 
+    if ( numrecv > 0)
     {
       assert( packet->len <= maxLength );
-      
+
       if ( packet->len == 0 )
       {
@@ -229,5 +230,5 @@
         return 0;
       }
-      
+
       memcpy( data, packet->data, packet->len );
       return packet->len;
@@ -244,5 +245,5 @@
     }
   }
-  
+
   return 0;
 }
Index: trunk/src/lib/network/zip.cc
===================================================================
--- trunk/src/lib/network/zip.cc	(revision 8361)
+++ trunk/src/lib/network/zip.cc	(revision 8362)
@@ -17,4 +17,5 @@
 
 #include "src/lib/util/loading/resource_manager.h"
+#include "debug.h"
 
 /**
@@ -54,7 +55,7 @@
   fileName = fileName + "/dicts/" + name;
   //PRINTF(0)("filename: %s\n", fileName.c_str());
-  
+
   FILE * f = fopen( fileName.c_str(), "r" );
-  
+
   if ( !f )
   {
@@ -62,29 +63,29 @@
     return false;
   }
-  
+
   byte buf[1024];
-  
+
   int nBytesRead = 0;
-  
+
   while ( !feof( f ) )
   {
     nBytesRead += fread( buf, 1, sizeof(buf), f );
   }
-  
+
   DictionaryEntry entry;
-  
+
   entry.dictLen = nBytesRead;
   entry.dict = new Byte[nBytesRead];
-  
+
   fseek( f, 0, SEEK_SET );
-  
+
   assert( fread( entry.dict, 1, nBytesRead, f ) == nBytesRead );
-  
+
   entry.adler = adler32( adler32( 0L, Z_NULL, 0 ), entry.dict, nBytesRead );
-  
+
   dicts.push_back( entry );
-  
+
   PRINTF(3)("Loaded dictionary '%s' with adler = %d\n", name.c_str(), entry.adler );
-  
+
   return true;
 }
@@ -106,5 +107,5 @@
     return -1;
   }
-  
+
   int res;
 
@@ -124,5 +125,5 @@
 
   res = deflateSetDictionary( &strm, (Bytef*)(dicts[dict].dict), dicts[dict].dictLen );
-	
+
   if ( res != Z_OK )
   {
@@ -139,5 +140,5 @@
 
   res = deflate( &strm, Z_FINISH );
-	
+
   if ( res != Z_STREAM_END )
   {
@@ -152,5 +153,5 @@
 
   res = deflateEnd( &strm );
-	
+
   if ( res != Z_OK )
   {
@@ -161,8 +162,8 @@
     else
       PRINTF(1)("deflateEnd error: dont know\n");
-    
-    return -1;
-  }
-  
+
+    return -1;
+  }
+
   return zippedlen;
 
@@ -181,5 +182,5 @@
   z_stream strm;
   int res = 0;
-  
+
   strm.zalloc = Z_NULL;
   strm.zfree = Z_NULL;
@@ -193,5 +194,5 @@
     return -1;
   }
-	
+
   strm.next_out = (Bytef*)to;
   strm.avail_out = maxLength;
@@ -202,7 +203,7 @@
 
   assert( inflate( &strm, Z_NO_FLUSH ) == Z_NEED_DICT );
-	
+
   int dictId = -1;
-  
+
   for ( int i = 0; i < dicts.size(); i++ )
   {
@@ -213,5 +214,5 @@
     }
   }
-  
+
   if ( dictId == -1 )
   {
@@ -219,7 +220,7 @@
     return -1;
   }
-      
+
   res = inflateSetDictionary( &strm, (Bytef*)dicts[dictId].dict, dicts[dictId].dictLen );
-	
+
   if ( res != Z_OK )
   {
@@ -230,5 +231,5 @@
 
   res = inflate( &strm, Z_FINISH );
-	
+
   if ( res != Z_STREAM_END )
   {
@@ -243,5 +244,5 @@
 
   res = inflateEnd( &strm );
-	
+
   if ( res != Z_OK )
   {
@@ -249,5 +250,5 @@
     return -1;
   }
-  
+
   return unzippedlen;
 }
Index: trunk/src/lib/script_engine/script.h
===================================================================
--- trunk/src/lib/script_engine/script.h	(revision 8361)
+++ trunk/src/lib/script_engine/script.h	(revision 8362)
@@ -5,4 +5,5 @@
 #include "base_object.h"
 
+#include <list>
 
 struct lua_State;
@@ -19,5 +20,5 @@
     Script(const TiXmlElement* root = NULL);
     ~Script();
-    
+
     /// LOADING
     void loadParams(const TiXmlElement* root);
@@ -26,5 +27,5 @@
     bool loadFile(const std::string& filename);
     void addObject(const std::string& className, const std::string& objectName);
-    
+
     /// QUERRYING
     /** @returns fileName */
@@ -33,5 +34,5 @@
 
 
-    
+
     /// EXECUTING
     // first select function
@@ -45,5 +46,5 @@
     // Execute the Function
     bool executeFunction();
-    
+
      // get returned values the last return value in lua is the first in c. TODO: change order of return
     int   getReturnedInt();
@@ -65,5 +66,5 @@
     int                     argumentCount;           //!< Number of arguments for the current function
     int                     returnCount;             //!< Number of return values of the current function
-    
+
     std::list<WorldObject>  registeredObjects;       //!< The list of all the objects and their type that have been registered with this script
 
Index: trunk/src/lib/shell/shell.cc
===================================================================
--- trunk/src/lib/shell/shell.cc	(revision 8361)
+++ trunk/src/lib/shell/shell.cc	(revision 8362)
@@ -26,4 +26,5 @@
 #include "material.h"
 #include "event_handler.h"
+#include "debug.h"
 
 namespace OrxShell
Index: trunk/src/lib/shell/shell_command_class.h
===================================================================
--- trunk/src/lib/shell/shell_command_class.h	(revision 8361)
+++ trunk/src/lib/shell/shell_command_class.h	(revision 8362)
@@ -9,4 +9,5 @@
 #include "base_object.h"
 #include <vector>
+#include <list>
 
 namespace OrxShell
Index: trunk/src/lib/sound/ogg_player.cc
===================================================================
--- trunk/src/lib/sound/ogg_player.cc	(revision 8361)
+++ trunk/src/lib/sound/ogg_player.cc	(revision 8362)
@@ -31,4 +31,5 @@
 
 #include "debug.h"
+#include "compiler.h"
 
 #ifdef HAVE_SDL_SDL_H
Index: trunk/src/lib/sound/sound_buffer.cc
===================================================================
--- trunk/src/lib/sound/sound_buffer.cc	(revision 8361)
+++ trunk/src/lib/sound/sound_buffer.cc	(revision 8362)
@@ -22,4 +22,6 @@
 #include "sdlincl.h"
 #include <cassert>
+#include "debug.h"
+
 #ifdef HAVE_SDL_SDL_H
 #include <SDL/SDL.h>
@@ -81,7 +83,7 @@
 		}
 #endif
-    alBufferData(this->bufferID, SoundBuffer::sdlAudioSpecToAlFormat(&wavSpec), 
+    alBufferData(this->bufferID, SoundBuffer::sdlAudioSpecToAlFormat(&wavSpec),
 			wavBuffer, wavLength, wavSpec.freq);
-			
+
     SDL_FreeWAV(wavBuffer);
     if (SoundEngine::checkError("Could not load Wave file", __LINE__))
Index: trunk/src/lib/sound/sound_source.cc
===================================================================
--- trunk/src/lib/sound/sound_source.cc	(revision 8361)
+++ trunk/src/lib/sound/sound_source.cc	(revision 8362)
@@ -21,4 +21,5 @@
 #include "alincl.h"
 #include "compiler.h"
+#include "debug.h"
 
 namespace OrxSound
Index: trunk/src/lib/util/executor/executor_xml.h
===================================================================
--- trunk/src/lib/util/executor/executor_xml.h	(revision 8361)
+++ trunk/src/lib/util/executor/executor_xml.h	(revision 8362)
@@ -9,4 +9,5 @@
 #include "executor.h"
 #include "compiler.h"
+#include "debug.h"
 
 #include "parser/tinyxml/tinyxml.h"
Index: trunk/src/lib/util/loading/dynamic_loader.cc
===================================================================
--- trunk/src/lib/util/loading/dynamic_loader.cc	(revision 8361)
+++ trunk/src/lib/util/loading/dynamic_loader.cc	(revision 8362)
@@ -17,4 +17,5 @@
 
 #include "dynamic_loader.h"
+#include "debug.h"
 
 #ifndef __WIN32__
Index: trunk/src/lib/util/loading/factory.cc
===================================================================
--- trunk/src/lib/util/loading/factory.cc	(revision 8361)
+++ trunk/src/lib/util/loading/factory.cc	(revision 8362)
@@ -16,5 +16,5 @@
 
 #include "util/loading/factory.h"
-
+#include "debug.h"
 //#include "shell_command.h"
 
Index: trunk/src/lib/util/loading/load_param_description.cc
===================================================================
--- trunk/src/lib/util/loading/load_param_description.cc	(revision 8361)
+++ trunk/src/lib/util/loading/load_param_description.cc	(revision 8362)
@@ -18,5 +18,6 @@
 #include "multi_type.h"
 #include <stdarg.h>
-#include "stdlibincl.h"
+#include "debug.h"
+
 /**
  * @param paramName the name of the parameter to load
Index: trunk/src/lib/util/preferences.cc
===================================================================
--- trunk/src/lib/util/preferences.cc	(revision 8361)
+++ trunk/src/lib/util/preferences.cc	(revision 8362)
@@ -18,4 +18,5 @@
 #include "preferences.h"
 #include "lib/parser/ini_parser/ini_parser.h"
+#include "debug.h"
 
 
Index: trunk/src/lib/util/preferences.h
===================================================================
--- trunk/src/lib/util/preferences.h	(revision 8361)
+++ trunk/src/lib/util/preferences.h	(revision 8362)
@@ -9,4 +9,5 @@
 #include "base_object.h"
 #include "multi_type.h"
+#include <list>
 
 // FORWARD DECLARATION
