Index: code/trunk/bin/CMakeLists.txt
===================================================================
--- code/trunk/bin/CMakeLists.txt	(revision 5772)
+++ code/trunk/bin/CMakeLists.txt	(revision 5774)
@@ -26,5 +26,5 @@
 
 # Create run scripts for Windows to manually add the DLL path when executing
-SET(RUN_SCRIPTS run standalone client1 client2 server dedicated)
+SET(RUN_SCRIPTS run)
 IF(WIN32)
   FOREACH(_script ${RUN_SCRIPTS})
Index: code/trunk/bin/client1.bat.in
===================================================================
--- code/trunk/bin/client1.bat.in	(revision 5772)
+++ 	(revision )
@@ -1,4 +1,0 @@
-title @PROJECT_NAME@
-path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
-@CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --client --writingPathSuffix client1
-pause
Index: code/trunk/bin/client1.in
===================================================================
--- code/trunk/bin/client1.in	(revision 5772)
+++ 	(revision )
@@ -1,4 +1,0 @@
-#!/bin/sh
-# convenience script for starting orxonox on Linux
-
-exec @CURRENT_RUNTIME_DIR@/@ORXONOX_EXECUTABLE_NAME@ --client --writingPathSuffix client1 $@
Index: code/trunk/bin/client2.bat.in
===================================================================
--- code/trunk/bin/client2.bat.in	(revision 5772)
+++ 	(revision )
@@ -1,4 +1,0 @@
-title @PROJECT_NAME@
-path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
-@CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --client --writingPathSuffix client2
-pause
Index: code/trunk/bin/client2.in
===================================================================
--- code/trunk/bin/client2.in	(revision 5772)
+++ 	(revision )
@@ -1,4 +1,0 @@
-#!/bin/sh
-# convenience script for starting orxonox on Linux
-
-exec @CURRENT_RUNTIME_DIR@/@ORXONOX_EXECUTABLE_NAME@ --client --writingPathSuffix client2 $@
Index: code/trunk/bin/dedicated.bat.in
===================================================================
--- code/trunk/bin/dedicated.bat.in	(revision 5772)
+++ 	(revision )
@@ -1,4 +1,0 @@
-title @PROJECT_NAME@
-path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
-@CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --dedicated --writingPathSuffix dedicated
-pause
Index: code/trunk/bin/dedicated.in
===================================================================
--- code/trunk/bin/dedicated.in	(revision 5772)
+++ 	(revision )
@@ -1,4 +1,0 @@
-#!/bin/sh
-# convenience script for starting orxonox on Linux
-
-exec @CURRENT_RUNTIME_DIR@/@ORXONOX_EXECUTABLE_NAME@ --dedicated --writingPathSuffix dedicated $@
Index: code/trunk/bin/server.bat.in
===================================================================
--- code/trunk/bin/server.bat.in	(revision 5772)
+++ 	(revision )
@@ -1,4 +1,0 @@
-title @PROJECT_NAME@
-path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
-@CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --server --writingPathSuffix server
-pause
Index: code/trunk/bin/server.in
===================================================================
--- code/trunk/bin/server.in	(revision 5772)
+++ 	(revision )
@@ -1,4 +1,0 @@
-#!/bin/sh
-# convenience script for starting orxonox on Linux
-
-exec @CURRENT_RUNTIME_DIR@/@ORXONOX_EXECUTABLE_NAME@ --server --writingPathSuffix server $@
Index: code/trunk/bin/standalone.bat.in
===================================================================
--- code/trunk/bin/standalone.bat.in	(revision 5772)
+++ 	(revision )
@@ -1,4 +1,0 @@
-title @PROJECT_NAME@
-path @RUNTIME_LIBRARY_DIRECTORY_WINDOWS@;%path%
-@CURRENT_RUNTIME_DIR_WINDOWS@\@ORXONOX_EXECUTABLE_NAME@ --standalone --writingPathSuffix standalone
-pause
Index: code/trunk/bin/standalone.in
===================================================================
--- code/trunk/bin/standalone.in	(revision 5772)
+++ 	(revision )
@@ -1,4 +1,0 @@
-#!/bin/sh
-# convenience script for starting orxonox on Linux
-
-exec @CURRENT_RUNTIME_DIR@/@ORXONOX_EXECUTABLE_NAME@ --standalone --writingPathSuffix standalone $@
Index: code/trunk/cmake/CheckOGREPlugins.cmake
===================================================================
--- code/trunk/cmake/CheckOGREPlugins.cmake	(revision 5772)
+++ 	(revision )
@@ -1,120 +1,0 @@
- #
- #             ORXONOX - the hottest 3D action shooter ever to exist
- #                             > www.orxonox.net <
- #
- #        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
- #            of the License, or (at your option) any later version.
- #
- #       This program is distributed in the hope that it will be useful,
- #        but WITHOUT ANY WARRANTY; without even the implied warranty of
- #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- #                 GNU General Public License for more details.
- #
- #   You should have received a copy of the GNU General Public License along
- #      with this program; if not, write to the Free Software Foundation,
- #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- #
- #
- #  Author:
- #    Reto Grieder
- #  Description:
- #    Function that checks each OGRE plugin for existance. Also looks for debug
- #    versions and sets them accordingly.
- #    All the plugins specified as function arguments have to be found or the
- #    script will issue a fatal error. Additionally, all release plugins have
- #    to be found in the same folder. Analogously for debug plugins.
- #    Output:
- #    OGRE_PLUGINS_FOLDER_DEBUG   Folder with the debug plugins
- #    OGRE_PLUGINS_FOLDER_RELEASE Folder with the release plugins
- #    OGRE_PLUGINS_DEBUG          Names of the debug plugins without extension
- #    OGRE_PLUGINS_RELEASE        Names of the release plugins without ext.
- #  Note:
- #    You must not specify render systems as input. That will be taken care of
- #    automatically.
- #
-
-FUNCTION(CHECK_OGRE_PLUGINS)
-
-  SET(OGRE_PLUGINS ${ARGN})
-
-  IF(WIN32)
-    # On Windows we need only *.dll, not *.lib. Especially the MSVC generator doesn't look for *.dll
-    SET(CMAKE_FIND_LIBRARY_SUFFIXES .dll)
-  ENDIF(WIN32)
-  # Do not prefix "lib" on any platform
-  SET(CMAKE_FIND_LIBRARY_PREFIXES "")
-
-  SET(OGRE_RENDER_SYSTEMS RenderSystem_GL RenderSystem_Direct3D9)
-  SET(OGRE_RENDER_SYSTEM_FOUND FALSE)
-  FOREACH(_plugin ${OGRE_PLUGINS} ${OGRE_RENDER_SYSTEMS})
-    FIND_LIBRARY(OGRE_PLUGIN_${_plugin}_OPTIMIZED
-      NAMES ${_plugin}
-      PATHS $ENV{OGRE_HOME} $ENV{OGRE_PLUGIN_DIR}
-      PATH_SUFFIXES bin/Release bin/release Release release lib lib/OGRE bin
-    )
-    FIND_LIBRARY(OGRE_PLUGIN_${_plugin}_DEBUG
-      NAMES ${_plugin}d ${_plugin}_d ${_plugin}
-      PATHS $ENV{OGRE_HOME} $ENV{OGRE_PLUGIN_DIR}
-      PATH_SUFFIXES bin/Debug bin/debug Debug debug lib lib/OGRE bin
-    )
-    # We only need at least one render system. Check at the end.
-    IF(NOT ${_plugin} MATCHES "RenderSystem")
-      IF(NOT OGRE_PLUGIN_${_plugin}_OPTIMIZED)
-        MESSAGE(FATAL_ERROR "Could not find OGRE plugin named ${_plugin}")
-      ENDIF()
-    ELSEIF(OGRE_PLUGIN_${_plugin}_OPTIMIZED)
-      SET(OGRE_RENDER_SYSTEM_FOUND TRUE)
-    ENDIF()
-
-    IF(OGRE_PLUGIN_${_plugin}_OPTIMIZED)
-      # If debug version is not available, release will do as well
-      IF(OGRE_PLUGIN_${_plugin}_DEBUG STREQUAL OGRE_PLUGIN_${_plugin}_OPTIMIZED)
-        # In this case the library finder didn't find real debug versions
-        SET(OGRE_PLUGIN_${_plugin}_DEBUG "OGRE_PLUGIN_${_plugin}_DEBUG-NOTFOUND" CACHE STRING "" FORCE)
-      ENDIF()
-      MARK_AS_ADVANCED(OGRE_PLUGIN_${_plugin}_OPTIMIZED OGRE_PLUGIN_${_plugin}_DEBUG)
-
-      ### Set variables to configure orxonox.ini correctly afterwards in bin/ ###
-      # Check and set the folders
-      GET_FILENAME_COMPONENT(_plugins_folder ${OGRE_PLUGIN_${_plugin}_OPTIMIZED} PATH)
-      IF(OGRE_PLUGINS_FOLDER_RELEASE AND NOT OGRE_PLUGINS_FOLDER_RELEASE STREQUAL _plugins_folder)
-        MESSAGE(FATAL_ERROR "Ogre release plugins have to be in the same folder!")
-      ENDIF()
-      SET(OGRE_PLUGINS_FOLDER_RELEASE ${_plugins_folder})
-      IF(OGRE_PLUGIN_${_plugin}_DEBUG)
-        GET_FILENAME_COMPONENT(_plugins_folder ${OGRE_PLUGIN_${_plugin}_DEBUG} PATH)
-      ENDIF()
-      IF(OGRE_PLUGINS_FOLDER_DEBUG AND NOT OGRE_PLUGINS_FOLDER_DEBUG STREQUAL _plugins_folder)
-        MESSAGE(FATAL_ERROR "Ogre debug plugins have to be in the same folder!")
-      ENDIF()
-      SET(OGRE_PLUGINS_FOLDER_DEBUG ${_plugins_folder})
-
-      # Create a list with the plugins for release and debug configurations
-      LIST(APPEND OGRE_PLUGINS_RELEASE ${_plugin})
-      # Determine debug postfix ("d" or "_d" or none)
-      IF(OGRE_PLUGIN_${_plugin}_DEBUG MATCHES "_d\\.|_d$")
-        LIST(APPEND OGRE_PLUGINS_DEBUG "${_plugin}_d")
-      ELSEIF(OGRE_PLUGIN_${_plugin}_DEBUG MATCHES "d\\.|d$")
-        LIST(APPEND OGRE_PLUGINS_DEBUG "${_plugin}d")
-      ELSE()
-        LIST(APPEND OGRE_PLUGINS_DEBUG "${_plugin}")
-      ENDIF()
-    ENDIF(OGRE_PLUGIN_${_plugin}_OPTIMIZED)
-  ENDFOREACH(_plugin)
-  IF(NOT OGRE_RENDER_SYSTEM_FOUND)
-      MESSAGE(FATAL_ERROR "Could not find an OGRE render system plugin")
-  ENDIF()
-
-  # List has to be comma separated for orxonox.ini
-  STRING(REPLACE ";" ", " OGRE_PLUGINS_RELEASE "${OGRE_PLUGINS_RELEASE}")
-  STRING(REPLACE ";" ", " OGRE_PLUGINS_DEBUG   "${OGRE_PLUGINS_DEBUG}")
-
-  # Set variables outside function scope
-  SET(OGRE_PLUGINS_FOLDER_DEBUG ${OGRE_PLUGINS_FOLDER_DEBUG} PARENT_SCOPE)
-  SET(OGRE_PLUGINS_FOLDER_RELEASE ${OGRE_PLUGINS_FOLDER_RELEASE} PARENT_SCOPE)
-  SET(OGRE_PLUGINS_RELEASE ${OGRE_PLUGINS_RELEASE} PARENT_SCOPE)
-  SET(OGRE_PLUGINS_DEBUG ${OGRE_PLUGINS_DEBUG} PARENT_SCOPE)
-
-ENDFUNCTION(CHECK_OGRE_PLUGINS)
Index: code/trunk/cmake/CompilerConfig.cmake
===================================================================
--- code/trunk/cmake/CompilerConfig.cmake	(revision 5772)
+++ code/trunk/cmake/CompilerConfig.cmake	(revision 5774)
@@ -34,11 +34,2 @@
   MESSAGE(STATUS "Warning: Your compiler is not officially supported.")
 ENDIF()
-
-SET(COMPILER_CONFIG_USER_SCRIPT "" CACHE FILEPATH
-    "Specify a CMake script if you wish to write your own compiler config.
-     See CompilerConfigGCC.cmake or CompilerConfigMSVC.cmake for examples.")
-IF(COMPILER_CONFIG_USER_SCRIPT)
-  IF(EXISTS ${CMAKE_MODULE_PATH}/${COMPILER_CONFIG_USER_SCRIPT})
-    INCLUDE(${CMAKE_MODULE_PATH}/${COMPILER_CONFIG_USER_SCRIPT})
-  ENDIF()
-ENDIF(COMPILER_CONFIG_USER_SCRIPT)
Index: code/trunk/cmake/FindALUT.cmake
===================================================================
--- code/trunk/cmake/FindALUT.cmake	(revision 5772)
+++ 	(revision )
@@ -1,80 +1,0 @@
-# - Locate FreeAlut
-# This module defines
-#  ALUT_LIBRARY
-#  ALUT_FOUND, if false, do not try to link against Alut
-#  ALUT_INCLUDE_DIR, where to find the headers
-#
-# $ALUTDIR is an environment variable that would
-# correspond to the ./configure --prefix=$ALUTDIR
-# used in building Alut.
-#
-# Created by Eric Wing. This was influenced by the FindSDL.cmake module.
-# On OSX, this will prefer the Framework version (if found) over others.
-# People will have to manually change the cache values of
-# ALUT_LIBRARY to override this selection.
-# Tiger will include OpenAL as part of the System.
-# But for now, we have to look around.
-# Other (Unix) systems should be able to utilize the non-framework paths.
-#
-# Several changes and additions by Fabian 'x3n' Landau
-# Some simplifications by Adrian Friedli and Reto Grieder
-#                 > www.orxonox.net <
-
-INCLUDE(FindPackageHandleStandardArgs)
-INCLUDE(HandleLibraryTypes)
-
-FIND_PATH(ALUT_INCLUDE_DIR AL/alut.h
-  PATHS
-  $ENV{ALUTDIR}
-  ~/Library/Frameworks/OpenAL.framework
-  /Library/Frameworks/OpenAL.framework
-  /System/Library/Frameworks/OpenAL.framework # Tiger
-  PATH_SUFFIXES include include/OpenAL include/AL Headers
-)
-
-# I'm not sure if I should do a special casing for Apple. It is
-# unlikely that other Unix systems will find the framework path.
-# But if they do ([Next|Open|GNU]Step?),
-# do they want the -framework option also?
-IF(${ALUT_INCLUDE_DIR} MATCHES ".framework")
-
-  STRING(REGEX REPLACE "(.*)/.*\\.framework/.*" "\\1" ALUT_FRAMEWORK_PATH_TMP ${ALUT_INCLUDE_DIR})
-  IF("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks"
-      OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks"
-      )
-    # String is in default search path, don't need to use -F
-    SET (ALUT_LIBRARY_OPTIMIZED "-framework OpenAL" CACHE STRING "OpenAL framework for OSX")
-  ELSE()
-    # String is not /Library/Frameworks, need to use -F
-    SET(ALUT_LIBRARY_OPTIMIZED "-F${ALUT_FRAMEWORK_PATH_TMP} -framework OpenAL" CACHE STRING "OpenAL framework for OSX")
-  ENDIF()
-  # Clear the temp variable so nobody can see it
-  SET(ALUT_FRAMEWORK_PATH_TMP "" CACHE INTERNAL "")
-
-ELSE()
-  FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED
-    NAMES alut
-    PATHS $ENV{ALUTDIR}
-    PATH_SUFFIXES lib libs
-  )
-  FIND_LIBRARY(ALUT_LIBRARY_DEBUG
-    NAMES alutd alut_d alutD alut_D
-    PATHS $ENV{ALUTDIR}
-    PATH_SUFFIXES lib libs
-  )
-ENDIF()
-
-# Handle the REQUIRED argument and set ALUT_FOUND
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALUT DEFAULT_MSG
-    ALUT_LIBRARY_OPTIMIZED
-    ALUT_INCLUDE_DIR
-)
-
-# Collect optimized and debug libraries
-HANDLE_LIBRARY_TYPES(ALUT)
-
-MARK_AS_ADVANCED(
-    ALUT_INCLUDE_DIR
-    ALUT_LIBRARY_OPTIMIZED
-    ALUT_LIBRARY_DEBUG
-)
Index: code/trunk/cmake/FindCEGUI.cmake
===================================================================
--- code/trunk/cmake/FindCEGUI.cmake	(revision 5772)
+++ 	(revision )
@@ -1,103 +1,0 @@
-# Find CEGUI includes and library
-#
-# This module defines
-#  CEGUI_INCLUDE_DIR
-#  CEGUI_LIBRARY, the library to link against to use CEGUI.
-#  CEGUI_FOUND, If false, do not try to use CEGUI
-#  CEGUI_VERSION, the version as string "x.y.z"
-#  CEGUILUA_LIBRARY, Script module library
-#  CEGUILUA_USE_INTERNAL_LIBRARY, True if CEGUILUA_LIBRARY was not defined here
-#
-# Input:
-#  ENV{CEGUIDIR}, CEGUI path, optional
-#  FIND CEGUILUA_INTERNAL_SUPPORT, List of all CEGUILua version supported
-#                                  in the source repository
-#  CEGUILUA_USE_EXTERNAL_LIBRARY, Force finding of CEGUILua
-#
-# Created by Matt Williams to find OGRE libraries
-# Copyright © 2007, Matt Williams
-#
-# Modified by Nicolas Schlumberger to find CEGUI libraries
-# and make it run on the Tardis-Infrastucture of the ETH Zurich
-# Copyright 2007, Nicolas Schlumberger
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-#
-# Several changes and additions by Fabian 'x3n' Landau
-# Lots of simplifications by Adrian Friedli and Reto Grieder
-# Version checking and CEGUILua finding by Reto Grieder
-#                 > www.orxonox.net <
-
-INCLUDE(DetermineVersion)
-INCLUDE(FindPackageHandleAdvancedArgs)
-INCLUDE(HandleLibraryTypes)
-
-FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
-  PATHS $ENV{CEGUIDIR}
-  PATH_SUFFIXES include include/CEGUI CEGUI.framework/Headers
-)
-FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED
-  NAMES CEGUIBase CEGUI
-  PATHS $ENV{CEGUIDIR}
-  PATH_SUFFIXES lib bin
-)
-FIND_LIBRARY(CEGUI_LIBRARY_DEBUG
-  NAMES
-    CEGUIBased CEGUIBase_d CEGUIBaseD CEGUIBase_D
-    CEGUId CEGUI_d CEGUID CEGUI_D
-  PATHS $ENV{CEGUIDIR}
-  PATH_SUFFIXES lib bin
-)
-
-# Inspect CEGUIVersion.h for the version number
-DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h)
-
-# Handle the REQUIRED argument and set CEGUI_FOUND
-# Also checks the version requirements if given
-FIND_PACKAGE_HANDLE_ADVANCED_ARGS(CEGUI DEFAULT_MSG "${CEGUI_VERSION}"
-  CEGUI_LIBRARY_OPTIMIZED
-  CEGUI_INCLUDE_DIR
-)
-
-# Collect optimized and debug libraries
-HANDLE_LIBRARY_TYPES(CEGUI)
-
-MARK_AS_ADVANCED(
-  CEGUI_INCLUDE_DIR
-  CEGUI_LIBRARY_OPTIMIZED
-  CEGUI_LIBRARY_DEBUG
-)
-
-LIST(FIND CEGUILUA_INTERNAL_SUPPORT "${CEGUI_VERSION}" _find_result)
-IF(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1)
-  # Also try to find the CEGUILua libraries.
-  # There would already be libraries in src/ for versions 0.5 and 0.6
-  FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED
-    NAMES CEGUILua
-    PATHS $ENV{CEGUIDIR}
-    PATH_SUFFIXES lib bin
-  )
-  FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG
-    NAMES CEGUILuad CEGUILua_d
-    PATHS $ENV{CEGUIDIR}
-    PATH_SUFFIXES lib bin
-  )
-
-  SET(CEGUILua_FIND_REQUIRED ${CEGUI_FIND_REQUIRED})
-  # Handle the REQUIRED argument and set CEGUILUA_FOUND
-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(CEGUILua DEFAULT_MSG
-    CEGUILUA_LIBRARY_OPTIMIZED
-  )
-
-  # Collect optimized and debug libraries
-  HANDLE_LIBRARY_TYPES(CEGUILUA)
-
-  MARK_AS_ADVANCED(
-    CEGUILUA_LIBRARY_OPTIMIZED
-    CEGUILUA_LIBRARY_DEBUG
-  )
-
-ELSE(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1)
-  SET(CEGUILUA_USE_INTERNAL_LIBRARY TRUE)
-ENDIF(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1)
-
Index: code/trunk/cmake/FindDirectX.cmake
===================================================================
--- code/trunk/cmake/FindDirectX.cmake	(revision 5772)
+++ 	(revision )
@@ -1,53 +1,0 @@
-# Find script for DirectX on Windows
-# Specifically designed to find dxguid and dinput8 for OIS
-# Once loaded this will define
-#   DIRECTX_FOUND        - system has DirectX
-#   DIRECTX_INCLUDE_DIR  - include directory for DirectX
-#   DIRECTX_LIBRARIES    - libraries for DirectX
-#
-# Set ENV{DXSD_DIR} if that has not been done the SDK installation.
-#
-# Several changes and additions by Fabian 'x3n' Landau
-# Simplifications and CMake 2.6.0 bugfix by Reto Grieder
-#                 > www.orxonox.net <
-
-INCLUDE(FindPackageHandleStandardArgs)
-INCLUDE(HandleLibraryTypes)
-
-FIND_PATH(DIRECTX_INCLUDE_DIR dinput.h
-  PATHS $ENV{DXSDK_DIR}
-  PATH_SUFFIXES include
-)
-FIND_LIBRARY(DIRECTX_LIBRARY_input dinput8
-  PATHS $ENV{DXSDK_DIR}
-  PATH_SUFFIXES lib Lib lib/x86 Lib/x86
-  NO_DEFAULT_PATH # Or else CMake 2.6.0 will find the dll in system32 on windows
-)
-FIND_LIBRARY(DIRECTX_LIBRARY_input dinput8
-  PATHS $ENV{DXSDK_DIR}
-  PATH_SUFFIXES lib Lib lib/x86 Lib/x86
-)
-FIND_LIBRARY(DIRECTX_LIBRARY_guid dxguid
-  PATHS $ENV{DXSDK_DIR}
-  PATH_SUFFIXES lib Lib lib/x86 Lib/x86
-  NO_DEFAULT_PATH # Or else CMake 2.6.0 will find the dll in system32 on windows
-)
-FIND_LIBRARY(DIRECTX_LIBRARY_guid dxguid
-  PATHS $ENV{DXSDK_DIR}
-  PATH_SUFFIXES lib Lib lib/x86 Lib/x86
-)
-
-# Handle the REQUIRED argument and set DIRECTX_FOUND
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(DirectX DEFAULT_MSG
-  DIRECTX_LIBRARY_input
-  DIRECTX_LIBRARY_guid
-  DIRECTX_INCLUDE_DIR
-)
-
-SET(DIRECTX_LIBRARIES ${DIRECTX_LIBRARY_input} ${DIRECTX_LIBRARY_guid})
-
-MARK_AS_ADVANCED(
-  DIRECTX_INCLUDE_DIR
-  DIRECTX_LIBRARY_input
-  DIRECTX_LIBRARY_guid
-)
Index: code/trunk/cmake/FindENet.cmake
===================================================================
--- code/trunk/cmake/FindENet.cmake	(revision 5772)
+++ 	(revision )
@@ -1,71 +1,0 @@
-# - Try to find enet
-# Once done this will define
-#
-#  ENET_FOUND - system has enet
-#  ENet_INCLUDE_DIR - the enet include directory
-#  ENet_LIBRARY - the library needed to link against enet
-#
-# $ENETDIR is an environment variable used for finding enet.
-#
-#  Borrowed from The Mana World
-#  http://themanaworld.org/
-#
-# Several changes and additions by Fabian 'x3n' Landau
-# Lots of simplifications by Adrian Friedli and Reto Grieder
-# Version checking by Reto Grieder
-#                 > www.orxonox.net <
-
-INCLUDE(FindPackageHandleAdvancedArgs)
-INCLUDE(HandleLibraryTypes)
-
-FIND_PATH(ENET_INCLUDE_DIR enet/enet.h
-  PATHS $ENV{ENETDIR}
-  PATH_SUFFIXES include
-)
-FIND_LIBRARY(ENET_LIBRARY_OPTIMIZED
-  NAMES enet
-  PATHS $ENV{ENETDIR}
-  PATH_SUFFIXES lib
-)
-FIND_LIBRARY(ENET_LIBRARY_DEBUG
-  NAMES enetd enet_d enet_D
-  PATHS $ENV{ENETDIR}
-  PATH_SUFFIXES lib
-)
-
-# Try to determine the version. Note that enet only stores the major
-# version in the header file. So we check for existing functions.
-# Hence the this script only distinguishes between 1.0, 1.1 and 1.2
-FILE(STRINGS ${ENET_INCLUDE_DIR}/enet/enet.h _enet_header REGEX "ENET_")
-IF(_enet_header MATCHES "ENET_VERSION[ \t]*=[ \t]*1")
-  IF(_enet_header MATCHES "enet_socket_set_option")
-    SET(ENET_VERSION 1.2)
-  ELSEIF(_enet_header MATCHES "enet_peer_disconnect_later")
-    SET(ENET_VERSION 1.1)
-  ELSE()
-    SET(ENET_VERSION 1.0)
-  ENDIF()
-ELSE()
-  SET(ENET_VERSION 0) # Script doesn't support versions below 1.0
-ENDIF()
-
-# Handle the REQUIRED argument and set ENET_FOUND
-# Also check the the version requirements
-FIND_PACKAGE_HANDLE_ADVANCED_ARGS(ENet DEFAULT_MSG ${ENET_VERSION}
-  ENET_LIBRARY_OPTIMIZED
-  ENET_INCLUDE_DIR
-)
-
-# Collect optimized and debug libraries
-IF(NOT LINK_ENET_DYNAMIC AND WIN32)
-  # ENet is linked statically, hence we need to add some windows dependencies
-  HANDLE_LIBRARY_TYPES(ENET ws2_32 winmm)
-ELSE()
-  HANDLE_LIBRARY_TYPES(ENET)
-ENDIF()
-
-MARK_AS_ADVANCED(
-  ENET_INCLUDE_DIR
-  ENET_LIBRARY_OPTIMIZED
-  ENET_LIBRARY_DEBUG
-)
Index: code/trunk/cmake/FindOgg.cmake
===================================================================
--- code/trunk/cmake/FindOgg.cmake	(revision 5772)
+++ 	(revision )
@@ -1,47 +1,0 @@
-# - Try to find ogg
-# Once done this will define
-#
-#  OGG_FOUND - system has ogg
-#  OGG_INCLUDE_DIR
-#  OGG_LIBRARY
-#
-# $OGGDIR is an environment variable used
-# for finding ogg.
-#
-# Several changes and additions by Fabian 'x3n' Landau
-# Most of all rewritten by Adrian Friedli
-# Debug versions and simplifications by Reto Grieder
-#                 > www.orxonox.net <
-
-INCLUDE(FindPackageHandleStandardArgs)
-INCLUDE(HandleLibraryTypes)
-
-FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h
-  PATHS $ENV{OGGDIR}
-  PATH_SUFFIXES include
-)
-FIND_LIBRARY(OGG_LIBRARY_OPTIMIZED
-  NAMES ogg
-  PATHS $ENV{OGGDIR}
-  PATH_SUFFIXES lib
-)
-FIND_LIBRARY(OGG_LIBRARY_DEBUG
-  NAMES oggd ogg_d oggD ogg_D
-  PATHS $ENV{OGGDIR}
-  PATH_SUFFIXES lib
-)
-
-# Handle the REQUIRED argument and set OGG_FOUND
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ogg DEFAULT_MSG
-  OGG_LIBRARY_OPTIMIZED
-  OGG_INCLUDE_DIR
-)
-
-# Collect optimized and debug libraries
-HANDLE_LIBRARY_TYPES(OGG)
-
-MARK_AS_ADVANCED(
-  OGG_INCLUDE_DIR
-  OGG_LIBRARY_OPTIMIZED
-  OGG_LIBRARY_DEBUG
-)
Index: code/trunk/cmake/FindVorbis.cmake
===================================================================
--- code/trunk/cmake/FindVorbis.cmake	(revision 5772)
+++ 	(revision )
@@ -1,62 +1,0 @@
-# - Try to find ogg/vorbis
-# Once done this will define
-#
-#  VORBIS_FOUND - system has vorbis
-#  VORBIS_INCLUDE_DIR
-#  VORBIS_LIBRARIES - vorbis and vorbisfile libraries
-#
-# $VORBISDIR is an environment variable used
-# for finding vorbis.
-#
-# Several changes and additions by Fabian 'x3n' Landau
-# Most of all rewritten by Adrian Friedli
-# Debug versions and simplifications by Reto Grieder
-#                 > www.orxonox.net <
-
-INCLUDE(FindPackageHandleStandardArgs)
-INCLUDE(HandleLibraryTypes)
-
-FIND_PATH(VORBIS_INCLUDE_DIR vorbis/codec.h
-  PATHS $ENV{VORBISDIR}
-  PATH_SUFFIXES include
-)
-FIND_LIBRARY(VORBIS_LIBRARY_OPTIMIZED
-  NAMES vorbis
-  PATHS $ENV{VORBISDIR}
-  PATH_SUFFIXES lib
-)
-FIND_LIBRARY(VORBIS_LIBRARY_DEBUG
-  NAMES vorbisd vorbis_d vorbisD vorbis_D
-  PATHS $ENV{VORBISDIR}
-  PATH_SUFFIXES lib
-)
-FIND_LIBRARY(VORBISFILE_LIBRARY_OPTIMIZED
-  NAMES vorbisfile
-  PATHS $ENV{VORBISDIR}
-  PATH_SUFFIXES lib
-)
-FIND_LIBRARY(VORBISFILE_LIBRARY_DEBUG
-  NAMES vorbisfiled vorbisfile_d vorbisfileD vorbisfile_D
-  PATHS $ENV{VORBISDIR}
-  PATH_SUFFIXES lib
-)
-
-# Handle the REQUIRED argument and set VORBIS_FOUND
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Vorbis DEFAULT_MSG
-  VORBIS_LIBRARY_OPTIMIZED
-  VORBISFILE_LIBRARY_OPTIMIZED
-  VORBIS_INCLUDE_DIR
-)
-
-# Collect optimized and debug libraries
-HANDLE_LIBRARY_TYPES(VORBIS)
-HANDLE_LIBRARY_TYPES(VORBISFILE)
-SET(VORBIS_LIBRARIES ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY})
-
-MARK_AS_ADVANCED(
-  VORBIS_INCLUDE_DIR
-  VORBIS_LIBRARY_OPTIMIZED
-  VORBIS_LIBRARY_DEBUG
-  VORBISFILE_LIBRARY_OPTIMIZED
-  VORBISFILE_LIBRARY_DEBUG
-)
Index: code/trunk/cmake/LibraryConfig.cmake
===================================================================
--- code/trunk/cmake/LibraryConfig.cmake	(revision 5772)
+++ code/trunk/cmake/LibraryConfig.cmake	(revision 5774)
@@ -48,5 +48,4 @@
 # Scripts for specific library and CMake config
 INCLUDE(LibraryConfigTardis)
-INCLUDE(LibraryConfigApple)
 
 IF(DEPENDENCY_PACKAGE_ENABLE)
@@ -71,45 +70,8 @@
 ENDIF(DEPENDENCY_PACKAGE_ENABLE)
 
-# User script
-SET(LIBRARY_CONFIG_USER_SCRIPT "" CACHE FILEPATH
-    "Specify a CMake script if you wish to write your own library path config.
-     See LibraryConfigTardis.cmake for an example.")
-IF(LIBRARY_CONFIG_USER_SCRIPT)
-  IF(EXISTS ${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT})
-    INCLUDE(${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT})
-  ENDIF()
-ENDIF(LIBRARY_CONFIG_USER_SCRIPT)
-
-
 ############### Library finding #################
 # Performs the search and sets the variables    #
 
 FIND_PACKAGE(OGRE  1.4       REQUIRED)
-FIND_PACKAGE(ENet  1.1       REQUIRED)
-FIND_PACKAGE(Ogg             REQUIRED)
-FIND_PACKAGE(Vorbis          REQUIRED)
-FIND_PACKAGE(ALUT            REQUIRED)
-FIND_PACKAGE(ZLIB            REQUIRED)
-IF(WIN32)
-  FIND_PACKAGE(DirectX       REQUIRED)
-ENDIF(WIN32)
-
-##### CEGUI #####
-# We make use of the CEGUI script module called CEGUILua.
-# However there is a small issue with that: We use Tolua, a C++ binding
-# generator ourselves. And we also have to use our bindings in the same
-# lua state is CEGUILua's. Unfortunately this implies that both lua runtime
-# version are equal or else you get segmentation faults.
-# In order to match the Lua versions we decided to ship CEGUILua in our
-# repository, mainly because there is no way to determine which version of
-# Lua CEGUILua was linked against (you'd have to specify yourself) and secondly
-# because we can then choose the Lua version. Future plans might involve only
-# accepting Lua 5.1.
-
-# Insert all internally supported CEGUILua versions here
-SET(CEGUILUA_INTERNAL_SUPPORT 0.5.0 0.6.0 0.6.1 0.6.2)
-OPTION(CEGUILUA_USE_EXTERNAL_LIBRARY "Force the use of external CEGUILua library" OFF)
-FIND_PACKAGE(CEGUI 0.5 REQUIRED)
-
 ##### Lua #####
 IF(CEGUILUA_USE_EXTERNAL_LIBRARY)
@@ -124,25 +86,4 @@
 ENDIF()
 FIND_PACKAGE(Lua ${LUA_VERSION_REQUEST} EXACT REQUIRED)
-
-##### OpenAL #####
-FIND_PACKAGE(OpenAL REQUIRED)
-# Also use parent include dir (without AL/) for ALUT
-IF(OPENAL_INCLUDE_DIR MATCHES "/AL$")
-  GET_FILENAME_COMPONENT(ALT_OPENAL_INCLUDE_DIR ${OPENAL_INCLUDE_DIR} PATH)
-ENDIF()
-SET(OPENAL_INCLUDE_DIRS ${OPENAL_INCLUDE_DIR} ${ALT_OPENAL_INCLUDE_DIR})
-# Notfiy user
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
-# Hide variables created by the script
-MARK_AS_ADVANCED(OPENAL_INCLUDE_DIR OPENAL_LIBRARY)
-
-##### Tcl #####
-# We only require Tcl, so avoid confusing user about other Tcl stuff by
-# applying a little workaround
-SET(Tclsh_FIND_QUIETLY TRUE)
-FIND_PACKAGE(TCL QUIET)
-# Display messages separately
-SET(TCL_FIND_QUIETLY FALSE)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH)
 
 ##### Boost #####
@@ -161,9 +102,5 @@
 IF(WIN32)
   OPTION(LINK_BOOST_DYNAMIC "Link Boost dynamically on Windows" TRUE)
-  OPTION(LINK_CEGUI_DYNAMIC "Link CEGUI dynamicylly on Windows" TRUE)
-  OPTION(LINK_ENET_DYNAMIC  "Link ENet dynamically on Windows" TRUE)
   OPTION(LINK_OGRE_DYNAMIC  "Link OGRE dynamically on Windows" TRUE)
-  OPTION(LINK_TCL_DYNAMIC   "Link TCL dynamically on Windows" TRUE)
-  OPTION(LINK_ZLIB_DYNAMIC  "Link ZLib dynamically on Windows" TRUE)
   COMPARE_VERSION_STRINGS("${LUA_VERSION}" "5.1" _version_comparison)
   IF(_version_comparison LESS 0)
@@ -175,26 +112,8 @@
   IF(DEPENDENCY_PACKAGE_ENABLE)
     MARK_AS_ADVANCED(
-      LINK_BOOST_DYNAMIC LINK_CEGUI_DYNAMIC LINK_ENET_DYNAMIC
-      LINK_OGRE_DYNAMIC  LINK_TCL_DYNAMIC   LINK_ZLIB_DYNAMIC
+      LINK_BOOST_DYNAMIC
+      LINK_OGRE_DYNAMIC
       LINK_LUA_DYNAMIC
     )
   ENDIF()
 ENDIF(WIN32)
-
-
-################# OGRE Plugins ##################
-
-# More plugins: Plugin_BSPSceneManager, Plugin_OctreeSceneManager
-SET(OGRE_PLUGINS_INT Plugin_ParticleFX)
-IF(WIN32)
-  # CG program manager is probably DirectX related (not available under unix)
-  LIST(APPEND OGRE_PLUGINS_INT Plugin_CgProgramManager)
-ENDIF(WIN32)
-SET(OGRE_PLUGINS ${OGRE_PLUGINS_INT} CACHE STRING
-   "Specify which OGRE plugins to load. Existance check is performed.")
-
-# Check the plugins and determine the plugin folder
-# You can give a hint by setting the environment variable ENV{OGRE_PLUGIN_DIR}
-INCLUDE(CheckOGREPlugins)
-CHECK_OGRE_PLUGINS(${OGRE_PLUGINS})
-
Index: code/trunk/cmake/LibraryConfigApple.cmake
===================================================================
--- code/trunk/cmake/LibraryConfigApple.cmake	(revision 5772)
+++ 	(revision )
@@ -1,43 +1,0 @@
- #
- #             ORXONOX - the hottest 3D action shooter ever to exist
- #                             > www.orxonox.net <
- #
- #        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
- #            of the License, or (at your option) any later version.
- #
- #       This program is distributed in the hope that it will be useful,
- #        but WITHOUT ANY WARRANTY; without even the implied warranty of
- #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- #                 GNU General Public License for more details.
- #
- #   You should have received a copy of the GNU General Public License along
- #      with this program; if not, write to the Free Software Foundation,
- #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- #
- #
- #  Author:
- #    Yuning Chai
- #  Description:
- #    Sets necessary library options and paths on Mac.
- #
- 
-IF(APPLE)
-  MESSAGE(STATUS "Running on Apple. Using customized paths and options.")
-
-  SET(ENV{OGRE_HOME} "/Developer/SDKs/OgreSDK/Dependencies")
-  SET(ENV{CEGUIDIR} "/Developer/SDKs/OgreSDK/Dependencies")
-
-  #MESSAGE(STATUS $ENV{OGRE_HOME})
-
-  SET(CMAKE_FIND_FRAMEWORK "FIRST")
-
-#  SET(OGRE_LIBRARY_OPTIMIZED "/Developer/SDKs/OgreSDK/Dependencies/Ogre.framework/Ogre")
-
-#  SET(CEGUI_LIBRARY_OPTIMIZED "/Developer/SDKs/OgreSDK/Dependencies/CEGUI.framework/CEGUI")
-
-#  SET(OGRE_LIBRARY_OPTIMIZED  "/Developer/SDKs/OgreSDK/Dependencies/Ogre.framework" CACHE STRING "Ogre lib for OSX")
-#  SET(CEGUI_LIBRARY_OPTIMIZED  "/Developer/SDKs/OgreSDK/Dependencies/CEGUI.framework" CACHE STRING "CEGUI lib for OSX")
-
-ENDIF(APPLE)
Index: code/trunk/cmake/LibraryConfigTardis.cmake
===================================================================
--- code/trunk/cmake/LibraryConfigTardis.cmake	(revision 5772)
+++ code/trunk/cmake/LibraryConfigTardis.cmake	(revision 5774)
@@ -44,12 +44,5 @@
   SET(BOOST_INCLUDEDIR "/usr/pack/boost-1.36.0-sd/include/boost-1_36")
   SET(BOOST_LIBRARYDIR "/usr/pack/boost-1.36.0-sd/i686-debian-linux4.0/lib")
-  SET(ENV{CEGUIDIR}    "/usr/pack/cegui-0.6.2-sd;/usr/pack/cegui-0.6.2-sd/i686-debian-linux4.0")
-  SET(ENV{ENETDIR}     "/usr/pack/enet-1.2-sd;/usr/pack/enet-1.2-sd/i686-debian-linux4.0")
-  SET(ENV{ALUTDIR}     "/usr/pack/openal-0.0.8-cl;/usr/pack/openal-0.0.8-cl/i686-debian-linux3.1")
-  SET(ENV{OGGDIR}      "/usr/pack/oggvorbis-1.0-ds;/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0")
-  SET(ENV{VORBISDIR}   "/usr/pack/oggvorbis-1.0-ds;/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0")
   SET(ENV{LUA_DIR}     "/usr/pack/lua-5.1.4-sd;/usr/pack/lua-5.1.4-sd/i686-debian-linux4.0")
   SET(ENV{OGRE_HOME}   "/usr/pack/ogre-1.4.9-sd;/usr/pack/ogre-1.4.9-sd/i686-debian-linux4.0")
-  SET(ENV{OPENALDIR}   "/usr/pack/openal-0.0.8-cl;/usr/pack/openal-0.0.8-cl/i686-debian-linux3.1")
-  #SET(TCL_INCLUDE_PATH "/usr/pack/tcltk-8.4.9.linux-mo/include")
 ENDIF(TARDIS)
Index: code/trunk/cmake/PackageConfig.cmake
===================================================================
--- code/trunk/cmake/PackageConfig.cmake	(revision 5772)
+++ code/trunk/cmake/PackageConfig.cmake	(revision 5774)
@@ -57,25 +57,9 @@
 
 # Include paths and other special treatments
-SET(ENV{ALUTDIR}               ${DEP_INCLUDE_DIR}/freealut)
 SET(ENV{BOOST_ROOT}            ${DEP_INCLUDE_DIR}/boost)
-SET(ENV{CEGUIDIR}              ${DEP_INCLUDE_DIR}/cegui)
-SET(ENV{DXSDK_DIR}             ${DEP_INCLUDE_DIR}/directx)
-SET(ENV{ENETDIR}               ${DEP_INCLUDE_DIR}/enet)
 SET(ENV{LUA_DIR}               ${DEP_INCLUDE_DIR}/lua)
-SET(ENV{OGGDIR}                ${DEP_INCLUDE_DIR}/libogg)
-SET(ENV{VORBISDIR}             ${DEP_INCLUDE_DIR}/libvorbis)
 SET(ENV{OGRE_HOME}             ${DEP_INCLUDE_DIR}/ogre)
-SET(ENV{OGRE_PLUGIN_DIR}       ${DEP_BINARY_DIR})
-SET(ENV{OPENALDIR}             ${DEP_INCLUDE_DIR}/openal)
-LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/tcl/include)
-LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/zlib/include)
 
 ### INSTALL ###
-
-# Tcl script library
-INSTALL(
-  DIRECTORY ${DEP_LIBRARY_DIR}/tcl/
-  DESTINATION lib/tcl
-)
 
 # On Windows, DLLs have to be in the executable folder, install them
Index: code/trunk/cmake/PackageConfigMSVC.cmake
===================================================================
--- code/trunk/cmake/PackageConfigMSVC.cmake	(revision 5772)
+++ code/trunk/cmake/PackageConfigMSVC.cmake	(revision 5774)
@@ -52,9 +52,4 @@
   SET(CMAKE_LIBRARY_PATH ${DEP_LIBRARY_DIR})
 
-  # Certain find scripts don't behave as ecpected to we have
-  # to specify the libraries ourselves.
-  SET(TCL_LIBRARY  ${DEP_LIBRARY_DIR}/tcl85.lib CACHE FILEPATH "")
-  SET(ZLIB_LIBRARY ${DEP_LIBRARY_DIR}/zdll.lib  CACHE FILEPATH "")
-
   # Visual Leak Detector
   SET(VLD_INCLUDE_DIR  ${DEP_INCLUDE_DIR}/vld   CACHE PATH "")
Index: code/trunk/cmake/PackageConfigMinGW.cmake
===================================================================
--- code/trunk/cmake/PackageConfigMinGW.cmake	(revision 5772)
+++ code/trunk/cmake/PackageConfigMinGW.cmake	(revision 5774)
@@ -45,8 +45,3 @@
   SET(CMAKE_LIBRARY_PATH ${DEP_LIBRARY_DIR} ${DEP_BINARY_DIR})
 
-  # Certain find scripts don't behave as ecpected to we have
-  # to specify the libraries ourselves.
-  SET(TCL_LIBRARY  ${DEP_BINARY_DIR}/tcl85.dll CACHE FILEPATH "")
-  SET(ZLIB_LIBRARY ${DEP_BINARY_DIR}/zlib1.dll CACHE FILEPATH "")
-
 ENDIF(MINGW)
Index: code/trunk/data/CMakeLists.txt
===================================================================
--- code/trunk/data/CMakeLists.txt	(revision 5772)
+++ code/trunk/data/CMakeLists.txt	(revision 5774)
@@ -30,37 +30,9 @@
 SET(DATA_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE)
 
-# Specify data directory
-GET_FILENAME_COMPONENT(_search_path_1 ${CMAKE_SOURCE_DIR}/../data_extern ABSOLUTE)
-FIND_PATH(EXTERNAL_DATA_DIRECTORY resources.oxr
-  PATHS
-    ${CMAKE_SOURCE_DIR}/data_extern
-    ${_search_path_1}
-  NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH
-)
-
-IF(NOT EXTERNAL_DATA_DIRECTORY)
-  MESSAGE(STATUS "Warning: External data directory not found. If you want to compile while downloading the data files, you will have to recompile about four files afterwards and relink everything.")
-  MESSAGE(STATUS "You can specify your own folder with the EXTERNAL_DATA_DIRECTORY variable. Default location for the path is orxonox_root/data_extern")
-  # Temporary override to the default location.
-  SET(EXTERNAL_DATA_DIRECTORY ${CMAKE_SOURCE_DIR}/data_extern)
-ENDIF()
-
-
 ################ Installation #################
 
-# Internal directory
 INSTALL(
   DIRECTORY ${DATA_DIRECTORY}/
   DESTINATION ${DATA_INSTALL_DIRECTORY}
-  REGEX "\\.svn$|_svn$|CMakeLists.txt|InstallScript.cmake" EXCLUDE
+  REGEX "\\.svn$|_svn$|CMakeLists.txt" EXCLUDE
 )
-# External directory
-INSTALL(
-  DIRECTORY ${EXTERNAL_DATA_DIRECTORY}/
-  DESTINATION ${DATA_INSTALL_DIRECTORY}
-  REGEX "\\.svn$|_svn$|resources\\.oxr" EXCLUDE
-)
-# Configure the install scripts (variables not available during installation)
-CONFIGURE_FILE(DataInstallScript.cmake ${CMAKE_CURRENT_BINARY_DIR}/DataInstallScript.cmake @ONLY)
-# Join both resources.oxr files
-INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/DataInstallScript.cmake)
Index: code/trunk/data/DataInstallScript.cmake
===================================================================
--- code/trunk/data/DataInstallScript.cmake	(revision 5772)
+++ 	(revision )
@@ -1,37 +1,0 @@
- #
- #             ORXONOX - the hottest 3D action shooter ever to exist
- #                             > www.orxonox.net <
- #
- #        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
- #            of the License, or (at your option) any later version.
- #
- #       This program is distributed in the hope that it will be useful,
- #        but WITHOUT ANY WARRANTY; without even the implied warranty of
- #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- #                 GNU General Public License for more details.
- #
- #   You should have received a copy of the GNU General Public License along
- #      with this program; if not, write to the Free Software Foundation,
- #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- #
- #
- #  Author:
- #    Reto Grieder
- #  Description:
- #    Joins both resources.oxr files together
- #  Caution:
- #    Variables are declared with @...@ because they don't exist anymore
- #    during the installation. But we still require variables (_external_file)
- #    so we can only replace @...@ but not ${...}
- #
-
-# Write some comment
-FILE(APPEND @DATA_INSTALL_DIRECTORY@/resources.oxr "\n\n\n <!-- ---------------------------------------- -->")
-FILE(APPEND @DATA_INSTALL_DIRECTORY@/resources.oxr     "\n <!-- Content from the external data directory -->")
-FILE(APPEND @DATA_INSTALL_DIRECTORY@/resources.oxr     "\n <!-- ---------------------------------------- -->\n\n")
-
-# Append the external file
-FILE(READ   @EXTERNAL_DATA_DIRECTORY@/resources.oxr _external_file)
-FILE(APPEND @DATA_INSTALL_DIRECTORY@/resources.oxr ${_external_file})
Index: code/trunk/data/defaultConfig/keybindings.ini
===================================================================
--- code/trunk/data/defaultConfig/keybindings.ini	(revision 5772)
+++ 	(revision )
@@ -1,173 +1,0 @@
-[Keys]
-KeyA="scale -1 moveRightLeft"
-KeyABNT_C1=
-KeyABNT_C2=
-KeyAT=
-KeyAX=
-KeyApostrophe=
-KeyApps=
-KeyB=
-KeyBack=
-KeyBackslash=
-KeyC=switchCamera
-KeyCalculator=
-KeyCapsLock=
-KeyColon=
-KeyComma=
-KeyConvert=
-KeyD="scale 1 moveRightLeft"
-KeyDelete="scale 1 rotateRoll"
-KeyDivide=
-KeyDown="scale -1 moveFrontBack"
-KeyE="scale -1 rotateRoll"
-KeyEnd=boost
-KeyEquals=
-KeyEscape="exit"
-KeyF="scale -1 moveUpDown"
-KeyF1=
-KeyF10=
-KeyF11=
-KeyF12=
-KeyF13=
-KeyF14=
-KeyF15=
-KeyF2="OverlayGroup toggleVisibility Stats"
-KeyF3=
-KeyF4=
-KeyF5=
-KeyF6=
-KeyF7=
-KeyF8=
-KeyF9=
-KeyG=greet
-KeyGrave=
-KeyH=
-KeyHome=showGUI
-KeyI=
-KeyInsert=
-KeyJ=
-KeyK=
-KeyKana=
-KeyKanji=
-KeyL=dropItems
-KeyLeft="scale -1 moveRightLeft"
-KeyLeftAlt=
-KeyLeftBracket=
-KeyLeftControl=mouseLook
-KeyLeftShift=
-KeyLeftWindows=
-KeyLessThan=
-KeyM=openMap
-KeyMail=
-KeyMediaSelect=
-KeyMediaStop=
-KeyMinus=
-KeyMultiply=
-KeyMute=
-KeyMyComputer=
-KeyN=
-KeyNextTrack=
-KeyNoConvert=
-KeyNumLock=
-KeyNumRow0=
-KeyNumRow1=
-KeyNumRow2=
-KeyNumRow3=
-KeyNumRow4=
-KeyNumRow5=
-KeyNumRow6=
-KeyNumRow7=
-KeyNumRow8=
-KeyNumRow9=
-KeyNumpad0=
-KeyNumpad1=
-KeyNumpad2=
-KeyNumpad3=
-KeyNumpad4=
-KeyNumpad5=
-KeyNumpad6=
-KeyNumpad7=
-KeyNumpad8=
-KeyNumpad9=
-KeyNumpadAdd=
-KeyNumpadComma=
-KeyNumpadEnter=
-KeyNumpadEquals=
-KeyNumpadPeriod=
-KeyNumpadSubtract=
-KeyO=
-KeyP=
-KeyPageDown="scale -1 rotateRoll"
-KeyPageUp=
-KeyPause=pause
-KeyPeriod=
-KeyPlayPause=
-KeyPower=
-KeyPreviousTrack=
-KeyQ="scale 1 rotateRoll"
-KeyR="scale 1 moveUpDown"
-KeyReturn=
-KeyRight="scale 1 moveRightLeft"
-KeyRightAlt=
-KeyRightBracket=
-KeyRightControl="scale -1 moveUpDown"
-KeyRightShift="scale 1 moveUpDown"
-KeyRightWindows=
-KeyS="scale -1 moveFrontBack"
-KeyScrollLock=
-KeySemicolon=
-KeySlash=
-KeySleep=
-KeySpace=boost
-KeyStop=
-KeySystemRequest=
-KeyT=
-KeyTab="cycleNavigationFocus"
-KeyU=
-KeyUP="scale 1 moveFrontBack"
-KeyUnassigned=
-KeyUnderline=
-KeyUnlabeled=
-KeyV=
-KeyVolumeDown=
-KeyVolumeUp=
-KeyW="scale 1 moveFrontBack"
-KeyWake=
-KeyWebBack=
-KeyWebFavorites=
-KeyWebForward=
-KeyWebHome=
-KeyWebRefresh=
-KeyWebSearch=
-KeyWebStop=
-KeyX=
-KeyY=
-KeyYen=
-KeyZ=
-
-[MouseButtons]
-MouseButton3=
-MouseButton4=
-MouseButton5=
-MouseButton6=
-MouseButton7=
-MouseLeft="fire 0"
-MouseMiddle=
-MouseRight="fire 1"
-MouseWheel1Down=
-MouseWheel1Up=
-MouseWheel2Down=
-MouseWheel2Up=
-Left="fire 0"
-Right="fire 1"
-
-[MouseAxes]
-MouseXNeg="scale 1 rotateYaw"
-MouseXPos="scale -1 rotateYaw"
-MouseYNeg="scale -1 rotatePitch"
-MouseYPos="scale 1 rotatePitch"
-XNeg="scale 1 rotateYaw"
-XPos="scale -1 rotateYaw"
-YNeg="scale -1 rotatePitch"
-YPos="scale 1 rotatePitch"
-
Index: code/trunk/data/defaultConfig/masterKeybindings.ini
===================================================================
--- code/trunk/data/defaultConfig/masterKeybindings.ini	(revision 5772)
+++ 	(revision )
@@ -1,167 +1,0 @@
-[Keys]
-KeyA=
-KeyABNT_C1=
-KeyABNT_C2=
-KeyAT=
-KeyAX=
-KeyApostrophe=
-KeyApps=
-KeyB=
-KeyBack=
-KeyBackslash=
-KeyC=
-KeyCalculator=
-KeyCapsLock=
-KeyColon=
-KeyComma=
-KeyConvert=
-KeyD=
-KeyDelete=
-KeyDivide=
-KeyDown=
-KeyE=
-KeyEnd=
-KeyEquals=
-KeyEscape=
-KeyF=
-KeyF1="OverlayGroup toggleVisibility Debug"
-KeyF10=
-KeyF11=
-KeyF12=
-KeyF13=
-KeyF14=
-KeyF15=
-KeyF2=
-KeyF3=
-KeyF4=
-KeyF5=
-KeyF6=
-KeyF7=
-KeyF8=
-KeyF9=
-KeyG=
-KeyGrave="openConsole"
-KeyH=
-KeyHome=
-KeyI=
-KeyInsert=
-KeyJ=
-KeyK=
-KeyKana=
-KeyKanji=
-KeyL=
-KeyLeft=
-KeyLeftAlt=
-KeyLeftBracket=
-KeyLeftControl=
-KeyLeftShift=
-KeyLeftWindows=
-KeyLessThan=
-KeyM=
-KeyMail=
-KeyMediaSelect=
-KeyMediaStop=
-KeyMinus=
-KeyMultiply=
-KeyMute=
-KeyMyComputer=
-KeyN=
-KeyNextTrack=
-KeyNoConvert=
-KeyNumLock=
-KeyNumRow0=
-KeyNumRow1=
-KeyNumRow2=
-KeyNumRow3=
-KeyNumRow4=
-KeyNumRow5=
-KeyNumRow6=
-KeyNumRow7=
-KeyNumRow8=
-KeyNumRow9=
-KeyNumpad0=
-KeyNumpad1=
-KeyNumpad2=
-KeyNumpad3=
-KeyNumpad4=
-KeyNumpad5=
-KeyNumpad6=
-KeyNumpad7=
-KeyNumpad8=
-KeyNumpad9=
-KeyNumpadAdd=
-KeyNumpadComma=
-KeyNumpadEnter=
-KeyNumpadEquals=
-KeyNumpadPeriod=
-KeyNumpadSubtract=
-KeyO=
-KeyP=
-KeyPageDown=
-KeyPageUp=
-KeyPause=
-KeyPeriod=
-KeyPlayPause=
-KeyPower=
-KeyPreviousTrack=
-KeyQ=
-KeyR=
-KeyReturn=
-KeyRight=
-KeyRightAlt=
-KeyRightBracket=
-KeyRightControl=
-KeyRightShift=
-KeyRightWindows=
-KeyS=
-KeyScrollLock=
-KeySemicolon=
-KeySlash=
-KeySleep=
-KeySpace=
-KeyStop=
-KeySystemRequest=
-KeyT=
-KeyTab=
-KeyU=
-KeyUP=
-KeyUnassigned="openConsole"
-KeyUnderline=
-KeyUnlabeled=
-KeyV=
-KeyVolumeDown=
-KeyVolumeUp=
-KeyW=
-KeyWake=
-KeyWebBack=
-KeyWebFavorites=
-KeyWebForward=
-KeyWebHome=
-KeyWebRefresh=
-KeyWebSearch=
-KeyWebStop=
-KeyX=
-KeyY=
-KeyYen=
-KeyZ=
-
-[MouseButtons]
-MouseButton3=
-MouseButton4=
-MouseButton5=
-MouseButton6=
-MouseButton7=
-MouseLeft=
-MouseMiddle=
-MouseRight=
-MouseWheel1Down=
-MouseWheel1Up=
-MouseWheel2Down=
-MouseWheel2Up=
-
-[MouseAxes]
-MouseXNeg=
-MouseXPos=
-MouseYNeg=
-MouseYPos=
-
Index: code/trunk/data/resources.oxr
===================================================================
--- code/trunk/data/resources.oxr	(revision 5772)
+++ 	(revision )
@@ -1,14 +1,0 @@
-<ResourceCollection resourceGroup = "General" >
-    <ResourceLocation path = "levels" />
-    <ResourceLocation path = "lua" />
-    <ResourceLocation path = "overlays" />
-    <ResourceLocation path = "particle" />
-    <ResourceLocation path = "tcl" />
-</ResourceCollection>
-
-<ResourceCollection resourceGroup = "GUI" >
-    <ResourceLocation path = "gui/configs" />
-    <ResourceLocation path = "gui/layouts" />
-    <ResourceLocation path = "gui/schemes" />
-    <ResourceLocation path = "gui/scripts" />
-</ResourceCollection>
Index: code/trunk/src/CMakeLists.txt
===================================================================
--- code/trunk/src/CMakeLists.txt	(revision 5772)
+++ code/trunk/src/CMakeLists.txt	(revision 5774)
@@ -38,15 +38,7 @@
 # If no defines are specified, these libs get linked statically
 ADD_COMPILER_FLAGS("-DBOOST_ALL_DYN_LINK" WIN32 LINK_BOOST_DYNAMIC)
-ADD_COMPILER_FLAGS("-DENET_DLL"           WIN32 LINK_ENET_DYNAMIC)
 ADD_COMPILER_FLAGS("-DLUA_BUILD_AS_DLL"   WIN32 LINK_LUA_DYNAMIC)
-ADD_COMPILER_FLAGS("-DOIS_DYNAMIC_LIB")
-ADD_COMPILER_FLAGS("-DZLIB_DLL"           WIN32 LINK_ZLIB_DYNAMIC)
 # If no defines are specified, these libs get linked dynamically
-ADD_COMPILER_FLAGS("-DCEGUI_STATIC"       WIN32 NOT LINK_CEGUI_DYNAMIC)
 ADD_COMPILER_FLAGS("-DOGRE_STATIC_LIB"    WIN32 NOT LINK_OGRE_DYNAMIC)
-ADD_COMPILER_FLAGS("-DSTATIC_BUILD"       WIN32 NOT LINK_TCL_DYNAMIC)
-
-# Use TinyXML++
-ADD_COMPILER_FLAGS("-DTIXML_USE_TICPP")
 
 ############## Include Directories ##############
@@ -56,15 +48,6 @@
   # External
   ${OGRE_INCLUDE_DIR}
-  ${CEGUI_INCLUDE_DIR}
-  ${ENET_INCLUDE_DIR}
   ${Boost_INCLUDE_DIRS}
-  ${OPENAL_INCLUDE_DIRS}
-  ${ALUT_INCLUDE_DIR}
-  ${VORBIS_INCLUDE_DIR}
-  ${OGG_INCLUDE_DIR}
   ${LUA_INCLUDE_DIR}
-  ${TCL_INCLUDE_PATH}
-  ${DIRECTX_INCLUDE_DIR}
-  ${ZLIB_INCLUDE_DIR}
   ${VLD_INCLUDE_DIR}
 
@@ -72,15 +55,8 @@
   # relative to "external" to avoid conflicts
   ${CMAKE_CURRENT_SOURCE_DIR}/external
-  # Include directories needed even if only included by Orxonox
-  ${CMAKE_CURRENT_SOURCE_DIR}/external/bullet
-  ${CMAKE_CURRENT_SOURCE_DIR}/external/ois
 
   # OrxonoxConfig.h
   ${CMAKE_CURRENT_BINARY_DIR}
 )
-
-IF(CEGUILUA_USE_INTERNAL_LIBRARY)
-  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/external/ceguilua/ceguilua-${CEGUI_VERSION})
-ENDIF()
 
 ################### Tolua Bind ##################
Index: code/trunk/src/SpecialConfig.h.in
===================================================================
--- code/trunk/src/SpecialConfig.h.in	(revision 5772)
+++ code/trunk/src/SpecialConfig.h.in	(revision 5774)
@@ -44,10 +44,4 @@
 
 /**
-@def CEGUILUA_USE_INTERNAL_LIBRARY
-    Set whether we must suffix "ceguilua/" for the CEGUILua.h include
-*/
-#cmakedefine CEGUILUA_USE_INTERNAL_LIBRARY
-
-/**
 @def DEPENDENCY_PACKAGE_ENABLE
     Defined if a precompiled depdency package was used. We then copy all libraries
@@ -90,5 +84,4 @@
     // DEVELOPMENT RUN PATHS
     const char dataDevDirectory[]           = "@DATA_DIRECTORY@";
-    const char externalDataDevDirectory[]   = "@EXTERNAL_DATA_DIRECTORY@";
 #ifdef CMAKE_CONFIGURATION_TYPES
     const char moduleDevDirectory[]         = "@CMAKE_MODULE_OUTPUT_DIRECTORY@/" BOOST_PP_STRINGIZE(CMAKE_BUILD_TYPE);
@@ -107,21 +100,4 @@
     // Module extension
     const char moduleExtension[] = "@ORXONOX_MODULE_EXTENSION@";
-
-    // OGRE PLUGINS
-#ifdef NDEBUG
-    const char ogrePlugins[] = "@OGRE_PLUGINS_RELEASE@";
-#  ifdef DEPENDENCY_PACKAGE_ENABLE
-    const char ogrePluginsDirectory[] = ".";
-#  else
-    const char ogrePluginsDirectory[] = "@OGRE_PLUGINS_FOLDER_RELEASE@";
-#  endif
-#else
-    const char ogrePlugins[] = "@OGRE_PLUGINS_DEBUG@";
-#  ifdef DEPENDENCY_PACKAGE_ENABLE
-    const char ogrePluginsDirectory[] = ".";
-#  else
-    const char ogrePluginsDirectory[] = "@OGRE_PLUGINS_FOLDER_DEBUG@";
-#  endif
-#endif
 } }
 
Index: code/trunk/src/external/CMakeLists.txt
===================================================================
--- code/trunk/src/external/CMakeLists.txt	(revision 5772)
+++ code/trunk/src/external/CMakeLists.txt	(revision 5774)
@@ -21,18 +21,2 @@
 
 ADD_SUBDIRECTORY(tolua)
-
-# Include CEGUILua if not requested otherwise
-IF(CEGUILUA_USE_INTERNAL_LIBRARY)
-  IF(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua/ceguilua-${CEGUI_VERSION})
-    MESSAGE(FATAL_ERROR "CEGUILua version not found in src folder. Update list of supported versions in LibraryConfig.cmake!")
-  ENDIF()
-
-  ADD_SUBDIRECTORY(ceguilua)
-  SET(CEGUILUA_LIBRARY ${CEGUILUA_LIBRARY} PARENT_SCOPE)
-ENDIF()
-
-ADD_SUBDIRECTORY(bullet)
-ADD_SUBDIRECTORY(cpptcl)
-ADD_SUBDIRECTORY(ogreceguirenderer)
-ADD_SUBDIRECTORY(ois)
-ADD_SUBDIRECTORY(tinyxml)
Index: code/trunk/src/libraries/CMakeLists.txt
===================================================================
--- code/trunk/src/libraries/CMakeLists.txt	(revision 5772)
+++ code/trunk/src/libraries/CMakeLists.txt	(revision 5774)
@@ -26,5 +26,3 @@
 
 ADD_SUBDIRECTORY(core)
-ADD_SUBDIRECTORY(network)
-ADD_SUBDIRECTORY(tools)
 ADD_SUBDIRECTORY(util)
Index: code/trunk/src/libraries/core/ArgumentCompleter.h
===================================================================
--- code/trunk/src/libraries/core/ArgumentCompleter.h	(revision 5772)
+++ 	(revision )
@@ -1,79 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _ArgumentCompleter_H__
-#define _ArgumentCompleter_H__
-
-#include "CorePrereqs.h"
-#include "ArgumentCompletionListElement.h"
-
-namespace orxonox
-{
-    class _CoreExport ArgumentCompleter
-    {
-        public:
-            ArgumentCompleter(ArgumentCompletionList (*function) (void)) : paramCount_(0), function_0_(function) {}
-            ArgumentCompleter(ArgumentCompletionList (*function) (const std::string& param1)) : paramCount_(1), function_1_(function) {}
-            ArgumentCompleter(ArgumentCompletionList (*function) (const std::string& param1, const std::string& param2)) : paramCount_(2), function_2_(function) {}
-            ArgumentCompleter(ArgumentCompletionList (*function) (const std::string& param1, const std::string& param2, const std::string& param3)) : paramCount_(3), function_3_(function) {}
-            ArgumentCompleter(ArgumentCompletionList (*function) (const std::string& param1, const std::string& param2, const std::string& param3, const std::string& param4)) : paramCount_(4), function_4_(function) {}
-            ArgumentCompleter(ArgumentCompletionList (*function) (const std::string& param1, const std::string& param2, const std::string& param3, const std::string& param4, const std::string& param5)) : paramCount_(5), function_5_(function) {}
-
-            ArgumentCompletionList operator()(const std::string& param1 = "", const std::string& param2 = "", const std::string& param3 = "", const std::string& param4 = "", const std::string& param5 = "")
-            {
-                switch (this->paramCount_)
-                {
-                    case 0:
-                        return (*this->function_0_)();
-                    case 1:
-                        return (*this->function_1_)(param1);
-                    case 2:
-                        return (*this->function_2_)(param1, param2);
-                    case 3:
-                        return (*this->function_3_)(param1, param2, param3);
-                    case 4:
-                        return (*this->function_4_)(param1, param2, param3, param4);
-                    case 5:
-                        return (*this->function_5_)(param1, param2, param3, param4, param5);
-                    default:
-                        return ArgumentCompletionList();
-                }
-            }
-
-        private:
-            unsigned char paramCount_;
-            ArgumentCompletionList (*function_0_) (void);
-            ArgumentCompletionList (*function_1_) (const std::string& param1);
-            ArgumentCompletionList (*function_2_) (const std::string& param1, const std::string& param2);
-            ArgumentCompletionList (*function_3_) (const std::string& param1, const std::string& param2, const std::string& param3);
-            ArgumentCompletionList (*function_4_) (const std::string& param1, const std::string& param2, const std::string& param3, const std::string& param4);
-            ArgumentCompletionList (*function_5_) (const std::string& param1, const std::string& param2, const std::string& param3, const std::string& param4, const std::string& param5);
-    };
-}
-
-#endif /* _ArgumentCompleter_H__ */
Index: code/trunk/src/libraries/core/ArgumentCompletionFunctions.cc
===================================================================
--- code/trunk/src/libraries/core/ArgumentCompletionFunctions.cc	(revision 5772)
+++ 	(revision )
@@ -1,150 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "ArgumentCompletionFunctions.h"
-
-#include <map>
-#include <boost/version.hpp>
-#include <boost/filesystem.hpp>
-
-#include "util/Convert.h"
-#include "util/StringUtils.h"
-#include "Identifier.h"
-#include "ConfigValueContainer.h"
-#include "TclThreadManager.h"
-
-// Boost 1.36 has some issues with deprecated functions that have been omitted
-#if (BOOST_VERSION == 103600)
-#  define BOOST_LEAF_FUNCTION filename
-#else
-#  define BOOST_LEAF_FUNCTION leaf
-#endif
-
-namespace orxonox
-{
-    namespace autocompletion
-    {
-        ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(fallback)()
-        {
-            return ArgumentCompletionList();
-        }
-
-        ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(files)(const std::string& fragment)
-        {
-            ArgumentCompletionList dirlist;
-            ArgumentCompletionList filelist;
-
-            try
-            {
-                boost::filesystem::path input(fragment);
-                boost::filesystem::path startdirectory(input.branch_path());
-
-                if (!boost::filesystem::exists(startdirectory))
-                {
-                    startdirectory = ".";
-                }
-#ifdef ORXONOX_PLATFORM_WINDOWS
-                else
-                {
-                    std::string dir = startdirectory.string();
-                    if (dir.size() > 0 && dir[dir.size() - 1] == ':')
-                        startdirectory = dir + '/';
-                }
-#endif
-
-                boost::filesystem::directory_iterator file(startdirectory);
-                boost::filesystem::directory_iterator end;
-
-                while (file != end)
-                {
-                    if (boost::filesystem::is_directory(*file))
-                        dirlist.push_back(ArgumentCompletionListElement((*file).string() + '/', getLowercase((*file).string()) + '/', (*file).BOOST_LEAF_FUNCTION() + '/'));
-                    else
-                        filelist.push_back(ArgumentCompletionListElement((*file).string(), getLowercase((*file).string()), (*file).BOOST_LEAF_FUNCTION()));
-                    ++file;
-                }
-            }
-            catch (...) {}
-
-            filelist.insert(filelist.begin(), dirlist.begin(), dirlist.end());
-            return filelist;
-        }
-
-        ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(configvalueclasses)()
-        {
-            ArgumentCompletionList classlist;
-
-            for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getIdentifierMapBegin(); it != Identifier::getIdentifierMapEnd(); ++it)
-                if ((*it).second->hasConfigValues())
-                    classlist.push_back(ArgumentCompletionListElement((*it).second->getName(), getLowercase((*it).first)));
-
-            return classlist;
-        }
-
-        ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(configvalues)(const std::string& fragment, const std::string& classname)
-        {
-            ArgumentCompletionList configvalues;
-            std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getIdentifierMap().find(classname);
-
-            if (identifier != Identifier::getIdentifierMapEnd() && (*identifier).second->hasConfigValues())
-            {
-                for (std::map<std::string, ConfigValueContainer*>::const_iterator it = (*identifier).second->getConfigValueMapBegin(); it != (*identifier).second->getConfigValueMapEnd(); ++it)
-                    configvalues.push_back(ArgumentCompletionListElement((*it).second->getName(), getLowercase((*it).first)));
-            }
-
-            return configvalues;
-        }
-
-        ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(configvalue)(const std::string& fragment, const std::string& varname, const std::string& classname)
-        {
-            ArgumentCompletionList oldvalue;
-            std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseIdentifierMap().find(getLowercase(classname));
-            if (identifier != Identifier::getLowercaseIdentifierMapEnd())
-            {
-                std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname));
-                if (variable != (*identifier).second->getLowercaseConfigValueMapEnd())
-                {
-                    std::string valuestring = (*variable).second->toString();
-                    oldvalue.push_back(ArgumentCompletionListElement(valuestring, getLowercase(valuestring), "Old value: " + valuestring));
-                }
-            }
-            return oldvalue;
-        }
-
-        ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(tclthreads)()
-        {
-            std::list<unsigned int> threadnumbers = TclThreadManager::getInstance().getThreadList();
-            ArgumentCompletionList threads;
-
-            for (std::list<unsigned int>::const_iterator it = threadnumbers.begin(); it != threadnumbers.end(); ++it)
-                threads.push_back(ArgumentCompletionListElement(multi_cast<std::string>(*it)));
-
-            return threads;
-        }
-    }
-}
Index: code/trunk/src/libraries/core/ArgumentCompletionFunctions.h
===================================================================
--- code/trunk/src/libraries/core/ArgumentCompletionFunctions.h	(revision 5772)
+++ 	(revision )
@@ -1,63 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _ArgumentCompletionFunctions_H__
-#define _ArgumentCompletionFunctions_H__
-
-#include "CorePrereqs.h"
-#include "ArgumentCompleter.h"
-
-
-#define ARGUMENT_COMPLETION_FUNCTION_DECLARATION(functionname) \
-    _CoreExport ArgumentCompleter* functionname(); \
-    _CoreExport ArgumentCompletionList acf_##functionname
-
-#define ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(functionname) \
-    ArgumentCompleter* functionname() \
-    { \
-        static ArgumentCompleter completer = ArgumentCompleter(&acf_##functionname); \
-        return &completer; \
-    } \
-    \
-    ArgumentCompletionList acf_##functionname
-
-
-namespace orxonox
-{
-    namespace autocompletion
-    {
-        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(fallback)();
-        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(files)(const std::string& fragment);
-        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(configvalueclasses)();
-        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(configvalues)(const std::string& fragment, const std::string& classname);
-        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(configvalue)(const std::string& fragment, const std::string& varname, const std::string& classname);
-        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(tclthreads)();
-    }
-}
-
-#endif /* _ArgumentCompletionFunctions_H__ */
Index: code/trunk/src/libraries/core/ArgumentCompletionListElement.h
===================================================================
--- code/trunk/src/libraries/core/ArgumentCompletionListElement.h	(revision 5772)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _ArgumentCompletionListElement_H__
-#define _ArgumentCompletionListElement_H__
-
-#include "CorePrereqs.h"
-
-#include <list>
-#include <string>
-
-namespace orxonox
-{
-    const int ACL_MODE_NORMAL    = 1;
-    const int ACL_MODE_LOWERCASE = 2;
-    const int ACL_MODE_DISPLAY   = 4;
-
-    typedef std::list<ArgumentCompletionListElement> ArgumentCompletionList;
-
-    class _CoreExport ArgumentCompletionListElement
-    {
-        public:
-            ArgumentCompletionListElement(const std::string& normalcase) : mode_(ACL_MODE_NORMAL), normalCase_(normalcase) {}
-            ArgumentCompletionListElement(const std::string& normalcase, const std::string& lowercase) : mode_(ACL_MODE_NORMAL | ACL_MODE_LOWERCASE), normalCase_(normalcase), lowerCase_(lowercase) {}
-            ArgumentCompletionListElement(const std::string& normalcase, const std::string& lowercase, const std::string& display) : mode_(ACL_MODE_NORMAL | ACL_MODE_LOWERCASE | ACL_MODE_DISPLAY), normalCase_(normalcase), lowerCase_(lowercase), display_(display) {}
-
-            const std::string& getString() const
-                { return this->normalCase_; }
-            const std::string& getComparable() const
-                { if (this->mode_ & ACL_MODE_LOWERCASE) { return this->lowerCase_; } else { return this->normalCase_; } }
-            const std::string& getDisplay() const
-                { if (this->mode_ & ACL_MODE_DISPLAY) { return this->display_; } else { return this->normalCase_; } }
-
-            bool lowercaseComparison() const
-                { return (this->mode_ & ACL_MODE_LOWERCASE); }
-
-            bool operator<(const ArgumentCompletionListElement& other) const
-                { return (this->getComparable() < other.getComparable()); }
-
-        private:
-            unsigned char mode_;
-            std::string normalCase_;
-            std::string lowerCase_;
-            std::string display_;
-    };
-}
-
-#endif /* _ArgumentCompletionListElement_H__ */
Index: code/trunk/src/libraries/core/BaseObject.cc
===================================================================
--- code/trunk/src/libraries/core/BaseObject.cc	(revision 5772)
+++ code/trunk/src/libraries/core/BaseObject.cc	(revision 5774)
@@ -33,17 +33,5 @@
 
 #include "BaseObject.h"
-
-#include <tinyxml/tinyxml.h>
-
-#include "util/StringUtils.h"
 #include "CoreIncludes.h"
-#include "Event.h"
-#include "EventIncludes.h"
-#include "Functor.h"
-#include "Iterator.h"
-#include "Template.h"
-#include "XMLFile.h"
-#include "XMLNameListener.h"
-#include "XMLPort.h"
 
 namespace orxonox
@@ -59,29 +47,4 @@
 
         this->bInitialized_ = true;
-
-        this->bActive_ = true;
-        this->bVisible_ = true;
-        this->oldGametype_ = 0;
-
-        this->lastLoadedXMLElement_ = 0;
-
-        this->functorSetMainState_ = 0;
-        this->functorGetMainState_ = 0;
-
-        this->setCreator(creator);
-        if (this->creator_)
-        {
-            this->setFile(this->creator_->getFile());
-            this->setNamespace(this->creator_->getNamespace());
-            this->setScene(this->creator_->getScene());
-            this->setGametype(this->creator_->getGametype());
-        }
-        else
-        {
-            this->file_ = 0;
-            this->namespace_ = 0;
-            this->scene_ = 0;
-            this->gametype_ = 0;
-        }
     }
 
@@ -93,250 +56,5 @@
         if (this->isInitialized())
         {
-            for (std::list<BaseObject*>::const_iterator it = this->events_.begin(); it != this->events_.end(); ++it)
-                (*it)->unregisterEventListener(this);
-
-            for (std::map<BaseObject*, std::string>::const_iterator it = this->eventListeners_.begin(); it != this->eventListeners_.end(); ++it)
-                it->first->removeEvent(this);
-
-            if (this->functorSetMainState_)
-                delete this->functorSetMainState_;
-            if (this->functorGetMainState_)
-                delete this->functorGetMainState_;
         }
     }
-
-    /**
-        @brief XML loading and saving.
-        @param xmlelement The XML-element
-        @param loading Loading (true) or saving (false)
-        @return The XML-element
-    */
-    void BaseObject::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        XMLPortParam(BaseObject, "name", setXMLName, getName, xmlelement, mode);
-        XMLPortParam(BaseObject, "visible", setVisible, isVisible, xmlelement, mode);
-        XMLPortParam(BaseObject, "active", setActive, isActive, xmlelement, mode);
-        XMLPortParam(BaseObject, "mainstate", setMainStateName, getMainStateName, xmlelement, mode);
-
-        XMLPortObjectTemplate(BaseObject, Template, "templates", addTemplate, getTemplate, xmlelement, mode, Template*);
-
-        Element* events = xmlelement.FirstChildElement("events", false);
-
-        if (events)
-        {
-            std::list<std::string> eventnames;
-
-            if (mode == XMLPort::LoadObject || mode == XMLPort::ExpandObject)
-            {
-                for (ticpp::Iterator<ticpp::Element> child = events->FirstChildElement(false); child != child.end(); child++)
-                    eventnames.push_back(child->Value());
-            }
-            else if (mode == XMLPort::SaveObject)
-            {
-                for (std::map<std::string, XMLPortObjectContainer*>::const_iterator it = this->getIdentifier()->getXMLPortEventMapBegin(); it != this->getIdentifier()->getXMLPortEventMapEnd(); ++it)
-                    eventnames.push_back(it->first);
-            }
-
-            for (std::list<std::string>::iterator it = eventnames.begin(); it != eventnames.end(); ++it)
-            {
-                std::string sectionname = (*it);
-                ExecutorMember<BaseObject>* loadexecutor = createExecutor(createFunctor(&BaseObject::addEvent), std::string( "BaseObject" ) + "::" + "addEvent");
-                ExecutorMember<BaseObject>* saveexecutor = createExecutor(createFunctor(&BaseObject::getEvent), std::string( "BaseObject" ) + "::" + "getEvent");
-                loadexecutor->setDefaultValue(1, sectionname);
-
-                XMLPortClassObjectContainer<BaseObject, BaseObject>* container = 0;
-                container = (XMLPortClassObjectContainer<BaseObject, BaseObject>*)(this->getIdentifier()->getXMLPortEventContainer(sectionname));
-                if (!container)
-                {
-                    container = new XMLPortClassObjectContainer<BaseObject, BaseObject>(sectionname, this->getIdentifier(), loadexecutor, saveexecutor, false, true);
-                    this->getIdentifier()->addXMLPortEventContainer(sectionname, container);
-                }
-                container->port(this, *events, mode);
-            }
-        }
-    }
-
-    /**
-        @brief Loads the name of the object through XML and calls all XMLNameListener.
-        @param name The name of the object
-    */
-    void BaseObject::setXMLName(const std::string& name)
-    {
-        this->setName(name);
-
-        for (ObjectList<XMLNameListener>::iterator it = ObjectList<XMLNameListener>::begin(); it != ObjectList<XMLNameListener>::end(); ++it)
-            it->loadedNewXMLName(this);
-    }
-
-    /**
-        @brief Returns the levelfile that loaded this object.
-        @return The levelfile
-    */
-    const std::string& BaseObject::getFilename() const
-    {
-        if (this->file_)
-            return this->file_->getFilename();
-        else
-            return BLANKSTRING;
-    }
-
-    /**
-        @brief Adds a Template to the object.
-        @param name The name of the Template
-    */
-    void BaseObject::addTemplate(const std::string& name)
-    {
-        Template* temp = Template::getTemplate(name);
-        if (temp)
-            this->addTemplate(temp);
-        else
-            COUT(1) << "Error: \"" << name << "\" is not a valid Template name (in class: " << this->getIdentifier()->getName() << ", name: " << this->getName() << ")." << std::endl;
-    }
-
-    /**
-        @brief Adds a Template to the object.
-        @param temp The Template
-    */
-    void BaseObject::addTemplate(Template* temp)
-    {
-        this->templates_.insert(temp);
-        temp->applyOn(this);
-    }
-
-    /**
-        @brief Returns the Template with the given index.
-        @param index The index
-    */
-    Template* BaseObject::getTemplate(unsigned int index) const
-    {
-        unsigned int i = 0;
-        for (std::set<Template*>::const_iterator it = this->templates_.begin(); it != this->templates_.end(); ++it)
-        {
-            if (i == index)
-                return (*it);
-            i++;
-        }
-        return 0;
-    }
-
-    void BaseObject::addEvent(BaseObject* event, const std::string& sectionname)
-    {
-        event->registerEventListener(this, sectionname);
-        this->events_.push_back(event);
-    }
-
-    void BaseObject::removeEvent(BaseObject* event)
-    {
-        this->events_.remove(event);
-    }
-
-    BaseObject* BaseObject::getEvent(unsigned int index) const
-    {
-        unsigned int i = 0;
-        for (std::list<BaseObject*>::const_iterator it = this->events_.begin(); it != this->events_.end(); ++it)
-        {
-            if (i == index)
-                return (*it);
-            ++i;
-        }
-        return 0;
-    }
-
-    void BaseObject::addEventContainer(const std::string& sectionname, EventContainer* container)
-    {
-        std::map<std::string, EventContainer*>::const_iterator it = this->eventContainers_.find(sectionname);
-        if (it != this->eventContainers_.end())
-        {
-            COUT(2) << "Warning: Overwriting EventContainer in class " << this->getIdentifier()->getName() << "." << std::endl;
-            delete (it->second);
-        }
-
-        this->eventContainers_[sectionname] = container;
-    }
-
-    EventContainer* BaseObject::getEventContainer(const std::string& sectionname) const
-    {
-        std::map<std::string, EventContainer*>::const_iterator it = this->eventContainers_.find(sectionname);
-        if (it != this->eventContainers_.end())
-            return ((*it).second);
-        else
-            return 0;
-    }
-
-    void BaseObject::fireEvent()
-    {
-        this->fireEvent(true);
-        this->fireEvent(false);
-    }
-
-    void BaseObject::fireEvent(bool activate)
-    {
-        this->fireEvent(activate, this);
-    }
-
-    void BaseObject::fireEvent(bool activate, BaseObject* originator)
-    {
-        Event event(activate, originator);
-
-        for (std::map<BaseObject*, std::string>::iterator it = this->eventListeners_.begin(); it != this->eventListeners_.end(); ++it)
-        {
-            event.sectionname_ = it->second;
-            it->first->processEvent(event);
-        }
-    }
-
-    void BaseObject::fireEvent(Event& event)
-    {
-        for (std::map<BaseObject*, std::string>::iterator it = this->eventListeners_.begin(); it != this->eventListeners_.end(); ++it)
-            it->first->processEvent(event);
-    }
-
-    void BaseObject::processEvent(Event& event)
-    {
-        ORXONOX_SET_EVENT(BaseObject, "activity", setActive, event);
-        ORXONOX_SET_EVENT(BaseObject, "visibility", setVisible, event);
-    }
-
-    void BaseObject::setMainStateName(const std::string& name)
-    {
-        if (this->mainStateName_ != name)
-        {
-            this->mainStateName_ = name;
-            if (this->functorSetMainState_)
-                delete this->functorSetMainState_;
-            if (this->functorGetMainState_)
-                delete this->functorGetMainState_;
-            this->changedMainState();
-            if (!this->functorSetMainState_)
-                COUT(2) << "Warning: \"" << name << "\" is not a valid MainState." << std::endl;
-        }
-    }
-
-    void BaseObject::setMainState(bool state)
-    {
-        if (this->functorSetMainState_)
-            (*this->functorSetMainState_)(state);
-        else
-            COUT(2) << "Warning: No MainState defined in object \"" << this->getName() << "\" (" << this->getIdentifier()->getName() << ")" << std::endl;
-    }
-
-    bool BaseObject::getMainState() const
-    {
-        if (this->functorGetMainState_)
-        {
-            (*this->functorGetMainState_)();
-            return this->functorGetMainState_->getReturnvalue();
-        }
-        else
-        {
-            COUT(2) << "Warning: No MainState defined in object \"" << this->getName() << "\" (" << this->getIdentifier()->getName() << ")" << std::endl;
-            return false;
-        }
-    }
-
-    void BaseObject::changedMainState()
-    {
-        SetMainState(BaseObject, "activity",   setActive,  isActive);
-        SetMainState(BaseObject, "visibility", setVisible, isVisible);
-    }
 }
Index: code/trunk/src/libraries/core/BaseObject.h
===================================================================
--- code/trunk/src/libraries/core/BaseObject.h	(revision 5772)
+++ code/trunk/src/libraries/core/BaseObject.h	(revision 5774)
@@ -37,177 +37,26 @@
 #define _BaseObject_H__
 
-#define SetMainState(classname, statename, setfunction, getfunction) \
-    if (this->getMainStateName() == statename) \
-    { \
-        this->functorSetMainState_ = createFunctor(&classname::setfunction)->setObject(this); \
-        this->functorGetMainState_ = createFunctor(&classname::getfunction)->setObject(this); \
-    }
-
-
 #include "CorePrereqs.h"
-
-#include <map>
-#include <list>
-
-#include "util/mbool.h"
 #include "OrxonoxClass.h"
-#include "Super.h"
 
 namespace orxonox
 {
-    class Scene;
-    class Gametype;
-
     //! The BaseObject is the parent of all classes representing an instance in the game.
     class _CoreExport BaseObject : virtual public OrxonoxClass
     {
-        template <class T> friend class XMLPortClassParamContainer;
-
         public:
             BaseObject(BaseObject* creator);
             virtual ~BaseObject();
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
 
             /** @brief Returns if the object was initialized (passed the object registration). @return True was the object is initialized */
             inline bool isInitialized() const { return this->bInitialized_; }
 
-            /** @brief Sets the name of the object. @param name The name */
-            inline void setName(const std::string& name) { this->oldName_ = this->name_; this->name_ = name; this->changedName(); }
-            /** @brief Returns the name of the object. */
-            inline const std::string& getName() const { return this->name_; }
-            /** @brief Returns the old name of the object. */
-            inline const std::string& getOldName() const { return this->oldName_; }
-            /** @brief This function gets called if the name of the object changes. */
-            virtual void changedName() {}
-
-            /** @brief Sets the state of the objects activity. @param bActive True = active */
-            inline void setActive(bool bActive)
-            {
-                if (this->bActive_ != bActive)
-                {
-                    this->bActive_ = bActive;
-                    this->changedActivity();
-                }
-            }
-            /** @brief Returns the state of the objects activity. @return The state of the activity */
-            inline const mbool& isActive() const { return this->bActive_; }
-            /** @brief This function gets called if the activity of the object changes. */
-            virtual void changedActivity() {}
-
-            /** @brief Sets the state of the objects visibility. @param bVisible True = visible */
-            inline void setVisible(bool bVisible)
-            {
-                if (this->bVisible_ != bVisible)
-                {
-                    this->bVisible_ = bVisible;
-                    this->changedVisibility();
-                }
-            }
-            /** @brief Returns the state of the objects visibility. @return The state of the visibility */
-            inline const mbool& isVisible() const { return this->bVisible_; }
-            /** @brief This function gets called if the visibility of the object changes. */
-            virtual void changedVisibility() {}
-
-            void setMainState(bool state);
-            bool getMainState() const;
-
-            void setMainStateName(const std::string& name);
-            inline const std::string& getMainStateName() const { return this->mainStateName_; }
-            virtual void changedMainState();
-
-            /** @brief Sets a pointer to the xml file that loaded this object. @param file The pointer to the XMLFile */
-            inline void setFile(const XMLFile* file) { this->file_ = file; }
-            /** @brief Returns a pointer to the XMLFile that loaded this object. @return The XMLFile */
-            inline const XMLFile* getFile() const { return this->file_; }
-            const std::string& getFilename() const;
-
-            void addTemplate(const std::string& name);
-            void addTemplate(Template* temp);
-            /** @brief Returns the set of all aplied templates. */
-            inline const std::set<Template*>& getTemplates() const
-                { return this->templates_; }
-
-            virtual inline void setNamespace(Namespace* ns) { this->namespace_ = ns; }
-            inline Namespace* getNamespace() const { return this->namespace_; }
-
             inline void setCreator(BaseObject* creator) { this->creator_ = creator; }
             inline BaseObject* getCreator() const { return this->creator_; }
 
-            inline void setScene(Scene* scene) { this->scene_ = scene; }
-            inline Scene* getScene() const { return this->scene_; }
-
-            inline void setGametype(Gametype* gametype)
-            {
-                if (gametype != this->gametype_)
-                {
-                    this->oldGametype_ = this->gametype_;
-                    this->gametype_ = gametype;
-                    this->changedGametype();
-                }
-            }
-            inline Gametype* getGametype() const { return this->gametype_; }
-            inline Gametype* getOldGametype() const { return this->oldGametype_; }
-            virtual void changedGametype() {}
-
-            void fireEvent();
-            void fireEvent(bool activate);
-            void fireEvent(bool activate, BaseObject* originator);
-            void fireEvent(Event& event);
-
-            virtual void processEvent(Event& event);
-
-            inline void registerEventListener(BaseObject* object, const std::string& sectionname)
-                { this->eventListeners_[object] = sectionname; }
-            inline void unregisterEventListener(BaseObject* object)
-                { this->eventListeners_.erase(object); }
-
-            void addEvent(BaseObject* event, const std::string& sectionname);
-            void removeEvent(BaseObject* event);
-            BaseObject* getEvent(unsigned int index) const;
-
-            void addEventContainer(const std::string& sectionname, EventContainer* container);
-            EventContainer* getEventContainer(const std::string& sectionname) const;
-
-            /** @brief Sets the indentation of the debug output in the Loader. @param indentation The indentation */
-            inline void setLoaderIndentation(const std::string& indentation) { this->loaderIndentation_ = indentation; }
-            /** @brief Returns the indentation of the debug output in the Loader. @return The indentation */
-            inline const std::string& getLoaderIndentation() const { return this->loaderIndentation_; }
-
-        protected:
-            std::string name_;                                 //!< The name of the object
-            std::string oldName_;                              //!< The old name of the object
-            mbool       bActive_;                              //!< True = the object is active
-            mbool       bVisible_;                             //!< True = the object is visible
-            std::string mainStateName_;
-            Functor*    functorSetMainState_;
-            Functor*    functorGetMainState_;
-
         private:
-            void setXMLName(const std::string& name);
-            Template* getTemplate(unsigned int index) const;
-
             bool                   bInitialized_;              //!< True if the object was initialized (passed the object registration)
-            const XMLFile*         file_;                      //!< The XMLFile that loaded this object
-            Element*               lastLoadedXMLElement_;      //!< Non 0 if the TinyXML attributes have already been copied to our own lowercase map
-            std::map<std::string, std::string> xmlAttributes_; //!< Lowercase XML attributes
-            std::string            loaderIndentation_;         //!< Indentation of the debug output in the Loader
-            Namespace*             namespace_;
             BaseObject*            creator_;
-            Scene*                 scene_;
-            Gametype*              gametype_;
-            Gametype*              oldGametype_;
-            std::set<Template*>    templates_;
-            std::map<BaseObject*,  std::string> eventListeners_;
-            std::list<BaseObject*> events_;
-            std::map<std::string, EventContainer*> eventContainers_;
     };
-
-    SUPER_FUNCTION(0, BaseObject, XMLPort, false);
-    SUPER_FUNCTION(2, BaseObject, changedActivity, false);
-    SUPER_FUNCTION(3, BaseObject, changedVisibility, false);
-    SUPER_FUNCTION(4, BaseObject, processEvent, false);
-    SUPER_FUNCTION(6, BaseObject, changedMainState, false);
-    SUPER_FUNCTION(9, BaseObject, changedName, false);
-    SUPER_FUNCTION(10, BaseObject, changedGametype, false);
 }
 
Index: code/trunk/src/libraries/core/CMakeLists.txt
===================================================================
--- code/trunk/src/libraries/core/CMakeLists.txt	(revision 5772)
+++ code/trunk/src/libraries/core/CMakeLists.txt	(revision 5774)
@@ -25,25 +25,13 @@
   DynLib.cc
   DynLibManager.cc
-  Event.cc
   Game.cc
-  GameMode.cc
   GameState.cc
-  GraphicsManager.cc
-  GUIManager.cc
   Language.cc
   LuaState.cc
-  MemoryArchive.cc
   ObjectListBase.cc
   OrxonoxClass.cc
-  Resource.cc
-  WindowEventListener.cc
 
   # command
-  ArgumentCompletionFunctions.cc
-  CommandEvaluation.cc
-  CommandExecutor.cc
   CommandLine.cc
-  ConsoleCommand.cc
-  ConsoleCommandCompilation.cc
   Executor.cc
 
@@ -55,29 +43,13 @@
   # level
   BaseObject.cc
-  ClassTreeMask.cc
-  Loader.cc
-  Namespace.cc
-  NamespaceNode.cc
-  Template.cc
-  XMLPort.cc
-  XMLNameListener.cc
 
-  # shell
-  IRC.cc
-  Shell.cc
-  TclBind.cc
-  TclThreadManager.cc
-  
   # multithreading
   Thread.cc
   ThreadPool.cc
 )
-ADD_SUBDIRECTORY(input)
 
 ORXONOX_ADD_LIBRARY(core
   FIND_HEADER_FILES
   TOLUA_FILES
-    CommandExecutor.h
-    Loader.h
     LuaState.h
   DEFINE_SYMBOL
@@ -91,11 +63,5 @@
     ${Boost_THREAD_LIBRARY}
     ${Boost_DATE_TIME_LIBRARY} # Thread dependency
-    ${CEGUI_LIBRARY}
-    ${CEGUILUA_LIBRARY}
     ${LUA_LIBRARIES}
-    cpptcl_orxonox
-    ogreceguirenderer_orxonox
-    ois_orxonox
-    tinyxml++_orxonox
     tolua++_orxonox
     util
Index: code/trunk/src/libraries/core/ClassFactory.h
===================================================================
--- code/trunk/src/libraries/core/ClassFactory.h	(revision 5772)
+++ code/trunk/src/libraries/core/ClassFactory.h	(revision 5774)
@@ -55,5 +55,5 @@
     {
         public:
-            static bool create(const std::string& name, bool bLoadable = true);
+            static bool create(const std::string& name);
             BaseObject* fabricate(BaseObject* creator);
 
@@ -73,9 +73,8 @@
     */
     template <class T>
-    bool ClassFactory<T>::create(const std::string& name, bool bLoadable)
+    bool ClassFactory<T>::create(const std::string& name)
     {
         COUT(4) << "*** ClassFactory: Create entry for " << name << " in Factory." << std::endl;
         ClassIdentifier<T>::getIdentifier(name)->addFactory(new ClassFactory<T>);
-        ClassIdentifier<T>::getIdentifier()->setLoadable(bLoadable);
         Factory::add(name, ClassIdentifier<T>::getIdentifier());
 
Index: code/trunk/src/libraries/core/ClassTreeMask.cc
===================================================================
--- code/trunk/src/libraries/core/ClassTreeMask.cc	(revision 5772)
+++ 	(revision )
@@ -1,963 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Implementation of the ClassTreeMask, ClassTreeMaskNode and ClassTreeMaskIterator classes.
-*/
-
-#include "ClassTreeMask.h"
-#include "Identifier.h"
-
-namespace orxonox
-{
-    // ###############################
-    // ###    ClassTreeMaskNode    ###
-    // ###############################
-    /**
-        @brief Constructor: Creates the node, sets the subclass and the rule.
-        @param subclass The subclass the rule refers to
-        @param bIncluded The rule: included (true) or excluded (false)
-    */
-    ClassTreeMaskNode::ClassTreeMaskNode(const Identifier* subclass, bool bIncluded)
-    {
-        this->subclass_ = subclass;
-        this->bIncluded_ = bIncluded;
-    }
-
-    /**
-        @brief Destructor: Deletes all subnodes.
-    */
-    ClassTreeMaskNode::~ClassTreeMaskNode()
-    {
-        // Go through the list of all subnodes and delete them
-        this->deleteAllSubnodes();
-    }
-
-    /**
-        @brief Sets the rule for the node to "included".
-        @param overwrite True = overwrite previously added rules for inheriting classes
-    */
-    void ClassTreeMaskNode::include(bool overwrite)
-    {
-        this->setIncluded(true, overwrite);
-    }
-
-    /**
-        @brief Sets the rule for the node to "excluded".
-        @param overwrite True = overwrite previously added rules for inheriting classes
-    */
-    void ClassTreeMaskNode::exclude(bool overwrite)
-    {
-        this->setIncluded(false, overwrite);
-    }
-
-    /**
-        @brief Sets the rule for the node to a given value and erases all following rules.
-        @param bIncluded The rule: included (true) or excluded (false)
-        @param overwrite True = overwrite previously added rules for inheriting classes
-    */
-    void ClassTreeMaskNode::setIncluded(bool bIncluded, bool overwrite)
-    {
-        if (overwrite)
-            this->deleteAllSubnodes();
-
-        this->bIncluded_ = bIncluded;
-    }
-
-    /**
-        @brief Adds a new subnode to the list of subnodes.
-        @param subnode The new subnode
-    */
-    void ClassTreeMaskNode::addSubnode(ClassTreeMaskNode* subnode)
-    {
-        this->subnodes_.insert(this->subnodes_.end(), subnode);
-    }
-
-    /**
-        @brief Deletes all subnodes of this node.
-    */
-    void ClassTreeMaskNode::deleteAllSubnodes()
-    {
-        // Go through the list of all subnodes and delete them
-        for (std::list<ClassTreeMaskNode*>::iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); )
-            delete (*(it++));
-
-        // Clear the list
-        this->subnodes_.clear();
-    }
-
-
-    // ###############################
-    // ###  ClassTreeMaskIterator  ###
-    // ###############################
-    /**
-        @brief Constructor: Initializes the iterator by creating a helper-list with the root-node and putting it to the stack.
-        @param node The root-node
-    */
-    ClassTreeMaskIterator::ClassTreeMaskIterator(ClassTreeMaskNode* node)
-    {
-        // Create a list and put the root-note into it
-        std::list<ClassTreeMaskNode*>::iterator it = this->rootlist_.insert(this->rootlist_.end(), node);
-
-        // Put the iterator to the only element of the list and the corresponding end()-iterator on the stack
-        this->nodes_.push(std::pair<std::list<ClassTreeMaskNode*>::iterator, std::list<ClassTreeMaskNode*>::iterator>(it, this->rootlist_.end()));
-    }
-
-    /**
-        @brief Destructor: Does nothing.
-    */
-    ClassTreeMaskIterator::~ClassTreeMaskIterator()
-    {
-    }
-
-    /**
-        @brief Iterates through the rule-tree.
-        @return A reference to the iterator itself
-    */
-    const ClassTreeMaskIterator& ClassTreeMaskIterator::operator++()
-    {
-        // Check if the actual node has subnodes
-        if ((*this->nodes_.top().first)->subnodes_.begin() != (*this->nodes_.top().first)->subnodes_.end())
-        {
-            // Yes it has: Push an iterator, pointing at the first subnode, on the stack
-            this->nodes_.push(std::pair<std::list<ClassTreeMaskNode*>::iterator, std::list<ClassTreeMaskNode*>::iterator>((*this->nodes_.top().first)->subnodes_.begin(), (*this->nodes_.top().first)->subnodes_.end()));
-        }
-        else
-        {
-            // No subnodes, meaning we reached a leaf: Go to the next node
-            do
-            {
-                // Iterate one step in the current list
-                ++this->nodes_.top().first;
-
-                // Check if we reached the end of the list (the second item in the stored pair always represents the end)
-                if (this->nodes_.top().first == this->nodes_.top().second)
-                {
-                    // Yes we've reached the end: Pop the list-iterator from the stack
-                    this->nodes_.pop();
-
-                    // Continue with the loop, meaning: Try to iterate through the previous list
-                    continue;
-                }
-
-                // If we reached this point, we aren't yet at the end of the list: Leave the loop
-                break;
-            } while (!this->nodes_.empty()); // Stop looping if the stack is empty, meaning: We've iterated to the end
-        }
-
-        // Finally return a reference to the iterator itself
-        return *this;
-    }
-
-    /**
-        @brief Returns a pointer to the ClassTreeMaskNode whereon the iterator points.
-        @return The pointer to the node
-    */
-    ClassTreeMaskNode* ClassTreeMaskIterator::operator*() const
-    {
-        return (*this->nodes_.top().first);
-    }
-
-    /**
-        @brief Returns a pointer to the ClassTreeMaskNode whereon the iterator points.
-        @return The pointer to the node
-    */
-    ClassTreeMaskNode* ClassTreeMaskIterator::operator->() const
-    {
-        return (*this->nodes_.top().first);
-    }
-
-    /**
-        @brief Returns true if the stack is empty, meaning we've reached the end of the tree.
-        @return True if we've reached the end of the tree
-    */
-    ClassTreeMaskIterator::operator bool() const
-    {
-        return (!this->nodes_.empty());
-    }
-
-    /**
-        @brief Compares the current node with the given one and returns true if they match.
-        @param compare The node to compare with
-        @return The result of the comparison (true if they match)
-    */
-    bool ClassTreeMaskIterator::operator==(ClassTreeMaskNode* compare) const
-    {
-        if (!this->nodes_.empty())
-            return ((*this->nodes_.top().first) == compare);
-        else
-            return (compare == 0);
-    }
-
-    /**
-        @brief Compares the current node with the given one and returns true if they don't match.
-        @param compare The node to compare with
-        @return The result of the comparison (true if they don't match)
-    */
-    bool ClassTreeMaskIterator::operator!=(ClassTreeMaskNode* compare) const
-    {
-        if (!this->nodes_.empty())
-            return ((*this->nodes_.top().first) != compare);
-        else
-            return (compare != 0);
-    }
-
-
-    // ###############################
-    // ###      ClassTreeMask      ###
-    // ###############################
-    /**
-        @brief Constructor: Adds the root-node of the tree with the first rule ("include everything").
-    */
-    ClassTreeMask::ClassTreeMask()
-    {
-        this->root_ = new ClassTreeMaskNode(ClassIdentifier<BaseObject>::getIdentifier(), true);
-    }
-
-    /**
-        @brief Copyconstructor: Adds the root-node of the tree with the first rule ("include everything") and adds all rules from the other mask.
-        @param other The other mask
-    */
-    ClassTreeMask::ClassTreeMask(const ClassTreeMask& other)
-    {
-        this->root_ = new ClassTreeMaskNode(ClassIdentifier<BaseObject>::getIdentifier(), true);
-        for (ClassTreeMaskIterator it = other.root_; it; ++it)
-            this->add(it->getClass(), it->isIncluded(), false);
-    }
-
-    /**
-        @brief Destructor: Deletes the root node (which will delete all subnodes too).
-    */
-    ClassTreeMask::~ClassTreeMask()
-    {
-        delete this->root_;
-    }
-
-    /**
-        @brief Adds a new "include" rule for a given subclass to the mask.
-        @param subclass The subclass
-        @param overwrite True = overwrite previously added rules for inheriting classes
-        @param clean True = clean the tree after adding the new rule
-    */
-    void ClassTreeMask::include(const Identifier* subclass, bool overwrite, bool clean)
-    {
-        this->add(subclass, true, overwrite, clean);
-    }
-
-    /**
-        @brief Adds a new "exclude" rule for a given subclass to the mask.
-        @param subclass The subclass
-        @param overwrite True = overwrite previously added rules for inheriting classes
-        @param clean True = clean the tree after adding the new rule
-    */
-    void ClassTreeMask::exclude(const Identifier* subclass, bool overwrite, bool clean)
-    {
-        this->add(subclass, false, overwrite, clean);
-    }
-
-    /**
-        @brief Adds a new rule for a given subclass to the mask.
-        @param subclass The subclass
-        @param bInclude The rule: include (true) or exclude (false)
-        @param overwrite True = overwrite previously added rules for inheriting classes
-        @param clean True = clean the tree after adding the new rule
-    */
-    void ClassTreeMask::add(const Identifier* subclass, bool bInclude, bool overwrite, bool clean)
-    {
-        // Check if the given subclass is a child of our root-class
-        if (subclass->isA(this->root_->getClass()))
-        {
-            // Yes it is: Just add the rule to the three
-            this->add(this->root_, subclass, bInclude, overwrite);
-        }
-        else
-        {
-            // No it's not: Search for classes inheriting from the given class and add the rules for them
-            for (std::set<const Identifier*>::const_iterator it = subclass->getDirectChildrenBegin(); it != subclass->getDirectChildrenEnd(); ++it)
-                if ((*it)->isA(this->root_->getClass()))
-                    if (overwrite || (!this->nodeExists(*it))) // If we don't want to overwrite, only add nodes that don't already exist
-                        this->add(this->root_, *it, bInclude, overwrite);
-        }
-
-        // Clean the rule-tree
-        if (clean)
-            this->clean();
-    }
-
-    /**
-        @brief Adds a new rule for a given subclass to a node of the internal rule-tree (recursive function).
-        @param node The node
-        @param subclass The subclass
-        @param bInclude The rule: include (true) or exclude (false)
-        @param overwrite True = overwrite previously added rules for inheriting classes
-    */
-    void ClassTreeMask::add(ClassTreeMaskNode* node, const Identifier* subclass, bool bInclude, bool overwrite)
-    {
-        // Check if the current node contains exactly the subclass we want to add
-        if (subclass == node->getClass())
-        {
-            // We're at the right place, just change the mask and return
-            node->setIncluded(bInclude, overwrite);
-            return;
-        }
-        else if (subclass->isA(node->getClass()))
-        {
-            // Search for an already existing node, containing the subclass we want to add
-            for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); ++it)
-            {
-                if (subclass->isA((*it)->getClass()))
-                {
-                    // We've found an existing node -> delegate the work with a recursive function-call and return
-                    this->add(*it, subclass, bInclude, overwrite);
-                    return;
-                }
-            }
-
-            // There is no existing node satisfying our needs -> we create a new node
-            ClassTreeMaskNode* newnode = new ClassTreeMaskNode(subclass, bInclude);
-
-            // Search for nodes that should actually be subnodes of our new node and erase them
-            for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); )
-            {
-                if ((*it)->getClass()->isChildOf(subclass))
-                {
-                    // We've found a subnode: add it to the new node and erase it from the current node
-                    if (!overwrite)
-                        newnode->addSubnode(*it);
-                    else
-                        delete (*it);
-
-                    node->subnodes_.erase(it++);
-                }
-                else
-                {
-                    ++it;
-                }
-            }
-
-            // Finally add the new node as a subnode to the current node
-            node->addSubnode(newnode);
-        }
-    }
-
-    /**
-        @brief Adds a new "include" rule for a single subclass. The new rule doesn't change the mask for inheriting classes.
-        @param subclass The subclass
-        @param clean True = clean the tree after adding the new rule
-    */
-    void ClassTreeMask::includeSingle(const Identifier* subclass, bool clean)
-    {
-        this->addSingle(subclass, true, clean);
-    }
-
-    /**
-        @brief Adds a new "exclude" rule for a single subclass. The new rule doesn't change the mask for inheriting classes.
-        @param subclass The subclass
-        @param clean True = clean the tree after adding the new rule
-    */
-    void ClassTreeMask::excludeSingle(const Identifier* subclass, bool clean)
-    {
-        this->addSingle(subclass, false, clean);
-    }
-
-    /**
-        @brief Adds a new rule for a single subclass. The new rule doesn't change the mask for inheriting classes.
-        @param bInclude The rule: include (true) or exclude (false)
-        @param subclass The subclass
-        @param clean True = clean the tree after adding the new rule
-    */
-    void ClassTreeMask::addSingle(const Identifier* subclass, bool bInclude, bool clean)
-    {
-        for (std::set<const Identifier*>::const_iterator it = subclass->getDirectChildrenBegin(); it != subclass->getDirectChildrenEnd(); ++it)
-            this->add(*it, this->isIncluded(*it), false, false);
-
-        this->add(subclass, bInclude, false, clean);
-    }
-
-    /**
-        @brief Resets the mask to "include everything".
-    */
-    void ClassTreeMask::reset()
-    {
-        delete this->root_;
-        this->root_ = new ClassTreeMaskNode(ClassIdentifier<BaseObject>::getIdentifier(), true);
-    }
-
-    /**
-        @brief Tells if a given subclass is included or not.
-        @param subclass The subclass
-        @return Included (true) or excluded (false)
-    */
-    bool ClassTreeMask::isIncluded(const Identifier* subclass) const
-    {
-        return this->isIncluded(this->root_, subclass);
-    }
-
-    /**
-        @brief Tells if a given subclass of a node in the rule-tree is included or not (recursive function).
-        @param node The node
-        @param subclass The subclass
-        @return Included (true) or excluded (false)
-    */
-    bool ClassTreeMask::isIncluded(ClassTreeMaskNode* node, const Identifier* subclass) const
-    {
-        // Check if the searched subclass is of the same type as the class in the current node or a derivative
-        if (subclass->isA(node->getClass()))
-        {
-            // Check for the special case
-            if (subclass == node->getClass())
-                return node->isIncluded();
-
-            // Go through the list of subnodes and look for a node containing the searched subclass and delegate the request by a recursive function-call.
-            for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); ++it)
-                if (subclass->isA((*it)->getClass()))
-                    return isIncluded(*it, subclass);
-
-            // There is no subnode containing our class -> the rule of the current node takes in effect
-            return node->isIncluded();
-        }
-        else
-        {
-            // The class is not included in the mask: return false
-            return false;
-        }
-    }
-
-    /**
-        @brief Tells if a given subclass is excluded or not.
-        @param subclass The subclass
-        @return The inverted rule: Excluded (true) or included (false)
-    */
-    bool ClassTreeMask::isExcluded(const Identifier* subclass) const
-    {
-        return (!this->isIncluded(subclass));
-    }
-
-    /**
-        @brief Removes all unneeded rules that don't change the information of the mask.
-    */
-    void ClassTreeMask::clean()
-    {
-        this->clean(this->root_);
-    }
-
-    /**
-        @brief Removes all unneded rules that don't change the information of a node of a mask (recursive function).
-        @param node The node
-    */
-    void ClassTreeMask::clean(ClassTreeMaskNode* node)
-    {
-        // Iterate through all subnodes of the given node
-        for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); )
-        {
-            // Recursive function-call: Clean the subnode
-            this->clean(*it);
-
-            // Now check if the subnode contains the same rule as the current node
-            if ((*it)->isIncluded() == node->isIncluded())
-            {
-                // It does: Move all subnodes of the redundant subnode to the current node
-                node->subnodes_.insert(node->subnodes_.end(), (*it)->subnodes_.begin(), (*it)->subnodes_.end());
-                (*it)->subnodes_.clear();
-
-                // Remove the redundant subnode from the current node
-                node->subnodes_.erase(it++);
-            }
-            else
-            {
-                // The subnode is necessary: Move on to the next subnode
-                ++it;
-            }
-        }
-    }
-
-    /**
-        @brief Checks if a node for the given subclass exists.
-        @param subclass The Identifier of the subclass
-        @return True = the node exists
-    */
-    bool ClassTreeMask::nodeExists(const Identifier* subclass)
-    {
-        for (ClassTreeMaskIterator it = this->root_; it; ++it)
-            if ((*it)->getClass() == subclass)
-                return true;
-
-        return false;
-    }
-
-    /**
-        @brief Assignment operator: Adds all rules of the other mask.
-        @param other The other mask
-        @return A reference to the mask itself
-    */
-    const ClassTreeMask& ClassTreeMask::operator=(const ClassTreeMask& other)
-    {
-        // Make a copy to avoid troubles with self-assignments (like A = A).
-        ClassTreeMask temp(other);
-
-        // Removes all current rules
-        this->reset();
-
-        // Copy all rules from the other mask
-        for (ClassTreeMaskIterator it = temp.root_; it; ++it)
-            this->add(it->getClass(), it->isIncluded(), false, false);
-
-        // Return a reference to the mask itself
-        return (*this);
-    }
-
-    /**
-        @brief Compares the mask with another mask and returns true if they represent the same logic.
-        @param other The other mask
-        @return True if both masks represent the same logic
-    */
-    bool ClassTreeMask::operator==(const ClassTreeMask& other) const
-    {
-        ClassTreeMask temp1 = other;
-        ClassTreeMask temp2 = (*this);
-
-        temp1.clean();
-        temp2.clean();
-
-        ClassTreeMaskIterator it1 = temp1.root_;
-        ClassTreeMaskIterator it2 = temp2.root_;
-
-        for ( ; it1 && it2; ++it1, ++it2)
-            if (it1->getClass() != it2->getClass())
-                return false;
-
-        return true;
-    }
-
-    /**
-        @brief Compares the mask with another mask and returns true if they represent different logics.
-        @param other The other mask
-        @return True if the masks represent different logics
-    */
-    bool ClassTreeMask::operator!=(const ClassTreeMask& other) const
-    {
-        return (!((*this) == other));
-    }
-
-    /**
-        @brief Prefix operator + does nothing.
-        @return A reference to the mask itself
-    */
-    const ClassTreeMask& ClassTreeMask::operator+() const
-    {
-        return (*this);
-    }
-
-    /**
-        @brief Prefix operator - inverts the mask.
-        @return The inverted mask
-    */
-    ClassTreeMask ClassTreeMask::operator-() const
-    {
-        return (!(*this));
-    }
-
-    /**
-        @brief Adds two masks in the sense of a union (all classes that are included in at least one of the masks will be included in the resulting mask too).
-        @param other The mask to unite with
-        @return The union
-    */
-    ClassTreeMask ClassTreeMask::operator+(const ClassTreeMask& other) const
-    {
-        // Create a new mask
-        ClassTreeMask newmask;
-
-        // Add all nodes from the first mask, calculate the rule with the or-operation
-        for (ClassTreeMaskIterator it = this->root_; it; ++it)
-        {
-            const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) or other.isIncluded(subclass), false, false);
-        }
-
-        // Add all nodes from the second mask, calculate the rule with the or-operation
-        for (ClassTreeMaskIterator it = other.root_; it; ++it)
-        {
-            const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) or other.isIncluded(subclass), false, false);
-        }
-
-        // Drop all redundant rules
-        newmask.clean();
-
-        // Return the new mask
-        return newmask;
-    }
-
-    /**
-        @brief Intersects two masks (only classes that are included in both masks will be included in the resulting mask too).
-        @param other The mask to intersect with
-        @return The intersection
-    */
-    ClassTreeMask ClassTreeMask::operator*(const ClassTreeMask& other) const
-    {
-        // Create a new mask
-        ClassTreeMask newmask;
-
-        // Add all nodes from the first mask, calculate the rule with the and-operation
-        for (ClassTreeMaskIterator it = this->root_; it; ++it)
-        {
-            const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) and other.isIncluded(subclass), false, false);
-        }
-
-        // Add all nodes from the second mask, calculate the rule with the and-operation
-        for (ClassTreeMaskIterator it = other.root_; it; ++it)
-        {
-            const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) and other.isIncluded(subclass), false, false);
-        }
-
-        // Drop all redundant rules
-        newmask.clean();
-
-        // Return the new mask
-        return newmask;
-    }
-
-    /**
-        @brief Removes all elements of the second mask from the first mask (all classes that are included in the first mask stay included, except those that are included in the second mask too).
-        @param other The mask to subtract.
-        @return The difference
-    */
-    ClassTreeMask ClassTreeMask::operator-(const ClassTreeMask& other) const
-    {
-        return ((*this) * (!other));
-    }
-
-    /**
-        @brief Inverts the mask (all included classes are now excluded and vice versa).
-        @return The complement
-    */
-    ClassTreeMask ClassTreeMask::operator!() const
-    {
-        // Create a new mask
-        ClassTreeMask newmask;
-
-        // Add all nodes from the other mask, inverting the rules
-        for (ClassTreeMaskIterator it = this->root_; it; ++it)
-        {
-            const Identifier* subclass = it->getClass();
-            newmask.add(subclass, !this->isIncluded(subclass), false, false);
-        }
-
-        // Return the new mask
-        return newmask;
-    }
-
-    /**
-        @brief Unites this mask with another mask.
-        @param other The other mask
-        @return A reference to the mask itself
-    */
-    const ClassTreeMask& ClassTreeMask::operator+=(const ClassTreeMask& other)
-    {
-        (*this) = (*this) + other;
-        return (*this);
-    }
-
-    /**
-        @brief Intersects this mask with another mask.
-        @param other The other mask
-        @return A reference to the mask itself
-    */
-    const ClassTreeMask& ClassTreeMask::operator*=(const ClassTreeMask& other)
-    {
-        (*this) = (*this) * other;
-        return (*this);
-    }
-
-    /**
-        @brief Subtracts another mask from this mask.
-        @param other The other mask
-        @return A reference to the mask itself
-    */
-    const ClassTreeMask& ClassTreeMask::operator-=(const ClassTreeMask& other)
-    {
-        (*this) = (*this) - other;
-        return (*this);
-    }
-
-    /**
-        @brief Intersects two masks (only classes that are included in both masks will be included in the resulting mask too).
-        @param other The mask to intersect with
-        @return The intersection
-    */
-    ClassTreeMask ClassTreeMask::operator&(const ClassTreeMask& other) const
-    {
-        return ((*this) * other);
-    }
-
-    /**
-        @brief Adds two masks in the sense of a union (all classes that are included in at least one of the masks will be included in the resulting mask too).
-        @param other The mask to unite with
-        @return The union
-    */
-    ClassTreeMask ClassTreeMask::operator|(const ClassTreeMask& other) const
-    {
-        return ((*this) + other);
-    }
-
-    /**
-        @brief Joins two masks in the sense of a xor (exclusivity) operation (all classes that are included in exactly one of the masks, but not in both, will be included in the resulting mask too).
-        @param other The mask to join with
-        @return The result
-    */
-    ClassTreeMask ClassTreeMask::operator^(const ClassTreeMask& other) const
-    {
-        // Create a new mask
-        ClassTreeMask newmask;
-
-        // Add all nodes from the first mask, calculate the rule with the xor-operation
-        for (ClassTreeMaskIterator it = this->root_; it; ++it)
-        {
-            const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) xor other.isIncluded(subclass), false, false);
-        }
-
-        // Add all nodes from the second mask, calculate the rule with the xor-operation
-        for (ClassTreeMaskIterator it = other.root_; it; ++it)
-        {
-            const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) xor other.isIncluded(subclass), false, false);
-        }
-
-        // Drop all redundant rules
-        newmask.clean();
-
-        // Return the new mask
-        return newmask;
-    }
-
-    /**
-        @brief Inverts the mask (all included classes are now excluded and vice versa).
-        @return The complement
-    */
-    ClassTreeMask ClassTreeMask::operator~() const
-    {
-        return (!(*this));
-    }
-
-    /**
-        @brief Intersects this mask with another mask (and-operation)
-        @param other The other mask
-        @return A reference to the mask itself
-    */
-    const ClassTreeMask& ClassTreeMask::operator&=(const ClassTreeMask& other)
-    {
-        (*this) = (*this) & other;
-        return (*this);
-    }
-
-    /**
-        @brief Unites this mask with another mask (or-operation).
-        @param other The other mask
-        @return A reference to the mask itself
-    */
-    const ClassTreeMask& ClassTreeMask::operator|=(const ClassTreeMask& other)
-    {
-        (*this) = (*this) | other;
-        return (*this);
-    }
-
-    /**
-        @brief Joins this mask with another mask with a xor-operation.
-        @param other The other mask
-        @return A reference to the mask itself
-    */
-    const ClassTreeMask& ClassTreeMask::operator^=(const ClassTreeMask& other)
-    {
-        (*this) = (*this) ^ other;
-        return (*this);
-    }
-
-    /**
-        @brief Converts the content of a mask into a human readable string and puts it on the ostream.
-        @param out The ostream
-        @param mask The mask
-        @return A reference to the ostream
-    */
-    std::ostream& operator<<(std::ostream& out, const ClassTreeMask& mask)
-    {
-        // Iterate through all rules
-        for (ClassTreeMaskIterator it = mask.root_; it; ++it)
-        {
-            // Calculate the prefix: + means included, - means excluded
-            if (it->isIncluded())
-                out << "+";
-            else
-                out << "-";
-
-            // Put the name of the corresponding class on the stream
-            out << it->getClass()->getName() << " ";
-        }
-
-        return out;
-    }
-
-
-    // ###################################
-    // ### ClassTreeMaskObjectIterator ###
-    // ###################################
-    /**
-        @brief Initializes the iterator from a given ClassTreeMask.
-        @param mask The mask
-    */
-    const ClassTreeMaskObjectIterator& ClassTreeMaskObjectIterator::operator=(const ClassTreeMask& mask)
-    {
-        // Clear everything, use a cleaned copy of the mask
-        this->subclasses_.clear();
-        ClassTreeMask temp = mask;
-        temp.clean();
-
-        // Create the subclass-list by going through the mask-tree, starting with the root-node
-        this->create(temp.root_);
-
-        // Move the subclass-iterator to the beginning of the subclass-list
-        this->subclassIterator_ = this->subclasses_.begin();
-
-        // If there is a first subclass, move the object-iterator to the first object of this class. Else go to the end
-        if (this->subclassIterator_ != this->subclasses_.end())
-            this->objectIterator_ = (*this->subclassIterator_).first->getObjects()->begin();
-        else
-            this->objectIterator_ = ObjectList<BaseObject>::end();
-
-        // Check if the iterator points on a valid object. If not, go to the next object by calling ++
-        if (!this->objectIterator_ || ((*this->subclassIterator_).second && !this->objectIterator_->isExactlyA((*this->subclassIterator_).first)))
-            this->operator++();
-
-        return (*this);
-    }
-
-    /**
-        @brief Iterate to the next object (if any).
-        @return The iterator itself
-    */
-    const ClassTreeMaskObjectIterator& ClassTreeMaskObjectIterator::operator++()
-    {
-        if (this->objectIterator_)
-        {
-            // The iterator points on a valid object, therefore we also have a valid subclass-iterator at the moment
-            do
-            {
-                // Go to the next object
-                ++this->objectIterator_;
-
-                while (!this->objectIterator_)
-                {
-                    // We reached the end of the current objectlist - go to the next class
-                    ++this->subclassIterator_;
-
-                    // Check if there really is a next class. If yes, move the object-iterator to the first object
-                    if (this->subclassIterator_ != this->subclasses_.end())
-                        this->objectIterator_ = (*this->subclassIterator_).first->getObjects()->begin();
-                    else
-                        return (*this);
-                }
-
-            // Repeat this until we reach a valid object or the end
-            } while ((*this->subclassIterator_).second && !this->objectIterator_->isExactlyA((*this->subclassIterator_).first));
-        }
-        return (*this);
-    }
-
-    /**
-        @brief Recursive function to create the Iterators subclass-list by going through the node-tree of the mask.
-        @param node The current node
-    */
-    void ClassTreeMaskObjectIterator::create(ClassTreeMaskNode* node)
-    {
-        // Add the class of this node to the list, if the class is included
-        if (node->isIncluded())
-        {
-            // If there are some subnodes, the bool is "true", meaning we have to check for the exact clss when iterating
-            if (node->hasSubnodes())
-                this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(node->getClass(), true));
-            else
-                this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(node->getClass(), false));
-        }
-
-        // Now check if the node has subnodes
-        if (node->hasSubnodes())
-        {
-            // Get all _direct_ children of the nodes class
-            std::set<const Identifier*> directChildren = node->getClass()->getDirectChildren();
-
-            // Iterate through all subnodes
-            for (std::list<ClassTreeMaskNode*>::iterator it1 = node->subnodes_.begin(); it1 != node->subnodes_.end(); ++it1)
-            {
-                // Recursive call to this function with the subnode
-                this->create(*it1);
-
-                // Only execute the following code if the current node is included, meaning some of the subnodes might be included too
-                if (node->isIncluded())
-                {
-                    scanChildren: // This is a label for goto
-
-                    // Iterate through all direct children
-                    for (std::set<const Identifier*>::iterator it2 = directChildren.begin(); it2 != directChildren.end(); ++it2)
-                    {
-                        // Check if the subnode (it1) is a child of the directChild (it2)
-                        if ((*it1)->getClass()->isA(*it2))
-                        {
-                            // Yes it is - remove the directChild (it2) from the list, because it will already be handled by a recursive call to the create() function
-                            directChildren.erase(it2);
-
-                            // Check if the removed directChild was exactly the subnode
-                            if (!(*it1)->getClass()->isExactlyA(*it2))
-                            {
-                                // No, it wasn't exactly the subnode - therefore there are some classes between
-
-                                // Add the previously removed directChild (it2) to the subclass-list
-                                this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(*it2, true));
-
-                                // Insert all directChildren of the directChild
-                                directChildren.insert((*it2)->getDirectChildrenBegin(), (*it2)->getDirectChildrenEnd());
-
-                                // Restart the scan with the expanded set of directChildren
-                                goto scanChildren;
-                            }
-                            break;
-                        }
-                    }
-                }
-            }
-
-            // Now add all directChildren which don't have subnodes on their own to the subclass-list
-            // The bool is "false", meaning they have no subnodes and therefore need no further checks
-            if (node->isIncluded())
-                for (std::set<const Identifier*>::iterator it = directChildren.begin(); it != directChildren.end(); ++it)
-                    this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(*it, false));
-        }
-    }
-}
Index: code/trunk/src/libraries/core/ClassTreeMask.h
===================================================================
--- code/trunk/src/libraries/core/ClassTreeMask.h	(revision 5772)
+++ 	(revision )
@@ -1,286 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Definition of the ClassTreeMask, ClassTreeMaskNode and ClassTreeMaskIterator classes.
-
-    ClassTreeMask is a class to define a mask of the class-tree beginning with BaseObject.
-    You can include or exclude classes by calling the corresponding functions with the
-    Identifier of the class.
-
-    You can work with a ClassTreeMask in the sense of the set-theory, meaning that you can create
-    unions, intersections, complements and differences by using overloaded operators.
-
-
-
-    The ClassTreeMask is internally represented by a tree. The nodes in the tree are
-    ClassTreeMaskNodes, containing the rule (included or excluded) for this class and all
-    subclasses and a list of all subnodes. To minimize the size, the tree contains only
-    nodes changing the mask. By adding new rules, the tree gets reordered dynamically.
-
-    Adding a new rule overwrites all rules assigned to inherited classes. Use overwrite = false
-    if you don't like this feature. Useless rules that don't change the information of the mask
-    aren't saved in the internal tree. Use clean = false if you wan't to save them.
-
-    With overwrite = false and clean = false it doesn't matter in which way you create the mask.
-    You can manually drop useless rules from the tree by calling clean().
-
-
-
-    Because of the complicated shape of the internal tree, there is an iterator to iterate
-    through all ClassTreeMaskNodes of a mask. It starts with the BaseObject and moves on to
-    the first subclass until it reaches a leaf of the tree. Then the iterator moves one step
-    back and iterates to the second subclass. If there are no more subclasses, it steps another
-    step back, and so on.
-
-    Example: A and B are children of BaseObject, A1 and A2 are children of A, B1 and B2 are children of B.
-    The ClassTreeMaskIterator would move trough the tree in the following order:
-    BaseObject, A, A1, A2, B, B1, B2.
-
-    Note that the iterator doesn't move trough the whole class-tree, but only through the
-    internal tree of the mask, containing the minimal needed set of nodes to describe the mask.
-*/
-
-#ifndef _ClassTreeMask_H__
-#define _ClassTreeMask_H__
-
-#include "CorePrereqs.h"
-
-#include <list>
-#include <stack>
-#include "BaseObject.h"
-#include "Iterator.h"
-
-namespace orxonox
-{
-    // ###################################
-    // ###      ClassTreeMaskNode      ###
-    // ###################################
-    //! The ClassTreeMaskNode is a node in the internal tree of the ClassTreeMask, containing the rules of the mask.
-    /**
-        The ClassTreeMaskNode is used to store the rule (included or excluded) for a given
-        class (described by the corresponding Identifier). The nodes are used in the internal
-        tree of ClassTreeMask. To build a tree, they store a list of all subnodes.
-    */
-    class _CoreExport ClassTreeMaskNode
-    {
-        friend class ClassTreeMask;
-        friend class ClassTreeMaskIterator;
-        friend class ClassTreeMaskObjectIterator;
-
-        public:
-            ClassTreeMaskNode(const Identifier* subclass, bool bIncluded = true);
-            ~ClassTreeMaskNode();
-
-            void include(bool overwrite = true);
-            void exclude(bool overwrite = true);
-            void setIncluded(bool bIncluded, bool overwrite = true);
-
-            void addSubnode(ClassTreeMaskNode* subnode);
-
-            /** @brief Tells if the rule is "included" or not. @return The rule: true = included, false = excluded */
-            inline bool isIncluded() const { return this->bIncluded_; }
-            /** @brief Tells if the rule is "excluded" or not. @return The inverted rule: true = excluded, false = included */
-            inline bool isExcluded() const { return (!this->bIncluded_); }
-
-            /** @brief Returns the Identifier of the class the rule refers to. @return The Identifier representing the class */
-            inline const Identifier* getClass() const { return this->subclass_; }
-
-            /** @brief Returns true if the Node has some subnodes. */
-            inline bool hasSubnodes() const { return !this->subnodes_.empty(); }
-
-        private:
-            void deleteAllSubnodes();
-
-            const Identifier* subclass_;                //!< The Identifier of the subclass the rule refers to
-            bool bIncluded_;                            //!< The rule: included or excluded
-            std::list<ClassTreeMaskNode*> subnodes_;    //!< A list containing all subnodes in the tree
-    };
-
-
-    // ###################################
-    // ###    ClassTreeMaskIterator    ###
-    // ###################################
-    //! The ClassTreeMaskIterator moves through all ClassTreeMaskNodes of the internal tree of a ClassTreeMask, containing the rules.
-    /**
-        Because of the complicated shape of the internal rule-tree of ClassTreeMask, an
-        iterator is used to move through all nodes of the tree. It starts with the BaseObject
-        and moves on to the first subclass until it reaches a leaf of the tree. Then the
-        iterator moves one step back and iterates to the second subclass. If there are no more
-        subclasses, it steps another step back, and so on.
-    */
-    class _CoreExport ClassTreeMaskIterator
-    {
-        public:
-            ClassTreeMaskIterator(ClassTreeMaskNode* node);
-            ~ClassTreeMaskIterator();
-
-            const ClassTreeMaskIterator& operator++();
-            ClassTreeMaskNode* operator*() const;
-            ClassTreeMaskNode* operator->() const;
-            operator bool() const;
-            bool operator==(ClassTreeMaskNode* compare) const;
-            bool operator!=(ClassTreeMaskNode* compare) const;
-
-        private:
-            std::stack<std::pair<std::list<ClassTreeMaskNode*>::iterator, std::list<ClassTreeMaskNode*>::iterator> > nodes_;    //!< A stack to store list-iterators
-            std::list<ClassTreeMaskNode*> rootlist_;                                                                            //!< A list for internal use (it only stores the root-node)
-    };
-
-
-    // ###################################
-    // ###        ClassTreeMask        ###
-    // ###################################
-    //! The ClassTreeMask is a set of rules, containing the information for each class whether it's included or not.
-    /**
-        With a ClassTreeMask, you can include or exclude subtrees of the class-tree, starting
-        with a given subclass, described by the corresponding Identifier. To minimize the size
-        of the mask, the mask saves only relevant rules. But you can manually add rules that
-        don't change the information of the mask by using clean = false. If you want to drop
-        useless rules, call the clean() function.
-    */
-    class _CoreExport ClassTreeMask
-    {
-        friend class ClassTreeMaskObjectIterator;
-
-        public:
-            ClassTreeMask();
-            ClassTreeMask(const ClassTreeMask& other);
-            ~ClassTreeMask();
-
-            void include(const Identifier* subclass, bool overwrite = true, bool clean = true);
-            void exclude(const Identifier* subclass, bool overwrite = true, bool clean = true);
-            void add(const Identifier* subclass, bool bInclude, bool overwrite = true, bool clean = true);
-
-            void includeSingle(const Identifier* subclass, bool clean = true);
-            void excludeSingle(const Identifier* subclass, bool clean = true);
-            void addSingle(const Identifier* subclass, bool bInclude, bool clean = true);
-
-            void reset();
-            void clean();
-
-            bool isIncluded(const Identifier* subclass) const;
-            bool isExcluded(const Identifier* subclass) const;
-
-            /** @brief Begin of the ClassTreeMaskObjectIterator. */
-            inline const ClassTreeMask& begin() const { return (*this); }
-            /** @brief End of the ClassTreeMaskObjectIterator. */
-            inline BaseObject*          end()   const { return 0; }
-
-            const ClassTreeMask& operator=(const ClassTreeMask& other);
-
-            bool operator==(const ClassTreeMask& other) const;
-            bool operator!=(const ClassTreeMask& other) const;
-
-            const ClassTreeMask& operator+() const;
-            ClassTreeMask operator-() const;
-
-            ClassTreeMask operator+(const ClassTreeMask& other) const;
-            ClassTreeMask operator*(const ClassTreeMask& other) const;
-            ClassTreeMask operator-(const ClassTreeMask& other) const;
-            ClassTreeMask operator!() const;
-
-            const ClassTreeMask& operator+=(const ClassTreeMask& other);
-            const ClassTreeMask& operator*=(const ClassTreeMask& other);
-            const ClassTreeMask& operator-=(const ClassTreeMask& other);
-
-            ClassTreeMask operator&(const ClassTreeMask& other) const;
-            ClassTreeMask operator|(const ClassTreeMask& other) const;
-            ClassTreeMask operator^(const ClassTreeMask& other) const;
-            ClassTreeMask operator~() const;
-
-            const ClassTreeMask& operator&=(const ClassTreeMask& other);
-            const ClassTreeMask& operator|=(const ClassTreeMask& other);
-            const ClassTreeMask& operator^=(const ClassTreeMask& other);
-
-            friend std::ostream& operator<<(std::ostream& out, const ClassTreeMask& mask);
-
-        private:
-            void add(ClassTreeMaskNode* node, const Identifier* subclass, bool bInclude, bool overwrite = true);
-            bool isIncluded(ClassTreeMaskNode* node, const Identifier* subclass) const;
-            void clean(ClassTreeMaskNode* node);
-            bool nodeExists(const Identifier* subclass);
-
-            ClassTreeMaskNode* root_;   //!< The root-node of the internal rule-tree, usually BaseObject
-    };
-
-
-    // ###################################
-    // ### ClassTreeMaskObjectIterator ###
-    // ###################################
-    //! The ClassTreeMaskObjectIterator iterates through all objects of all classes, included by a ClassTreeMask.
-    /**
-        The ClassTreeMaskObjectIterator iterates through all objects of all classes,
-        included by a ClassTreeMask. This is done the following way:
-
-        ClassTreeMask mask;
-        for (ClassTreeMaskObjectIterator it = mask.begin(); it != mask.end(); ++it)
-            it->doSomething();
-
-        Note: The ClassTreeMaskObjectIterator handles all objects as BaseObjects. If
-              you want to use another class, you should use a dynamic_cast.
-
-        Performance of ClassTreeMaskObjectIterator is good as long as you don't exclude
-        subclasses of included classes. Of course you can still exlucde subclasses, but
-        if this is done more often, we need a new implementation using a second ObjectList
-        in the Identifier, containing all objects of exactly one class.
-    */
-    class _CoreExport ClassTreeMaskObjectIterator
-    {
-        public:
-            /** @brief Defaultconstructor: Does nothing. */
-            inline ClassTreeMaskObjectIterator() {}
-            /** @brief Constructor: Initializes the iterator from a given ClassTreeMask. @param mask The mask */
-            inline ClassTreeMaskObjectIterator(const ClassTreeMask& mask) { (*this) = mask; }
-
-            const ClassTreeMaskObjectIterator& operator=(const ClassTreeMask& mask);
-
-            const ClassTreeMaskObjectIterator& operator++();
-
-            /** @brief Returns true if the ClassTreeMaskObjectIterator points at the given object. @param pointer The pointer of the object */
-            inline bool operator==(BaseObject* pointer) const { return ((*this->objectIterator_) == pointer); }
-            /** @brief Returns true if the ClassTreeMaskObjectIterator doesn't point at the given object. @param pointer The pointer of the object */
-            inline bool operator!=(BaseObject* pointer) const { return ((*this->objectIterator_) != pointer); }
-            /** @brief Returns true if the ClassTreeMaskObjectIterator hasn't already reached the end. */
-            inline operator bool() const { return (this->objectIterator_); }
-            /** @brief Returns the object the ClassTreeMaskObjectIterator currently points at. */
-            inline BaseObject* operator*() const { return (*this->objectIterator_); }
-            /** @brief Returns the object the ClassTreeMaskObjectIterator currently points at. */
-            inline BaseObject* operator->() const { return (*this->objectIterator_); }
-
-        private:
-            void create(ClassTreeMaskNode* node);
-
-            std::list<std::pair<const Identifier*, bool> >           subclasses_;       //!< A list of all Identifiers through which objects the iterator should iterate
-            std::list<std::pair<const Identifier*, bool> >::iterator subclassIterator_; //!< The current class of the iterator
-            Iterator<BaseObject>                                     objectIterator_;   //!< The current object of the iterator
-    };
-}
-
-#endif /* _ClassTreeMask_H__ */
Index: code/trunk/src/libraries/core/Clock.h
===================================================================
--- code/trunk/src/libraries/core/Clock.h	(revision 5772)
+++ code/trunk/src/libraries/core/Clock.h	(revision 5774)
@@ -31,5 +31,6 @@
 
 #include "CorePrereqs.h"
-#include "util/OgreForwardRefs.h"
+
+namespace Ogre { class Timer; }
 
 namespace orxonox
Index: code/trunk/src/libraries/core/CommandEvaluation.cc
===================================================================
--- code/trunk/src/libraries/core/CommandEvaluation.cc	(revision 5772)
+++ 	(revision )
@@ -1,313 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "CommandEvaluation.h"
-
-#include "util/Debug.h"
-#include "util/StringUtils.h"
-#include "ConsoleCommand.h"
-#include "Identifier.h"
-
-namespace orxonox
-{
-    CommandEvaluation::CommandEvaluation()
-    {
-        this->initialize("");
-        this->state_ = CommandState::Uninitialized;
-    }
-
-    void CommandEvaluation::initialize(const std::string& command)
-    {
-        this->bNewCommand_ = true;
-        this->bCommandChanged_ = false;
-        this->originalCommand_ = command;
-        this->command_ = command;
-        this->commandTokens_.split(command, " ", SubString::WhiteSpaces, false, '\\', false, '"', false, '(', ')', false, '\0');
-
-        this->additionalParameter_ = "";
-
-        this->bEvaluatedParams_ = false;
-
-        this->listOfPossibleIdentifiers_.clear();
-        this->listOfPossibleFunctions_.clear();
-        this->listOfPossibleArguments_.clear();
-
-        this->functionclass_ = 0;
-        this->function_ = 0;
-        this->possibleArgument_ = "";
-        this->argument_ = "";
-
-        this->errorMessage_ = "";
-        this->state_ = CommandState::Empty;
-    }
-
-    bool CommandEvaluation::isValid() const
-    {
-        return (this->function_);
-    }
-
-    bool CommandEvaluation::execute() const
-    {
-        if (!this->isValid())
-            return false;
-
-        if (this->bEvaluatedParams_ && this->function_)
-        {
-            COUT(6) << "CE_execute (evaluation): " << this->function_->getName() << " " << this->param_[0] << " " << this->param_[1] << " " << this->param_[2] << " " << this->param_[3] << " " << this->param_[4] << std::endl;
-            (*this->function_)(this->param_[0], this->param_[1], this->param_[2], this->param_[3], this->param_[4]);
-            return true;
-        }
-
-        if (!this->bCommandChanged_ || nocaseCmp(removeTrailingWhitespaces(this->command_), removeTrailingWhitespaces(this->originalCommand_)) == 0)
-        {
-            COUT(4) << "CE_execute: " << this->command_ << "\n";
-
-            unsigned int startindex = this->getStartindex();
-            if (this->commandTokens_.size() > startindex)
-                return this->function_->parse(removeSlashes(this->commandTokens_.subSet(startindex).join() + this->getAdditionalParameter()));
-            else
-                return this->function_->parse(removeSlashes(this->additionalParameter_));
-        }
-
-        return false;
-    }
-
-    std::string CommandEvaluation::complete()
-    {
-        if (!this->bNewCommand_)
-        {
-            switch (this->state_)
-            {
-                case CommandState::Uninitialized:
-                    break;
-                case CommandState::Empty:
-                    break;
-                case CommandState::ShortcutOrIdentifier:
-                    if (this->function_)
-                    {
-                        if (this->function_->getParamCount() == 0)
-                            return (this->command_ = this->function_->getName());
-                        else
-                            return (this->command_ = this->function_->getName() + " ");
-                    }
-                    else if (this->functionclass_)
-                        return (this->command_ = this->functionclass_->getName() + " ");
-                    break;
-                case CommandState::Function:
-                    if (this->function_)
-                    {
-                        if (this->function_->getParamCount() == 0)
-                            return (this->command_ = this->functionclass_->getName() + " " + this->function_->getName());
-                        else
-                            return (this->command_ = this->functionclass_->getName() + " " + this->function_->getName() + " ");
-                    }
-                    break;
-                case CommandState::ParamPreparation:
-                case CommandState::Params:
-                {
-                    if (this->argument_ == "" && this->possibleArgument_ == "")
-                        break;
-
-                    unsigned int maxIndex = this->commandTokens_.size();
-                    if (this->command_[this->command_.size() - 1] != ' ')
-                        maxIndex -= 1;
-                    std::string whitespace = "";
-
-                    if (this->possibleArgument_ != "")
-                    {
-                        this->argument_ = this->possibleArgument_;
-                        if (this->function_->getParamCount() > (maxIndex + 1 - this->getStartindex()))
-                            whitespace = " ";
-                    }
-
-                    return (this->command_ = this->commandTokens_.subSet(0, maxIndex).join() + " " + this->argument_ + whitespace);
-                    break;
-                }
-                case CommandState::Finished:
-                    break;
-                case CommandState::Error:
-                    break;
-            }
-        }
-        this->bNewCommand_ = false;
-        return this->command_;
-    }
-
-    std::string CommandEvaluation::hint() const
-    {
-        switch (this->state_)
-        {
-            case CommandState::Uninitialized:
-                break;
-            case CommandState::Empty:
-            case CommandState::ShortcutOrIdentifier:
-                if (this->listOfPossibleFunctions_.size() == 0)
-                    return CommandEvaluation::dump(this->listOfPossibleIdentifiers_);
-                else if (this->listOfPossibleIdentifiers_.size() == 0)
-                    return CommandEvaluation::dump(this->listOfPossibleFunctions_);
-                else
-                    return (CommandEvaluation::dump(this->listOfPossibleFunctions_) + "\n" + CommandEvaluation::dump(this->listOfPossibleIdentifiers_));
-                break;
-            case CommandState::Function:
-                return CommandEvaluation::dump(this->listOfPossibleFunctions_);
-                break;
-            case CommandState::ParamPreparation:
-            case CommandState::Params:
-                if (this->listOfPossibleArguments_.size() > 0)
-                    return CommandEvaluation::dump(this->listOfPossibleArguments_);
-                else
-                    return CommandEvaluation::dump(this->function_);
-            case CommandState::Finished:
-                if (this->function_)
-                    return CommandEvaluation::dump(this->function_);
-                break;
-            case CommandState::Error:
-                return this->errorMessage_;
-                break;
-        }
-
-        return "";
-    }
-
-    void CommandEvaluation::evaluateParams()
-    {
-        this->bEvaluatedParams_ = false;
-
-        for (unsigned int i = 0; i < MAX_FUNCTOR_ARGUMENTS; i++)
-            this->param_[i] = MT_Type::Null;
-
-        if (!this->isValid())
-            return;
-
-        unsigned int startindex = this->getStartindex();
-
-        if (this->commandTokens_.size() <= startindex)
-        {
-            if (this->function_->evaluate(this->getAdditionalParameter(), this->param_, " "))
-                this->bEvaluatedParams_ = true;
-        }
-        else if (this->commandTokens_.size() > startindex)
-        {
-            if (this->function_->evaluate(this->commandTokens_.subSet(startindex).join() + this->getAdditionalParameter(), this->param_, " "))
-                this->bEvaluatedParams_ = true;
-        }
-    }
-
-    void CommandEvaluation::setEvaluatedParameter(unsigned int index, MultiType param)
-    {
-        if (index < MAX_FUNCTOR_ARGUMENTS)
-            this->param_[index] = param;
-    }
-
-    MultiType CommandEvaluation::getEvaluatedParameter(unsigned int index) const
-    {
-        if (index < MAX_FUNCTOR_ARGUMENTS)
-            return this->param_[index];
-
-        return MT_Type::Null;
-    }
-
-    bool CommandEvaluation::hasReturnvalue() const
-    {
-        if (this->function_)
-            return this->function_->hasReturnvalue();
-
-        return MT_Type::Null;
-    }
-
-    MultiType CommandEvaluation::getReturnvalue() const
-    {
-        if (this->function_)
-            return this->function_->getReturnvalue();
-
-        return MultiType();
-    }
-
-
-    unsigned int CommandEvaluation::getStartindex() const
-    {
-        if (this->functionclass_ && this->function_)
-            return 2;
-        else if (this->function_)
-            return 1;
-        else
-            return 0;
-    }
-
-    std::string CommandEvaluation::dump(const std::list<std::pair<const std::string*, const std::string*> >& list)
-    {
-        std::string output = "";
-        for (std::list<std::pair<const std::string*, const std::string*> >::const_iterator it = list.begin(); it != list.end(); ++it)
-        {
-            if (it != list.begin())
-                output += " ";
-
-            output += *(*it).second;
-        }
-        return output;
-    }
-
-    std::string CommandEvaluation::dump(const ArgumentCompletionList& list)
-    {
-        std::string output = "";
-        for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
-        {
-            if (it != list.begin())
-                output += " ";
-
-            output += (*it).getDisplay();
-        }
-        return output;
-    }
-
-    std::string CommandEvaluation::dump(const ConsoleCommand* command)
-    {
-        std::string output = command->getName();
-        if (command->getParamCount() > 0)
-            output += ": ";
-
-        for (unsigned int i = 0; i < command->getParamCount(); i++)
-        {
-            if (i != 0)
-                output += " ";
-
-            if (command->defaultValueSet(i))
-                output += "[";
-            else
-                output += "{";
-
-            output += command->getTypenameParam(i);
-
-            if (command->defaultValueSet(i))
-                output += "=" + command->getDefaultValue(i).getString() + "]";
-            else
-                output += "}";
-        }
-        return output;
-    }
-}
Index: code/trunk/src/libraries/core/CommandEvaluation.h
===================================================================
--- code/trunk/src/libraries/core/CommandEvaluation.h	(revision 5772)
+++ 	(revision )
@@ -1,124 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _CommandEvaluation_H__
-#define _CommandEvaluation_H__
-
-#include "CorePrereqs.h"
-
-#include <string>
-#include <list>
-
-#include "ArgumentCompletionListElement.h"
-#include "util/SubString.h"
-#include "util/MultiType.h"
-
-namespace orxonox
-{
-    namespace CommandState
-    {
-        enum Value
-        {
-            Uninitialized,
-            Empty,
-            ShortcutOrIdentifier,
-            Function,
-            ParamPreparation,
-            Params,
-            Finished,
-            Error
-        };
-    }
-
-    class _CoreExport CommandEvaluation
-    {
-        friend class CommandExecutor;
-
-        public:
-            CommandEvaluation();
-
-            void initialize(const std::string& command);
-
-            bool execute() const;
-            std::string complete();
-            std::string hint() const;
-            void evaluateParams();
-
-            bool isValid() const;
-
-            inline ConsoleCommand* getConsoleCommand() const
-                { return this->function_; }
-            inline const std::string& getOriginalCommand() const
-                { return this->originalCommand_; }
-            inline const std::string& getCommand() const
-                { return this->command_; }
-
-            inline void setAdditionalParameter(const std::string& param)
-                { this->additionalParameter_ = param; this->bEvaluatedParams_ = false; }
-            inline std::string getAdditionalParameter() const
-                { return (this->additionalParameter_ != "") ? (" " + this->additionalParameter_) : ""; }
-
-            void setEvaluatedParameter(unsigned int index, MultiType param);
-            MultiType getEvaluatedParameter(unsigned int index) const;
-
-            bool hasReturnvalue() const;
-            MultiType getReturnvalue() const;
-
-        private:
-            unsigned int getStartindex() const;
-            static std::string dump(const std::list<std::pair<const std::string*, const std::string*> >& list);
-            static std::string dump(const ArgumentCompletionList& list);
-            static std::string dump(const ConsoleCommand* command);
-
-
-            bool bNewCommand_;
-            bool bCommandChanged_;
-
-            std::string originalCommand_;
-            std::string command_;
-            SubString commandTokens_;
-            std::string additionalParameter_;
-
-            std::list<std::pair<const std::string*, const std::string*> > listOfPossibleIdentifiers_;
-            std::list<std::pair<const std::string*, const std::string*> > listOfPossibleFunctions_;
-            ArgumentCompletionList listOfPossibleArguments_;
-
-            Identifier* functionclass_;
-            ConsoleCommand* function_;
-            std::string possibleArgument_;
-            std::string argument_;
-
-            std::string errorMessage_;
-            CommandState::Value state_;
-
-            bool bEvaluatedParams_;
-            MultiType param_[5];
-    };
-}
-
-#endif /* _CommandEvaluation_H__ */
Index: code/trunk/src/libraries/core/CommandExecutor.cc
===================================================================
--- code/trunk/src/libraries/core/CommandExecutor.cc	(revision 5772)
+++ 	(revision )
@@ -1,672 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "CommandExecutor.h"
-
-#include "util/Debug.h"
-#include "util/StringUtils.h"
-#include "ConsoleCommand.h"
-#include "Identifier.h"
-#include "Language.h"
-#include "TclBind.h"
-
-namespace orxonox
-{
-    CommandExecutor& CommandExecutor::getInstance()
-    {
-        static CommandExecutor instance;
-        return instance;
-    }
-
-    CommandEvaluation& CommandExecutor::getEvaluation()
-    {
-        return CommandExecutor::getInstance().evaluation_;
-    }
-
-    const CommandEvaluation& CommandExecutor::getLastEvaluation()
-    {
-        return CommandExecutor::getInstance().evaluation_;
-    }
-
-    ConsoleCommand& CommandExecutor::addConsoleCommandShortcut(ConsoleCommand* command, bool bDeleteAtExit)
-    {
-        std::map<std::string, ConsoleCommand*>::const_iterator it = CommandExecutor::getInstance().consoleCommandShortcuts_.find(command->getName());
-        if (it != CommandExecutor::getInstance().consoleCommandShortcuts_.end())
-        {
-            COUT(2) << "Warning: Overwriting console-command shortcut with name " << command->getName() << "." << std::endl;
-        }
-
-        // Make sure we can also delete the external ConsoleCommands that don't belong to an Identifier
-        if (command && bDeleteAtExit)
-        {
-            CommandExecutor::getInstance().consoleCommandExternals_.insert(command);
-        }
-
-        CommandExecutor::getInstance().consoleCommandShortcuts_[command->getName()] = command;
-        CommandExecutor::getInstance().consoleCommandShortcuts_LC_[getLowercase(command->getName())] = command;
-        return (*command);
-    }
-
-    /**
-        @brief Returns the executor of a console command shortcut with given name.
-        @brief name The name of the requested console command shortcut
-        @return The executor of the requested console command shortcut
-    */
-    ConsoleCommand* CommandExecutor::getConsoleCommandShortcut(const std::string& name)
-    {
-        std::map<std::string, ConsoleCommand*>::const_iterator it = CommandExecutor::getInstance().consoleCommandShortcuts_.find(name);
-        if (it != CommandExecutor::getInstance().consoleCommandShortcuts_.end())
-            return (*it).second;
-        else
-            return 0;
-    }
-
-    /**
-        @brief Returns the executor of a console command shortcut with given name in lowercase.
-        @brief name The name of the requested console command shortcut in lowercase
-        @return The executor of the requested console command shortcut
-    */
-    ConsoleCommand* CommandExecutor::getLowercaseConsoleCommandShortcut(const std::string& name)
-    {
-        std::map<std::string, ConsoleCommand*>::const_iterator it = CommandExecutor::getInstance().consoleCommandShortcuts_LC_.find(name);
-        if (it != CommandExecutor::getInstance().consoleCommandShortcuts_LC_.end())
-            return (*it).second;
-        else
-            return 0;
-    }
-
-    bool CommandExecutor::execute(const std::string& command, bool useTcl)
-    {
-        if (useTcl)
-            return TclBind::eval(command);
-
-        CommandExecutor::parseIfNeeded(command);
-        return CommandExecutor::getEvaluation().execute();
-    }
-
-    MultiType CommandExecutor::getReturnValue()
-    {
-        return CommandExecutor::getEvaluation().getReturnvalue();
-    }
-
-    std::string CommandExecutor::getReturnValueString()
-    {
-        return CommandExecutor::getEvaluation().getReturnvalue().getString();
-    }
-
-    std::string CommandExecutor::complete(const std::string& command)
-    {
-        CommandExecutor::parseIfNeeded(command);
-        return CommandExecutor::getEvaluation().complete();
-    }
-
-    std::string CommandExecutor::hint(const std::string& command)
-    {
-        CommandExecutor::parseIfNeeded(command);
-        return CommandExecutor::getEvaluation().hint();
-    }
-
-    CommandEvaluation CommandExecutor::evaluate(const std::string& command)
-    {
-        CommandExecutor::parse(command);
-        CommandExecutor::getEvaluation().evaluateParams();
-        return CommandExecutor::getEvaluation();
-    }
-
-    void CommandExecutor::parseIfNeeded(const std::string& command)
-    {
-        if (CommandExecutor::getEvaluation().state_ == CommandState::Uninitialized)
-        {
-            CommandExecutor::parse(command);
-        }
-        else if (CommandExecutor::getEvaluation().originalCommand_ != command)
-        {
-            if (CommandExecutor::getEvaluation().command_ == command)
-            {
-                CommandExecutor::parse(command);
-                CommandExecutor::getEvaluation().bNewCommand_ = false;
-            }
-            else
-            {
-                CommandExecutor::parse(command);
-            }
-        }
-    }
-
-    void CommandExecutor::parse(const std::string& command, bool bInitialize)
-    {
-        if (bInitialize)
-            CommandExecutor::getEvaluation().initialize(command);
-
-        CommandExecutor::getEvaluation().commandTokens_.split(command, " ", SubString::WhiteSpaces, false, '\\', false, '"', false, '(', ')', false, '\0');
-        CommandExecutor::getEvaluation().command_ = command;
-
-        switch (CommandExecutor::getEvaluation().state_)
-        {
-            case CommandState::Uninitialized:
-            {
-                // Impossible
-                break;
-            }
-            case CommandState::Empty:
-            {
-                if (CommandExecutor::argumentsGiven() == 0)
-                {
-                    CommandExecutor::createListOfPossibleFunctions("");
-                    CommandExecutor::createListOfPossibleIdentifiers("");
-                    break;
-                }
-                else
-                {
-                    CommandExecutor::getEvaluation().state_ = CommandState::ShortcutOrIdentifier;
-                    // Move on to next case
-                }
-            }
-            case CommandState::ShortcutOrIdentifier:
-            {
-                if (CommandExecutor::argumentsGiven() > 1)
-                {
-                    // There's a finished first argument - check if it's a shortcut or a classname
-                    CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(CommandExecutor::getArgument(0));
-                    CommandExecutor::getEvaluation().functionclass_ = CommandExecutor::getPossibleIdentifier(CommandExecutor::getArgument(0));
-
-                    if (CommandExecutor::getEvaluation().function_)
-                    {
-                        // It's a shortcut
-                        CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
-                        CommandExecutor::getEvaluation().functionclass_ = 0;
-                        // Move on to next case
-                    }
-                    else if (CommandExecutor::getEvaluation().functionclass_)
-                    {
-                        // It's a functionname
-                        CommandExecutor::getEvaluation().state_ = CommandState::Function;
-                        CommandExecutor::getEvaluation().function_ = 0;
-                        // Move on to next case
-                    }
-                    else
-                    {
-                        // The first argument is bad
-                        CommandExecutor::getEvaluation().state_ = CommandState::Error;
-                        AddLanguageEntry("commandexecutorunknownfirstargument", "is not a shortcut nor a classname");
-                        CommandExecutor::getEvaluation().errorMessage_ = "Error: " + CommandExecutor::getArgument(0) + " " + GetLocalisation("commandexecutorunknownfirstargument") + ".";
-                        return;
-                    }
-                }
-                else
-                {
-                    // There's no finished first argument - search possible shortcuts or classnames
-                    CommandExecutor::createListOfPossibleFunctions(CommandExecutor::getArgument(0));
-                    CommandExecutor::createListOfPossibleIdentifiers(CommandExecutor::getArgument(0));
-
-                    unsigned int num_functions = CommandExecutor::getEvaluation().listOfPossibleFunctions_.size();
-                    unsigned int num_identifiers = CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.size();
-
-                    if (num_functions == 1 && num_identifiers == 0)
-                    {
-                        // It's a shortcut
-                        std::string functionname = *(*CommandExecutor::getEvaluation().listOfPossibleFunctions_.begin()).first;
-                        CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(functionname);
-                        if (getLowercase(functionname) != getLowercase(CommandExecutor::getArgument(0)))
-                        {
-                            // Unfinished shortcut
-                            CommandExecutor::getEvaluation().bCommandChanged_ = true;
-                        }
-                        CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
-                        CommandExecutor::getEvaluation().functionclass_ = 0;
-                        CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().function_->getName();
-                        if (CommandExecutor::getEvaluation().function_->getParamCount() > 0)
-                        {
-                            CommandExecutor::getEvaluation().command_ += " ";
-                            CommandExecutor::getEvaluation().bCommandChanged_ = true;
-                        }
-                        // Move on to next case
-                    }
-                    else if (num_identifiers == 1 && num_functions == 0)
-                    {
-                        // It's a classname
-                        std::string classname = *(*CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.begin()).first;
-                        CommandExecutor::getEvaluation().functionclass_ = CommandExecutor::getPossibleIdentifier(classname);
-                        if (getLowercase(classname) != getLowercase(CommandExecutor::getArgument(0)))
-                        {
-                            // Unfinished classname
-                            CommandExecutor::getEvaluation().bCommandChanged_ = true;
-                        }
-                        CommandExecutor::getEvaluation().state_ = CommandState::Function;
-                        CommandExecutor::getEvaluation().function_ = 0;
-                        CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().functionclass_->getName() + " ";
-                        // Move on to next case
-                    }
-                    else if (num_identifiers == 0 && num_functions == 0)
-                    {
-                        // No possibilities
-                        CommandExecutor::getEvaluation().state_ = CommandState::Error;
-                        AddLanguageEntry("commandexecutorunknownfirstargumentstart", "There is no command or classname starting with");
-                        CommandExecutor::getEvaluation().errorMessage_ = "Error: " + GetLocalisation("commandexecutorunknownfirstargumentstart") + " " + CommandExecutor::getArgument(0) + ".";
-                        return;
-                    }
-                    else
-                    {
-                        // There are several possiblilities
-                        std::list<std::pair<const std::string*, const std::string*> > temp;
-                        temp.insert(temp.end(), CommandExecutor::getEvaluation().listOfPossibleFunctions_.begin(), CommandExecutor::getEvaluation().listOfPossibleFunctions_.end());
-                        temp.insert(temp.end(), CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.begin(), CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.end());
-                        CommandExecutor::getEvaluation().command_ = CommandExecutor::getCommonBegin(temp);
-                        CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(CommandExecutor::getArgument(0));
-                        CommandExecutor::getEvaluation().functionclass_ = CommandExecutor::getPossibleIdentifier(CommandExecutor::getArgument(0));
-                        CommandExecutor::getEvaluation().bCommandChanged_ = true;
-                        return;
-                    }
-                }
-            }
-            case CommandState::Function:
-            {
-                if (CommandExecutor::getEvaluation().functionclass_)
-                {
-                    // There is a classname - search for the commandname
-                    if (CommandExecutor::argumentsGiven() > 2)
-                    {
-                        // There is a finished second argument - check if it's a commandname
-                        CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(CommandExecutor::getArgument(1), CommandExecutor::getEvaluation().functionclass_);
-
-                        if (CommandExecutor::getEvaluation().function_)
-                        {
-                            // It's a function
-                            CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
-                            // Move on to next case
-                        }
-                        else
-                        {
-                            // The second argument is bad
-                            CommandExecutor::getEvaluation().state_ = CommandState::Error;
-                            AddLanguageEntry("commandexecutorunknownsecondargument", "is not a function of");
-                            CommandExecutor::getEvaluation().errorMessage_ = "Error: " + CommandExecutor::getArgument(1) + " " + GetLocalisation("commandexecutorunknownsecondargument") + " " + CommandExecutor::getEvaluation().functionclass_->getName() + ".";
-                            return;
-                        }
-                    }
-                    else
-                    {
-                        // There is no finished second argument - search for possibilities
-                        CommandExecutor::createListOfPossibleFunctions(CommandExecutor::getArgument(1), CommandExecutor::getEvaluation().functionclass_);
-                        unsigned int num_functions = CommandExecutor::getEvaluation().listOfPossibleFunctions_.size();
-
-                        if (num_functions == 1)
-                        {
-                            // It's a function
-                            std::string functionname = *(*CommandExecutor::getEvaluation().listOfPossibleFunctions_.begin()).first;
-                            CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(functionname, CommandExecutor::getEvaluation().functionclass_);
-                            if (getLowercase(functionname) != getLowercase(CommandExecutor::getArgument(1)))
-                            {
-                                // Unfinished function
-                                CommandExecutor::getEvaluation().bCommandChanged_ = true;
-                            }
-                            CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
-                            CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().functionclass_->getName() + " " + CommandExecutor::getEvaluation().function_->getName();
-                            if (CommandExecutor::getEvaluation().function_->getParamCount() > 0)
-                            {
-                                CommandExecutor::getEvaluation().command_ += " ";
-                                CommandExecutor::getEvaluation().bCommandChanged_ = true;
-                            }
-                            // Move on to next case
-                        }
-                        else if (num_functions == 0)
-                        {
-                            // No possibilities
-                            CommandExecutor::getEvaluation().state_ = CommandState::Error;
-                            AddLanguageEntry("commandexecutorunknownsecondargumentstart", "has no function starting with");
-                            CommandExecutor::getEvaluation().errorMessage_ = "Error: " + CommandExecutor::getEvaluation().functionclass_->getName() + " " + GetLocalisation("commandexecutorunknownsecondargumentstart") + " " + CommandExecutor::getArgument(1) + ".";
-                            return;
-                        }
-                        else
-                        {
-                            // There are several possibilities
-                            CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().functionclass_->getName() + " " + CommandExecutor::getCommonBegin(CommandExecutor::getEvaluation().listOfPossibleFunctions_);
-                            CommandExecutor::getEvaluation().function_ = CommandExecutor::getPossibleCommand(CommandExecutor::getArgument(1), CommandExecutor::getEvaluation().functionclass_);
-                            CommandExecutor::getEvaluation().bCommandChanged_ = true;
-                            return;
-                        }
-                    }
-                }
-                else
-                {
-                    // There is no classname - move on to CommandState::ParamPreparation
-                }
-            }
-            case CommandState::ParamPreparation:
-            {
-                if (CommandExecutor::getEvaluation().function_->getParamCount() == 0 || CommandExecutor::enoughArgumentsGiven(CommandExecutor::getEvaluation().function_))
-                {
-                    CommandExecutor::getEvaluation().state_ = CommandState::Finished;
-                    return;
-                }
-                else
-                {
-                    unsigned int argumentNumber = CommandExecutor::argumentsGiven() - 2;
-                    if (CommandExecutor::getEvaluation().functionclass_)
-                        argumentNumber -= 1;
-
-                    CommandExecutor::createListOfPossibleArguments(CommandExecutor::getLastArgument(), CommandExecutor::getEvaluation().function_, argumentNumber);
-                    CommandExecutor::getEvaluation().state_ = CommandState::Params;
-
-                    if (CommandExecutor::getEvaluation().bCommandChanged_)
-                    {
-                        // Don't do more than one change
-                        return;
-                    }
-                }
-            }
-            case CommandState::Params:
-            {
-                if (CommandExecutor::getEvaluation().listOfPossibleArguments_.size() == 1)
-                {
-                    // There is exactly one possible argument
-                    CommandExecutor::getEvaluation().argument_ = (*CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()).getString();
-                    CommandExecutor::getEvaluation().possibleArgument_ = (*CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()).getString();
-                    CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
-                    return;
-                }
-                else if (CommandExecutor::getEvaluation().listOfPossibleArguments_.size() == 0)
-                {
-                    // The user tries something new - we let him do
-                    CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
-                    CommandExecutor::getEvaluation().argument_ = CommandExecutor::getLastArgument();
-                    return;
-                }
-                else
-                {
-                    // There are several possibilities
-                    unsigned int argumentNumber = CommandExecutor::argumentsGiven();
-                    if (argumentNumber > 0)
-                        --argumentNumber;
-                    if (CommandExecutor::getEvaluation().functionclass_ && argumentNumber > 0)
-                        --argumentNumber;
-
-                    CommandExecutor::getEvaluation().argument_ = CommandExecutor::getCommonBegin(CommandExecutor::getEvaluation().listOfPossibleArguments_);
-                    CommandExecutor::getEvaluation().possibleArgument_ = CommandExecutor::getPossibleArgument(CommandExecutor::getLastArgument(), CommandExecutor::getEvaluation().function_, argumentNumber);
-                    CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation;
-                    return;
-                }
-            }
-            case CommandState::Finished:
-            {
-                // Nothing more to do
-                break;
-            }
-            case CommandState::Error:
-            {
-                // Bad, very bad
-                break;
-            }
-        }
-    }
-
-    unsigned int CommandExecutor::argumentsFinished()
-    {
-        unsigned int argumentsGiven = CommandExecutor::argumentsGiven();
-        if (argumentsGiven > 0)
-            return argumentsGiven - 1;
-        else
-            return 0;
-    }
-
-    unsigned int CommandExecutor::argumentsGiven()
-    {
-        if (CommandExecutor::getEvaluation().command_.size() > 0 && CommandExecutor::getEvaluation().command_[CommandExecutor::getEvaluation().command_.size() - 1] == ' ')
-            return CommandExecutor::getEvaluation().commandTokens_.size() + 1;
-        else
-            return CommandExecutor::getEvaluation().commandTokens_.size();
-    }
-
-    bool CommandExecutor::enoughArgumentsGiven(ConsoleCommand* command)
-    {
-        if (CommandExecutor::getEvaluation().functionclass_)
-            return (CommandExecutor::argumentsGiven() > (2 + command->getParamCount()));
-        else
-            return (CommandExecutor::argumentsGiven() > (1 + command->getParamCount()));
-    }
-
-    std::string CommandExecutor::getArgument(unsigned int index)
-    {
-        if (index < (CommandExecutor::getEvaluation().commandTokens_.size()))
-            return CommandExecutor::getEvaluation().commandTokens_[index];
-        else
-            return "";
-    }
-
-    std::string CommandExecutor::getLastArgument()
-    {
-        return CommandExecutor::getArgument(CommandExecutor::argumentsGiven() - 1);
-    }
-
-    void CommandExecutor::createListOfPossibleIdentifiers(const std::string& fragment)
-    {
-        CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.clear();
-        std::string lowercase = getLowercase(fragment);
-        for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getLowercaseIdentifierMapBegin(); it != Identifier::getLowercaseIdentifierMapEnd(); ++it)
-            if ((*it).second->hasConsoleCommands())
-                if ((*it).first.find(lowercase) == 0 || fragment == "")
-                    CommandExecutor::getEvaluation().listOfPossibleIdentifiers_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
-    }
-
-    void CommandExecutor::createListOfPossibleFunctions(const std::string& fragment, Identifier* identifier)
-    {
-        CommandExecutor::getEvaluation().listOfPossibleFunctions_.clear();
-        std::string lowercase = getLowercase(fragment);
-        if (!identifier)
-        {
-            for (std::map<std::string, ConsoleCommand*>::const_iterator it = CommandExecutor::getLowercaseConsoleCommandShortcutMapBegin(); it != CommandExecutor::getLowercaseConsoleCommandShortcutMapEnd(); ++it)
-                if ((*it).first.find(lowercase) == 0 || fragment == "")
-                    CommandExecutor::getEvaluation().listOfPossibleFunctions_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
-        }
-        else
-        {
-            for (std::map<std::string, ConsoleCommand*>::const_iterator it = identifier->getLowercaseConsoleCommandMapBegin(); it != identifier->getLowercaseConsoleCommandMapEnd(); ++it)
-                if ((*it).first.find(lowercase) == 0 || fragment == "")
-                    CommandExecutor::getEvaluation().listOfPossibleFunctions_.push_back(std::pair<const std::string*, const std::string*>(&(*it).first, &(*it).second->getName()));
-        }
-    }
-
-    void CommandExecutor::createListOfPossibleArguments(const std::string& fragment, ConsoleCommand* command, unsigned int param)
-    {
-        CommandExecutor::createArgumentCompletionList(command, param);
-
-        CommandExecutor::getEvaluation().listOfPossibleArguments_.clear();
-        std::string lowercase = getLowercase(fragment);
-        for (ArgumentCompletionList::const_iterator it = command->getArgumentCompletionListBegin(); it != command->getArgumentCompletionListEnd(); ++it)
-        {
-            if ((*it).lowercaseComparison())
-            {
-                if ((*it).getComparable().find(lowercase) == 0 || fragment == "")
-                    CommandExecutor::getEvaluation().listOfPossibleArguments_.push_back(*it);
-            }
-            else
-            {
-                if ((*it).getComparable().find(fragment) == 0 || fragment == "")
-                    CommandExecutor::getEvaluation().listOfPossibleArguments_.push_back(*it);
-            }
-        }
-    }
-
-    Identifier* CommandExecutor::getPossibleIdentifier(const std::string& name)
-    {
-        std::string lowercase = getLowercase(name);
-        std::map<std::string, Identifier*>::const_iterator it = Identifier::getLowercaseIdentifierMap().find(lowercase);
-        if ((it != Identifier::getLowercaseIdentifierMapEnd()) && (*it).second->hasConsoleCommands())
-            return (*it).second;
-
-        return 0;
-    }
-
-    ConsoleCommand* CommandExecutor::getPossibleCommand(const std::string& name, Identifier* identifier)
-    {
-        std::string lowercase = getLowercase(name);
-        if (!identifier)
-        {
-            std::map<std::string, ConsoleCommand*>::const_iterator it = CommandExecutor::getLowercaseConsoleCommandShortcutMap().find(lowercase);
-            if (it != CommandExecutor::getLowercaseConsoleCommandShortcutMapEnd())
-                return (*it).second;
-        }
-        else
-        {
-            std::map<std::string, ConsoleCommand*>::const_iterator it = identifier->getLowercaseConsoleCommandMap().find(lowercase);
-            if (it != identifier->getLowercaseConsoleCommandMapEnd())
-                return (*it).second;
-        }
-        return 0;
-    }
-
-    std::string CommandExecutor::getPossibleArgument(const std::string& name, ConsoleCommand* command, unsigned int param)
-    {
-        CommandExecutor::createArgumentCompletionList(command, param);
-
-        std::string lowercase = getLowercase(name);
-        for (ArgumentCompletionList::const_iterator it = command->getArgumentCompletionListBegin(); it != command->getArgumentCompletionListEnd(); ++it)
-        {
-            if ((*it).lowercaseComparison())
-            {
-                if ((*it).getComparable() == lowercase)
-                    return (*it).getString();
-            }
-            else
-            {
-                if ((*it).getComparable() == name)
-                    return (*it).getString();
-            }
-        }
-
-        return "";
-    }
-
-    void CommandExecutor::createArgumentCompletionList(ConsoleCommand* command, unsigned int param)
-    {
-        std::string params[5];
-
-        unsigned int index = 0;
-        unsigned int lowestIndex = 1 + (CommandExecutor::getEvaluation().functionclass_ != 0);
-
-        for (unsigned int i = CommandExecutor::argumentsGiven() - 1; i >= lowestIndex; --i)
-        {
-            params[index] = CommandExecutor::getArgument(i);
-            ++index;
-            if (index >= 5)
-                break;
-        }
-
-        command->createArgumentCompletionList(param, params[0], params[1], params[2], params[3], params[4]);
-    }
-
-    std::string CommandExecutor::getCommonBegin(const std::list<std::pair<const std::string*, const std::string*> >& list)
-    {
-        if (list.size() == 0)
-        {
-            return "";
-        }
-        else if (list.size() == 1)
-        {
-            return ((*(*list.begin()).first) + " ");
-        }
-        else
-        {
-            std::string output = "";
-            for (unsigned int i = 0; true; i++)
-            {
-                char temp = 0;
-                for (std::list<std::pair<const std::string*, const std::string*> >::const_iterator it = list.begin(); it != list.end(); ++it)
-                {
-                    if ((*(*it).first).size() > i)
-                    {
-                        if (it == list.begin())
-                        {
-                            temp = (*(*it).first)[i];
-                        }
-                        else
-                        {
-                            if (temp != (*(*it).first)[i])
-                                return output;
-                        }
-                    }
-                    else
-                    {
-                        return output;
-                    }
-                }
-                output += temp;
-            }
-            return output;
-        }
-    }
-
-    std::string CommandExecutor::getCommonBegin(const ArgumentCompletionList& list)
-    {
-        if (list.size() == 0)
-        {
-            return "";
-        }
-        else if (list.size() == 1)
-        {
-            return ((*list.begin()).getComparable() + " ");
-        }
-        else
-        {
-            std::string output = "";
-            for (unsigned int i = 0; true; i++)
-            {
-                char temp = 0;
-                for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
-                {
-                    std::string argument = (*it).getComparable();
-                    if (argument.size() > i)
-                    {
-                        if (it == list.begin())
-                        {
-                            temp = argument[i];
-                        }
-                        else
-                        {
-                            if (temp != argument[i])
-                                return output;
-                        }
-                    }
-                    else
-                    {
-                        return output;
-                    }
-                }
-                output += temp;
-            }
-            return output;
-        }
-    }
-
-    void CommandExecutor::destroyExternalCommands()
-    {
-        for (std::set<ConsoleCommand*>::const_iterator it = CommandExecutor::getInstance().consoleCommandExternals_.begin();
-            it != CommandExecutor::getInstance().consoleCommandExternals_.end(); ++it)
-            delete *it;
-    }
-}
Index: code/trunk/src/libraries/core/CommandExecutor.h
===================================================================
--- code/trunk/src/libraries/core/CommandExecutor.h	(revision 5772)
+++ 	(revision )
@@ -1,114 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _CommandExecutor_H__
-#define _CommandExecutor_H__
-
-#include "CorePrereqs.h"
-
-#include <map>
-#include <set>
-#include <string>
-
-#include "util/MultiType.h"
-#include "CommandEvaluation.h"
-
-// tolua_begin
-namespace orxonox
-{
-    class _CoreExport CommandExecutor
-    {
-// tolua_end
-        public:
-            static bool execute(const std::string& command, bool useTcl = true); // tolua_export
-            static MultiType getReturnValue();
-            static std::string getReturnValueString(); // tolua_export
-
-            static std::string complete(const std::string& command);
-            static std::string hint(const std::string& command);
-
-            static CommandEvaluation evaluate(const std::string& command);
-            static const CommandEvaluation& getLastEvaluation();
-
-            static ConsoleCommand& addConsoleCommandShortcut(ConsoleCommand* command, bool bDeleteAtExit = false);
-            static ConsoleCommand* getConsoleCommandShortcut(const std::string& name);
-            static ConsoleCommand* getLowercaseConsoleCommandShortcut(const std::string& name);
-
-            /** @brief Returns the map that stores all console commands. @return The const_iterator */
-            static inline const std::map<std::string, ConsoleCommand*>& getConsoleCommandShortcutMap() { return CommandExecutor::getInstance().consoleCommandShortcuts_; }
-            /** @brief Returns a const_iterator to the beginning of the map that stores all console commands. @return The const_iterator */
-            static inline std::map<std::string, ConsoleCommand*>::const_iterator getConsoleCommandShortcutMapBegin() { return CommandExecutor::getInstance().consoleCommandShortcuts_.begin(); }
-            /** @brief Returns a const_iterator to the end of the map that stores all console commands. @return The const_iterator */
-            static inline std::map<std::string, ConsoleCommand*>::const_iterator getConsoleCommandShortcutMapEnd() { return CommandExecutor::getInstance().consoleCommandShortcuts_.end(); }
-
-            /** @brief Returns the map that stores all console commands with their names in lowercase. @return The const_iterator */
-            static inline const std::map<std::string, ConsoleCommand*>& getLowercaseConsoleCommandShortcutMap() { return CommandExecutor::getInstance().consoleCommandShortcuts_LC_; }
-            /** @brief Returns a const_iterator to the beginning of the map that stores all console commands with their names in lowercase. @return The const_iterator */
-            static inline std::map<std::string, ConsoleCommand*>::const_iterator getLowercaseConsoleCommandShortcutMapBegin() { return CommandExecutor::getInstance().consoleCommandShortcuts_LC_.begin(); }
-            /** @brief Returns a const_iterator to the end of the map that stores all console commands with their names in lowercase. @return The const_iterator */
-            static inline std::map<std::string, ConsoleCommand*>::const_iterator getLowercaseConsoleCommandShortcutMapEnd() { return CommandExecutor::getInstance().consoleCommandShortcuts_LC_.end(); }
-
-            static void destroyExternalCommands();
-
-        private:
-            CommandExecutor() {}
-            CommandExecutor(const CommandExecutor& other);
-            ~CommandExecutor() {}
-
-            static CommandExecutor& getInstance();
-            static CommandEvaluation& getEvaluation();
-
-            static void parseIfNeeded(const std::string& command);
-            static void parse(const std::string& command, bool bInitialize = true);
-
-            static unsigned int argumentsFinished();
-            static unsigned int argumentsGiven();
-            static bool enoughArgumentsGiven(ConsoleCommand* command);
-            static std::string getArgument(unsigned int index);
-            static std::string getLastArgument();
-
-            static void createListOfPossibleIdentifiers(const std::string& fragment);
-            static void createListOfPossibleFunctions(const std::string& fragment, Identifier* identifier = 0);
-            static void createListOfPossibleArguments(const std::string& fragment, ConsoleCommand* command, unsigned int param);
-
-            static Identifier* getPossibleIdentifier(const std::string& name);
-            static ConsoleCommand* getPossibleCommand(const std::string& name, Identifier* identifier = 0);
-            static std::string getPossibleArgument(const std::string& name, ConsoleCommand* command, unsigned int param);
-
-            static void createArgumentCompletionList(ConsoleCommand* command, unsigned int param);
-            static std::string getCommonBegin(const std::list<std::pair<const std::string*, const std::string*> >& list);
-            static std::string getCommonBegin(const ArgumentCompletionList& list);
-
-            CommandEvaluation evaluation_;
-            std::map<std::string, ConsoleCommand*> consoleCommandShortcuts_;
-            std::map<std::string, ConsoleCommand*> consoleCommandShortcuts_LC_;
-            std::set<ConsoleCommand*>              consoleCommandExternals_;
-    }; // tolua_export
-} // tolua_export
-
-#endif /* _CommandExecutor_H__ */
Index: code/trunk/src/libraries/core/ConfigFileManager.cc
===================================================================
--- code/trunk/src/libraries/core/ConfigFileManager.cc	(revision 5772)
+++ code/trunk/src/libraries/core/ConfigFileManager.cc	(revision 5774)
@@ -34,5 +34,4 @@
 #include "util/Math.h"
 #include "util/StringUtils.h"
-#include "ConsoleCommand.h"
 #include "ConfigValueContainer.h"
 #include "Core.h"
@@ -40,10 +39,4 @@
 namespace orxonox
 {
-    SetConsoleCommandShortcutExtern(config).argumentCompleter(0, autocompletion::configvalueclasses()).argumentCompleter(1, autocompletion::configvalues()).argumentCompleter(2, autocompletion::configvalue());
-    SetConsoleCommandShortcutExtern(tconfig).argumentCompleter(0, autocompletion::configvalueclasses()).argumentCompleter(1, autocompletion::configvalues()).argumentCompleter(2, autocompletion::configvalue());
-    SetConsoleCommandShortcutExtern(reloadConfig);
-    SetConsoleCommandShortcutExtern(cleanConfig);
-    SetConsoleCommandShortcutExtern(loadSettings).argumentCompleter(0, autocompletion::files());
-
     bool config(const std::string& classname, const std::string& varname, const std::string& value)
     {
Index: code/trunk/src/libraries/core/ConsoleCommand.cc
===================================================================
--- code/trunk/src/libraries/core/ConsoleCommand.cc	(revision 5772)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "ConsoleCommand.h"
-
-namespace orxonox
-{
-    ConsoleCommand::ConsoleCommand(Functor* functor, const std::string& name) : Executor(functor, name)
-    {
-        this->accessLevel_ = AccessLevel::None;
-        this->argumentCompleter_[0] = 0;
-        this->argumentCompleter_[1] = 0;
-        this->argumentCompleter_[2] = 0;
-        this->argumentCompleter_[3] = 0;
-        this->argumentCompleter_[4] = 0;
-
-        this->keybindMode_ = KeybindMode::OnPress;
-        this->inputConfiguredParam_ = -1;
-    }
-
-    ConsoleCommand& ConsoleCommand::argumentCompleter(unsigned int param, ArgumentCompleter* completer)
-    {
-        if (param < 5)
-            this->argumentCompleter_[param] = completer;
-        else
-        {
-            COUT(2) << "Warning: Couldn't add autocompletion-function for param " << param << ": index out of bound." << std::endl;
-        }
-        return (*this);
-    }
-
-    ArgumentCompleter* ConsoleCommand::getArgumentCompleter(unsigned int param) const
-    {
-        if (param < 5)
-            return this->argumentCompleter_[param];
-        else
-            return 0;
-    }
-
-    void ConsoleCommand::createArgumentCompletionList(unsigned int param, const std::string& param1, const std::string& param2, const std::string& param3, const std::string& param4, const std::string& param5)
-    {
-        if (param < 5 && this->argumentCompleter_[param])
-            this->argumentList_ = (*this->argumentCompleter_[param])(param1, param2, param3, param4, param5);
-        else
-            this->argumentList_.clear();
-    }
-}
Index: code/trunk/src/libraries/core/ConsoleCommand.h
===================================================================
--- code/trunk/src/libraries/core/ConsoleCommand.h	(revision 5772)
+++ 	(revision )
@@ -1,157 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _ConsoleCommand_H__
-#define _ConsoleCommand_H__
-
-#include "CorePrereqs.h"
-
-#include <boost/preprocessor/cat.hpp>
-
-#include "ArgumentCompletionFunctions.h"
-#include "CommandExecutor.h"
-#include "Executor.h"
-#include "Identifier.h"
-
-
-#define SetConsoleCommand(classname, function, bCreateShortcut) \
-    SetConsoleCommandGeneric(classname, function, #function, bCreateShortcut)
-#define SetConsoleCommandAlias(classname, function, name, bCreateShortcut) \
-    SetConsoleCommandGeneric(classname, function, name, bCreateShortcut)
-
-#define SetConsoleCommandGeneric(classname, function, name, bCreateShortcut) \
-    orxonox::ConsoleCommand& BOOST_PP_CAT(classname##function##consolecommand__, __LINE__) = orxonox::ClassIdentifier<classname>::getIdentifier(#classname)->addConsoleCommand(orxonox::createConsoleCommand(orxonox::createFunctor(&classname::function), name), bCreateShortcut)
-
-
-#define SetConsoleCommandShortcut(classname, function) \
-    SetConsoleCommandShortcutAliasGeneric(classname, function, #function)
-#define SetConsoleCommandShortcutAlias(classname, function, name) \
-    SetConsoleCommandShortcutAliasGeneric(classname, function, name)
-#define SetConsoleCommandShortcutAliasGeneric(classname, function, name) \
-    SetConsoleCommandShortcutGeneric(BOOST_PP_CAT(function##consolecommand__, __LINE__), orxonox::createConsoleCommand(orxonox::createFunctor(&classname::function), name))
-
-#define SetConsoleCommandShortcutExtern(function) \
-    SetConsoleCommandShortcutExternAliasGeneric(function, #function)
-#define SetConsoleCommandShortcutExternAlias(function, name) \
-    SetConsoleCommandShortcutExternAliasGeneric(function, name)
-#define SetConsoleCommandShortcutExternAliasGeneric(function, name) \
-    SetConsoleCommandShortcutGeneric(BOOST_PP_CAT(function##consolecommand__, __LINE__), orxonox::createConsoleCommand(orxonox::createFunctor(&function), name))
-
-#define SetConsoleCommandShortcutGeneric(fakevariable, command) \
-    orxonox::ConsoleCommand& fakevariable = orxonox::CommandExecutor::addConsoleCommandShortcut(command, true)
-
-
-namespace orxonox
-{
-    namespace AccessLevel
-    {
-        enum Value
-        {
-            None,
-            User,
-            Admin,
-            Offline,
-            Debug,
-            Disabled
-        };
-    }
-
-    class _CoreExport ConsoleCommand : public Executor
-    {
-        public:
-            ConsoleCommand(Functor* functor, const std::string& name = "");
-
-            inline ConsoleCommand& description(const std::string& description)
-                { this->Executor::setDescription(description); return (*this); }
-            inline ConsoleCommand& descriptionParam(int param, const std::string& description)
-                { this->Executor::setDescriptionParam(param, description); return (*this); }
-            inline ConsoleCommand& descriptionReturnvalue(const std::string& description)
-                { this->Executor::setDescriptionReturnvalue(description); return (*this); }
-            inline ConsoleCommand& defaultValues(const MultiType& param1)
-                { this->Executor::setDefaultValues(param1); return (*this); }
-            inline ConsoleCommand& defaultValues(const MultiType& param1, const MultiType& param2)
-                { this->Executor::setDefaultValues(param1, param2); return (*this); }
-            inline ConsoleCommand& defaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3)
-                { this->Executor::setDefaultValues(param1, param2, param3); return (*this); }
-            inline ConsoleCommand& defaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4)
-                { this->Executor::setDefaultValues(param1, param2, param3, param4); return (*this); }
-            inline ConsoleCommand& defaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5)
-                { this->Executor::setDefaultValues(param1, param2, param3, param4, param5); return (*this); }
-            inline ConsoleCommand& defaultValue(unsigned int index, const MultiType& param)
-                { this->Executor::setDefaultValue(index, param); return (*this); }
-
-            inline ConsoleCommand& accessLevel(AccessLevel::Value level)
-                { this->accessLevel_ = level; return (*this); }
-            inline AccessLevel::Value getAccessLevel() const
-                { return this->accessLevel_; }
-
-            ConsoleCommand& argumentCompleter(unsigned int param, ArgumentCompleter* completer);
-            ArgumentCompleter* getArgumentCompleter(unsigned int param) const;
-
-            void createArgumentCompletionList(unsigned int param, const std::string& param1 = "", const std::string& param2 = "", const std::string& param3 = "", const std::string& param4 = "", const std::string& param5 = "");
-            const ArgumentCompletionList& getArgumentCompletionList() const
-                { return this->argumentList_; }
-            ArgumentCompletionList::const_iterator getArgumentCompletionListBegin() const
-                { return this->argumentList_.begin(); }
-            ArgumentCompletionList::const_iterator getArgumentCompletionListEnd() const
-                { return this->argumentList_.end(); }
-
-            inline ConsoleCommand& setAsInputCommand()
-            {
-                this->keybindMode(KeybindMode::OnHold);
-                this->defaultValue(0, Vector2(0.0f, 0.0f));
-                this->inputConfiguredParam(0);
-                return *this;
-            }
-
-            inline ConsoleCommand& keybindMode(KeybindMode::Value mode)
-                { this->keybindMode_ = mode; return *this; }
-            inline KeybindMode::Value getKeybindMode() const
-                { return this->keybindMode_; }
-
-            inline ConsoleCommand& inputConfiguredParam(int index)
-                { this->inputConfiguredParam_ = index; return *this; }
-            inline int getInputConfiguredParam_() const
-                { return this->inputConfiguredParam_; }
-
-        private:
-            AccessLevel::Value accessLevel_;
-            ArgumentCompleter* argumentCompleter_[5];
-            ArgumentCompletionList argumentList_;
-
-            KeybindMode::Value keybindMode_;
-            int inputConfiguredParam_;
-    };
-
-    inline ConsoleCommand* createConsoleCommand(Functor* functor, const std::string& name = "")
-    {
-        return new ConsoleCommand(functor, name);
-    }
-}
-
-#endif /* _ConsoleCommand_H__ */
Index: code/trunk/src/libraries/core/ConsoleCommandCompilation.cc
===================================================================
--- code/trunk/src/libraries/core/ConsoleCommandCompilation.cc	(revision 5772)
+++ 	(revision )
@@ -1,180 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "ConsoleCommandCompilation.h"
-
-#include <fstream>
-#include <set>
-#include <string>
-
-#include "util/Debug.h"
-#include "util/ExprParser.h"
-#include "ConsoleCommand.h"
-
-namespace orxonox
-{
-    SetConsoleCommandShortcutExtern(source).argumentCompleter(0, autocompletion::files());
-    SetConsoleCommandShortcutExtern(echo);
-    SetConsoleCommandShortcutExtern(puts);
-
-    SetConsoleCommandShortcutExtern(read).argumentCompleter(0, autocompletion::files());
-    SetConsoleCommandShortcutExtern(append).argumentCompleter(0, autocompletion::files());
-    SetConsoleCommandShortcutExtern(write).argumentCompleter(0, autocompletion::files());
-
-    SetConsoleCommandShortcutExtern(calculate);
-
-    void source(const std::string& filename)
-    {
-        static std::set<std::string> executingFiles;
-
-        std::set<std::string>::const_iterator it = executingFiles.find(filename);
-        if (it != executingFiles.end())
-        {
-            COUT(1) << "Error: Recurring source command in \"" << filename << "\". Stopped execution." << std::endl;
-            return;
-        }
-
-        // Open the file
-        std::ifstream file;
-        file.open(filename.c_str(), std::fstream::in);
-
-        if (!file.is_open())
-        {
-            COUT(1) << "Error: Couldn't open file \"" << filename << "\"." << std::endl;
-            return;
-        }
-
-        executingFiles.insert(filename);
-
-        // Iterate through the file and put the lines into the CommandExecutor
-        while (file.good() && !file.eof())
-        {
-            std::string line;
-            std::getline(file, line);
-            CommandExecutor::execute(line);
-        }
-
-        executingFiles.erase(filename);
-        file.close();
-    }
-
-    std::string echo(const std::string& text)
-    {
-        std::cout << text << std::endl;
-        return text;
-    }
-
-    void puts(bool newline, const std::string& text)
-    {
-        if (newline)
-        {
-            COUT(0) << stripEnclosingBraces(text) << std::endl;
-        }
-        else
-        {
-            COUT(0) << stripEnclosingBraces(text);
-        }
-    }
-
-    void write(const std::string& filename, const std::string& text)
-    {
-        std::ofstream file;
-        file.open(filename.c_str(), std::fstream::out);
-
-        if (!file.is_open())
-        {
-            COUT(1) << "Error: Couldn't write to file \"" << filename << "\"." << std::endl;
-            return;
-        }
-
-        file << text << std::endl;
-        file.close();
-    }
-
-    void append(const std::string& filename, const std::string& text)
-    {
-        std::ofstream file;
-        file.open(filename.c_str(), std::fstream::app);
-
-        if (!file.is_open())
-        {
-            COUT(1) << "Error: Couldn't append to file \"" << filename << "\"." << std::endl;
-            return;
-        }
-
-        file << text << std::endl;
-        file.close();
-    }
-
-    std::string read(const std::string& filename)
-    {
-        std::ifstream file;
-        file.open(filename.c_str(), std::fstream::in);
-
-        if (!file.is_open())
-        {
-            COUT(1) << "Error: Couldn't read from file \"" << filename << "\"." << std::endl;
-            return "";
-        }
-
-        std::string output = "";
-        while (file.good() && !file.eof())
-        {
-            std::string line;
-            std::getline(file, line);
-            output += line;
-            output += "\n";
-        }
-
-        file.close();
-
-        return output;
-    }
-
-    float calculate(const std::string& calculation)
-    {
-        ExprParser expr(calculation);
-        if (expr.getSuccess())
-        {
-            if (expr.getResult() == 42.0)
-            {
-                COUT(3) << "Greetings from the restaurant at the end of the universe." << std::endl;
-            }
-            if (expr.getRemains() != "")
-            {
-                COUT(2) << "Warning: Expression could not be parsed to the end! Remains: '" << expr.getRemains() << "'" << std::endl;
-            }
-            return static_cast<float>(expr.getResult());
-        }
-        else
-        {
-            COUT(1) << "Error: Cannot calculate expression: Parse error." << std::endl;
-            return 0;
-        }
-    }
-}
Index: code/trunk/src/libraries/core/ConsoleCommandCompilation.h
===================================================================
--- code/trunk/src/libraries/core/ConsoleCommandCompilation.h	(revision 5772)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _ConsoleCommandCompilation_H__
-#define _ConsoleCommandCompilation_H__
-
-#include "CorePrereqs.h"
-
-namespace orxonox
-{
-    _CoreExport void source(const std::string& filename);
-    _CoreExport std::string echo(const std::string& text);
-    _CoreExport void puts(bool newline, const std::string& test);
-
-    _CoreExport void write(const std::string& filename, const std::string& text);
-    _CoreExport void append(const std::string& filename, const std::string& text);
-    _CoreExport std::string read(const std::string& filename);
-
-    _CoreExport float calculate(const std::string& calculation);
-}
-
-#endif /* _ConsoleCommandCompilation_H__ */
Index: code/trunk/src/libraries/core/Core.cc
===================================================================
--- code/trunk/src/libraries/core/Core.cc	(revision 5772)
+++ code/trunk/src/libraries/core/Core.cc	(revision 5774)
@@ -63,5 +63,4 @@
 #include "util/SignalHandler.h"
 #include "Clock.h"
-#include "CommandExecutor.h"
 #include "CommandLine.h"
 #include "ConfigFileManager.h"
@@ -70,14 +69,7 @@
 #include "DynLibManager.h"
 #include "Factory.h"
-#include "GameMode.h"
-#include "GraphicsManager.h"
-#include "GUIManager.h"
 #include "Identifier.h"
 #include "Language.h"
 #include "LuaState.h"
-#include "Shell.h"
-#include "TclBind.h"
-#include "TclThreadManager.h"
-#include "input/InputManager.h"
 
 // Boost 1.36 has some issues with deprecated functions that have been omitted
@@ -117,12 +109,4 @@
             RegisterRootObject(CoreConfiguration);
             this->setConfigValues();
-
-            // External data directory only exists for dev runs
-            if (Core::isDevelopmentRun())
-            {
-                // Possible data path override by the command line
-                if (!CommandLine::getArgument("externalDataPath")->hasDefaultValue())
-                    tsetExternalDataPath(CommandLine::getValue("externalDataPath"));
-            }
         }
 
@@ -194,15 +178,4 @@
         }
 
-        /**
-        @brief
-            Temporary sets the external data path
-        @param path
-            The new data path
-        */
-        void tsetExternalDataPath(const std::string& path)
-        {
-            externalDataPath_ = boost::filesystem::path(path);
-        }
-
         void initializeRandomNumberGenerator()
         {
@@ -228,5 +201,4 @@
         boost::filesystem::path modulePath_;            //!< Path to the modules
         boost::filesystem::path dataPath_;              //!< Path to the data file folder
-        boost::filesystem::path externalDataPath_;      //!< Path to the external data file folder
         boost::filesystem::path configPath_;            //!< Path to the config file folder
         boost::filesystem::path logPath_;               //!< Path to the log file folder
@@ -237,9 +209,6 @@
         // Cleanup guard for identifier destruction (incl. XMLPort, configValues, consoleCommands)
         : identifierDestroyer_(Identifier::destroyAllIdentifiers)
-        // Cleanup guard for external console commands that don't belong to an Identifier
-        , consoleCommandDestroyer_(CommandExecutor::destroyExternalCommands)
         , configuration_(new CoreConfiguration()) // Don't yet create config values!
         , bDevRun_(false)
-        , bGraphicsLoaded_(false)
     {
         // Set the hard coded fixed paths
@@ -339,14 +308,4 @@
         // possibility to configure everything below here
         this->configuration_->initialise();
-
-        // Load OGRE excluding the renderer and the render window
-        this->graphicsManager_.reset(new GraphicsManager(false));
-
-        // initialise Tcl
-        this->tclBind_.reset(new TclBind(Core::getDataPathString()));
-        this->tclThreadManager_.reset(new TclThreadManager(tclBind_->getTclInterpreter()));
-
-        // create a shell
-        this->shell_.reset(new Shell());
     }
 
@@ -357,44 +316,4 @@
     Core::~Core()
     {
-    }
-
-    void Core::loadGraphics()
-    {
-        // Any exception should trigger this, even in upgradeToGraphics (see its remarks)
-        Loki::ScopeGuard unloader = Loki::MakeObjGuard(*this, &Core::unloadGraphics);
-
-        // Upgrade OGRE to receive a render window
-        graphicsManager_->upgradeToGraphics();
-
-        // Calls the InputManager which sets up the input devices.
-        inputManager_.reset(new InputManager());
-
-        // load the CEGUI interface
-        guiManager_.reset(new GUIManager(graphicsManager_->getRenderWindow(),
-            inputManager_->getMousePosition(), graphicsManager_->isFullScreen()));
-
-        unloader.Dismiss();
-
-        bGraphicsLoaded_ = true;
-    }
-
-    void Core::unloadGraphics()
-    {
-        this->guiManager_.reset();;
-        this->inputManager_.reset();;
-        this->graphicsManager_.reset();
-
-        // Load Ogre::Root again, but without the render system
-        try
-            { this->graphicsManager_.reset(new GraphicsManager(false)); }
-        catch (...)
-        {
-            COUT(0) << "An exception occurred during 'unloadGraphics':" << Exception::handleMessage() << std::endl
-                    << "Another exception might be being handled which may lead to undefined behaviour!" << std::endl
-                    << "Terminating the program." << std::endl;
-            abort();
-        }
-
-        bGraphicsLoaded_ = false;
     }
 
@@ -457,9 +376,4 @@
     }
 
-    /*static*/ void Core::tsetExternalDataPath(const std::string& path)
-    {
-        getInstance().configuration_->tsetExternalDataPath(path);
-    }
-
     /*static*/ const boost::filesystem::path& Core::getDataPath()
     {
@@ -469,13 +383,4 @@
     {
         return getInstance().configuration_->dataPath_.string() + '/';
-    }
-
-    /*static*/ const boost::filesystem::path& Core::getExternalDataPath()
-    {
-        return getInstance().configuration_->externalDataPath_;
-    }
-    /*static*/ std::string Core::getExternalDataPathString()
-    {
-        return getInstance().configuration_->externalDataPath_.string() + '/';
     }
 
@@ -659,5 +564,4 @@
         {
             configuration_->dataPath_  = specialConfig::dataDevDirectory;
-            configuration_->externalDataPath_ = specialConfig::externalDataDevDirectory;
             configuration_->configPath_ = specialConfig::configDevDirectory;
             configuration_->logPath_    = specialConfig::logDevDirectory;
@@ -725,22 +629,8 @@
     void Core::preUpdate(const Clock& time)
     {
-        if (this->bGraphicsLoaded_)
-        {
-            // process input events
-            this->inputManager_->update(time);
-            // process gui events
-            this->guiManager_->update(time);
-        }
-        // process thread commands
-        this->tclThreadManager_->update(time);
     }
 
     void Core::postUpdate(const Clock& time)
     {
-        if (this->bGraphicsLoaded_)
-        {
-            // Render (doesn't throw)
-            this->graphicsManager_->update(time);
-        }
     }
 }
Index: code/trunk/src/libraries/core/Core.h
===================================================================
--- code/trunk/src/libraries/core/Core.h	(revision 5772)
+++ code/trunk/src/libraries/core/Core.h	(revision 5774)
@@ -85,9 +85,6 @@
             static void  resetLanguage();
 
-            static void tsetExternalDataPath(const std::string& path);
             //! Returns the path to the data files as boost::filesystem::path
             static const boost::filesystem::path& getDataPath();
-            //! Returns the path to the external data files as boost::filesystem::path
-            static const boost::filesystem::path& getExternalDataPath();
             //! Returns the path to the config files as boost::filesystem::path
             static const boost::filesystem::path& getConfigPath();
@@ -98,6 +95,4 @@
             //! Returns the path to the data files as std::string
             static std::string getDataPathString();
-            //! Returns the path to the external data files as std::string
-            static std::string getExternalDataPathString();
             //! Returns the path to the config files as std::string
             static std::string getConfigPathString();
@@ -115,7 +110,4 @@
             void postUpdate(const Clock& time);
 
-            void loadGraphics();
-            void unloadGraphics();
-
             void setFixedPaths();
             void setConfigurablePaths();
@@ -126,18 +118,9 @@
             scoped_ptr<SignalHandler>     signalHandler_;
             SimpleScopeGuard              identifierDestroyer_;
-            SimpleScopeGuard              consoleCommandDestroyer_;
             scoped_ptr<ConfigFileManager> configFileManager_;
             scoped_ptr<Language>          languageInstance_;
             scoped_ptr<CoreConfiguration> configuration_;
-            scoped_ptr<TclBind>           tclBind_;
-            scoped_ptr<TclThreadManager>  tclThreadManager_;
-            scoped_ptr<Shell>             shell_;
-            // graphical
-            scoped_ptr<GraphicsManager>   graphicsManager_;     //!< Interface to OGRE
-            scoped_ptr<InputManager>      inputManager_;        //!< Interface to OIS
-            scoped_ptr<GUIManager>        guiManager_;          //!< Interface to GUI
 
             bool                          bDevRun_;             //!< True for runs in the build directory (not installed)
-            bool                          bGraphicsLoaded_;
 
             static Core* singletonPtr_s;
Index: code/trunk/src/libraries/core/CoreIncludes.h
===================================================================
--- code/trunk/src/libraries/core/CoreIncludes.h	(revision 5772)
+++ code/trunk/src/libraries/core/CoreIncludes.h	(revision 5774)
@@ -80,12 +80,5 @@
 */
 #define CreateFactory(ClassName) \
-    bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName, true)
-
-/**
-    @brief Creates the entry in the Factory for classes which should not be loaded through XML.
-    @param ClassName The name of the class
-*/
-#define CreateUnloadableFactory(ClassName) \
-    bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName, false)
+    bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName)
 
 /**
Index: code/trunk/src/libraries/core/CorePrecompiledHeaders.h
===================================================================
--- code/trunk/src/libraries/core/CorePrecompiledHeaders.h	(revision 5772)
+++ code/trunk/src/libraries/core/CorePrecompiledHeaders.h	(revision 5774)
@@ -70,8 +70,4 @@
 #ifdef ORXONOX_COMPILER_MSVC
 
-#include <ois/OISKeyboard.h> // 15
-#include <ois/OISMouse.h>    // 15
-#include <ois/OISJoyStick.h> // 15
-
 #include "util/SubString.h"  // 14
 
Index: code/trunk/src/libraries/core/Event.cc
===================================================================
--- code/trunk/src/libraries/core/Event.cc	(revision 5772)
+++ 	(revision )
@@ -1,79 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "Event.h"
-
-#include "BaseObject.h"
-#include "Executor.h"
-
-namespace orxonox
-{
-    EventContainer::~EventContainer()
-    {
-        delete this->eventfunction_;
-    }
-
-    void EventContainer::process(BaseObject* object, const Event& event)
-    {
-        if (this->bActive_)
-        {
-            COUT(2) << "Warning: Detected Event loop in section \"" << this->eventname_ << "\" of object \"" << object->getName() << "\" and fired by \"" << event.originator_->getName() << "\"" << std::endl;
-            return;
-        }
-
-        this->bActive_ = true;
-
-        if (this->eventname_ == event.sectionname_)
-        {
-            if (event.originator_->isA(this->subclass_))
-            {
-                if (event.activate_)
-                    ++this->activeEvents_;
-                else
-                {
-                    --this->activeEvents_;
-
-                    if (this->activeEvents_ < 0)
-                        this->activeEvents_ = 0;
-                }
-
-                if (this->eventfunction_->getParamCount() == 0 && event.activate_)
-                    (*this->eventfunction_)();
-                else if ((this->activeEvents_ == 1 && event.activate_) || (this->activeEvents_ == 0 && !event.activate_))
-                {
-                    if (this->eventfunction_->getParamCount() == 1)
-                        (*this->eventfunction_)(this->activeEvents_);
-                    else if (this->eventfunction_->getParamCount() >= 2 && event.castedOriginator_)
-                        (*this->eventfunction_)(this->activeEvents_, event.castedOriginator_);
-                }
-            }
-        }
-
-        this->bActive_ = false;
-    }
-}
Index: code/trunk/src/libraries/core/Event.h
===================================================================
--- code/trunk/src/libraries/core/Event.h	(revision 5772)
+++ 	(revision )
@@ -1,65 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Event_H__
-#define _Event_H__
-
-#include "CorePrereqs.h"
-#include <string>
-
-namespace orxonox
-{
-    struct _CoreExport Event
-    {
-            Event(bool activate, BaseObject* originator) : activate_(activate), originator_(originator), castedOriginator_(0) {}
-
-            bool        activate_;
-            BaseObject* originator_;
-            void*       castedOriginator_;
-            std::string sectionname_;
-    };
-
-    class _CoreExport EventContainer
-    {
-        public:
-            EventContainer(const std::string& eventname, Executor* eventfunction, Identifier* subclass) : bActive_(false), eventname_(eventname), eventfunction_(eventfunction), subclass_(subclass), activeEvents_(0) {}
-            virtual ~EventContainer();
-
-            void process(BaseObject* object, const Event& event);
-
-        private:
-            bool bActive_;
-            std::string eventname_;
-            Executor* eventfunction_;
-            Identifier* subclass_;
-
-            int activeEvents_;
-    };
-}
-
-#endif /* _Event_H__ */
Index: code/trunk/src/libraries/core/EventIncludes.h
===================================================================
--- code/trunk/src/libraries/core/EventIncludes.h	(revision 5772)
+++ 	(revision )
@@ -1,71 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _EventIncludes_H__
-#define _EventIncludes_H__
-
-#include "CorePrereqs.h"
-#include "Executor.h"
-
-#define ORXONOX_SET_EVENT(classname, eventname, functionname, event) \
-    ORXONOX_SET_EVENT_GENERIC(eventcontainer##classname##functionname, classname, eventname, functionname, event, BaseObject)
-
-#define ORXONOX_SET_EVENT_TEMPLATE(classname, eventname, functionname, event, ...) \
-    ORXONOX_SET_EVENT_GENERIC_TEMPLATE(eventcontainer##classname##functionname, classname, eventname, functionname, event, BaseObject, __VA_ARGS__)
-
-#define ORXONOX_SET_SUBCLASS_EVENT(classname, eventname, functionname, event, subclassname) \
-    ORXONOX_SET_EVENT_GENERIC(eventcontainer##classname##functionname, classname, eventname, functionname, event, subclassname)
-
-#define ORXONOX_SET_SUBCLASS_EVENT_TEMPLATE(classname, eventname, functionname, event, subclassname, ...) \
-    ORXONOX_SET_EVENT_GENERIC_TEMPLATE(eventcontainer##classname##functionname, classname, eventname, functionname, event, subclassname, __VA_ARGS__)
-
-#define ORXONOX_SET_EVENT_GENERIC(containername, classname, eventname, functionname, event, subclassname) \
-    orxonox::EventContainer* containername = this->getEventContainer(eventname); \
-    if (!containername) \
-    { \
-        ExecutorMember<classname>* executor = orxonox::createExecutor(orxonox::createFunctor(&classname::functionname), std::string( #classname ) + "::" + #functionname); \
-        executor->setObject(this); \
-        containername = new orxonox::EventContainer(std::string(eventname), executor, orxonox::ClassIdentifier<subclassname>::getIdentifier()); \
-        this->addEventContainer(eventname, containername); \
-    } \
-    event.castedOriginator_ = orxonox::orxonox_cast<subclassname*>(event.originator_); \
-    containername->process(this, event)
-
-#define ORXONOX_SET_EVENT_GENERIC_TEMPLATE(containername, classname, eventname, functionname, event, subclassname, ...) \
-    orxonox::EventContainer* containername = this->getEventContainer(eventname); \
-    if (!containername) \
-    { \
-        ExecutorMember<classname>* executor = orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::functionname), std::string( #classname ) + "::" + #functionname); \
-        executor->setObject(this); \
-        containername = new orxonox::EventContainer(std::string(eventname), executor, orxonox::ClassIdentifier<subclassname>::getIdentifier()); \
-        this->addEventContainer(eventname, containername); \
-    } \
-    event.castedOriginator_ = orxonox::orxonox_cast<subclassname*>(event.originator_); \
-    containername->process(this, event)
-
-#endif /* _EventIncludes_H__ */
Index: code/trunk/src/libraries/core/Factory.cc
===================================================================
--- code/trunk/src/libraries/core/Factory.cc	(revision 5772)
+++ code/trunk/src/libraries/core/Factory.cc	(revision 5774)
@@ -55,18 +55,4 @@
 
     /**
-        @brief Returns the Identifier with a given network ID.
-        @param id The network ID of the wanted Identifier
-        @return The Identifier
-    */
-    Identifier* Factory::getIdentifier(const uint32_t id)
-    {
-        std::map<uint32_t, Identifier*>::const_iterator it = getFactoryPointer()->identifierNetworkIDMap_.find(id);
-        if (it != getFactoryPointer()->identifierNetworkIDMap_.end())
-            return it->second;
-        else
-            return 0;
-    }
-
-    /**
         @brief Adds a new Identifier to both maps.
         @param name The name of the identifier
@@ -76,25 +62,4 @@
     {
         getFactoryPointer()->identifierStringMap_[name] = identifier;
-        getFactoryPointer()->identifierNetworkIDMap_[identifier->getNetworkID()] = identifier;
-    }
-
-    /**
-        @brief Removes the entry with the old network ID and adds a new one.
-        @param identifier The identifier to change
-        @param oldID The old networkID
-        @param newID The new networkID
-    */
-    void Factory::changeNetworkID(Identifier* identifier, const uint32_t oldID, const uint32_t newID)
-    {
-//        getFactoryPointer()->identifierNetworkIDMap_.erase(oldID);
-        getFactoryPointer()->identifierNetworkIDMap_[newID] = identifier;
-    }
-
-    /**
-        @brief Cleans the NetworkID map (needed on clients for correct initialization)
-    */
-    void Factory::cleanNetworkIDs()
-    {
-        getFactoryPointer()->identifierNetworkIDMap_.clear();
     }
 
Index: code/trunk/src/libraries/core/Factory.h
===================================================================
--- code/trunk/src/libraries/core/Factory.h	(revision 5772)
+++ code/trunk/src/libraries/core/Factory.h	(revision 5774)
@@ -62,6 +62,4 @@
             static Identifier* getIdentifier(const uint32_t id);
             static void add(const std::string& name, Identifier* identifier);
-            static void changeNetworkID(Identifier* identifier, const uint32_t oldID, const uint32_t newID);
-            static void cleanNetworkIDs();
             static void createClassHierarchy();
 
@@ -84,5 +82,4 @@
 
             std::map<std::string, Identifier*> identifierStringMap_;            //!< The map, mapping the name with the Identifier
-            std::map<uint32_t, Identifier*> identifierNetworkIDMap_;        //!< The map, mapping the network ID with the Identifier
     };
 
Index: code/trunk/src/libraries/core/GUIManager.cc
===================================================================
--- code/trunk/src/libraries/core/GUIManager.cc	(revision 5772)
+++ 	(revision )
@@ -1,304 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *      Benjamin Knecht
- *   Co-authors:
- *      ...
- *
- */
-
-#include "GUIManager.h"
-
-#include <memory>
-extern "C" {
-#include <lua.h>
-}
-#include <CEGUIDefaultLogger.h>
-#include <CEGUIExceptions.h>
-#include <CEGUIInputEvent.h>
-#include <CEGUIMouseCursor.h>
-#include <CEGUIResourceProvider.h>
-#include <CEGUISystem.h>
-#include <ogreceguirenderer/OgreCEGUIRenderer.h>
-
-#include "SpecialConfig.h" // Configures the macro below
-#ifdef CEGUILUA_USE_INTERNAL_LIBRARY
-#   include <ceguilua/CEGUILua.h>
-#else
-#   include <CEGUILua.h>
-#endif
-
-#include "util/Debug.h"
-#include "util/Exception.h"
-#include "util/OrxAssert.h"
-#include "Core.h"
-#include "Clock.h"
-#include "LuaState.h"
-#include "Resource.h"
-
-namespace orxonox
-{
-    class CEGUILogger : public CEGUI::DefaultLogger
-    {
-    public:
-	    void logEvent(const CEGUI::String& message, CEGUI::LoggingLevel level = CEGUI::Standard)
-        {
-            int orxonoxLevel = CEGUI::Standard;
-            switch (level)
-            {
-                case CEGUI::Errors:      orxonoxLevel = 1; break;
-                case CEGUI::Warnings:    orxonoxLevel = 2; break;
-                case CEGUI::Standard:    orxonoxLevel = 4; break;
-                case CEGUI::Informative: orxonoxLevel = 5; break;
-                case CEGUI::Insane:      orxonoxLevel = 6; break;
-                default: OrxAssert(false, "CEGUI log level out of range, inpect immediately!");
-            }
-            OutputHandler::getOutStream().setOutputLevel(orxonoxLevel)
-                << "CEGUI: " << message << std::endl;
-
-            CEGUI::DefaultLogger::logEvent(message, level);
-        }
-    };
-
-    static CEGUI::MouseButton convertButton(MouseButtonCode::ByEnum button);
-
-    GUIManager* GUIManager::singletonPtr_s = 0;
-
-    /**
-    @brief
-        Constructs the GUIManager by starting up CEGUI
-
-        Creates the interface to Ogre, sets up the CEGUI renderer and the Lua script module together with the Lua engine.
-        The log is set up and connected to the CEGUILogger.
-        After Lua setup tolua++-elements are linked to Lua-state to give Lua access to C++-code.
-        Finally initial Lua code is executed (maybe we can do this with the CEGUI startup script automatically).
-    @param renderWindow
-        Ogre's render window. Without this, the GUI cannot be displayed.
-    @return true if success, otherwise false
-    */
-    GUIManager::GUIManager(Ogre::RenderWindow* renderWindow, const std::pair<int, int>& mousePosition, bool bFullScreen)
-        : renderWindow_(renderWindow)
-        , resourceProvider_(0)
-    {
-        using namespace CEGUI;
-
-        COUT(3) << "Initialising CEGUI." << std::endl;
-
-        // Note: No SceneManager specified yet
-        guiRenderer_.reset(new OgreCEGUIRenderer(renderWindow_, Ogre::RENDER_QUEUE_OVERLAY, false, 3000));
-        resourceProvider_ = guiRenderer_->createResourceProvider();
-        resourceProvider_->setDefaultResourceGroup("GUI");
-
-        // setup scripting
-        luaState_.reset(new LuaState());
-        scriptModule_.reset(new LuaScriptModule(luaState_->getInternalLuaState()));
-
-        // Create our own logger to specify the filepath
-        std::auto_ptr<CEGUILogger> ceguiLogger(new CEGUILogger());
-        ceguiLogger->setLogFilename(Core::getLogPathString() + "cegui.log");
-        // set the log level according to ours (translate by subtracting 1)
-        ceguiLogger->setLoggingLevel(
-            static_cast<LoggingLevel>(Core::getSoftDebugLevel(OutputHandler::LD_Logfile) - 1));
-        this->ceguiLogger_ = ceguiLogger.release();
-
-        // create the CEGUI system singleton
-        guiSystem_.reset(new System(guiRenderer_.get(), resourceProvider_, 0, scriptModule_.get()));
-
-        // Initialise the basic lua code
-        rootFileInfo_ = Resource::getInfo("InitialiseGUI.lua", "GUI");
-        this->luaState_->doFile("InitialiseGUI.lua", "GUI", false);
-
-        // Align CEGUI mouse with OIS mouse
-        guiSystem_->injectMousePosition(mousePosition.first, mousePosition.second);
-
-        // Hide the mouse cursor unless playing in fullscreen mode
-        if (!bFullScreen)
-            CEGUI::MouseCursor::getSingleton().hide();
-    }
-
-    /**
-    @brief
-        Basically shuts down CEGUI (member smart pointers) but first unloads our Tolua modules.
-    */
-    GUIManager::~GUIManager()
-    {
-    }
-
-    /**
-    @brief
-        used to tick the GUI
-    @param time
-        clock which provides time value for the GUI System
-
-        Ticking the GUI means updating it with a certain regularity.
-        The elapsed time since the last call is given in the time value provided by the clock.
-        This time value is then used to provide a fluent animation of the GUI.
-    */
-    void GUIManager::update(const Clock& time)
-    {
-        assert(guiSystem_);
-        guiSystem_->injectTimePulse(time.getDeltaTime());
-    }
-
-    /**
-    @brief
-        Tells the GUIManager which SceneManager to use
-    @param camera
-        The current camera on which the GUI should be displayed on.
-
-        In fact the GUIManager needs the SceneManager and not the Camera to display the GUI.
-        This means the GUI is not bound to a camera but rather to the SceneManager.
-        Hiding the GUI when needed can therefore not be resolved by just NOT setting the current camera.
-    */
-    void GUIManager::setCamera(Ogre::Camera* camera)
-    {
-        if (camera == NULL)
-            this->guiRenderer_->setTargetSceneManager(0);
-        else
-            this->guiRenderer_->setTargetSceneManager(camera->getSceneManager());
-    }
-
-    /**
-    @brief
-        Executes Lua code
-    @param str
-        reference to string object holding the Lua code which is to be executed
-
-        This function gives total access to the GUI. You can execute ANY Lua code here.
-    */
-    void GUIManager::executeCode(const std::string& str)
-    {
-        this->luaState_->doString(str, rootFileInfo_);
-    }
-
-    /**
-    @brief
-        Displays specified GUI on screen
-    @param name
-        The name of the GUI
-
-        The function executes the Lua function with the same name in case the GUIManager is ready.
-        For more details check out loadGUI_2.lua where the function presides.
-    */
-    void GUIManager::showGUI(const std::string& name)
-    {
-        this->luaState_->doString("showGUI(\"" + name + "\")", rootFileInfo_);
-    }
-
-    void GUIManager::keyPressed(const KeyEvent& evt)
-    {
-        guiSystem_->injectKeyDown(evt.getKeyCode());
-        guiSystem_->injectChar(evt.getText());
-    }
-    void GUIManager::keyReleased(const KeyEvent& evt)
-    {
-        guiSystem_->injectKeyUp(evt.getKeyCode());
-    }
-
-    /**
-    @brief
-        Function receiving a mouse button pressed event.
-    @param id
-        ID of the mouse button which got pressed
-
-        This function is inherited by MouseHandler and injects the event into CEGUI.
-        It is for CEGUI to process the event.
-    */
-    void GUIManager::buttonPressed(MouseButtonCode::ByEnum id)
-    {
-        try
-        {
-            guiSystem_->injectMouseButtonDown(convertButton(id));
-        }
-        catch (CEGUI::ScriptException& ex)
-        {
-            // We simply ignore the exception and proceed
-            COUT(1) << ex.getMessage() << std::endl;
-        }
-    }
-
-    /**
-    @brief
-        Function receiving a mouse button released event.
-    @param id
-        ID of the mouse button which got released
-
-        This function is inherited by MouseHandler and injects the event into CEGUI.
-        It is for CEGUI to process the event.
-    */
-    void GUIManager::buttonReleased(MouseButtonCode::ByEnum id)
-    {
-        try
-        {
-            guiSystem_->injectMouseButtonUp(convertButton(id));
-        }
-        catch (CEGUI::ScriptException& ex)
-        {
-            // We simply ignore the exception and proceed
-            COUT(1) << ex.getMessage() << std::endl;
-        }
-    }
-
-    void GUIManager::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
-    {
-        guiSystem_->injectMousePosition(static_cast<float>(abs.x), static_cast<float>(abs.y));
-    }
-    void GUIManager::mouseScrolled(int abs, int rel)
-    {
-        guiSystem_->injectMouseWheelChange(static_cast<float>(rel));
-    }
-
-    /**
-    @brief
-        converts mouse event code to CEGUI event code
-    @param button
-        code of the mouse button as we use it in Orxonox
-    @return
-        code of the mouse button as it is used by CEGUI
-
-        Simple convertion from mouse event code in Orxonox to the one used in CEGUI.
-     */
-    static inline CEGUI::MouseButton convertButton(MouseButtonCode::ByEnum button)
-    {
-        switch (button)
-        {
-        case MouseButtonCode::Left:
-            return CEGUI::LeftButton;
-
-        case MouseButtonCode::Right:
-            return CEGUI::RightButton;
-
-        case MouseButtonCode::Middle:
-            return CEGUI::MiddleButton;
-
-        case MouseButtonCode::Button3:
-            return CEGUI::X1Button;
-
-        case MouseButtonCode::Button4:
-            return CEGUI::X2Button;
-
-        default:
-            return CEGUI::NoButton;
-        }
-    }
-}
Index: code/trunk/src/libraries/core/GUIManager.h
===================================================================
--- code/trunk/src/libraries/core/GUIManager.h	(revision 5772)
+++ 	(revision )
@@ -1,109 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *      Benjamin Knecht
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _GUIManager_H__
-#define _GUIManager_H__
-
-#include "CorePrereqs.h"
-
-#include <map>
-#include <string>
-#include <CEGUIForwardRefs.h>
-#include <boost/scoped_ptr.hpp>
-#include <boost/shared_ptr.hpp>
-
-#include "util/OgreForwardRefs.h"
-#include "util/Singleton.h"
-#include "input/InputHandler.h"
-
-namespace orxonox
-{
-    class PlayerInfo; // Forward declaration
-
-    /**
-    @class GUIManager
-    @brief
-        Provides a simple interface to CEGUI with tolua methods and console commands. It also acts as a key and mouse handler.
-
-        The GUIManager is a singleton and can be called anywhere when access on the GUI is needed.
-        Creation of the GUIManager is therefore not possible and the cunstructor is private.
-
-        Since the GUI needs user input, the GUIManager implements the functions needed to act as a key and/or mouse handler.
-        Those input events are then injected into CEGUI in Lua.
-    */
-    class _CoreExport GUIManager : public Singleton<GUIManager>, public InputHandler
-    {
-        friend class Singleton<GUIManager>;
-    public:
-        GUIManager(Ogre::RenderWindow* renderWindow, const std::pair<int, int>& mousePosition, bool bFullScreen);
-        ~GUIManager();
-
-        void update(const Clock& time);
-
-        void showGUI(const std::string& name);
-        void executeCode(const std::string& str);
-
-        void setCamera(Ogre::Camera* camera);
-
-        static GUIManager* getInstancePtr() { return singletonPtr_s; }
-
-        inline void setPlayer(const std::string& guiname, PlayerInfo* player)
-            { this->players_[guiname] = player; }
-        inline PlayerInfo* getPlayer(const std::string& guiname) const
-            { std::map<std::string, PlayerInfo*>::const_iterator it = this->players_.find(guiname); return (it != this->players_.end()) ? it->second : 0; }
-
-    private:
-        GUIManager(const GUIManager& instance); //!< private and undefined copy c'tor (this is a singleton class)
-
-        // keyHandler functions
-        void keyPressed (const KeyEvent& evt);
-        void keyReleased(const KeyEvent& evt);
-
-        // mouseHandler functions
-        void buttonPressed (MouseButtonCode::ByEnum id);
-        void buttonReleased(MouseButtonCode::ByEnum id);
-        void mouseMoved    (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize);
-        void mouseScrolled (int abs, int rel);
-
-        scoped_ptr<CEGUI::OgreCEGUIRenderer> guiRenderer_;      //!< CEGUI's interface to the Ogre Engine
-        scoped_ptr<LuaState>                 luaState_;         //!< LuaState, access point to the Lua engine
-        scoped_ptr<CEGUI::LuaScriptModule>   scriptModule_;     //!< CEGUI's script module to use Lua
-        scoped_ptr<CEGUI::System>            guiSystem_;        //!< CEGUI's main system
-        shared_ptr<ResourceInfo>             rootFileInfo_;     //!< Resource information about the root script
-        Ogre::RenderWindow*                  renderWindow_;     //!< Ogre's render window to give CEGUI access to it
-        CEGUI::ResourceProvider*             resourceProvider_; //!< CEGUI's resource provider
-        CEGUI::Logger*                       ceguiLogger_;      //!< CEGUI's logger to be able to log CEGUI errors in our log
-        std::map<std::string, PlayerInfo*>   players_;          //!< Stores the player (owner) for each gui
-
-        static GUIManager*                   singletonPtr_s;    //!< Singleton reference to GUIManager
-
-    };
-}
-
-#endif /* _GUIManager_H__ */
Index: code/trunk/src/libraries/core/Game.cc
===================================================================
--- code/trunk/src/libraries/core/Game.cc	(revision 5772)
+++ code/trunk/src/libraries/core/Game.cc	(revision 5774)
@@ -45,17 +45,11 @@
 #include "Clock.h"
 #include "CommandLine.h"
-#include "ConsoleCommand.h"
 #include "Core.h"
 #include "CoreIncludes.h"
 #include "ConfigValueIncludes.h"
-#include "GameMode.h"
 #include "GameState.h"
 
 namespace orxonox
 {
-    static void stop_game()
-        { Game::getInstance().stop(); }
-    SetConsoleCommandShortcutExternAlias(stop_game, "exit");
-
     std::map<std::string, GameStateInfo> Game::gameStateDeclarations_s;
     Game* Game::singletonPtr_s = 0;
@@ -506,43 +500,8 @@
     void Game::loadGraphics()
     {
-        if (!GameMode::bShowsGraphics_s)
-        {
-            core_->loadGraphics();
-            Loki::ScopeGuard graphicsUnloader = Loki::MakeObjGuard(*this, &Game::unloadGraphics);
-            GameMode::bShowsGraphics_s = true;
-
-            // Construct all the GameStates that require graphics
-            for (std::map<std::string, GameStateInfo>::const_iterator it = gameStateDeclarations_s.begin();
-                it != gameStateDeclarations_s.end(); ++it)
-            {
-                if (it->second.bGraphicsMode)
-                {
-                    // Game state loading failure is serious --> don't catch
-                    shared_ptr<GameState> gameState = GameStateFactory::fabricate(it->second);
-                    if (!constructedStates_.insert(std::make_pair(
-                        it->second.stateName, gameState)).second)
-                        assert(false); // GameState was already created!
-                }
-            }
-            graphicsUnloader.Dismiss();
-        }
     }
 
     void Game::unloadGraphics()
     {
-        if (GameMode::bShowsGraphics_s)
-        {
-            // Destroy all the GameStates that require graphics
-            for (GameStateMap::iterator it = constructedStates_.begin(); it != constructedStates_.end();)
-            {
-                if (it->second->getInfo().bGraphicsMode)
-                    constructedStates_.erase(it++);
-                else
-                    ++it;
-            }
-
-            core_->unloadGraphics();
-            GameMode::bShowsGraphics_s = false;
-        }
     }
 
@@ -563,5 +522,5 @@
         // If state requires graphics, load it
         Loki::ScopeGuard graphicsUnloader = Loki::MakeObjGuard(*this, &Game::unloadGraphics);
-        if (gameStateDeclarations_s[name].bGraphicsMode && !GameMode::showsGraphics())
+        if (gameStateDeclarations_s[name].bGraphicsMode)
             this->loadGraphics();
         else
Index: code/trunk/src/libraries/core/GameMode.cc
===================================================================
--- code/trunk/src/libraries/core/GameMode.cc	(revision 5772)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Implementation of the GameMode class.
-*/
-
-#include "GameMode.h"
-
-namespace orxonox
-{
-    bool GameMode::bShowsGraphics_s = false;
-    bool GameMode::bHasServer_s     = false;
-    bool GameMode::bIsClient_s      = false;
-    bool GameMode::bIsStandalone_s  = false;
-    bool GameMode::bIsMaster_s      = false;
-}
Index: code/trunk/src/libraries/core/GameMode.h
===================================================================
--- code/trunk/src/libraries/core/GameMode.h	(revision 5772)
+++ 	(revision )
@@ -1,74 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Declaration of the GameMode class.
-*/
-
-#ifndef _GameMode_H__
-#define _GameMode_H__
-
-#include "CorePrereqs.h"
-
-namespace orxonox
-{
-    class _CoreExport GameMode
-    {
-        friend class Game;
-
-        public:
-            static bool showsGraphics() { return bShowsGraphics_s; }
-            static bool hasServer()     { return bHasServer_s; }
-            static bool isClient()      { return bIsClient_s; }
-            static bool isStandalone()  { return bIsStandalone_s; }
-            static bool isMaster()      { return bIsMaster_s; }
-
-            static void setHasServer    (bool val) { bHasServer_s     = val; updateIsMaster(); }
-            static void setIsClient     (bool val) { bIsClient_s      = val; updateIsMaster(); }
-            static void setIsStandalone (bool val) { bIsStandalone_s  = val; updateIsMaster(); }
-
-        private:
-            GameMode();
-            GameMode(const GameMode& inst);
-            ~GameMode();
-
-            static void updateIsMaster()
-            {
-                bIsMaster_s = (bHasServer_s || bIsStandalone_s);
-            }
-
-            static bool bShowsGraphics_s;                   //!< global variable that tells whether to show graphics
-            static bool bHasServer_s;                       //!< global variable that tells whether this is a server
-            static bool bIsClient_s;
-            static bool bIsStandalone_s;
-            static bool bIsMaster_s;
-    };
-}
-
-#endif /* _GameMode_H__ */
Index: code/trunk/src/libraries/core/GraphicsManager.cc
===================================================================
--- code/trunk/src/libraries/core/GraphicsManager.cc	(revision 5772)
+++ 	(revision )
@@ -1,422 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *      Benjamin Knecht <beni_at_orxonox.net>, (C) 2007
- *   Co-authors:
- *      Felix Schulthess
- *
- */
-
-#include "GraphicsManager.h"
-
-#include <fstream>
-#include <sstream>
-#include <boost/filesystem.hpp>
-#include <boost/shared_array.hpp>
-
-#include <OgreArchiveFactory.h>
-#include <OgreArchiveManager.h>
-#include <OgreFrameListener.h>
-#include <OgreRoot.h>
-#include <OgreLogManager.h>
-#include <OgreRenderWindow.h>
-#include <OgreRenderSystem.h>
-#include <OgreResourceGroupManager.h>
-#include <OgreTextureManager.h>
-#include <OgreViewport.h>
-#include <OgreWindowEventUtilities.h>
-
-#include "SpecialConfig.h"
-#include "util/Exception.h"
-#include "util/StringUtils.h"
-#include "util/SubString.h"
-#include "Clock.h"
-#include "ConsoleCommand.h"
-#include "ConfigValueIncludes.h"
-#include "CoreIncludes.h"
-#include "Core.h"
-#include "Game.h"
-#include "GameMode.h"
-#include "Loader.h"
-#include "MemoryArchive.h"
-#include "WindowEventListener.h"
-#include "XMLFile.h"
-
-namespace orxonox
-{
-    class OgreWindowEventListener : public Ogre::WindowEventListener
-    {
-    public:
-        void windowResized     (Ogre::RenderWindow* rw)
-            { orxonox::WindowEventListener::resizeWindow(rw->getWidth(), rw->getHeight()); }
-        void windowFocusChange (Ogre::RenderWindow* rw)
-            { orxonox::WindowEventListener::changeWindowFocus(); }
-        void windowClosed      (Ogre::RenderWindow* rw)
-            { orxonox::Game::getInstance().stop(); }
-        void windowMoved       (Ogre::RenderWindow* rw)
-            { orxonox::WindowEventListener::moveWindow(); }
-    };
-
-    GraphicsManager* GraphicsManager::singletonPtr_s = 0;
-
-    /**
-    @brief
-        Non-initialising constructor.
-    */
-    GraphicsManager::GraphicsManager(bool bLoadRenderer)
-        : ogreWindowEventListener_(new OgreWindowEventListener())
-#if OGRE_VERSION < 0x010600
-        , memoryArchiveFactory_(new MemoryArchiveFactory())
-#endif
-        , renderWindow_(0)
-        , viewport_(0)
-    {
-        RegisterObject(GraphicsManager);
-
-        this->setConfigValues();
-
-        // Ogre setup procedure (creating Ogre::Root)
-        this->loadOgreRoot();
-        // load all the required plugins for Ogre
-        this->loadOgrePlugins();
-
-        // At first, add the root paths of the data directories as resource locations
-        Ogre::ResourceGroupManager::getSingleton().addResourceLocation(Core::getDataPathString(), "FileSystem", "dataRoot", false);
-        // Load resources
-        resources_.reset(new XMLFile("resources.oxr", "dataRoot"));
-        resources_->setLuaSupport(false);
-        Loader::open(resources_.get());
-
-        // Only for development runs
-        if (Core::isDevelopmentRun())
-        {
-            Ogre::ResourceGroupManager::getSingleton().addResourceLocation(Core::getExternalDataPathString(), "FileSystem", "externalDataRoot", false);
-            extResources_.reset(new XMLFile("resources.oxr", "externalDataRoot"));
-            extResources_->setLuaSupport(false);
-            Loader::open(extResources_.get());
-        }
-
-        if (bLoadRenderer)
-        {
-            // Reads the ogre config and creates the render window
-            this->upgradeToGraphics();
-        }
-    }
-
-    /**
-    @brief
-        Destruction is done by the member scoped_ptrs.
-    */
-    GraphicsManager::~GraphicsManager()
-    {
-        Ogre::WindowEventUtilities::removeWindowEventListener(renderWindow_, ogreWindowEventListener_.get());
-        // TODO: Destroy the console command
-    }
-
-    void GraphicsManager::setConfigValues()
-    {
-        SetConfigValue(ogreConfigFile_,  "ogre.cfg")
-            .description("Location of the Ogre config file");
-        SetConfigValue(ogrePluginsDirectory_, specialConfig::ogrePluginsDirectory)
-            .description("Folder where the Ogre plugins are located.");
-        SetConfigValue(ogrePlugins_, specialConfig::ogrePlugins)
-            .description("Comma separated list of all plugins to load.");
-        SetConfigValue(ogreLogFile_,     "ogre.log")
-            .description("Logfile for messages from Ogre. Use \"\" to suppress log file creation.");
-        SetConfigValue(ogreLogLevelTrivial_ , 5)
-            .description("Corresponding orxonox debug level for ogre Trivial");
-        SetConfigValue(ogreLogLevelNormal_  , 4)
-            .description("Corresponding orxonox debug level for ogre Normal");
-        SetConfigValue(ogreLogLevelCritical_, 2)
-            .description("Corresponding orxonox debug level for ogre Critical");
-    }
-
-    /**
-    @brief
-        Loads the renderer and creates the render window if not yet done so.
-    @remarks
-        This operation is irreversible without recreating the GraphicsManager!
-        So if it throws you HAVE to recreate the GraphicsManager!!!
-        It therefore offers almost no exception safety.
-    */
-    void GraphicsManager::upgradeToGraphics()
-    {
-        if (renderWindow_ != NULL)
-            return;
-
-        this->loadRenderer();
-
-#if OGRE_VERSION < 0x010600
-        // WORKAROUND: There is an incompatibility for particle scripts when trying
-        // to support both Ogre 1.4 and 1.6. The hacky solution is to create
-        // scripts for the 1.6 version and then remove the inserted "particle_system"
-        // keyword. But we need to supply these new scripts as well, which is why
-        // there is an extra Ogre::Archive dealing with it in the memory.
-        using namespace Ogre;
-        ArchiveManager::getSingleton().addArchiveFactory(memoryArchiveFactory_.get());
-        const StringVector& groups = ResourceGroupManager::getSingleton().getResourceGroups();
-        // Travers all groups
-        for (StringVector::const_iterator itGroup = groups.begin(); itGroup != groups.end(); ++itGroup)
-        {
-            FileInfoListPtr files = ResourceGroupManager::getSingleton().findResourceFileInfo(*itGroup, "*.particle");
-            for (FileInfoList::const_iterator itFile = files->begin(); itFile != files->end(); ++itFile)
-            {
-                // open file
-                Ogre::DataStreamPtr input = ResourceGroupManager::getSingleton().openResource(itFile->filename, *itGroup, false);
-                std::stringstream output;
-                // Parse file and replace "particle_system" with nothing
-                while (!input->eof())
-                {
-                    std::string line = input->getLine();
-                    size_t pos = line.find("particle_system");
-                    if (pos != std::string::npos)
-                    {
-                        // 15 is the length of "particle_system"
-                        line.replace(pos, 15, "");
-                    }
-                    output << line << std::endl;
-                }
-                // Add file to the memory archive
-                shared_array<char> data(new char[output.str().size()]);
-                // Debug optimisations
-                const std::string outputStr = output.str();
-                char* rawData = data.get();
-                for (unsigned i = 0; i < outputStr.size(); ++i)
-                    rawData[i] = outputStr[i];
-                MemoryArchive::addFile("particle_scripts_ogre_1.4_" + *itGroup, itFile->filename, data, output.str().size());
-            }
-            if (!files->empty())
-            {
-                // Declare the files, but using a new group
-                ResourceGroupManager::getSingleton().addResourceLocation("particle_scripts_ogre_1.4_" + *itGroup,
-                    "Memory", "particle_scripts_ogre_1.4_" + *itGroup);
-            }
-        }
-#endif
-
-        // Initialise all resources (do this AFTER the renderer has been loaded!)
-        // Note: You can only do this once! Ogre will check whether a resource group has
-        // already been initialised. If you need to load resources later, you will have to
-        // choose another resource group.
-        Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
-    }
-
-    /**
-    @brief
-        Creates the Ogre Root object and sets up the ogre log.
-    */
-    void GraphicsManager::loadOgreRoot()
-    {
-        COUT(3) << "Setting up Ogre..." << std::endl;
-
-        if (ogreConfigFile_ == "")
-        {
-            COUT(2) << "Warning: Ogre config file set to \"\". Defaulting to config.cfg" << std::endl;
-            ModifyConfigValue(ogreConfigFile_, tset, "config.cfg");
-        }
-        if (ogreLogFile_ == "")
-        {
-            COUT(2) << "Warning: Ogre log file set to \"\". Defaulting to ogre.log" << std::endl;
-            ModifyConfigValue(ogreLogFile_, tset, "ogre.log");
-        }
-
-        boost::filesystem::path ogreConfigFilepath(Core::getConfigPath() / this->ogreConfigFile_);
-        boost::filesystem::path ogreLogFilepath(Core::getLogPath() / this->ogreLogFile_);
-
-        // create a new logManager
-        // Ogre::Root will detect that we've already created a Log
-        ogreLogger_.reset(new Ogre::LogManager());
-        COUT(4) << "Ogre LogManager created" << std::endl;
-
-        // create our own log that we can listen to
-        Ogre::Log *myLog;
-        myLog = ogreLogger_->createLog(ogreLogFilepath.string(), true, false, false);
-        COUT(4) << "Ogre Log created" << std::endl;
-
-        myLog->setLogDetail(Ogre::LL_BOREME);
-        myLog->addListener(this);
-
-        COUT(4) << "Creating Ogre Root..." << std::endl;
-
-        // check for config file existence because Ogre displays (caught) exceptions if not
-        if (!boost::filesystem::exists(ogreConfigFilepath))
-        {
-            // create a zero sized file
-            std::ofstream creator;
-            creator.open(ogreConfigFilepath.string().c_str());
-            creator.close();
-        }
-
-        // Leave plugins file empty. We're going to do that part manually later
-        ogreRoot_.reset(new Ogre::Root("", ogreConfigFilepath.string(), ogreLogFilepath.string()));
-
-        COUT(3) << "Ogre set up done." << std::endl;
-    }
-
-    void GraphicsManager::loadOgrePlugins()
-    {
-        // just to make sure the next statement doesn't segfault
-        if (ogrePluginsDirectory_ == "")
-            ogrePluginsDirectory_ = ".";
-
-        boost::filesystem::path folder(ogrePluginsDirectory_);
-        // Do some SubString magic to get the comma separated list of plugins
-        SubString plugins(ogrePlugins_, ",", " ", false, '\\', false, '"', false, '(', ')', false, '\0');
-        // Use backslash paths on Windows! file_string() already does that though.
-        for (unsigned int i = 0; i < plugins.size(); ++i)
-            ogreRoot_->loadPlugin((folder / plugins[i]).file_string());
-    }
-
-    void GraphicsManager::loadRenderer()
-    {
-        CCOUT(4) << "Configuring Renderer" << std::endl;
-
-        if (!ogreRoot_->restoreConfig())
-            if (!ogreRoot_->showConfigDialog())
-                ThrowException(InitialisationFailed, "OGRE graphics configuration dialogue failed.");
-
-        CCOUT(4) << "Creating render window" << std::endl;
-
-        this->renderWindow_ = ogreRoot_->initialise(true, "Orxonox");
-        // Propagate the size of the new winodw
-        this->ogreWindowEventListener_->windowResized(renderWindow_);
-
-        Ogre::WindowEventUtilities::addWindowEventListener(this->renderWindow_, ogreWindowEventListener_.get());
-
-        // create a full screen default viewport
-        // Note: This may throw when adding a viewport with an existing z-order!
-        //       But in our case we only have one viewport for now anyway, therefore
-        //       no ScopeGuards or anything to handle exceptions.
-        this->viewport_ = this->renderWindow_->addViewport(0, 0);
-
-        Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(0);
-
-        // add console commands
-        FunctorMember<GraphicsManager>* functor1 = createFunctor(&GraphicsManager::printScreen);
-        ccPrintScreen_ = createConsoleCommand(functor1->setObject(this), "printScreen");
-        CommandExecutor::addConsoleCommandShortcut(ccPrintScreen_);
-    }
-
-    void GraphicsManager::update(const Clock& time)
-    {
-        Ogre::FrameEvent evt;
-        evt.timeSinceLastFrame = time.getDeltaTime();
-        evt.timeSinceLastEvent = time.getDeltaTime(); // note: same time, but shouldn't matter anyway
-
-        // don't forget to call _fireFrameStarted to OGRE to make sure
-        // everything goes smoothly
-        ogreRoot_->_fireFrameStarted(evt);
-
-        // Pump messages in all registered RenderWindows
-        // This calls the WindowEventListener objects.
-        Ogre::WindowEventUtilities::messagePump();
-        // make sure the window stays active even when not focused
-        // (probably only necessary on windows)
-        this->renderWindow_->setActive(true);
-
-        // Time before rendering
-        uint64_t timeBeforeTick = time.getRealMicroseconds();
-
-        // Render frame
-        ogreRoot_->_updateAllRenderTargets();
-
-        uint64_t timeAfterTick = time.getRealMicroseconds();
-        // Subtract the time used for rendering from the tick time counter
-        Game::getInstance().subtractTickTime(timeAfterTick - timeBeforeTick);
-
-        // again, just to be sure OGRE works fine
-        ogreRoot_->_fireFrameEnded(evt); // note: uses the same time as _fireFrameStarted
-    }
-
-    void GraphicsManager::setCamera(Ogre::Camera* camera)
-    {
-        this->viewport_->setCamera(camera);
-    }
-
-    /**
-    @brief
-        Method called by the LogListener interface from Ogre.
-        We use it to capture Ogre log messages and handle it ourselves.
-    @param message
-        The message to be logged
-    @param lml
-        The message level the log is using
-    @param maskDebug
-        If we are printing to the console or not
-    @param logName
-        The name of this log (so you can have several listeners
-        for different logs, and identify them)
-    */
-    void GraphicsManager::messageLogged(const std::string& message,
-        Ogre::LogMessageLevel lml, bool maskDebug, const std::string& logName)
-    {
-        int orxonoxLevel;
-        switch (lml)
-        {
-        case Ogre::LML_TRIVIAL:
-            orxonoxLevel = this->ogreLogLevelTrivial_;
-            break;
-        case Ogre::LML_NORMAL:
-            orxonoxLevel = this->ogreLogLevelNormal_;
-            break;
-        case Ogre::LML_CRITICAL:
-            orxonoxLevel = this->ogreLogLevelCritical_;
-            break;
-        default:
-            orxonoxLevel = 0;
-        }
-        OutputHandler::getOutStream().setOutputLevel(orxonoxLevel)
-            << "Ogre: " << message << std::endl;
-    }
-
-    size_t GraphicsManager::getRenderWindowHandle()
-    {
-        size_t windowHnd = 0;
-        renderWindow_->getCustomAttribute("WINDOW", &windowHnd);
-        return windowHnd;
-    }
-
-    bool GraphicsManager::isFullScreen() const
-    {
-        Ogre::ConfigOptionMap& options = ogreRoot_->getRenderSystem()->getConfigOptions();
-        if (options.find("Full Screen") != options.end())
-        {
-            if (options["Full Screen"].currentValue == "Yes")
-                return true;
-            else
-                return false;
-        }
-        else
-        {
-            COUT(0) << "Could not find 'Full Screen' render system option. Fix This!!!" << std::endl;
-            return false;
-        }
-    }
-
-    void GraphicsManager::printScreen()
-    {
-        assert(this->renderWindow_);
-       
-        this->renderWindow_->writeContentsToTimestampedFile(Core::getLogPathString() + "screenShot_", ".jpg");
-    }
-}
Index: code/trunk/src/libraries/core/GraphicsManager.h
===================================================================
--- code/trunk/src/libraries/core/GraphicsManager.h	(revision 5772)
+++ 	(revision )
@@ -1,121 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *      Benjamin Knecht <beni_at_orxonox.net>, (C) 2007
- *   Co-authors:
- *      Felix Schulthess
- *
- */
-
-/**
-@file
-@brief
-    Declaration of GraphicsManager Singleton.
- */
-
-#ifndef _GraphicsManager_H__
-#define _GraphicsManager_H__
-
-#include "CorePrereqs.h"
-
-#include <cassert>
-#include <string>
-#include <OgreLog.h>
-#include <boost/scoped_ptr.hpp>
-#include <boost/shared_ptr.hpp>
-
-#include "util/Singleton.h"
-#include "OrxonoxClass.h"
-
-namespace orxonox
-{
-    /**
-    @brief
-        Graphics engine manager class
-    */
-    class _CoreExport GraphicsManager : public Singleton<GraphicsManager>, public OrxonoxClass, public Ogre::LogListener
-    {
-        friend class Singleton<GraphicsManager>;
-    public:
-        GraphicsManager(bool bLoadRenderer = true);
-        ~GraphicsManager();
-
-        void setConfigValues();
-
-        void update(const Clock& time);
-
-        Ogre::Viewport* getViewport()         { return this->viewport_; }
-        Ogre::RenderWindow* getRenderWindow() { return this->renderWindow_; }
-        size_t getRenderWindowHandle();
-        bool isFullScreen() const;
-
-        void upgradeToGraphics();
-        bool rendererLoaded() const { return renderWindow_ != NULL; }
-
-        void setCamera(Ogre::Camera* camera);
-
-    private:
-        GraphicsManager(GraphicsManager&); // don't mess with singletons
-
-        // OGRE initialisation
-        void loadOgreRoot();
-        void loadOgrePlugins();
-        void loadRenderer();
-
-        // event from Ogre::LogListener
-        void messageLogged(const std::string& message, Ogre::LogMessageLevel lml,
-            bool maskDebug, const std::string& logName);
-
-        // console commands
-        void printScreen();
-
-        scoped_ptr<OgreWindowEventListener> ogreWindowEventListener_; //!< Pimpl to hide OgreWindowUtilities.h
-#if OGRE_VERSION < 0x010600
-        scoped_ptr<MemoryArchiveFactory>    memoryArchiveFactory_;    //!< Stores the modified particle scripts
-#endif
-        scoped_ptr<Ogre::LogManager>        ogreLogger_;
-        scoped_ptr<Ogre::Root>              ogreRoot_;                //!< Ogre's root
-        Ogre::RenderWindow* renderWindow_;             //!< the one and only render window
-        Ogre::Viewport*     viewport_;                 //!< default full size viewport
-
-        // XML files for the resources
-        shared_ptr<XMLFile> resources_;                //!< XML with resource locations
-        shared_ptr<XMLFile> extResources_;             //!< XML with resource locations in the external path (only for dev runs)
-
-        // config values
-        std::string         ogreConfigFile_;           //!< ogre config file name
-        std::string         ogrePluginsDirectory_;     //!< Directory where the Ogre plugins are located
-        std::string         ogrePlugins_;              //!< Comma separated list of all plugins to load
-        std::string         ogreLogFile_;              //!< log file name for Ogre log messages
-        int                 ogreLogLevelTrivial_;      //!< Corresponding Orxonx debug level for LL_TRIVIAL
-        int                 ogreLogLevelNormal_;       //!< Corresponding Orxonx debug level for LL_NORMAL
-        int                 ogreLogLevelCritical_;     //!< Corresponding Orxonx debug level for LL_CRITICAL
-
-        // console commands
-        ConsoleCommand*     ccPrintScreen_;
-
-        static GraphicsManager* singletonPtr_s;        //!< Pointer to the Singleton
-    };
-}
-
-#endif /* _GraphicsManager_H__ */
Index: code/trunk/src/libraries/core/IRC.cc
===================================================================
--- code/trunk/src/libraries/core/IRC.cc	(revision 5772)
+++ 	(revision )
@@ -1,140 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "IRC.h"
-
-#include <cpptcl/cpptcl.h>
-
-#include "util/Convert.h"
-#include "util/Exception.h"
-#include "ConsoleCommand.h"
-#include "CoreIncludes.h"
-#include "TclThreadManager.h"
-
-namespace orxonox
-{
-    static const unsigned int IRC_TCL_THREADID  = 1421421421;
-
-    SetConsoleCommand(IRC, say,  true).accessLevel(AccessLevel::User);
-    SetConsoleCommand(IRC, msg,  false).accessLevel(AccessLevel::User);
-    SetConsoleCommand(IRC, nick, false).accessLevel(AccessLevel::User);
-
-    IRC::IRC()
-    {
-        RegisterRootObject(IRC);
-        this->interpreter_ = 0;
-    }
-
-    void IRC::initialize()
-    {
-        unsigned int threadID = IRC_TCL_THREADID;
-        this->interpreter_ = TclThreadManager::createWithId(threadID);
-
-        try
-        {
-            this->interpreter_->def("::orxonox::irc::say", IRC::tcl_say, Tcl::variadic());
-            this->interpreter_->def("::orxonox::irc::privmsg", IRC::tcl_privmsg, Tcl::variadic());
-            this->interpreter_->def("::orxonox::irc::action", IRC::tcl_action, Tcl::variadic());
-            this->interpreter_->def("::orxonox::irc::info", IRC::tcl_info, Tcl::variadic());
-        }
-        catch (Tcl::tcl_error const &e)
-        {   COUT(1) << "Tcl (IRC) error: " << e.what();   }
-        catch (...)
-        {   COUT(1) << "Error while initializing Tcl (IRC): " << Exception::handleMessage();   }
-
-        this->nickname_ = "orx" + multi_cast<std::string>(static_cast<unsigned int>(rand()));
-        TclThreadManager::execute(threadID, "set nickname " + this->nickname_);
-        TclThreadManager::execute(threadID, "source irc.tcl");
-    }
-
-    IRC& IRC::getInstance()
-    {
-        static IRC instance;
-        return instance;
-    }
-
-    bool IRC::eval(const std::string& command)
-    {
-        if (!IRC::getInstance().interpreter_)
-        {
-            IRC::getInstance().initialize();
-            COUT(1) << "Error: IRC client wasn't yet initialized, please try again." << std::endl;
-            return false;
-        }
-
-        try
-        {
-            IRC::getInstance().interpreter_->eval(command);
-            return true;
-        }
-        catch (Tcl::tcl_error const &e)
-        {   COUT(1) << "Tcl (IRC) error: " << e.what();   }
-        catch (...)
-        {   COUT(1) << "Error while executing Tcl (IRC): " << Exception::handleMessage();   }
-
-        return false;
-    }
-
-    void IRC::say(const std::string& message)
-    {
-        if (IRC::eval("irk::say $conn #orxonox {" + message + "}"))
-            IRC::tcl_say(Tcl::object(), Tcl::object(IRC::getInstance().nickname_), Tcl::object(message));
-    }
-
-    void IRC::msg(const std::string& channel, const std::string& message)
-    {
-        if (IRC::eval("irk::say $conn " + channel + " {" + message + "}"))
-            IRC::tcl_privmsg(Tcl::object(channel), Tcl::object(IRC::getInstance().nickname_), Tcl::object(message));
-    }
-
-    void IRC::nick(const std::string& nickname)
-    {
-        if (IRC::eval("irk::nick $conn " + nickname))
-            IRC::getInstance().nickname_ = nickname;
-    }
-
-    void IRC::tcl_say(Tcl::object const &channel, Tcl::object const &nick, Tcl::object const &args)
-    {
-        COUT(0) << "IRC> " << nick.get() << ": " << stripEnclosingBraces(args.get()) << std::endl;
-    }
-
-    void IRC::tcl_privmsg(Tcl::object const &query, Tcl::object const &nick, Tcl::object const &args)
-    {
-        COUT(0) << "IRC (" << query.get() << ")> " << nick.get() << ": " << stripEnclosingBraces(args.get()) << std::endl;
-    }
-
-    void IRC::tcl_action(Tcl::object const &channel, Tcl::object const &nick, Tcl::object const &args)
-    {
-        COUT(0) << "IRC> * " << nick.get() << " " << stripEnclosingBraces(args.get()) << std::endl;
-    }
-
-    void IRC::tcl_info(Tcl::object const &channel, Tcl::object const &args)
-    {
-        COUT(0) << "IRC> --> " << stripEnclosingBraces(args.get()) << std::endl;
-    }
-}
Index: code/trunk/src/libraries/core/IRC.h
===================================================================
--- code/trunk/src/libraries/core/IRC.h	(revision 5772)
+++ 	(revision )
@@ -1,66 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _IRC_H__
-#define _IRC_H__
-
-#include "CorePrereqs.h"
-
-#include <string>
-#include "OrxonoxClass.h"
-
-namespace orxonox
-{
-    class _CoreExport IRC : public OrxonoxClass
-    {
-        public:
-            static IRC& getInstance();
-
-            static void say(const std::string& message);
-            static void msg(const std::string& channel, const std::string& message);
-            static void nick(const std::string& nickname);
-
-            static void tcl_say(Tcl::object const &channel, Tcl::object const &nick, Tcl::object const &args);
-            static void tcl_privmsg(Tcl::object const &query, Tcl::object const &nick, Tcl::object const &args);
-            static void tcl_action(Tcl::object const &channel, Tcl::object const &nick, Tcl::object const &args);
-            static void tcl_info(Tcl::object const &channel, Tcl::object const &args);
-
-        private:
-            static bool eval(const std::string& command);
-            void initialize();
-
-            IRC();
-            IRC(const IRC& other);
-            ~IRC() {}
-
-            Tcl::interpreter* interpreter_;
-            std::string nickname_;
-    };
-}
-
-#endif /* _IRC_H__ */
Index: code/trunk/src/libraries/core/Identifier.cc
===================================================================
--- code/trunk/src/libraries/core/Identifier.cc	(revision 5772)
+++ code/trunk/src/libraries/core/Identifier.cc	(revision 5774)
@@ -38,7 +38,5 @@
 #include "util/StringUtils.h"
 #include "ConfigValueContainer.h"
-#include "ConsoleCommand.h"
 #include "Factory.h"
-#include "XMLPort.h"
 
 namespace orxonox
@@ -61,14 +59,9 @@
         this->bSetName_ = false;
         this->factory_ = 0;
-        this->bLoadable_ = true;
 
         this->bHasConfigValues_ = false;
-        this->bHasConsoleCommands_ = false;
 
         this->children_ = new std::set<const Identifier*>();
         this->directChildren_ = new std::set<const Identifier*>();
-
-        // Default network ID is the class ID
-        this->networkID_ = this->classID_;
     }
 
@@ -85,11 +78,5 @@
             delete this->factory_;
 
-        for (std::map<std::string, ConsoleCommand*>::iterator it = this->consoleCommands_.begin(); it != this->consoleCommands_.end(); ++it)
-            delete (it->second);
         for (std::map<std::string, ConfigValueContainer*>::iterator it = this->configValues_.begin(); it != this->configValues_.end(); ++it)
-            delete (it->second);
-        for (std::map<std::string, XMLPortParamContainer*>::iterator it = this->xmlportParamContainers_.begin(); it != this->xmlportParamContainers_.end(); ++it)
-            delete (it->second);
-        for (std::map<std::string, XMLPortObjectContainer*>::iterator it = this->xmlportObjectContainers_.begin(); it != this->xmlportObjectContainers_.end(); ++it)
             delete (it->second);
     }
@@ -188,7 +175,4 @@
                 // Tell the parent we're one of it's direct children
                 (*it)->getDirectChildrenIntern().insert((*it)->getDirectChildrenIntern().end(), this);
-
-                // Create the super-function dependencies
-                (*it)->createSuperFunctionCaller();
             }
         }
@@ -240,14 +224,4 @@
 
     /**
-        @brief Sets the network ID to a new value and changes the entry in the Factory.
-        @param id The new network ID
-    */
-    void Identifier::setNetworkID(uint32_t id)
-    {
-        Factory::changeNetworkID(this, this->networkID_, id);
-        this->networkID_ = id;
-    }
-
-    /**
         @brief Returns true, if the Identifier is at least of the given type.
         @param identifier The identifier to compare with
@@ -371,150 +345,4 @@
 
     /**
-        @brief Adds a new console command of this class.
-        @param executor The executor of the command
-        @param bCreateShortcut If this is true a shortcut gets created so you don't have to add the classname to access this command
-        @return The executor of the command
-    */
-    ConsoleCommand& Identifier::addConsoleCommand(ConsoleCommand* command, bool bCreateShortcut)
-    {
-        std::map<std::string, ConsoleCommand*>::const_iterator it = this->consoleCommands_.find(command->getName());
-        if (it != this->consoleCommands_.end())
-        {
-            COUT(2) << "Warning: Overwriting console-command with name " << command->getName() << " in class " << this->getName() << "." << std::endl;
-            delete (it->second);
-        }
-
-        this->bHasConsoleCommands_ = true;
-        this->consoleCommands_[command->getName()] = command;
-        this->consoleCommands_LC_[getLowercase(command->getName())] = command;
-
-        if (bCreateShortcut)
-            CommandExecutor::addConsoleCommandShortcut(command);
-
-        return (*command);
-    }
-
-    /**
-        @brief Returns the executor of a console command with given name.
-        @brief name The name of the requested console command
-        @return The executor of the requested console command
-    */
-    ConsoleCommand* Identifier::getConsoleCommand(const std::string& name) const
-    {
-        std::map<std::string, ConsoleCommand*>::const_iterator it = this->consoleCommands_.find(name);
-        if (it != this->consoleCommands_.end())
-            return (*it).second;
-        else
-            return 0;
-    }
-
-    /**
-        @brief Returns the executor of a console command with given name in lowercase.
-        @brief name The name of the requested console command in lowercae
-        @return The executor of the requested console command
-    */
-    ConsoleCommand* Identifier::getLowercaseConsoleCommand(const std::string& name) const
-    {
-        std::map<std::string, ConsoleCommand*>::const_iterator it = this->consoleCommands_LC_.find(name);
-        if (it != this->consoleCommands_LC_.end())
-            return (*it).second;
-        else
-            return 0;
-    }
-
-    /**
-        @brief Returns a XMLPortParamContainer that loads a parameter of this class.
-        @param paramname The name of the parameter
-        @return The container
-    */
-    XMLPortParamContainer* Identifier::getXMLPortParamContainer(const std::string& paramname)
-    {
-        std::map<std::string, XMLPortParamContainer*>::const_iterator it = this->xmlportParamContainers_.find(paramname);
-        if (it != this->xmlportParamContainers_.end())
-            return ((*it).second);
-        else
-            return 0;
-    }
-
-    /**
-        @brief Adds a new XMLPortParamContainer that loads a parameter of this class.
-        @param paramname The name of the parameter
-        @param container The container
-    */
-    void Identifier::addXMLPortParamContainer(const std::string& paramname, XMLPortParamContainer* container)
-    {
-        std::map<std::string, XMLPortParamContainer*>::const_iterator it = this->xmlportParamContainers_.find(paramname);
-        if (it != this->xmlportParamContainers_.end())
-        {
-            COUT(2) << "Warning: Overwriting XMLPortParamContainer in class " << this->getName() << "." << std::endl;
-            delete (it->second);
-        }
-
-        this->xmlportParamContainers_[paramname] = container;
-    }
-
-    /**
-        @brief Returns a XMLPortObjectContainer that attaches an object to this class.
-        @param sectionname The name of the section that contains the attachable objects
-        @return The container
-    */
-    XMLPortObjectContainer* Identifier::getXMLPortObjectContainer(const std::string& sectionname)
-    {
-        std::map<std::string, XMLPortObjectContainer*>::const_iterator it = this->xmlportObjectContainers_.find(sectionname);
-        if (it != this->xmlportObjectContainers_.end())
-            return ((*it).second);
-        else
-            return 0;
-    }
-
-    /**
-        @brief Adds a new XMLPortObjectContainer that attaches an object to this class.
-        @param sectionname The name of the section that contains the attachable objects
-        @param container The container
-    */
-    void Identifier::addXMLPortObjectContainer(const std::string& sectionname, XMLPortObjectContainer* container)
-    {
-        std::map<std::string, XMLPortObjectContainer*>::const_iterator it = this->xmlportObjectContainers_.find(sectionname);
-        if (it != this->xmlportObjectContainers_.end())
-        {
-            COUT(2) << "Warning: Overwriting XMLPortObjectContainer in class " << this->getName() << "." << std::endl;
-            delete (it->second);
-        }
-
-        this->xmlportObjectContainers_[sectionname] = container;
-    }
-
-    /**
-        @brief Returns a XMLPortEventContainer that attaches an event to this class.
-        @param sectionname The name of the section that contains the event
-        @return The container
-    */
-    XMLPortObjectContainer* Identifier::getXMLPortEventContainer(const std::string& eventname)
-    {
-        std::map<std::string, XMLPortObjectContainer*>::const_iterator it = this->xmlportEventContainers_.find(eventname);
-        if (it != this->xmlportEventContainers_.end())
-            return ((*it).second);
-        else
-            return 0;
-    }
-
-    /**
-        @brief Adds a new XMLPortEventContainer that attaches an event to this class.
-        @param sectionname The name of the section that contains the event
-        @param container The container
-    */
-    void Identifier::addXMLPortEventContainer(const std::string& eventname, XMLPortObjectContainer* container)
-    {
-        std::map<std::string, XMLPortObjectContainer*>::const_iterator it = this->xmlportEventContainers_.find(eventname);
-        if (it != this->xmlportEventContainers_.end())
-        {
-            COUT(2) << "Warning: Overwriting XMLPortEventContainer in class " << this->getName() << "." << std::endl;
-            delete (it->second);
-        }
-
-        this->xmlportEventContainers_[eventname] = container;
-    }
-
-    /**
         @brief Lists the names of all Identifiers in a std::set<const Identifier*>.
         @param out The outstream
Index: code/trunk/src/libraries/core/Identifier.h
===================================================================
--- code/trunk/src/libraries/core/Identifier.h	(revision 5772)
+++ code/trunk/src/libraries/core/Identifier.h	(revision 5774)
@@ -66,5 +66,4 @@
 #include "ObjectList.h"
 #include "ObjectListBase.h"
-#include "Super.h"
 
 namespace orxonox
@@ -107,9 +106,4 @@
             bool isDirectParentOf(const Identifier* identifier) const;
 
-            /** @brief Returns true if the class can be loaded through XML. */
-            inline bool isLoadable() const { return this->bLoadable_; }
-            /** @brief Set the class to be loadable through XML or not. */
-            inline void setLoadable(bool bLoadable) { this->bLoadable_ = bLoadable; }
-
             /** @brief Returns the list of all existing objects of this class. @return The list */
             inline ObjectListBase* getObjects() const
@@ -181,52 +175,9 @@
 
 
-            /** @brief Returns the map that stores all console commands. @return The const_iterator */
-            inline const std::map<std::string, ConsoleCommand*>& getConsoleCommandMap() const { return this->consoleCommands_; }
-            /** @brief Returns a const_iterator to the beginning of the map that stores all console commands. @return The const_iterator */
-            inline std::map<std::string, ConsoleCommand*>::const_iterator getConsoleCommandMapBegin() const { return this->consoleCommands_.begin(); }
-            /** @brief Returns a const_iterator to the end of the map that stores all console commands. @return The const_iterator */
-            inline std::map<std::string, ConsoleCommand*>::const_iterator getConsoleCommandMapEnd() const { return this->consoleCommands_.end(); }
-
-            /** @brief Returns the map that stores all console commands with their names in lowercase. @return The const_iterator */
-            inline const std::map<std::string, ConsoleCommand*>& getLowercaseConsoleCommandMap() const { return this->consoleCommands_LC_; }
-            /** @brief Returns a const_iterator to the beginning of the map that stores all console commands with their names in lowercase. @return The const_iterator */
-            inline std::map<std::string, ConsoleCommand*>::const_iterator getLowercaseConsoleCommandMapBegin() const { return this->consoleCommands_LC_.begin(); }
-            /** @brief Returns a const_iterator to the end of the map that stores all console commands with their names in lowercase. @return The const_iterator */
-            inline std::map<std::string, ConsoleCommand*>::const_iterator getLowercaseConsoleCommandMapEnd() const { return this->consoleCommands_LC_.end(); }
-
-            /** @brief Returns the map that stores all XMLPort params. @return The const_iterator */
-            inline const std::map<std::string, XMLPortParamContainer*>& getXMLPortParamMap() const { return this->xmlportParamContainers_; }
-            /** @brief Returns a const_iterator to the beginning of the map that stores all XMLPort params. @return The const_iterator */
-            inline std::map<std::string, XMLPortParamContainer*>::const_iterator getXMLPortParamMapBegin() const { return this->xmlportParamContainers_.begin(); }
-            /** @brief Returns a const_iterator to the end of the map that stores all XMLPort params. @return The const_iterator */
-            inline std::map<std::string, XMLPortParamContainer*>::const_iterator getXMLPortParamMapEnd() const { return this->xmlportParamContainers_.end(); }
-
-            /** @brief Returns the map that stores all XMLPort objects. @return The const_iterator */
-            inline const std::map<std::string, XMLPortObjectContainer*>& getXMLPortObjectMap() const { return this->xmlportObjectContainers_; }
-            /** @brief Returns a const_iterator to the beginning of the map that stores all XMLPort objects. @return The const_iterator */
-            inline std::map<std::string, XMLPortObjectContainer*>::const_iterator getXMLPortObjectMapBegin() const { return this->xmlportObjectContainers_.begin(); }
-            /** @brief Returns a const_iterator to the end of the map that stores all XMLPort objects. @return The const_iterator */
-            inline std::map<std::string, XMLPortObjectContainer*>::const_iterator getXMLPortObjectMapEnd() const { return this->xmlportObjectContainers_.end(); }
-
-            /** @brief Returns the map that stores all XMLPort events. @return The const_iterator */
-            inline const std::map<std::string, XMLPortObjectContainer*>& getXMLPortEventMap() const { return this->xmlportEventContainers_; }
-            /** @brief Returns a const_iterator to the beginning of the map that stores all XMLPort events. @return The const_iterator */
-            inline std::map<std::string, XMLPortObjectContainer*>::const_iterator getXMLPortEventMapBegin() const { return this->xmlportEventContainers_.begin(); }
-            /** @brief Returns a const_iterator to the end of the map that stores all XMLPort events. @return The const_iterator */
-            inline std::map<std::string, XMLPortObjectContainer*>::const_iterator getXMLPortEventMapEnd() const { return this->xmlportEventContainers_.end(); }
-
             /** @brief Returns true if this class has at least one config value. @return True if this class has at least one config value */
             inline bool hasConfigValues() const { return this->bHasConfigValues_; }
-            /** @brief Returns true if this class has at least one console command. @return True if this class has at least one console command */
-            inline bool hasConsoleCommands() const { return this->bHasConsoleCommands_; }
 
             /** @brief Returns true, if a branch of the class-hierarchy is being created, causing all new objects to store their parents. @return The status of the class-hierarchy creation */
             inline static bool isCreatingHierarchy() { return (hierarchyCreatingCounter_s > 0); }
-
-            /** @brief Returns the network ID to identify a class through the network. @return the network ID */
-            inline const uint32_t getNetworkID() const { return this->networkID_; }
-
-            /** @brief Sets the network ID to a new value. @param id The new value */
-            void setNetworkID(uint32_t id);
 
             /** @brief Returns the unique ID of the class */
@@ -236,17 +187,4 @@
             ConfigValueContainer* getConfigValueContainer(const std::string& varname);
             ConfigValueContainer* getLowercaseConfigValueContainer(const std::string& varname);
-
-            void addXMLPortParamContainer(const std::string& paramname, XMLPortParamContainer* container);
-            XMLPortParamContainer* getXMLPortParamContainer(const std::string& paramname);
-
-            void addXMLPortObjectContainer(const std::string& sectionname, XMLPortObjectContainer* container);
-            XMLPortObjectContainer* getXMLPortObjectContainer(const std::string& sectionname);
-
-            void addXMLPortEventContainer(const std::string& eventname, XMLPortObjectContainer* container);
-            XMLPortObjectContainer* getXMLPortEventContainer(const std::string& eventname);
-
-            ConsoleCommand& addConsoleCommand(ConsoleCommand* command, bool bCreateShortcut);
-            ConsoleCommand* getConsoleCommand(const std::string& name) const;
-            ConsoleCommand* getLowercaseConsoleCommand(const std::string& name) const;
 
             void initializeClassHierarchy(std::set<const Identifier*>* parents, bool bRootClass);
@@ -260,5 +198,4 @@
 
             static Identifier* getIdentifierSingleton(const std::string& name, Identifier* proposal);
-            virtual void createSuperFunctionCaller() const = 0;
 
             /** @brief Returns the map that stores all Identifiers. @return The map */
@@ -305,9 +242,7 @@
             bool bCreatedOneObject_;                                       //!< True if at least one object of the given type was created (used to determine the need of storing the parents)
             bool bSetName_;                                                //!< True if the name is set
-            bool bLoadable_;                                               //!< False = it's not permitted to load the object through XML
             std::string name_;                                             //!< The name of the class the Identifier belongs to
             BaseFactory* factory_;                                         //!< The Factory, able to create new objects of the given class (if available)
             static int hierarchyCreatingCounter_s;                         //!< Bigger than zero if at least one Identifier stores its parents (its an int instead of a bool to avoid conflicts with multithreading)
-            uint32_t networkID_;                                           //!< The network ID to identify a class through the network
             const unsigned int classID_;                                   //!< Uniquely identifies a class (might not be the same as the networkID_)
             static unsigned int classIDCounter_s;                          //!< Static counter for the unique classIDs
@@ -316,12 +251,4 @@
             std::map<std::string, ConfigValueContainer*> configValues_;    //!< A map to link the string of configurable variables with their ConfigValueContainer
             std::map<std::string, ConfigValueContainer*> configValues_LC_; //!< A map to link the string of configurable variables with their ConfigValueContainer
-
-            bool bHasConsoleCommands_;                                     //!< True if this class has at least one assigned console command
-            std::map<std::string, ConsoleCommand*> consoleCommands_;       //!< All console commands of this class
-            std::map<std::string, ConsoleCommand*> consoleCommands_LC_;    //!< All console commands of this class with their names in lowercase
-
-            std::map<std::string, XMLPortParamContainer*> xmlportParamContainers_;     //!< All loadable parameters
-            std::map<std::string, XMLPortObjectContainer*> xmlportObjectContainers_;   //!< All attachable objects
-            std::map<std::string, XMLPortObjectContainer*> xmlportEventContainers_;    //!< All events
     };
 
@@ -344,7 +271,4 @@
     class ClassIdentifier : public Identifier
     {
-        #define SUPER_INTRUSIVE_DECLARATION_INCLUDE
-        #include "Super.h"
-
         public:
             static ClassIdentifier<T> *getIdentifier();
@@ -360,9 +284,7 @@
             ClassIdentifier()
             {
-                SuperFunctionInitialization<0, T>::initialize(this);
             }
             ~ClassIdentifier()
             {
-                SuperFunctionDestruction<0, T>::destroy(this);
             }
 
@@ -630,28 +552,4 @@
                 { return this->identifier_; }
 
-//            /** @brief Returns true, if the assigned identifier is at least of the given type. @param identifier The identifier to compare with */
-//            inline bool isA(const Identifier* identifier) const
-//                { return this->identifier_->isA(identifier); }
-//
-//            /** @brief Returns true, if the assigned identifier is exactly of the given type. @param identifier The identifier to compare with */
-//            inline bool isExactlyA(const Identifier* identifier) const
-//                { return this->identifier_->isExactlyA(identifier); }
-//
-//            /** @brief Returns true, if the assigned identifier is a child of the given identifier. @param identifier The identifier to compare with */
-//            inline bool isChildOf(const Identifier* identifier) const
-//                { return this->identifier_->isChildOf(identifier); }
-//
-//            /** @brief Returns true, if the assigned identifier is a direct child of the given identifier. @param identifier The identifier to compare with */
-//            inline bool isDirectChildOf(const Identifier* identifier) const
-//                { return this->identifier_->isDirectChildOf(identifier); }
-//
-//            /** @brief Returns true, if the assigned identifier is a parent of the given identifier. @param identifier The identifier to compare with */
-//            inline bool isParentOf(const Identifier* identifier) const
-//                { return this->identifier_->isParentOf(identifier); }
-//
-//            /** @brief Returns true, if the assigned identifier is a direct parent of the given identifier. @param identifier The identifier to compare with */
-//            inline bool isDirectParentOf(const Identifier* identifier) const
-//                { return this->identifier_->isDirectParentOf(identifier); }
-
         private:
             Identifier* identifier_;            //!< The assigned identifier
Index: code/trunk/src/libraries/core/Loader.cc
===================================================================
--- code/trunk/src/libraries/core/Loader.cc	(revision 5772)
+++ 	(revision )
@@ -1,368 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "Loader.h"
-
-#include <sstream>
-#include <tinyxml/ticpp.h>
-#include <boost/scoped_ptr.hpp>
-
-#include "util/Debug.h"
-#include "util/Exception.h"
-#include "util/StringUtils.h"
-#include "BaseObject.h"
-#include "Iterator.h"
-#include "ObjectList.h"
-#include "LuaState.h"
-#include "Namespace.h"
-#include "Resource.h"
-#include "XMLFile.h"
-
-namespace orxonox
-{
-    std::vector<std::pair<const XMLFile*, ClassTreeMask> > Loader::files_s;
-    ClassTreeMask Loader::currentMask_s;
-
-    bool Loader::open(const XMLFile* file, const ClassTreeMask& mask)
-    {
-        Loader::add(file, mask);
-        return Loader::load(file, mask);
-    }
-
-    void Loader::close()
-    {
-        Loader::unload();
-        Loader::files_s.clear();
-    }
-
-    void Loader::close(const XMLFile* file)
-    {
-        Loader::unload(file);
-        Loader::remove(file);
-    }
-
-    void Loader::add(const XMLFile* file, const ClassTreeMask& mask)
-    {
-        if (!file)
-            return;
-        Loader::files_s.insert(Loader::files_s.end(), std::pair<const XMLFile*, ClassTreeMask>(file, mask));
-    }
-
-    void Loader::remove(const XMLFile* file)
-    {
-        if (!file)
-            return;
-        for (std::vector<std::pair<const XMLFile*, ClassTreeMask> >::iterator it = Loader::files_s.begin(); it != Loader::files_s.end(); ++it)
-        {
-            if ((*it).first == file)
-            {
-                Loader::files_s.erase(it);
-                break;
-            }
-        }
-    }
-
-    bool Loader::load(const ClassTreeMask& mask)
-    {
-        bool success = true;
-        for (std::vector<std::pair<const XMLFile*, ClassTreeMask> >::iterator it = Loader::files_s.begin(); it != Loader::files_s.end(); ++it)
-            if (!Loader::load((*it).first, (*it).second * mask))
-                success = false;
-
-        return success;
-    }
-
-    void Loader::unload(const ClassTreeMask& mask)
-    {
-        for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); )
-        {
-            if (mask.isIncluded(it->getIdentifier()))
-                delete (*(it++));
-            else
-                ++it;
-        }
-    }
-
-    bool Loader::reload(const ClassTreeMask& mask)
-    {
-        Loader::unload(mask);
-        return Loader::load(mask);
-    }
-
-    bool Loader::load(const XMLFile* file, const ClassTreeMask& mask)
-    {
-        if (!file)
-            return false;
-
-        Loader::currentMask_s = file->getMask() * mask;
-
-        std::string xmlInput;
-        if (file->getLuaSupport())
-        {
-            // Use the LuaState to replace the XML tags (calls our function)
-            scoped_ptr<LuaState> luaState(new LuaState());
-            luaState->setIncludeParser(&Loader::replaceLuaTags);
-            luaState->includeFile(file->getFilename(), file->getResourceGroup(), false);
-            xmlInput = luaState->getOutput().str();
-        }
-        else
-        {
-            shared_ptr<ResourceInfo> info = Resource::getInfo(file->getFilename(), file->getResourceGroup());
-            if (info == NULL)
-            {
-                COUT(1) << "Error: Could not find XML file '" << file->getFilename() << "'." << std::endl;
-                return false;
-            }
-            xmlInput = Resource::open(file->getFilename(), file->getResourceGroup())->getAsString();
-        }
-
-        try
-        {
-            COUT(0) << "Start loading " << file->getFilename() << "..." << std::endl;
-            COUT(3) << "Mask: " << Loader::currentMask_s << std::endl;
-
-            ticpp::Document xmlfile(file->getFilename());
-            xmlfile.Parse(xmlInput, true);
-
-            ticpp::Element rootElement;
-            rootElement.SetAttribute("name", "root");
-            rootElement.SetAttribute("bAutogenerated", true);
-
-            for (ticpp::Iterator<ticpp::Element> child = xmlfile.FirstChildElement(false); child != child.end(); child++)
-                rootElement.InsertEndChild(*child);
-
-            COUT(4) << "  creating root-namespace..." << std::endl;
-            Namespace* rootNamespace = new Namespace(0);
-            rootNamespace->setLoaderIndentation("    ");
-            rootNamespace->setFile(file);
-            rootNamespace->setNamespace(rootNamespace);
-            rootNamespace->setRoot(true);
-            rootNamespace->XMLPort(rootElement, XMLPort::LoadObject);
-
-            COUT(0) << "Finished loading " << file->getFilename() << "." << std::endl;
-
-            COUT(4) << "Namespace-tree:" << std::endl << rootNamespace->toString("  ") << std::endl;
-
-            return true;
-        }
-        catch (ticpp::Exception& ex)
-        {
-            COUT(1) << std::endl;
-            COUT(1) << "An XML-error occurred in Loader.cc while loading " << file->getFilename() << ":" << std::endl;
-            COUT(1) << ex.what() << std::endl;
-            COUT(1) << "Loading aborted." << std::endl;
-            return false;
-        }
-        catch (Exception& ex)
-        {
-            COUT(1) << std::endl;
-            COUT(1) << "A loading-error occurred in Loader.cc while loading " << file->getFilename() << ":" << std::endl;
-            COUT(1) << ex.what() << std::endl;
-            COUT(1) << "Loading aborted." << std::endl;
-            return false;
-        }
-        catch (...)
-        {
-            COUT(1) << std::endl;
-            COUT(1) << "An error occurred in Loader.cc while loading " << file->getFilename() << ":" << std::endl;
-            COUT(1) << Exception::handleMessage() << std::endl;
-            COUT(1) << "Loading aborted." << std::endl;
-            return false;
-        }
-    }
-
-    void Loader::unload(const XMLFile* file, const ClassTreeMask& mask)
-    {
-        if (!file)
-            return;
-        for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it; )
-        {
-            if ((it->getFile() == file) && mask.isIncluded(it->getIdentifier()))
-                delete (*(it++));
-            else
-                ++it;
-        }
-    }
-
-    bool Loader::reload(const XMLFile* file, const ClassTreeMask& mask)
-    {
-        Loader::unload(file, mask);
-        return Loader::load(file, mask);
-    }
-
-    std::string Loader::replaceLuaTags(const std::string& text)
-    {
-        // chreate map with all Lua tags
-        std::map<size_t, bool> luaTags;
-        {
-            size_t pos = 0;
-            while ((pos = text.find("<?lua", pos)) != std::string::npos)
-                luaTags[pos++] = true;
-        }
-        {
-            size_t pos = 0;
-            while ((pos = text.find("?>", pos)) != std::string::npos)
-                luaTags[pos++] = false;
-        }
-
-        // erase all tags from the map that are between two quotes
-        {
-            std::map<size_t, bool>::iterator it = luaTags.begin();
-            std::map<size_t, bool>::iterator it2 = it;
-            bool bBetweenQuotes = false;
-            size_t pos = 0;
-            while ((pos = getNextQuote(text, pos)) != std::string::npos)
-            {
-                while ((it != luaTags.end()) && (it->first < pos))
-                {
-                    if (bBetweenQuotes)
-                    {
-                        it2++;
-                        if(it->second && !(it2->second) && it2->first < pos)
-                            it = ++it2;
-                        else
-                            luaTags.erase(it++);
-                    }
-                    else
-                        ++it;
-                }
-                bBetweenQuotes = !bBetweenQuotes;
-                pos++;
-            }
-        }
-
-        // check whether on every opening <?lua tag a closing ?> tag follows
-        {
-            bool expectedValue = true;
-            for (std::map<size_t, bool>::iterator it = luaTags.begin(); it != luaTags.end(); ++it)
-            {
-                if (it->second == expectedValue)
-                    expectedValue = !expectedValue;
-                else
-                {
-                    expectedValue = false;
-                    break;
-                }
-            }
-            if (!expectedValue)
-            {
-                COUT(2) << "Warning: Error in level file" << std::endl;
-                // todo: errorhandling
-                return "";
-            }
-        }
-
-        // Use a stringstream object to speed up the parsing
-        std::ostringstream output;
-
-        // cut the original string into pieces and put them together with print() instead of lua tags
-        {
-            std::map<size_t, bool>::iterator it = luaTags.begin();
-            bool bInPrintFunction = true;
-            size_t start = 0;
-            size_t end = 0;
-
-            do
-            {
-                if (it != luaTags.end())
-                    end = (*(it++)).first;
-                else
-                    end = std::string::npos;
-
-                unsigned int equalSignCounter = 0;
-
-                if (bInPrintFunction)
-                {
-                    // count ['='[ and ]'='] and replace tags with print([[ and ]])
-                    std::string temp = text.substr(start, end - start);
-                    {
-                    size_t pos = 0;
-                    while ((pos = temp.find('[', pos)) != std::string::npos)
-                    {
-                        unsigned int tempCounter = 1;
-                        size_t tempPos = pos++;
-                        while(temp[++tempPos] == '=')
-                        {
-                            tempCounter++;
-                        }
-                        if(temp[tempPos] != '[')
-                        {
-                            tempCounter = 0;
-                        }
-                        else if(tempCounter == 0)
-                        {
-                            tempCounter = 1;
-                        }
-                        if (tempCounter > equalSignCounter)
-                            equalSignCounter = tempCounter;
-                        }
-                    }
-                    {
-                        size_t pos = 0;
-                        while ((pos = temp.find(']', pos)) != std::string::npos)
-                        {
-                            unsigned int tempCounter = 1;
-                            size_t tempPos = pos++;
-                            while(temp[++tempPos] == '=')
-                            {
-                                tempCounter++;
-                            }
-                            if(temp[tempPos] != ']')
-                            {
-                                tempCounter = 0;
-                            }
-                            else if(tempCounter == 0)
-                            {
-                                tempCounter = 1;
-                            }
-                            if (tempCounter > equalSignCounter)
-                                equalSignCounter = tempCounter;
-                        }
-                    }
-                    std::string equalSigns = "";
-                    for(unsigned int i = 0; i < equalSignCounter; i++)
-                    {
-                        equalSigns += "=";
-                    }
-                    output << "print([" + equalSigns + "[" + temp + "]" + equalSigns +"])";
-                    start = end + 5;
-                }
-                else
-                {
-                    output << text.substr(start, end - start);
-                    start = end + 2;
-                }
-
-                bInPrintFunction = !bInPrintFunction;
-            }
-            while (end != std::string::npos);
-        }
-
-        return output.str();
-    }
-}
Index: code/trunk/src/libraries/core/Loader.h
===================================================================
--- code/trunk/src/libraries/core/Loader.h	(revision 5772)
+++ 	(revision )
@@ -1,66 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Loader_H__
-#define _Loader_H__
-
-#include "CorePrereqs.h"
-
-#include <vector>
-#include "ClassTreeMask.h"
-
-namespace orxonox
-{
-    class _CoreExport Loader
-    {
-        public:
-            static bool open(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
-            static void close();
-            static void close(const XMLFile* file);
-
-            static void add(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
-            static void remove(const XMLFile* file);
-
-            static bool load(const ClassTreeMask& mask = ClassTreeMask());
-            static void unload(const ClassTreeMask& mask = ClassTreeMask());
-            static bool reload(const ClassTreeMask& mask = ClassTreeMask());
-
-            static bool load(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
-            static void unload(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
-            static bool reload(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
-
-            static std::string replaceLuaTags(const std::string& text);
-
-            static ClassTreeMask currentMask_s;
-
-        private:
-            static std::vector<std::pair<const XMLFile*, ClassTreeMask> > files_s;
-    };
-}
-
-#endif /* _Loader_H__ */
Index: code/trunk/src/libraries/core/LuaState.cc
===================================================================
--- code/trunk/src/libraries/core/LuaState.cc	(revision 5772)
+++ code/trunk/src/libraries/core/LuaState.cc	(revision 5774)
@@ -30,4 +30,5 @@
 #include "LuaState.h"
 
+#include <boost/filesystem.hpp>
 #include <tolua/tolua++.h>
 extern "C" {
@@ -38,5 +39,4 @@
 #include "util/Debug.h"
 #include "Core.h"
-#include "Resource.h"
 #include "ToluaBindCore.h"
 
@@ -71,6 +71,4 @@
         // Create dummy file info
         sourceFileInfo_.reset(new ResourceInfo());
-        sourceFileInfo_->group = "General";
-        sourceFileInfo_->size = 0;
 
         // Push 'this' pointer
@@ -87,9 +85,8 @@
     }
 
-    shared_ptr<ResourceInfo> LuaState::getFileInfo(const std::string& filename, const std::string& resourceGroup, bool bSearchOtherPaths)
+    shared_ptr<ResourceInfo> LuaState::getFileInfo(const std::string& filename, bool bSearchOtherPaths)
     {
         shared_ptr<ResourceInfo> sourceInfo;
-        if (resourceGroup != "NoResourceGroupProvided")
-            sourceInfo = Resource::getInfo(filename, resourceGroup);
+        sourceInfo = this->getFileInfo(filename);
 
         // Continue search if not explicitely forbidden
@@ -97,9 +94,9 @@
         {
             // Call might be relative to the file currently being processed
-            sourceInfo = Resource::getInfo(sourceFileInfo_->path + filename, sourceFileInfo_->group);
+            sourceInfo = this->getFileInfo(sourceFileInfo_->path + filename);
             if (sourceInfo == NULL)
             {
                 // Maybe find something in the same group but in the root path
-                sourceInfo = Resource::getInfo(filename, sourceFileInfo_->group);
+                sourceInfo = this->getFileInfo(filename);
             }
         }
@@ -107,12 +104,34 @@
     }
 
-    void LuaState::includeFile(const std::string& filename, const std::string& resourceGroup, bool bSearchOtherPaths)
-    {
-        shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename, resourceGroup, bSearchOtherPaths);
+    shared_ptr<ResourceInfo> LuaState::getFileInfo(const std::string& filename)
+    {
+        boost::filesystem::path filepath = Core::getDataPath() / "lua" / filename;
+        if (boost::filesystem::exists(filepath))
+        {
+            shared_ptr<ResourceInfo> info(new ResourceInfo());
+            info->filename = filepath.string();
+            info->path = filepath.branch_path().string();
+            info->basename = filepath.leaf();
+            return info;
+        }
+        else
+            return shared_ptr<ResourceInfo>();
+    }
+
+    std::string LuaState::loadFile(const std::string& filename)
+    {
+        std::ifstream file(filename.c_str());
+        std::ostringstream oss;
+        oss << file.rdbuf();
+        return oss.str();
+    }
+
+    void LuaState::includeFile(const std::string& filename, bool bSearchOtherPaths)
+    {
+        shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename, bSearchOtherPaths);
         if (sourceInfo != NULL)
-            this->includeString(Resource::open(sourceInfo->filename, sourceInfo->group)->getAsString(), sourceInfo);
-        else
-            COUT(2) << "LuaState: Cannot include file '" << filename << "' in resource group '"
-                    << (resourceGroup == "NoResourceGroupProvided" ? sourceFileInfo_->group : resourceGroup) << "': group not found." << std::endl;
+            this->includeString(this->loadFile(sourceInfo->filename), sourceInfo);
+        else
+            COUT(2) << "LuaState: Cannot include file '" << filename << std::endl;
     }
 
@@ -129,12 +148,11 @@
     }
 
-    void LuaState::doFile(const std::string& filename, const std::string& resourceGroup, bool bSearchOtherPaths)
-    {
-        shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename, resourceGroup, bSearchOtherPaths);
+    void LuaState::doFile(const std::string& filename, bool bSearchOtherPaths)
+    {
+        shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename, bSearchOtherPaths);
         if (sourceInfo != NULL)
-            this->doString(Resource::open(sourceInfo->filename, sourceInfo->group)->getAsString(), sourceInfo);
-        else
-            COUT(2) << "LuaState: Cannot do file '" << filename << "' in resource group '"
-                << (resourceGroup == "NoResourceGroupProvided" ? sourceFileInfo_->group : resourceGroup) << "': group not found." << std::endl;
+            this->doString(this->loadFile(sourceInfo->filename), sourceInfo);
+        else
+            COUT(2) << "LuaState: Cannot do file '" << filename << std::endl;
     }
 
@@ -186,7 +204,7 @@
     }
 
-    bool LuaState::fileExists(const std::string& filename, const std::string& resourceGroup, bool bSearchOtherPaths)
-    {
-        shared_ptr<ResourceInfo> info =  this->getFileInfo(filename, resourceGroup, bSearchOtherPaths);
+    bool LuaState::fileExists(const std::string& filename, bool bSearchOtherPaths)
+    {
+        shared_ptr<ResourceInfo> info =  this->getFileInfo(filename, bSearchOtherPaths);
         if (info == NULL)
             return false;
Index: code/trunk/src/libraries/core/LuaState.h
===================================================================
--- code/trunk/src/libraries/core/LuaState.h	(revision 5772)
+++ code/trunk/src/libraries/core/LuaState.h	(revision 5774)
@@ -45,4 +45,15 @@
 namespace orxonox
 {
+    //! Stores basic information about a File
+    struct ResourceInfo
+    {
+        //! The file's fully qualified name
+        std::string filename;
+        //! Path name; separated by '/' and ending with '/'
+        std::string path;
+        //! Base filename
+        std::string basename;
+    };
+
     /**
     @brief
@@ -56,13 +67,13 @@
         ~LuaState();
 
-        void doFile(const std::string& filename, const std::string& resourceGroup = "General", bool bSearchOtherPaths = true); // tolua_export
+        void doFile(const std::string& filename, bool bSearchOtherPaths = true); // tolua_export
         void doString(const std::string& code, shared_ptr<ResourceInfo> sourceFileInfo = shared_ptr<ResourceInfo>());
 
-        void includeFile(const std::string& filename, const std::string& resourceGroup = "General", bool bSearchOtherPaths = true); // tolua_export
+        void includeFile(const std::string& filename, bool bSearchOtherPaths = true); // tolua_export
         void includeString(const std::string& code, shared_ptr<ResourceInfo> sourceFileInfo = shared_ptr<ResourceInfo>());
 
         void luaPrint(const std::string& str); // tolua_export
         void luaLog(unsigned int level, const std::string& message); // tolua_export
-        bool fileExists(const std::string& filename, const std::string& resourceGroup = "General", bool bSearchOtherPaths = true); // tolua_export
+        bool fileExists(const std::string& filename, bool bSearchOtherPaths = true); // tolua_export
 
         const std::stringstream& getOutput() const { return output_; }
@@ -78,5 +89,7 @@
 
     private:
-        shared_ptr<ResourceInfo> getFileInfo(const std::string& filename, const std::string& resourceGroup, bool bSearchOtherPaths);
+        shared_ptr<ResourceInfo> getFileInfo(const std::string& filename, bool bSearchOtherPaths);
+        shared_ptr<ResourceInfo> getFileInfo(const std::string& filename);
+        std::string loadFile(const std::string& filename);
 
 #if LUA_VERSION_NUM != 501
Index: code/trunk/src/libraries/core/MemoryArchive.cc
===================================================================
--- code/trunk/src/libraries/core/MemoryArchive.cc	(revision 5772)
+++ 	(revision )
@@ -1,133 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "MemoryArchive.h"
-
-#if OGRE_VERSION < 0x010600
-
-#include <OgreException.h>
-#include <boost/filesystem.hpp>
-
-namespace orxonox
-{
-    using namespace Ogre;
-
-    MemoryArchive::ArchiveMap MemoryArchive::archives_s;
-
-    void MemoryArchive::load()
-    {
-        if (archives_s.find(this->getName()) == archives_s.end())
-            OGRE_EXCEPT(Ogre::Exception::ERR_INTERNAL_ERROR, this->getName() + " - MemoryArchive not found.", "MemoryArchive");
-    }
-
-    DataStreamPtr MemoryArchive::open(const String& filename) const
-    {
-        const FileMap& files = archives_s[this->getName()];
-        FileMap::const_iterator itFile = files.find(filename);
-        if (itFile == files.end())
-            return DataStreamPtr();
-        else
-            return MemoryDataStreamPtr(new MemoryDataStream(itFile->second.first.get(), itFile->second.second));
-    }
-
-    void MemoryArchive::findFiles(const String& pattern, bool bRecursive, 
-        bool bDirs, StringVector* simpleList, FileInfoList* detailList)
-    {
-        const FileMap& files = archives_s[this->getName()];
-
-        for (FileMap::const_iterator it = files.begin(); it != files.end(); ++it)
-        {
-            boost::filesystem::path file = it->first;
-            // Check pattern
-            if (!StringUtil::match(file.string(), pattern, true))
-                continue;
-            if (bDirs)
-                file = file.parent_path();
-            if (file.empty())
-                continue;
-            if (file.has_parent_path() && !bRecursive)
-                continue;
-            if (simpleList)
-                simpleList->push_back(file.string());
-            if (detailList)
-            {
-                FileInfo fi;
-                fi.archive = this;
-                fi.filename = file.string();
-                fi.basename = file.filename();
-                fi.path = file.parent_path().string();
-                fi.compressedSize = it->second.second;
-                fi.uncompressedSize = it->second.second;
-                detailList->push_back(fi);
-            }
-        }
-    }
-    StringVectorPtr MemoryArchive::list(bool recursive, bool dirs)
-    {
-        StringVectorPtr ret(new StringVector());
-        findFiles("*", recursive, dirs, ret.getPointer(), 0);
-        return ret;
-    }
-
-    FileInfoListPtr MemoryArchive::listFileInfo(bool recursive, bool dirs)
-    {
-        FileInfoListPtr ret(new FileInfoList());
-        findFiles("*", recursive, dirs, 0, ret.getPointer());
-        return ret;
-    }
-
-    StringVectorPtr MemoryArchive::find(const String& pattern,
-                                            bool recursive, bool dirs)
-    {
-        StringVectorPtr ret(new StringVector());
-        findFiles(pattern, recursive, dirs, ret.getPointer(), 0);
-        return ret;
-    }
-
-    FileInfoListPtr MemoryArchive::findFileInfo(const String& pattern, 
-        bool recursive, bool dirs)
-    {
-        FileInfoListPtr ret(new FileInfoList());
-        findFiles(pattern, recursive, dirs, 0, ret.getPointer());
-        return ret;
-    }
-
-    bool MemoryArchive::exists(const String& filename)
-	{
-        const FileMap& files = archives_s[this->getName()];
-        return files.find(filename) != files.end();
-	}
-
-    const Ogre::String& MemoryArchiveFactory::getType(void) const
-    {
-        static std::string result("Memory");
-        return result;
-    }
-}
-
-#endif /* OGRE_VERSION < 0x010600 */
Index: code/trunk/src/libraries/core/MemoryArchive.h
===================================================================
--- code/trunk/src/libraries/core/MemoryArchive.h	(revision 5772)
+++ 	(revision )
@@ -1,101 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _MemoryArchive_H__
-#define _MemoryArchive_H__
-
-#include "CorePrereqs.h"
-#include <OgrePrerequisites.h>
-
-#if OGRE_VERSION < 0x010600
-
-#include <map>
-#include <OgreArchive.h>
-#include <OgreArchiveFactory.h>
-#include <boost/shared_array.hpp>
-
-namespace orxonox
-{
-    /**
-    @brief
-        Provides a simple mechanism of 'memory mapped IO', but compatible for Ogre 1.4
-
-        Files are stored as shared_array<char> in a static map with the archive names
-        (imaging the different archives as resource locations). This map then contains
-        yet another map with the actual files.
-        If you want to know why we make such a fuss, contact GraphicsManager::upgradeToGraphics()
-        for more information.
-    */
-    class MemoryArchive : public Ogre::Archive
-    {
-    public:
-        MemoryArchive(const Ogre::String& name, const Ogre::String& archiveType) : Ogre::Archive(name, archiveType) { }
-        ~MemoryArchive() { }
-
-        bool isCaseSensitive(void) const { return true; }
-
-        void load();
-        void unload() { }
-
-        Ogre::DataStreamPtr open(const Ogre::String& filename) const;
-
-        Ogre::StringVectorPtr list(bool recursive = true, bool dirs = false);
-        Ogre::FileInfoListPtr listFileInfo(bool recursive = true, bool dirs = false);
-
-        Ogre::StringVectorPtr find(const Ogre::String& pattern, bool recursive = true,
-            bool dirs = false);
-        Ogre::FileInfoListPtr findFileInfo(const Ogre::String& pattern, bool recursive = true,
-            bool dirs = false);
-
-        bool exists(const Ogre::String& filename);
-
-        static void addFile(const std::string& archiveName, const std::string& filename, shared_array<char> content, size_t size)
-            { archives_s[archiveName][filename] = std::make_pair(content, size); }
-
-    private:
-        void findFiles(const Ogre::String& pattern, bool bRecursive, 
-            bool bDirs, Ogre::StringVector* simpleList, Ogre::FileInfoList* detailList);
-
-        typedef std::map<std::string, std::pair<shared_array<char>, size_t> > FileMap;
-        typedef std::map<std::string, FileMap> ArchiveMap;
-        static ArchiveMap archives_s;
-    };
-
-    //! Specialisation of ArchiveFactory for MemoryArchive.
-    class _CoreExport MemoryArchiveFactory : public Ogre::ArchiveFactory
-    {
-    public:
-        const Ogre::String& getType(void) const;
-        Ogre::Archive* createInstance(const Ogre::String& name) { return new MemoryArchive(name, "Memory"); }
-        void destroyInstance(Ogre::Archive* arch)               { delete arch; }
-    };
-}
-
-#endif /* OGRE_VERSION < 0x010600 */
-
-#endif /* _MemoryArchive_H__ */
Index: code/trunk/src/libraries/core/Namespace.cc
===================================================================
--- code/trunk/src/libraries/core/Namespace.cc	(revision 5772)
+++ 	(revision )
@@ -1,182 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "Namespace.h"
-
-#include <set>
-
-#include "NamespaceNode.h"
-#include "CoreIncludes.h"
-#include "XMLPort.h"
-#include "util/SubString.h"
-
-namespace orxonox
-{
-    CreateFactory(Namespace);
-
-    Namespace::Namespace(BaseObject* creator) : BaseObject(creator),
-      bAutogeneratedFileRootNamespace_(false),
-      bRoot_(false),
-      operator_("or")
-    {
-        RegisterObject(Namespace);
-    }
-
-    Namespace::~Namespace()
-    {
-        if (this->bRoot_)
-            for (std::set<NamespaceNode*>::iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); ++it)
-                delete (*it);
-    }
-
-    /**
-        @brief XML loading and saving.
-        @param xmlelement The XML-element
-        @param loading Loading (true) or saving (false)
-        @return The XML-element
-    */
-    void Namespace::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(Namespace, XMLPort, xmlelement, mode);
-
-        std::string name = this->getName();
-        size_t pos = 0;
-        while ((pos = name.find(',')) != std::string::npos)
-            name.replace(pos, 1, " ");
-        while ((pos = name.find(';')) != std::string::npos)
-            name.replace(pos, 1, " ");
-        while ((pos = name.find('\n')) != std::string::npos)
-            name.replace(pos, 1, " ");
-        while ((pos = name.find('\t')) != std::string::npos)
-            name.replace(pos, 1, " ");
-        SubString tokens(name, " ", "", false, '\\', true, '"', true, '\0', '\0', true, '\0');
-        if (this->bRoot_)
-        {
-            this->representingNamespaces_.insert(new NamespaceNode(this->getName()));
-        }
-        else
-        {
-            for (unsigned int i = 0; i < tokens.size(); i++)
-            {
-                for (std::set<NamespaceNode*>::iterator it = this->getNamespace()->representingNamespaces_.begin(); it != this->getNamespace()->representingNamespaces_.end(); ++it)
-                {
-                    std::set<NamespaceNode*> temp = (*it)->getNodeRelative(tokens[i]);
-                    this->representingNamespaces_.insert(temp.begin(), temp.end());
-                }
-            }
-        }
-
-        XMLPortParam(Namespace, "operator", setOperator, getOperator, xmlelement, mode);
-        XMLPortParam(Namespace, "bAutogenerated", setAutogenerated, isAutogenerated, xmlelement, mode);
-
-        if (this->bAutogeneratedFileRootNamespace_)
-        {
-            for (std::set<NamespaceNode*>::iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); ++it)
-            {
-                (*it)->setRoot(true);
-                (*it)->setHidden(true);
-            }
-        }
-
-        XMLPortObjectExtended(Namespace, BaseObject, "", loadObjects, saveObjects, xmlelement, mode, true, false);
-    }
-
-    void Namespace::loadObjects(BaseObject* object)
-    {
-        object->setNamespace(this);
-    }
-
-    const BaseObject* Namespace::saveObjects(unsigned int index) const
-    {
-        return 0; // todo
-    }
-
-    bool Namespace::includes(const Namespace* ns) const
-    {
-        for (std::set<NamespaceNode*>::const_iterator it1 = this->representingNamespaces_.begin(); it1 != this->representingNamespaces_.end(); ++it1)
-        {
-            for (std::set<NamespaceNode*>::const_iterator it2 = ns->representingNamespaces_.begin(); it2 != ns->representingNamespaces_.end(); ++it2)
-            {
-                if ((*it1)->includes(*it2))
-                {
-                    if (this->operator_ == "or")
-                        return true;
-
-                    if (this->operator_ == "not")
-                        return false;
-                }
-                else
-                {
-                    if (this->operator_ == "and")
-                        return false;
-                }
-            }
-        }
-
-        if (this->operator_ == "or")
-            return false;
-        else if (this->operator_ == "and")
-            return true;
-        else if (this->operator_ == "not")
-            return true;
-
-        return false;
-    }
-
-    std::string Namespace::toString() const
-    {
-        std::string output;
-
-        int i = 0;
-        for (std::set<NamespaceNode*>::const_iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); i++, ++it)
-        {
-            if (i > 0)
-                output += " / ";
-
-            output += (*it)->toString();
-        }
-
-        return output;
-    }
-
-    std::string Namespace::toString(const std::string& indentation) const
-    {
-        std::string output;
-
-        int i = 0;
-        for (std::set<NamespaceNode*>::const_iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); i++, ++it)
-        {
-            if (i > 0)
-                output += "\n";
-
-            output += (*it)->toString(indentation);
-        }
-
-        return output;
-    }
-}
Index: code/trunk/src/libraries/core/Namespace.h
===================================================================
--- code/trunk/src/libraries/core/Namespace.h	(revision 5772)
+++ 	(revision )
@@ -1,78 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Namespace_H__
-#define _Namespace_H__
-
-#include "CorePrereqs.h"
-
-#include <set>
-#include <string>
-#include "BaseObject.h"
-
-namespace orxonox
-{
-    class Namespace : public BaseObject
-    {
-        public:
-            Namespace(BaseObject* creator);
-            virtual ~Namespace();
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-
-            void loadObjects(BaseObject* object);
-            const BaseObject* saveObjects(unsigned int index) const;
-
-            void setAutogenerated(bool bAutogenerated)
-                { this->bAutogeneratedFileRootNamespace_ = bAutogenerated; }
-            bool isAutogenerated() const
-                { return this->bAutogeneratedFileRootNamespace_; }
-
-            void setOperator(const std::string& op)
-                { this->operator_ = op; }
-            const std::string& getOperator() const
-                { return this->operator_; }
-
-            void setRoot(bool bRoot)
-                { this->bRoot_ = bRoot; }
-
-            bool includes(const Namespace* ns) const;
-            bool isIncludedIn(const Namespace* ns) const { return ns->includes(this); }
-
-            std::string toString() const;
-            std::string toString(const std::string& indentation) const;
-
-        private:
-            std::set<NamespaceNode*> representingNamespaces_;
-            bool bAutogeneratedFileRootNamespace_;
-            bool bRoot_;
-            std::string operator_;
-    };
-}
-
-#endif /* _Namespace_H__ */
Index: code/trunk/src/libraries/core/NamespaceNode.cc
===================================================================
--- code/trunk/src/libraries/core/NamespaceNode.cc	(revision 5772)
+++ 	(revision )
@@ -1,174 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "NamespaceNode.h"
-#include "util/Debug.h"
-
-namespace orxonox
-{
-    NamespaceNode::NamespaceNode(const std::string& name, NamespaceNode* parent)
-    {
-        this->name_ = name;
-        this->parent_ = parent;
-        this->bRoot_ = false;
-        this->bHidden_ = false;
-    }
-
-    NamespaceNode::~NamespaceNode()
-    {
-        for (std::map<std::string, NamespaceNode*>::iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); )
-            delete ((*(it++)).second);
-    }
-
-    std::set<NamespaceNode*> NamespaceNode::getNodeRelative(const std::string& name)
-    {
-        std::set<NamespaceNode*> nodes;
-
-        if ((name.size() == 0) || (name == ""))
-        {
-            nodes.insert(this);
-        }
-        else
-        {
-            size_t pos = name.find("::");
-            std::string firstPart = name;
-            std::string secondPart;
-
-            if (pos != std::string::npos)
-            {
-                firstPart = name.substr(0, pos);
-                secondPart = name.substr(pos + 2, std::string::npos);
-            }
-
-            if (firstPart == "..")
-            {
-                if (this->bRoot_)
-                {
-                    COUT(2) << "Warning: Can't go to enclosing namespace with '..' operator in namespace " << this->name_ << ", namespace is root." << std::endl;
-                    nodes = this->getNodeRelative(secondPart);
-                }
-                else if (!this->parent_)
-                {
-                    COUT(2) << "Warning: Can't go to enclosing namespace with '..' operator in namespace " << this->name_ << ", no parent namespace set." << std::endl;
-                    nodes = this->getNodeRelative(secondPart);
-                }
-                else
-                {
-                    nodes = this->parent_->getNodeRelative(secondPart);
-                }
-            }
-            else if (name.find('@') != 0)
-            {
-                std::map<std::string, NamespaceNode*>::iterator it = this->subnodes_.find(firstPart);
-                if (it == this->subnodes_.end())
-                    it = this->subnodes_.insert(this->subnodes_.begin(), std::pair<std::string, NamespaceNode*>(firstPart, new NamespaceNode(firstPart, this)));
-
-                if ((*it).second->isHidden())
-                {
-                    COUT(2) << "Warning: Subnamespace '" << firstPart << "' in namespace '" << this->name_ << "' is hidden and can't be accessed." << std::endl;
-                    nodes.insert(this);
-                }
-                else
-                {
-                    nodes = (*it).second->getNodeRelative(secondPart);
-                }
-            }
-            else
-            {
-                bool bFoundMatchingNamespace = false;
-
-                for (std::map<std::string, NamespaceNode*>::iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
-                {
-                    if ((*it).first.find(firstPart) == ((*it).first.size() - firstPart.size()))
-                    {
-                        std::set<NamespaceNode*> temp2 = (*it).second->getNodeRelative(secondPart);
-                        nodes.insert(temp2.begin(), temp2.end());
-                        bFoundMatchingNamespace = true;
-                    }
-                }
-
-                if (!bFoundMatchingNamespace)
-                {
-                    COUT(2) << "Warning: No file included with name '" << firstPart.substr(1, std::string::npos) << "' at this part of the level file, using parent namespace instead." << std::endl;
-                    nodes = this->getNodeRelative(secondPart);
-                }
-            }
-        }
-
-        return nodes;
-    }
-
-    bool NamespaceNode::includes(const NamespaceNode* ns) const
-    {
-        if (ns == this)
-        {
-            return true;
-        }
-        else
-        {
-            for (std::map<std::string, NamespaceNode*>::const_iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
-                if ((*it).second->includes(ns))
-                    return true;
-        }
-
-        return false;
-    }
-
-    std::string NamespaceNode::toString() const
-    {
-        std::string output = this->name_;
-
-        if (this->subnodes_.size() > 0)
-        {
-            output += " (";
-
-            int i = 0;
-            for (std::map<std::string, NamespaceNode*>::const_iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); i++, ++it)
-            {
-                if (i > 0)
-                    output += ", ";
-
-                output += (*it).second->toString();
-            }
-
-            output += ")";
-        }
-
-        return output;
-    }
-
-    std::string NamespaceNode::toString(const std::string& indentation) const
-    {
-        std::string output = (indentation + this->name_ + "\n");
-
-        for (std::map<std::string, NamespaceNode*>::const_iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
-            output += (*it).second->toString(indentation + "  ");
-
-        return output;
-    }
-}
Index: code/trunk/src/libraries/core/NamespaceNode.h
===================================================================
--- code/trunk/src/libraries/core/NamespaceNode.h	(revision 5772)
+++ 	(revision )
@@ -1,68 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _NamespaceNode_H__
-#define _NamespaceNode_H__
-
-#include "CorePrereqs.h"
-
-#include <map>
-#include <set>
-#include <string>
-
-namespace orxonox
-{
-    class NamespaceNode
-    {
-        public:
-            NamespaceNode(const std::string& name, NamespaceNode* parent = 0);
-            ~NamespaceNode();
-
-            std::set<NamespaceNode*> getNodeRelative(const std::string& name);
-
-            void setRoot(bool bRoot) { this->bRoot_ = bRoot; }
-            void setHidden(bool bHidden) { this->bHidden_ = bHidden; }
-
-            bool isRoot() const { return this->bRoot_; }
-            bool isHidden() const { return this->bHidden_; }
-
-            bool includes(const NamespaceNode*) const;
-
-            std::string toString() const;
-            std::string toString(const std::string& indentation) const;
-
-        private:
-            std::string name_;
-            NamespaceNode* parent_;
-            std::map<std::string, NamespaceNode*> subnodes_;
-            bool bHidden_;
-            bool bRoot_;
-    };
-}
-
-#endif /* _NamespaceNode_H__ */
Index: code/trunk/src/libraries/core/Resource.cc
===================================================================
--- code/trunk/src/libraries/core/Resource.cc	(revision 5772)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "Resource.h"
-#include <OgreResourceGroupManager.h>
-
-namespace orxonox
-{
-    std::string Resource::DEFAULT_GROUP(Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
-
-    DataStreamPtr Resource::open(const std::string& name, const std::string& group, bool bSearchGroupsIfNotFound)
-    {
-        return Ogre::ResourceGroupManager::getSingleton().openResource(name, group, bSearchGroupsIfNotFound);
-    }
-
-    DataStreamListPtr Resource::openMulti(const std::string& pattern, const std::string& group)
-    {
-        return Ogre::ResourceGroupManager::getSingleton().openResources(pattern, group);
-    }
-
-    bool Resource::exists(const std::string& name, const std::string& group)
-    {
-        return Ogre::ResourceGroupManager::getSingleton().resourceExists(group, name);
-    }
-
-    shared_ptr<ResourceInfo> Resource::getInfo(const std::string& name, const std::string& group)
-    {
-        Ogre::FileInfoListPtr infos = Ogre::ResourceGroupManager::getSingleton().findResourceFileInfo(group, name);
-        for (std::vector<Ogre::FileInfo>::const_iterator it = infos->begin(); it != infos->end(); ++it)
-        {
-            if (it->filename == name)
-            {
-                shared_ptr<ResourceInfo> ptr(new ResourceInfo());
-                ptr->filename = name;
-                ptr->path = it->path;
-                ptr->basename = it->basename;
-                ptr->group = group;
-                ptr->size = it->uncompressedSize;
-                return ptr;
-            }
-        }
-        return shared_ptr<ResourceInfo>();
-    }
-}
Index: code/trunk/src/libraries/core/Resource.h
===================================================================
--- code/trunk/src/libraries/core/Resource.h	(revision 5772)
+++ 	(revision )
@@ -1,134 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Core_Resource_H__
-#define _Core_Resource_H__
-
-#include "CorePrereqs.h"
-
-#include <boost/shared_ptr.hpp>
-#include <OgreDataStream.h>
-
-namespace orxonox
-{
-    // Import the Ogre::DataStreamList
-    using Ogre::DataStreamList;
-    using Ogre::DataStreamListPtr;
-
-    //! Stores basic information about a Resource from Ogre
-    struct ResourceInfo
-    {
-        //! The file's fully qualified name
-        std::string filename;
-        //! Path name; separated by '/' and ending with '/'
-        std::string path;
-        //! Base filename
-        std::string basename;
-        //! Resource group the file is in
-        std::string group;
-        //! Uncompressed size
-        size_t size;
-    };
-
-    /**
-    @brief
-        Provides simple functions to easily access the Ogre::ResourceGroupManager
-    */
-    class _CoreExport Resource
-    {
-        // Docs by Ogre::ResourceGroupManager.h
-    public:
-		/**
-        @brief
-            Open a single resource by name and return a DataStream
-            pointing at the source of the data.
-        @param name
-            The name of the resource to locate.
-            Even if resource locations are added recursively, you
-            must provide a fully qualified name to this method.
-        @param groupName
-            The name of the resource group; this determines which 
-            locations are searched. 
-        @param searchGroupsIfNotFound
-            If true, if the resource is not found in 
-            the group specified, other groups will be searched.
-        @return
-            Shared pointer to data stream containing the data. Will be
-            destroyed automatically when no longer referenced.
-		*/
-        static DataStreamPtr open(const std::string& name,
-            const std::string& group = Resource::DEFAULT_GROUP,
-            bool bSearchGroupsIfNotFound = false);
-
-		/**
-        @brief
-            Open all resources matching a given pattern (which can contain
-            the character '*' as a wildcard), and return a collection of 
-            DataStream objects on them.
-        @param pattern
-            The pattern to look for. If resource locations have been
-            added recursively, subdirectories will be searched too so this
-            does not need to be fully qualified.
-        @param groupName
-            The resource group; this determines which locations
-            are searched.
-        @return
-            Shared pointer to a data stream list , will be
-            destroyed automatically when no longer referenced
-		*/
-        static DataStreamListPtr openMulti(const std::string& pattern, const std::string& group = Resource::DEFAULT_GROUP);
-
-        /**
-            Find out if the named file exists in a group. 
-        @param filename
-            Fully qualified name of the file to test for
-        @param group
-            The name of the resource group
-        */
-        static bool exists(const std::string& name, const std::string& group = Resource::DEFAULT_GROUP);
-
-        /**
-            Get struct with information about group, path and size.
-        @param filename
-            Fully qualified name of the file to test for
-        @param group
-            The name of the resource group
-        */
-        static shared_ptr<ResourceInfo> getInfo(const std::string& name, const std::string& group = Resource::DEFAULT_GROUP);
-
-        //! Name of the default resource group (usually "General")
-        static std::string DEFAULT_GROUP;
-
-    private:
-        Resource();
-        ~Resource();
-        Resource(const Resource& instance);
-    };
-}
-
-#endif /* _Core_Resource_H__ */
Index: code/trunk/src/libraries/core/Shell.cc
===================================================================
--- code/trunk/src/libraries/core/Shell.cc	(revision 5772)
+++ 	(revision )
@@ -1,397 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "Shell.h"
-
-#include "util/OutputHandler.h"
-#include "CommandExecutor.h"
-#include "CoreIncludes.h"
-#include "ConfigValueIncludes.h"
-#include "Core.h"
-#include "ConsoleCommand.h"
-
-#define SHELL_UPDATE_LISTENERS(function) \
-    for (std::list<ShellListener*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ) \
-        (*(it++))->function()
-
-namespace orxonox
-{
-    SetConsoleCommand(Shell, clearShell, true);
-    SetConsoleCommand(Shell, history, true);
-
-    SetConsoleCommandShortcut(OutputHandler, log);
-    SetConsoleCommandShortcut(OutputHandler, error);
-    SetConsoleCommandShortcut(OutputHandler, warning);
-    SetConsoleCommandShortcut(OutputHandler, info);
-    SetConsoleCommandShortcut(OutputHandler, debug);
-
-    Shell* Shell::singletonPtr_s = 0;
-
-    Shell::Shell()
-    {
-        int level = Core::getSoftDebugLevel(OutputHandler::LD_Shell);
-        Core::setSoftDebugLevel(OutputHandler::LD_Shell, -1);
-
-        RegisterRootObject(Shell);
-
-        this->scrollPosition_ = 0;
-        this->maxHistoryLength_ = 100;
-        this->historyPosition_ = 0;
-        this->historyOffset_ = 0;
-        this->finishedLastLine_ = true;
-        this->bAddOutputLevel_ = false;
-
-        this->clearLines();
-
-        this->inputBuffer_ = new InputBuffer();
-        this->configureInputBuffer();
-
-        this->outputBuffer_.registerListener(this);
-        OutputHandler::getOutStream().setOutputBuffer(&this->outputBuffer_);
-
-        // Get a config file for the command history
-        this->commandHistoryConfigFileType_ = ConfigFileManager::getInstance().getNewConfigFileType();
-        ConfigFileManager::getInstance().setFilename(this->commandHistoryConfigFileType_, "commandHistory.ini");
-
-        this->setConfigValues();
-
-        Core::setSoftDebugLevel(OutputHandler::LD_Shell, level);
-    }
-
-    Shell::~Shell()
-    {
-        OutputHandler::getOutStream().setOutputBuffer(0);
-        if (this->inputBuffer_)
-            delete this->inputBuffer_;
-    }
-
-    void Shell::setConfigValues()
-    {
-        SetConfigValueGeneric(commandHistoryConfigFileType_, maxHistoryLength_, 100)
-            .callback(this, &Shell::commandHistoryLengthChanged);
-        SetConfigValueGeneric(commandHistoryConfigFileType_, historyOffset_, 0)
-            .callback(this, &Shell::commandHistoryOffsetChanged);
-        SetConfigValueVectorGeneric(commandHistoryConfigFileType_, commandHistory_, std::vector<std::string>());
-    }
-
-    void Shell::commandHistoryOffsetChanged()
-    {
-        if (this->historyOffset_ >= this->maxHistoryLength_)
-            this->historyOffset_ = 0;
-    }
-
-    void Shell::commandHistoryLengthChanged()
-    {
-        this->commandHistoryOffsetChanged();
-
-        while (this->commandHistory_.size() > this->maxHistoryLength_)
-        {
-            unsigned int index = this->commandHistory_.size() - 1;
-            this->commandHistory_.erase(this->commandHistory_.begin() + index);
-            ModifyConfigValue(commandHistory_, remove, index);
-        }
-    }
-
-    void Shell::configureInputBuffer()
-    {
-        this->inputBuffer_->registerListener(this, &Shell::inputChanged, true);
-        this->inputBuffer_->registerListener(this, &Shell::execute, '\r', false);
-        this->inputBuffer_->registerListener(this, &Shell::hintandcomplete, '\t', true);
-        this->inputBuffer_->registerListener(this, &Shell::backspace, '\b', true);
-        this->inputBuffer_->registerListener(this, &Shell::deletechar, KeyCode::Delete);
-        this->inputBuffer_->registerListener(this, &Shell::exit, static_cast<char>(27), true);
-        this->inputBuffer_->registerListener(this, &Shell::cursor_right, KeyCode::Right);
-        this->inputBuffer_->registerListener(this, &Shell::cursor_left, KeyCode::Left);
-        this->inputBuffer_->registerListener(this, &Shell::cursor_end, KeyCode::End);
-        this->inputBuffer_->registerListener(this, &Shell::cursor_home, KeyCode::Home);
-        this->inputBuffer_->registerListener(this, &Shell::history_up, KeyCode::Up);
-        this->inputBuffer_->registerListener(this, &Shell::history_down, KeyCode::Down);
-        this->inputBuffer_->registerListener(this, &Shell::scroll_up, KeyCode::PageUp);
-        this->inputBuffer_->registerListener(this, &Shell::scroll_down, KeyCode::PageDown);
-    }
-
-    void Shell::clearShell()
-    {
-        Shell::getInstance().clearLines();
-    }
-
-    void Shell::history()
-    {
-        Shell& instance = Shell::getInstance();
-
-        for (unsigned int i = instance.historyOffset_; i < instance.commandHistory_.size(); ++i)
-            instance.addLine(instance.commandHistory_[i], -1);
-        for (unsigned int i =  0; i < instance.historyOffset_; ++i)
-            instance.addLine(instance.commandHistory_[i], -1);
-    }
-
-    void Shell::registerListener(ShellListener* listener)
-    {
-        this->listeners_.insert(this->listeners_.end(), listener);
-    }
-
-    void Shell::unregisterListener(ShellListener* listener)
-    {
-        for (std::list<ShellListener*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); )
-        {
-            if ((*it) == listener)
-                this->listeners_.erase(it++);
-            else
-                ++it;
-        }
-    }
-
-    void Shell::setCursorPosition(unsigned int cursor)
-    {
-        this->inputBuffer_->setCursorPosition(cursor);
-        SHELL_UPDATE_LISTENERS(cursorChanged);
-    }
-
-    void Shell::setInput(const std::string& input)
-    {
-        this->inputBuffer_->set(input);
-        this->inputChanged();
-    }
-
-    void Shell::addLine(const std::string& line, int level)
-    {
-        int original_level = OutputHandler::getOutStream().getOutputLevel();
-        OutputHandler::getOutStream().setOutputLevel(level);
-
-        if (!this->finishedLastLine_)
-            this->outputBuffer_ << std::endl;
-
-        this->outputBuffer_ << line << std::endl;
-        OutputHandler::getOutStream().setOutputLevel(original_level);
-    }
-
-    void Shell::clearLines()
-    {
-        this->lines_.clear();
-        this->scrollIterator_ = this->lines_.begin();
-
-        this->scrollPosition_ = 0;
-        this->finishedLastLine_ = true;
-
-        SHELL_UPDATE_LISTENERS(linesChanged);
-    }
-
-    std::list<std::string>::const_iterator Shell::getNewestLineIterator() const
-    {
-        if (this->scrollPosition_)
-            return this->scrollIterator_;
-        else
-            return this->lines_.begin();
-    }
-
-    std::list<std::string>::const_iterator Shell::getEndIterator() const
-    {
-        return this->lines_.end();
-    }
-
-    void Shell::addToHistory(const std::string& command)
-    {
-        ModifyConfigValue(commandHistory_, set, this->historyOffset_, command);
-        this->historyPosition_ = 0;
-        ModifyConfigValue(historyOffset_, set, (this->historyOffset_ + 1) % this->maxHistoryLength_);
-    }
-
-    std::string Shell::getFromHistory() const
-    {
-        unsigned int index = mod(static_cast<int>(this->historyOffset_) - static_cast<int>(this->historyPosition_), this->maxHistoryLength_);
-        if (index < this->commandHistory_.size() && this->historyPosition_ != 0)
-            return this->commandHistory_[index];
-        else
-            return "";
-    }
-
-    void Shell::outputChanged()
-    {
-        std::string output;
-        bool newline;
-        do
-        {
-            newline = this->outputBuffer_.getLine(&output);
-
-            if (!newline && output == "")
-                break;
-
-            if (this->finishedLastLine_)
-            {
-                if (this->bAddOutputLevel_)
-                    output.insert(0, 1, static_cast<char>(OutputHandler::getOutStream().getOutputLevel()));
-
-                this->lines_.insert(this->lines_.begin(), output);
-
-                if (this->scrollPosition_)
-                    this->scrollPosition_++;
-                else
-                    this->scrollIterator_ = this->lines_.begin();
-
-                this->finishedLastLine_ = newline;
-
-                if (!this->scrollPosition_)
-                {
-                    SHELL_UPDATE_LISTENERS(lineAdded);
-                }
-            }
-            else
-            {
-                (*this->lines_.begin()) += output;
-                this->finishedLastLine_ = newline;
-                SHELL_UPDATE_LISTENERS(onlyLastLineChanged);
-            }
-
-        } while (newline);
-    }
-
-    void Shell::inputChanged()
-    {
-        SHELL_UPDATE_LISTENERS(inputChanged);
-        SHELL_UPDATE_LISTENERS(cursorChanged);
-    }
-
-    void Shell::execute()
-    {
-        this->addToHistory(this->inputBuffer_->get());
-        this->addLine(this->inputBuffer_->get(), 0);
-
-        if (!CommandExecutor::execute(this->inputBuffer_->get()))
-            this->addLine("Error: Can't execute \"" + this->inputBuffer_->get() + "\".", 1);
-
-        this->clear();
-    }
-
-    void Shell::hintandcomplete()
-    {
-        this->inputBuffer_->set(CommandExecutor::complete(this->inputBuffer_->get()));
-        this->addLine(CommandExecutor::hint(this->inputBuffer_->get()), -1);
-
-        this->inputChanged();
-    }
-
-    void Shell::backspace()
-    {
-        this->inputBuffer_->removeBehindCursor();
-        SHELL_UPDATE_LISTENERS(inputChanged);
-        SHELL_UPDATE_LISTENERS(cursorChanged);
-    }
-
-    void Shell::deletechar()
-    {
-        this->inputBuffer_->removeAtCursor();
-        SHELL_UPDATE_LISTENERS(inputChanged);
-    }
-
-    void Shell::clear()
-    {
-        this->inputBuffer_->clear();
-        this->historyPosition_ = 0;
-        SHELL_UPDATE_LISTENERS(inputChanged);
-        SHELL_UPDATE_LISTENERS(cursorChanged);
-    }
-
-    void Shell::cursor_right()
-    {
-        this->inputBuffer_->increaseCursor();
-        SHELL_UPDATE_LISTENERS(cursorChanged);
-    }
-
-    void Shell::cursor_left()
-    {
-        this->inputBuffer_->decreaseCursor();
-        SHELL_UPDATE_LISTENERS(cursorChanged);
-    }
-
-    void Shell::cursor_end()
-    {
-        this->inputBuffer_->setCursorToEnd();
-        SHELL_UPDATE_LISTENERS(cursorChanged);
-    }
-
-    void Shell::cursor_home()
-    {
-        this->inputBuffer_->setCursorToBegin();
-        SHELL_UPDATE_LISTENERS(cursorChanged);
-    }
-
-    void Shell::history_up()
-    {
-        if (this->historyPosition_ < this->commandHistory_.size())
-        {
-            this->historyPosition_++;
-            this->inputBuffer_->set(this->getFromHistory());
-        }
-    }
-
-    void Shell::history_down()
-    {
-        if (this->historyPosition_ > 0)
-        {
-            this->historyPosition_--;
-            this->inputBuffer_->set(this->getFromHistory());
-        }
-    }
-
-    void Shell::scroll_up()
-    {
-        if (this->scrollIterator_ != this->lines_.end())
-        {
-            ++this->scrollIterator_;
-            ++this->scrollPosition_;
-
-            SHELL_UPDATE_LISTENERS(linesChanged);
-        }
-    }
-
-    void Shell::scroll_down()
-    {
-        if (this->scrollIterator_ != this->lines_.begin())
-        {
-            --this->scrollIterator_;
-            --this->scrollPosition_;
-
-            SHELL_UPDATE_LISTENERS(linesChanged);
-        }
-    }
-
-    void Shell::exit()
-    {
-        if (this->inputBuffer_->getSize() > 0)
-        {
-            this->clear();
-            return;
-        }
-
-        this->clear();
-        this->scrollPosition_ = 0;
-        this->scrollIterator_ = this->lines_.begin();
-
-        SHELL_UPDATE_LISTENERS(exit);
-    }
-}
Index: code/trunk/src/libraries/core/Shell.h
===================================================================
--- code/trunk/src/libraries/core/Shell.h	(revision 5772)
+++ 	(revision )
@@ -1,153 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Shell_H__
-#define _Shell_H__
-
-#include "CorePrereqs.h"
-
-#include <cassert>
-#include <list>
-#include <string>
-#include <vector>
-
-#include "util/OutputBuffer.h"
-#include "input/InputBuffer.h"
-#include "OrxonoxClass.h"
-#include "ConfigFileManager.h"
-
-namespace orxonox
-{
-    class _CoreExport ShellListener
-    {
-        friend class Shell;
-
-        public:
-            virtual ~ShellListener() {}
-
-        private:
-            virtual void linesChanged() {}
-            virtual void onlyLastLineChanged() {}
-            virtual void lineAdded() {}
-            virtual void inputChanged() {}
-            virtual void cursorChanged() {}
-            virtual void exit() {}
-    };
-
-    class _CoreExport Shell : public Singleton<Shell>, virtual public OrxonoxClass, public OutputBufferListener
-    {
-        friend class Singleton<Shell>;
-        public:
-            Shell();
-            virtual ~Shell();
-
-            static void clearShell();
-            static void history();
-
-            virtual void setConfigValues();
-            void commandHistoryOffsetChanged();
-            void commandHistoryLengthChanged();
-
-            void registerListener(ShellListener* listener);
-            void unregisterListener(ShellListener* listener);
-
-            inline InputBuffer* getInputBuffer()
-                { return this->inputBuffer_; }
-            inline OutputBuffer& getOutputBuffer()
-                { return this->outputBuffer_; }
-
-            void setCursorPosition(unsigned int cursor);
-            inline unsigned int getCursorPosition() const
-                { return this->inputBuffer_->getCursorPosition(); }
-
-            void setInput(const std::string& input);
-
-            inline void clearInput()
-                { this->setInput(""); }
-            inline std::string getInput() const
-                { return this->inputBuffer_->get(); }
-
-            std::list<std::string>::const_iterator getNewestLineIterator() const;
-            std::list<std::string>::const_iterator getEndIterator() const;
-
-            void addLine(const std::string& line, int level = 0);
-            void clearLines();
-
-            inline unsigned int getNumLines() const
-                { return this->lines_.size(); }
-            inline unsigned int getScrollPosition() const
-                { return this->scrollPosition_; }
-
-            inline void addOutputLevel(bool bAddOutputLevel)
-                { this->bAddOutputLevel_ = bAddOutputLevel; }
-
-        private:
-            Shell(const Shell& other);
-
-            void configureInputBuffer();
-
-            void addToHistory(const std::string& command);
-            std::string getFromHistory() const;
-
-            virtual void outputChanged();
-            void inputChanged();
-            void execute();
-            void hintandcomplete();
-            void backspace();
-            void deletechar();
-            void clear();
-            void cursor_right();
-            void cursor_left();
-            void cursor_end();
-            void cursor_home();
-            void history_up();
-            void history_down();
-            void scroll_up();
-            void scroll_down();
-            void exit();
-
-            std::list<ShellListener*> listeners_;
-            InputBuffer* inputBuffer_;
-            OutputBuffer outputBuffer_;
-            bool finishedLastLine_;
-            std::list<std::string> lines_;
-            std::list<std::string>::const_iterator scrollIterator_;
-            unsigned int scrollPosition_;
-            std::vector<std::string> commandHistory_;
-            unsigned int maxHistoryLength_;
-            unsigned int historyPosition_;
-            unsigned int historyOffset_;
-            bool bAddOutputLevel_;
-
-            ConfigFileType commandHistoryConfigFileType_;
-
-            static Shell* singletonPtr_s;
-    };
-}
-
-#endif /* _Shell_H__ */
Index: code/trunk/src/libraries/core/Super.h
===================================================================
--- code/trunk/src/libraries/core/Super.h	(revision 5772)
+++ 	(revision )
@@ -1,585 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Definition of all super-function related macros.
-
-    This file defines all macros needed to add a new "super-function".
-    If you add a super-function, you can call SUPER(myclass, functionname) inside your
-    code and the function of the parentclass gets called. This is comparable with
-    super.functionname() in Java or other languages.
-
-    This works only with virtual functions that return nothing (void) and belong to
-    classes that have an Identifier. Arguments however are supported.
-
-    To add a new super-function, you have process 4 steps:
-
-    1) Add a new SUPER macro
-       This allows you to call the super-function in your code.
-       Location: This file (Super.h), marked with --> HERE <-- comments (1/3)
-
-    2) Call the SUPER_FUNCTION_GLOBAL_DECLARATION_PART1/2 macros.
-       This defines some global classes and templates, needed to create and call the super-functions.
-       Location: This file (Super.h), marked with --> HERE <-- comments (2/3)
-
-    3) Call the SUPER_INTRUSIVE_DECLARATION macro.
-       This will be included into the declaration of ClassIdentifier<T>.
-       Location: This file (Super.h), marked with --> HERE <-- comments (3/3)
-
-    4) Call the SUPER_FUNCTION macro.
-       This defines a partially specialized template that will decide if a class is "super" to another class.
-       If the check returns true, a SuperFunctionCaller gets created, which will be used by the SUPER macro.
-       You have to add this into the header-file of the baseclass of the super-function (the class that first
-       implements the function), below the class declaration. You can't call it directly in this file, because
-       otherwise you had to include the headerfile right here, which would cause some ugly backdependencies,
-       include loops and slower compilation.
-       Dont forget to include Super.h in the header-file.
-       Location: The header-file of the baseclass (Baseclass.h), below the class declaration
-*/
-
-#ifndef _Super_H__
-#define _Super_H__
-
-#include "CorePrereqs.h"
-
-#include "util/Debug.h"
-#include "Event.h"
-
-///////////////////////
-// Macro definitions //
-///////////////////////
-
-//// Common macros ////
-
-    /**
-        @brief Declares a new super-function by creating a specialized template. Add this below the class declaration of the baseclass.
-        @param functionnumber Each super-function needs a unique number, starting with zero, increasing by one
-        @param baseclass The baseclass of the super-function (~the root)
-        @param functionname The name of the super-function
-        @param purevirtualbase "true" if the function is pure virtual in the baseclass, "false" if the function is implemented (without "")
-    */
-    #define SUPER_FUNCTION(functionnumber, baseclass, functionname, purevirtualbase) \
-        template <class T, int templatehack2> \
-        struct SuperFunctionCondition<functionnumber, T, 0, templatehack2> \
-        { \
-            static void check() \
-            { \
-                SuperFunctionCondition<functionnumber, T, 0, templatehack2>::apply(static_cast<T*>(0)); \
-                SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::check(); \
-            } \
-            \
-            static void apply(void* temp) {} \
-            \
-            static void apply(baseclass* temp) \
-            { \
-                ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier(); \
-                for (std::set<const Identifier*>::iterator it = identifier->getDirectChildrenIntern().begin(); it != identifier->getDirectChildrenIntern().end(); ++it) \
-                { \
-                    if (((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_##functionname##_isFallback_ && ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_) \
-                    { \
-                        delete ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_; \
-                        ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = 0; \
-                        ((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_##functionname##_isFallback_ = false; \
-                    } \
-                    \
-                    if (!((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_) \
-                    { \
-                        COUT(5) << "Added SuperFunctionCaller for " << #functionname << ": " << ClassIdentifier<T>::getIdentifier()->getName() << " <- " << ((ClassIdentifier<T>*)(*it))->getName() << std::endl; \
-                        ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_##functionname <T>; \
-                    } \
-                } \
-            } \
-        }; \
-        \
-        SUPER_FUNCTION_PUREVIRTUAL_WORKAROUND##purevirtualbase(functionnumber, baseclass)
-
-    #define SUPER_FUNCTION_PUREVIRTUAL_WORKAROUND0(functionnumber, baseclass) SUPER_FUNCTION_PUREVIRTUAL_WORKAROUNDfalse(functionnumber, baseclass)
-    #define SUPER_FUNCTION_PUREVIRTUAL_WORKAROUND1(functionnumber, baseclass) SUPER_FUNCTION_PUREVIRTUAL_WORKAROUNDtrue(functionnumber, baseclass)
-    #define SUPER_FUNCTION_PUREVIRTUAL_WORKAROUNDfalse(functionnumber, baseclass)
-    #define SUPER_FUNCTION_PUREVIRTUAL_WORKAROUNDtrue(functionnumber, baseclass) \
-        template <int templatehack2> \
-        struct SuperFunctionCondition<functionnumber, baseclass, 0, templatehack2> \
-        { \
-            static void check() \
-            { \
-                SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::check(); \
-            } \
-        };
-
-
-    /*
-    //// Comments about the macro ////
-
-        // Partially specialized template (templatehack is now specialized too).
-        //
-        // This ensures the compiler takes THIS template if the header-file of the super-function
-        // is included. In any other case, the compiler just uses the fallback template which is
-        // defined in this file.
-        template <class T, templatehack2>
-        struct SuperFunctionCondition<functionnumber, T, 0, templatehack2>
-        {
-            static void check()
-            {
-                // This call to the apply-function is the whole check. By calling the function with
-                // a T* pointer, the right function get's called.
-                SuperFunctionCondition<functionnumber, T, 0, templatehack2>::apply(static_cast<T*>(0));
-
-                // Go go the check for of next super-function (functionnumber + 1)
-                SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::check();
-            }
-
-            // This function gets called if T is not a child of the baseclass.
-            // The function does nothing.
-            static void apply(void* temp) {}
-
-            // This function gets called if T is a child of the baseclass and can therefore be converted.
-            // The function adds a SuperFunctionCaller to the Identifier of all subclasses of T.
-            static void apply(baseclass* temp)
-            {
-                ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier();
-
-                // Iterate through all children
-                for (std::set<const Identifier*>::iterator it = identifier->getDirectChildrenIntern().begin(); it != identifier->getDirectChildrenIntern().end(); ++it)
-                {
-                    // Check if the caller is a fallback-caller
-                    if (((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_##functionname##_isFallback_ && ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_)
-                    {
-                        // Delete the fallback caller an prepare to get a real caller
-                        delete ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_;
-                        ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = 0;
-                        ((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_##functionname##_isFallback_ = false;
-                    }
-
-                    // Check if there's not already a caller
-                    if (!((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_)
-                    {
-                        // Add the SuperFunctionCaller
-                        COUT(5) << "adding functionpointer to " << ((ClassIdentifier<T>*)(*it))->getName() << std::endl;
-                        ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_##functionname <T>;
-                    }
-                }
-            }
-        };
-        SUPER_FUNCTION_PUREVIRTUAL_WORKAROUND##purevirtualbase
-
-
-        // The following piece of code is only added if purevirtualbase = true
-
-        // Explicit specialization of the Condition template for the baseclass to avoid
-        // errors if the function is pure virtual in the baseclass.
-        template <int templatehack2> \
-        struct SuperFunctionCondition<functionnumber, baseclass, 0, templatehack2> \
-        { \
-            // The check function acts like the fallback - it advances to the check for the next super-function (functionnumber + 1)
-            static void check() \
-            { \
-                SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::check(); \
-            } \
-        };
-    */
-
-    // SUPER-macro: Calls Parent::functionname() where Parent is the direct parent of classname
-    #ifdef ORXONOX_COMPILER_MSVC
-        #define SUPER(classname, functionname, ...) \
-            __super::functionname(__VA_ARGS__)
-    #else
-        #define SUPER(classname, functionname, ...) \
-            SUPER_##functionname(classname, functionname, __VA_ARGS__)
-    #endif
-
-    // helper macro: for functions without arguments
-    #define SUPER_NOARGS(classname, functionname) \
-        (*ClassIdentifier<classname>::getIdentifier()->superFunctionCaller_##functionname##_)(this)
-
-    // helper macro: for functions with arguments
-    #define SUPER_ARGS(classname, functionname, ...) \
-        (*ClassIdentifier<classname>::getIdentifier()->superFunctionCaller_##functionname##_)(this, __VA_ARGS__)
-
-
-//// Function-specific macros ////
-
-    /*
-        Add a macro for each super-function
-
-        Example (no arguments):
-        #define SUPER_myfunction(classname, functionname, ...) \
-            SUPER_NOARGS(classname, functionname)
-
-        Example (with arguments):
-        #define SUPER_myfunction(classname, functionname, ...) \
-            SUPER_ARGS(classname, functionname, __VA_ARGS__)
-    */
-
-    // (1/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
-    #define SUPER_XMLPort(classname, functionname, ...) \
-        SUPER_ARGS(classname, functionname, __VA_ARGS__)
-
-    #define SUPER_tick(classname, functionname, ...) \
-        SUPER_ARGS(classname, functionname, __VA_ARGS__)
-
-    #define SUPER_changedActivity(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    #define SUPER_changedVisibility(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    #define SUPER_processEvent(classname, functionname, ...) \
-        SUPER_ARGS(classname, functionname, __VA_ARGS__)
-
-    #define SUPER_changedScale(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    #define SUPER_changedMainState(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    #define SUPER_changedOwner(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    #define SUPER_changedOverlayGroup(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    #define SUPER_changedName(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-
-    #define SUPER_changedGametype(classname, functionname, ...) \
-        SUPER_NOARGS(classname, functionname)
-    // (1/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
-
-
-namespace orxonox
-{
-    /////////////////////////////////////////////////////////////////////////////////////////////////////
-    // This code gets included by Identifier.h and every other header file that needs a super-function //
-    /////////////////////////////////////////////////////////////////////////////////////////////////////
-
-    //// Common code ////
-
-        // Base templates
-        /**
-            @brief Creates the SuperFunctionCaller if T is a child of the super-functions baseclass.
-        */
-        template <int functionnumber, class T, int templatehack1, int templatehack2>
-        struct SuperFunctionCondition
-        {
-            static void check() {}
-        };
-
-        /**
-            @brief Initializes the SuperFunctionCaller-pointer with zero.
-        */
-        template <int functionnumber, class T>
-        struct SuperFunctionInitialization
-        {
-            static void initialize(ClassIdentifier<T>* identifier) {}
-        };
-
-        /**
-            @brief Deletes the SuperFunctionCaller.
-        */
-        template <int functionnumber, class T>
-        struct SuperFunctionDestruction
-        {
-            static void destroy(ClassIdentifier<T>* identifier) {}
-        };
-
-
-    //// Function-specific code ////
-
-        /**
-            @brief Creates the needed objects and templates to call a super-function.
-            @param functionnumber Each super-function needs a unique number, starting with zero, increasing by one
-            @param functionname The name of the super-function
-            @param hasarguments "false" if the function doesn't take any arguments, "true" if it does (without "")
-            @param ... Variadic: If the function takes arguments, add them here with type and name. Example: int myvalue, float myothervalue
-        */
-        #define SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(functionnumber, functionname, hasarguments, ...) \
-            template <class T, int templatehack1, int templatehack2> \
-            struct SuperFunctionCondition<functionnumber, T, templatehack1, templatehack2> \
-            { \
-                static void check() \
-                { \
-                    SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::check(); \
-                } \
-            }; \
-            \
-            class _CoreExport SuperFunctionCaller_##functionname \
-            { \
-                public: \
-                    virtual void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) = 0; \
-                    virtual ~SuperFunctionCaller_##functionname () {} \
-            }; \
-            \
-            template <class T> \
-            class SuperFunctionClassCaller_purevirtualfallback_##functionname : public SuperFunctionCaller_##functionname \
-            { \
-                public: \
-                    inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) \
-                    { \
-                    } \
-            }; \
-            \
-            template <class T> \
-            struct SuperFunctionInitialization<functionnumber, T> \
-            { \
-                static void initialize(ClassIdentifier<T>* identifier) \
-                { \
-                    identifier->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_purevirtualfallback_##functionname <T>; \
-                    identifier->bSuperFunctionCaller_##functionname##_isFallback_ = true; \
-                    SuperFunctionInitialization<functionnumber + 1, T>::initialize(identifier); \
-                } \
-            }; \
-            \
-            template <class T> \
-            struct SuperFunctionDestruction<functionnumber, T> \
-            { \
-                static void destroy(ClassIdentifier<T>* identifier) \
-                { \
-                    if (identifier->superFunctionCaller_##functionname##_) \
-                        delete identifier->superFunctionCaller_##functionname##_; \
-                    SuperFunctionDestruction<functionnumber + 1, T>::destroy(identifier); \
-                } \
-            }; \
-            \
-            template <class T> \
-            class SuperFunctionClassCaller_##functionname : public SuperFunctionCaller_##functionname \
-            { \
-                public: \
-                    inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) \
-                    { \
-                        (dynamic_cast<T*>(object))->T:: functionname
-
-        /*
-            JUST ADD THE FUNCTION ARGUMENTS BETWEEN BOTH MACROS, ENCLOSED BY BRACKETS
-            EXAMPLE:
-
-              SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(0, myfunction, true, int myvalue, float myothervalue) <-- !!! DONT ADD A SEMICOLON HERE !!!
-                (myvalue, myothervalue)
-              SUPER_FUNCTION_GLOBAL_DECLARATION_PART2
-        */
-
-        #define SUPER_FUNCTION_GLOBAL_DECLARATION_PART2 \
-                                                        ; \
-                    } \
-            };
-
-        #define SUPER_CALL_ARGUMENTSfalse(...) OrxonoxClass* object
-        #define SUPER_CALL_ARGUMENTS0(...)     OrxonoxClass* object
-        #define SUPER_CALL_ARGUMENTStrue(...) OrxonoxClass* object, __VA_ARGS__
-        #define SUPER_CALL_ARGUMENTS1(...)    OrxonoxClass* object, __VA_ARGS__
-
-
-    /*
-    //// COMMENTS ABOUT THE MACRO ////
-
-        // Partially specialized template (templatehack not yet specialized, this
-        // will be done by the real condition in the header-file of the super-function)
-        // Only used as fallback
-        template <class T, int templatehack1, int templatehack2>
-        struct SuperFunctionCondition<functionnumber, T, templatehack1, templatehack2>
-        {
-            // If this function gets called, the header-file of the super function is not
-            // included, so this fallback template (templatehack not specialized) is used
-            static void check()
-            {
-                // Calls the condition-check of the next super-function (functionnumber + 1)
-                SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::check();
-            }
-        };
-
-        // Baseclass of the super-function caller. The real call will be done by a
-        // templatized subclass through the virtual () operator.
-        class _CoreExport SuperFunctionCaller_##functionname
-        {
-            public:
-                virtual void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) = 0;
-                virtual ~SuperFunctionCaller_##functionname () {}
-        };
-
-        // Fallback if the base is pure virtual
-        template <class T>
-        class SuperFunctionClassCaller_purevirtualfallback_##functionname : public SuperFunctionCaller_##functionname
-        {
-            public:
-                // Fallback does nothing
-                inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) )
-                {
-                }
-        };
-
-        // Initializes the SuperFunctionCaller-pointer with a fallback caller in case the base function is pure virtual
-        template <class T>
-        struct SuperFunctionInitialization<functionnumber, T>
-        {
-            static void initialize(ClassIdentifier<T>* identifier)
-            {
-                identifier->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_purevirtualfallback_##functionname <T>;
-                identifier->bSuperFunctionCaller_##functionname##_isFallback_ = true;
-
-                // Calls the initialization of the next super-function (functionnumber + 1)
-                SuperFunctionInitialization<functionnumber + 1, T>::initialize(identifier);
-            }
-        };
-
-        // Deletes the SuperFunctionCaller.
-        template <class T>
-        struct SuperFunctionDestruction<functionnumber, T>
-        {
-            static void destroy(ClassIdentifier<T>* identifier)
-            {
-                if (identifier->superFunctionCaller_##functionname##_)
-                    delete identifier->superFunctionCaller_##functionname##_;
-
-                // Calls the destruction of the next super-function (functionnumber + 1)
-                SuperFunctionDestruction<functionnumber + 1, T>::destroy(identifier);
-            }
-        };
-
-        // The real super-function caller: Calls T::functionname()
-        // T should be the parent, but this will be done by the spezialized condition template
-        template <class T>
-        class SuperFunctionClassCaller_##functionname : public SuperFunctionCaller_##functionname
-        {
-            public:
-                // @brief Calls the function.
-                // @param object The object to call the function on
-                // @param ... The arguments of the function
-                inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) )
-                {
-                    (dynamic_cast<T*>(object))->T:: functionname ( Call the function with it's arguments );
-                }
-        }
-    */
-
-
-    //// Execute the code for each super-function ////
-
-        // (2/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(0, XMLPort, true, Element& xmlelement, XMLPort::Mode mode)
-            (xmlelement, mode)
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(1, tick, true, float dt)
-            (dt)
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(2, changedActivity, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(3, changedVisibility, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(4, processEvent, true, Event& event)
-            (event)
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(5, changedScale, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(6, changedMainState, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(7, changedOwner, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(8, changedOverlayGroup, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(9, changedName, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(10, changedGametype, false)
-            ()
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
-        // (2/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
-
-}
-
-#else /* _Super_H__ */
-  #ifdef SUPER_INTRUSIVE_DECLARATION_INCLUDE
-
-//////////////////////////////////////////////////////////////////////////
-// This code gets included within the declaration of ClassIdentifier<T> //
-//////////////////////////////////////////////////////////////////////////
-
-//// Common code ////
-
-    private:
-
-        template <int functionnumber, class TT, int templatehack1, int templatehack2>
-        friend struct SuperFunctionCondition;
-
-        // Creates the super-function-callers by calling the first SuperFunctionCondition check
-        // This get's called within the initialization of an Identifier
-        virtual void createSuperFunctionCaller() const
-        {
-            SuperFunctionCondition<0, T, 0, 0>::check();
-        }
-
-
-//// Function-specific code ////
-
-    public:
-        /**
-            @brief Adds a pointer to the SuperFunctionCaller as a member of ClassIdentifier.
-            @param functionname The name of the super-function
-        */
-        #ifndef SUPER_INTRUSIVE_DECLARATION
-          #define SUPER_INTRUSIVE_DECLARATION(functionname) \
-            SuperFunctionCaller_##functionname * superFunctionCaller_##functionname##_; \
-            bool bSuperFunctionCaller_##functionname##_isFallback_
-        #endif
-
-
-//// Execute the code for each super-function ////
-
-    // (3/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
-    SUPER_INTRUSIVE_DECLARATION(XMLPort);
-    SUPER_INTRUSIVE_DECLARATION(tick);
-    SUPER_INTRUSIVE_DECLARATION(changedActivity);
-    SUPER_INTRUSIVE_DECLARATION(changedVisibility);
-    SUPER_INTRUSIVE_DECLARATION(processEvent);
-    SUPER_INTRUSIVE_DECLARATION(changedScale);
-    SUPER_INTRUSIVE_DECLARATION(changedMainState);
-    SUPER_INTRUSIVE_DECLARATION(changedOwner);
-    SUPER_INTRUSIVE_DECLARATION(changedOverlayGroup);
-    SUPER_INTRUSIVE_DECLARATION(changedName);
-    SUPER_INTRUSIVE_DECLARATION(changedGametype);
-    // (3/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
-
-
-    #undef SUPER_INTRUSIVE_DECLARATION_INCLUDE
-  #endif /* SUPER_INTRUSIVE_DECLARATION_INCLUDE */
-#endif /* _Super_H__ */
Index: code/trunk/src/libraries/core/TclBind.cc
===================================================================
--- code/trunk/src/libraries/core/TclBind.cc	(revision 5772)
+++ 	(revision )
@@ -1,203 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "TclBind.h"
-
-#include <exception>
-#include <string>
-#include <cpptcl/cpptcl.h>
-
-#include "SpecialConfig.h"
-#include "util/Debug.h"
-#include "util/Exception.h"
-#include "util/StringUtils.h"
-#include "CommandExecutor.h"
-#include "ConsoleCommand.h"
-#include "Core.h"
-#include "TclThreadManager.h"
-
-namespace orxonox
-{
-    SetConsoleCommandShortcut(TclBind, tcl);
-    SetConsoleCommandShortcut(TclBind, bgerror);
-
-    TclBind* TclBind::singletonPtr_s = 0;
-
-    TclBind::TclBind(const std::string& datapath)
-    {
-        this->interpreter_ = 0;
-        this->bSetTclDataPath_ = false;
-        this->setDataPath(datapath);
-    }
-
-    TclBind::~TclBind()
-    {
-        if (this->interpreter_)
-            delete this->interpreter_;
-    }
-
-    void TclBind::setDataPath(const std::string& datapath)
-    {
-        // String has POSIX slashes
-        this->tclDataPath_ = datapath + "tcl" + '/';
-        this->bSetTclDataPath_ = true;
-
-        this->initializeTclInterpreter();
-    }
-
-    void TclBind::initializeTclInterpreter()
-    {
-        if (this->bSetTclDataPath_ && !this->interpreter_)
-        {
-            this->interpreter_ = this->createTclInterpreter();
-
-            this->interpreter_->def("::orxonox::query", TclBind::tcl_query, Tcl::variadic());
-            this->interpreter_->def("::orxonox::crossquery", TclThreadManager::tcl_crossquery, Tcl::variadic());
-            this->interpreter_->def("execute", TclBind::tcl_execute, Tcl::variadic());
-            this->interpreter_->def("::orxonox::crossexecute", TclThreadManager::tcl_crossexecute, Tcl::variadic());
-
-            try
-            {
-                this->interpreter_->eval("proc query        {args}    { ::orxonox::query $args }");
-                this->interpreter_->eval("proc crossquery   {id args} { ::orxonox::crossquery 0 $id $args }");
-                this->interpreter_->eval("proc crossexecute {id args} { ::orxonox::crossquery 0 $id $args }");
-                this->interpreter_->eval("proc running      {}        { return 1 }");
-                this->interpreter_->eval("set id 0");
-                this->interpreter_->eval("rename exit ::tcl::exit; proc exit {} { execute exit }");
-            }
-            catch (Tcl::tcl_error const &e)
-            {   COUT(1) << "Tcl error while creating Tcl-interpreter: " << e.what() << std::endl;   }
-            catch (...)
-            {   COUT(1) << "Error while creating Tcl-interpreter: " << Exception::handleMessage() << std::endl;   }
-        }
-    }
-
-    Tcl::interpreter* TclBind::createTclInterpreter()
-    {
-        Tcl::interpreter* interpreter = new Tcl::interpreter();
-        std::string libpath = TclBind::getTclLibraryPath();
-
-        try
-        {
-            if (libpath != "")
-                interpreter->eval("set tcl_library \"" + libpath + "\"");
-
-            Tcl_Init(interpreter->get());
-
-            interpreter->eval("source \"" + TclBind::getInstance().tclDataPath_ + "/init.tcl\"");
-        }
-        catch (Tcl::tcl_error const &e)
-        {   COUT(1) << "Tcl error while creating Tcl-interpreter: " << e.what() << std::endl; COUT(1) << "Error: Tcl isn't properly initialized. Orxonox might possibly not work like that." << std::endl;   }
-        catch (...)
-        {   COUT(1) << "Error while creating Tcl-interpreter: " << Exception::handleMessage() << std::endl; COUT(1) << "Error: Tcl isn't properly initialized. Orxonox might possibly not work like that." << std::endl;   }
-
-        return interpreter;
-    }
-
-    std::string TclBind::getTclLibraryPath()
-    {
-#ifdef DEPENDENCY_PACKAGE_ENABLE
-        if (Core::isDevelopmentRun())
-            return (std::string(specialConfig::dependencyLibraryDirectory) + "/tcl");
-        else
-            return (Core::getRootPathString() + "lib/tcl");
-#else
-        return "";
-#endif
-    }
-
-    std::string TclBind::tcl_query(Tcl::object const &args)
-    {
-        COUT(4) << "Tcl_query: " << args.get() << std::endl;
-
-        std::string command = stripEnclosingBraces(args.get());
-
-        if (!CommandExecutor::execute(command, false))
-        {
-            COUT(1) << "Error: Can't execute command \"" << command << "\"!" << std::endl;
-        }
-
-        if (CommandExecutor::getLastEvaluation().hasReturnvalue())
-            return CommandExecutor::getLastEvaluation().getReturnvalue().getString();
-
-        return "";
-    }
-
-    void TclBind::tcl_execute(Tcl::object const &args)
-    {
-        COUT(4) << "Tcl_execute: " << args.get() << std::endl;
-        std::string command = stripEnclosingBraces(args.get());
-
-        if (!CommandExecutor::execute(command, false))
-        {
-            COUT(1) << "Error: Can't execute command \"" << command << "\"!" << std::endl;
-        }
-    }
-
-    std::string TclBind::tcl(const std::string& tclcode)
-    {
-        if (TclBind::getInstance().interpreter_)
-        {
-            try
-            {
-                std::string output = TclBind::getInstance().interpreter_->eval("uplevel #0 " + tclcode);
-                if (output != "")
-                {
-                    COUT(0) << "tcl> " << output << std::endl;
-                }
-                return output;
-            }
-            catch (Tcl::tcl_error const &e)
-            {   COUT(1) << "tcl> Error: " << e.what() << std::endl;   }
-            catch (...)
-            {   COUT(1) << "Error while executing Tcl: " << Exception::handleMessage() << std::endl;   }
-        }
-
-        return "";
-    }
-
-    void TclBind::bgerror(std::string error)
-    {
-        COUT(1) << "Tcl background error: " << stripEnclosingBraces(error) << std::endl;
-    }
-
-    bool TclBind::eval(const std::string& tclcode)
-    {
-        try
-        {
-            TclBind::getInstance().interpreter_->eval(tclcode);
-            return true;
-        }
-        catch (Tcl::tcl_error const &e)
-        {   COUT(1) << "Tcl error: " << e.what() << std::endl;   }
-        catch (...)
-        {   COUT(1) << "Error while executing Tcl: " << Exception::handleMessage() << std::endl;   }
-
-        return false;
-    }
-}
Index: code/trunk/src/libraries/core/TclBind.h
===================================================================
--- code/trunk/src/libraries/core/TclBind.h	(revision 5772)
+++ 	(revision )
@@ -1,74 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _TclBind_H__
-#define _TclBind_H__
-
-#include "CorePrereqs.h"
-
-#include <cassert>
-#include <string>
-#include "util/Singleton.h"
-
-namespace orxonox
-{
-    class _CoreExport TclBind : public Singleton<TclBind>
-    {
-        friend class Singleton<TclBind>;
-        public:
-            TclBind(const std::string& datapath);
-            ~TclBind();
-
-            static std::string tcl(const std::string& tclcode);
-            static void bgerror(std::string error);
-
-            void setDataPath(const std::string& datapath);
-            const std::string& getTclDataPath() const { return this->tclDataPath_; }
-            static std::string getTclLibraryPath();
-
-            void initializeTclInterpreter();
-            static Tcl::interpreter* createTclInterpreter();
-            Tcl::interpreter* getTclInterpreter() const { return this->interpreter_; }
-
-            static std::string tcl_query(Tcl::object const &args);
-            static void tcl_execute(Tcl::object const &args);
-
-            static bool eval(const std::string& tclcode);
-
-        private:
-            TclBind(const TclBind& other);
-
-            Tcl::interpreter* interpreter_;
-            std::string tclDataPath_;
-            bool bSetTclDataPath_;
-
-            static TclBind* singletonPtr_s;
-    };
-}
-
-#endif /* _TclBind_H__ */
Index: code/trunk/src/libraries/core/TclThreadList.h
===================================================================
--- code/trunk/src/libraries/core/TclThreadList.h	(revision 5772)
+++ 	(revision )
@@ -1,263 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _TclThreadList_H__
-#define _TclThreadList_H__
-
-#include "CorePrereqs.h"
-
-#include <list>
-
-#include <boost/thread/condition_variable.hpp>
-#include <boost/thread/shared_mutex.hpp>
-#include <boost/thread/locks.hpp>
-
-namespace orxonox
-{
-    template <class T>
-    class TclThreadList
-    {
-        public:
-            void push_front(const T& value);
-            void push_back(const T& value);
-            template <class InputIterator> void insert(typename std::list<T>::iterator position, InputIterator begin, InputIterator end);
-
-            void wait_and_pop_front(T* value);
-            void wait_and_pop_back(T* value);
-            bool try_pop_front(T* value);
-            bool try_pop_back(T* value);
-            void clear();
-
-            size_t size() const;
-            bool empty() const;
-            bool is_in(const T& value) const;
-
-            /**
-                @brief Returns a reference to the list. Don't forget to lock the mutex (see @ref getMutex).
-            */
-            inline std::list<T>& getList()
-                { return this->list_; }
-
-            /**
-                @brief Returns a reference to the list. Don't forget to lock the mutex (see @ref getMutex).
-            */
-            inline const std::list<T>& getList() const
-                { return this->list_; }
-
-            /**
-                @brief Returns a reference to the mutex which might be useful if you want to iterate through the list (see @ref begin and @ref end).
-            */
-            inline boost::shared_mutex& getMutex() const
-                { return this->mutex_; }
-
-        private:
-            std::list<T>                  list_;        ///< A standard list for type T
-            mutable boost::shared_mutex   mutex_;       ///< A mutex to grant exclusive access to the list
-            boost::condition_variable_any condition_;   ///< A condition variable to wake threads waiting for the mutex to become ready
-    };
-
-    /**
-        @brief Pushes a new element to the front of the list. A unique_lock is needed.
-    */
-    template <class T>
-    void TclThreadList<T>::push_front(const T& value)
-    {
-        boost::unique_lock<boost::shared_mutex> lock(this->mutex_);
-        this->list_.push_front(value);
-        lock.unlock();                  // unlock the mutex...
-        this->condition_.notify_all();  // ...then call notify_all to wake threads waiting in wait_and_pop_front/back
-    }
-
-    /**
-        @brief Pushes a new element to the back of the list. A unique_lock is needed.
-    */
-    template <class T>
-    void TclThreadList<T>::push_back(const T& value)
-    {
-        boost::unique_lock<boost::shared_mutex> lock(this->mutex_);
-        this->list_.push_back(value);
-        lock.unlock();                  // unlock the mutex...
-        this->condition_.notify_all();  // ...then call notify_all to wake threads waiting in wait_and_pop_front/back
-    }
-
-    /**
-        @brief Inserts new elements into the list. A unique_lock is needed.
-    */
-    template <class T>
-    template <class InputIterator> void TclThreadList<T>::insert(typename std::list<T>::iterator position, InputIterator begin, InputIterator end)
-    {
-        boost::unique_lock<boost::shared_mutex> lock(this->mutex_);
-        this->list_.insert(position, begin, end);
-        lock.unlock();                  // unlock the mutex...
-        this->condition_.notify_all();  // ...then call notify_all to wake threads waiting in wait_and_pop_front/back
-    }
-
-    /**
-        @brief Waits until the list contains at least one element and then pops and returns the front element.
-        @param value The front value will be stored in the variable referenced by this pointer.
-    */
-    template <class T>
-    void TclThreadList<T>::wait_and_pop_front(T* value)
-    {
-        boost::unique_lock<boost::shared_mutex> lock(this->mutex_);
-
-        while (this->list_.empty())       // check if there's an element in the list
-            this->condition_.wait(lock);  // wait until the condition becomes true (a notification comes from push_front, push_back or insert
-
-        *value = this->list_.front();
-        this->list_.pop_front();
-    }
-
-    /**
-        @brief Waits until the list contains at least one element and then pops and returns the back element.
-        @param value The back value will be stored in the variable referenced by this pointer.
-    */
-    template <class T>
-    void TclThreadList<T>::wait_and_pop_back(T* value)
-    {
-        boost::unique_lock<boost::shared_mutex> lock(this->mutex_);
-
-        while (this->list_.empty())       // check if there's an element in the list
-            this->condition_.wait(lock);  // wait until the condition becomes true (a notification comes from push_front, push_back or insert
-
-        *value = this->list_.back();
-        this->list_.pop_back();
-    }
-
-    /**
-        @brief Pops and returns the front element if there's at least one element in the list.
-        @param value The front value will be stored in the variable referenced by this pointer.
-        @return Returns true if there was at least one element in the list (which got poped). If the list was empty, false is returned immediately.
-
-        Needs a unique_lock if there's an element to pop. If not, shared_lock is sufficient.
-    */
-    template <class T>
-    bool TclThreadList<T>::try_pop_front(T* value)
-    {
-        boost::upgrade_lock<boost::shared_mutex> lock(this->mutex_); // gain shared lock
-
-        if (this->list_.empty())
-        {
-            // No elements - return immediately
-            return false;
-        }
-        else
-        {
-            // At least one element - write it into the passed variable and pop it from the list
-            boost::upgrade_to_unique_lock<boost::shared_mutex> unique_lock(lock); // upgrade to unique lock to modify the list
-            *value = this->list_.front();
-            this->list_.pop_front();
-        }
-        return true;
-    }
-
-    /**
-        @brief Pops and returns the back element if there's at least one element in the list.
-        @param value The back value will be stored in the variable referenced by this pointer.
-        @return Returns true if there was at least one element in the list (which got poped). If the list was empty, false is returned immediately.
-
-        Needs a unique_lock if there's an element to pop. If not, shared_lock is sufficient.
-    */
-    template <class T>
-    bool TclThreadList<T>::try_pop_back(T* value)
-    {
-        boost::upgrade_lock<boost::shared_mutex> lock(this->mutex_); // gain shared lock
-
-        if (this->list_.empty())
-        {
-            // No elements - return immediately
-            return false;
-        }
-        else
-        {
-            // At least one element - write it into the passed variable and pop it from the list
-            boost::upgrade_to_unique_lock<boost::shared_mutex> unique_lock(lock); // upgrade to unique lock to modify the list
-            *value = this->list_.back();
-            this->list_.pop_back();
-        }
-        return true;
-    }
-
-    /**
-        @brief Clears the list. A unique_lock is needed.
-    */
-    template <class T>
-    void TclThreadList<T>::clear()
-    {
-        boost::unique_lock<boost::shared_mutex> lock(this->mutex_);
-        this->list_.clear();
-    }
-
-    /**
-        @brief Returns the size of the list. A shared_lock is needed.
-
-        Warning: Don't change the list based on the result of size(). Use an atomic function instead. Other threads may change the list
-        beween your call to size() and your further actions, so be careful and use this function only if you really want nothing else than
-        just the size of the list.
-    */
-    template <class T>
-    size_t TclThreadList<T>::size() const
-    {
-        boost::shared_lock<boost::shared_mutex> lock(this->mutex_);
-        return this->list_.size();
-    }
-
-    /**
-        @brief Returns true if the list is empty, false otherwise. A shared_lock is needed.
-
-        Warning: Don't change the list based on the result of empty(). Use an atomic function instead. Other threads may change the list
-        beween your call to empty() and your further actions, so be careful and use this function only if you really want nothing else than
-        just if the list is empty or not.
-    */
-    template <class T>
-    bool TclThreadList<T>::empty() const
-    {
-        boost::shared_lock<boost::shared_mutex> lock(this->mutex_);
-        return this->list_.empty();
-    }
-
-    /**
-        @brief Returns true if a given element is in the list, false otherwise. A shared_lock is needed.
-
-        Warning: The result of this function might be wrong just one instruction after the call. Use this function just to get information
-        about a temporary snapshot and don't change the list based on the result of this function.
-    */
-    template <class T>
-    bool TclThreadList<T>::is_in(const T& value) const
-    {
-        boost::shared_lock<boost::shared_mutex> lock(this->mutex_);
-
-        for (typename std::list<T>::const_iterator it = this->list_.begin(); it != this->list_.end(); ++it)
-            if (*it == value)
-                return true;
-
-        return false;
-    }
-}
-
-#endif /* _TclThreadList_H__ */
Index: code/trunk/src/libraries/core/TclThreadManager.cc
===================================================================
--- code/trunk/src/libraries/core/TclThreadManager.cc	(revision 5772)
+++ 	(revision )
@@ -1,671 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "TclThreadManager.h"
-
-#include <boost/bind.hpp>
-#include <boost/thread/thread.hpp>
-#include <boost/thread/locks.hpp>
-#include <boost/thread/shared_mutex.hpp>
-#include <OgreTimer.h>
-#include <cpptcl/cpptcl.h>
-
-#include "util/Convert.h"
-#include "util/Exception.h"
-#include "Clock.h"
-#include "CommandExecutor.h"
-#include "ConsoleCommand.h"
-#include "CoreIncludes.h"
-#include "TclBind.h"
-#include "TclThreadList.h"
-
-namespace orxonox
-{
-    const float TCLTHREADMANAGER_MAX_CPU_USAGE = 0.50f;
-
-    SetConsoleCommandShortcutAlias(TclThreadManager, execute, "tclexecute").argumentCompleter(0, autocompletion::tclthreads());
-    SetConsoleCommandShortcutAlias(TclThreadManager, query,   "tclquery"  ).argumentCompleter(0, autocompletion::tclthreads());
-    SetConsoleCommand(TclThreadManager, create,  false);
-    SetConsoleCommand(TclThreadManager, destroy, false).argumentCompleter(0, autocompletion::tclthreads());
-    SetConsoleCommand(TclThreadManager, execute, false).argumentCompleter(0, autocompletion::tclthreads());
-    SetConsoleCommand(TclThreadManager, query,   false).argumentCompleter(0, autocompletion::tclthreads());
-    SetConsoleCommand(TclThreadManager, source,  false).argumentCompleter(0, autocompletion::tclthreads());
-
-    /**
-        @brief A struct containing all information about a Tcl-interpreter
-    */
-    struct TclInterpreterBundle
-    {
-        TclInterpreterBundle()
-        {
-            this->lock_ = new boost::unique_lock<boost::mutex>(this->mutex_, boost::defer_lock);
-            this->bRunning_ = true;
-        }
-
-        ~TclInterpreterBundle()
-        {
-            delete this->lock_;
-        }
-
-        unsigned int                      id_;             ///< The id of the interpreter
-        Tcl::interpreter*                 interpreter_;    ///< The Tcl-interpreter
-        boost::mutex                      mutex_;          ///< A mutex to lock the interpreter while it's being used
-        boost::unique_lock<boost::mutex>* lock_;           ///< The corresponding lock for the mutex
-        TclThreadList<std::string>        queue_;          ///< The command queue for commands passed by execute(command)
-        TclThreadList<unsigned int>       queriers_;       ///< A list containing the id's of all other threads sending a query to this interpreter (to avoid circular queries and deadlocks)
-        bool                              bRunning_;       ///< This variable stays true until destroy() gets called
-    };
-
-    TclThreadManager* TclThreadManager::singletonPtr_s = 0;
-
-    /**
-        @brief Constructor
-        @param interpreter A pointer to the standard Tcl-interpreter (see @ref TclBind)
-    */
-    TclThreadManager::TclThreadManager(Tcl::interpreter* interpreter)
-    {
-        RegisterRootObject(TclThreadManager);
-
-        this->numInterpreterBundles_ = 0;
-
-        this->interpreterBundlesMutex_ = new boost::shared_mutex();
-        this->mainInterpreterMutex_ = new boost::mutex();
-        this->messageQueue_ = new TclThreadList<std::string>();
-
-        TclInterpreterBundle* newbundle = new TclInterpreterBundle();
-        newbundle->id_ = 0;
-        newbundle->interpreter_ = interpreter;
-        newbundle->lock_->lock();
-
-        {
-            boost::unique_lock<boost::shared_mutex> lock(*this->interpreterBundlesMutex_);
-            this->interpreterBundles_[0] = newbundle;
-        }
-    }
-
-    /**
-        @brief Destructor
-    */
-    TclThreadManager::~TclThreadManager()
-    {
-        delete this->interpreterBundlesMutex_;
-//        delete this->mainInterpreterMutex_; // <-- temporary disabled to avoid crash if a thread is still actively queriyng
-        delete this->messageQueue_;
-    }
-
-    /**
-        @brief The "main loop" of the TclThreadManager. Creates new threads if needed and handles queries and queued commands for the main interpreter.
-    */
-    void TclThreadManager::update(const Clock& time)
-    {
-        // Get the bundle of the main interpreter (0)
-        TclInterpreterBundle* bundle = this->getInterpreterBundle(0);
-        if (bundle)
-        {
-            // Unlock the mutex to allow other threads accessing the main interpreter
-            bundle->lock_->unlock();
-
-            // Lock the main interpreter mutex once to synchronize with threads that want to query the main interpreter
-            {
-                boost::unique_lock<boost::mutex> lock(*this->mainInterpreterMutex_);
-            }
-
-            // Lock the mutex again to gain exclusive access to the interpreter for the rest of the mainloop
-            bundle->lock_->lock();
-
-            // Execute commands in the queues of the threaded interpreters
-            {
-                boost::shared_lock<boost::shared_mutex> lock(*this->interpreterBundlesMutex_);
-                for (std::map<unsigned int, TclInterpreterBundle*>::const_iterator it = this->interpreterBundles_.begin(); it != this->interpreterBundles_.end(); ++it)
-                {
-                    if (it->first == 0)
-                        continue; // We'll handle the default interpreter later (and without threads of course)
-
-                    TclInterpreterBundle* bundle = it->second;
-                    if (!bundle->queue_.empty())
-                    {
-                        // There are commands in the queue
-                        try
-                        {
-                            if (!bundle->lock_->owns_lock() && bundle->lock_->try_lock())
-                            {
-                                // We sucessfully obtained a lock for the interpreter
-                                std::string command;
-                                if (bundle->queue_.try_pop_front(&command))
-                                {
-                                    // Start a thread to execute the command
-                                    boost::thread(boost::bind(&tclThread, bundle, command));
-                                }
-                                else
-                                {
-                                    // Somehow the queue become empty (maybe multiple consumers) - unlock the mutex
-                                    bundle->lock_->unlock();
-                                }
-                            }
-                        }
-                        catch (...)
-                        {
-                            // A lock error occurred - this is possible if the lock gets locked between !bundle->lock_->owns_lock() and bundle->lock_->try_lock()
-                            // This isn't too bad, just continue
-                        }
-                    }
-                }
-            }
-
-            // Execute commands in the message queue
-            if (!this->messageQueue_->empty())
-            {
-                std::string command;
-                while (true)
-                {
-                    // Pop the front value from the list (break the loop if there are no elements in the list)
-                    if (!this->messageQueue_->try_pop_front(&command))
-                        break;
-
-                    // Execute the command
-                    CommandExecutor::execute(command, false);
-                }
-            }
-
-            // Execute commands in the queue of the main interpreter
-            if (!bundle->queue_.empty())
-            {
-                // Calculate the time we have until we reach the maximal cpu usage
-                unsigned long maxtime = (unsigned long)(time.getDeltaTime() * 1000000 * TCLTHREADMANAGER_MAX_CPU_USAGE);
-
-                Ogre::Timer timer;
-                std::string command;
-
-                while (timer.getMicroseconds() < maxtime)
-                {
-                    // Pop the front value from the list (break the loop if there are no elements in the list)
-                    if (!bundle->queue_.try_pop_front(&command))
-                        break;
-
-                    // Execute the command
-                    CommandExecutor::execute(command, false);
-                }
-            }
-        }
-    }
-
-    /**
-        @brief Creates a new Tcl-interpreter.
-    */
-    unsigned int TclThreadManager::create()
-    {
-        TclThreadManager::getInstance().numInterpreterBundles_++;
-        TclThreadManager::createWithId(TclThreadManager::getInstance().numInterpreterBundles_);
-        COUT(0) << "Created new Tcl-interpreter with ID " << TclThreadManager::getInstance().numInterpreterBundles_ << std::endl;
-        return TclThreadManager::getInstance().numInterpreterBundles_;
-    }
-
-    /**
-        @brief Creates a new Tcl-interpreter with a given id.
-
-        Use with caution - if the id collides with an already existing interpreter, this call will fail.
-        This will also be a problem, if the auto-numbered interpreters (by using create()) reach an id
-        which was previously used in this function. Use high numbers to be safe.
-    */
-    Tcl::interpreter* TclThreadManager::createWithId(unsigned int id)
-    {
-        TclInterpreterBundle* newbundle = new TclInterpreterBundle();
-        newbundle->id_ = id;
-        newbundle->interpreter_ = TclBind::createTclInterpreter();
-
-        TclThreadManager::initialize(newbundle);
-
-        {
-            // Add the new bundle to the map
-            boost::unique_lock<boost::shared_mutex> lock(*TclThreadManager::getInstance().interpreterBundlesMutex_);
-            TclThreadManager::getInstance().interpreterBundles_[id] = newbundle;
-        }
-
-        return newbundle->interpreter_;
-    }
-
-    void TclThreadManager::initialize(TclInterpreterBundle* bundle)
-    {
-        std::string id_string = getConvertedValue<unsigned int, std::string>(bundle->id_);
-
-        // Initialize the new interpreter
-        try
-        {
-            // Define the functions which are implemented in C++
-            bundle->interpreter_->def("::orxonox::execute",      TclThreadManager::tcl_execute,      Tcl::variadic());
-            bundle->interpreter_->def("::orxonox::crossexecute", TclThreadManager::tcl_crossexecute, Tcl::variadic());
-            bundle->interpreter_->def("::orxonox::query",        TclThreadManager::tcl_query,        Tcl::variadic());
-            bundle->interpreter_->def("::orxonox::crossquery",   TclThreadManager::tcl_crossquery,   Tcl::variadic());
-            bundle->interpreter_->def("::orxonox::running",      TclThreadManager::tcl_running);
-
-            // Create threadspecific shortcuts for the functions above
-            bundle->interpreter_->def("execute",      TclThreadManager::tcl_execute,      Tcl::variadic());
-            bundle->interpreter_->def("crossexecute", TclThreadManager::tcl_crossexecute, Tcl::variadic());
-            bundle->interpreter_->eval("proc query      {args}    { ::orxonox::query " + id_string + " $args }");
-            bundle->interpreter_->eval("proc crossquery {id args} { ::orxonox::crossquery " + id_string + " $id $args }");
-            bundle->interpreter_->eval("proc running    {}        { return [::orxonox::running " + id_string + "] }");
-
-            // Define a variable containing the thread id
-            bundle->interpreter_->eval("set id " + id_string);
-
-            // Use our own exit function to avoid shutting down the whole program instead of just the interpreter
-            bundle->interpreter_->eval("rename exit ::tcl::exit");
-            bundle->interpreter_->eval("proc exit {} { execute TclThreadManager destroy " + id_string + " }");
-
-            // Redefine some native functions
-            bundle->interpreter_->eval("rename while ::tcl::while");
-            bundle->interpreter_->eval("rename ::orxonox::while while");
-            bundle->interpreter_->eval("rename for ::tcl::for");
-            bundle->interpreter_->eval("rename ::orxonox::for for");
-        }
-        catch (const Tcl::tcl_error& e)
-        {   bundle->interpreter_ = 0; COUT(1) << "Tcl error while creating Tcl-interpreter (" << id_string << "): " << e.what() << std::endl;   }
-        catch (...)
-        {   bundle->interpreter_ = 0; COUT(1) << "Error while creating Tcl-interpreter (" << id_string << "): " << Exception::handleMessage() << std::endl;   }
-    }
-
-    /**
-        @brief Stops and destroys a given Tcl-interpreter
-    */
-    void TclThreadManager::destroy(unsigned int id)
-    {
-        // TODO
-        // Not yet implemented
-        TclInterpreterBundle* bundle = TclThreadManager::getInstance().getInterpreterBundle(id);
-        if (bundle)
-        {
-            bundle->bRunning_ = false;
-        }
-    }
-
-    /**
-        @brief Sends a command to the queue of a given Tcl-interpreter
-        @param id The id of the target interpreter
-        @param command The command to be sent
-    */
-    void TclThreadManager::execute(unsigned int target_id, const std::string& command)
-    {
-        TclThreadManager::getInstance()._execute(target_id, command);
-    }
-
-    /**
-        @brief This function can be called from Tcl to execute a console command.
-
-        Commands which shall be executed are put into a queue and processed as soon as the
-        main thread feels ready to do so. The queue may also be full which results in a temporary
-        suspension of the calling thread until the queue gets ready again.
-    */
-    void TclThreadManager::tcl_execute(const Tcl::object& args)
-    {
-        TclThreadManager::getInstance()._execute(0, stripEnclosingBraces(args.get()));
-    }
-
-    /**
-        @brief This function can be called from Tcl to send a command to the queue of any interpreter.
-        @param target_id The id of the target thread
-    */
-    void TclThreadManager::tcl_crossexecute(int target_id, const Tcl::object& args)
-    {
-        TclThreadManager::getInstance()._execute(static_cast<unsigned int>(target_id), stripEnclosingBraces(args.get()));
-    }
-
-    /**
-        @brief Sends a command to the queue of a given Tcl-interpreter
-        @param id The id of the target interpreter
-        @param command The command to be sent
-    */
-    void TclThreadManager::_execute(unsigned int target_id, const std::string& command)
-    {
-        TclInterpreterBundle* bundle = this->getInterpreterBundle(target_id);
-        if (bundle)
-            bundle->queue_.push_back(command);
-    }
-
-
-    /**
-        @brief Sends a query to a given Tcl-interpreter and waits for the result
-        @param id The id of the target interpreter
-        @param command The command to be sent
-        @return The result of the command
-    */
-    std::string TclThreadManager::query(unsigned int target_id, const std::string& command)
-    {
-        return TclThreadManager::getInstance()._query(0, target_id, command);
-    }
-
-    /**
-        @brief This function can be called from Tcl to send a query to the main thread.
-        @param source_id The id of the calling thread
-
-        A query waits for the result of the command. This means, the calling thread will be blocked until
-        the main thread answers the query. In return, the main thread sends the result of the console
-        command back to Tcl.
-    */
-    std::string TclThreadManager::tcl_query(int source_id, const Tcl::object& args)
-    {
-        return TclThreadManager::getInstance()._query(static_cast<unsigned int>(source_id), 0, stripEnclosingBraces(args.get()), true);
-    }
-
-    /**
-        @brief This function can be called from Tcl to send a query to another thread.
-        @param source_id The id of the calling thread
-        @param target_id The id of the target thread
-    */
-    std::string TclThreadManager::tcl_crossquery(int source_id, int target_id, const Tcl::object& args)
-    {
-        return TclThreadManager::getInstance()._query(static_cast<unsigned int>(source_id), static_cast<unsigned int>(target_id), stripEnclosingBraces(args.get()));
-    }
-
-    /**
-        @brief This function performs a query to any Tcl interpreter
-        @param source_id The id of the calling thread
-        @param target_id The id of the target thread
-        @param command The command to send as a query
-        @param bUseCommandExecutor Only used if the target_id is 0 (which references the main interpreter). In this case it means if the command should be passed to the CommandExecutor (true) or to the main Tcl interpreter (false). This is true when called by tcl_query and false when called by tcl_crossquery.
-    */
-    std::string TclThreadManager::_query(unsigned int source_id, unsigned int target_id, const std::string& command, bool bUseCommandExecutor)
-    {
-        TclInterpreterBundle* source_bundle = this->getInterpreterBundle(source_id);
-        TclInterpreterBundle* target_bundle = this->getInterpreterBundle(target_id);
-        std::string output;
-
-        if (source_bundle && target_bundle)
-        {
-            // At this point we assume the mutex of source_bundle to be locked (because it's executing this query right now an waits for the return value)
-            // We can safely use it's querier list (because there's no other place in the code using the list except this query - and the interpreter can't start more than one query)
-
-            if ((source_bundle->id_ == target_bundle->id_) || source_bundle->queriers_.is_in(target_bundle->id_))
-            {
-                // This query would lead to a deadlock - return with an error
-                TclThreadManager::error("Error: Circular query (" + this->dumpList(source_bundle->queriers_.getList()) + " " + getConvertedValue<unsigned int, std::string>(source_bundle->id_) \
-                            + " -> " + getConvertedValue<unsigned int, std::string>(target_bundle->id_) \
-                            + "), couldn't query Tcl-interpreter with ID " + getConvertedValue<unsigned int, std::string>(target_bundle->id_) \
-                            + " from other interpreter with ID " + getConvertedValue<unsigned int, std::string>(source_bundle->id_) + ".");
-            }
-            else
-            {
-                boost::unique_lock<boost::mutex> lock(target_bundle->mutex_, boost::try_to_lock);
-                boost::unique_lock<boost::mutex> mainlock(*this->mainInterpreterMutex_, boost::defer_lock);
-
-                if (!lock.owns_lock() && source_bundle->id_ != 0)
-                {
-                    // We couldn't obtain the try_lock immediately and we're not the main interpreter - wait until the lock becomes possible (note: the main interpreter won't wait and instead returns an error - see below)
-                    if (target_bundle->id_ == 0)
-                    {
-                        // We're querying the main interpreter - use the main interpreter mutex to synchronize
-                        mainlock.lock();
-                        lock.lock();
-                    }
-                    else
-                    {
-                        // We're querying a threaded interpreter - no synchronization needed
-                        lock.lock();
-                    }
-                }
-
-                if (lock.owns_lock())
-                {
-                    // Now the mutex of target_bundle is also locked an we can update the querier list
-                    target_bundle->queriers_.insert(target_bundle->queriers_.getList().begin(), source_bundle->queriers_.getList().begin(), source_bundle->queriers_.getList().end());
-                    target_bundle->queriers_.push_back(source_bundle->id_);
-
-                    // Perform the query (note: this happens in the main thread because we need the returnvalue)
-                    if (target_bundle->id_ == 0 && bUseCommandExecutor)
-                    {
-                        // It's a query to the CommandExecutor
-                        TclThreadManager::debug("TclThread_query -> CE: " + command);
-                        if (!CommandExecutor::execute(command, false))
-                            TclThreadManager::error("Error: Can't execute command \"" + command + "\"!");
-
-                        if (CommandExecutor::getLastEvaluation().hasReturnvalue())
-                            output = CommandExecutor::getLastEvaluation().getReturnvalue().getString();
-                    }
-                    else
-                    {
-                        // It's a query to a Tcl interpreter
-                        TclThreadManager::debug("TclThread_query: " + command);
-
-                        output = TclThreadManager::eval(target_bundle, command, "query");
-                    }
-
-                    // Clear the queriers list of the target
-                    target_bundle->queriers_.clear();
-
-                    // Unlock the mutex of the target_bundle
-                    lock.unlock();
-
-                    // Finally unlock the main interpreter lock if necessary
-                    if (mainlock.owns_lock())
-                        mainlock.unlock();
-                }
-                else
-                {
-                    // This happens if the main thread tries to query a busy interpreter
-                    // To avoid a lock of the main thread, we simply don't proceed with the query in this case
-                    TclThreadManager::error("Error: Couldn't query Tcl-interpreter with ID " + getConvertedValue<unsigned int, std::string>(target_bundle->id_) + ", interpreter is busy right now.");
-                }
-            }
-
-        }
-
-        return output;
-    }
-
-    /**
-        @brief Creates a non-interactive Tcl-interpreter which executes a file.
-    */
-    void TclThreadManager::source(const std::string& file)
-    {
-        boost::thread(boost::bind(&sourceThread, file));
-    }
-
-    /**
-        @brief This function can be called from Tcl to ask if the thread is still suposed to be running.
-        @param id The id of the thread in question
-    */
-    bool TclThreadManager::tcl_running(int id)
-    {
-        TclInterpreterBundle* bundle = TclThreadManager::getInstance().getInterpreterBundle(static_cast<unsigned int>(id));
-        if (bundle)
-            return bundle->bRunning_;
-        else
-            return false;
-    }
-
-    /**
-        @brief Returns the interpreter bundle with the given id.
-        @param id The id of the interpreter
-        @return The interpreter or 0 if the id doesn't exist
-    */
-    TclInterpreterBundle* TclThreadManager::getInterpreterBundle(unsigned int id)
-    {
-        boost::shared_lock<boost::shared_mutex> lock(*this->interpreterBundlesMutex_);
-
-        std::map<unsigned int, TclInterpreterBundle*>::const_iterator it = this->interpreterBundles_.find(id);
-        if (it != this->interpreterBundles_.end())
-        {
-            return it->second;
-        }
-        else
-        {
-            TclThreadManager::error("Error: No Tcl-interpreter with ID " + getConvertedValue<unsigned int, std::string>(id) + " existing.");
-            return 0;
-        }
-    }
-
-    /**
-        @brief Returns a string containing all elements of a unsigned-integer-list separated by spaces.
-    */
-    std::string TclThreadManager::dumpList(const std::list<unsigned int>& list)
-    {
-        std::string output = "";
-        for (std::list<unsigned int>::const_iterator it = list.begin(); it != list.end(); ++it)
-        {
-            if (it != list.begin())
-                output += " ";
-
-            output += getConvertedValue<unsigned int, std::string>(*it);
-        }
-        return output;
-    }
-
-    /**
-        @brief Returns a list with the numbers of all existing Tcl-interpreters.
-
-        This function is used by the auto completion function.
-    */
-    std::list<unsigned int> TclThreadManager::getThreadList() const
-    {
-        boost::shared_lock<boost::shared_mutex> lock(*this->interpreterBundlesMutex_);
-
-        std::list<unsigned int> threads;
-        for (std::map<unsigned int, TclInterpreterBundle*>::const_iterator it = this->interpreterBundles_.begin(); it != this->interpreterBundles_.end(); ++it)
-            if (it->first > 0 && it->first <= this->numInterpreterBundles_) // only list autonumbered interpreters (created with create()) - exclude the default interpreter 0 and all manually numbered interpreters)
-                threads.push_back(it->first);
-        return threads;
-    }
-
-    /**
-        @brief A helper function to print errors in a thread safe manner.
-    */
-    void TclThreadManager::error(const std::string& error)
-    {
-        TclThreadManager::getInstance().messageQueue_->push_back("error " + error);
-    }
-
-    /**
-        @brief A helper function to print debug information in a thread safe manner.
-    */
-    void TclThreadManager::debug(const std::string& error)
-    {
-        TclThreadManager::getInstance().messageQueue_->push_back("debug " + error);
-    }
-
-    /**
-        @brief Evaluates a Tcl command without throwing exceptions (which may rise problems on certain machines).
-        @return The Tcl return value
-
-        Errors are reported through the @ref error function.
-    */
-    std::string TclThreadManager::eval(TclInterpreterBundle* bundle, const std::string& command, const std::string& action)
-    {
-        Tcl_Interp* interpreter = bundle->interpreter_->get();
-        int cc = Tcl_Eval(interpreter, command.c_str());
-
-        Tcl::details::result result(interpreter);
-
-        if (cc != TCL_OK)
-        {
-            TclThreadManager::error("Tcl error (" + action + ", ID " + getConvertedValue<unsigned int, std::string>(bundle->id_) + "): " + static_cast<std::string>(result));
-            return "";
-        }
-        else
-        {
-            return result;
-        }
-    }
-
-    ////////////////
-    // The Thread //
-    ////////////////
-
-    /**
-        @brief The main function of the thread. Executes a Tcl command.
-        @param bundle The interpreter bundle containing all necessary variables
-        @param command the Command to execute
-    */
-    void tclThread(TclInterpreterBundle* bundle, std::string command)
-    {
-        TclThreadManager::debug("TclThread_execute: " + command);
-
-        TclThreadManager::eval(bundle, command, "execute");
-
-        bundle->lock_->unlock();
-    }
-
-    /**
-        @brief The main function of a non-interactive source thread. Executes the file.
-        @param file The name of the file that should be executed by the non-interactive interpreter.
-    */
-    void sourceThread(std::string file)
-    {
-        TclThreadManager::debug("TclThread_source: " + file);
-
-        // Prepare the command-line arguments
-        const int argc = 2;
-        char* argv[argc];
-        argv[0] = "tclthread";
-        argv[1] = const_cast<char*>(file.c_str());
-
-        // Start the Tcl-command Tcl_Main with the Tcl_OrxonoxAppInit hook
-        Tcl_Main(argc, argv, Tcl_OrxonoxAppInit);
-
-//        Tcl::object object(file);
-//        int cc = Tcl_FSEvalFile(bundle->interpreter_->get(), object.get_object());
-//        Tcl::details::result result(bundle->interpreter_->get());
-//        if (cc != TCL_OK)
-//            TclThreadManager::error("Tcl error (source, ID " + getConvertedValue<unsigned int, std::string>(bundle->id_) + "): " + static_cast<std::string>(result));
-//
-//        // Unlock the mutex
-//        bundle->lock_->unlock();
-    }
-
-    /**
-        @brief A tcl-init hook to inject the non-interactive Tcl-interpreter into the TclThreadManager.
-    */
-    int Tcl_OrxonoxAppInit(Tcl_Interp* interp)
-    {
-        // Create a new interpreter bundle
-        unsigned int id = TclThreadManager::create();
-        TclInterpreterBundle* bundle = TclThreadManager::getInstance().getInterpreterBundle(id);
-
-        // Replace the default interpreter in the bundle with the non-interactive one (passed as an argument to this function)
-        if (bundle->interpreter_)
-            delete bundle->interpreter_;
-        bundle->interpreter_ = new Tcl::interpreter(interp, true);
-
-        // Initialize the non-interactive interpreter (like in @ref TclBind::createTclInterpreter but exception safe)
-        std::string libpath = TclBind::getTclLibraryPath();
-        if (libpath != "")
-            TclThreadManager::eval(bundle, "set tcl_library \"" + libpath + "\"", "source");
-        int cc = Tcl_Init(interp);
-        TclThreadManager::eval(bundle, "source \"" + TclBind::getInstance().getTclDataPath() + "/init.tcl\"", "source");
-
-        // Initialize the non-interactive interpreter also with the thread-specific stuff
-        TclThreadManager::initialize(bundle);
-
-        // Lock the mutex (this will be locked until the thread finishes - no chance to interact with the interpreter)
-        bundle->lock_->lock();
-
-        // Return to Tcl_Main
-        if (!bundle->interpreter_)
-            return TCL_ERROR;
-        else
-            return cc;
-    }
-}
Index: code/trunk/src/libraries/core/TclThreadManager.h
===================================================================
--- code/trunk/src/libraries/core/TclThreadManager.h	(revision 5772)
+++ 	(revision )
@@ -1,102 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _TclThreadManager_H__
-#define _TclThreadManager_H__
-
-#include "CorePrereqs.h"
-
-#include <cassert>
-#include <list>
-#include <map>
-#include <string>
-
-#include "util/Singleton.h"
-#include "OrxonoxClass.h"
-
-struct Tcl_Interp;
-
-namespace orxonox
-{
-    class _CoreExport TclThreadManager : public Singleton<TclThreadManager>, public OrxonoxClass
-    {
-        friend class Singleton<TclThreadManager>;
-        friend class TclBind;
-        friend _CoreExport void tclThread(TclInterpreterBundle* bundle, std::string command);
-        friend _CoreExport void sourceThread(std::string file);
-        friend _CoreExport int Tcl_OrxonoxAppInit(Tcl_Interp* interp);
-
-        public:
-            TclThreadManager(Tcl::interpreter* interpreter);
-            virtual ~TclThreadManager();
-
-            static unsigned int      create();
-            static Tcl::interpreter* createWithId(unsigned int id);
-            static void              destroy(unsigned int id);
-            static void              execute(unsigned int target_id, const std::string& command);
-            static std::string       query(unsigned int target_id, const std::string& command);
-            static void              source(const std::string& file);
-
-            static void error(const std::string& error);
-            static void debug(const std::string& error);
-
-            void update(const Clock& time);
-
-            std::list<unsigned int> getThreadList() const;
-
-        private:
-            static void tcl_execute(const Tcl::object& args);
-            static void tcl_crossexecute(int target_id, const Tcl::object& args);
-            static std::string tcl_query(int source_id, const Tcl::object& args);
-            static std::string tcl_crossquery(int source_id, int target_id, const Tcl::object& args);
-            static bool tcl_running(int id);
-
-            void _execute(unsigned int target_id, const std::string& command);
-            std::string _query(unsigned int source_id, unsigned int target_id, const std::string& command, bool bUseCommandExecutor = false);
-
-            TclInterpreterBundle* getInterpreterBundle(unsigned int id);
-            std::string dumpList(const std::list<unsigned int>& list);
-
-            static void initialize(TclInterpreterBundle* bundle);
-            static std::string eval(TclInterpreterBundle* bundle, const std::string& command, const std::string& action);
-
-            static TclThreadManager* singletonPtr_s;                            ///< Singleton pointer
-
-            unsigned int numInterpreterBundles_;                                ///< Number of created Tcl-interpreters (only used for auto-numbered interpreters, not affected by @ref createWithId)
-            std::map<unsigned int, TclInterpreterBundle*> interpreterBundles_;  ///< A map containing all Tcl-interpreters
-            boost::shared_mutex* interpreterBundlesMutex_;                      ///< A mutex used to synchronize threads when accessing @ref interpreterBundles_
-            TclThreadList<std::string>* messageQueue_;                          ///< A queue to pass messages from Tcl-threads to the main thread
-            boost::mutex* mainInterpreterMutex_;                                ///< A mutex to synchronize queries to the main interpreter
-    };
-
-    _CoreExport void tclThread(TclInterpreterBundle* bundle, std::string command);
-    _CoreExport void sourceThread(std::string file);
-    _CoreExport int Tcl_OrxonoxAppInit(Tcl_Interp* interp);
-}
-
-#endif /* _TclThreadManager_H__ */
Index: code/trunk/src/libraries/core/Template.cc
===================================================================
--- code/trunk/src/libraries/core/Template.cc	(revision 5772)
+++ 	(revision )
@@ -1,181 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "Template.h"
-
-#include <tinyxml/tinyxml.h>
-#include <tinyxml/ticpp.h>
-
-#include "util/Debug.h"
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-
-namespace orxonox
-{
-    CreateFactory(Template);
-
-    Template::Template(BaseObject* creator) : BaseObject(creator)
-    {
-        this->xmlelement_ = new TiXmlElement("");
-
-        RegisterObject(Template);
-
-        this->bIsLink_ = false;
-        this->bLoadDefaults_ = true;
-        this->bIsReturningXMLElement_ = false;
-        this->baseclassIdentifier_ = 0;
-    }
-
-    Template::~Template()
-    {
-        Template::getTemplateMap().erase(this->getName());
-        delete this->xmlelement_;
-    }
-
-    void Template::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(Template, XMLPort, xmlelement, mode);
-
-        XMLPortParam(Template, "link",      setLink,         getLink,         xmlelement, mode);
-        XMLPortParam(Template, "baseclass", setBaseclass,    getBaseclass,    xmlelement, mode);
-        XMLPortParam(Template, "defaults",  setLoadDefaults, getLoadDefaults, xmlelement, mode).defaultValues(true);
-
-        Element* element = xmlelement.FirstChildElement(false);
-        if (element)
-        {
-            TiXmlElement* tixmlelement = static_cast<TiXmlElement*>(element->GetTiXmlPointer());
-            if (tixmlelement)
-                this->setXMLElement(*tixmlelement);
-        }
-    }
-
-    void Template::changedName()
-    {
-        SUPER(Template, changedName);
-
-        if (this->getName() != "")
-        {
-            std::map<std::string, Template*>::iterator it;
-            it = Template::getTemplateMap().find(this->getOldName());
-            if (it != Template::getTemplateMap().end())
-                Template::getTemplateMap().erase(it);
-
-            it = Template::getTemplateMap().find(this->getName());
-            if (it != Template::getTemplateMap().end())
-                COUT(2) << "Warning: Template with name \"" << this->getName() << "\" already exists." << std::endl;
-            else
-                Template::getTemplateMap()[this->getName()] = this;
-        }
-    }
-
-    void Template::setXMLElement(const TiXmlElement& xmlelement)
-    {
-        *this->xmlelement_ = xmlelement;
-    }
-
-    const TiXmlElement& Template::getXMLElement() const
-    {
-        if (this->bIsLink_)
-        {
-            Template* temp = Template::getTemplate(this->link_);
-            if (temp)
-            {
-                if (!temp->bIsReturningXMLElement_)
-                {
-                    this->bIsReturningXMLElement_ = true;
-                    const TiXmlElement& element = temp->getXMLElement();
-                    this->bIsReturningXMLElement_ = false;
-                    return element;
-                }
-                else
-                {
-                    COUT(2) << "Warning: Linking from " << this->getName() << " to " << this->link_ << " leads to an infinite loop. Returning own element." << std::endl;
-                }
-            }
-            else
-            {
-                COUT(2) << "Warning: " << this->link_ << " is not an existing Template name. Returning own element." << std::endl;
-            }
-        }
-
-        return *this->xmlelement_;
-    }
-
-    void Template::setBaseclass(const std::string& baseclass)
-    {
-        this->baseclassIdentifier_ = ClassByString(baseclass);
-        if (this->baseclassIdentifier_)
-            this->baseclass_ = baseclass;
-    }
-
-    void Template::applyOn(BaseObject* object)
-    {
-        if (this->baseclassIdentifier_)
-        {
-            if (!object->isA(this->baseclassIdentifier_))
-            {
-                COUT(1) << "Error: Can't apply template (name: " << this->getName() << "), object (name: " << object->getName() << ", class: " << object->getIdentifier()->getName() << ") is not a " << this->baseclassIdentifier_->getName() << std::endl;
-                return;
-            }
-        }
-
-        COUT(4) << object->getLoaderIndentation() << " aplying Template \"" << this->getName() << "\"..." << std::endl;
-
-        Element temp = &const_cast<TiXmlElement&>(this->getXMLElement());
-
-        if (this->bLoadDefaults_)
-            object->XMLPort(temp, XMLPort::LoadObject);
-        else
-            object->XMLPort(temp, XMLPort::ExpandObject);
-    }
-
-    std::map<std::string, Template*>& Template::getTemplateMap()
-    {
-        static std::map<std::string, Template*> templateMap;
-        return templateMap;
-    }
-
-    Template* Template::getTemplate(const std::string& name)
-    {
-        std::map<std::string, Template*>::iterator it = Template::getTemplateMap().find(name);
-        if (it != Template::getTemplateMap().end())
-            return it->second;
-        else
-        {
-            COUT(2) << "Warning: Template with name " << name << " doesn't exist." << std::endl;
-            return 0;
-        }
-    }
-
-    void Template::apply(const std::string& name, BaseObject* object)
-    {
-        std::map<std::string, Template*>::iterator it = Template::getTemplateMap().find(name);
-        if (it != Template::getTemplateMap().end())
-            it->second->applyOn(object);
-    }
-}
Index: code/trunk/src/libraries/core/Template.h
===================================================================
--- code/trunk/src/libraries/core/Template.h	(revision 5772)
+++ 	(revision )
@@ -1,85 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Template_H__
-#define _Template_H__
-
-#include "CorePrereqs.h"
-
-#include <map>
-#include <string>
-#include "BaseObject.h"
-
-namespace orxonox
-{
-    class _CoreExport Template : public BaseObject
-    {
-        public:
-            Template(BaseObject* creator);
-            virtual ~Template();
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            virtual void changedName();
-
-            inline void setLink(const std::string& link)
-                { this->link_ = link; this->bIsLink_ = (link != ""); }
-            inline const std::string& getLink() const
-                { return this->link_; }
-
-            inline void setLoadDefaults(bool bLoadDefaults)
-                { this->bLoadDefaults_ = bLoadDefaults; }
-            inline bool getLoadDefaults() const
-                { return this->bLoadDefaults_; }
-
-            void setXMLElement(const TiXmlElement& xmlelement);
-            const TiXmlElement& getXMLElement() const;
-
-            void setBaseclass(const std::string& baseclass);
-            inline const std::string& getBaseclass() const
-                { return this->baseclass_; }
-            inline Identifier* getBaseclassIdentifier() const
-                { return this->baseclassIdentifier_; }
-
-            void applyOn(BaseObject* object);
-
-            static std::map<std::string, Template*>& getTemplateMap();
-            static Template* getTemplate(const std::string& name);
-            static void apply(const std::string& name, BaseObject* object);
-
-        private:
-            TiXmlElement* xmlelement_;
-            std::string link_;
-            std::string baseclass_;
-            Identifier* baseclassIdentifier_;
-            bool bIsLink_;
-            bool bLoadDefaults_;
-            mutable bool bIsReturningXMLElement_;
-    };
-}
-
-#endif /* _Template_H__ */
Index: code/trunk/src/libraries/core/WindowEventListener.cc
===================================================================
--- code/trunk/src/libraries/core/WindowEventListener.cc	(revision 5772)
+++ 	(revision )
@@ -1,64 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "WindowEventListener.h"
-#include "CoreIncludes.h"
-
-namespace orxonox
-{
-    unsigned int WindowEventListener::windowWidth_s  = 0;
-    unsigned int WindowEventListener::windowHeight_s = 0;
-
-    WindowEventListener::WindowEventListener()
-    {
-        RegisterRootObject(WindowEventListener);
-    }
-
-    //! Calls all registered objects
-    /*static*/ void WindowEventListener::moveWindow()
-    {
-        for (ObjectList<WindowEventListener>::iterator it = ObjectList<WindowEventListener>::begin(); it; ++it)
-            it->windowMoved();
-    }
-
-    //! Calls all registered objects and sets the static variables
-    /*static*/ void WindowEventListener::resizeWindow(unsigned int newWidth, unsigned int newHeight)
-    {
-        windowWidth_s = newWidth;
-        windowHeight_s = newHeight;
-        for (ObjectList<WindowEventListener>::iterator it = ObjectList<WindowEventListener>::begin(); it; ++it)
-            it->windowResized(newWidth, newHeight);
-    }
-
-    //! Calls all registered objects
-    /*static*/ void WindowEventListener::changeWindowFocus()
-    {
-        for (ObjectList<WindowEventListener>::iterator it = ObjectList<WindowEventListener>::begin(); it; ++it)
-            it->windowFocusChanged();
-    }
-}
Index: code/trunk/src/libraries/core/WindowEventListener.h
===================================================================
--- code/trunk/src/libraries/core/WindowEventListener.h	(revision 5772)
+++ 	(revision )
@@ -1,71 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _WindowEventListener_H__
-#define _WindowEventListener_H__
-
-#include "CorePrereqs.h"
-#include "OrxonoxClass.h"
-
-namespace orxonox
-{
-    //! Interface for receiving window events like resize, moved and focusChanged
-    class _CoreExport WindowEventListener : virtual public OrxonoxClass
-    {
-        friend class OgreWindowEventListener;
-
-        protected:
-            WindowEventListener();
-            virtual ~WindowEventListener() { }
-
-            //! Returns the current render window width
-            unsigned int getWindowWidth() const { return windowWidth_s; }
-            //! Returns the current render window height
-            unsigned int getWindowHeight() const { return windowHeight_s; }
-
-        private:
-            //! Window has been moved
-            virtual void windowMoved() { }
-
-            //! Window has resized
-            virtual void windowResized(unsigned int newWidth, unsigned int newHeight) { }
-
-            //! Window has lost/gained focus
-            virtual void windowFocusChanged() { }
-
-            static void moveWindow();
-            static void resizeWindow(unsigned int newWidth, unsigned int newHeight);
-            static void changeWindowFocus();
-
-            //! Static variable that holds the latest distributed information
-            static unsigned int windowWidth_s;
-            static unsigned int windowHeight_s;
-    };
-}
-
-#endif /* _WindowEventListener_H__ */
Index: code/trunk/src/libraries/core/XMLFile.h
===================================================================
--- code/trunk/src/libraries/core/XMLFile.h	(revision 5772)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _XMLFile_H__
-#define _XMLFile_H__
-
-#include "CorePrereqs.h"
-
-#include <string>
-#include "ClassTreeMask.h"
-
-namespace orxonox
-{
-    class _CoreExport XMLFile
-    {
-        public:
-            XMLFile(const std::string& filename, const std::string& resourceGroup = "General")
-                : filename_(filename)
-                , group_(resourceGroup)
-                , bLuaSupport_(true)
-            { }
-            XMLFile(const ClassTreeMask& mask, const std::string& filename, const std::string& resourceGroup = "General")
-                : filename_(filename)
-                , group_(resourceGroup)
-                , mask_(mask)
-                , bLuaSupport_(true)
-            { }
-
-            void setLuaSupport(bool val) { bLuaSupport_ = val; }
-
-            const std::string& getFilename() const { return this->filename_; }
-            const std::string& getResourceGroup() const { return this->group_; }
-            const ClassTreeMask& getMask() const { return this->mask_; }
-            bool getLuaSupport() const { return this->bLuaSupport_; }
-
-        private:
-            std::string filename_;
-            std::string group_;
-            ClassTreeMask mask_;
-            bool bLuaSupport_; // Default is true
-    };
-}
-
-#endif /* _XMLFile_H__ */
Index: code/trunk/src/libraries/core/XMLNameListener.cc
===================================================================
--- code/trunk/src/libraries/core/XMLNameListener.cc	(revision 5772)
+++ 	(revision )
@@ -1,38 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "XMLNameListener.h"
-#include "CoreIncludes.h"
-
-namespace orxonox
-{
-    XMLNameListener::XMLNameListener()
-    {
-        RegisterRootObject(XMLNameListener);
-    }
-}
Index: code/trunk/src/libraries/core/XMLNameListener.h
===================================================================
--- code/trunk/src/libraries/core/XMLNameListener.h	(revision 5772)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _XMLNameListener_H__
-#define _XMLNameListener_H__
-
-#include "CorePrereqs.h"
-#include "OrxonoxClass.h"
-
-namespace orxonox
-{
-    class _CoreExport XMLNameListener : virtual public OrxonoxClass
-    {
-        public:
-            XMLNameListener();
-            virtual ~XMLNameListener() {}
-
-            virtual void loadedNewXMLName(BaseObject* object) = 0;
-    };
-}
-
-#endif /* _XMLNameListener_H__ */
Index: code/trunk/src/libraries/core/XMLPort.cc
===================================================================
--- code/trunk/src/libraries/core/XMLPort.cc	(revision 5772)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "XMLPort.h"
-
-#include "Loader.h"
-#include "Namespace.h"
-
-namespace orxonox
-{
-    // ################################
-    // ###  XMLPortObjectContainer  ###
-    // ################################
-    bool XMLPortObjectContainer::identifierIsIncludedInLoaderMask(const Identifier* identifier)
-    {
-        return ((!this->bApplyLoaderMask_) || identifier->isA(ClassIdentifier<Namespace>::getIdentifier()) || Loader::currentMask_s.isIncluded(identifier));
-    }
-}
Index: code/trunk/src/libraries/core/XMLPort.h
===================================================================
--- code/trunk/src/libraries/core/XMLPort.h	(revision 5772)
+++ 	(revision )
@@ -1,688 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Declaration of the XMLPort helper classes and macros.
-
-    XMLPort is a virtual function of every BaseObject. Every object can change this function.
-    The XMLPort function gets called with an XMLElement, containing all attributes and
-    subclasses the object gets from the levelfile.
-
-    This file declares classes and macros to simplify XML-parsing.
-*/
-
-#ifndef _XMLPort_H__
-#define _XMLPort_H__
-
-#include "CorePrereqs.h"
-
-#include <cassert>
-#include <string>
-#include <tinyxml/ticpp.h>
-
-#include "util/Debug.h"
-#include "util/Exception.h"
-#include "util/MultiType.h"
-#include "util/OrxAssert.h"
-#include "Factory.h"
-#include "Identifier.h"
-#include "Executor.h"
-#include "BaseObject.h"
-
-// ------------
-// XMLPortParam
-
-/**
-    @brief Declares an XML attribute with a name, which will be set through load- and savefunctions.
-    @param classname The name of the class owning this param
-    @param paramname The name of the attribute
-    @param loadfunction A function to set the param in the object with a given value (~a set-function)
-    @param savefunction A function to get the value of the param from the object (~a get-function)
-    @param xmlelement The XMLElement, you get this from the XMLPort function
-    @param mode The mode (load or save), you get this from the XMLPort function
-
-    In the XML file, a param or attribute will be set like this:
-    <classname paramname="value" />
-
-    The macro will then call loadfunction(value) to set the given value (or call savefunction() to
-    write an existing value to an XML file).
-*/
-#define XMLPortParam(classname, paramname, loadfunction, savefunction, xmlelement, mode) \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
-    XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, classname, this, paramname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode)
-
-/**
-    @brief Declares an XML attribute with a name, which will be set through a variable.
-    @param classname The name of the class owning this param
-    @param paramname The name of the attribute
-    @param variable Name of the variable used to save and load the value
-    @param xmlelement The XMLElement, you get this from the XMLPort function
-    @param mode The mode (load or save), you get this from the XMLPort function
-
-    In the XML file, a param or attribute will be set like this:
-    <classname paramname="value" />
-
-    The macro will then store "value" in the variable or read it when saving.
-*/
-#define XMLPortParamVariable(classname, paramname, variable, xmlelement, mode) \
-    XMLPortVariableHelperClass xmlcontainer##variable##dummy(static_cast<void*>(&variable)); \
-    static ExecutorMember<orxonox::XMLPortVariableHelperClass>* xmlcontainer##variable##loadexecutor = static_cast<ExecutorMember<orxonox::XMLPortVariableHelperClass>*>(orxonox::createExecutor(orxonox::createFunctor(orxonox::XMLPortVariableHelperClass::getLoader(variable)), std::string( #classname ) + "::" + #variable + "loader")); \
-    static ExecutorMember<orxonox::XMLPortVariableHelperClass>* xmlcontainer##variable##saveexecutor = static_cast<ExecutorMember<orxonox::XMLPortVariableHelperClass>*>(orxonox::createExecutor(orxonox::createFunctor(orxonox::XMLPortVariableHelperClass::getSaver (variable)), std::string( #classname ) + "::" + #variable + "saver" )); \
-    XMLPortParamGeneric(xmlcontainer##variable, classname, orxonox::XMLPortVariableHelperClass, &xmlcontainer##variable##dummy, paramname, xmlcontainer##variable##loadexecutor, xmlcontainer##variable##saveexecutor, xmlelement, mode)
-
-/**
-    @brief This is the same as XMLPortParam, but you can set the template arguments needed to store the loadfunction.
-
-    Sometimes the name of the loadfunction is ambiguous (example: setPosition(Vector3) or
-    setPosition(float, float, float)). In this case, you can choose the right function by
-    telling the types of the functionparams. In our example, this would be either
-    > XMLPortParamTemplate(classname, paramname, loadfunction, savefunction, xmlelement, mode, Vector3);
-    or
-    > XMLPortParamTemplate(classname, paramname, loadfunction, savefunction, xmlelement, mode, float, float, float);
-    You don't have to use this, if there exist only one function with the given name.
-*/
-#define XMLPortParamTemplate(classname, paramname, loadfunction, savefunction, xmlelement, mode, ...) \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
-    XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, classname, this, paramname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode)
-
-// --------------------
-// XMLPortParamLoadOnly
-
-/**
-    @brief Declares an XML attribute with a name, which can be set through a loadfunction.
-
-    This is the same as XMLPortParam, but you don't need a savefunction (get-function). Therefore,
-    this param won't be saved in an XML file, but you can add the attribute manually an it will be
-    loaded.
-
-    This might be helpful in cases, when you have several options to set a value, for example the
-    rotation. You can set the rotation with a quaternion, but you could also use three angles.
-    When saving the object, only one of both options has to be saved; this is, where this macro helps.
-*/
-#define XMLPortParamLoadOnly(classname, paramname, loadfunction, xmlelement, mode) \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##0##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    XMLPortParamGeneric(xmlcontainer##loadfunction##0, classname, classname, this, paramname, xmlcontainer##loadfunction##0##loadexecutor, 0, xmlelement, mode)
-/**
-    @brief This is the same as XMLPortParamTemplate, but for load-only attributes (see XMLPortParamLoadOnly).
-*/
-#define XMLPortParamLoadOnlyTemplate(classname, paramname, loadfunction, xmlelement, mode, ...) \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##0##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    XMLPortParamGeneric(xmlcontainer##loadfunction##0, classname, classname, this, paramname, xmlcontainer##loadfunction##0##loadexecutor, 0, xmlelement, mode)
-
-// ------------------
-// XMLPortParamExtern
-
-/**
-    @brief This is the same as XMLPortParam, but for attributes in an extern class.
-    @param classname The name of the class owning the object owning the attribute
-    @param externclass The name of the extern class (the objects class)
-    @param object The name of the object of the extern class (a member of the main class)
-    @param paramname The name of the attribute
-    @param loadfunction The function to set the attribute inside of the member object.
-    @param loadfunction The function to get the attribute from the member object
-
-    Sometimes you'll have a member object in your class, which has it's own load- and savefunctions.
-    With this macro, you can simply use them instead of writing your own functions.
-
-    @example
-    Your class is called SpaceShip and this class has an object (myPilot_) of class Pilot. Pilot has a name
-    and two functions, setName(name) and getName(). Now you want an attribute "pilotname" in your
-    SpaceShip class. Instead of writing wrapper functions, you can simply use the XMLPortParamExtern
-    macro:
-    > XMLPortParamExtern(SpaceShip, Pilot, myPilot_, "pilotname", setName, getName, xmlelement, mode);
-*/
-#define XMLPortParamExtern(classname, externclass, object, paramname, loadfunction, savefunction, xmlelement, mode) \
-    static ExecutorMember<externclass>* xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&externclass::loadfunction), std::string( #externclass ) + "::" + #loadfunction); \
-    static ExecutorMember<externclass>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&externclass::savefunction), std::string( #externclass ) + "::" + #savefunction); \
-    XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, externclass, object, paramname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode);
-/**
-    @brief This is the same as XMLPortParamTemplate, but for extern attributes (see XMLPortParamExtern).
-*/
-#define XMLPortParamExternTemplate(classname, externclass, object, paramname, loadfunction, savefunction, xmlelement, mode, ...) \
-    static ExecutorMember<externclass>* xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<externclass, __VA_ARGS__ >(&externclass::loadfunction), std::string( #externclass ) + "::" + #loadfunction); \
-    static ExecutorMember<externclass>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&externclass::savefunction), std::string( #externclass ) + "::" + #savefunction); \
-    XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, externclass, object, paramname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode);
-
-// -------------------
-// XMLPortParamGeneric
-
-/**
-    @brief This is the generic XMLPort param macro, which is used by all six specialized macros above.
-*/
-#define XMLPortParamGeneric(containername, classname, objectclass, object, paramname, loadexecutor, saveexecutor, xmlelement, mode) \
-    orxonox::XMLPortClassParamContainer<objectclass>* containername = static_cast<orxonox::XMLPortClassParamContainer<objectclass>*>(ClassIdentifier<classname>::getIdentifier()->getXMLPortParamContainer(paramname)); \
-    if (!containername) \
-    { \
-        containername = new orxonox::XMLPortClassParamContainer<objectclass>(std::string(paramname), ClassIdentifier<classname>::getIdentifier(), loadexecutor, saveexecutor); \
-        ClassIdentifier<classname>::getIdentifier()->addXMLPortParamContainer(paramname, containername); \
-    } \
-    containername->port(static_cast<BaseObject*>(this), object, xmlelement, mode)
-
-// --------------------
-// XMLPortObjectExtended
-
-/**
-    @brief Declares a possible sub-object that can be added in the XML file.
-    @param classname The name of the class that uses this macro
-    @param objectclass The baseclass of objects that can be added
-    @param sectionname The name of the subsection in the XML file that encloses the sub-objects ("" means no subsection)
-    @param loadfunction The function to add a new object to the class
-    @param loadfunction The function to get all added objects from the class
-    @param xmlelement The XMLElement (recieved through the XMLPort function)
-    @param mode The mode (load/save) (received through the XMLPort function)
-    @param bApplyLoaderMask If this is true, an added sub-object gets loaded only if it's class is included in the Loaders ClassTreeMask (this is usually false)
-    @param bLoadBefore If this is true, the sub-object gets loaded (through XMLPort) BEFORE it gets added to the main class (this is usually true)
-
-    bApplyLoaderMask is usually false for the following reason:
-    If the loaders mask says, for example, "load only SpaceShips" and you added weapons to the
-    SpaceShips, then the Weapons will still be loaded (which is most probably what you want).
-    Of course, if there are "standalone" weapons in the level, they wont be loaded.
-
-    If bLoadBefore is true, an added object already has all attributes set (like it's name). This is most
-    likely the best option, so this is usually true.
-
-    @note
-    The load- and savefunctions have to follow an exactly defined protocol.
-    Loadfunction:
-      The loadfunction gets a pointer to the object.
-      > void loadfunction(objectclass* pointer);
-
-    Savefunction:
-      The savefunction gets an index, starting with 0. For every returnvalue != 0, the savefunction
-      gets called again, but with index + 1. It's the functions responsibility to do something smart
-      with the index and to return 0 if all objects were returned.
-      > objectclass* savefunction(unsigned int index) const;
-
-      Possible implementation:
-        objectclass* savefunction(unsigned int index) const
-        {
-          if (index < number_of_added_objects_)
-            return my_added_objects[index];
-          else
-            return 0;
-        }
-
-    @example
-    Possible usage of the macro:
-    > XMLPortObject(SpaceShip, Weapon, "weapons", addWeapon, getWeapon, xmlelement, mode, false, true);
-
-    Now you can add weapons through the XML file:
-    <SpaceShip someattribute="..." ...>
-      <weapons>
-        <Weapon someattribute="..." ... />
-        <Weapon someattribute="..." ... />
-        <Weapon someattribute="..." ... />
-      </weapons>
-    </SpaceShip>
-
-    Note that "weapons" is the subsection. This allows you to add more types of sub-objects. In our example,
-    you could add pilots, blinking lights or other stuff. If you don't want a subsection, just use "" (an
-    empty string). Then you can add sub-objects directly into the mainclass.
-*/
-#define XMLPortObjectExtended(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, mode, bApplyLoaderMask, bLoadBefore) \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
-    XMLPortObjectGeneric(xmlcontainer##loadfunction##savefunction, classname, objectclass, sectionname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode, bApplyLoaderMask, bLoadBefore)
-/**
-    @brief This is the same as XMLPortObjectExtended, but you can specify the loadfunction by adding the param types. See XMLPortParamTemplate for more details about the types.
-*/
-#define XMLPortObjectExtendedTemplate(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, mode, bApplyLoaderMask, bLoadBefore, ...) \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
-    XMLPortObjectGeneric(xmlcontainer##loadfunction##savefunction, classname, objectclass, sectionname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode, bApplyLoaderMask, bLoadBefore)
-
-// -------------
-// XMLPortObject
-
-/**
-    @brief This is the same as XMLPortObjectExtended, but bApplyLoaderMask is false and bLoadBefore is true by default.
-*/
-#define XMLPortObject(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, mode) \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
-    XMLPortObjectGeneric(xmlcontainer##loadfunction##savefunction, classname, objectclass, sectionname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode, false, true)
-/**
-    @brief This is the same as XMLPortObject, but you can specify the loadfunction by adding the param types. See XMLPortParamTemplate for more details about the types.
-*/
-#define XMLPortObjectTemplate(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, mode, ...) \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
-    XMLPortObjectGeneric(xmlcontainer##loadfunction##savefunction, classname, objectclass, sectionname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode, false, true)
-
-// --------------------
-// XMLPortObjectGeneric
-
-/**
-    @brief Generic XMLPortObject macro, that gets called by all other XMLPortObject macros above.
-*/
-#define XMLPortObjectGeneric(containername, classname, objectclass, sectionname, loadexecutor, saveexecutor, xmlelement, mode, bApplyLoaderMask, bLoadBefore) \
-    orxonox::XMLPortClassObjectContainer<classname, objectclass>* containername = (orxonox::XMLPortClassObjectContainer<classname, objectclass>*)(ClassIdentifier<classname>::getIdentifier()->getXMLPortObjectContainer(sectionname)); \
-    if (!containername) \
-    { \
-        containername = new orxonox::XMLPortClassObjectContainer<classname, objectclass>(std::string(sectionname), ClassIdentifier<classname>::getIdentifier(), loadexecutor, saveexecutor, bApplyLoaderMask, bLoadBefore); \
-        ClassIdentifier<classname>::getIdentifier()->addXMLPortObjectContainer(sectionname, containername); \
-    } \
-    containername->port(this, xmlelement, mode)
-
-
-namespace orxonox
-{
-    // ###############################
-    // ###  XMLPortParamContainer  ###
-    // ###############################
-    class _CoreExport XMLPortParamContainer
-    {
-    public:
-        enum ParseResult
-        {
-            PR_not_started,
-            PR_finished,
-            PR_waiting_for_default_values
-        };
-
-        public:
-            XMLPortParamContainer()
-                { this->parseResult_ = PR_not_started; }
-            virtual ~XMLPortParamContainer() {}
-
-            inline const std::string& getName() const
-                { return this->paramname_; }
-
-            virtual XMLPortParamContainer& description(const std::string description) = 0;
-            virtual const std::string& getDescription() = 0;
-
-            virtual XMLPortParamContainer& defaultValue(unsigned int index, const MultiType& param) = 0;
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1) = 0;
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1, const MultiType& param2) = 0;
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3) = 0;
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4) = 0;
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) = 0;
-
-        protected:
-            std::string paramname_;
-            ParseResult parseResult_;
-            Identifier* identifier_;
-            BaseObject* owner_;
-    };
-
-    template <class T>
-    class XMLPortClassParamContainer : public XMLPortParamContainer
-    {
-        struct ParseParams
-        {
-            T* object;
-            Element* xmlelement;
-            XMLPort::Mode mode;
-        };
-
-        public:
-            XMLPortClassParamContainer(const std::string paramname, Identifier* identifier, ExecutorMember<T>* loadexecutor, ExecutorMember<T>* saveexecutor)
-            {
-                this->paramname_ = paramname;
-                this->identifier_ = identifier;
-                this->loadexecutor_ = loadexecutor;
-                this->saveexecutor_ = saveexecutor;
-            }
-
-            ~XMLPortClassParamContainer()
-            {
-                assert(this->loadexecutor_);
-                delete this->loadexecutor_;
-                if (this->saveexecutor_)
-                    delete this->saveexecutor_;
-            }
-
-            XMLPortParamContainer& port(BaseObject* owner, T* object, Element& xmlelement, XMLPort::Mode mode)
-            {
-                OrxAssert(owner, "XMLPortParamContainer must have a BaseObject as owner.");
-                this->owner_ = owner;
-                this->parseParams_.object = object;
-                this->parseParams_.xmlelement = &xmlelement;
-                this->parseParams_.mode = mode;
-
-                if ((mode == XMLPort::LoadObject) || (mode == XMLPort::ExpandObject))
-                {
-                    try
-                    {
-                        if (this->owner_->lastLoadedXMLElement_ != &xmlelement)
-                        {
-                            this->owner_->xmlAttributes_.clear();
-                            // Iterate through the attributes manually in order to make them case insensitive
-                            Attribute* attribute = xmlelement.FirstAttribute(false);
-                            while (attribute != 0)
-                            {
-                                this->owner_->xmlAttributes_[getLowercase(attribute->Name())] = attribute->Value();
-                                attribute = attribute->Next(false);
-                            }
-                            this->owner_->lastLoadedXMLElement_ = &xmlelement;
-                        }
-                        std::map<std::string, std::string>::const_iterator it = this->owner_->xmlAttributes_.find(getLowercase(this->paramname_));
-                        std::string attributeValue("");
-                        if (it != this->owner_->xmlAttributes_.end())
-                            attributeValue = it->second;
-
-                        // TODO: Checking the iterator would be better since then we can have strings with value "" as well.
-                        //       Unfortunately this does not seem to work with the Executor parser yet.
-                        if ((!attributeValue.empty()) || ((mode != XMLPort::ExpandObject) && this->loadexecutor_->allDefaultValuesSet()))
-                        {
-                            COUT(5) << this->owner_->getLoaderIndentation() << "Loading parameter " << this->paramname_ << " in " << this->identifier_->getName() << " (objectname " << this->owner_->getName() << ")." << std::endl << this->owner_->getLoaderIndentation();
-                            if (this->loadexecutor_->parse(object, attributeValue, ",") || (mode  == XMLPort::ExpandObject))
-                                this->parseResult_ = PR_finished;
-                            else
-                                this->parseResult_ = PR_waiting_for_default_values;
-                        }
-                        else if (mode == XMLPort::ExpandObject)
-                            this->parseResult_ = PR_finished;
-                        else
-                            this->parseResult_ = PR_waiting_for_default_values;
-                    }
-                    catch (ticpp::Exception& ex)
-                    {
-                        COUT(1) << std::endl;
-                        COUT(1) << "An error occurred in XMLPort.h while loading attribute '" << this->paramname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << this->owner_->getName() << ") in " << this->owner_->getFilename() << ":" << std::endl;
-                        COUT(1) << ex.what() << std::endl;
-                    }
-                }
-                else
-                {
-                    if (this->saveexecutor_)
-                    {
-//                        xmlelement.SetAttribute(this->paramname_, "...");
-                    }
-                }
-
-                return (*this);
-            }
-
-            XMLPortParamContainer& port(BaseObject* owner, const ParseParams& parseParams)
-            {
-                return this->port(owner, parseParams.object, *parseParams.xmlelement, parseParams.mode);
-            }
-
-            XMLPortParamContainer& portIfWaitingForDefaultValues(const ParseResult& result, const ParseParams& params)
-            {
-                if (result == PR_waiting_for_default_values)
-                    return this->port(this->owner_, params);
-                else
-                    return (*this);
-            }
-
-            virtual XMLPortParamContainer& description(const std::string description)
-                { this->loadexecutor_->setDescription(description); return (*this); }
-            virtual const std::string& getDescription()
-                { return this->loadexecutor_->getDescription(); }
-
-            virtual XMLPortParamContainer& defaultValue(unsigned int index, const MultiType& param)
-            {
-                if (!this->loadexecutor_->defaultValueSet(index))
-                    this->loadexecutor_->setDefaultValue(index, param);
-                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
-            }
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1)
-            {
-                if (!this->loadexecutor_->defaultValueSet(0))
-                    this->loadexecutor_->setDefaultValues(param1);
-                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
-            }
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1, const MultiType& param2)
-            {
-                if ((!this->loadexecutor_->defaultValueSet(0)) || (!this->loadexecutor_->defaultValueSet(1)))
-                    this->loadexecutor_->setDefaultValues(param1, param2);
-                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
-            }
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3)
-            {
-                if ((!this->loadexecutor_->defaultValueSet(0)) || (!this->loadexecutor_->defaultValueSet(1)) || (!this->loadexecutor_->defaultValueSet(2)))
-                    this->loadexecutor_->setDefaultValues(param1, param2, param3);
-                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
-            }
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4)
-            {
-                if ((!this->loadexecutor_->defaultValueSet(0)) || (!this->loadexecutor_->defaultValueSet(1)) || (!this->loadexecutor_->defaultValueSet(2)) || (!this->loadexecutor_->defaultValueSet(3)))
-                    this->loadexecutor_->setDefaultValues(param1, param2, param3, param4);
-                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
-            }
-            virtual XMLPortParamContainer& defaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5)
-            {
-                if ((!this->loadexecutor_->defaultValueSet(0)) || (!this->loadexecutor_->defaultValueSet(1)) || (!this->loadexecutor_->defaultValueSet(2)) || (!this->loadexecutor_->defaultValueSet(3)) || (!this->loadexecutor_->defaultValueSet(4)))
-                    this->loadexecutor_->setDefaultValues(param1, param2, param3, param4, param5);
-                return this->portIfWaitingForDefaultValues(this->parseResult_, this->parseParams_);
-            }
-
-        private:
-            ExecutorMember<T>* loadexecutor_;
-            ExecutorMember<T>* saveexecutor_;
-            ParseParams parseParams_;
-    };
-
-
-    // ################################
-    // ###  XMLPortObjectContainer  ###
-    // ################################
-    class _CoreExport XMLPortObjectContainer
-    {
-        public:
-            XMLPortObjectContainer()
-                { this->bApplyLoaderMask_ = false; }
-            virtual ~XMLPortObjectContainer() {}
-
-            inline const std::string& getName() const
-                { return this->sectionname_; }
-
-            virtual XMLPortObjectContainer& description(const std::string description) = 0;
-            virtual const std::string& getDescription() = 0;
-
-            bool identifierIsIncludedInLoaderMask(const Identifier* identifier);
-
-        protected:
-            std::string sectionname_;
-            bool bApplyLoaderMask_;
-            bool bLoadBefore_;
-            Identifier* identifier_;
-    };
-
-    template <class T, class O>
-    class XMLPortClassObjectContainer : public XMLPortObjectContainer
-    {
-        public:
-            XMLPortClassObjectContainer(const std::string sectionname, Identifier* identifier, ExecutorMember<T>* loadexecutor, ExecutorMember<T>* saveexecutor, bool bApplyLoaderMask, bool bLoadBefore)
-            {
-                this->sectionname_ = sectionname;
-                this->identifier_ = identifier;
-                this->loadexecutor_ = loadexecutor;
-                this->saveexecutor_ = saveexecutor;
-                this->bApplyLoaderMask_ = bApplyLoaderMask;
-                this->bLoadBefore_ = bLoadBefore;
-            }
-
-            ~XMLPortClassObjectContainer()
-            {
-                assert(this->loadexecutor_);
-                delete this->loadexecutor_;
-                if (this->saveexecutor_)
-                    delete this->saveexecutor_;
-            }
-
-            XMLPortObjectContainer& port(T* object, Element& xmlelement, XMLPort::Mode mode)
-            {
-                if ((mode == XMLPort::LoadObject) || (mode == XMLPort::ExpandObject))
-                {
-                    try
-                    {
-                        Element* xmlsubelement;
-                        if ((this->sectionname_ != "") && (this->sectionname_.size() > 0))
-                            xmlsubelement = xmlelement.FirstChildElement(this->sectionname_, false);
-                        else
-                            xmlsubelement = &xmlelement;
-
-                        if (xmlsubelement)
-                        {
-                            for (ticpp::Iterator<ticpp::Element> child = xmlsubelement->FirstChildElement(false); child != child.end(); child++)
-                            {
-                                Identifier* identifier = Factory::getIdentifier(child->Value());
-                                if (identifier)
-                                {
-                                    if (identifier->isA(ClassIdentifier<O>::getIdentifier()))
-                                    {
-                                        if (identifier->isLoadable())
-                                        {
-                                            if (this->identifierIsIncludedInLoaderMask(identifier))
-                                            {
-                                                try
-                                                {
-                                                    COUT(4) << object->getLoaderIndentation() << "fabricating " << child->Value() << "..." << std::endl;
-
-                                                    BaseObject* newObject = identifier->fabricate(static_cast<BaseObject*>(object));
-                                                    assert(newObject);
-                                                    newObject->setLoaderIndentation(object->getLoaderIndentation() + "  ");
-
-                                                    O* castedObject = orxonox_cast<O*>(newObject);
-                                                    assert(castedObject);
-
-                                                    if (this->bLoadBefore_)
-                                                    {
-                                                        newObject->XMLPort(*child, XMLPort::LoadObject);
-                                                        COUT(4) << object->getLoaderIndentation() << "assigning " << child->Value() << " (objectname " << newObject->getName() << ") to " << this->identifier_->getName() << " (objectname " << static_cast<BaseObject*>(object)->getName() << ")" << std::endl;
-                                                    }
-                                                    else
-                                                    {
-                                                        COUT(4) << object->getLoaderIndentation() << "assigning " << child->Value() << " (object not yet loaded) to " << this->identifier_->getName() << " (objectname " << static_cast<BaseObject*>(object)->getName() << ")" << std::endl;
-                                                    }
-
-                                                    COUT(5) << object->getLoaderIndentation();
-                                                    (*this->loadexecutor_)(object, castedObject);
-
-                                                    if (!this->bLoadBefore_)
-                                                        newObject->XMLPort(*child, XMLPort::LoadObject);
-
-                                                    COUT(5) << object->getLoaderIndentation() << "...fabricated " << child->Value() << " (objectname " << newObject->getName() << ")." << std::endl;
-                                                }
-                                                catch (AbortLoadingException& ex)
-                                                {
-                                                    COUT(1) << "An error occurred while loading object, abort loading..." << std::endl;
-                                                    throw ex;
-                                                }
-                                                catch (...)
-                                                {
-                                                    COUT(1) << "An error occurred while loading object:" << std::endl;
-                                                    COUT(1) << Exception::handleMessage() << std::endl;
-                                                }
-                                            }
-                                        }
-                                        else
-                                        {
-                                            COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not loadable." << std::endl;
-                                        }
-                                    }
-                                    else
-                                    {
-                                        COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << ClassIdentifier<O>::getIdentifier()->getName() << "'." << std::endl;
-                                    }
-                                }
-                                else
-                                {
-                                    if (this->sectionname_ != "")
-                                    {
-                                        COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a valid classname." << std::endl;
-                                    }
-                                    else
-                                    {
-                                        // It's probably just another subsection
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    catch (ticpp::Exception& ex)
-                    {
-                        COUT(1) << std::endl;
-                        COUT(1) << "An error occurred in XMLPort.h while loading a '" << ClassIdentifier<O>::getIdentifier()->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << object->getName() << ") in " << object->getFilename() << ":" << std::endl;
-                        COUT(1) << ex.what() << std::endl;
-                    }
-                }
-                else
-                {
-                }
-
-                return (*this);
-            }
-
-            virtual XMLPortObjectContainer& description(const std::string description)
-                { this->loadexecutor_->setDescription(description); return (*this); }
-            virtual const std::string& getDescription()
-                { return this->loadexecutor_->getDescription(); }
-
-        private:
-            ExecutorMember<T>* loadexecutor_;
-            ExecutorMember<T>* saveexecutor_;
-    };
-
-
-    // ####################################
-    // ###  XMLPortVariableHelperClass  ###
-    // ####################################
-    /**
-    @brief
-        Helper class to load and save simple variables with XMLPort.
-
-        getLoader and getSaver were necessary to get the type T with
-        the help of template function type deduction (const T& is unused).
-        These functions return the adress of save<T> or load<T>.
-    */
-    class XMLPortVariableHelperClass
-    {
-        public:
-            XMLPortVariableHelperClass(void* var)
-                : variable_(var)
-                { }
-
-            template <class T>
-            void load(const T& value)
-                { *static_cast<T*>(this->variable_) = value; }
-
-            template <class T>
-            const T& save()
-                { return *static_cast<T*>(this->variable_); }
-
-            template <class T>
-            static void (XMLPortVariableHelperClass::*getLoader(const T& var))(const T& value)
-                { return &XMLPortVariableHelperClass::load<T>; }
-
-            template <class T>
-            static const T& (XMLPortVariableHelperClass::*getSaver(const T& var))()
-                { return &XMLPortVariableHelperClass::save<T>; }
-
-        private:
-            void* variable_;
-    };
-}
-
-#endif /* _XMLPort_H__ */
Index: code/trunk/src/libraries/util/CMakeLists.txt
===================================================================
--- code/trunk/src/libraries/util/CMakeLists.txt	(revision 5772)
+++ code/trunk/src/libraries/util/CMakeLists.txt	(revision 5774)
@@ -19,5 +19,4 @@
 
 SET_SOURCE_FILES(UTIL_SRC_FILES
-  Clipboard.cc
   CRC32.cc
   Exception.cc
Index: code/trunk/src/libraries/util/Clipboard.cc
===================================================================
--- code/trunk/src/libraries/util/Clipboard.cc	(revision 5772)
+++ 	(revision )
@@ -1,142 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- *   Windows version inspired by "Copy Text To Clipboard" by Laszlo Szathmary, 2007
- *      http://www.loria.fr/~szathmar/off/projects/C/CopyTextToClipboard/index.php
- */
-
-/**
-    @file
-    @brief OS-specific implementations of the clipboard functions.
-*/
-
-#include "Clipboard.h"
-
-#ifdef ORXONOX_PLATFORM_WINDOWS
-
-/////////////
-// Windows //
-/////////////
-
-#ifndef WIN32_LEAN_AND_MEAN
-#  define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#undef min
-#undef max
-#include "Debug.h"
-
-namespace orxonox
-{
-
-    /**
-        @brief Puts text into the windows-clipboard
-        @param text The text
-        @return True if the action was successful
-    */
-    bool toClipboard(const std::string& text)
-    {
-        try
-        {
-            if (OpenClipboard(0))
-            {
-                EmptyClipboard();
-                HGLOBAL clipbuffer = GlobalAlloc(GMEM_DDESHARE, text.size() + 1);
-                char* buffer = static_cast<char*>(GlobalLock(clipbuffer));
-                strcpy(buffer, text.c_str());
-                GlobalUnlock(clipbuffer);
-                SetClipboardData(CF_TEXT, clipbuffer);
-                CloseClipboard();
-
-                return true;
-            }
-        }
-        catch (...)
-        {
-            COUT(1) << "Error: Unable to copy the following text to the clipboard:" << std::endl;
-            COUT(1) << "       \"" << text << "\"" << std::endl;
-        }
-        return false;
-    }
-
-    /**
-        @brief Gets text from the windows-clipboard if there is any text.
-        @return The retrieved text
-    */
-    std::string fromClipboard()
-    {
-        try
-        {
-            if (OpenClipboard(0))
-            {
-                HANDLE hData = GetClipboardData(CF_TEXT);
-                std::string output = static_cast<char*>(GlobalLock(hData));
-                GlobalUnlock(hData);
-                CloseClipboard();
-
-                return output;
-            }
-        }
-        catch (...)
-        {
-            COUT(1) << "Error: Unable to retrieve text from the clipboard." << std::endl;
-        }
-        return "";
-    }
-}
-
-#else /* ORXONOX_PLATFORM_WINDOWS */
-
-/////////////
-// Default //
-/////////////
-
-namespace orxonox
-{
-    static std::string clipboard = ""; //!< Keeps the text of our internal clipboard
-
-    /**
-        @brief Default implementation if there is no OS-specific implementation or no clipboard. Copies the text into an internal clipboard.
-        @param text The text
-        @return True
-    */
-    bool toClipboard(const std::string& text)
-    {
-        clipboard = text;
-        return true;
-    }
-
-    /**
-        @brief Default implementation if there is no OS-specific implementation or no clipboard. Gets the text from the internal clipboard.
-        @return The text
-    */
-    std::string fromClipboard()
-    {
-        return clipboard;
-    }
-}
-
-#endif /* ORXONOX_PLATFORM_WINDOWS */
Index: code/trunk/src/libraries/util/Clipboard.h
===================================================================
--- code/trunk/src/libraries/util/Clipboard.h	(revision 5772)
+++ 	(revision )
@@ -1,54 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Some functions to exchange text between the OS clipboard and Orxonox.
-
-    Use fromClipboard() to get text from the clipboard (if there is any text) and
-    toClipboard(text) to put text into the clipboard.
-
-    Those functions can only work properly if there's an OS-specific implementation.
-    If an OS isn't supported, the clipboard only works within Orxonox, but exchange
-    with other programs isn't possible.
-*/
-
-#ifndef _Clipboard_H__
-#define _Clipboard_H__
-
-#include "UtilPrereqs.h"
-#include <string>
-
-namespace orxonox
-{
-    _UtilExport bool toClipboard(const std::string& text);
-    _UtilExport std::string fromClipboard();
-}
-
-#endif /* _Clipboard_H__ */
-
Index: code/trunk/src/libraries/util/Exception.cc
===================================================================
--- code/trunk/src/libraries/util/Exception.cc	(revision 5772)
+++ code/trunk/src/libraries/util/Exception.cc	(revision 5774)
@@ -34,5 +34,4 @@
 
 #include "Exception.h"
-#include <CEGUIExceptions.h>
 
 namespace orxonox
@@ -106,13 +105,4 @@
             return ex.what();
         }
-        catch (const CEGUI::Exception& ex)
-        {
-#if CEGUI_VERSION_MAJOR == 0 && CEGUI_VERSION_MINOR < 6
-            return GeneralException(ex.getMessage().c_str()).getDescription();
-#else
-            return GeneralException(ex.getMessage().c_str(), ex.getLine(),
-                ex.getFileName().c_str(), ex.getName().c_str()).getDescription();
-#endif
-        }
         catch (...)
         {
Index: code/trunk/src/libraries/util/OgreForwardRefs.h
===================================================================
--- code/trunk/src/libraries/util/OgreForwardRefs.h	(revision 5772)
+++ 	(revision )
@@ -1,227 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _OgreForwardRefs_H__
-#define _OgreForwardRefs_H__
-
-#include "UtilPrereqs.h"
-
-namespace Ogre
-{
-    class Angle;
-    class Animation;
-    class AnimationState;
-    class AnimationStateSet;
-    class AnimationTrack;
-    class Archive;
-    class ArchiveFactory;
-    class ArchiveManager;
-    class AutoParamDataSource;
-    class AxisAlignedBox;
-    class AxisAlignedBoxSceneQuery;
-    class Billboard;
-    class BillboardChain;
-    class BillboardSet;
-    class Bone;
-    class Camera;
-    class Codec;
-    class ColourValue;
-    class ConfigDialog;
-    template <typename T> class Controller;
-    template <typename T> class ControllerFunction;
-    class ControllerManager;
-    template <typename T> class ControllerValue;
-    class Degree;
-    class DynLib;
-    class DynLibManager;
-    class EdgeData;
-    class EdgeListBuilder;
-    class Entity;
-    class ErrorDialog;
-    class ExternalTextureSourceManager;
-    class Factory;
-    class Font;
-    class FontPtr;
-    class FontManager;
-    struct FrameEvent;
-    class FrameListener;
-    class Frustum;
-    class GpuProgram;
-    class GpuProgramPtr;
-    class GpuProgramManager;
-	class GpuProgramUsage;
-    class HardwareIndexBuffer;
-    class HardwareOcclusionQuery;
-    class HardwareVertexBuffer;
-	class HardwarePixelBuffer;
-    class HardwarePixelBufferSharedPtr;
-	class HighLevelGpuProgram;
-    class HighLevelGpuProgramPtr;
-	class HighLevelGpuProgramManager;
-	class HighLevelGpuProgramFactory;
-    class IndexData;
-    class IntersectionSceneQuery;
-    class IntersectionSceneQueryListener;
-    class Image;
-    class KeyFrame;
-    class Light;
-    class Log;
-    class LogManager;
-	class ManualResourceLoader;
-	class ManualObject;
-    class Material;
-    class MaterialPtr;
-    class MaterialManager;
-    class MaterialScriptCompiler;
-    class Math;
-    class Matrix3;
-    class Matrix4;
-    class MemoryManager;
-    class Mesh;
-    class MeshPtr;
-    class MeshSerializer;
-    class MeshSerializerImpl;
-    class MeshManager;
-    class MovableObject;
-    class MovablePlane;
-    class Node;
-	class NodeAnimationTrack;
-	class NodeKeyFrame;
-	class NumericAnimationTrack;
-	class NumericKeyFrame;
-    class Overlay;
-    class OverlayContainer;
-    class OverlayElement;
-    class OverlayElementFactory;
-    class OverlayManager;
-    class Particle;
-    class ParticleAffector;
-    class ParticleAffectorFactory;
-    class ParticleEmitter;
-    class ParticleEmitterFactory;
-    class ParticleSystem;
-    class ParticleSystemManager;
-    class ParticleSystemRenderer;
-    class ParticleSystemRendererFactory;
-    class ParticleVisualData;
-    class Pass;
-    class PatchMesh;
-    class PixelBox;
-    class Plane;
-    class PlaneBoundedVolume;
-	class Plugin;
-    class Pose;
-    class ProgressiveMesh;
-    class Profile;
-	class Profiler;
-    class Quaternion;
-	class Radian;
-    class Ray;
-    class RaySceneQuery;
-    class RaySceneQueryListener;
-    class Renderable;
-    class RenderPriorityGroup;
-    class RenderQueue;
-    class RenderQueueGroup;
-	class RenderQueueInvocation;
-	class RenderQueueInvocationSequence;
-    class RenderQueueListener;
-    class RenderSystem;
-    class RenderSystemCapabilities;
-    class RenderTarget;
-    class RenderTargetListener;
-    class RenderTexture;
-	class MultiRenderTarget;
-    class RenderWindow;
-    class RenderOperation;
-    class Resource;
-	class ResourceBackgroundQueue;
-	class ResourceGroupManager;
-    class ResourceManager;
-    class RibbonTrail;
-	class Root;
-    class SceneManager;
-    class SceneManagerEnumerator;
-    class SceneNode;
-    class SceneQuery;
-    class SceneQueryListener;
-	class ScriptLoader;
-    class Serializer;
-    class ShadowCaster;
-    class ShadowRenderable;
-	class ShadowTextureManager;
-    class SimpleRenderable;
-    class SimpleSpline;
-    class Skeleton;
-    class SkeletonPtr;
-    class SkeletonInstance;
-    class SkeletonManager;
-    class Sphere;
-    class SphereSceneQuery;
-	class StaticGeometry;
-    class StringConverter;
-    class StringInterface;
-    class SubEntity;
-    class SubMesh;
-	class TagPoint;
-    class Technique;
-	class TempBlendedBufferInfo;
-	class ExternalTextureSource;
-    class TextureUnitState;
-    class Texture;
-    class TexturePtr;
-	class TextureFont;
-    class TextureManager;
-    class TransformKeyFrame;
-	class Timer;
-    class UserDefinedObject;
-    class Vector2;
-    class Vector3;
-    class Vector4;
-    class Viewport;
-	class VertexAnimationTrack;
-    class VertexBufferBinding;
-    class VertexData;
-    class VertexDeclaration;
-	class VertexMorphKeyFrame;
-    class WireBoundingBox;
-    class Compositor;
-    class CompositorManager;
-    class CompositorChain;
-    class CompositorInstance;
-    class CompositionTechnique;
-    class CompositionPass;
-    class CompositionTargetPass;
-
-    // Originally not in OgrePrerequisites.h
-    class BorderPanelOverlayElement;
-    class PanelOverlayElement;
-    class TextAreaOverlayElement;
-}
-
-#endif /* _OgreForwardRefs_H__ */
Index: code/trunk/src/libraries/util/UTFStringConversions.h
===================================================================
--- code/trunk/src/libraries/util/UTFStringConversions.h	(revision 5772)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *      Reto Grieder
- *   Co-authors:
- *      ...
- */
-
-/**
-@file
-@brief
-    std::sring to Ogre::UTFString conversion functions
-*/
-
-#ifndef _UTFStringConversions_H__
-#define _UTFStringConversions_H__
-
-#include "UtilPrereqs.h"
-#include <OgreUTFString.h>
-
-namespace orxonox
-{
-    template <>
-    struct ConverterExplicit<std::string, Ogre::UTFString>
-    {
-        //! Converts an std::string into an Ogre::UTFString
-        inline static bool convert(Ogre::UTFString* output, const std::string& input)
-        {
-            Ogre::UTFString::code_point cp;
-            for (unsigned int i = 0; i < input.size(); ++i)
-            {
-              cp = input[i];
-              cp &= 0xFF;
-              output->append(1, cp);
-            }
-            return true;
-        }
-    };
-}
-
-#endif /* _UTFStringConversions_H__ */
Index: code/trunk/src/modules/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/CMakeLists.txt	(revision 5772)
+++ code/trunk/src/modules/CMakeLists.txt	(revision 5774)
@@ -26,9 +26,2 @@
 
 ################ Sub Directories ################
-
-ADD_SUBDIRECTORY(gamestates)
-ADD_SUBDIRECTORY(objects)
-ADD_SUBDIRECTORY(overlays)
-ADD_SUBDIRECTORY(pong)
-ADD_SUBDIRECTORY(questsystem)
-ADD_SUBDIRECTORY(weapons)
Index: code/trunk/src/orxonox/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/CMakeLists.txt	(revision 5772)
+++ code/trunk/src/orxonox/CMakeLists.txt	(revision 5774)
@@ -26,56 +26,15 @@
 SET_SOURCE_FILES(ORXONOX_SRC_FILES
   Main.cc
-
-  CameraManager.cc
-  LevelManager.cc
-  PawnManager.cc
-  PlayerManager.cc
-
-  Level.cc
-  Radar.cc
-  Scene.cc
+  GSRoot.cc
 )
-
-ADD_SUBDIRECTORY(collisionshapes)
-ADD_SUBDIRECTORY(controllers)
-ADD_SUBDIRECTORY(gametypes)
-ADD_SUBDIRECTORY(graphics)
-ADD_SUBDIRECTORY(infos)
-ADD_SUBDIRECTORY(interfaces)
-ADD_SUBDIRECTORY(items)
-ADD_SUBDIRECTORY(overlays)
-ADD_SUBDIRECTORY(pickup)
-ADD_SUBDIRECTORY(sound)
-ADD_SUBDIRECTORY(weaponsystem)
-ADD_SUBDIRECTORY(worldentities)
 
 ORXONOX_ADD_LIBRARY(orxonox
   FIND_HEADER_FILES
-  TOLUA_FILES
-    LevelManager.h
-    pickup/BaseItem.h
-    pickup/PickupInventory.h
   DEFINE_SYMBOL
     "ORXONOX_SHARED_BUILD"
-  PCH_FILE
-    OrxonoxPrecompiledHeaders.h
   LINK_LIBRARIES
-    ${Boost_FILESYSTEM_LIBRARY}
-    ${Boost_SYSTEM_LIBRARY} # Filesystem dependency
-    ${Boost_THREAD_LIBRARY}
-    ${Boost_DATE_TIME_LIBRARY} # Thread dependency
-    ${OGRE_LIBRARY}
-    ${OPENAL_LIBRARY}
-    ${ALUT_LIBRARY}
-    ${VORBISFILE_LIBRARY}
-    ${VORBIS_LIBRARY}
-    ${OGG_LIBRARY}
-    tinyxml++_orxonox
     tolua++_orxonox
-    bullet_orxonox
     util
     core
-    network
-    tools
   SOURCE_FILES ${ORXONOX_SRC_FILES}
 )
Index: code/trunk/src/orxonox/CameraManager.cc
===================================================================
--- code/trunk/src/orxonox/CameraManager.cc	(revision 5772)
+++ 	(revision )
@@ -1,143 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Benjamin Knecht
- *   Co-authors:
- *      Fabian 'x3n' Landau
- *
- */
-#include "CameraManager.h"
-
-#include <OgreSceneManager.h>
-#include <OgreViewport.h>
-#include <OgreCompositorManager.h>
-
-#include "util/StringUtils.h"
-#include "core/GameMode.h"
-#include "core/GUIManager.h"
-#include "core/ObjectList.h"
-#include "tools/Shader.h"
-#include "graphics/Camera.h"
-#include "Scene.h"
-
-namespace orxonox
-{
-    CameraManager* CameraManager::singletonPtr_s = 0;
-
-    CameraManager::CameraManager(Ogre::Viewport* viewport)
-        : viewport_(viewport)
-    {
-        this->fallbackCamera_ = 0;
-    }
-
-    CameraManager::~CameraManager()
-    {
-        if (this->fallbackCamera_)
-            this->fallbackCamera_->getSceneManager()->destroyCamera(this->fallbackCamera_);
-    }
-
-    Camera* CameraManager::getActiveCamera() const
-    {
-        if (this->cameraList_.size() > 0)
-            return this->cameraList_.front();
-        else
-            return 0;
-    }
-
-    void CameraManager::requestFocus(Camera* camera)
-    {
-        if (!GameMode::showsGraphics())
-            return;
-
-        // notify old camera (if it exists)
-        if (this->cameraList_.size() > 0)
-            this->cameraList_.front()->removeFocus();
-        else if (this->fallbackCamera_)
-        {
-            this->fallbackCamera_->getSceneManager()->destroyCamera(this->fallbackCamera_);
-            this->fallbackCamera_ = 0;
-        }
-
-        camera->setFocus();
-
-        // make sure we don't add it twice
-        for (std::list<Camera*>::iterator it = this->cameraList_.begin(); it != this->cameraList_.end(); ++it)
-            if ((*it) == camera)
-                return;
-
-        // add to list
-        this->cameraList_.push_front(camera);
-    }
-
-    void CameraManager::releaseFocus(Camera* camera)
-    {
-        if (!GameMode::showsGraphics())
-            return;
-
-        // notify the cam of releasing the focus
-        if (this->cameraList_.front() == camera)
-        {
-            camera->removeFocus();
-            this->cameraList_.pop_front();
-
-            // set new focus if possible
-            if (this->cameraList_.size() > 0)
-                this->cameraList_.front()->setFocus();
-            else
-            {
-                // there are no more cameras, create a fallback
-                if (!this->fallbackCamera_)
-                    this->fallbackCamera_ = camera->getScene()->getSceneManager()->createCamera(getUniqueNumberString());
-                this->useCamera(this->fallbackCamera_);
-            }
-        }
-        else
-        {
-            this->cameraList_.remove(camera);
-        }
-    }
-
-    void CameraManager::useCamera(Ogre::Camera* camera)
-    {
-        // This workaround is needed to avoid weird behaviour with active compositors while
-        // switching the camera (like freezing the image)
-        //
-        // Last known Ogre version needing this workaround:
-        // 1.4.8
-
-        // deactivate all compositors
-        {
-            Ogre::ResourceManager::ResourceMapIterator iterator = Ogre::CompositorManager::getSingleton().getResourceIterator();
-            while (iterator.hasMoreElements())
-                Ogre::CompositorManager::getSingleton().setCompositorEnabled(this->viewport_, iterator.getNext()->getName(), false);
-        }
-
-        this->viewport_->setCamera(camera);
-        GUIManager::getInstance().setCamera(camera);
-
-        // reactivate all visible compositors
-        {
-            for (ObjectList<Shader>::iterator it = ObjectList<Shader>::begin(); it != ObjectList<Shader>::end(); ++it)
-                it->updateVisibility();
-        }
-    }
-}
Index: code/trunk/src/orxonox/CameraManager.h
===================================================================
--- code/trunk/src/orxonox/CameraManager.h	(revision 5772)
+++ 	(revision )
@@ -1,74 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Benjamin Knecht
- *   Co-authors:
- *      Fabian 'x3n' Landau
- *
- */
-
- /**
- @file
- @brief Handles the instances of Camera class
- @author Benjamin Knecht <beni_at_orxonox.net>
-  */
-
-#ifndef _CameraManager_H__
-#define _CameraManager_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <cassert>
-#include <list>
-#include "util/OgreForwardRefs.h"
-#include "util/Singleton.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport CameraManager : public Singleton<CameraManager>
-    {
-            friend class Singleton<CameraManager>;
-        public:
-            CameraManager(Ogre::Viewport* viewport);
-            ~CameraManager();
-
-            Camera* getActiveCamera() const;
-
-            void requestFocus(Camera* camera);
-            void releaseFocus(Camera* camera);
-
-            void useCamera(Ogre::Camera* camera);
-
-            static CameraManager* getInstancePtr() { return singletonPtr_s; }
-
-        private:
-            CameraManager(const CameraManager&); // don't use
-
-            std::list<Camera*>    cameraList_;
-            Ogre::Viewport*       viewport_;
-            Ogre::Camera*         fallbackCamera_;
-
-            static CameraManager* singletonPtr_s;
-    };
-}
-
-#endif /* _CameraManager_H__ */
Index: code/trunk/src/orxonox/GSRoot.cc
===================================================================
--- code/trunk/src/orxonox/GSRoot.cc	(revision 5774)
+++ code/trunk/src/orxonox/GSRoot.cc	(revision 5774)
@@ -0,0 +1,58 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "GSRoot.h"
+
+#include "core/Clock.h"
+#include "core/Game.h"
+
+namespace orxonox
+{
+    DeclareGameState(GSRoot, "root", false, false);
+
+    GSRoot::GSRoot(const GameStateInfo& info)
+        : GameState(info)
+    {
+    }
+
+    GSRoot::~GSRoot()
+    {
+    }
+
+    void GSRoot::activate()
+    {
+    }
+
+    void GSRoot::deactivate()
+    {
+    }
+
+    void GSRoot::update(const Clock& time)
+    {
+    }
+}
Index: code/trunk/src/orxonox/GSRoot.h
===================================================================
--- code/trunk/src/orxonox/GSRoot.h	(revision 5774)
+++ code/trunk/src/orxonox/GSRoot.h	(revision 5774)
@@ -0,0 +1,51 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _GSRoot_H__
+#define _GSRoot_H__
+
+#include "OrxonoxPrereqs.h"
+#include "core/GameState.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport GSRoot : public GameState
+    {
+    public:
+        GSRoot(const GameStateInfo& info);
+        ~GSRoot();
+
+        void activate();
+        void deactivate();
+        void update(const Clock& time);
+
+    private:
+    };
+}
+
+#endif /* _GSRoot_H__ */
Index: code/trunk/src/orxonox/Level.cc
===================================================================
--- code/trunk/src/orxonox/Level.cc	(revision 5772)
+++ 	(revision )
@@ -1,177 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "Level.h"
-
-#include "util/Math.h"
-#include "core/Core.h"
-#include "core/CoreIncludes.h"
-#include "core/Loader.h"
-#include "core/Template.h"
-#include "core/XMLFile.h"
-#include "core/XMLPort.h"
-
-#include "infos/PlayerInfo.h"
-#include "gametypes/Gametype.h"
-#include "overlays/OverlayGroup.h"
-#include "sound/SoundBase.h"
-#include "LevelManager.h"
-
-namespace orxonox
-{
-    CreateFactory(Level);
-
-    Level::Level(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
-    {
-        RegisterObject(Level);
-
-        this->registerVariables();
-        this->xmlfilename_ = this->getFilename();
-    }
-
-    Level::~Level()
-    {
-        if (this->isInitialized())
-        {
-            if (LevelManager::getInstancePtr())
-                LevelManager::getInstance().releaseActivity(this);
-
-            if (this->xmlfile_)
-                Loader::unload(this->xmlfile_);
-
-            if(this->ambientsound_ != NULL)
-                delete this->ambientsound_;
-        }
-    }
-
-    void Level::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(Level, XMLPort, xmlelement, mode);
-
-        XMLPortParam(Level, "description", setDescription, getDescription, xmlelement, mode);
-        XMLPortParam(Level, "gametype", setGametypeString, getGametypeString, xmlelement, mode).defaultValues("Gametype");
-
-        XMLPortParamLoadOnly(Level, "ambientsound", loadAmbientSound, xmlelement, mode);
-
-        XMLPortObjectExtended(Level, BaseObject, "", addObject, getObject, xmlelement, mode, true, false);
-    }
-
-    void Level::registerVariables()
-    {
-        registerVariable(this->xmlfilename_, VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile));
-        registerVariable(this->name_,        VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::changedName));
-        registerVariable(this->description_, VariableDirection::ToClient);
-    }
-
-    void Level::networkcallback_applyXMLFile()
-    {
-        COUT(0) << "Loading level \"" << this->xmlfilename_ << "\"..." << std::endl;
-
-        ClassTreeMask mask;
-        mask.exclude(Class(BaseObject));
-        mask.include(Class(Template));
-        mask.include(Class(OverlayGroup)); // HACK to include the ChatOverlay
-
-        this->xmlfile_ = new XMLFile(mask, this->xmlfilename_);
-
-        Loader::open(this->xmlfile_);
-    }
-
-    void Level::setGametypeString(const std::string& gametype)
-    {
-        Identifier* identifier = ClassByString(gametype);
-
-        if (!identifier || !identifier->isA(Class(Gametype)))
-        {
-            COUT(0) << "Error: \"" << gametype << "\" is not a valid gametype." << std::endl;
-            identifier = Class(Gametype);
-            this->gametype_ = "Gametype";
-        }
-        else
-            this->gametype_ = gametype;
-
-std::cout << "Load Gametype: " << this->gametype_ << std::endl;
-
-        Gametype* rootgametype = orxonox_cast<Gametype*>(identifier->fabricate(this));
-        this->setGametype(rootgametype);
-
-std::cout << "root gametype: " << rootgametype->getIdentifier()->getName() << std::endl;
-
-        for (std::list<BaseObject*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
-            (*it)->setGametype(rootgametype);
-
-        if (LevelManager::getInstancePtr())
-            LevelManager::getInstance().requestActivity(this);
-    }
-
-
-    void Level::addObject(BaseObject* object)
-    {
-        this->objects_.push_back(object);
-        object->setGametype(this->getGametype());
-    }
-
-    BaseObject* Level::getObject(unsigned int index) const
-    {
-        unsigned int i = 0;
-        for (std::list<BaseObject*>::const_iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
-        {
-            if (i == index)
-                return (*it);
-            ++i;
-        }
-        return 0;
-    }
-
-    void Level::loadAmbientSound(const std::string& filename)
-    {
-        if(filename == "") return;
-        else
-        {
-            if(this->ambientsound_ == NULL)
-            {
-                this->ambientsound_ = new SoundBase();
-            }
-
-            this->ambientsound_->loadFile(filename);
-            this->ambientsound_->play(true);
-        }
-    }
-
-    void Level::playerEntered(PlayerInfo* player)
-    {
-        COUT(3) << "player entered level (id: " << player->getClientID() << ", name: " << player->getName() << ")" << std::endl;
-        player->setGametype(this->getGametype());
-    }
-
-    void Level::playerLeft(PlayerInfo* player)
-    {
-        COUT(3) << "player left level (id: " << player->getClientID() << ", name: " << player->getName() << ")" << std::endl;
-        player->setGametype(0);
-    }
-}
Index: code/trunk/src/orxonox/Level.h
===================================================================
--- code/trunk/src/orxonox/Level.h	(revision 5772)
+++ 	(revision )
@@ -1,80 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Level_H__
-#define _Level_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <list>
-#include <string>
-#include "core/BaseObject.h"
-#include "network/synchronisable/Synchronisable.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport Level : public BaseObject, public Synchronisable
-    {
-        public:
-            Level(BaseObject* creator);
-            virtual ~Level();
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            void registerVariables();
-
-            inline void setDescription(const std::string& description)
-                { this->description_ = description; }
-            inline const std::string& getDescription() const
-                { return this->description_; }
-
-            void loadAmbientSound(const std::string& filename);
-
-            void playerEntered(PlayerInfo* player);
-            void playerLeft(PlayerInfo* player);
-
-        private:
-            void addObject(BaseObject* object);
-            BaseObject* getObject(unsigned int index) const;
-
-            void setGametypeString(const std::string& gametype);
-            inline const std::string& getGametypeString() const
-                { return this->gametype_; }
-
-            void networkcallback_applyXMLFile();
-
-            std::string            description_;
-            std::string            gametype_;
-            std::string            xmlfilename_;
-            XMLFile*               xmlfile_;
-            std::list<BaseObject*> objects_;
-
-            SoundBase*             ambientsound_;
-    };
-}
-
-#endif /* _Level_H__ */
Index: code/trunk/src/orxonox/LevelManager.cc
===================================================================
--- code/trunk/src/orxonox/LevelManager.cc	(revision 5772)
+++ 	(revision )
@@ -1,150 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "LevelManager.h"
-
-#include <map>
-#include <OgreResourceGroupManager.h>
-
-#include "core/CommandLine.h"
-#include "core/ConfigValueIncludes.h"
-#include "core/Core.h"
-#include "core/CoreIncludes.h"
-#include "core/Loader.h"
-#include "PlayerManager.h"
-#include "Level.h"
-#include "infos/HumanPlayer.h"
-
-namespace orxonox
-{
-    SetCommandLineArgument(level, "").shortcut("l").information("Default level file (overrides LevelManager::defaultLevelName_ configValue)");
-
-    LevelManager* LevelManager::singletonPtr_s = 0;
-
-    LevelManager::LevelManager()
-    {
-        RegisterRootObject(LevelManager);
-        this->setConfigValues();
-
-        // check override
-        if (!CommandLine::getArgument("level")->hasDefaultValue())
-        {
-            ModifyConfigValue(defaultLevelName_, tset, CommandLine::getValue("level").getString());
-        }
-    }
-
-    LevelManager::~LevelManager()
-    {
-    }
-
-    void LevelManager::setConfigValues()
-    {
-        SetConfigValue(defaultLevelName_, "presentation_dm.oxw")
-            .description("Sets the preselection of the level in the main menu.");
-    }
-
-    void LevelManager::requestActivity(Level* level)
-    {
-        this->levels_s.push_back(level);
-        if (this->levels_s.size() == 1)
-            this->activateNextLevel();
-    }
-
-    void LevelManager::releaseActivity(Level* level)
-    {
-        if (this->levels_s.size() > 0)
-        {
-            if (this->levels_s.front() == level)
-            {
-                level->setActive(false);
-                this->levels_s.pop_front();
-                this->activateNextLevel();
-            }
-            else
-            {
-                for (std::list<Level*>::iterator it = this->levels_s.begin(); it != this->levels_s.end(); ++it)
-                    if ((*it) == level)
-                        this->levels_s.erase(it);
-            }
-        }
-    }
-
-    Level* LevelManager::getActiveLevel()
-    {
-        if (this->levels_s.size() > 0)
-            return this->levels_s.front();
-        else
-            return 0;
-    }
-
-    void LevelManager::activateNextLevel()
-    {
-        if (this->levels_s.size() > 0)
-        {
-            this->levels_s.front()->setActive(true);
-            for (std::map<unsigned int, PlayerInfo*>::const_iterator it = PlayerManager::getInstance().getClients().begin(); it != PlayerManager::getInstance().getClients().end(); ++it)
-                this->levels_s.front()->playerEntered(it->second);
-        }
-    }
-
-    void LevelManager::setDefaultLevel(const std::string& levelName)
-    {
-        ModifyConfigValue(defaultLevelName_, set, levelName);
-    }
-
-    const std::string& LevelManager::getDefaultLevel() const
-    {
-        return defaultLevelName_;
-    }
-
-    std::string LevelManager::getAvailableLevelListItem(unsigned int index) const
-    {
-        if (index >= availableLevels_.size())
-            return std::string();
-        else
-            return availableLevels_[index];
-    }
-
-    void LevelManager::compileAvailableLevelList()
-    {
-        availableLevels_.clear();
-
-        availableLevels_ = *Ogre::ResourceGroupManager::getSingleton().findResourceNames(
-            Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, "*.oxw");
-
-        for (std::vector<std::string>::iterator it = availableLevels_.begin(); it != availableLevels_.end();)
-            if (it->find("old/") == 0)
-                it = availableLevels_.erase(it);
-            else
-            {
-                size_t pos = it->find(".oxw");
-                *it = it->substr(0, pos);
-                ++it;
-            }
-    }
-}
Index: code/trunk/src/orxonox/LevelManager.h
===================================================================
--- code/trunk/src/orxonox/LevelManager.h	(revision 5772)
+++ 	(revision )
@@ -1,82 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _LevelManager_H__
-#define _LevelManager_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <cassert>
-#include <list>
-#include <string>
-
-#include "util/Singleton.h"
-#include "core/OrxonoxClass.h"
-
-// tolua_begin
-namespace orxonox
-{
-    class _OrxonoxExport LevelManager
-    // tolua_end
-        : public Singleton<LevelManager>, public OrxonoxClass
-    { // tolua_export
-            friend class Singleton<LevelManager>;
-        public:
-            LevelManager();
-            virtual ~LevelManager();
-
-            void setConfigValues();
-
-            void requestActivity(Level* level);
-            void releaseActivity(Level* level);
-            Level* getActiveLevel();
-
-            void setDefaultLevel(const std::string& levelName); //tolua_export
-            const std::string& getDefaultLevel() const; //tolua_export
-            void compileAvailableLevelList(); //tolua_export
-            std::string getAvailableLevelListItem(unsigned int index) const; //tolua_export
-
-            static LevelManager* getInstancePtr() { return singletonPtr_s; }
-            static LevelManager& getInstance()    { return Singleton<LevelManager>::getInstance(); } // tolua_export
-
-        private:
-            LevelManager(const LevelManager&);
-
-            void activateNextLevel();
-
-            std::list<Level*> levels_s;
-            std::vector<std::string> availableLevels_;
-
-            // config values
-            std::string defaultLevelName_;
-
-            static LevelManager* singletonPtr_s;
-    }; // tolua_export
-} // tolua_export
-
-#endif /* _LevelManager_H__ */
Index: code/trunk/src/orxonox/Main.cc
===================================================================
--- code/trunk/src/orxonox/Main.cc	(revision 5772)
+++ code/trunk/src/orxonox/Main.cc	(revision 5774)
@@ -41,15 +41,5 @@
 #include "core/Game.h"
 #include "core/LuaState.h"
-#include "ToluaBindOrxonox.h"
 #include "Main.h"
-
-SetCommandLineSwitch(console).information("Start in console mode (text IO only)");
-// Shortcuts for easy direct loading
-SetCommandLineSwitch(server).information("Start in server mode");
-SetCommandLineSwitch(client).information("Start in client mode");
-SetCommandLineSwitch(dedicated).information("Start in dedicated server mode");
-SetCommandLineSwitch(standalone).information("Start in standalone mode");
-
-DeclareToluaInterface(Orxonox);
 
 namespace orxonox
@@ -65,32 +55,7 @@
         game->setStateHierarchy(
         "root"
-        " graphics"
-        "  mainMenu"
-        "  standalone"
-        "   level"
-        "  server"
-        "   level"
-        "  client"
-        "   level"
-        " dedicated"
-        "  level"
-        " ioConsole"
         );
 
         game->requestState("root");
-
-        // Some development hacks (not really, but in the future, this calls won't make sense anymore)
-        if (CommandLine::getValue("standalone").getBool())
-            Game::getInstance().requestStates("graphics, standalone, level");
-        else if (CommandLine::getValue("server").getBool())
-            Game::getInstance().requestStates("graphics, server, level");
-        else if (CommandLine::getValue("client").getBool())
-            Game::getInstance().requestStates("graphics, client, level");
-        else if (CommandLine::getValue("dedicated").getBool())
-            Game::getInstance().requestStates("dedicated, level");
-        else if (CommandLine::getValue("console").getBool())
-            Game::getInstance().requestStates("ioConsole");
-        else
-            Game::getInstance().requestStates("graphics, mainMenu");
 
         game->run();
Index: code/trunk/src/orxonox/OrxonoxPrecompiledHeaders.h
===================================================================
--- code/trunk/src/orxonox/OrxonoxPrecompiledHeaders.h	(revision 5772)
+++ 	(revision )
@@ -1,97 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-@file
-@brief
-    Compilation of the most often used header files in the orxonox library
-@details
-    Updated: 13. September 2009
-    Total Files: 88
-*/
-
-#include "OrxonoxConfig.h"
-
-///////////////////////////////////////////
-/////          Stable Headers         /////
-///////////////////////////////////////////
-
-#include <cassert>  // 87
-#include <cstring>  // 87
-#include <fstream>  // 87
-#include <iostream> // 87
-#include <map>      // 87
-#include <set>      // 87
-#include <sstream>  // 87
-#include <string>   // 87
-#include <vector>   // 87
-#include <list>     // 86
-#include <ctime>    // 82
-#include <cmath>    // 81
-#include <deque>    // 81
-#include <queue>    // 81
-
-#include <OgreMath.h>        // 81
-#include <OgreVector2.h>     // 81
-#include <OgreVector3.h>     // 81
-#include <OgreVector4.h>     // 81
-#include <OgreQuaternion.h>  // 81
-#include <OgreColourValue.h> // 81
-
-#include "util/OgreForwardRefs.h"     // 67
-#include <LinearMath/btMotionState.h> // 60
-#include "util/SubString.h" // 55
-#include <tinyxml/ticpp.h>  // 41
-
-//#include <OgreRenderable.h> // 14, 5.1MB
-//#include <OgreSceneNode.h>  // 13, 1MB
-//#include <OgreResourceGroupManager.h> // 12, 1.5MB
-//#include <OgreTexture.h>       // 11, 0.6MB
-//#include <OgreMovableObject.h> // 10, 1.6MB
-//#include <OgreSceneManager.h>  // 9, 8.7MB
-
-///////////////////////////////////////////
-/////       All Rebuild Headers       /////
-///////////////////////////////////////////
-
-#include "core/BaseObject.h"   // 82
-#include "core/CoreIncludes.h" // 80
-
-///////////////////////////////////////////
-/////      Not so Stable Headers      /////
-///////////////////////////////////////////
-
-#include "network/synchronisable/Synchronisable.h" // 70
-#include "util/MultiType.h"    // 65
-#include "core/Executor.h"     // 55
-//#include "core/XMLPort.h"     // 41
-
-
-// Just in case some header included windows.h
-#undef min
-#undef max
Index: code/trunk/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- code/trunk/src/orxonox/OrxonoxPrereqs.h	(revision 5772)
+++ code/trunk/src/orxonox/OrxonoxPrereqs.h	(revision 5774)
@@ -36,6 +36,4 @@
 
 #include "OrxonoxConfig.h"
-
-#include "tools/ToolsPrereqs.h"
 
 //-----------------------------------------------------------------------
Index: code/trunk/src/orxonox/PawnManager.cc
===================================================================
--- code/trunk/src/orxonox/PawnManager.cc	(revision 5772)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "PawnManager.h"
-
-#include "core/CoreIncludes.h"
-#include "worldentities/pawns/Pawn.h"
-
-namespace orxonox
-{
-    PawnManager* PawnManager::singletonPtr_s = 0;
-
-    PawnManager::PawnManager()
-    {
-        RegisterRootObject(PawnManager);
-    }
-
-    PawnManager::~PawnManager()
-    {
-    }
-
-    void PawnManager::touch()
-    {
-        if (!PawnManager::singletonPtr_s)
-            new PawnManager();
-    }
-
-    void PawnManager::tick(float dt)
-    {
-        unsigned int count = 0;
-        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++count)
-        {
-            if (!it->isAlive())
-                delete (*(it++));
-            else
-                ++it;
-        }
-
-        if (count == 0)
-            delete this;
-    }
-}
Index: code/trunk/src/orxonox/PawnManager.h
===================================================================
--- code/trunk/src/orxonox/PawnManager.h	(revision 5772)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _PawnManager_H__
-#define _PawnManager_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "util/Singleton.h"
-#include "tools/interfaces/Tickable.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport PawnManager : protected Singleton<PawnManager>, public Tickable
-    {
-            friend class Singleton<PawnManager>;
-        public:
-            static void touch();
-
-            virtual void tick(float dt);
-
-        private:
-            PawnManager();
-            virtual ~PawnManager();
-
-            static PawnManager* singletonPtr_s;
-    };
-}
-
-#endif /* _PawnManager_H__ */
Index: code/trunk/src/orxonox/PlayerManager.cc
===================================================================
--- code/trunk/src/orxonox/PlayerManager.cc	(revision 5772)
+++ 	(revision )
@@ -1,108 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "PlayerManager.h"
-
-#include "core/CoreIncludes.h"
-#include "core/GameMode.h"
-#include "Level.h"
-#include "infos/HumanPlayer.h"
-#include "LevelManager.h"
-
-namespace orxonox
-{
-    PlayerManager* PlayerManager::singletonPtr_s = 0;
-
-    PlayerManager::PlayerManager()
-    {
-        RegisterRootObject(PlayerManager);
-
-        this->getConnectedClients();
-    }
-
-    PlayerManager::~PlayerManager()
-    {
-    }
-
-    void PlayerManager::clientConnected(unsigned int clientID)
-    {
-        if (GameMode::isMaster())
-        {
-            if (clientID != 0)
-                COUT(3) << "client connected" << std::endl;
-
-            // create new HumanPlayer instance
-            HumanPlayer* player = new HumanPlayer(0);
-            player->setClientID(clientID);
-
-            // add to clients-map
-            assert(!this->clients_[clientID]);
-            this->clients_[clientID] = player;
-
-            if (LevelManager::getInstancePtr() && LevelManager::getInstance().getActiveLevel())
-                LevelManager::getInstance().getActiveLevel()->playerEntered(player);
-        }
-    }
-
-    void PlayerManager::clientDisconnected(unsigned int clientID)
-    {
-        if (GameMode::isMaster())
-        {
-            COUT(3) << "client disconnected" << std::endl;
-
-            // remove from clients-map
-            PlayerInfo* player = this->clients_[clientID];
-            this->clients_.erase(clientID);
-
-            if (LevelManager::getInstancePtr() && LevelManager::getInstance().getActiveLevel())
-                LevelManager::getInstance().getActiveLevel()->playerLeft(player);
-
-            // delete PlayerInfo instance
-            if (player)
-                delete player;
-        }
-    }
-
-
-    PlayerInfo* PlayerManager::getClient(unsigned int clientID) const
-    {
-        if (GameMode::isMaster())
-        {
-            std::map<unsigned int, PlayerInfo*>::const_iterator it = this->clients_.find(clientID);
-            if (it != this->clients_.end())
-                return it->second;
-        }
-        else
-        {
-            for (ObjectList<PlayerInfo>::iterator it = ObjectList<PlayerInfo>::begin(); it != ObjectList<PlayerInfo>::end(); ++it)
-                if (it->getClientID() == clientID)
-                    return (*it);
-        }
-        return 0;
-    }
-}
Index: code/trunk/src/orxonox/PlayerManager.h
===================================================================
--- code/trunk/src/orxonox/PlayerManager.h	(revision 5772)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _PlayerManager_H__
-#define _PlayerManager_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <cassert>
-#include <map>
-#include "util/Singleton.h"
-#include "network/ClientConnectionListener.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport PlayerManager : public Singleton<PlayerManager>, public ClientConnectionListener
-    {
-            friend class Singleton<PlayerManager>;
-        public:
-            PlayerManager();
-            virtual ~PlayerManager();
-
-            PlayerInfo* getClient(unsigned int clientID) const;
-            inline const std::map<unsigned int, PlayerInfo*>& getClients() const
-                { return this->clients_; }
-
-        private:
-            void clientConnected(unsigned int clientID);
-            void clientDisconnected(unsigned int clientID);
-
-            std::map<unsigned int, PlayerInfo*> clients_;
-
-            static PlayerManager* singletonPtr_s;
-    };
-}
-
-#endif /* _PlayerManager_H__ */
Index: code/trunk/src/orxonox/Radar.cc
===================================================================
--- code/trunk/src/orxonox/Radar.cc	(revision 5772)
+++ 	(revision )
@@ -1,216 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      Felix Schulthess
- *
- */
-
-/**
-@file
-@brief
-*/
-
-#include "Radar.h"
-
-#include <cassert>
-
-//#include "util/Math.h"
-#include "core/ConsoleCommand.h"
-#include "core/ObjectList.h"
-#include "interfaces/RadarListener.h"
-
-namespace orxonox
-{
-    SetConsoleCommand(Radar, cycleNavigationFocus, true).accessLevel(AccessLevel::User);
-    SetConsoleCommand(Radar, releaseNavigationFocus, true).accessLevel(AccessLevel::User);
-
-    Radar* Radar::instance_s = 0;
-
-    Radar::Radar()
-        : focus_(0)
-        , objectTypeCounter_(0)
-    {
-        assert(instance_s == 0);
-        instance_s = this;
-
-        // TODO: make this mapping configurable. Maybe there's a possibility with self configured
-        //       configValues..
-        this->objectTypes_["Asteroid"] = RadarViewable::Dot;
-        this->objectTypes_["SpaceShip"] = RadarViewable::Square;
-        this->objectTypes_["AsdfQwerty"] = RadarViewable::Triangle;
-
-        /*WorldEntity* object;
-        object = new WorldEntity();
-        object->setPosition(2000.0, 0.0, 0.0);
-        addRadarObject(object, ColourValue(0.5, 0, 0, 1));
-        object = new WorldEntity();
-        object->setPosition(0.0, 2000.0, 0.0);
-        addRadarObject(object, ColourValue(0.5, 0, 0, 1));
-        object = new WorldEntity();
-        object->setPosition(0.0, 0.0, 2000.0);
-        addRadarObject(object, ColourValue(0.5, 0, 0, 1));
-        object = new WorldEntity();
-        object->setPosition(10000.0,16000.0,0.0);
-        addRadarObject(object);*/
-
-    }
-
-    Radar::~Radar()
-    {
-        instance_s = 0;
-    }
-
-    const RadarViewable* Radar::getFocus()
-    {
-        return *(this->itFocus_);
-    }
-
-    RadarViewable::Shape Radar::addObjectDescription(const std::string name)
-    {
-        std::map<std::string, RadarViewable::Shape>::iterator it = this->objectTypes_.find(name);
-        if (it == this->objectTypes_.end())
-            return this->objectTypes_[name] = RadarViewable::Square; // default, configure!!
-        else
-            return this->objectTypes_[name];
-    }
-
-
-    void Radar::tick(float dt)
-    {
-        SUPER(Radar, tick, dt);
-
-        if (this->focus_ != *(this->itFocus_))
-        {
-            // focus object was deleted, release focus
-            this->focus_ = 0;
-            this->itFocus_ = 0;
-        }
-
-        for (ObjectList<RadarListener>::iterator itListener = ObjectList<RadarListener>::begin(); itListener; ++itListener)
-        {
-            (*itListener)->radarTick(dt);
-
-            for (ObjectList<RadarViewable>::iterator itElement = ObjectList<RadarViewable>::begin(); itElement; ++itElement)
-            {
-                if ((*itElement)->getRadarVisibility())
-                    if ((*itListener)->getRadarSensitivity() > (*itElement)->getRadarObjectCamouflage())
-                        (*itListener)->displayObject(*itElement, *itElement == this->focus_);
-            }
-        }
-    }
-
-    void Radar::cycleFocus()
-    {
-        if (ObjectList<RadarViewable>::begin() == 0)
-        {
-            // list is empty
-            this->itFocus_ = 0;
-            this->focus_ = 0;
-        }
-/*
-        else if (this->owner_)
-        {
-            Vector3 localPosition = this->owner_->getPosition();
-            Vector3 targetPosition = localPosition;
-            if (*(this->itFocus_))
-                targetPosition = this->itFocus_->getRVWorldPosition();
-
-            // find the closed object further away than targetPosition
-            float currentDistance = localPosition.squaredDistance(targetPosition);
-            float nextDistance = FLT_MAX;
-            float minimumDistance = FLT_MAX;
-            ObjectList<RadarViewable>::iterator itFallback = 0;
-
-            for (ObjectList<RadarViewable>::iterator it = ObjectList<RadarViewable>::begin(); it; ++it)
-            {
-                if (*it == static_cast<RadarViewable*>(this)->owner_)
-                    continue;
-
-                float targetDistance = localPosition.squaredDistance((*it)->getRVWorldPosition());
-                if (targetDistance > currentDistance && targetDistance < nextDistance)
-                {
-                    this->itFocus_ = it;
-                    nextDistance = targetDistance;
-                }
-                if (targetDistance < minimumDistance)
-                {
-                    itFallback = it;
-                    minimumDistance = targetDistance;
-                }
-            }
-
-            if (nextDistance == FLT_MAX)
-            {
-                // we already had the furthest object
-                this->itFocus_ = itFallback;
-                this->focus_ = *itFallback;
-            }
-            else
-            {
-                this->focus_ = *(this->itFocus_);
-            }
-        }
-*/
-    }
-
-    void Radar::releaseFocus()
-    {
-        this->itFocus_ = 0;
-        this->focus_ = 0;
-    }
-
-    void Radar::listObjects() const
-    {
-        COUT(3) << "List of RadarObjects:\n";
-        // iterate through all Radar Objects
-        unsigned int i = 0;
-        for (ObjectList<RadarViewable>::iterator it = ObjectList<RadarViewable>::begin(); it; ++it, ++i)
-        {
-            COUT(3) << i++ << ": " << (*it)->getRVWorldPosition() << std::endl;
-        }
-    }
-
-
-    /*static*/ Radar& Radar::getInstance()
-    {
-        assert(instance_s);
-        return *instance_s;
-    }
-
-    /*static*/ void Radar::cycleNavigationFocus()
-    {
-        // avoid using getInstance because of the assert().
-        // User might call this fuction even if HUDNavigation doesn't exist.
-        if (instance_s)
-            instance_s->cycleFocus();
-    }
-
-    /*static*/ void Radar::releaseNavigationFocus()
-    {
-        // avoid using getInstance because of the assert().
-        // User might call this fuction even if HUDNavigation doesn't exist.
-        if (instance_s)
-            instance_s->releaseFocus();
-    }
-}
Index: code/trunk/src/orxonox/Radar.h
===================================================================
--- code/trunk/src/orxonox/Radar.h	(revision 5772)
+++ 	(revision )
@@ -1,92 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Reto Grieder
- *   Co-authors:
- *      Felix Schulthess
- *
- */
-
-/**
-@file
-@brief
-*/
-
-#ifndef _Radar_H__
-#define _Radar_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <map>
-#include <string>
-
-#include "core/ObjectListIterator.h"
-#include "interfaces/RadarViewable.h"
-#include "tools/interfaces/Tickable.h"
-
-namespace orxonox
-{
-    /**
-    @brief This class merely ensures that no one can inherit from Radar.
-    */
-    class _OrxonoxExport RadarBase
-    {
-    private:
-        friend class Radar;
-        RadarBase() { }
-    };
-
-    class _OrxonoxExport Radar : public Tickable, private virtual RadarBase
-    {
-    public:
-        Radar();
-        ~Radar();
-
-        virtual void tick(float dt);
-
-        const RadarViewable* getFocus();
-        RadarViewable::Shape addObjectDescription(const std::string name);
-
-        void listObjects() const;
-
-        static Radar& getInstance();
-        static Radar* getInstancePtr() { return instance_s; }
-
-        static void cycleNavigationFocus();
-        static void releaseNavigationFocus();
-
-    private:
-        Radar(Radar& instance);
-
-        void releaseFocus();
-        void updateFocus();
-        void cycleFocus();
-
-        ObjectListIterator<RadarViewable> itFocus_;
-        RadarViewable* focus_;
-        std::map<std::string, RadarViewable::Shape> objectTypes_;
-        int objectTypeCounter_;
-
-        static Radar* instance_s;
-    };
-}
-#endif /* _Radar_H__ */
Index: code/trunk/src/orxonox/Scene.cc
===================================================================
--- code/trunk/src/orxonox/Scene.cc	(revision 5772)
+++ 	(revision )
@@ -1,345 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *      Reto Grieder (physics)
- *   Co-authors:
- *      ...
- *
- */
-
-#include "Scene.h"
-
-#include <OgreRoot.h>
-#include <OgreSceneManager.h>
-#include <OgreSceneManagerEnumerator.h>
-#include <OgreSceneNode.h>
-
-#include <BulletCollision/BroadphaseCollision/btAxisSweep3.h>
-#include <BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h>
-#include <BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h>
-#include <BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h>
-
-#include "core/CoreIncludes.h"
-#include "core/GameMode.h"
-#include "core/XMLPort.h"
-#include "tools/BulletConversions.h"
-#include "worldentities/WorldEntity.h"
-
-namespace orxonox
-{
-    CreateFactory(Scene);
-
-    Scene::Scene(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
-    {
-        RegisterObject(Scene);
-
-        this->setScene(this);
-        this->bShadows_ = true;
-
-        if (GameMode::showsGraphics())
-        {
-            assert(Ogre::Root::getSingletonPtr());
-            this->sceneManager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC);
-            this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
-        }
-        else
-        {
-            // create a dummy SceneManager of our own since we don't have Ogre::Root.
-            this->sceneManager_ = new Ogre::DefaultSceneManager("");
-            this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
-        }
-
-        // No physics yet, XMLPort will do that.
-        const int defaultMaxWorldSize = 100000;
-        this->negativeWorldRange_ = Vector3::UNIT_SCALE * -defaultMaxWorldSize;
-        this->positiveWorldRange_ = Vector3::UNIT_SCALE *  defaultMaxWorldSize;
-        this->gravity_ = Vector3::ZERO;
-        this->physicalWorld_   = 0;
-        this->solver_          = 0;
-        this->dispatcher_      = 0;
-        this->collisionConfig_ = 0;
-        this->broadphase_      = 0;
-
-        this->registerVariables();
-    }
-
-    Scene::~Scene()
-    {
-        if (this->isInitialized())
-        {
-            if (GameMode::showsGraphics())
-                Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_);
-            else
-                delete this->sceneManager_;
-
-            this->setPhysicalWorld(false);
-        }
-    }
-
-    void Scene::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(Scene, XMLPort, xmlelement, mode);
-
-        XMLPortParam(Scene, "skybox", setSkybox, getSkybox, xmlelement, mode);
-        XMLPortParam(Scene, "ambientlight", setAmbientLight, getAmbientLight, xmlelement, mode).defaultValues(ColourValue(0.2f, 0.2f, 0.2f, 1.0f));
-        XMLPortParam(Scene, "shadow", setShadow, getShadow, xmlelement, mode).defaultValues(true);
-
-        XMLPortParam(Scene, "gravity", setGravity, getGravity, xmlelement, mode);
-        XMLPortParam(Scene, "negativeWorldRange", setNegativeWorldRange, getNegativeWorldRange, xmlelement, mode);
-        XMLPortParam(Scene, "positiveWorldRange", setPositiveWorldRange, getPositiveWorldRange, xmlelement, mode);
-        XMLPortParam(Scene, "hasPhysics", setPhysicalWorld, hasPhysics, xmlelement, mode).defaultValues(true);
-
-        XMLPortObjectExtended(Scene, BaseObject, "", addObject, getObject, xmlelement, mode, true, false);
-    }
-
-    void Scene::registerVariables()
-    {
-        registerVariable(this->skybox_,             VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox));
-        registerVariable(this->ambientLight_,       VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight));
-        registerVariable(this->negativeWorldRange_, VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_negativeWorldRange));
-        registerVariable(this->positiveWorldRange_, VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_positiveWorldRange));
-        registerVariable(this->gravity_,            VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_gravity));
-        registerVariable(this->bHasPhysics_,        VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_hasPhysics));
-        registerVariable(this->bShadows_,           VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyShadows));
-    }
-
-    void Scene::setNegativeWorldRange(const Vector3& range)
-    {
-        if (range.length() < 10.0f)
-        {
-            CCOUT(2) << "Warning: Setting the negative world range to a very small value: "
-                     << multi_cast<std::string>(range) << std::endl;
-        }
-        if (this->hasPhysics())
-        {
-            CCOUT(2) << "Warning: Attempting to set the physical world range at run time. "
-                     << "This causes a complete physical reload which might take some time." << std::endl;
-            this->setPhysicalWorld(false);
-            this->negativeWorldRange_ = range;
-            this->setPhysicalWorld(true);
-        }
-        else
-            this->negativeWorldRange_ = range;
-    }
-
-    void Scene::setPositiveWorldRange(const Vector3& range)
-    {
-        if (range.length() < 10.0f)
-        {
-            CCOUT(2) << "Warning: Setting the positive world range to a very small value: "
-                     << multi_cast<std::string>(range) << std::endl;
-        }
-        if (this->hasPhysics())
-        {
-            CCOUT(2) << "Warning: Attempting to set the physical world range at run time. "
-                     << "This causes a complete physical reload which might take some time." << std::endl;
-            this->setPhysicalWorld(false);
-            this->positiveWorldRange_ = range;
-            this->setPhysicalWorld(true);
-        }
-        else
-            this->positiveWorldRange_ = range;
-    }
-
-    void Scene::setGravity(const Vector3& gravity)
-    {
-        this->gravity_ = gravity;
-        if (this->hasPhysics())
-            this->physicalWorld_->setGravity(multi_cast<btVector3>(this->gravity_));
-    }
-
-    void Scene::setPhysicalWorld(bool wantPhysics)
-    {
-        this->bHasPhysics_ = wantPhysics;
-        if (wantPhysics && !hasPhysics())
-        {
-            // Note: These are all little known default classes and values.
-            //       It would require further investigation to properly dertermine the right choices.
-            this->broadphase_      = new bt32BitAxisSweep3(
-                multi_cast<btVector3>(this->negativeWorldRange_), multi_cast<btVector3>(this->positiveWorldRange_));
-            this->collisionConfig_ = new btDefaultCollisionConfiguration();
-            this->dispatcher_      = new btCollisionDispatcher(this->collisionConfig_);
-            this->solver_          = new btSequentialImpulseConstraintSolver();
-
-            this->physicalWorld_   = new btDiscreteDynamicsWorld(this->dispatcher_, this->broadphase_, this->solver_, this->collisionConfig_);
-            this->physicalWorld_->setGravity(multi_cast<btVector3>(this->gravity_));
-
-            // also set the collision callback variable.
-            // Note: This is a global variable which we assign a static function.
-            // TODO: Check whether this (or anything about Bullet) works with multiple physics engine instances.
-            gContactAddedCallback = &Scene::collisionCallback;
-        }
-        else if (!wantPhysics && hasPhysics())
-        {
-            // Remove all WorldEntities and shove them to the queue since they would still like to be in a physical world.
-            for (std::set<WorldEntity*>::const_iterator it = this->physicalObjects_.begin();
-                it != this->physicalObjects_.end(); ++it)
-            {
-                this->physicalWorld_->removeRigidBody((*it)->physicalBody_);
-                this->physicalObjectQueue_.insert(*it);
-            }
-            this->physicalObjects_.clear();
-
-            delete this->physicalWorld_;
-            delete this->solver_;
-            delete this->dispatcher_;
-            delete this->collisionConfig_;
-            delete this->broadphase_;
-            this->physicalWorld_   = 0;
-            this->solver_          = 0;
-            this->dispatcher_      = 0;
-            this->collisionConfig_ = 0;
-            this->broadphase_      = 0;
-        }
-    }
-
-    void Scene::tick(float dt)
-    {
-        if (!GameMode::showsGraphics())
-        {
-            // We need to update the scene nodes if we don't render
-            this->rootSceneNode_->_update(true, false);
-        }
-        if (this->hasPhysics())
-        {
-            // TODO: This here is bad practice! It will slow down the first tick() by ages.
-            //       Rather have an initialise() method as well, called by the Level after everything has been loaded.
-            if (this->physicalObjectQueue_.size() > 0)
-            {
-                // Add all scheduled WorldEntities
-                for (std::set<WorldEntity*>::const_iterator it = this->physicalObjectQueue_.begin();
-                    it != this->physicalObjectQueue_.end(); ++it)
-                {
-                    this->physicalWorld_->addRigidBody((*it)->physicalBody_);
-                    this->physicalObjects_.insert(*it);
-                }
-                this->physicalObjectQueue_.clear();
-            }
-
-            // Note: 60 means that Bullet will do physics correctly down to 1 frames per seconds.
-            //       Under that mark, the simulation will "loose time" and get unusable.
-            physicalWorld_->stepSimulation(dt, 60);
-        }
-    }
-
-    void Scene::setSkybox(const std::string& skybox)
-    {
-        if (GameMode::showsGraphics() && this->sceneManager_)
-            this->sceneManager_->setSkyBox(true, skybox);
-
-        this->skybox_ = skybox;
-    }
-
-    void Scene::setAmbientLight(const ColourValue& colour)
-    {
-        if (GameMode::showsGraphics() && this->sceneManager_)
-            this->sceneManager_->setAmbientLight(colour);
-
-        this->ambientLight_ = colour;
-    }
-
-    void Scene::setShadow(bool bShadow)
-    {
-        if (GameMode::showsGraphics() && this->sceneManager_)
-        {
-            if (bShadow)
-                this->sceneManager_->setShadowTechnique(Ogre::SHADOWTYPE_STENCIL_ADDITIVE);
-            else
-                this->sceneManager_->setShadowTechnique(Ogre::SHADOWTYPE_NONE);
-        }
-
-        this->bShadows_ = bShadow;
-    }
-
-    void Scene::addObject(BaseObject* object)
-    {
-        this->objects_.push_back(object);
-        object->setScene(this);
-    }
-
-    BaseObject* Scene::getObject(unsigned int index) const
-    {
-        unsigned int i = 0;
-        for (std::list<BaseObject*>::const_iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
-        {
-            if (i == index)
-                return (*it);
-            ++i;
-        }
-        return 0;
-    }
-
-    void Scene::addPhysicalObject(WorldEntity* object)
-    {
-        if (object)
-        {
-            std::set<WorldEntity*>::iterator it = this->physicalObjects_.find(object);
-            if (it != this->physicalObjects_.end())
-                return;
-
-            this->physicalObjectQueue_.insert(object);
-        }
-    }
-
-    void Scene::removePhysicalObject(WorldEntity* object)
-    {
-        // check queue first
-        std::set<WorldEntity*>::iterator it = this->physicalObjectQueue_.find(object);
-        if (it != this->physicalObjectQueue_.end())
-        {
-            this->physicalObjectQueue_.erase(it);
-            return;
-        }
-
-        it = this->physicalObjects_.find(object);
-        if (it == this->physicalObjects_.end())
-            return;
-        this->physicalObjects_.erase(it);
-
-        if (this->hasPhysics())
-            this->physicalWorld_->removeRigidBody(object->physicalBody_);
-    }
-
-    /*static*/ bool Scene::collisionCallback(btManifoldPoint& cp, const btCollisionObject* colObj0, int partId0,
-                                             int index0, const btCollisionObject* colObj1, int partId1, int index1)
-    {
-        // get the WorldEntity pointers
-        WorldEntity* object0 = static_cast<WorldEntity*>(colObj0->getUserPointer());
-        assert(orxonox_cast<WorldEntity*>(object0));
-        WorldEntity* object1 = static_cast<WorldEntity*>(colObj1->getUserPointer());
-        assert(orxonox_cast<WorldEntity*>(object1));
-
-        // false means that bullet will assume we didn't modify the contact
-        bool modified = false;
-        if (object0->isCollisionCallbackActive())
-        {
-            modified |= object0->collidesAgainst(object1, cp);
-            if (object1->isCollisionCallbackActive())
-                modified |= object1->collidesAgainst(object0, cp);
-        }
-        else
-            modified |= object1->collidesAgainst(object0, cp);
-
-        return modified;
-    }
-}
Index: code/trunk/src/orxonox/Scene.h
===================================================================
--- code/trunk/src/orxonox/Scene.h	(revision 5772)
+++ 	(revision )
@@ -1,149 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *      Reto Grieder (physics)
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Scene_H__
-#define _Scene_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <list>
-#include <set>
-#include <string>
-
-#include "util/Math.h"
-#include "util/OgreForwardRefs.h"
-#include "core/BaseObject.h"
-#include "network/synchronisable/Synchronisable.h"
-#include "tools/interfaces/Tickable.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport Scene : public BaseObject, public Synchronisable, public Tickable
-    {
-        public:
-            Scene(BaseObject* creator);
-            virtual ~Scene();
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            void registerVariables();
-
-            inline Ogre::SceneManager* getSceneManager() const
-                { return this->sceneManager_; }
-            inline Ogre::SceneNode* getRootSceneNode() const
-                { return this->rootSceneNode_; }
-
-            void setSkybox(const std::string& skybox);
-            inline const std::string& getSkybox() const
-                { return this->skybox_; }
-
-            void setAmbientLight(const ColourValue& colour);
-            inline const ColourValue& getAmbientLight() const
-                { return this->ambientLight_; }
-
-            void setShadow(bool bShadow);
-            inline bool getShadow() const
-                { return this->bShadows_; }
-
-            virtual void tick(float dt);
-
-        private:
-            void addObject(BaseObject* object);
-            BaseObject* getObject(unsigned int index) const;
-
-            void networkcallback_applySkybox()
-                { this->setSkybox(this->skybox_); }
-            void networkcallback_applyAmbientLight()
-                { this->setAmbientLight(this->ambientLight_); }
-            void networkcallback_applyShadows()
-                { this->setShadow(this->bShadows_); }
-
-            Ogre::SceneManager*      sceneManager_;
-            Ogre::SceneNode*         rootSceneNode_;
-
-            std::string              skybox_;
-            ColourValue              ambientLight_;
-            std::list<BaseObject*>   objects_;
-            bool                     bShadows_;
-
-
-        /////////////
-        // Physics //
-        /////////////
-
-        public:
-            inline bool hasPhysics()
-                { return this->physicalWorld_ != 0; }
-            void setPhysicalWorld(bool wantsPhysics);
-
-            void setNegativeWorldRange(const Vector3& range);
-            inline const Vector3& getNegativeWorldRange() const
-                { return this->negativeWorldRange_; }
-
-            void setPositiveWorldRange(const Vector3& range);
-            inline const Vector3& getPositiveWorldRange() const
-                { return this->positiveWorldRange_; }
-
-            void setGravity(const Vector3& gravity);
-            inline const Vector3& getGravity() const
-                { return this->gravity_; }
-
-            void addPhysicalObject(WorldEntity* object);
-            void removePhysicalObject(WorldEntity* object);
-
-        private:
-            inline void networkcallback_hasPhysics()
-                { this->setPhysicalWorld(this->bHasPhysics_); }
-            inline void networkcallback_negativeWorldRange()
-                { this->setNegativeWorldRange(this->negativeWorldRange_); }
-            inline void networkcallback_positiveWorldRange()
-                { this->setPositiveWorldRange(this->positiveWorldRange_); }
-            inline void networkcallback_gravity()
-                { this->setGravity(this->gravity_); }
-
-            // collision callback from bullet
-            static bool collisionCallback(btManifoldPoint& cp, const btCollisionObject* colObj0, int partId0,
-                                          int index0, const btCollisionObject* colObj1, int partId1, int index1);
-
-            // Bullet objects
-            btDiscreteDynamicsWorld*             physicalWorld_;
-            bt32BitAxisSweep3*                   broadphase_;
-            btDefaultCollisionConfiguration*     collisionConfig_;
-            btCollisionDispatcher*               dispatcher_;
-            btSequentialImpulseConstraintSolver* solver_;
-
-            std::set<WorldEntity*>               physicalObjectQueue_;
-            std::set<WorldEntity*>               physicalObjects_;
-            bool                                 bHasPhysics_;
-            Vector3                              negativeWorldRange_;
-            Vector3                              positiveWorldRange_;
-            Vector3                              gravity_;
-    };
-}
-
-#endif /* _Scene_H__ */
Index: code/trunk/src/orxonox/Test.cc
===================================================================
--- code/trunk/src/orxonox/Test.cc	(revision 5772)
+++ 	(revision )
@@ -1,145 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Oli Scheuss
- *   Co-authors:
- *      ...
- *
- */
-
-#include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
-#include "core/ConsoleCommand.h"
-#include "network/NetworkFunction.h"
-#include "Test.h"
-#include "util/MultiType.h"
-
-namespace orxonox
-{
-	CreateFactory ( Test );
-  
-  SetConsoleCommand(Test, printV1, true).accessLevel(AccessLevel::User);
-  SetConsoleCommand(Test, printV2, true).accessLevel(AccessLevel::User);
-  SetConsoleCommand(Test, printV3, true).accessLevel(AccessLevel::User);
-  SetConsoleCommand(Test, printV4, true).accessLevel(AccessLevel::User);
-  SetConsoleCommand(Test, call, true).accessLevel(AccessLevel::User);
-  SetConsoleCommand(Test, call2, true).accessLevel(AccessLevel::User);
-  
-  
-  //void=* aaaaa = copyPtr<sizeof(&Test::printV1)>( &NETWORK_FUNCTION_POINTER, &Test::printV1 );
-  //void* NETWORK_FUNCTION_TEST_B = memcpy(&NETWORK_FUNCTION_POINTER, &a, sizeof(a));
-//   NetworkFunctionBase* NETWORK_FUNCTION_TEST_C = new NetworkFunctionStatic( createFunctor(&Test::printV1), "bla", NETWORK_FUNCTION_POINTER );
-  
-  registerStaticNetworkFunction( &Test::printV1 );
-  registerMemberNetworkFunction( Test, checkU1 );
-  registerMemberNetworkFunction( Test, printBlaBla );
-  
-  Test* Test::instance_ = 0;
-
-	Test::Test(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
-	{
-    assert(instance_==0);
-    instance_=this;
-		RegisterObject ( Test );
-    setConfigValues();
-    registerVariables();
-		setObjectMode(0x3);
-	}
-
-	Test::~Test()
-	{
-    instance_=0;
-	}
-
-	void Test::setConfigValues()
-	{
-		SetConfigValue ( u1, 1 )/*.callback ( this, &Test::checkV1 )*/;
-    SetConfigValue ( u2, 2 )/*.callback ( this, &Test::checkV2 )*/;
-    SetConfigValue ( u3, 3 )/*.callback ( this, &Test::checkV3 )*/;
-    SetConfigValue ( u4, 4 )/*.callback ( this, &Test::checkV4 )*/;
-    
-    SetConfigValue ( s1, 1 )/*.callback ( this, &Test::checkV1 )*/;
-    SetConfigValue ( s2, 2 )/*.callback ( this, &Test::checkV2 )*/;
-    SetConfigValue ( s3, 3 )/*.callback ( this, &Test::checkV3 )*/;
-    SetConfigValue ( s4, 4 )/*.callback ( this, &Test::checkV4 )*/;
-	}
-
-
-  void Test::registerVariables()
-  {
-    registerVariable ( u1, variableDirection::toclient, new NetworkCallback<Test> ( this, &Test::checkU1 ));
-    registerVariable ( u2, variableDirection::toserver, new NetworkCallback<Test> ( this, &Test::checkU2 ));
-    registerVariable ( u3, variableDirection::serverMaster, new NetworkCallback<Test> ( this, &Test::checkU3 ), true );
-    registerVariable ( u4, variableDirection::clientMaster, new NetworkCallback<Test> ( this, &Test::checkU4 ), true );
-    
-    registerVariable ( s1, variableDirection::toclient, new NetworkCallback<Test> ( this, &Test::checkS1 ));
-    registerVariable ( s2, variableDirection::toserver, new NetworkCallback<Test> ( this, &Test::checkS2 ));
-    registerVariable ( s3, variableDirection::serverMaster, new NetworkCallback<Test> ( this, &Test::checkS3 ), true );
-    registerVariable ( s4, variableDirection::clientMaster, new NetworkCallback<Test> ( this, &Test::checkS4 ), true );
-  }
-  
-  void Test::call(unsigned int clientID)
-  {
-    callStaticNetworkFunction( &Test::printV1, clientID );
-    callStaticNetworkFunction( &Test::printV1, clientID );
-  }
-  
-  void Test::call2(unsigned int clientID, std::string s1, std::string s2, std::string s3, std::string s4)
-  {
-    callMemberNetworkFunction( Test, printBlaBla, this->getObjectID(), clientID, s1, s2, s3, s4, s4 );
-  }
-  
-  void Test::tick(float dt)
-  {
-//     std::string str1 = "blub";
-//     //MultiType mt1(std::string("blub"));
-//     MultiType mt1(str1);
-//     uint8_t* mem = new uint8_t[mt1.getNetworkSize()];
-//     uint8_t* temp = mem;
-//     mt1.exportData( temp );
-//     assert( temp-mem == mt1.getNetworkSize() );
-//     MultiType mt2;
-//     temp = mem;
-//     mt2.importData( temp );
-//     assert( temp-mem == mt1.getNetworkSize() );
-//     COUT(0) << mt2 << endl;
-    if(!Core::isMaster())
-      call2(0, "bal", "a", "n", "ce");
-//       callMemberNetworkFunction( Test, checkU1, this->getObjectID(), 0 );
-  }
-  
-  void Test::printBlaBla(std::string s1, std::string s2, std::string s3, std::string s4, std::string s5)
-  {
-    COUT(0) << s1 << s2 << s3 << s4 << s5 << endl;
-  }
-  
-  void Test::checkU1(){ COUT(1) << "U1 changed: " << u1 << std::endl; }
-  void Test::checkU2(){ COUT(1) << "U2 changed: " << u2 << std::endl; }
-  void Test::checkU3(){ COUT(1) << "U3 changed: " << u3 << std::endl; }
-  void Test::checkU4(){ COUT(1) << "U4 changed: " << u4 << std::endl; }
-
-  void Test::checkS1(){ COUT(1) << "S1 changed: " << s1 << std::endl; }
-  void Test::checkS2(){ COUT(1) << "S2 changed: " << s2 << std::endl; }
-  void Test::checkS3(){ COUT(1) << "S3 changed: " << s3 << std::endl; }
-  void Test::checkS4(){ COUT(1) << "S4 changed: " << s4 << std::endl; }
-
-}
Index: code/trunk/src/orxonox/Test.h
===================================================================
--- code/trunk/src/orxonox/Test.h	(revision 5772)
+++ 	(revision )
@@ -1,100 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Oli Scheuss
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Test_H__
-#define _Test_H__
-
-#include "OrxonoxPrereqs.h"
-#include "core/BaseObject.h"
-#include "network/synchronisable/Synchronisable.h"
-#include "tools/interfaces/Tickable.h"
-
-
-typedef int TYPE;
-typedef unsigned int UTYPE;
-
-
-namespace orxonox
-{
-  class _OrxonoxExport Test: public BaseObject, public Synchronisable, public Tickable
-  {
-    public:
-      Test(BaseObject* creator);
-      virtual ~Test();
-
-      void setConfigValues();
-      void registerVariables();
-
-      static void call(unsigned int clientID);
-      void call2(unsigned int clientID, std::string s1, std::string s2, std::string s3, std::string s4);
-      virtual void tick(float dt);
-
-
-      //unsigned functions
-      void setU1(UTYPE value){ u1 = value; }
-      void setU2(UTYPE value){ u2 = value; }
-      void setU3(UTYPE value){ u3 = value; }
-      void setU4(UTYPE value){ u4 = value; }
-      void checkU1();
-      void checkU2();
-      void checkU3();
-      void checkU4();
-
-      //signed functions
-      void setS1(TYPE value){ s1 = value; }
-      void setS2(TYPE value){ s2 = value; }
-      void setS3(TYPE value){ s3 = value; }
-      void setS4(TYPE value){ s4 = value; }
-      void checkS1();
-      void checkS2();
-      void checkS3();
-      void checkS4();
-
-      static void printV1(){ instance_->checkU1(); }
-      static void printV2(){ instance_->checkU2(); }
-      static void printV3(){ instance_->checkU3(); }
-      static void printV4(){ instance_->checkU4(); }
-
-      void printBlaBla(std::string s1, std::string s2, std::string s3, std::string s4, std::string s5);
-
-    private:
-      UTYPE u1;
-      UTYPE u2;
-      UTYPE u3;
-      UTYPE u4;
-
-      TYPE s1;
-      TYPE s2;
-      TYPE s3;
-      TYPE s4;
-
-      static Test* instance_;
-  };
-}
-
-#endif /* _Test_H__ */
