Index: trunk/src/lib/collision_detection/cd_engine.cc
===================================================================
--- trunk/src/lib/collision_detection/cd_engine.cc	(revision 10551)
+++ trunk/src/lib/collision_detection/cd_engine.cc	(revision 10618)
@@ -22,5 +22,5 @@
 #include "model.h"
 #include "world_entity.h"
-#include "terrain.h"
+#include "environments/terrain.h"
 // #include "player.h"
 
@@ -30,5 +30,5 @@
 
 #include "bsp/bsp_manager.h"
-#include "bsp_entity.h"
+#include "environments/bsp_entity.h"
 
 
Index: trunk/src/lib/collision_detection/obb_tree_node.cc
===================================================================
--- trunk/src/lib/collision_detection/obb_tree_node.cc	(revision 10551)
+++ trunk/src/lib/collision_detection/obb_tree_node.cc	(revision 10618)
@@ -629,4 +629,5 @@
     PRINTF(5)("s = %f, rA+rB = %f\n", fabs(t.dot(l)), rA+rB);
 
+    //TODO valgrind complains about uninitialised value here
     if( (rA + rB) < fabs(t.dot(l)))
     {
Index: trunk/src/lib/collision_reaction/cr_engine.h
===================================================================
--- trunk/src/lib/collision_reaction/cr_engine.h	(revision 10551)
+++ trunk/src/lib/collision_reaction/cr_engine.h	(revision 10618)
@@ -62,4 +62,5 @@
       CR_COLLISION_TYPE_AXIS_Z,            //!< collision on z axis
       CR_COLLISION_TYPE_AXIS_Z_NEG,        //!< collision on negative z axis
+      CR_COLLISION_TYPE_WAY,		   //!< collision on the way from last to current position
       CR_COLLISION_TYPE_OBB,               //!< object aligned bounding box collide
 
Index: trunk/src/lib/collision_reaction/cr_physics_full_walk.cc
===================================================================
--- trunk/src/lib/collision_reaction/cr_physics_full_walk.cc	(revision 10551)
+++ trunk/src/lib/collision_reaction/cr_physics_full_walk.cc	(revision 10618)
@@ -163,4 +163,30 @@
 
 
+ case CoRe::CREngine::CR_COLLISION_TYPE_WAY:
+          // calulate the height above ground
+          height = collPos.len() - box->halfLength[1];
+
+
+          // object is beneath the plane (ground)
+          //         if(height >= 0.0f && height <= 0.0001f) break ;// Do nothing
+          if( height < 0.0f  )
+          {
+            entity->shiftCoor(Vector(0.0f, -height + 0.5f, 0.0f));
+            entity->setOnGround(true);
+          }
+          // object is already in the wall
+          else if( ce->isInWall())
+          {
+            entity->setAbsCoor(entity->getLastAbsCoor());
+            PRINTF(0)("ground collision: reset pos\n");
+          }
+          else
+          {
+            // entity is not on ground
+            entity->setOnGround(false);
+          }
+          break;
+
+
           /* collision in the Z-AXIS */
         case CoRe::CREngine::CR_COLLISION_TYPE_AXIS_Z:
Index: trunk/src/lib/event/key_mapper.cc
===================================================================
--- trunk/src/lib/event/key_mapper.cc	(revision 10551)
+++ trunk/src/lib/event/key_mapper.cc	(revision 10618)
@@ -23,5 +23,5 @@
 #include "event_def.h"
 
-#include "globals.h"
+#include "orxonox_globals.h"
 #include "parser/ini_parser/ini_parser.h"
 #include "parser/preferences/preferences.h"
Index: trunk/src/lib/graphics/Makefile.am
===================================================================
--- trunk/src/lib/graphics/Makefile.am	(revision 10551)
+++ trunk/src/lib/graphics/Makefile.am	(revision 10618)
@@ -25,4 +25,5 @@
 
 noinst_HEADERS =\
+		glincl.h \
  		graphics_engine.h \
  		graphics_effect.h \
@@ -46,4 +47,5 @@
 
 
+
 SUBDIRS = 	importer \
           	spatial_separation
Index: trunk/src/lib/graphics/glincl.h
===================================================================
--- trunk/src/lib/graphics/glincl.h	(revision 10618)
+++ trunk/src/lib/graphics/glincl.h	(revision 10618)
@@ -0,0 +1,21 @@
+/*!
+  \file glincl.h
+  \brief This file includes gl Headers.
+
+  no Class is defined here, but the opengl Headers
+*/
+
+#ifndef _GLINCL_H
+#define _GLINCL_H
+
+#ifndef __APPLE__
+#include <GL/glew.h>
+#include <GL/gl.h>
+#include <GL/glu.h>
+#else
+#include <GL/glew.h>
+#include <OpenGL/gl.h>
+#include <OpenGL/glu.h>
+#endif
+
+#endif /* _GLINCL_H */
Index: trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- trunk/src/lib/graphics/graphics_engine.cc	(revision 10551)
+++ trunk/src/lib/graphics/graphics_engine.cc	(revision 10618)
@@ -31,5 +31,5 @@
 #include "text.h"
 
-#include "globals.h"
+#include "orxonox_globals.h"
 #include "texture.h"
 
Index: trunk/src/lib/graphics/importer/bsp/bsp_manager.cc
===================================================================
--- trunk/src/lib/graphics/importer/bsp/bsp_manager.cc	(revision 10551)
+++ trunk/src/lib/graphics/importer/bsp/bsp_manager.cc	(revision 10618)
@@ -30,5 +30,5 @@
 #include "debug.h"
 #include "material.h"
-#include "camera.h"
+#include "tools/camera.h"
 #include "vertex_array_model.h"
 #include "world_entities/player.h"
@@ -982,6 +982,5 @@
   float endDistance = end->dot(node->plane) - node->d;
   float startDistance = start->dot(node->plane) - node->d;
-
-
+  
   if( node->isLeaf) {
     leaf& curLeaf = this->bspFile->leaves[node->leafIndex];
@@ -999,5 +998,5 @@
   }
 
-
+  //TODO valgrind complains about uninitialised value here
   if (startDistance >= 0 && endDistance >= 0)     // A
   {   // both points are in front of the plane
@@ -1102,8 +1101,9 @@
   this->outputFraction = 1.0f;
 
-
   this->checkCollisionX(worldEntity);
-  this->checkCollisionY(worldEntity);
   this->checkCollisionZ(worldEntity);
+
+  if(!(this->checkCollisionY(worldEntity)))
+  this->checkCollisionWay(worldEntity);
 
 
@@ -1288,5 +1288,5 @@
  * check the collision in the x direction (forward, backward)
  */
-void BspManager::checkCollisionX(WorldEntity* entity)
+bool BspManager::checkCollisionX(WorldEntity* entity)
 {
   // Retrieve Bounding box
@@ -1398,4 +1398,6 @@
                               SolidFlag);
   }
+
+ return (xCollisionBackward || xCollisionForward);
 }
 
@@ -1404,5 +1406,5 @@
  * check the collision in the z direction (up, down)
  */
-void BspManager::checkCollisionY(WorldEntity* entity)
+bool BspManager::checkCollisionY(WorldEntity* entity)
 {
 
@@ -1546,4 +1548,6 @@
                               collPos, SolidFlag);
   }
+
+ return (yCollisionUp || yCollisionDown);
 }
 
@@ -1554,5 +1558,5 @@
  * check the collision in the z direction (left, right)
  */
-void BspManager::checkCollisionZ(WorldEntity* entity)
+bool BspManager::checkCollisionZ(WorldEntity* entity)
 {
   // Retrieve Bounding box
@@ -1664,4 +1668,90 @@
                                collPos , SolidFlag);
   }
+
+ return (zCollisionLeft || zCollisionRight);
+
+}
+
+
+
+
+/**
+ * check wether a collision occured on the way from the last position to the current position
+ */
+bool BspManager::checkCollisionWay(WorldEntity* entity)
+{
+
+
+  
+  plane*            testPlane          = NULL;  //!< the collision test plane
+  Vector 	    to;
+  Vector            collPos;                    //!< the collision position
+
+  bool              yCollisionUp       = false; //!< flag true if right collision
+  bool              SolidFlag          = false; //!< flag set true if solid
+
+  Vector            from;                   //!< current position of the entity
+  Vector            dirY;                       //!< direction x
+
+  from = entity->getLastAbsCoor();
+  to 	= entity->getAbsCoor();
+  collPos = from;
+  dirY =  Vector(0.0, 1.0, 0.0);
+
+
+
+
+  /*   Y Ray up */
+  // init some member variables before collision check
+  this->inputStart = from;
+  this->inputEnd   = to;
+  this->checkCollisionRayN(this->root,0.0f,1.0f, &from, &to );
+
+  if( !this->outputStartsOut )
+  {
+    this->collPlane = new plane;
+    this->collPlane->x = 0.0f;
+    this->collPlane->y = 0.0f;
+    this->collPlane->z = 0.0f;
+    yCollisionUp = true;
+  }
+  else
+  {
+    if( this->outputFraction == 1.0f)
+    {
+      if( this->outputAllSolid )
+      {
+        this->collPlane = new plane;
+        this->collPlane->x = 0.0f;
+        this->collPlane->y = 0.0f;
+        this->collPlane->z = 0.0f;
+        yCollisionUp = true;
+        SolidFlag = true;
+      }
+      else
+      {
+        yCollisionUp = false;
+        collPos = to;
+      }
+    }
+    else
+    {
+      yCollisionUp = true;
+      collPos = from + (to - from) * this->outputFraction;
+      this->out = collPos;        // why this????
+    }
+  }
+  testPlane = this->collPlane;
+
+  // collision registration
+  if( yCollisionUp)
+  {
+    CoRe::CollisionTube::getInstance()->registerCollisionEvent( CoRe::CREngine::CR_COLLISION_TYPE_WAY,
+                              entity, this->parent,
+                              Vector(testPlane->x, testPlane->y, testPlane->z),
+                              collPos, SolidFlag);
+  }
+
+ return yCollisionUp;
 
 }
Index: trunk/src/lib/graphics/importer/bsp/bsp_manager.h
===================================================================
--- trunk/src/lib/graphics/importer/bsp/bsp_manager.h	(revision 10551)
+++ trunk/src/lib/graphics/importer/bsp/bsp_manager.h	(revision 10618)
@@ -88,7 +88,8 @@
   void  checkCollisionRayN(BspTreeNode * node,float startFraction, float endFraction, Vector* start, Vector* end);
 
-  void checkCollisionX(WorldEntity* entity);
-  void checkCollisionY(WorldEntity* entity);
-  void checkCollisionZ(WorldEntity* entity);
+  bool checkCollisionX(WorldEntity* entity);
+  bool checkCollisionY(WorldEntity* entity);
+  bool checkCollisionZ(WorldEntity* entity);
+  bool checkCollisionWay(WorldEntity* entity);
 
   void  checkCollisionBox(void);
Index: trunk/src/lib/graphics/light.h
===================================================================
--- trunk/src/lib/graphics/light.h	(revision 10551)
+++ trunk/src/lib/graphics/light.h	(revision 10618)
@@ -102,5 +102,6 @@
   void setAmbientColor(GLfloat r, GLfloat g, GLfloat b);
   // HACK: Assuming r = g = b values
-inline GLfloat getAmbientColor() {  return this->ambientColor[0]; }
+  // SOLVED: nobody uses it anyway
+  // inline GLfloat getAmbientColor() {  return this->ambientColor[0]; }
 
   Light* getLight(int lightNumber) const;
Index: trunk/src/lib/graphics/render2D/element_2d.cc
===================================================================
--- trunk/src/lib/graphics/render2D/element_2d.cc	(revision 10551)
+++ trunk/src/lib/graphics/render2D/element_2d.cc	(revision 10618)
@@ -24,5 +24,5 @@
 #include "state.h"
 #include "p_node.h"
-#include "camera.h"
+#include "tools/camera.h"
 ///////////////////////////
 
Index: trunk/src/lib/gui/qt/gui_audio.cc
===================================================================
--- trunk/src/lib/gui/qt/gui_audio.cc	(revision 10551)
+++ trunk/src/lib/gui/qt/gui_audio.cc	(revision 10618)
@@ -30,5 +30,5 @@
 #include <QtGui/QLCDNumber>
 #include "debug.h"
-#include "globals.h"
+#include "orxonox_globals.h"
 
 #include "qt_gui_elements.h"
Index: trunk/src/lib/gui/qt/gui_control.cc
===================================================================
--- trunk/src/lib/gui/qt/gui_control.cc	(revision 10551)
+++ trunk/src/lib/gui/qt/gui_control.cc	(revision 10618)
@@ -35,5 +35,5 @@
 #include "lib/event/key_names.h"
 
-#include "globals.h"
+#include "orxonox_globals.h"
 #include "debug.h"
 #include "qt_gui_elements.h"
Index: trunk/src/lib/gui/qt/gui_general.cc
===================================================================
--- trunk/src/lib/gui/qt/gui_general.cc	(revision 10551)
+++ trunk/src/lib/gui/qt/gui_general.cc	(revision 10618)
@@ -31,5 +31,5 @@
 
 #include "debug.h"
-#include "globals.h"
+#include "orxonox_globals.h"
 
 #include "qt_gui_elements.h"
Index: trunk/src/lib/gui/qt/gui_video.cc
===================================================================
--- trunk/src/lib/gui/qt/gui_video.cc	(revision 10551)
+++ trunk/src/lib/gui/qt/gui_video.cc	(revision 10618)
@@ -28,5 +28,5 @@
 
 #include <QtGui/QLayout>
-#include "globals.h"
+#include "orxonox_globals.h"
 #include "debug.h"
 
Index: trunk/src/lib/math/curve.h
===================================================================
--- trunk/src/lib/math/curve.h	(revision 10551)
+++ trunk/src/lib/math/curve.h	(revision 10618)
@@ -10,9 +10,7 @@
 #define _CURVE_H
 
+#include <list>
 #include "vector.h"
 #include "quaternion.h"
-
-template<class T> class tList;
-template<class T> class tIterator;
 
 //! An Enumerator that defines what sort of Curves are availible
@@ -73,6 +71,5 @@
   Curve*                dirCurve;        //!< The derivation-curve of this Curve.
 
-  tList<PathNode>*      nodeList;        //!< A list of all the Nodes of a Curve.
-  tIterator<PathNode>*  nodeIterator;    //!< An iterator that should point to the current Node
+  std::list<PathNode>   nodeList;        //!< A list of all the Nodes of a Curve.
   PathNode*             firstNode;       //!< First node of the curve.
   PathNode*             currentNode;     //!< The node we are working with (the Last node).
@@ -105,13 +102,3 @@
 
 
-//! B-Spline
-/**
-   class to handle b-spline in 3d space
-*/
-class BSplieCurve : public Curve
-{
-
-
-};
-
 #endif /* _CURVE_H */
Index: trunk/src/lib/physics/physics_interface.cc
===================================================================
--- trunk/src/lib/physics/physics_interface.cc	(revision 10551)
+++ trunk/src/lib/physics/physics_interface.cc	(revision 10618)
@@ -27,5 +27,4 @@
 
 #include "string.h"
-#include "stdincl.h"
 
 
Index: trunk/src/lib/script_engine/Makefile.am
===================================================================
--- trunk/src/lib/script_engine/Makefile.am	(revision 10551)
+++ trunk/src/lib/script_engine/Makefile.am	(revision 10618)
@@ -28,23 +28,2 @@
 		script_method.h \
 		executor_lua_state.h
-
-
-
-
-check_PROGRAMS = example
-example_DEPENDENCIES = \
-                $(MAINSRCDIR)/world_entities/libORXwe.a \
-                $(libORXlibs_a_LIBRARIES_) \
-                $(MAINSRCDIR)/util/libORXutils.a
-example_LDADD = \
-                $(MAINSRCDIR)/util/libORXutils.a \
-                $(libORXlibs_a_LIBRARIES_) \
-                libORXscript.a -L../../../extern_libs @LUA_LIBS@ \
-                $(MAINSRCDIR)/world_entities/libORXwe.a \
-                $(libORXlibs_a_LIBRARIES_) \
-                $(MAINSRCDIR)/util/libORXutils.a
-
-example_SOURCES= \
-                example.cc \
-                \
-                ../util/executor/executor_lua.cc
Index: trunk/src/lib/script_engine/account.cc
===================================================================
--- trunk/src/lib/script_engine/account.cc	(revision 10551)
+++ 	(revision )
@@ -1,35 +1,0 @@
-
-
-
-#include <iostream>
-
-#include "luaincl.h"
-#include "base_object.h"
-#include "lunar.h"
-
-#include "script_class.h"
-
-
-class Account : public BaseObject
-{
-  lua_Number m_balance;
-public:
-  Account(lua_State *L)      { m_balance = luaL_checknumber(L, 1); }
-  Account(double balance=0)    : m_balance(balance) { this->setClassID(CL_ACCOUNT, "Account"); }
-
-  void deposit (float value) { m_balance += value; };
-  void withdraw(float value) { m_balance -= value; };
-  float balance() { return m_balance; };
-
-  int deposit (lua_State *L) { m_balance += luaL_checknumber(L, 1); return 0; }
-  int withdraw(lua_State *L) { m_balance -= luaL_checknumber(L, 1); return 0; }
-  int balance (lua_State *L) { lua_pushnumber(L, m_balance); return 1; }
-  ~Account() { printf("deleted Account (%p)\n", this); }
-};
-
-
-
-CREATE_SCRIPTABLE_CLASS(Account, CL_ACCOUNT,
-                        addMethod("deposit", ExecutorLua1<Account, float>(&Account::deposit))
-                        ->addMethod("withdraw", ExecutorLua1<Account, float>(&Account::withdraw))
-                        ->addMethod("balance", ExecutorLua0ret<Account, float>(&Account::balance)));
Index: trunk/src/lib/script_engine/example.cc
===================================================================
--- trunk/src/lib/script_engine/example.cc	(revision 10551)
+++ 	(revision )
@@ -1,148 +1,0 @@
-
-#include <iostream>
-
-#include "luaincl.h"
-#include "lunar.h"
-#include "script.h"
-
-// create classdummys for the scripts
-CREATE_SCRIPTABLE_CLASS(Account, CL_ACCOUNT)
-CREATE_SCRIPTABLE_CLASS(Object, CL_TEST_OBJECT)
-
-    class Account : public BaseObject {
-      lua_Number m_balance;
-    public:
-      static const char className[];
-      static Lunar<Account>::RegType methods[];
-
-      Account(lua_State *L)      { m_balance = luaL_checknumber(L, 1); }
-      Account(double balance=0)    : m_balance(balance) { }
-
-      void deposit (float value) { m_balance += value; };
-      void withdraw(float value) { m_balance -= value; };
-      float balance() { return m_balance; };
-
-      int deposit (lua_State *L) { m_balance += luaL_checknumber(L, 1); return 0; }
-      int withdraw(lua_State *L) { m_balance -= luaL_checknumber(L, 1); return 0; }
-      int balance (lua_State *L) { lua_pushnumber(L, m_balance); return 1; }
-      ~Account() { printf("deleted Account (%p)\n", this); }
-    };
-
-    const char Account::className[] = "Account";
-
-    Lunar<Account>::RegType Account::methods[] = {
-      {"deposit", new ExecutorLua1<Account, float>(&Account::deposit)},
-      {"withdraw", new ExecutorLua1<Account, float>(&Account::withdraw)},
-      {"balance", new ExecutorLua0ret<Account, float>(&Account::balance)},
-      {0,NULL}
-    };
-
-
-    class Object : public BaseObject {
-      public:
-        static const char className[];
-        static Lunar<Object>::RegType methods[];
-
-        Object(lua_State* L) {callCount = 0; }
-        Object(){callCount = 0;};
-        ~Object() { printf("deleted Object (%p)\n", this); }
-
-        //meber functions
-        void takeParam(int i)
-        {
-         printf("Lua passed %i to c++\n",i);
-        }
-
-        int printName(lua_State* L)
-        {
-          this->printName();
-          return 0;
-        }
-
-        void printName()
-        {
-          callCount ++;
-          printf("Hi i'm object %p ! This is the %i. call.\n",this,callCount);
-        }
-
-        int getCallCount(){ return callCount; }
-
-      private:
-        int callCount;
-
-    };
-
-    const char Object::className[] = "Object";
-
-    Lunar<Object>::RegType Object::methods[] = {
-      {"printName", new ExecutorLua0<Object>(&Object::printName)},
-      {"getCallCount", new ExecutorLua0ret<Object, int>(&Object::getCallCount)},
-      {"takeParam", new ExecutorLua1<Object, int>(&Object::takeParam)},
-      {0,0}
-    };
-
-    int main(int argc, char *argv[])
-    {
-      std::string file("lunartest2.lua");
-     // Script script;
-      Script* script = ScriptManager::getInstance()->getScriptByFile(file);
-      printf("-------------------------- top of the stack:%i\n",lua_gettop(script->getLuaState()));
-
-      // Register classes with the script
-      // Lunar<Account>::Register(&script);
-      //Lunar<Object>::Register(&script);
-
-      //Object* obj= new Object();
-      //Account a;
-      //Account *b = new Account(30);
-
-      // Add instances to the script
-      //Lunar<Object>::insertObject(&script,obj,"Obj",true);
-      //Lunar<Account>::insertObject(&script,&a,"a",false);
-      //Lunar<Account>::insertObject(&script,b,"b",true);
-       //printf("-------------------------- top of the stack:%i\n",lua_gettop(script.getLuaState()));
-
-      //Load a file
-      //std::string file("lunartest2.lua");
-
-      //if(script.loadFile(file))
-        //printf("File %s succefully loaded\n", file.c_str());
-      //printf("-------------------------- top of the stack:%i\n",lua_gettop(script.getLuaState()));
-
-      //execute a function
-      printf("----------- main -----------\n");
-      std::string main("main");
-      if( script->selectFunction(main,3))
-       printf("function %s selected\n",main.c_str());
-
-      script->pushParam(3.14159,main);
-      script->executeFunction();
-
-      float retf = script->getReturnedFloat();
-      printf("main returned %f\n",retf);
-
-
-      if(script->getReturnedBool())
-       printf("main returned true\n");
-      else
-       printf("main returned false\n");
-
-      int ret = script->getReturnedInt();
-      printf("main returned %i\n",ret);
-
-      //printf("-------------------------- top of the stack:%i\n",lua_gettop(script.getLuaState()));
-      //execute a 2nd function
-      printf("----------- test -----------\n");
-      std::string test("test");
-      if( script->selectFunction(test,0))
-       printf("function %s selected\n",test.c_str());
-
-      script->executeFunction();
-
-
-      //if(argc>1) lua_dofile(script.getLuaState(), argv[1]);
-      printf("-------------------------- top of the stack:%i\n",lua_gettop(script->getLuaState()));
-
-      return 0;
-    }
-
Index: trunk/src/lib/script_engine/lunartest2.lua
===================================================================
--- trunk/src/lib/script_engine/lunartest2.lua	(revision 10551)
+++ 	(revision )
@@ -1,58 +1,0 @@
-function printf(...) io.write(string.format(unpack(arg))) end
-
-function Account:show()
-  printf("Account balance = $%0.02f\n", self:balance())
-end
-
-parent = {}
-
-function parent:rob(amount)
-  amount = amount or self:balance()
-  self:withdraw(amount)
-  return amount
-end
-
-getmetatable(Account).__index = parent
-
-
-function test()
-io.write("Hi i'm test\n")
-end
-
-
-function main(arg)
-  io.write("hello i am main!\n")
-  -- use parameter
-  io.write("main received ", arg)
-  io.write(" as parameter\n")
-
- 
-  --call member of an inserted object
-  Obj:printName()
-
-  --create object of a registered type
-  o = Object()
-  o:printName()
-
-  --take returnvalue from c
-  callCount = Obj:getCallCount()
-  io.write("callCount is now ",callCount)
-  io.write("\n")
-
-  --pass parameters to a c++ method
-  Obj:takeParam(3)
-
-  --print object information
-  print('a =', a)
-  print('b =', b)
-  print('metatable =', getmetatable(a))
-  print('Account =', Account)
-  table.foreach(Account, print)
-
-  a:show() a:deposit(50.30) a:show() a:withdraw(25.10) a:show()
-  Obj:printName()
-
-  return 2,false,2.72
-
-  --debug.debug()
-end
Index: trunk/src/lib/script_engine/object.cc
===================================================================
--- trunk/src/lib/script_engine/object.cc	(revision 10551)
+++ 	(revision )
@@ -1,46 +1,0 @@
-
-#include <iostream>
-
-#include "base_object.h"
-#include "lunar.h"
-
-#include "script_class.h"
-
-
-class Object : public BaseObject
-{
-public:
-  Object(lua_State* L) {callCount = 0; }
-  Object(){callCount = 0;this->setClassID(CL_TEST_OBJECT, "Object");};
-  ~Object() { printf("deleted Object (%p)\n", this); }
-
-  //meber functions
-  void takeParam(int i)
-  {
-    printf("Lua passed %i to c++\n",i);
-  }
-
-  int printName(lua_State* L)
-  {
-    this->printName();
-    return 0;
-  }
-
-  void printName()
-  {
-    callCount ++;
-    printf("Hi i'm object %p ! This is the %i. call.\n",this,callCount);
-  }
-
-  int getCallCount(){ return callCount; }
-
-private:
-  int callCount;
-
-};
-
-
-CREATE_SCRIPTABLE_CLASS(Object, CL_TEST_OBJECT,
-                        addMethod("printName", ExecutorLua0<Object>(&Object::printName))
-                        ->addMethod("getCallCount", ExecutorLua0ret<Object, int>(&Object::getCallCount))
-                        ->addMethod("takeParam", ExecutorLua1<Object, int>(&Object::takeParam)));
Index: trunk/src/lib/script_engine/script_manager.cc
===================================================================
--- trunk/src/lib/script_engine/script_manager.cc	(revision 10551)
+++ trunk/src/lib/script_engine/script_manager.cc	(revision 10618)
@@ -25,5 +25,5 @@
 
 #include "script.h"
-#include "script_trigger.h"
+#include "tools/script_trigger.h"
 #include "luaincl.h"
 #include "loading/load_param_xml.h"
Index: trunk/src/lib/shell/shell_input.cc
===================================================================
--- trunk/src/lib/shell/shell_input.cc	(revision 10551)
+++ trunk/src/lib/shell/shell_input.cc	(revision 10618)
@@ -24,4 +24,7 @@
 #include "compiler.h"
 #include "key_names.h"
+
+#include "game_world.h"
+#include "state.h"
 
 
@@ -284,5 +287,13 @@
   {
     if (this->delayed > 0.0)
-      this->delayed -= dt;
+    {
+      StoryEntity* storyEntity = State::getCurrentStoryEntity();
+      float speed = 1;
+      if ( storyEntity && storyEntity->isA( GameWorld::staticClassID() ) )
+      {
+        speed = ((GameWorld*)storyEntity)->getSpeed();
+      }
+      this->delayed -= dt / speed;
+    }
     else if (this->pressedKey != SDLK_FIRST )
     {
Index: trunk/src/lib/sound/Makefile.am
===================================================================
--- trunk/src/lib/sound/Makefile.am	(revision 10551)
+++ trunk/src/lib/sound/Makefile.am	(revision 10618)
@@ -11,8 +11,10 @@
                         ogg_player.cc
 
-noinst_HEADERS = sound_engine.h \
-		 sound_source.h \
-		 sound_buffer.h \
-		 sound_buffer_data.h \
-		 resource_sound_buffer.h \
-                 ogg_player.h
+noinst_HEADERS = \
+		alincl.h \
+		sound_engine.h \
+		sound_source.h \
+		sound_buffer.h \
+		sound_buffer_data.h \
+		resource_sound_buffer.h \
+                ogg_player.h
Index: trunk/src/lib/sound/alincl.h
===================================================================
--- trunk/src/lib/sound/alincl.h	(revision 10618)
+++ trunk/src/lib/sound/alincl.h	(revision 10618)
@@ -0,0 +1,17 @@
+/*!
+ * This file includes openAL-Headers.
+ * @file alincl.h
+*/
+
+#ifndef _ALINCL_H
+#define _ALINCL_H
+
+#ifdef __APPLE__
+#include <OpenAL/al.h>
+#include <OpenAL/alc.h>
+#else
+#include <AL/al.h>
+#include <AL/alc.h>
+#endif
+
+#endif /* _ALINCL_H */
Index: trunk/src/lib/sound/ogg_player.cc
===================================================================
--- trunk/src/lib/sound/ogg_player.cc	(revision 10551)
+++ trunk/src/lib/sound/ogg_player.cc	(revision 10618)
@@ -79,5 +79,5 @@
   bool OggPlayer::open(const std::string& fileName)
   {
-    OrxThread::MutexLock musicLock(&this->musicMutex);
+    OrxThread::MutexLocker musicLock(&this->musicMutex);
     // release old Ogg-File (if loaded)
     if (this->state & OggPlayer::FileOpened)
@@ -212,5 +212,5 @@
     if (this->state & OggPlayer::FileOpened)
     {
-      OrxThread::MutexLock musicLock(&this->musicMutex);
+      OrxThread::MutexLocker musicLock(&this->musicMutex);
       ov_time_seek(&this->oggStream, timeCode);
     }
@@ -263,5 +263,5 @@
     {
       {
-        OrxThread::MutexLock musicLock(&ogg->musicMutex);
+        OrxThread::MutexLocker musicLock(&ogg->musicMutex);
         ogg->update();
       }
@@ -286,5 +286,5 @@
     this->state |= OggPlayer::Playing;
 
-    OrxThread::MutexLock musicLock(&this->musicMutex);
+    OrxThread::MutexLocker musicLock(&this->musicMutex);
     if(!this->stream(this->buffers[0]) || !this->stream(this->buffers[1]))
     {
Index: trunk/src/lib/sound/ogg_player.h
===================================================================
--- trunk/src/lib/sound/ogg_player.h	(revision 10551)
+++ trunk/src/lib/sound/ogg_player.h	(revision 10618)
@@ -13,5 +13,5 @@
 #include <ogg/ogg.h>
 #include <vorbis/vorbisfile.h>
-#include "util/threading.h"
+#include "util/threads/mutex_locker.h"
 
 struct File;
Index: trunk/src/lib/sound/sound_engine.cc
===================================================================
--- trunk/src/lib/sound/sound_engine.cc	(revision 10551)
+++ trunk/src/lib/sound/sound_engine.cc	(revision 10618)
@@ -24,5 +24,5 @@
 #include "debug.h"
 #include "parser/preferences/preferences.h"
-#include "globals.h"
+#include "orxonox_globals.h"
 #include "resource_sound_buffer.h"
 
Index: trunk/src/lib/sound/sound_engine.h
===================================================================
--- trunk/src/lib/sound/sound_engine.h	(revision 10551)
+++ trunk/src/lib/sound/sound_engine.h	(revision 10618)
@@ -15,5 +15,5 @@
 #include <list>
 #include <stack>
-#include "threading.h"
+#include "threads/mutex.h"
 
 #define SOUND_DOPPLER_FACTOR       0.001          //!< A factor for the audible doppler effect
Index: trunk/src/lib/util/Makefile.am
===================================================================
--- trunk/src/lib/util/Makefile.am	(revision 10551)
+++ trunk/src/lib/util/Makefile.am	(revision 10618)
@@ -29,5 +29,5 @@
 		filesys/net_link.cc \
 		\
-		threading.cc \
+		threads/thread.cc \
 		timer.cc
 
@@ -63,5 +63,9 @@
 		filesys/net_link.h \
 		\
-		threading.h \
+		threads/threading.h \
+		threads/thread.h \
+		threads/mutex.h \
+		threads/mutex_locker.h \
+		\
 		timer.h \
 		\
@@ -77,4 +81,3 @@
 		loading/dynamic_loader.h \
 		\
-		count_pointer.h \
-		list.h
+		count_pointer.h
Index: trunk/src/lib/util/debug_buffer.cc
===================================================================
--- trunk/src/lib/util/debug_buffer.cc	(revision 10551)
+++ trunk/src/lib/util/debug_buffer.cc	(revision 10618)
@@ -20,5 +20,5 @@
 #include "debug.h"
 #include "compiler.h"
-#include "threading.h"
+#include "threads/mutex_locker.h"
 
 /**
@@ -64,5 +64,5 @@
   static OrxThread::Mutex DebugBuffer__bufferMutex;
 
-  OrxThread::MutexLock bufferLock(&DebugBuffer__bufferMutex);
+  OrxThread::MutexLocker bufferLock(&DebugBuffer__bufferMutex);
 
   va_list arguments;
Index: trunk/src/lib/util/filesys/net_link.cc
===================================================================
--- trunk/src/lib/util/filesys/net_link.cc	(revision 10551)
+++ trunk/src/lib/util/filesys/net_link.cc	(revision 10618)
@@ -17,4 +17,5 @@
 #include "debug.h"
 
+#include "threads/mutex_locker.h"
 
 #ifdef __OSX__
@@ -45,5 +46,5 @@
 int NetLink::openupInBrowser(void* url)
 {
-  OrxThread::MutexLock lock(&NetLink::_mutex);
+  OrxThread::MutexLocker lock(&NetLink::_mutex);
 
   std::string URL = *(std::string*)url;
@@ -69,5 +70,5 @@
 void NetLink::setDefaultBrowser(const std::string& browserName)
 {
-  OrxThread::MutexLock lock(&NetLink::_mutex);
+  OrxThread::MutexLocker lock(&NetLink::_mutex);
   NetLink::_defaultBrowser = browserName;
 }
Index: trunk/src/lib/util/filesys/net_link.h
===================================================================
--- trunk/src/lib/util/filesys/net_link.h	(revision 10551)
+++ trunk/src/lib/util/filesys/net_link.h	(revision 10618)
@@ -19,5 +19,5 @@
 #include <list>
 
-#include "threading.h"
+#include "threads/mutex.h"
 
 //! NetLink is a File and Link executer for Internet Links
Index: trunk/src/lib/util/list.h
===================================================================
--- trunk/src/lib/util/list.h	(revision 10551)
+++ 	(revision )
@@ -1,647 +1,0 @@
-/*!
- * @file list.h
- * a File that includes a List-template
- */
-
-#ifndef _T_LIST_H
-#define _T_LIST_H
-
-#include "compiler.h"
-#ifndef NULL
-#define NULL 0                                       //!< this will define NULL
-#endif
-
-template<class T> class tIterator;
-
-//! a list element of the tList,
-template<class T> struct listElement
-{
-  listElement*        prev;                          //!< pointer to the previous listElement in the list
-  T*                  curr;                          //!< pointer to the list payload/container
-  listElement*        next;                          //!< pointer to the next listElement
-};
-
-/**
- *  the list template class
-
-   you will use this as a generic list for all type of objects
- */
-template<class T> class tList
-{
-  friend class tIterator<T>;
-
-  public:
-    tList ();
-    ~tList ();
-
-    void add(T* entity);
-    void addAtBeginning(T* entity); //!< @todo This should be made with an ENUM
-    void addAtIteratorPosition(T* entity, tIterator<T>* itereator);
-    void remove(const T* entity);
-    void removeFromLast(const T* entity);
-    void removeLast();
-    void flush();
-    T* firstElement() const;
-    T* lastElement() const;
-    bool isEmpty() const;
-    unsigned int getSize() const;
-    bool inList(T* entity) const;
-    tIterator<T>* getIterator() const;
-    T* nextElement(T* toEntity);
-    T* toArray();
-
-  private:
-    unsigned int       size;             //!< the size (lenght) of the list
-    listElement<T>*    first;            //!< pointer to the first element
-    listElement<T>*    last;             //!< pointer to the last element
-    listElement<T>*    currentEl;        //!< pointer to the current element
-};
-
-
-/**
- *  the constructor
- */
-template<class T>
-    inline tList<T>::tList ()
-{
-  this->currentEl = NULL;
-  this->first = NULL;
-  this->last = NULL;
-  this->size = 0;
-}
-
-
-/**
- *  the deconstructor
-
-   this will delete only the list. ATTENTION: the list is deleted, but the objects in the list will remain
- */
-template<class T>
-    inline tList<T>::~tList ()
-{
-  this->currentEl = this->first;
-  listElement<T>* le;
-  while(this->currentEl != NULL)
-  {
-    le = this->currentEl->next;
-    delete this->currentEl;
-    this->currentEl = le;
-  }
-  this->first = NULL;
-  this->last = NULL;
-  this->currentEl = NULL;
-  this->size = 0;
-}
-
-
-/**
- *  add an entity to the list
- * @param entity: the entity to add
- */
-template<class T>
-    inline void tList<T>::add(T* entity)
-{
-  if( unlikely(entity == NULL)) return;
-  listElement<T>* el = new listElement<T>;
-  el->prev = this->last;
-  el->curr = entity;
-  el->next = NULL;
-
-  this->last = el;
-
-  if( unlikely(el->prev == NULL)) this->first = el; /* if first element */
-  else el->prev->next = el;
-  this->size++;
-}
-
-/**
- *  add an entity to the list
- * @param entity: the entity to add
- */
-template<class T>
-    inline void tList<T>::addAtBeginning(T* entity)
-{
-  if( unlikely(entity == NULL)) return;
-
-  listElement<T>* el = new listElement<T>;
-  el->next = this->first;
-  el->curr = entity;
-  el->prev = NULL;
-
-  this->first = el;
-
-  if( unlikely(el->next == NULL)) this->last = el; /* if first element */
-  else el->next->prev = el;
-  this->size++;
-}
-
-/**
- * add an entity at an iterators position
- * @param entity the entity to add
- * @param iterator the iterator get the Positional from
- *
- * this works best with an iterator walking with
- * firstElement() ; nextStep();
- * or
- * lastElement(); prevStep();
- */
-template<class T>
-    inline void tList<T>::addAtIteratorPosition(T* entity, tIterator<T>* iterator)
-{
-  // rule out unusable
-  if (unlikely(entity == NULL))
-    return;
-  // on any error (or next == NULL) add using default add-function
-  if (unlikely(iterator == NULL || iterator->getList() == NULL) ||
-      iterator->tmpEl == NULL || iterator->tmpEl->next == NULL)
-    return this->add(entity);
-  // on prev == NULL add with addAtBeginning-function
-  if (unlikely(iterator->tmpEl->prev == NULL))
-    return addAtBeginning(entity);
-  else
-  {
-    listElement<T>* el = new listElement<T>;
-    el->next = iterator->tmpEl->next;
-    el->curr = entity;
-    el->prev = iterator->tmpEl->prev;
-
-    el->next->prev = el;
-    el->prev->next = el;
-  }
-}
-
-/**
- * remove an entity from the list
- * @param entity: the entity to be removed
- */
-template<class T>
-    inline void tList<T>::remove(const T* entity)
-{
-  this->currentEl = this->first;
-  while( this->currentEl != NULL)
-  {
-    if( unlikely(this->currentEl->curr == entity))
-    {
-      // erstes element?
-      if( unlikely(this->currentEl->prev == NULL)) this->first = this->currentEl->next;
-      else this->currentEl->prev->next = this->currentEl->next;
-
-      // letztes element?
-      if( unlikely(this->currentEl->next == NULL)) this->last = this->currentEl->prev;
-      else this->currentEl->next->prev = this->currentEl->prev;
-
-      delete this->currentEl;
-      this->size--;
-      return;
-    }
-    this->currentEl = this->currentEl->next;
-  }
-}
-
-/**
- * remove an entity from the list
- * @param entity: the entity to be removed
- *
- * this algorithm starts at the end of the List, working its way to the front
- * for finding the right entity.
- */
-template<class T>
-    inline void tList<T>::removeFromLast(const T* entity)
-{
-  this->currentEl = this->last;
-  while( this->currentEl != NULL)
-  {
-    if( unlikely(this->currentEl->curr == entity))
-    {
-      // erstes element?
-      if( unlikely(this->currentEl->prev == NULL)) this->first = this->currentEl->next;
-      else this->currentEl->prev->next = this->currentEl->next;
-
-      // letztes element?
-      if( unlikely(this->currentEl->next == NULL)) this->last = this->currentEl->prev;
-      else this->currentEl->next->prev = this->currentEl->prev;
-
-      delete this->currentEl;
-      this->size--;
-      return;
-    }
-    this->currentEl = this->currentEl->prev;
-  }
-}
-
-
-/**
- * removes the Last Element of the List
- */
- template<class T>
-     inline void tList<T>::removeLast()
-{
-  if( unlikely(this->last == NULL))
-    return;
-
-  // only one element in the list (and its not NULL :D )
-  if( unlikely(this->last == this->first))
-  {
-    delete this->first;
-    this->first = NULL;
-    this->last = NULL;
-    this->size--;
-  }
-  else
-  {
-    listElement<T>* delLast = this->last;
-    this->last->prev->next = NULL;
-    this->last = this->last->prev;
-    delete delLast;
-  }
-}
-
-
-/**
- *  this will delete all objects from the list, this can be very dangerous if there are ghost objects in the list.
- */
-template<class T>
-    inline void tList<T>::flush()
-{
-  this->currentEl = this->first;
-
-  listElement<T>* le;
-  while( this->currentEl != NULL)
-  {
-    le = this->currentEl->next;
-    delete this->currentEl->curr;
-    delete this->currentEl;
-    this->currentEl = le;
-  }
-  this->first = NULL;
-  this->last = NULL;
-  this->currentEl = NULL;
-  this->size = 0;
-}
-
-
-/**
- *  returns the first element of the list
- * @returns first element
- */
-template<class T>
-    inline T* tList<T>::firstElement() const
-{
-  return this->first->curr;
-}
-
-
-/**
- *  function returns the last element of the list
- * @returns the last element
- */
-template<class T>
-    inline T* tList<T>::lastElement() const
-{
-  return this->last->curr;
-}
-
-
-/**
- *  returns true if the list is empty
- * @returns true if the list is empty
- */
-template<class T>
-    inline bool tList<T>::isEmpty() const
-{
-  return (this->size == 0)?true:false;
-}
-
-
-/**
- *  checks if an entity is in the List.
- * @param entity The entity to check for in the entire List.
- * @returns true if it is, false otherwise
- */
-template<class T>
-    inline bool tList<T>::inList(T* entity) const
-{
-  // pre checks
-  if( unlikely(entity == NULL)) return false;
-
-  // search in the List
-  listElement<T>* el = this->first;
-  while( this->currentEl != NULL)
-  {
-    if( this->currentEl->curr == entity)
-      return true;
-
-    el = this->currentEl->next;
-  }
-}
-
-
-/**
- *  this returns the number of elements in the list
- * @returns number of elements
- */
-template<class T>
-    inline unsigned int tList<T>::getSize() const
-{
-  return this->size;
-}
-
-
-/**
- *  creates an itereator object and returns it
- * @returns the iterator object to this list
-
-   You will use this, if you want to iterate through the list
- */
-template<class T>
-    inline tIterator<T>* tList<T>::getIterator() const
-{
-  return new tIterator<T>(this);
-}
-
-
-
-/**
- *  this returns the next element after toEntity or the first if toEntity is last
- * @param toEntity: the entity after which is an entity, that has to be returned, sorry, terrible phrase
- * @returns the element after toEntity
- */
-template<class T>
-    inline T* tList<T>::nextElement(T* toEntity)
-{
-  //if( this->last == this->first == NULL) return NULL;
-  if(this->size == 0) return NULL;
-  if( toEntity == NULL) return this->first->curr;
-  if( toEntity == this->last->curr ) return this->first->curr;
-  this->currentEl = this->first;
-  while(this->currentEl->curr != toEntity && this->currentEl->next != NULL)
-  {
-    this->currentEl = this->currentEl->next;
-  }
-  if(this->currentEl == NULL) return NULL;
-  return this->currentEl->next->curr;
-}
-
-
-/**
- *  creates an array out of the list (ATTENTION: not implemented)
- * @returns pointer to the array beginning
-
-   ATTENTION: function is not implemented and wont do anything
- */
-template<class T>
-    T* tList<T>::toArray()
-{
-  return NULL;
-}
-
-
-
-
-/**
-    *  an iterator class
-
-   this enables the user to iterate through a list very easely
- */
-template<class T> class tIterator
-{
-  friend class tList<T>;
-  public:
-    tIterator(const tList<T>* list);
-    ~tIterator();
-
-    T* firstElement();
-    T* lastElement();
-    T* nextElement();
-    T* prevElement();
-    T* seekElement(const T* element);
-    T* iteratorElement(const tIterator<T>* iterator);
-    bool compareListPointer(const tList<T>* list) const;
-    inline const tList<T>* getList() const { return this->list; };
-    /** another way to iterate through the list
-     * !! THIS IS NOT MEANT FOR DELETION
-     */
-    T* prevStep();
-    T* nextStep();
-    T* getCurrent();
-
-  private:
-    listElement<T>*    currentEl;                      //!< pointer to the current list element in the iterator
-    listElement<T>*    tmpEl;                          //!< temp listElemnt pointer
-    const tList<T>*    list;                           //!< The List, that we want to iterate through
-};
-
-
-/**
- *  iterator constructor
- * @param startElement:  the first list element from the tList
- *
- * normaly you will use it like this:
- **********************************************************
- * tIterator<char>* nameIterator = nameList->getIterator();
- * char name* = nameIterator->firstElement();
- * while( name != NULL)
- *  {
- *   PRINTF(3)("found name: %s in list\n", name);
- *   name = nameIterator->nextElement();
- *  }
- * delete nameIterator;
- * ********************************************************
- */
-template<class T>
-  inline tIterator<T>::tIterator (const tList<T>* list)
-{
-  this->currentEl = NULL;
-  this->tmpEl = NULL;
-  this->list = list;
-}
-
-
-/**
- *  the destructor
- */
-template<class T>
-    inline tIterator<T>::~tIterator ()
-{
-  this->currentEl = NULL;
-  this->tmpEl = NULL;
-  this->list = NULL;
-}
-
-/**
- * this returns the first element of the iterator list
- * @returns first element
- */
-template<class T>
-    inline T* tIterator<T>::firstElement ()
-{
-  this->tmpEl = this->list->first;
-  if( likely(this->tmpEl != NULL))
-  {
-    this->currentEl = this->tmpEl->next;
-    return this->tmpEl->curr;
-  }
-  else
-    return NULL;
-}
-
-/**
- * this returns the last element of the iterator list
- * @returns last element
- */
-template<class T>
-    inline T* tIterator<T>::lastElement ()
-{
-  this->tmpEl = this->list->last;
-  if( likely(this->tmpEl != NULL))
-  {
-    this->currentEl = tmpEl->prev;
-    return this->tmpEl->curr;
-  }
-  else
-    return NULL;
-}
-
-
-/**
- *  use it to iterate through the list
- * @returns next list element
- */
-template<class T>
-    inline T* tIterator<T>::nextElement ()
-{
-  if( unlikely(this->currentEl == NULL))
-    return NULL;
-
-  this->tmpEl = this->currentEl;
-  this->currentEl = this->currentEl->next;
-
-  return this->tmpEl->curr;
-}
-
-
-/**
- *  use it to iterate backwards through the list
- * @returns next list element
- */
-template<class T>
-    inline T* tIterator<T>::prevElement ()
-{
-  if( unlikely(this->currentEl == NULL))
-    return NULL;
-
-  this->tmpEl = this->currentEl;
-  this->currentEl = this->currentEl->prev;
-
-  return this->tmpEl->curr;
-}
-
-
-/**
- *  gets the element after the selected one, sets the iterator to this point in the list
- * @param element the element to seek
- * @returns current list element
- */
-template<class T>
-    inline T* tIterator<T>::seekElement (const T* element)
-{
-  if( unlikely(element == NULL))
-  {
-    this->currentEl = NULL;
-    return NULL;
-  }
-  this->tmpEl = this->list->first;
-  while( this->tmpEl != NULL)
-  {
-    if( unlikely(this->tmpEl->curr == element))
-    {
-      this->currentEl = this->tmpEl;
-      return this->currentEl->curr;
-    }
-    this->tmpEl = this->tmpEl->next;
-  }
-  this->currentEl = NULL;
-  return NULL;
-}
-
-/**
- * grabs the iterator entity from another iterator
- * @param iterator the iterator to grab the local currentEl from
- * @returns the grabbed element (current). NULL if not found, or not defined
- *
- * Both iterators must be from the same List!
- */
-template<class T>
-    T* tIterator<T>::iteratorElement(const tIterator<T>* iterator)
-{
-  if( unlikely(iterator != NULL && iterator->list == this->list))
-  {
-    this->currentEl = iterator->currentEl;
-    if (this->currentEl != NULL)
-      return this->currentEl->curr;
-    else
-      return NULL;
-  }
-  else
-  {
-    this->currentEl = NULL;
-    return NULL;
-  }
-}
-
-template<class T>
-    bool tIterator<T>::compareListPointer(const tList<T>* list) const
-{
-  return (this->list == list)?true:false;
-}
-
-
-/**
- *  use it to move through the list without interfering with the iteration
- * @returns previous list element
- *
- * this stepping mode will !not! step beyond the boundraries of the List!
- */
-template<class T>
-    inline T* tIterator<T>::nextStep ()
-{
-  if( unlikely(this->tmpEl == NULL || this->tmpEl->next == NULL))
-    return NULL;
-  else
-  {
-    this->tmpEl = this->tmpEl->next;
-    return tmpEl->curr;
-  }
-}
-
-/**
- *  use it to move backwards through the list without interfering with the itereation
- * @returns next list element
- *
- * this stepping mode will !not! step beyond the boundraries of the List!
- */
-template<class T>
-    inline T* tIterator<T>::prevStep ()
-{
-  if( unlikely(this->tmpEl == NULL || this->tmpEl->prev == NULL))
-    return NULL;
-  else
-  {
-    this->tmpEl = this->tmpEl->prev;
-    return tmpEl->curr;
-  }
-}
-
-/**
- * @returns the current Element
- */
-template<class T>
-    inline T* tIterator<T>::getCurrent()
-{
-  if (likely(this->tmpEl != NULL))
-    return this->tmpEl->curr;
-  else
-    return NULL;
-}
-
-#endif /* _T_LIST_H */
Index: trunk/src/lib/util/loading/game_loader.cc
===================================================================
--- trunk/src/lib/util/loading/game_loader.cc	(revision 10551)
+++ trunk/src/lib/util/loading/game_loader.cc	(revision 10618)
@@ -23,4 +23,5 @@
 #include "debug.h"
 #include "campaign.h"
+#include "compiler.h"
 
 #include "key_mapper.h"
Index: trunk/src/lib/util/loading/game_loader.h
===================================================================
--- trunk/src/lib/util/loading/game_loader.h	(revision 10551)
+++ trunk/src/lib/util/loading/game_loader.h	(revision 10618)
@@ -9,5 +9,4 @@
 //#include "stdincl.h"
 #include "story_def.h"
-#include "comincl.h"
 #include "event_listener.h"
 
Index: trunk/src/lib/util/threading.cc
===================================================================
--- trunk/src/lib/util/threading.cc	(revision 10551)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   ### File Specific:
-   main-programmer: ...
-   co-programmer: ...
-*/
-
-//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
-
-#include "threading.h"
-
-
-
-namespace OrxThread
-{
-
-/**
- * standard constructor
- * @todo this constructor is not jet implemented - do it
-*/
-// Thread::Thread()
-// {
-// }
-
-
-/**
- * standard deconstructor
-*/
-// Thread::~Thread()
-// {
-//   // delete what has to be deleted here
-// }
-
-}
Index: trunk/src/lib/util/threading.h
===================================================================
--- trunk/src/lib/util/threading.h	(revision 10551)
+++ 	(revision )
@@ -1,65 +1,0 @@
-/*!
- * @file threading.h
- * @brief Definition of Thread Classes.
- *
- * These are mainly Classes, that are used for wrapping around SDL_thread
-*/
-
-#ifndef _THREADING_H
-#define _THREADING_H
-
-#ifdef HAVE_SDL_H
- #include <SDL_thread.h>
-#else
- #include <SDL/SDL_thread.h>
-#endif
-
-namespace OrxThread
-{
-  //! A class for Wrapping Threads
-  class Thread
-  {
-  public:
-    Thread(int (*fn)(void *), void *data) { this->thread = SDL_CreateThread(fn, data); };
-    virtual ~Thread() { SDL_KillThread(this->thread); }
-    void exit ( int returnCode = 0 );
-    bool isFinished () const;
-    bool isRunning () const;
-    void wait() { SDL_WaitThread(this->thread, NULL); };
-
-    void start();
-    void terminate();
-
-
-  private:
-    SDL_Thread* thread;
-
-  };
-
-  class Mutex
-  {
-  public:
-    Mutex() {  this->mutex = SDL_CreateMutex(); };
-    ~Mutex() { SDL_DestroyMutex(this->mutex); }
-
-    void lock() { SDL_mutexP(mutex); };
-    void unlock() { SDL_mutexV(mutex); };
-
-    SDL_mutex* getMutex() const { return this->mutex; };
-  private:
-    SDL_mutex* mutex;
-  };
-
-  //! A Class that locks a Mutex within its scope
-  class MutexLock
-  {
-  public:
-    //! Locks the Mutex mutex in this Scope.
-    MutexLock(Mutex* mutex) { SDL_mutexP(mutex->getMutex()); this->mutex = mutex; };
-    ~MutexLock() { SDL_mutexV(mutex->getMutex()); };
-  private:
-    Mutex* mutex;         //!< The Mutex to lock.
-  };
-}
-
-#endif /* _THREADING_H */
Index: trunk/src/lib/util/threads/mutex.h
===================================================================
--- trunk/src/lib/util/threads/mutex.h	(revision 10618)
+++ trunk/src/lib/util/threads/mutex.h	(revision 10618)
@@ -0,0 +1,23 @@
+#ifndef __MUTEX_H__
+#define __MUTEX_H__
+
+
+#include "threadincl.h"
+namespace OrxThread
+{
+
+  class Mutex
+  {
+  public:
+    Mutex() {  this->mutex = SDL_CreateMutex(); };
+    ~Mutex() { SDL_DestroyMutex(this->mutex); }
+
+    void lock() { SDL_mutexP(mutex); };
+    void unlock() { SDL_mutexV(mutex); };
+
+    SDL_mutex* getMutex() const { return this->mutex; };
+  private:
+    SDL_mutex* mutex;
+  };
+}
+#endif /* __MUTEX_H__ */
Index: trunk/src/lib/util/threads/mutex_locker.h
===================================================================
--- trunk/src/lib/util/threads/mutex_locker.h	(revision 10618)
+++ trunk/src/lib/util/threads/mutex_locker.h	(revision 10618)
@@ -0,0 +1,21 @@
+#ifndef __MUTEX_LOCKER_H__
+#define __MUTEX_LOCKER_H__
+
+#include "mutex.h"
+
+namespace OrxThread
+{
+
+  //! A Class that locks a Mutex within its scope
+  class MutexLocker
+  {
+  public:
+    //! Locks the Mutex mutex in this Scope.
+    MutexLocker(Mutex* mutex) { SDL_mutexP(mutex->getMutex()); this->mutex = mutex; };
+    ~MutexLocker() { SDL_mutexV(mutex->getMutex()); };
+  private:
+    Mutex* mutex;         //!< The Mutex to lock.
+  };
+}
+
+#endif /* __MUTEX_LOCKER_H__ */
Index: trunk/src/lib/util/threads/thread.cc
===================================================================
--- trunk/src/lib/util/threads/thread.cc	(revision 10618)
+++ trunk/src/lib/util/threads/thread.cc	(revision 10618)
@@ -0,0 +1,42 @@
+/*
+    orxonox - the future of 3D-vertical-scrollers
+ 
+    Copyright (C) 2004 orx
+ 
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2, or (at your option)
+    any later version.
+ 
+### File Specific:
+    main-programmer: ...
+    co-programmer: ...
+*/
+
+//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+
+#include "thread.h"
+
+
+
+namespace OrxThread
+{
+
+  /**
+     * standard constructor
+     * @todo this constructor is not jet implemented - do it
+   */
+  // Thread::Thread()
+  // {
+  // }
+
+
+  /**
+     * standard deconstructor
+   */
+  // Thread::~Thread()
+  // {
+  //   // delete what has to be deleted here
+  // }
+
+}
Index: trunk/src/lib/util/threads/thread.h
===================================================================
--- trunk/src/lib/util/threads/thread.h	(revision 10618)
+++ trunk/src/lib/util/threads/thread.h	(revision 10618)
@@ -0,0 +1,29 @@
+#ifndef __THREAD_H__
+#define __THREAD_H__
+
+#include "threadincl.h"
+
+namespace OrxThread
+{
+  //! A class for Wrapping Threads
+  class Thread
+  {
+  public:
+    Thread(int (*fn)(void *), void *data) { this->thread = SDL_CreateThread(fn, data); };
+    virtual ~Thread() { SDL_KillThread(this->thread); }
+    void exit ( int returnCode = 0 );
+    bool isFinished () const;
+    bool isRunning () const;
+    void wait() { SDL_WaitThread(this->thread, NULL); };
+
+    void start();
+    void terminate();
+
+
+  private:
+    SDL_Thread* thread;
+
+  };
+}
+
+#endif /* __THREAD_H__ */
Index: trunk/src/lib/util/threads/threadincl.h
===================================================================
--- trunk/src/lib/util/threads/threadincl.h	(revision 10618)
+++ trunk/src/lib/util/threads/threadincl.h	(revision 10618)
@@ -0,0 +1,10 @@
+#ifndef __THREAD_INCLUDE_H__
+#define __THREAD_INCLUDE_H__
+
+#ifdef HAVE_SDL_H
+#include <SDL_thread.h>
+#else
+#include <SDL/SDL_thread.h>
+#endif
+
+#endif /* __THREAD_INCLUDE_H__ */
Index: trunk/src/lib/util/threads/threading.h
===================================================================
--- trunk/src/lib/util/threads/threading.h	(revision 10618)
+++ trunk/src/lib/util/threads/threading.h	(revision 10618)
@@ -0,0 +1,17 @@
+/*!
+ * @file threading.h
+ * @brief Definition of Thread Classes.
+ *
+ * These are mainly Classes, that are used for wrapping around SDL_thread
+*/
+
+#ifndef _THREADING_H
+#define _THREADING_H
+
+#include "thread.h"
+#include "mutex.h"
+#include "mutex_locker.h"
+
+
+
+#endif /* _THREADING_H */
