Index: code/branches/input/CMakeLists.txt
===================================================================
--- code/branches/input/CMakeLists.txt	(revision 1119)
+++ code/branches/input/CMakeLists.txt	(revision 1154)
@@ -32,6 +32,6 @@
 
 #set binary output directories
-SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
-SET(LIBRARY_OUTPUT_PATH    ${PROJECT_BINARY_DIR}/bin/lib)
+SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
+SET(LIBRARY_OUTPUT_PATH    ${PROJECT_SOURCE_DIR}/bin/lib)
 
 # global compiler/linker flags. force -O2!
@@ -43,6 +43,8 @@
 SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined")
 
-#Create verbose makefile output when compiling
-SET(CMAKE_VERBOSE_MAKEFILE TRUE)
+#use 'cmake -D make_verb:1 path' to get verbose make output when compiling
+IF (MAKE_VERB)
+ SET(CMAKE_VERBOSE_MAKEFILE TRUE)
+ENDIF (MAKE_VERB)
 
 
@@ -79,18 +81,10 @@
   ${ENet_INCLUDE_DIR}
   ${Boost_INCLUDE_DIRS}
-  ${OPENAL_INCLUDE_DIR} ${ALUT_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR} ${OGG_INCLUDE_DIR}
+  ${OPENAL_INCLUDE_DIR}
+  ${ALUT_INCLUDE_DIR}
+  ${VORBIS_INCLUDE_DIR}
+  ${OGG_INCLUDE_DIR}
   ${Lua_INCLUDE_DIR}
 )
-
-
-################ Source files ###################
-
-#At first, build lua
-MESSAGE(STATUS "\n******************* Building tolua... ******************\n\n")
-EXECUTE_PROCESS(COMMAND ./tolua-build)
-MESSAGE(STATUS "\n\n******************* Building tolua done ****************\n")
-
-#generate lua bind source files
-EXECUTE_PROCESS(COMMAND bin/./tolua-exec-script)
 
 #add main source dir
Index: code/branches/input/bin/levels/sample.oxw
===================================================================
--- code/branches/input/bin/levels/sample.oxw	(revision 1119)
+++ code/branches/input/bin/levels/sample.oxw	(revision 1154)
@@ -38,9 +38,9 @@
 
 
-<!--?lua
+<?lua
 for i = 1, 226, 1 
 do ?>
-  <Model position="<?lua print(math.random(-19597, 18732))?>, <?lua print(math.random(-19597, 18732)) ?>, <?lua print(math.random(-19597, 18732)) ?>" scale="<?lua print(math.random( 20, 119)) ?>" mesh="ast<?lua print(i%6 + 1) ?>.mesh" rotationAxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationRate="<?lua print(math.random(16, 44)) ?>" />
+  <Model position="<?lua print(math.random(-19597, 18732))?>, <?lua print(math.random(-19597, 18732)) ?>, <?lua print(math.random(-19597, 18732)) ?>" scale="<?lua print(math.random( 20, 119)) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" rotationAxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationRate="<?lua print(math.random(16, 44)) ?>" />
 <?lua 
 end
-?-->
+?>
Index: code/branches/input/bin/tolua-exec-script
===================================================================
--- code/branches/input/bin/tolua-exec-script	(revision 1119)
+++ 	(revision )
@@ -1,3 +1,0 @@
-cd src/core/tolua
-../../../bin/./tolua -n orxonox -o tolua_bind.cc -H tolua_bind.h tolua.pkg
-cd ../../../
Index: code/branches/input/cmake/FindLua.cmake
===================================================================
--- code/branches/input/cmake/FindLua.cmake	(revision 1119)
+++ code/branches/input/cmake/FindLua.cmake	(revision 1154)
@@ -1,69 +1,74 @@
-# Find Lua includes and library
+#  Find Lua header and library files
 #
-# This module defines
-#  Lua_INCLUDE_DIR
-#  Lua_LIBRARIES, the libraries to link against to use Lua.
-#  Lua_LIB_DIR, the location of the libraries
-#  Lua_FOUND, If false, do not try to use Lua
+#  When called, this script tries to define:
+#  Lua_INCLUDE_DIR    Header files directory
+#  Lua_LIBRARIES      library files (or file when using lua 5.1)
+#  Lua_FOUND          defined (true) if lua was found
+#  Lua_VERSION        either 5.1 or 5.0 or undefined
 #
-# Copyright © 2007, Matt Williams
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
+#  authors: Benjamin Knecht, Reto Grieder
 
-MESSAGE(STATUS "lua libs in cache: ${Lua_LIBRARIES}")
 IF (Lua_LIBRARIES AND Lua_INCLUDE_DIR)
-    SET(Lua_FIND_QUIETLY TRUE) # Already in cache, be silent
+
+  # Already in cache, be silent
+  SET(Lua_FOUND TRUE)
+  SET(Lua_FIND_QUIETLY TRUE) 
+  MESSAGE(STATUS "Lua was found.")
+
+ELSE (Lua_LIBRARIES AND Lua_INCLUDE_DIR)
+
+  FIND_PATH(Lua_INCLUDE_DIR_51 lua.h
+    /usr/include/lua5.1
+    /usr/local/include/lua5.1
+    ../libs/lua-5.1.3/src)
+
+  FIND_PATH(Lua_INCLUDE_DIR_50 lua.h
+    /usr/include/lua50
+    /usr/local/include/lua50
+    /usr/pack/lua-5.0.3-sd/include)
+
+  FIND_LIBRARY(Lua_LIBRARY_51 NAMES lua5.1 lua PATHS
+    /usr/lib
+    /usr/local/lib
+    ../libs/lua-5.1.3/lib)
+
+  FIND_LIBRARY(Lua_LIBRARY_1_50 NAMES lua50 lua PATHS
+	/usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib #tardis
+    /usr/lib
+    /usr/local/lib)
+
+  FIND_LIBRARY(Lua_LIBRARY_2_50 NAMES lualib50 lualib PATHS
+	/usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib #tardis
+    /usr/lib
+    /usr/local/lib)
+
+
+  IF (Lua_INCLUDE_DIR_51 AND Lua_LIBRARY_51)
+
+    # Found newer lua 5.1 libs
+    SET(Lua_FOUND TRUE)
+    SET(Lua_VERSION 5.1 CACHE STRING "")
+    SET(Lua_INCLUDE_DIR ${Lua_INCLUDE_DIR_51} CACHE PATH "")
+    SET(Lua_LIBRARIES ${Lua_LIBRARY_51} CACHE FILEPATH "")
+
+  ELSEIF(Lua_INCLUDE_DIR_50 AND Lua_LIBRARY_1_50 AND Lua_LIBRARY_2_50)
+
+    # Found older lua 5.0 libs
+    SET(Lua_FOUND TRUE)
+    SET(Lua_VERSION 5.0 CACHE STRING "")
+    SET(Lua_INCLUDE_DIR ${Lua_INCLUDE_DIR_50} CACHE PATH "")
+    SET(Lua_LIBRARIES ${Lua_LIBRARY_1_50} ${Lua_LIBRARY_2_50} CACHE FILEPATH "")
+
+  ENDIF (Lua_INCLUDE_DIR_51 AND Lua_LIBRARY_51)
+	
+
+  IF (Lua_FOUND)
+    MESSAGE(STATUS "Found Lua: ${Lua_LIBRARIES}")
+  ELSE (Lua_FOUND)
+    IF (Lua_FIND_REQUIRED)
+      MESSAGE(FATAL_ERROR "Could not find Lua")
+    ENDIF (Lua_FIND_REQUIRED)
+  ENDIF (Lua_FOUND)
+
 ENDIF (Lua_LIBRARIES AND Lua_INCLUDE_DIR)
 
-FIND_PATH(Lua_INCLUDE_DIR lua.h
-	/usr/include/lua5.1
-	/usr/local/include/lua5.1
-	../libs/lua-5.1.3/src)
-
-FIND_LIBRARY(Lua_LIBRARIES lua5.1
-	/usr/lib
-	/usr/local/lib
-	../libs/lua-5.1.3/lib)
-
-IF (NOT Lua_INCLUDE_DIR)
- FIND_PATH(Lua_INCLUDE_DIR lua.h
-	/usr/include/lua50
-	/usr/local/include/lua50
-	/usr/pack/lua-5.0.3-sd/include)
-ENDIF (NOT Lua_INCLUDE_DIR)
-
-IF (NOT Lua_LIBRARIES)
- FIND_LIBRARY(Lua_LIBRARIES lua50
-	/usr/lib
-	/usr/local/lib)
-
- FIND_LIBRARY(Lua_LIBRARY lualib50
-	/usr/lib
-	/usr/local/lib)
-
-#SET(Lua_LIBRARIES ${Lua_LIBRARIES} ${Lua_LIBRARY})
-ENDIF (NOT Lua_LIBRARIES)
-
-#especially for tardis
-IF (NOT Lua_LIBRARIES)
- FIND_LIBRARY(Lua_LIBRARIES lua
-	/usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib)
-
- FIND_LIBRARY(Lua_LIBRARY lualib
-	/usr/pack/lua-5.0.3-sd/i686-debian-linux3.1/lib)
-
-#SET(Lua_LIBRARIES ${Lua_LIBRARIES} ${Lua_LIBRARY})
-ENDIF (NOT Lua_LIBRARIES)
-
-IF (Lua_INCLUDE_DIR AND Lua_LIBRARIES)
-    SET(Lua_FOUND TRUE)
-ENDIF (Lua_INCLUDE_DIR AND Lua_LIBRARIES)
-
-IF (Lua_FOUND)
-    MESSAGE(STATUS "Found Lua: ${Lua_LIBRARIES}")
-    MESSAGE(STATUS "Found Lua: ${Lua_LIBRARY}")
-ELSE (Lua_FOUND)
-    IF (Lua_FIND_REQUIRED)
-        MESSAGE(FATAL_ERROR "Could not find Lua")
-    ENDIF (Lua_FIND_REQUIRED)
-ENDIF (Lua_FOUND)
Index: code/branches/input/src/core/CMakeLists.txt
===================================================================
--- code/branches/input/src/core/CMakeLists.txt	(revision 1119)
+++ code/branches/input/src/core/CMakeLists.txt	(revision 1154)
@@ -1,6 +1,3 @@
-#get the created files
-AUX_SOURCE_DIRECTORY(tolua TOLUA_BIND_FILES) 
-
-SET( CORE_SRC_FILES
+SET(CORE_SRC_FILES
   OrxonoxClass.cc
   BaseObject.cc
@@ -29,13 +26,30 @@
   Tickable.cc
   Script.cc
-  ${TOLUA_BIND_FILES}
+  tolua/tolua_bind.cc
+#tolua/tolua_bind.h
 )
 
-ADD_LIBRARY( core SHARED ${CORE_SRC_FILES})
+#SET_SOURCE_FILES_PROPERTIES(tolua/tolua_bind.h
+#  PROPERTIES
+#  OBJECT_DEPENDS tolua/tolua_bind.h
+#  OBJECT_DEPENDS tolua/tolua_bind.cc
+#  GENERATED true
+#  HEADER_FILE_ONLY true
+#)
 
-TARGET_LINK_LIBRARIES( core
+GET_TARGET_PROPERTY(TOLUA_EXE tolua LOCATION)
+ADD_CUSTOM_COMMAND(
+  OUTPUT tolua/tolua_bind.cc tolua/tolua_bind.h
+  COMMAND ${TOLUA_EXE} -n core -o ../../src/core/tolua/tolua_bind.cc -H ../../src/core/tolua/tolua_bind.h ../../src/core/tolua/tolua.pkg
+  DEPENDS tolua
+  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib
+)
+
+ADD_LIBRARY(core SHARED ${CORE_SRC_FILES})
+
+TARGET_LINK_LIBRARIES(core
+  ${Lua_LIBRARIES}
+  ${OIS_LIBRARIES}
+  ${OGRE_LIBRARIES}
   util
-  ${Lua_LIBRARIES}
-  ${Lua_LIBRARY}
-  ${OIS_LIBRARIES}
 )
Index: code/branches/input/src/core/ConfigFileManager.h
===================================================================
--- code/branches/input/src/core/ConfigFileManager.h	(revision 1119)
+++ code/branches/input/src/core/ConfigFileManager.h	(revision 1154)
@@ -63,4 +63,5 @@
     {
         public:
+            virtual ~ConfigFileEntry() {};
             virtual void setValue(const std::string& value) = 0;
             virtual std::string getValue() const = 0;
Index: code/branches/input/src/core/InputManager.cc
===================================================================
--- code/branches/input/src/core/InputManager.cc	(revision 1119)
+++ code/branches/input/src/core/InputManager.cc	(revision 1154)
@@ -125,16 +125,8 @@
     // create the handlers
     this->handlerGUI_ = new InputHandlerGUI();
+    this->handlerGUI_->initialise();
     this->handlerGame_ = new InputHandlerGame();
-    //this->handlerBuffer_ = new InputBuffer();
-    this->handlerGame_->loadBindings();
-
-    /*COUT(ORX_DEBUG) << "*** InputManager: Loading key bindings..." << std::endl;
-    // load the key bindings
-    InputEvent empty = {0, false, 0, 0, 0};
-    for (int i = 0; i < this->numberOfKeys_; i++)
-      this->bindingsKeyPressed_[i] = empty;
-
-    //assign 'abort' to the escape key
-    this->bindingsKeyPressed_[(int)OIS::KC_ESCAPE].id = 1;
+    this->handlerGame_->initialise();
+
     COUT(ORX_DEBUG) << "*** InputManager: Loading done." << std::endl;*/
 
@@ -159,6 +151,4 @@
     this->inputSystem_   = 0;
 
-    if (this->handlerBuffer_)
-      delete this->handlerBuffer_;
     if (this->handlerGame_)
       delete this->handlerGame_;
@@ -166,5 +156,4 @@
       delete this->handlerGUI_;
 
-    this->handlerBuffer_ = 0;
     this->handlerGame_   = 0;
     this->handlerGUI_    = 0;
@@ -192,8 +181,4 @@
         this->keyboard_->setEventCallback(this->handlerGame_);
         break;
-      case IM_KEYBOARD:
-        this->mouse_->setEventCallback(this->handlerGame_);
-        this->keyboard_->setEventCallback(this->handlerBuffer_);
-        break;
       case IM_UNINIT:
         this->mouse_->setEventCallback(0);
@@ -211,4 +196,5 @@
 
     // Give the listeners the chance to do additional calculations
+    this->currentHandler_->tick(dt);
   }
 
Index: code/branches/input/src/core/InputManager.h
===================================================================
--- code/branches/input/src/core/InputManager.h	(revision 1119)
+++ code/branches/input/src/core/InputManager.h	(revision 1154)
@@ -51,11 +51,4 @@
     IM_INGAME:   Normal game mode. Key bindings and mouse are active.
   */
-  enum InputMode
-  {
-    IM_GUI      = 0,
-    IM_KEYBOARD = 1,
-    IM_INGAME   = 2,
-    IM_UNINIT   = 3,
-  };
 
   /**
@@ -83,5 +76,6 @@
     static InputManager& getSingleton();
     static InputManager* getSingletonPtr() { return &getSingleton(); }
-    static void setInputMode(int mode);
+
+    static void setInputHandler(std::string& name);
 
   private:
@@ -95,13 +89,9 @@
     OIS::Mouse        *mouse_;          //!< OIS keyboard
 
-    InputMode          currentMode_;    //!< Input mode currently used
-    InputMode          setMode_;        //!< Input mode that has been set lately
-    InputHandlerGUI   *handlerGUI_;     //!< Handles the input if in GUI mode
-    // FIXME: insert the InputBuffer once merged with core2
-    InputBuffer       *handlerBuffer_;  //!< Handles the input if in Buffer mode
-    InputHandlerGame  *handlerGame_;    //!< Handles the input if in Game mode
+    BaseInputHandler* currentHandler_;
+    BaseInputHandler* switchToHandler_;
+    //! Maps the names of the input handlers to their instance
+    std::map<std::string, BaseInputHandler*> handlers_;
 
-    //! Pointer to the instance of the singleton
-    //static InputManager *singletonRef_s;
   };
 }
Index: code/branches/input/src/core/Loader.cc
===================================================================
--- code/branches/input/src/core/Loader.cc	(revision 1119)
+++ code/branches/input/src/core/Loader.cc	(revision 1154)
@@ -115,7 +115,7 @@
         Script::init(Script::getLuaState());
         Script::run();*/
-        //Script* lua = Script::getInstance();
-        //lua->loadFile(level->getFile(), true);
-        //lua->run();
+        Script* lua = Script::getInstance();
+        lua->loadFile(level->getFile(), true);
+        lua->run();
 
         try
@@ -124,10 +124,10 @@
             COUT(3) << "Mask: " << Loader::currentMask_s << std::endl;
 
-            ticpp::Document xmlfile(level->getFile());
-            xmlfile.LoadFile();
+            //ticpp::Document xmlfile(level->getFile());
+            //xmlfile.LoadFile();
             //ticpp::Element myelement(*Script::getFileString());
-            //ticpp::Document xmlfile;
-            xmlfile.ToDocument();
-            //xmlfile.Parse(lua->getLuaOutput(), true);
+            ticpp::Document xmlfile;
+            //xmlfile.ToDocument();
+            xmlfile.Parse(lua->getLuaOutput(), true);
 
             ticpp::Element rootElement;
Index: code/branches/input/src/core/Script.cc
===================================================================
--- code/branches/input/src/core/Script.cc	(revision 1119)
+++ code/branches/input/src/core/Script.cc	(revision 1154)
@@ -60,5 +60,5 @@
     luaopen_debug(luaState_);
 #endif
-    tolua_orxonox_open(luaState_);
+    tolua_core_open(luaState_);
     output_ = "";
   }
@@ -102,4 +102,14 @@
   }
 
+#if LUA_VERSION_NUM != 501
+  const char * Script::lua_Chunkreader(lua_State *L, void *data, size_t *size)
+  {
+    LoadS* ls = ((LoadS*)data);
+    if (ls->size == 0) return NULL;
+    *size = ls->size;
+    ls->size = 0;
+    return ls->s;
+  }
+#endif
   void Script::run()
   {
@@ -110,5 +120,8 @@
     error = luaL_loadstring(luaState_, init.c_str());
 #else
-    error = lua_load(luaState_, &orxonox::Script::lua_Chunkreader, (void*)init.c_str(), "init");
+    LoadS ls;
+    ls.s = init.c_str();
+    ls.size = init.size();
+    error = lua_load(luaState_, &orxonox::Script::lua_Chunkreader, &ls, init.c_str());
 #endif
     if (error == 0)
Index: code/branches/input/src/core/Script.h
===================================================================
--- code/branches/input/src/core/Script.h	(revision 1119)
+++ code/branches/input/src/core/Script.h	(revision 1154)
@@ -50,4 +50,9 @@
   class _CoreExport Script // tolua_export
   { // tolua_export
+    struct LoadS {
+      const char *s;
+      size_t size;
+    };
+
     public:
       inline static Script* getInstance() { if (!Script::singletonRef) Script::singletonRef = new Script(); return Script::singletonRef; } // tolua_export
@@ -61,5 +66,5 @@
 
 #if LUA_VERSION_NUM != 501
-    inline static const char * lua_Chunkreader(lua_State *L, void *data, size_t *size) { return NULL;};
+    static const char * lua_Chunkreader(lua_State *L, void *data, size_t *size);
 #endif
 
Index: code/branches/input/src/orxonox/CMakeLists.txt
===================================================================
--- code/branches/input/src/orxonox/CMakeLists.txt	(revision 1119)
+++ code/branches/input/src/orxonox/CMakeLists.txt	(revision 1154)
@@ -30,6 +30,24 @@
 #  objects/weapon/BulletManager.cc
 #  objects/weapon/WeaponStation.cc
+  tolua/tolua_bind.cc
+#  tolua/tolua_bind.h
 )
 
+#SET_SOURCE_FILES_PROPERTIES(tolua/tolua_bind.h
+#  PROPERTIES
+#  OBJECT_DEPENDS tolua/tolua_bind.h
+#  OBJECT_DEPENDS tolua/tolua_bind.cc
+#  GENERATED true
+#  HEADER_FILE_ONLY true
+#)
+
+GET_TARGET_PROPERTY(TOLUA_EXE tolua LOCATION)
+ADD_CUSTOM_COMMAND(
+  OUTPUT tolua/tolua_bind.cc tolua/tolua_bind.h
+  COMMAND ${TOLUA_EXE} -n orxonox -o ../../src/orxonox/tolua/tolua_bind.cc -H ../../src/orxonox/tolua/tolua_bind.h ../../src/orxonox/tolua/tolua.pkg
+  DEPENDS tolua
+  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib
+)
+	
 ADD_EXECUTABLE( orxonox ${ORXONOX_SRC_FILES} )
 
Index: code/branches/input/src/util/CMakeLists.txt
===================================================================
--- code/branches/input/src/util/CMakeLists.txt	(revision 1119)
+++ code/branches/input/src/util/CMakeLists.txt	(revision 1154)
@@ -1,14 +1,19 @@
-AUX_SOURCE_DIRECTORY(tinyxml TINYXML_SRC_FILES)
-
-SET (UTIL_SRC_FILES
+SET(UTIL_SRC_FILES
   ArgReader.cc
+  Clipboard.cc
+  ExprParser.cc
   Math.cc
-  String.cc
-  Clipboard.cc
-  SubString.cc
-  ExprParser.cc
   MultiTypePrimitive.cc
   MultiTypeString.cc
   MultiTypeMath.cc
+  String.cc
+  SubString.cc
+
+  tinyxml/ticpp.cc
+  tinyxml/tinystr.cc
+  tinyxml/tinyxml.cc
+  tinyxml/tinyxmlerror.cc
+  tinyxml/tinyxmlparser.cc
+
   tolua/tolua_event.c
   tolua/tolua_is.c
@@ -16,8 +21,7 @@
   tolua/tolua_push.c
   tolua/tolua_to.c
-  ${TINYXML_SRC_FILES}
 )
 
-ADD_LIBRARY( util SHARED ${UTIL_SRC_FILES} )
+ADD_LIBRARY(util SHARED ${UTIL_SRC_FILES})
 
 IF(TESTING_ENABLED)
@@ -25,8 +29,9 @@
 ENDIF(TESTING_ENABLED)
 
-TARGET_LINK_LIBRARIES( util
+TARGET_LINK_LIBRARIES(util
   ${OGRE_LIBRARIES}
   ${Lua_LIBRARIES}
-  ${Lua_LIBRARY}
 ) 
 
+ADD_SUBDIRECTORY(tolua)
+
Index: code/branches/input/tolua-build
===================================================================
--- code/branches/input/tolua-build	(revision 1119)
+++ 	(revision )
@@ -1,4 +1,0 @@
-cd src/util/tolua/
-cmake .
-make
-cd ../../../
Index: code/branches/input/tolua.cmake
===================================================================
--- code/branches/input/tolua.cmake	(revision 1119)
+++ 	(revision )
@@ -1,53 +1,0 @@
-PROJECT(ToLua)
-
-#This sets where to look for modules (e.g. "Find*.cmake" files)
-SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
-
-#Check whether we are on a tardis box
-INCLUDE(CheckTardis)
-
-########## Compiler/Linker options ##############
-
-# if on tardis change compiler and reset boost include directory
-IF(IS_TARDIS)
-  MESSAGE("System is a TARDIS: Setting Compiler to g++-4.1.1")
-  # force-set the compiler on tardis machines, as default points to g++-3.3
-  SET(CMAKE_CXX_COMPILER "g++-4.1.1")
-ENDIF(IS_TARDIS)
-
-#set binary output directories
-SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
-SET(LIBRARY_OUTPUT_PATH    ${PROJECT_BINARY_DIR}/bin/lib)
-
-# global compiler/linker flags. force -O2!
-SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O2 -Wall -g -ggdb")
-SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O2 -Wall -g -ggdb")
-SET(CMAKE_LD_FLAGS "$ENV{LDFLAGS}")
-SET(CMAKE_EXE_LINKER_FLAGS " --no-undefined")
-SET(CMAKE_SHARED_LINKER_FLAGS " --no-undefined")
-SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined")
-
-#Create verbose makefile output when compiling
-SET(CMAKE_VERBOSE_MAKEFILE TRUE)
-
-
-############### Library finding #################
-
-#Performs the search and sets the variables
-FIND_PACKAGE(Lua)
-
-#Set the search paths for the linking
-LINK_DIRECTORIES(
-  ${Lua_LIBRARIES}
-)
-
-#Set the search paths for include files
-INCLUDE_DIRECTORIES(
-  ${Lua_INCLUDE_DIR}
-)
-
-
-################ Source files ###################
-
-#add main source dir
-ADD_SUBDIRECTORY(src/util/tolua)
Index: code/branches/input/visual_studio/vc8/orxonox.vcproj
===================================================================
--- code/branches/input/visual_studio/vc8/orxonox.vcproj	(revision 1119)
+++ code/branches/input/visual_studio/vc8/orxonox.vcproj	(revision 1154)
@@ -384,4 +384,20 @@
 				</File>
 			</Filter>
+			<Filter
+				Name="tolua"
+				>
+				<File
+					RelativePath="..\..\src\orxonox\tolua\tolua_bind.cc"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+				</File>
+			</Filter>
 		</Filter>
 		<Filter
@@ -511,4 +527,12 @@
 				<File
 					RelativePath="..\..\src\orxonox\tools\Timer.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="tolua"
+				>
+				<File
+					RelativePath="..\..\src\orxonox\tolua\tolua_bind.h"
 					>
 				</File>
