Index: /orxonox/trunk/src/Makefile.am
===================================================================
--- /orxonox/trunk/src/Makefile.am	(revision 3474)
+++ /orxonox/trunk/src/Makefile.am	(revision 3475)
@@ -3,4 +3,6 @@
 AM_CXXFLAGS+="-I./mathlib"
 AM_CXXFLAGS+="-I./lib"
+AM_CXXFLAGS+="-I./defs"
+AM_CXXFLAGS+="-I./font"
 
 AM_LDFLAGS= $(MWINDOWS)
@@ -12,5 +14,5 @@
 
 orxonox_SOURCES= orxonox.cc \
-		 world.cc \
+		 story_entities/world.cc \
 		 world_entities/player.cc \
 		 data_tank.cc \
@@ -40,12 +42,12 @@
 		 mathlib/curve.cc \
 		 glmenu_imagescreen.cc \
-		 skysphere.cc \
+		 world_entities/skysphere.cc \
 		 light.cc \
-		 sfont/fontset.cc 
+		 font/fontset.cc 
 
 noinst_HEADERS = ability.h \
 		 data_tank.h \
 		 world_entities/npc.h \
-		 stdincl.h \
+		 defs/stdincl.h \
 		 glincl.h \
 		 ai.h \
@@ -54,5 +56,5 @@
 		 synchronisable.h \
 		 base_entity.h \
-		 error.h \
+		 defs/error.h \
 		 world_entities/player.h \
 		 camera.h \
@@ -62,5 +64,5 @@
 		 keynames.h \
 		 proto_class.h \
-		 world.h \
+		 story_entities/world.h \
 		 command_node.h \
 		 lib/list.h \
@@ -82,8 +84,8 @@
 		 mathlib/curve.h \
 		 glmenu_imagescreen.h \
-		 debug.h \
-		 skysphere.h \
+		 defs/debug.h \
+		 world_entities/skysphere.h \
 		 light.h \
-		 sfont/fontset.h
+		 font/fontset.h
 
 ## orxonox.conf will be used from home-dir instead.
Index: /orxonox/trunk/src/Makefile.in
===================================================================
--- /orxonox/trunk/src/Makefile.in	(revision 3474)
+++ /orxonox/trunk/src/Makefile.in	(revision 3475)
@@ -214,8 +214,8 @@
 target_os = @target_os@
 target_vendor = @target_vendor@
-AM_CXXFLAGS = "-I./world_entities" "-I./story_entities" "-I./mathlib" "-I./lib"
+AM_CXXFLAGS = "-I./world_entities" "-I./story_entities" "-I./mathlib" "-I./lib" "-I./defs" "-I./font"
 AM_LDFLAGS = $(MWINDOWS)
 orxonox_SOURCES = orxonox.cc \
-		 world.cc \
+		 story_entities/world.cc \
 		 world_entities/player.cc \
 		 data_tank.cc \
@@ -245,12 +245,12 @@
 		 mathlib/curve.cc \
 		 glmenu_imagescreen.cc \
-		 skysphere.cc \
+		 world_entities/skysphere.cc \
 		 light.cc \
-		 sfont/fontset.cc 
+		 font/fontset.cc 
 
 noinst_HEADERS = ability.h \
 		 data_tank.h \
 		 world_entities/npc.h \
-		 stdincl.h \
+		 defs/stdincl.h \
 		 glincl.h \
 		 ai.h \
@@ -259,5 +259,5 @@
 		 synchronisable.h \
 		 base_entity.h \
-		 error.h \
+		 defs/error.h \
 		 world_entities/player.h \
 		 camera.h \
@@ -267,5 +267,5 @@
 		 keynames.h \
 		 proto_class.h \
-		 world.h \
+		 story_entities/world.h \
 		 command_node.h \
 		 lib/list.h \
@@ -287,8 +287,8 @@
 		 mathlib/curve.h \
 		 glmenu_imagescreen.h \
-		 debug.h \
-		 skysphere.h \
+		 defs/debug.h \
+		 world_entities/skysphere.h \
 		 light.h \
-		 sfont/fontset.h
+		 font/fontset.h
 
 EXTRA_DIST = orxonox.conf
@@ -420,4 +420,20 @@
 @am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
+world.o: story_entities/world.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT world.o -MD -MP -MF "$(DEPDIR)/world.Tpo" -c -o world.o `test -f 'story_entities/world.cc' || echo '$(srcdir)/'`story_entities/world.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/world.Tpo" "$(DEPDIR)/world.Po"; else rm -f "$(DEPDIR)/world.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='story_entities/world.cc' object='world.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/world.Po' tmpdepfile='$(DEPDIR)/world.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o world.o `test -f 'story_entities/world.cc' || echo '$(srcdir)/'`story_entities/world.cc
+
+world.obj: story_entities/world.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT world.obj -MD -MP -MF "$(DEPDIR)/world.Tpo" -c -o world.obj `if test -f 'story_entities/world.cc'; then $(CYGPATH_W) 'story_entities/world.cc'; else $(CYGPATH_W) '$(srcdir)/story_entities/world.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/world.Tpo" "$(DEPDIR)/world.Po"; else rm -f "$(DEPDIR)/world.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='story_entities/world.cc' object='world.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/world.Po' tmpdepfile='$(DEPDIR)/world.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o world.obj `if test -f 'story_entities/world.cc'; then $(CYGPATH_W) 'story_entities/world.cc'; else $(CYGPATH_W) '$(srcdir)/story_entities/world.cc'; fi`
+
 player.o: world_entities/player.cc
 @am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT player.o -MD -MP -MF "$(DEPDIR)/player.Tpo" -c -o player.o `test -f 'world_entities/player.cc' || echo '$(srcdir)/'`world_entities/player.cc; \
@@ -660,19 +676,35 @@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o curve.obj `if test -f 'mathlib/curve.cc'; then $(CYGPATH_W) 'mathlib/curve.cc'; else $(CYGPATH_W) '$(srcdir)/mathlib/curve.cc'; fi`
 
-fontset.o: sfont/fontset.cc
-@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fontset.o -MD -MP -MF "$(DEPDIR)/fontset.Tpo" -c -o fontset.o `test -f 'sfont/fontset.cc' || echo '$(srcdir)/'`sfont/fontset.cc; \
+skysphere.o: world_entities/skysphere.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT skysphere.o -MD -MP -MF "$(DEPDIR)/skysphere.Tpo" -c -o skysphere.o `test -f 'world_entities/skysphere.cc' || echo '$(srcdir)/'`world_entities/skysphere.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/skysphere.Tpo" "$(DEPDIR)/skysphere.Po"; else rm -f "$(DEPDIR)/skysphere.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='world_entities/skysphere.cc' object='skysphere.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/skysphere.Po' tmpdepfile='$(DEPDIR)/skysphere.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o skysphere.o `test -f 'world_entities/skysphere.cc' || echo '$(srcdir)/'`world_entities/skysphere.cc
+
+skysphere.obj: world_entities/skysphere.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT skysphere.obj -MD -MP -MF "$(DEPDIR)/skysphere.Tpo" -c -o skysphere.obj `if test -f 'world_entities/skysphere.cc'; then $(CYGPATH_W) 'world_entities/skysphere.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/skysphere.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/skysphere.Tpo" "$(DEPDIR)/skysphere.Po"; else rm -f "$(DEPDIR)/skysphere.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='world_entities/skysphere.cc' object='skysphere.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/skysphere.Po' tmpdepfile='$(DEPDIR)/skysphere.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o skysphere.obj `if test -f 'world_entities/skysphere.cc'; then $(CYGPATH_W) 'world_entities/skysphere.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/skysphere.cc'; fi`
+
+fontset.o: font/fontset.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fontset.o -MD -MP -MF "$(DEPDIR)/fontset.Tpo" -c -o fontset.o `test -f 'font/fontset.cc' || echo '$(srcdir)/'`font/fontset.cc; \
 @am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/fontset.Tpo" "$(DEPDIR)/fontset.Po"; else rm -f "$(DEPDIR)/fontset.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sfont/fontset.cc' object='fontset.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='font/fontset.cc' object='fontset.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/fontset.Po' tmpdepfile='$(DEPDIR)/fontset.TPo' @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fontset.o `test -f 'sfont/fontset.cc' || echo '$(srcdir)/'`sfont/fontset.cc
-
-fontset.obj: sfont/fontset.cc
-@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fontset.obj -MD -MP -MF "$(DEPDIR)/fontset.Tpo" -c -o fontset.obj `if test -f 'sfont/fontset.cc'; then $(CYGPATH_W) 'sfont/fontset.cc'; else $(CYGPATH_W) '$(srcdir)/sfont/fontset.cc'; fi`; \
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fontset.o `test -f 'font/fontset.cc' || echo '$(srcdir)/'`font/fontset.cc
+
+fontset.obj: font/fontset.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fontset.obj -MD -MP -MF "$(DEPDIR)/fontset.Tpo" -c -o fontset.obj `if test -f 'font/fontset.cc'; then $(CYGPATH_W) 'font/fontset.cc'; else $(CYGPATH_W) '$(srcdir)/font/fontset.cc'; fi`; \
 @am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/fontset.Tpo" "$(DEPDIR)/fontset.Po"; else rm -f "$(DEPDIR)/fontset.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sfont/fontset.cc' object='fontset.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='font/fontset.cc' object='fontset.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/fontset.Po' tmpdepfile='$(DEPDIR)/fontset.TPo' @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fontset.obj `if test -f 'sfont/fontset.cc'; then $(CYGPATH_W) 'sfont/fontset.cc'; else $(CYGPATH_W) '$(srcdir)/sfont/fontset.cc'; fi`
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fontset.obj `if test -f 'font/fontset.cc'; then $(CYGPATH_W) 'font/fontset.cc'; else $(CYGPATH_W) '$(srcdir)/font/fontset.cc'; fi`
 uninstall-info-am:
 
@@ -798,5 +830,5 @@
 
 distdir: $(DISTFILES)
-	$(mkdir_p) $(distdir)/lib $(distdir)/mathlib $(distdir)/sfont $(distdir)/story_entities $(distdir)/world_entities
+	$(mkdir_p) $(distdir)/defs $(distdir)/font $(distdir)/lib $(distdir)/mathlib $(distdir)/story_entities $(distdir)/world_entities
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
Index: xonox/trunk/src/debug.h
===================================================================
--- /orxonox/trunk/src/debug.h	(revision 3474)
+++ 	(revision )
@@ -1,184 +1,0 @@
-/* 
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   ### File Specific:
-   main-programmer: Benjamin Grauer
-   co-programmer: ...
-*/
-
-/*! 
-    \file debug.h
-    \brief Handles output to console for different Verbose-Modes.
-*/ 
-
-#ifndef _DEBUG_H
-#define _DEBUG_H
-
-#define NO              0
-#define ERROR           1
-#define WARNING         2
-#define INFORMATION     3
-#define DEBUGING        4
-
-#if HAVE_CONFIG_H 
-#include <config.h> 
-#endif
-
-#include <stdio.h>
-
-///////////////////////////////////////////////////
-/// PRINTF: prints with filename and linenumber ///
-///////////////////////////////////////////////////
-
-#ifdef DEBUG
-extern int verbose;
-#define PRINTF(x) \
-           PRINTF ## x
-
-#if DEBUG >= ERROR
-#define PRINTF1 \
-    if (verbose >= ERROR) \
-      printf("%s:%d::ERROR:", __FILE__, __LINE__) && printf
-#else 
-#define PRINTF1 if (NO)
-#endif
-     
-#if DEBUG >= WARNING
-#define PRINTF2 \
-     if (verbose >= WARNING) \
-       printf("%s:%d::WARNING:", __FILE__, __LINE__) && printf
-         
-#else 
-#define PRINTF2 if (NO)
-#endif
-     
-#if DEBUG >= INFORMATION
-#define PRINTF3 \
-     if (verbose >= INFORMATION) \
-       printf("%s:%d::INFO:", __FILE__, __LINE__) && printf
-#else 
-#define PRINTF3 if (NO)
-#endif
-     
-#if DEBUG >= DEBUGING
-#define PRINTF4 \
-     if (verbose >= DEBUGING) \
-       printf("%s:%d::DEBUG:", __FILE__, __LINE__) && printf
-#else 
-#define PRINTF4 if (NO)
-#endif
-     
-     
-#else  
-#define PRINTF(x) if (NO)
-#endif
-
-#define PRINTF0 \
-    printf("%s:%d::", __FILE__, __LINE__) && printf
-
-
-///////////////////////////////////////////////////
-///  PRINT: just prints output as is            ///
-///////////////////////////////////////////////////
-#ifdef  DEBUG
-extern int verbose;
-#define PRINT(x) \
-  PRINT ## x
-
-#if DEBUG >= ERROR
-#define PRINT1	\
-  if (verbose >= ERROR)	\
-    printf
-#else 
-#define PRINT1 if (NO)
-#endif
-
-#if DEBUG >= WARNING
-#define PRINT2 \
-  if (verbose >= WARNING) \
-    printf
-
-#else 
-#define PRINT2 if (NO)
-#endif
-
-#if DEBUG >= INFORMATION
-#define PRINT3 \
-  if (verbose >= INFORMATION) \
-    printf
-#else 
-#define PRINT3 if (NO)
-#endif
-
-#if DEBUG >= DEBUGING
-#define PRINT4 \
-  if (verbose >= DEBUGING) \
-    printf
-#else 
-#define PRINT4 if (NO)
-#endif
-
-
-#else  
-#define PRINT(x) if (NO)
-#endif
-
-#define PRINT0 \
-  printf
-
-///////////////////////////////////////////////////
-/// COUT: simple cout print with verbose-check  ///
-///////////////////////////////////////////////////
-#ifdef  DEBUG
-#define COUT(x) \
-           COUT ## x
-
-#if DEBUG >= 1
-#define COUT1 \
-    if (verbose >= 1 ) \
-      cout
-#else 
-#define COUT1 if (NO) cout
-#endif
-     
-#if DEBUG >= 2
-#define COUT2 \
-     if (verbose >= 2 ) \
-       cout
-
-#else 
-#define COUT2 if (NO) cout
-#endif
-     
-#if DEBUG >= 3
-#define COUT3 \
-     if (verbose >= 3 ) \
-       cout
-#else
-#define COUT3 if (NO) cout
-#endif
-     
-#if DEBUG >= 4
-#define COUT4 \
-     if (verbose >= 4 ) \
-       cout
-#else 
-#define COUT4 if (NO) cout
-#endif
-     
-     
-#else  
-#define COUT(x) if (NO) cout
-#endif
-
-#define COUT0 \
-           cout
-
-#endif /* _DEBUG_H */
Index: /orxonox/trunk/src/defs/debug.h
===================================================================
--- /orxonox/trunk/src/defs/debug.h	(revision 3475)
+++ /orxonox/trunk/src/defs/debug.h	(revision 3475)
@@ -0,0 +1,184 @@
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Grauer
+   co-programmer: ...
+*/
+
+/*! 
+    \file debug.h
+    \brief Handles output to console for different Verbose-Modes.
+*/ 
+
+#ifndef _DEBUG_H
+#define _DEBUG_H
+
+#define NO              0
+#define ERROR           1
+#define WARNING         2
+#define INFORMATION     3
+#define DEBUGING        4
+
+#if HAVE_CONFIG_H 
+#include <config.h> 
+#endif
+
+#include <stdio.h>
+
+///////////////////////////////////////////////////
+/// PRINTF: prints with filename and linenumber ///
+///////////////////////////////////////////////////
+
+#ifdef DEBUG
+extern int verbose;
+#define PRINTF(x) \
+           PRINTF ## x
+
+#if DEBUG >= ERROR
+#define PRINTF1 \
+    if (verbose >= ERROR) \
+      printf("%s:%d::ERROR:", __FILE__, __LINE__) && printf
+#else 
+#define PRINTF1 if (NO)
+#endif
+     
+#if DEBUG >= WARNING
+#define PRINTF2 \
+     if (verbose >= WARNING) \
+       printf("%s:%d::WARNING:", __FILE__, __LINE__) && printf
+         
+#else 
+#define PRINTF2 if (NO)
+#endif
+     
+#if DEBUG >= INFORMATION
+#define PRINTF3 \
+     if (verbose >= INFORMATION) \
+       printf("%s:%d::INFO:", __FILE__, __LINE__) && printf
+#else 
+#define PRINTF3 if (NO)
+#endif
+     
+#if DEBUG >= DEBUGING
+#define PRINTF4 \
+     if (verbose >= DEBUGING) \
+       printf("%s:%d::DEBUG:", __FILE__, __LINE__) && printf
+#else 
+#define PRINTF4 if (NO)
+#endif
+     
+     
+#else  
+#define PRINTF(x) if (NO)
+#endif
+
+#define PRINTF0 \
+    printf("%s:%d::", __FILE__, __LINE__) && printf
+
+
+///////////////////////////////////////////////////
+///  PRINT: just prints output as is            ///
+///////////////////////////////////////////////////
+#ifdef  DEBUG
+extern int verbose;
+#define PRINT(x) \
+  PRINT ## x
+
+#if DEBUG >= ERROR
+#define PRINT1	\
+  if (verbose >= ERROR)	\
+    printf
+#else 
+#define PRINT1 if (NO)
+#endif
+
+#if DEBUG >= WARNING
+#define PRINT2 \
+  if (verbose >= WARNING) \
+    printf
+
+#else 
+#define PRINT2 if (NO)
+#endif
+
+#if DEBUG >= INFORMATION
+#define PRINT3 \
+  if (verbose >= INFORMATION) \
+    printf
+#else 
+#define PRINT3 if (NO)
+#endif
+
+#if DEBUG >= DEBUGING
+#define PRINT4 \
+  if (verbose >= DEBUGING) \
+    printf
+#else 
+#define PRINT4 if (NO)
+#endif
+
+
+#else  
+#define PRINT(x) if (NO)
+#endif
+
+#define PRINT0 \
+  printf
+
+///////////////////////////////////////////////////
+/// COUT: simple cout print with verbose-check  ///
+///////////////////////////////////////////////////
+#ifdef  DEBUG
+#define COUT(x) \
+           COUT ## x
+
+#if DEBUG >= 1
+#define COUT1 \
+    if (verbose >= 1 ) \
+      cout
+#else 
+#define COUT1 if (NO) cout
+#endif
+     
+#if DEBUG >= 2
+#define COUT2 \
+     if (verbose >= 2 ) \
+       cout
+
+#else 
+#define COUT2 if (NO) cout
+#endif
+     
+#if DEBUG >= 3
+#define COUT3 \
+     if (verbose >= 3 ) \
+       cout
+#else
+#define COUT3 if (NO) cout
+#endif
+     
+#if DEBUG >= 4
+#define COUT4 \
+     if (verbose >= 4 ) \
+       cout
+#else 
+#define COUT4 if (NO) cout
+#endif
+     
+     
+#else  
+#define COUT(x) if (NO) cout
+#endif
+
+#define COUT0 \
+           cout
+
+#endif /* _DEBUG_H */
Index: /orxonox/trunk/src/defs/error.h
===================================================================
--- /orxonox/trunk/src/defs/error.h	(revision 3475)
+++ /orxonox/trunk/src/defs/error.h	(revision 3475)
@@ -0,0 +1,63 @@
+
+
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: Christian Meyer
+*/
+
+
+/*! 
+    \file error.h
+    \brief A compendium of Error codes used in the program
+*/ 
+
+
+#ifndef _ERROR_H
+#define _ERROR_H
+
+// these are the two undefined error nr. Don't use them ...
+#define oERROR -1
+
+#define oNOERROR 0
+
+/*!
+    \brief Error Definitions:
+
+    Error Classes:
+    0xx application framework codes
+    1xx graphics codes
+    2xx file/FS codes
+    3xx network codes
+    4xx general codes
+
+    Error Specifier 1:
+    x0x action finsished as desired
+    x1x initialisation error
+    x2x execution error
+    x3x uninitialisation error
+
+    Error Specifier 2:
+    xx0 no further informations
+    xx1 only a warning - feel free to ignore, the program will proceed
+    xx2 this could lead unexpected behaviour
+    xx3 this is a fatal error - you are invited to quit the program - panic!
+*/
+
+typedef struct 
+{
+  int code;
+  char* message;
+  char* location;
+} ErrorMessage;
+
+#endif /* _ERROR_H */
Index: /orxonox/trunk/src/defs/stdincl.h
===================================================================
--- /orxonox/trunk/src/defs/stdincl.h	(revision 3475)
+++ /orxonox/trunk/src/defs/stdincl.h	(revision 3475)
@@ -0,0 +1,41 @@
+/*!
+  \file stdincl.h
+  \brief This file includes default headers that nearly every Class needs.
+  
+  no Class is defined here, but many headers to classes, and more general Headers like the openGL-header.
+*/
+
+#ifndef _STDINCL_H
+#define _STDINCL_H
+
+#define null 0   //!< null
+
+typedef unsigned char byte;
+
+// this includes the information from configure/makefiles
+#if HAVE_CONFIG_H 
+#include <config.h> 
+#endif
+
+#ifdef __WIN32__
+#include <windows.h>
+#endif
+
+#include "glincl.h"
+
+// MATH //
+#include "matrix.h"
+#include "vector.h"
+#include "curve.h"
+
+#include "list.h"
+#include "list_template.h"
+#include "message_structures.h"
+#include "orxonox.h"
+#include "data_tank.h"
+#include "base_object.h"
+
+#include "error.h"
+#include "debug.h"
+
+#endif /* _STDINCL_H */
Index: xonox/trunk/src/error.h
===================================================================
--- /orxonox/trunk/src/error.h	(revision 3474)
+++ 	(revision )
@@ -1,63 +1,0 @@
-
-
-/* 
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   ### File Specific:
-   main-programmer: Patrick Boenzli
-   co-programmer: Christian Meyer
-*/
-
-
-/*! 
-    \file error.h
-    \brief A compendium of Error codes used in the program
-*/ 
-
-
-#ifndef _ERROR_H
-#define _ERROR_H
-
-// these are the two undefined error nr. Don't use them ...
-#define oERROR -1
-
-#define oNOERROR 0
-
-/*!
-    \brief Error Definitions:
-
-    Error Classes:
-    0xx application framework codes
-    1xx graphics codes
-    2xx file/FS codes
-    3xx network codes
-    4xx general codes
-
-    Error Specifier 1:
-    x0x action finsished as desired
-    x1x initialisation error
-    x2x execution error
-    x3x uninitialisation error
-
-    Error Specifier 2:
-    xx0 no further informations
-    xx1 only a warning - feel free to ignore, the program will proceed
-    xx2 this could lead unexpected behaviour
-    xx3 this is a fatal error - you are invited to quit the program - panic!
-*/
-
-typedef struct 
-{
-  int code;
-  char* message;
-  char* location;
-} ErrorMessage;
-
-#endif /* _ERROR_H */
Index: /orxonox/trunk/src/importer/array.h
===================================================================
--- /orxonox/trunk/src/importer/array.h	(revision 3474)
+++ /orxonox/trunk/src/importer/array.h	(revision 3475)
@@ -11,5 +11,5 @@
 extern int verbose; //!< will be obsolete soon
 
-#include "../stdincl.h"
+#include "stdincl.h"
 
 //! Array Class that handles dynamic-float arrays.
Index: /orxonox/trunk/src/importer/objModel.cc
===================================================================
--- /orxonox/trunk/src/importer/objModel.cc	(revision 3474)
+++ /orxonox/trunk/src/importer/objModel.cc	(revision 3475)
@@ -18,5 +18,5 @@
 #include <fstream>
 
-#include "../debug.h"
+#include "debug.h"
 
 /**
Index: /orxonox/trunk/src/importer/texture.h
===================================================================
--- /orxonox/trunk/src/importer/texture.h	(revision 3474)
+++ /orxonox/trunk/src/importer/texture.h	(revision 3475)
@@ -10,5 +10,5 @@
 #define _TEXTURE_H
 
-#include "../stdincl.h"
+#include "stdincl.h"
 #ifdef HAVE_SDL_SDL_IMAGE_H
 #include <SDL/SDL_image.h>
Index: xonox/trunk/src/skysphere.cc
===================================================================
--- /orxonox/trunk/src/skysphere.cc	(revision 3474)
+++ 	(revision )
@@ -1,127 +1,0 @@
-
-/* 
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   ### File Specific:
-   main-programmer: David Gruetter
-   co-programmer: Benjamin Grauer
-
-    Created by Dave: this file is actually quite similar to player.cc and so is 
-    skybox.h similar to player.h
-    With that said, things should be clear:)
-
-    Edited by Bensch: more constructors, changeability, comments...
-
-*/
-
-#include "importer/material.h"
-#include "skysphere.h"
-#include "stdincl.h"
-#include "vector.h"
-#include "world_entity.h"
-
-
-using namespace std;
-
-/**
-   \brief Standart Constructor
-*/
-Skysphere::Skysphere()
-{  
-  initialize("../data/pictures/sky-replace.jpg");
-}
-
-/**
-   \brief Constructs a SkySphere and takes fileName as a map.
-   \param fileName the file to take as input for the skysphere
-*/
-Skysphere::Skysphere(char* fileName)
-{
-  initialize(fileName);
-}
-
-/**
-   \brief default destructor
-*/
-Skysphere::~Skysphere()
-{
-  PRINTF(3)("Deleting the SkySphere\n");
-  delete skyMaterial;
-  free(sphereObj);
-}
-
-/**
-   \brief initializes the Skysphere.
-   \param fileName the file to take as input for the skysphere
-*/
-void Skysphere::initialize(char* fileName)
-{
-  PRINTF(1)("initializing the Skysphere with Material %s.\n", fileName);
-  this->sphereObj = gluNewQuadric();
-  gluQuadricTexture(this->sphereObj, GL_TRUE);
-  this->setRadius(250.0);
-
-  this->skyMaterial = new Material("Sky");
-  this->setTexture(fileName);
-  this->skyMaterial->setIllum(3);
-  this->skyMaterial->setAmbient(1.0, 1.0, 1.0);
-}
-
-/**
-   \brief sets the Radius of the Sphere.
-   \param radius The Radius of The Sphere
-*/
-void Skysphere::setRadius(float radius)
-{
-  this->sphereRadius = radius;
-}
-
-/**
-   \brief Defines which texture should be loaded onto the skysphere.
-   \param fileName The filename of the Texture
-*/
-void Skysphere::setTexture(char* fileName)
-{
-  this->skyMaterial->setDiffuseMap(fileName);
-}
-
-/**
-   \brief updates the position of the Skysphere
-   \param sphereCenter The coordinate of the Center of the Sphere
-   
-   This is normally done in the update-phase of world, so the Skysphere is always centered at the Camera.
-*/
-void Skysphere::updatePosition(Vector sphereCenter)
-{
-  this->sphereCenter = sphereCenter;
-}
-
-/**
-   \brief draws the Skysphere
-   
-   This part is normally precessed in the "Painting Phase".
-*/
-
-void Skysphere::draw()
-{
-  glEnable(GL_TEXTURE_2D);
-  skyMaterial->select();
-  glPushMatrix();
-  glTranslatef(this->sphereCenter.x,this->sphereCenter.y,this->sphereCenter.z);
-  
-  glRotatef(-30, 1, 0, 0);
-  glRotatef(95.0f, 0.0f, 0.0f, 1.0f);
-  glRotatef(-250.0f, 0.0, 1.0f, 0.0f);
-  
-  gluSphere(sphereObj, sphereRadius, 20, 20);
-  glPopMatrix();
-  glDisable(GL_TEXTURE_2D);
-
-}
Index: xonox/trunk/src/skysphere.h
===================================================================
--- /orxonox/trunk/src/skysphere.h	(revision 3474)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/*! 
-    \file skysphere.h
-    \brief Definition of the Skysphere, that handles the Display of an atmosphere of orxonox.
-
-    A SkySphere is always centered at the current working Camera, and will only obey the cameras
-    movment but not its rotation.
-
-    \todo self-rotation
-    \todo handle reference to parent-object
-*/
-
-#ifndef _SKYSPHERE_H
-#define _SKYSPHERE_H
-
-/* INCLUDES */
-#include "p_node.h"
-
-/* FORWARD DEFINITION */
-class Material;
-class Vector;
-
-//! A Class to handle a SkySphere
-class Skysphere: public PNode 
-{
- private: 
-  GLUquadricObj *sphereObj; //!< A Placeholder for the SkySphere.
-  Material *skyMaterial;    //!< A Material for the SkySphere.
-  Vector sphereCenter;      //!< Center of the SkySphere.
-  float sphereRadius;       //!< Radius of the SkySphere. This should match the frustum maximum range.
-
- public:
-  Skysphere();
-  Skysphere(char* fileName);
-  ~Skysphere();
-
-  void setRadius(float radius);
-  void setTexture(char* fileName);
-
-  void updatePosition(Vector sphereCenter);
-  void draw();
-
- private:
-  void initialize(char* fileName);  
-};
-
-#endif
-
-
Index: xonox/trunk/src/stdincl.h
===================================================================
--- /orxonox/trunk/src/stdincl.h	(revision 3474)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/*!
-  \file stdincl.h
-  \brief This file includes default headers that nearly every Class needs.
-  
-  no Class is defined here, but many headers to classes, and more general Headers like the openGL-header.
-*/
-
-#ifndef _STDINCL_H
-#define _STDINCL_H
-
-#define null 0   //!< null
-
-typedef unsigned char byte;
-
-// this includes the information from configure/makefiles
-#if HAVE_CONFIG_H 
-#include <config.h> 
-#endif
-
-#ifdef __WIN32__
-#include <windows.h>
-#endif
-
-#include "glincl.h"
-
-// MATH //
-#include "matrix.h"
-#include "vector.h"
-#include "curve.h"
-
-#include "list.h"
-#include "list_template.h"
-#include "message_structures.h"
-#include "orxonox.h"
-#include "data_tank.h"
-#include "base_object.h"
-
-#include "error.h"
-#include "debug.h"
-
-#endif /* _STDINCL_H */
Index: /orxonox/trunk/src/story_entities/world.cc
===================================================================
--- /orxonox/trunk/src/story_entities/world.cc	(revision 3475)
+++ /orxonox/trunk/src/story_entities/world.cc	(revision 3475)
@@ -0,0 +1,903 @@
+
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: Christian Meyer
+*/
+
+#include "world.h"
+#include "world_entity.h"
+#include "track_manager.h"
+#include "player.h"
+#include "command_node.h"
+#include "camera.h"
+#include "environment.h"
+#include "p_node.h"
+#include "null_parent.h"
+#include "helper_parent.h"
+#include "glmenu_imagescreen.h"
+#include "skysphere.h"
+#include "light.h"
+#include "fontset.h"
+
+using namespace std;
+
+
+/** 
+    \brief create a new World
+    
+    This creates a new empty world!
+*/
+World::World (char* name)
+{
+  this->setClassName ("World");
+  this->worldName = name;
+  this->debugWorldNr = -1;
+  this->entities = new tList<WorldEntity>();
+}
+
+/**
+   \brief creates a new World...
+   \param worldID with this ID
+*/
+World::World (int worldID)
+{
+  this->debugWorldNr = worldID;
+  this->worldName = NULL;
+  this->entities = new tList<WorldEntity>();
+}
+
+/** 
+    \brief remove the World from memory
+    
+    delete everything explicitly, that isn't contained in the parenting tree!
+    things contained in the tree are deleted automaticaly
+*/
+World::~World ()
+{
+  printf("World::~World() - deleting current world\n");
+  CommandNode* cn = Orxonox::getInstance()->getLocalInput();
+  cn->unbind(this->localPlayer);
+  cn->reset();
+
+  this->localCamera->destroy();
+  this->nullParent->destroy();  
+  delete this->skySphere;
+
+  //delete this->trackManager;
+
+  /*
+  WorldEntity* entity = entities->enumerate();  
+  while( entity != NULL ) 
+    { 
+      entity->destroy();
+      entity = entities->nextElement();
+    }
+  this->entities->destroy();
+  */
+
+  /* FIX the parent list has to be cleared - not possible if we got the old list also*/
+
+
+  //delete this->entities;
+  //delete this->localCamera;
+  /* this->localPlayer hasn't to be deleted explicitly, it is 
+     contained in entities*/
+}
+
+
+/**
+   \brief loads the World by initializing all resources, and set their default values.
+*/
+ErrorMessage World::load()
+{
+  //  BezierCurve* tmpCurve = new BezierCurve();
+  if(this->debugWorldNr != -1)
+    {
+      // initializing Font
+      testFont = new FontSet();
+      testFont->buildFont("../data/pictures/font.tga");
+
+      // initializing the TrackManager
+      trackManager = TrackManager::getInstance();
+      trackManager->addPoint(Vector(0,-5,0));
+      trackManager->addPoint(Vector(10,0,5));
+      trackManager->addPoint(Vector(20,0,-5));
+      trackManager->addPoint(Vector(30,0,5));
+      trackManager->addPoint(Vector(40,0,5));
+      trackManager->setDuration(2);
+      trackManager->setSavePoint();
+      trackManager->addPoint(Vector(50,10,10));
+      trackManager->addPoint(Vector(60,0, 10));
+      trackManager->addPoint(Vector(70,0, 10));
+      trackManager->addPoint(Vector(80,0,-10));
+      trackManager->addPoint(Vector(90,0,-10));
+      trackManager->setDuration(5);
+      trackManager->setSavePoint();
+      trackManager->addPoint(Vector(110,0,5));
+      trackManager->addPoint(Vector(120,0, 10));
+      trackManager->addPoint(Vector(130,0, 10));
+      trackManager->addPoint(Vector(140,0,-10));
+      trackManager->addPoint(Vector(150,0,-10));
+      trackManager->setDuration(3);
+      int fork11, fork12, fork13, fork14;
+      trackManager->fork(4, &fork11, &fork12, &fork13, &fork14);
+      trackManager->workOn(fork11);
+      trackManager->addPoint(Vector(170, 0, -15));
+      trackManager->addPoint(Vector(180, 0, -15));
+      trackManager->setDuration(3);
+      trackManager->workOn(fork12);
+      trackManager->addPoint(Vector(170, 0, 10));
+      trackManager->addPoint(Vector(180, 0, 10));
+      trackManager->addPoint(Vector(190,2,5));
+      trackManager->addPoint(Vector(200,2,5));
+      trackManager->setDuration(7);
+      int fork21, fork22;
+      trackManager->fork(2, &fork21, &fork22);
+      trackManager->workOn(fork21);
+      trackManager->addPoint(Vector(220, 10,-10));
+      trackManager->addPoint(Vector(230, 0,-10));
+      trackManager->addPoint(Vector(240, 0, 2));
+      trackManager->addPoint(Vector(250, 0, 0));
+      trackManager->addPoint(Vector(260, 0, 5));
+      trackManager->setDuration(3);
+      trackManager->join(2, fork12, fork11);
+      trackManager->workOn(fork22);
+      trackManager->addPoint(Vector(220, -10,10));
+      trackManager->addPoint(Vector(230, 0, 10));
+      trackManager->addPoint(Vector(240, 0, 10));
+      trackManager->addPoint(Vector(250, 0, 5));
+      trackManager->setDuration(6);
+      trackManager->workOn(fork13);
+      trackManager->addPoint(Vector(200,-10,5));
+      trackManager->addPoint(Vector(250,-10,5));
+      trackManager->setDuration(3);
+      trackManager->workOn(fork14);
+      trackManager->addPoint(Vector(200,15,0));
+      trackManager->addPoint(Vector(210,0,10));
+      trackManager->setDuration(1);
+      trackManager->join(4, fork21, fork22, fork13, fork14);
+      trackManager->workOn(10);
+      trackManager->addPoint(Vector(250,-10,5));
+      trackManager->addPoint(Vector(260,-10,5));
+      trackManager->finalize();
+      
+      /*monitor progress*/
+      this->glmis->step();
+
+      /*
+	tmpCurve->addNode(Vector(10,  -1,  -1));
+	tmpCurve->addNode(Vector(10,  -2,   2));
+	tmpCurve->addNode(Vector(10,   3,   3));
+	tmpCurve->addNode(Vector(10,   4,  -4), 0);
+	tmpCurve->addNode(Vector(10,  -1,  -1));
+	tmpCurve->addNode(Vector(10,  -2,   2));
+	tmpCurve->addNode(Vector(10,   3,   3));
+	tmpCurve->addNode(Vector(10,   4,  -4), 0);
+	tmpCurve->debug();
+      */
+      switch(this->debugWorldNr)
+	{
+	  /*
+	    this loads the hard-coded debug world. this only for simplicity and will be 
+	    removed by a reald world-loader, which interprets a world-file.
+	    if you want to add an own debug world, just add a case DEBUG_WORLD_[nr] and
+	    make whatever you want...
+	   */
+	case DEBUG_WORLD_0:
+	  {
+	    this->nullParent = NullParent::getInstance ();
+	    this->nullParent->setName ("NullParent");
+
+	    // !\todo old track-system has to be removed
+
+	    //create helper for player
+	    HelperParent* hp = new HelperParent ();
+	    /* the player has to be added to this helper */
+
+	    // create a player
+	    WorldEntity* myPlayer = new Player ();
+	    myPlayer->setName ("player");
+	    this->spawn (myPlayer);
+	    this->localPlayer = myPlayer;
+	    /*monitor progress*/
+	    this->glmis->step();	    
+
+	    // bind input
+	    Orxonox *orx = Orxonox::getInstance ();
+	    orx->getLocalInput()->bind (myPlayer);
+	    
+	    // bind camera
+	    this->localCamera = new Camera(this);
+	    this->localCamera->setName ("camera");
+	    this->localCamera->bind (myPlayer);
+	    this->localPlayer->addChild (this->localCamera);
+
+	    // Create SkySphere
+	    skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
+
+	    /*monitor progress*/
+	    this->glmis->step();
+
+	    Vector* es = new Vector (50, 2, 0);
+	    Quaternion* qs = new Quaternion ();
+	    WorldEntity* env = new Environment();
+	    env->setName ("env");
+	    this->spawn(env, es, qs);
+	   
+	    /*monitor progress*/
+	    this->glmis->step();
+
+	    trackManager->setBindSlave(env);
+
+	    break;
+	  }
+	case DEBUG_WORLD_1:
+	  {
+	    /*
+	    this->testCurve = new UPointCurve();
+	    this->testCurve->addNode(Vector( 0, 0, 0));
+	    this->testCurve->addNode(Vector(10, 0, 5));
+	    this->testCurve->addNode(Vector(20, -5,-5));
+	    this->testCurve->addNode(Vector(30, 5, 10));
+	    this->testCurve->addNode(Vector(40, 0,-10));
+	    this->testCurve->addNode(Vector(50, 0,-10));
+	    */
+
+	    this->nullParent = NullParent::getInstance ();
+	    this->nullParent->setName ("NullParent");
+
+
+
+	    // create a player
+	    WorldEntity* myPlayer = new Player();
+	    myPlayer->setName ("player");
+	    this->spawn(myPlayer);
+	    this->localPlayer = myPlayer;	    
+	    
+	    // bind input
+	    Orxonox *orx = Orxonox::getInstance();
+	    orx->getLocalInput()->bind (myPlayer);
+	    
+	    // bind camera
+	    this->localCamera = new Camera (this);
+	    this->localCamera->setName ("camera");
+	    this->localCamera->bind (myPlayer);	
+	    this->localPlayer->addChild (this->localCamera);
+
+	    // Create SkySphere
+	    skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
+
+	    break;
+
+
+	  }
+	default:
+	  printf("World::load() - no world with ID %i found", this->debugWorldNr );
+	}
+    }
+  else if(this->worldName != NULL)
+    {
+
+    }
+
+  // initialize debug coord system
+  objectList = glGenLists(1);
+  glNewList (objectList, GL_COMPILE);
+  glLoadIdentity();
+  glColor3f(1.0,0,0);
+  glBegin(GL_QUADS);
+
+  int sizeX = 100;
+  int sizeZ = 80;
+  float length = 1000;
+  float width = 200;
+  float widthX = float (length /sizeX);
+  float widthZ = float (width /sizeZ);
+  
+  float height [sizeX][sizeZ];
+  Vector normal_vectors[sizeX][sizeZ];
+  
+  
+  for ( int i = 0; i<sizeX-1; i+=1)
+    for (int j = 0; j<sizeZ-1;j+=1)
+      //height[i][j] = rand()/20046 + (j-25)*(j-25)/30;
+#ifdef __WIN32__
+      height[i][j]=(sin((float)j/3)*rand()*i/182400)*.5;
+#else
+      height[i][j]=(sin((float)j/3)*rand()*(long)i/6282450500.0)*.5;
+#endif
+
+  //Die Huegel ein wenig glaetten
+  for (int h=1; h<2;h++)
+    for (int i=1;i<sizeX-2 ;i+=1 )
+      for(int j=1;j<sizeZ-2;j+=1)
+	height[i][j]=(height[i+1][j]+height[i][j+1]+height[i-1][j]+height[i][j-1])/4;
+  
+  //Berechnung von normalen Vektoren
+  for(int i=1;i<sizeX-2;i+=1)
+    for(int j=1;j<sizeZ-2 ;j+=1)
+      {
+	Vector v1 = Vector (widthX*(1),      height[i][j],      widthZ*(j) );
+	Vector v2 = Vector (widthX*(i-1),    height[i-1][j],    widthZ*(j));
+	Vector v3 = Vector (widthX*(i),      height[i][j+1],    widthZ*(j+1));
+	Vector v4 = Vector (widthX*(i+1),    height[i+1][j],    widthZ*(j));
+	Vector v5 = Vector (widthX*(i),      height[i][j-1],    widthZ*(j-1));
+	
+	Vector c1 = v2 - v1;
+	Vector c2 = v3 - v1;
+	Vector c3=  v4 - v1;
+	Vector c4 = v5 - v1;
+	Vector zero = Vector (0,0,0);
+	normal_vectors[i][j]=c1.cross(v3-v5)+c2.cross(v4-v2)+c3.cross(v5-v3)+c4.cross(v2-v4);
+	normal_vectors[i][j].normalize();
+      }
+
+  int snowheight=3;
+  for ( int i = 0; i<sizeX; i+=1)
+    for (int j = 0; j<sizeZ;j+=1)
+      {	  
+	Vector v1 = Vector (widthX*(i),      height[i][j]-20,       widthZ*(j)  -width/2);
+	Vector v2 = Vector (widthX*(i+1),    height[i+1][j]-20,     widthZ*(j)  -width/2);
+	Vector v3 = Vector (widthX*(i+1),    height[i+1][j+1]-20,   widthZ*(j+1)-width/2);
+	Vector v4 = Vector (widthX*(i),      height[i][j+1]-20,     widthZ*(j+1)-width/2);
+	float a[3];
+	if(height[i][j]<snowheight){
+	  a[0]=0;
+	  a[1]=1.0-height[i][j]/10-.3;
+	  a[2]=0;
+	  glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
+	}
+	else{
+	    a[0]=1.0;
+	    a[1]=1.0;
+	    a[2]=1.0;
+	    glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
+	    
+	}
+	glNormal3f(normal_vectors[i][j].x, normal_vectors[i][j].y, normal_vectors[i][j].z);
+	glVertex3f(v1.x, v1.y, v1.z);
+	if(height[i+1][j]<snowheight){
+	  a[0]=0;
+	  a[1] =1.0-height[i+1][j]/10-.3;
+	  a[2]=0;
+	  glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
+	}
+	else{
+	  a[0]=1.0;
+	  a[1]=1.0;
+	  a[2]=1.0;
+	  glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
+	  
+	}
+	glNormal3f(normal_vectors[i+1][j].x, normal_vectors[i+1][j].y, normal_vectors[i+1][j].z);
+	glVertex3f(v2.x, v2.y, v2.z);
+	if(height[i+1][j+1]<snowheight){
+	  a[0]=0;
+	  a[1] =1.0-height[i+1][j+1]/10-.3;
+	  a[2]=0;
+	  glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
+	}
+	else{
+	  a[0]=1.0;
+	  a[1]=1.0;
+	  a[2]=1.0;
+	  glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
+	  
+	  
+	}
+	glNormal3f(normal_vectors[i+1][j+1].x, normal_vectors[i+1][j+1].y, normal_vectors[i+1][j+1].z);
+	glVertex3f(v3.x, v3.y, v3.z);
+	if(height[i][j+1]<snowheight){
+	  a[0]=0;
+	  a[1] =1.0-height[i+1][j+1]/10-.3;
+	  a[2]=0;
+	  glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
+	}
+	else{
+	  a[0]=1.0;
+	  a[1]=1.0;
+	  a[2]=1.0;
+	  glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
+	}
+	glNormal3f(normal_vectors[i][j+1].x, normal_vectors[i][j+1].y, normal_vectors[i][j+1].z);
+	glVertex3f(v4.x, v4.y, v4.z);
+	
+      }
+  glEnd();
+  /*  
+  glBegin(GL_LINES);
+  for( float x = -128.0; x < 128.0; x += 25.0)
+    {
+      for( float y = -128.0; y < 128.0; y += 25.0)
+	{
+	  glColor3f(1,0,0);
+	  glVertex3f(x,y,-128.0);
+	  glVertex3f(x,y,0.0);
+	  glColor3f(0.5,0,0);
+	  glVertex3f(x,y,0.0);
+	  glVertex3f(x,y,128.0);
+	}
+    }
+  for( float y = -128.0; y < 128.0; y += 25.0)
+    {
+      for( float z = -128.0; z < 128.0; z += 25.0)
+	{
+	  glColor3f(0,1,0);
+	  glVertex3f(-128.0,y,z);
+	  glVertex3f(0.0,y,z);
+	  glColor3f(0,0.5,0);
+	  glVertex3f(0.0,y,z);
+	  glVertex3f(128.0,y,z);
+	}
+    }
+  for( float x = -128.0; x < 128.0; x += 25.0)
+    {
+      for( float z = -128.0; z < 128.0; z += 25.0)
+	{
+	  glColor3f(0,0,1);
+	  glVertex3f(x,-128.0,z);
+	  glVertex3f(x,0.0,z);
+	  glColor3f(0,0,0.5);
+	  glVertex3f(x,0.0,z);
+	  glVertex3f(x,128.0,z);
+	}
+      
+    }
+  */  
+  /*
+  glBegin(GL_LINE_STRIP);
+  glColor3f(1.0, 5.0, 1.0);
+  for( int i = 0; i <= 30; i++)
+    {
+      glEvalCoord1f ((GLfloat) i/30.0);
+    }
+  glEnd();
+  */
+
+  trackManager->drawGraph(.01);
+  trackManager->debug(2);
+  /*  
+  glBegin(GL_LINES);
+  float i;
+  for(i = 0.0; i<1; i+=.01)
+    {
+      printf("%f, %f, %f\n",tmpCurve->calcPos(i).x, tmpCurve->calcPos(i).y, tmpCurve->calcPos(i).z);
+      glVertex3f(tmpCurve->calcPos(i).x, tmpCurve->calcPos(i).y, tmpCurve->calcPos(i).z);
+    }
+  glEnd();
+  */
+  glEndList();
+  // LIGHT initialisation
+  light = Light::getInstance();
+  light->addLight(0);
+  light->setAttenuation(QUADRATIC, 1.0);
+  light->setAttenuation(CONSTANT, 2.0);
+  light->setAttenuation(QUADRATIC, 1.0);
+  light->setPosition(10.0, 10.0, 50.0);
+  light->setDiffuseColor(1,1,1);
+  //  light->addLight(1);
+  //  light->setPosition(20, 10, -20);
+  //  light->setDiffuseColor(0,0,0);
+  light->debug();
+
+
+}
+
+/**
+   \brief initializes a new World
+*/
+ErrorMessage World::init()
+{
+  this->bPause = false;
+  CommandNode* cn = Orxonox::getInstance()->getLocalInput();
+  cn->addToWorld(this);
+  cn->enable(true);
+
+  //glMap1f (GL_MAP1_VERTEX_3, 0.0, 1.0, 3, 4, &ctrlpoints[0][0]);
+  //glEnable (GL_MAP1_VERTEX_3);
+  
+  //theNurb = gluNewNurbsRenderer ();
+  //gluNurbsProperty (theNurb, GLU_NURBS_MODE, GLU_NURBS_TESSELLATOR);
+  //gluNurbsProperty (theNurb, GLU_NURBS_VERTEX, vertexCallback );
+
+}
+
+
+/**
+   \brief starts the World
+*/
+ErrorMessage World::start()
+{
+  printf("World::start() - starting current World: nr %i\n", this->debugWorldNr);
+  this->bQuitOrxonox = false;
+  this->bQuitCurrentGame = false;
+  this->mainLoop();
+}
+
+/**
+   \brief stops the world.
+
+   This happens, when the player decides to end the Level.
+*/
+ErrorMessage World::stop()
+{
+  printf("World::stop() - got stop signal\n");
+  this->bQuitCurrentGame = true;
+}
+
+/**
+   \brief pauses the Game
+*/
+ErrorMessage World::pause()
+{
+  this->isPaused = true;
+}
+
+/**
+   \brief ends the pause Phase
+*/
+ErrorMessage World::resume()
+{
+  this->isPaused = false;
+}
+
+/**
+   \brief destroys the World
+*/
+ErrorMessage World::destroy()
+{
+  delete trackManager;
+}
+
+/**
+   \brief shows the loading screen
+*/
+void World::displayLoadScreen ()
+{
+  printf ("World::displayLoadScreen - start\n"); 
+  
+  //GLMenuImageScreen* 
+  this->glmis = GLMenuImageScreen::getInstance();
+  this->glmis->init();
+  this->glmis->setMaximum(10);
+  this->glmis->draw();
+ 
+  printf ("World::displayLoadScreen - end\n"); 
+}
+
+/**
+   \brief removes the loadscreen, and changes over to the game
+
+   \todo take out the delay
+*/
+void World::releaseLoadScreen ()
+{
+  printf ("World::releaseLoadScreen - start\n"); 
+  this->glmis->setValue(this->glmis->getMaximum());
+  SDL_Delay(500);
+  printf ("World::releaseLoadScreen - end\n"); 
+}
+
+
+/** 
+    \brief checks for collisions
+    
+    This method runs through all WorldEntities known to the world and checks for collisions 
+    between them. In case of collisions the collide() method of the corresponding entities 
+    is called.
+*/
+void World::collide ()
+{
+  /*
+  List *a, *b;
+  WorldEntity *aobj, *bobj;
+   
+  a = entities;
+  
+  while( a != NULL)
+    {
+      aobj = a->nextElement();
+      if( aobj->bCollide && aobj->collisioncluster != NULL)
+	{
+	  b = a->nextElement();
+	  while( b != NULL )
+	    {
+	      bobj = b->nextElement();
+	      if( bobj->bCollide && bobj->collisioncluster != NULL )
+		{
+		  unsigned long ahitflg, bhitflg;
+		  if( check_collision ( &aobj->place, aobj->collisioncluster, 
+					&ahitflg, &bobj->place, bobj->collisioncluster, 
+					&bhitflg) );
+		  {
+		    aobj->collide (bobj, ahitflg, bhitflg);
+		    bobj->collide (aobj, bhitflg, ahitflg);
+		  }
+		}
+	      b = b->nextElement();
+	    }
+	}
+      a = a->enumerate();
+    }
+  */
+}
+
+/** 
+    \brief runs through all entities calling their draw() methods
+*/
+void World::draw ()
+{
+  /* draw entities */
+  WorldEntity* entity;
+  entity = this->entities->enumerate();
+  while( entity != NULL ) 
+    { 
+      if( entity->bDraw ) entity->draw();
+      entity = this->entities->nextElement();
+    } 
+  
+  glCallList (objectList);
+  //! \todo skysphere is a WorldEntity and should be inside of the world-entity-list.
+  skySphere->draw();
+
+  testFont->printText(0, 0, 1, "orxonox_" PACKAGE_VERSION);
+
+}
+
+
+/**
+   \brief function to put your own debug stuff into it. it can display informations about
+   the current class/procedure
+*/
+void World::debug()
+{
+  printf ("World::debug() - starting debug\n");
+  PNode* p1 = NullParent::getInstance ();
+  PNode* p2 = new PNode (new Vector(2, 2, 2), p1);
+  PNode* p3 = new PNode (new Vector(4, 4, 4), p1);
+  PNode* p4 = new PNode (new Vector(6, 6, 6), p2);
+
+  p1->debug ();
+  p2->debug ();
+  p3->debug ();
+  p4->debug ();
+
+  p1->shiftCoor (new Vector(-1, -1, -1));
+
+  printf("World::debug() - shift\n");
+  p1->debug ();
+  p2->debug ();
+  p3->debug ();
+  p4->debug ();
+  
+  p1->update (1);
+
+  printf ("World::debug() - update\n");
+  p1->debug ();
+  p2->debug ();
+  p3->debug ();
+  p4->debug ();
+
+  p2->shiftCoor (new Vector(-1, -1, -1));
+  p1->update (2);
+
+  p1->debug ();
+  p2->debug ();
+  p3->debug ();
+  p4->debug ();
+
+  p2->setAbsCoor (new Vector(1,2,3));
+
+
+ p1->update (2);
+
+  p1->debug ();
+  p2->debug ();
+  p3->debug ();
+  p4->debug ();
+
+  p1->destroy ();
+  
+  
+  /*
+  WorldEntity* entity;
+  printf("counting all entities\n");
+  printf("World::debug() - enumerate()\n");
+  entity = entities->enumerate();  
+  while( entity != NULL ) 
+    { 
+      if( entity->bDraw ) printf("got an entity\n");
+      entity = entities->nextElement();
+    }
+  */
+}
+
+
+/**
+  \brief main loop of the world: executing all world relevant function
+
+  in this loop we synchronize (if networked), handle input events, give the heart-beat to
+  all other member-entities of the world (tick to player, enemies etc.), checking for
+  collisions drawing everything to the screen.
+*/
+void World::mainLoop()
+{
+  this->lastFrame = SDL_GetTicks ();
+  printf("World::mainLoop() - Entering main loop\n");
+  while( !this->bQuitOrxonox && !this->bQuitCurrentGame) /* \todo implement pause */
+    {
+      // Network
+      this->synchronize ();
+      // Process input
+      this->handleInput ();
+      if( this->bQuitCurrentGame || this->bQuitOrxonox)
+	{
+	  printf("World::mainLoop() - leaving loop earlier...\n");
+	  break;
+	}
+      // Process time
+      this->timeSlice ();
+      // Process collision
+      this->collide ();
+      // Draw
+      this->display ();
+  
+      for( int i = 0; i < 5000000; i++) {}
+      /* \todo this is to slow down the program for openGl Software emulator computers, reimplement*/
+    }
+  printf("World::mainLoop() - Exiting the main loop\n");
+}
+
+
+/**
+   \brief synchronize local data with remote data
+*/
+void World::synchronize ()
+{
+  // Get remote input
+  // Update synchronizables
+}
+
+
+/**
+   \brief run all input processing
+
+   the command node is the central input event dispatcher. the node uses the even-queue from
+   sdl and has its own event-passing-queue.
+*/
+void World::handleInput ()
+{
+  // localinput
+  CommandNode* cn = Orxonox::getInstance()->getLocalInput();
+  cn->process();
+  // remoteinput
+}
+
+
+/**
+   \brief advance the timeline
+
+   this calculates the time used to process one frame (with all input handling, drawing, etc)
+   the time is mesured in ms and passed to all world-entities and other classes that need
+   a heart-beat.
+*/
+void World::timeSlice ()
+{
+  Uint32 currentFrame = SDL_GetTicks();
+  if(!this->bPause)
+    {
+      Uint32 dt = currentFrame - this->lastFrame;
+      
+      if(dt > 0)
+	{
+	  float fps = 1000/dt;
+	  printf("fps = %f\n", fps);
+	}
+      else
+	{
+	  /* the frame-rate is limited to 100 frames per second, all other things are for
+	     nothing.
+	  */
+	  printf("fps = 1000 - frame rate is adjusted\n");
+	  SDL_Delay(10);
+	  dt = 10;
+	}
+      //this->timeSlice (dt);
+      
+      /* function to let all entities tick (iterate through list) */
+      WorldEntity* entity;
+      float seconds = dt / 1000.0;      
+      this->nullParent->update (seconds);
+      entity = entities->enumerate(); 
+      while( entity != NULL) 
+	{ 
+	  entity->tick (seconds);
+	  entity = entities->nextElement();
+	}
+      skySphere->updatePosition(localCamera->absCoordinate);
+      
+      /* update tick the rest */
+      this->localCamera->timeSlice(dt);
+      this->trackManager->tick(dt);
+    }
+  this->lastFrame = currentFrame;
+}
+
+
+/**
+   \brief render the current frame
+   
+   clear all buffers and draw the world
+*/
+void World::display ()
+{
+  // clear buffer
+  glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
+  // set camera
+  this->localCamera->apply ();
+  // draw world
+  this->draw();
+  // draw HUD
+  /* \todo draw HUD */
+  // flip buffers
+  SDL_GL_SwapBuffers();
+  //SDL_Surface* screen = Orxonox::getInstance()->getScreen ();
+  //SDL_Flip (screen);
+}
+
+
+/**
+   \brief add and spawn a new entity to this world
+   \param entity to be added
+*/
+void World::spawn(WorldEntity* entity)
+{
+  if( this->nullParent != NULL && entity->parent == NULL)
+    this->nullParent->addChild (entity);
+
+  this->entities->add (entity);
+
+  entity->postSpawn ();
+}
+
+
+/**
+   \brief add and spawn a new entity to this world
+   \param entity to be added
+   \param absCoor At what coordinates to add this entity.
+   \param absDir In which direction should it look.
+*/
+void World::spawn(WorldEntity* entity, Vector* absCoor, Quaternion* absDir)
+{
+  entity->setAbsCoor (absCoor);
+  entity->setAbsDir (absDir);
+  
+  if( this->nullParent != NULL && entity->parent == NULL)
+    this->nullParent->addChild (entity);
+
+  this->entities->add (entity);
+
+  entity->postSpawn ();
+}
+
+
+
+/**
+  \brief commands that the world must catch
+  \returns false if not used by the world
+*/
+bool World::command(Command* cmd)
+{
+  return false;
+}
+
Index: /orxonox/trunk/src/story_entities/world.h
===================================================================
--- /orxonox/trunk/src/story_entities/world.h	(revision 3475)
+++ /orxonox/trunk/src/story_entities/world.h	(revision 3475)
@@ -0,0 +1,90 @@
+/*! 
+    \file world.h
+    \brief Holds and manages all game data
+*/ 
+
+#ifndef _WORLD_H
+#define _WORLD_H
+
+#include "stdincl.h"
+#include "story_entity.h"
+
+
+class TrackManager;
+class WorldEntity;
+class Camera;
+class PNode;
+class GLMenuImageScreen;
+class Skysphere;
+class Light;
+class FontSet;
+
+//! The game world
+/**
+   this class initializes everything that should be displayed inside of the current level.
+   it is the main driving factor during gameplay.
+*/
+class World : public StoryEntity {
+
+ public:
+  World (char* name);
+  World (int worldID);
+  virtual ~World ();
+
+
+  /* classes from story-entity */
+  virtual ErrorMessage load ();
+  virtual ErrorMessage init ();
+  virtual ErrorMessage start ();
+  virtual ErrorMessage stop ();
+  virtual ErrorMessage pause ();
+  virtual ErrorMessage resume ();
+  virtual ErrorMessage destroy ();
+
+  virtual void displayLoadScreen();
+  virtual void releaseLoadScreen();
+  
+  /* command node functions */
+  bool command (Command* cmd);
+
+  /* interface to world */
+  void spawn (WorldEntity* entity);
+  void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir);
+
+
+
+ private:
+  Uint32 lastFrame;             //!< last time of frame
+  bool bQuitOrxonox;            //!< quit this application
+  bool bQuitCurrentGame;        //!< quit only the current game and return to menu
+  bool bPause;                  //!< pause mode
+
+  FontSet* testFont;            //!< A test Font. \todo fix this, so it is for real.
+  GLMenuImageScreen* glmis;     //!< The Level-Loader Display
+
+  char* worldName;              //!< The name of this World
+  int debugWorldNr;             //!< The Debug Nr. needed, if something goes wrong
+
+  PNode* nullParent;            //!< The zero-point, that everything has as its parent.
+  TrackManager* trackManager;  //!< The reference of the TrackManager that handles the course through the Level.
+  Camera* localCamera;         //!< The current Camera
+  Skysphere* skySphere;         //!< The Environmental Heaven of orxonox \todo insert this to environment insted
+  Light* light;                 //!< The Lights of the Level
+
+  GLuint objectList;            //!< temporary: \todo this will be ereased soon
+  tList<WorldEntity>* entities;//!< A template List of all entities. Every moving thing should be included here, and world automatically updates them.
+  WorldEntity* localPlayer;     //!< The Player, you fly through the level.
+ 
+  /* function for main-loop */
+  void mainLoop ();
+  void synchronize ();
+  void handleInput ();
+  void timeSlice ();
+  void collide ();
+  void draw ();
+  void display ();
+  void debug ();
+
+};
+
+#endif /* _WORLD_H */
Index: xonox/trunk/src/world.cc
===================================================================
--- /orxonox/trunk/src/world.cc	(revision 3474)
+++ 	(revision )
@@ -1,903 +1,0 @@
-
-/* 
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   ### File Specific:
-   main-programmer: Patrick Boenzli
-   co-programmer: Christian Meyer
-*/
-
-#include "world.h"
-#include "world_entity.h"
-#include "track_manager.h"
-#include "player.h"
-#include "command_node.h"
-#include "camera.h"
-#include "environment.h"
-#include "p_node.h"
-#include "null_parent.h"
-#include "helper_parent.h"
-#include "glmenu_imagescreen.h"
-#include "skysphere.h"
-#include "light.h"
-#include "sfont/fontset.h"
-
-using namespace std;
-
-
-/** 
-    \brief create a new World
-    
-    This creates a new empty world!
-*/
-World::World (char* name)
-{
-  this->setClassName ("World");
-  this->worldName = name;
-  this->debugWorldNr = -1;
-  this->entities = new tList<WorldEntity>();
-}
-
-/**
-   \brief creates a new World...
-   \param worldID with this ID
-*/
-World::World (int worldID)
-{
-  this->debugWorldNr = worldID;
-  this->worldName = NULL;
-  this->entities = new tList<WorldEntity>();
-}
-
-/** 
-    \brief remove the World from memory
-    
-    delete everything explicitly, that isn't contained in the parenting tree!
-    things contained in the tree are deleted automaticaly
-*/
-World::~World ()
-{
-  printf("World::~World() - deleting current world\n");
-  CommandNode* cn = Orxonox::getInstance()->getLocalInput();
-  cn->unbind(this->localPlayer);
-  cn->reset();
-
-  this->localCamera->destroy();
-  this->nullParent->destroy();  
-  delete this->skySphere;
-
-  //delete this->trackManager;
-
-  /*
-  WorldEntity* entity = entities->enumerate();  
-  while( entity != NULL ) 
-    { 
-      entity->destroy();
-      entity = entities->nextElement();
-    }
-  this->entities->destroy();
-  */
-
-  /* FIX the parent list has to be cleared - not possible if we got the old list also*/
-
-
-  //delete this->entities;
-  //delete this->localCamera;
-  /* this->localPlayer hasn't to be deleted explicitly, it is 
-     contained in entities*/
-}
-
-
-/**
-   \brief loads the World by initializing all resources, and set their default values.
-*/
-ErrorMessage World::load()
-{
-  //  BezierCurve* tmpCurve = new BezierCurve();
-  if(this->debugWorldNr != -1)
-    {
-      // initializing Font
-      testFont = new FontSet();
-      testFont->buildFont("../data/pictures/font.tga");
-
-      // initializing the TrackManager
-      trackManager = TrackManager::getInstance();
-      trackManager->addPoint(Vector(0,-5,0));
-      trackManager->addPoint(Vector(10,0,5));
-      trackManager->addPoint(Vector(20,0,-5));
-      trackManager->addPoint(Vector(30,0,5));
-      trackManager->addPoint(Vector(40,0,5));
-      trackManager->setDuration(2);
-      trackManager->setSavePoint();
-      trackManager->addPoint(Vector(50,10,10));
-      trackManager->addPoint(Vector(60,0, 10));
-      trackManager->addPoint(Vector(70,0, 10));
-      trackManager->addPoint(Vector(80,0,-10));
-      trackManager->addPoint(Vector(90,0,-10));
-      trackManager->setDuration(5);
-      trackManager->setSavePoint();
-      trackManager->addPoint(Vector(110,0,5));
-      trackManager->addPoint(Vector(120,0, 10));
-      trackManager->addPoint(Vector(130,0, 10));
-      trackManager->addPoint(Vector(140,0,-10));
-      trackManager->addPoint(Vector(150,0,-10));
-      trackManager->setDuration(3);
-      int fork11, fork12, fork13, fork14;
-      trackManager->fork(4, &fork11, &fork12, &fork13, &fork14);
-      trackManager->workOn(fork11);
-      trackManager->addPoint(Vector(170, 0, -15));
-      trackManager->addPoint(Vector(180, 0, -15));
-      trackManager->setDuration(3);
-      trackManager->workOn(fork12);
-      trackManager->addPoint(Vector(170, 0, 10));
-      trackManager->addPoint(Vector(180, 0, 10));
-      trackManager->addPoint(Vector(190,2,5));
-      trackManager->addPoint(Vector(200,2,5));
-      trackManager->setDuration(7);
-      int fork21, fork22;
-      trackManager->fork(2, &fork21, &fork22);
-      trackManager->workOn(fork21);
-      trackManager->addPoint(Vector(220, 10,-10));
-      trackManager->addPoint(Vector(230, 0,-10));
-      trackManager->addPoint(Vector(240, 0, 2));
-      trackManager->addPoint(Vector(250, 0, 0));
-      trackManager->addPoint(Vector(260, 0, 5));
-      trackManager->setDuration(3);
-      trackManager->join(2, fork12, fork11);
-      trackManager->workOn(fork22);
-      trackManager->addPoint(Vector(220, -10,10));
-      trackManager->addPoint(Vector(230, 0, 10));
-      trackManager->addPoint(Vector(240, 0, 10));
-      trackManager->addPoint(Vector(250, 0, 5));
-      trackManager->setDuration(6);
-      trackManager->workOn(fork13);
-      trackManager->addPoint(Vector(200,-10,5));
-      trackManager->addPoint(Vector(250,-10,5));
-      trackManager->setDuration(3);
-      trackManager->workOn(fork14);
-      trackManager->addPoint(Vector(200,15,0));
-      trackManager->addPoint(Vector(210,0,10));
-      trackManager->setDuration(1);
-      trackManager->join(4, fork21, fork22, fork13, fork14);
-      trackManager->workOn(10);
-      trackManager->addPoint(Vector(250,-10,5));
-      trackManager->addPoint(Vector(260,-10,5));
-      trackManager->finalize();
-      
-      /*monitor progress*/
-      this->glmis->step();
-
-      /*
-	tmpCurve->addNode(Vector(10,  -1,  -1));
-	tmpCurve->addNode(Vector(10,  -2,   2));
-	tmpCurve->addNode(Vector(10,   3,   3));
-	tmpCurve->addNode(Vector(10,   4,  -4), 0);
-	tmpCurve->addNode(Vector(10,  -1,  -1));
-	tmpCurve->addNode(Vector(10,  -2,   2));
-	tmpCurve->addNode(Vector(10,   3,   3));
-	tmpCurve->addNode(Vector(10,   4,  -4), 0);
-	tmpCurve->debug();
-      */
-      switch(this->debugWorldNr)
-	{
-	  /*
-	    this loads the hard-coded debug world. this only for simplicity and will be 
-	    removed by a reald world-loader, which interprets a world-file.
-	    if you want to add an own debug world, just add a case DEBUG_WORLD_[nr] and
-	    make whatever you want...
-	   */
-	case DEBUG_WORLD_0:
-	  {
-	    this->nullParent = NullParent::getInstance ();
-	    this->nullParent->setName ("NullParent");
-
-	    // !\todo old track-system has to be removed
-
-	    //create helper for player
-	    HelperParent* hp = new HelperParent ();
-	    /* the player has to be added to this helper */
-
-	    // create a player
-	    WorldEntity* myPlayer = new Player ();
-	    myPlayer->setName ("player");
-	    this->spawn (myPlayer);
-	    this->localPlayer = myPlayer;
-	    /*monitor progress*/
-	    this->glmis->step();	    
-
-	    // bind input
-	    Orxonox *orx = Orxonox::getInstance ();
-	    orx->getLocalInput()->bind (myPlayer);
-	    
-	    // bind camera
-	    this->localCamera = new Camera(this);
-	    this->localCamera->setName ("camera");
-	    this->localCamera->bind (myPlayer);
-	    this->localPlayer->addChild (this->localCamera);
-
-	    // Create SkySphere
-	    skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
-
-	    /*monitor progress*/
-	    this->glmis->step();
-
-	    Vector* es = new Vector (50, 2, 0);
-	    Quaternion* qs = new Quaternion ();
-	    WorldEntity* env = new Environment();
-	    env->setName ("env");
-	    this->spawn(env, es, qs);
-	   
-	    /*monitor progress*/
-	    this->glmis->step();
-
-	    trackManager->setBindSlave(env);
-
-	    break;
-	  }
-	case DEBUG_WORLD_1:
-	  {
-	    /*
-	    this->testCurve = new UPointCurve();
-	    this->testCurve->addNode(Vector( 0, 0, 0));
-	    this->testCurve->addNode(Vector(10, 0, 5));
-	    this->testCurve->addNode(Vector(20, -5,-5));
-	    this->testCurve->addNode(Vector(30, 5, 10));
-	    this->testCurve->addNode(Vector(40, 0,-10));
-	    this->testCurve->addNode(Vector(50, 0,-10));
-	    */
-
-	    this->nullParent = NullParent::getInstance ();
-	    this->nullParent->setName ("NullParent");
-
-
-
-	    // create a player
-	    WorldEntity* myPlayer = new Player();
-	    myPlayer->setName ("player");
-	    this->spawn(myPlayer);
-	    this->localPlayer = myPlayer;	    
-	    
-	    // bind input
-	    Orxonox *orx = Orxonox::getInstance();
-	    orx->getLocalInput()->bind (myPlayer);
-	    
-	    // bind camera
-	    this->localCamera = new Camera (this);
-	    this->localCamera->setName ("camera");
-	    this->localCamera->bind (myPlayer);	
-	    this->localPlayer->addChild (this->localCamera);
-
-	    // Create SkySphere
-	    skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
-
-	    break;
-
-
-	  }
-	default:
-	  printf("World::load() - no world with ID %i found", this->debugWorldNr );
-	}
-    }
-  else if(this->worldName != NULL)
-    {
-
-    }
-
-  // initialize debug coord system
-  objectList = glGenLists(1);
-  glNewList (objectList, GL_COMPILE);
-  glLoadIdentity();
-  glColor3f(1.0,0,0);
-  glBegin(GL_QUADS);
-
-  int sizeX = 100;
-  int sizeZ = 80;
-  float length = 1000;
-  float width = 200;
-  float widthX = float (length /sizeX);
-  float widthZ = float (width /sizeZ);
-  
-  float height [sizeX][sizeZ];
-  Vector normal_vectors[sizeX][sizeZ];
-  
-  
-  for ( int i = 0; i<sizeX-1; i+=1)
-    for (int j = 0; j<sizeZ-1;j+=1)
-      //height[i][j] = rand()/20046 + (j-25)*(j-25)/30;
-#ifdef __WIN32__
-      height[i][j]=(sin((float)j/3)*rand()*i/182400)*.5;
-#else
-      height[i][j]=(sin((float)j/3)*rand()*(long)i/6282450500.0)*.5;
-#endif
-
-  //Die Huegel ein wenig glaetten
-  for (int h=1; h<2;h++)
-    for (int i=1;i<sizeX-2 ;i+=1 )
-      for(int j=1;j<sizeZ-2;j+=1)
-	height[i][j]=(height[i+1][j]+height[i][j+1]+height[i-1][j]+height[i][j-1])/4;
-  
-  //Berechnung von normalen Vektoren
-  for(int i=1;i<sizeX-2;i+=1)
-    for(int j=1;j<sizeZ-2 ;j+=1)
-      {
-	Vector v1 = Vector (widthX*(1),      height[i][j],      widthZ*(j) );
-	Vector v2 = Vector (widthX*(i-1),    height[i-1][j],    widthZ*(j));
-	Vector v3 = Vector (widthX*(i),      height[i][j+1],    widthZ*(j+1));
-	Vector v4 = Vector (widthX*(i+1),    height[i+1][j],    widthZ*(j));
-	Vector v5 = Vector (widthX*(i),      height[i][j-1],    widthZ*(j-1));
-	
-	Vector c1 = v2 - v1;
-	Vector c2 = v3 - v1;
-	Vector c3=  v4 - v1;
-	Vector c4 = v5 - v1;
-	Vector zero = Vector (0,0,0);
-	normal_vectors[i][j]=c1.cross(v3-v5)+c2.cross(v4-v2)+c3.cross(v5-v3)+c4.cross(v2-v4);
-	normal_vectors[i][j].normalize();
-      }
-
-  int snowheight=3;
-  for ( int i = 0; i<sizeX; i+=1)
-    for (int j = 0; j<sizeZ;j+=1)
-      {	  
-	Vector v1 = Vector (widthX*(i),      height[i][j]-20,       widthZ*(j)  -width/2);
-	Vector v2 = Vector (widthX*(i+1),    height[i+1][j]-20,     widthZ*(j)  -width/2);
-	Vector v3 = Vector (widthX*(i+1),    height[i+1][j+1]-20,   widthZ*(j+1)-width/2);
-	Vector v4 = Vector (widthX*(i),      height[i][j+1]-20,     widthZ*(j+1)-width/2);
-	float a[3];
-	if(height[i][j]<snowheight){
-	  a[0]=0;
-	  a[1]=1.0-height[i][j]/10-.3;
-	  a[2]=0;
-	  glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
-	}
-	else{
-	    a[0]=1.0;
-	    a[1]=1.0;
-	    a[2]=1.0;
-	    glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
-	    
-	}
-	glNormal3f(normal_vectors[i][j].x, normal_vectors[i][j].y, normal_vectors[i][j].z);
-	glVertex3f(v1.x, v1.y, v1.z);
-	if(height[i+1][j]<snowheight){
-	  a[0]=0;
-	  a[1] =1.0-height[i+1][j]/10-.3;
-	  a[2]=0;
-	  glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
-	}
-	else{
-	  a[0]=1.0;
-	  a[1]=1.0;
-	  a[2]=1.0;
-	  glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
-	  
-	}
-	glNormal3f(normal_vectors[i+1][j].x, normal_vectors[i+1][j].y, normal_vectors[i+1][j].z);
-	glVertex3f(v2.x, v2.y, v2.z);
-	if(height[i+1][j+1]<snowheight){
-	  a[0]=0;
-	  a[1] =1.0-height[i+1][j+1]/10-.3;
-	  a[2]=0;
-	  glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
-	}
-	else{
-	  a[0]=1.0;
-	  a[1]=1.0;
-	  a[2]=1.0;
-	  glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
-	  
-	  
-	}
-	glNormal3f(normal_vectors[i+1][j+1].x, normal_vectors[i+1][j+1].y, normal_vectors[i+1][j+1].z);
-	glVertex3f(v3.x, v3.y, v3.z);
-	if(height[i][j+1]<snowheight){
-	  a[0]=0;
-	  a[1] =1.0-height[i+1][j+1]/10-.3;
-	  a[2]=0;
-	  glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
-	}
-	else{
-	  a[0]=1.0;
-	  a[1]=1.0;
-	  a[2]=1.0;
-	  glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
-	}
-	glNormal3f(normal_vectors[i][j+1].x, normal_vectors[i][j+1].y, normal_vectors[i][j+1].z);
-	glVertex3f(v4.x, v4.y, v4.z);
-	
-      }
-  glEnd();
-  /*  
-  glBegin(GL_LINES);
-  for( float x = -128.0; x < 128.0; x += 25.0)
-    {
-      for( float y = -128.0; y < 128.0; y += 25.0)
-	{
-	  glColor3f(1,0,0);
-	  glVertex3f(x,y,-128.0);
-	  glVertex3f(x,y,0.0);
-	  glColor3f(0.5,0,0);
-	  glVertex3f(x,y,0.0);
-	  glVertex3f(x,y,128.0);
-	}
-    }
-  for( float y = -128.0; y < 128.0; y += 25.0)
-    {
-      for( float z = -128.0; z < 128.0; z += 25.0)
-	{
-	  glColor3f(0,1,0);
-	  glVertex3f(-128.0,y,z);
-	  glVertex3f(0.0,y,z);
-	  glColor3f(0,0.5,0);
-	  glVertex3f(0.0,y,z);
-	  glVertex3f(128.0,y,z);
-	}
-    }
-  for( float x = -128.0; x < 128.0; x += 25.0)
-    {
-      for( float z = -128.0; z < 128.0; z += 25.0)
-	{
-	  glColor3f(0,0,1);
-	  glVertex3f(x,-128.0,z);
-	  glVertex3f(x,0.0,z);
-	  glColor3f(0,0,0.5);
-	  glVertex3f(x,0.0,z);
-	  glVertex3f(x,128.0,z);
-	}
-      
-    }
-  */  
-  /*
-  glBegin(GL_LINE_STRIP);
-  glColor3f(1.0, 5.0, 1.0);
-  for( int i = 0; i <= 30; i++)
-    {
-      glEvalCoord1f ((GLfloat) i/30.0);
-    }
-  glEnd();
-  */
-
-  trackManager->drawGraph(.01);
-  trackManager->debug(2);
-  /*  
-  glBegin(GL_LINES);
-  float i;
-  for(i = 0.0; i<1; i+=.01)
-    {
-      printf("%f, %f, %f\n",tmpCurve->calcPos(i).x, tmpCurve->calcPos(i).y, tmpCurve->calcPos(i).z);
-      glVertex3f(tmpCurve->calcPos(i).x, tmpCurve->calcPos(i).y, tmpCurve->calcPos(i).z);
-    }
-  glEnd();
-  */
-  glEndList();
-  // LIGHT initialisation
-  light = Light::getInstance();
-  light->addLight(0);
-  light->setAttenuation(QUADRATIC, 1.0);
-  light->setAttenuation(CONSTANT, 2.0);
-  light->setAttenuation(QUADRATIC, 1.0);
-  light->setPosition(10.0, 10.0, 50.0);
-  light->setDiffuseColor(1,1,1);
-  //  light->addLight(1);
-  //  light->setPosition(20, 10, -20);
-  //  light->setDiffuseColor(0,0,0);
-  light->debug();
-
-
-}
-
-/**
-   \brief initializes a new World
-*/
-ErrorMessage World::init()
-{
-  this->bPause = false;
-  CommandNode* cn = Orxonox::getInstance()->getLocalInput();
-  cn->addToWorld(this);
-  cn->enable(true);
-
-  //glMap1f (GL_MAP1_VERTEX_3, 0.0, 1.0, 3, 4, &ctrlpoints[0][0]);
-  //glEnable (GL_MAP1_VERTEX_3);
-  
-  //theNurb = gluNewNurbsRenderer ();
-  //gluNurbsProperty (theNurb, GLU_NURBS_MODE, GLU_NURBS_TESSELLATOR);
-  //gluNurbsProperty (theNurb, GLU_NURBS_VERTEX, vertexCallback );
-
-}
-
-
-/**
-   \brief starts the World
-*/
-ErrorMessage World::start()
-{
-  printf("World::start() - starting current World: nr %i\n", this->debugWorldNr);
-  this->bQuitOrxonox = false;
-  this->bQuitCurrentGame = false;
-  this->mainLoop();
-}
-
-/**
-   \brief stops the world.
-
-   This happens, when the player decides to end the Level.
-*/
-ErrorMessage World::stop()
-{
-  printf("World::stop() - got stop signal\n");
-  this->bQuitCurrentGame = true;
-}
-
-/**
-   \brief pauses the Game
-*/
-ErrorMessage World::pause()
-{
-  this->isPaused = true;
-}
-
-/**
-   \brief ends the pause Phase
-*/
-ErrorMessage World::resume()
-{
-  this->isPaused = false;
-}
-
-/**
-   \brief destroys the World
-*/
-ErrorMessage World::destroy()
-{
-  delete trackManager;
-}
-
-/**
-   \brief shows the loading screen
-*/
-void World::displayLoadScreen ()
-{
-  printf ("World::displayLoadScreen - start\n"); 
-  
-  //GLMenuImageScreen* 
-  this->glmis = GLMenuImageScreen::getInstance();
-  this->glmis->init();
-  this->glmis->setMaximum(10);
-  this->glmis->draw();
- 
-  printf ("World::displayLoadScreen - end\n"); 
-}
-
-/**
-   \brief removes the loadscreen, and changes over to the game
-
-   \todo take out the delay
-*/
-void World::releaseLoadScreen ()
-{
-  printf ("World::releaseLoadScreen - start\n"); 
-  this->glmis->setValue(this->glmis->getMaximum());
-  SDL_Delay(500);
-  printf ("World::releaseLoadScreen - end\n"); 
-}
-
-
-/** 
-    \brief checks for collisions
-    
-    This method runs through all WorldEntities known to the world and checks for collisions 
-    between them. In case of collisions the collide() method of the corresponding entities 
-    is called.
-*/
-void World::collide ()
-{
-  /*
-  List *a, *b;
-  WorldEntity *aobj, *bobj;
-   
-  a = entities;
-  
-  while( a != NULL)
-    {
-      aobj = a->nextElement();
-      if( aobj->bCollide && aobj->collisioncluster != NULL)
-	{
-	  b = a->nextElement();
-	  while( b != NULL )
-	    {
-	      bobj = b->nextElement();
-	      if( bobj->bCollide && bobj->collisioncluster != NULL )
-		{
-		  unsigned long ahitflg, bhitflg;
-		  if( check_collision ( &aobj->place, aobj->collisioncluster, 
-					&ahitflg, &bobj->place, bobj->collisioncluster, 
-					&bhitflg) );
-		  {
-		    aobj->collide (bobj, ahitflg, bhitflg);
-		    bobj->collide (aobj, bhitflg, ahitflg);
-		  }
-		}
-	      b = b->nextElement();
-	    }
-	}
-      a = a->enumerate();
-    }
-  */
-}
-
-/** 
-    \brief runs through all entities calling their draw() methods
-*/
-void World::draw ()
-{
-  /* draw entities */
-  WorldEntity* entity;
-  entity = this->entities->enumerate();
-  while( entity != NULL ) 
-    { 
-      if( entity->bDraw ) entity->draw();
-      entity = this->entities->nextElement();
-    } 
-  
-  glCallList (objectList);
-  //! \todo skysphere is a WorldEntity and should be inside of the world-entity-list.
-  skySphere->draw();
-
-  testFont->printText(0, 0, 1, "orxonox_" PACKAGE_VERSION);
-
-}
-
-
-/**
-   \brief function to put your own debug stuff into it. it can display informations about
-   the current class/procedure
-*/
-void World::debug()
-{
-  printf ("World::debug() - starting debug\n");
-  PNode* p1 = NullParent::getInstance ();
-  PNode* p2 = new PNode (new Vector(2, 2, 2), p1);
-  PNode* p3 = new PNode (new Vector(4, 4, 4), p1);
-  PNode* p4 = new PNode (new Vector(6, 6, 6), p2);
-
-  p1->debug ();
-  p2->debug ();
-  p3->debug ();
-  p4->debug ();
-
-  p1->shiftCoor (new Vector(-1, -1, -1));
-
-  printf("World::debug() - shift\n");
-  p1->debug ();
-  p2->debug ();
-  p3->debug ();
-  p4->debug ();
-  
-  p1->update (1);
-
-  printf ("World::debug() - update\n");
-  p1->debug ();
-  p2->debug ();
-  p3->debug ();
-  p4->debug ();
-
-  p2->shiftCoor (new Vector(-1, -1, -1));
-  p1->update (2);
-
-  p1->debug ();
-  p2->debug ();
-  p3->debug ();
-  p4->debug ();
-
-  p2->setAbsCoor (new Vector(1,2,3));
-
-
- p1->update (2);
-
-  p1->debug ();
-  p2->debug ();
-  p3->debug ();
-  p4->debug ();
-
-  p1->destroy ();
-  
-  
-  /*
-  WorldEntity* entity;
-  printf("counting all entities\n");
-  printf("World::debug() - enumerate()\n");
-  entity = entities->enumerate();  
-  while( entity != NULL ) 
-    { 
-      if( entity->bDraw ) printf("got an entity\n");
-      entity = entities->nextElement();
-    }
-  */
-}
-
-
-/**
-  \brief main loop of the world: executing all world relevant function
-
-  in this loop we synchronize (if networked), handle input events, give the heart-beat to
-  all other member-entities of the world (tick to player, enemies etc.), checking for
-  collisions drawing everything to the screen.
-*/
-void World::mainLoop()
-{
-  this->lastFrame = SDL_GetTicks ();
-  printf("World::mainLoop() - Entering main loop\n");
-  while( !this->bQuitOrxonox && !this->bQuitCurrentGame) /* \todo implement pause */
-    {
-      // Network
-      this->synchronize ();
-      // Process input
-      this->handleInput ();
-      if( this->bQuitCurrentGame || this->bQuitOrxonox)
-	{
-	  printf("World::mainLoop() - leaving loop earlier...\n");
-	  break;
-	}
-      // Process time
-      this->timeSlice ();
-      // Process collision
-      this->collide ();
-      // Draw
-      this->display ();
-  
-      for( int i = 0; i < 5000000; i++) {}
-      /* \todo this is to slow down the program for openGl Software emulator computers, reimplement*/
-    }
-  printf("World::mainLoop() - Exiting the main loop\n");
-}
-
-
-/**
-   \brief synchronize local data with remote data
-*/
-void World::synchronize ()
-{
-  // Get remote input
-  // Update synchronizables
-}
-
-
-/**
-   \brief run all input processing
-
-   the command node is the central input event dispatcher. the node uses the even-queue from
-   sdl and has its own event-passing-queue.
-*/
-void World::handleInput ()
-{
-  // localinput
-  CommandNode* cn = Orxonox::getInstance()->getLocalInput();
-  cn->process();
-  // remoteinput
-}
-
-
-/**
-   \brief advance the timeline
-
-   this calculates the time used to process one frame (with all input handling, drawing, etc)
-   the time is mesured in ms and passed to all world-entities and other classes that need
-   a heart-beat.
-*/
-void World::timeSlice ()
-{
-  Uint32 currentFrame = SDL_GetTicks();
-  if(!this->bPause)
-    {
-      Uint32 dt = currentFrame - this->lastFrame;
-      
-      if(dt > 0)
-	{
-	  float fps = 1000/dt;
-	  printf("fps = %f\n", fps);
-	}
-      else
-	{
-	  /* the frame-rate is limited to 100 frames per second, all other things are for
-	     nothing.
-	  */
-	  printf("fps = 1000 - frame rate is adjusted\n");
-	  SDL_Delay(10);
-	  dt = 10;
-	}
-      //this->timeSlice (dt);
-      
-      /* function to let all entities tick (iterate through list) */
-      WorldEntity* entity;
-      float seconds = dt / 1000.0;      
-      this->nullParent->update (seconds);
-      entity = entities->enumerate(); 
-      while( entity != NULL) 
-	{ 
-	  entity->tick (seconds);
-	  entity = entities->nextElement();
-	}
-      skySphere->updatePosition(localCamera->absCoordinate);
-      
-      /* update tick the rest */
-      this->localCamera->timeSlice(dt);
-      this->trackManager->tick(dt);
-    }
-  this->lastFrame = currentFrame;
-}
-
-
-/**
-   \brief render the current frame
-   
-   clear all buffers and draw the world
-*/
-void World::display ()
-{
-  // clear buffer
-  glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
-  // set camera
-  this->localCamera->apply ();
-  // draw world
-  this->draw();
-  // draw HUD
-  /* \todo draw HUD */
-  // flip buffers
-  SDL_GL_SwapBuffers();
-  //SDL_Surface* screen = Orxonox::getInstance()->getScreen ();
-  //SDL_Flip (screen);
-}
-
-
-/**
-   \brief add and spawn a new entity to this world
-   \param entity to be added
-*/
-void World::spawn(WorldEntity* entity)
-{
-  if( this->nullParent != NULL && entity->parent == NULL)
-    this->nullParent->addChild (entity);
-
-  this->entities->add (entity);
-
-  entity->postSpawn ();
-}
-
-
-/**
-   \brief add and spawn a new entity to this world
-   \param entity to be added
-   \param absCoor At what coordinates to add this entity.
-   \param absDir In which direction should it look.
-*/
-void World::spawn(WorldEntity* entity, Vector* absCoor, Quaternion* absDir)
-{
-  entity->setAbsCoor (absCoor);
-  entity->setAbsDir (absDir);
-  
-  if( this->nullParent != NULL && entity->parent == NULL)
-    this->nullParent->addChild (entity);
-
-  this->entities->add (entity);
-
-  entity->postSpawn ();
-}
-
-
-
-/**
-  \brief commands that the world must catch
-  \returns false if not used by the world
-*/
-bool World::command(Command* cmd)
-{
-  return false;
-}
-
Index: xonox/trunk/src/world.h
===================================================================
--- /orxonox/trunk/src/world.h	(revision 3474)
+++ 	(revision )
@@ -1,90 +1,0 @@
-/*! 
-    \file world.h
-    \brief Holds and manages all game data
-*/ 
-
-#ifndef _WORLD_H
-#define _WORLD_H
-
-#include "stdincl.h"
-#include "story_entity.h"
-
-
-class TrackManager;
-class WorldEntity;
-class Camera;
-class PNode;
-class GLMenuImageScreen;
-class Skysphere;
-class Light;
-class FontSet;
-
-//! The game world
-/**
-   this class initializes everything that should be displayed inside of the current level.
-   it is the main driving factor during gameplay.
-*/
-class World : public StoryEntity {
-
- public:
-  World (char* name);
-  World (int worldID);
-  virtual ~World ();
-
-
-  /* classes from story-entity */
-  virtual ErrorMessage load ();
-  virtual ErrorMessage init ();
-  virtual ErrorMessage start ();
-  virtual ErrorMessage stop ();
-  virtual ErrorMessage pause ();
-  virtual ErrorMessage resume ();
-  virtual ErrorMessage destroy ();
-
-  virtual void displayLoadScreen();
-  virtual void releaseLoadScreen();
-  
-  /* command node functions */
-  bool command (Command* cmd);
-
-  /* interface to world */
-  void spawn (WorldEntity* entity);
-  void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir);
-
-
-
- private:
-  Uint32 lastFrame;             //!< last time of frame
-  bool bQuitOrxonox;            //!< quit this application
-  bool bQuitCurrentGame;        //!< quit only the current game and return to menu
-  bool bPause;                  //!< pause mode
-
-  FontSet* testFont;            //!< A test Font. \todo fix this, so it is for real.
-  GLMenuImageScreen* glmis;     //!< The Level-Loader Display
-
-  char* worldName;              //!< The name of this World
-  int debugWorldNr;             //!< The Debug Nr. needed, if something goes wrong
-
-  PNode* nullParent;            //!< The zero-point, that everything has as its parent.
-  TrackManager* trackManager;  //!< The reference of the TrackManager that handles the course through the Level.
-  Camera* localCamera;         //!< The current Camera
-  Skysphere* skySphere;         //!< The Environmental Heaven of orxonox \todo insert this to environment insted
-  Light* light;                 //!< The Lights of the Level
-
-  GLuint objectList;            //!< temporary: \todo this will be ereased soon
-  tList<WorldEntity>* entities;//!< A template List of all entities. Every moving thing should be included here, and world automatically updates them.
-  WorldEntity* localPlayer;     //!< The Player, you fly through the level.
- 
-  /* function for main-loop */
-  void mainLoop ();
-  void synchronize ();
-  void handleInput ();
-  void timeSlice ();
-  void collide ();
-  void draw ();
-  void display ();
-  void debug ();
-
-};
-
-#endif /* _WORLD_H */
Index: /orxonox/trunk/src/world_entities/skysphere.cc
===================================================================
--- /orxonox/trunk/src/world_entities/skysphere.cc	(revision 3475)
+++ /orxonox/trunk/src/world_entities/skysphere.cc	(revision 3475)
@@ -0,0 +1,127 @@
+
+/* 
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: David Gruetter
+   co-programmer: Benjamin Grauer
+
+    Created by Dave: this file is actually quite similar to player.cc and so is 
+    skybox.h similar to player.h
+    With that said, things should be clear:)
+
+    Edited by Bensch: more constructors, changeability, comments...
+
+*/
+
+#include "importer/material.h"
+#include "skysphere.h"
+#include "stdincl.h"
+#include "vector.h"
+#include "world_entity.h"
+
+
+using namespace std;
+
+/**
+   \brief Standart Constructor
+*/
+Skysphere::Skysphere()
+{  
+  initialize("../data/pictures/sky-replace.jpg");
+}
+
+/**
+   \brief Constructs a SkySphere and takes fileName as a map.
+   \param fileName the file to take as input for the skysphere
+*/
+Skysphere::Skysphere(char* fileName)
+{
+  initialize(fileName);
+}
+
+/**
+   \brief default destructor
+*/
+Skysphere::~Skysphere()
+{
+  PRINTF(3)("Deleting the SkySphere\n");
+  delete skyMaterial;
+  free(sphereObj);
+}
+
+/**
+   \brief initializes the Skysphere.
+   \param fileName the file to take as input for the skysphere
+*/
+void Skysphere::initialize(char* fileName)
+{
+  PRINTF(1)("initializing the Skysphere with Material %s.\n", fileName);
+  this->sphereObj = gluNewQuadric();
+  gluQuadricTexture(this->sphereObj, GL_TRUE);
+  this->setRadius(250.0);
+
+  this->skyMaterial = new Material("Sky");
+  this->setTexture(fileName);
+  this->skyMaterial->setIllum(3);
+  this->skyMaterial->setAmbient(1.0, 1.0, 1.0);
+}
+
+/**
+   \brief sets the Radius of the Sphere.
+   \param radius The Radius of The Sphere
+*/
+void Skysphere::setRadius(float radius)
+{
+  this->sphereRadius = radius;
+}
+
+/**
+   \brief Defines which texture should be loaded onto the skysphere.
+   \param fileName The filename of the Texture
+*/
+void Skysphere::setTexture(char* fileName)
+{
+  this->skyMaterial->setDiffuseMap(fileName);
+}
+
+/**
+   \brief updates the position of the Skysphere
+   \param sphereCenter The coordinate of the Center of the Sphere
+   
+   This is normally done in the update-phase of world, so the Skysphere is always centered at the Camera.
+*/
+void Skysphere::updatePosition(Vector sphereCenter)
+{
+  this->sphereCenter = sphereCenter;
+}
+
+/**
+   \brief draws the Skysphere
+   
+   This part is normally precessed in the "Painting Phase".
+*/
+
+void Skysphere::draw()
+{
+  glEnable(GL_TEXTURE_2D);
+  skyMaterial->select();
+  glPushMatrix();
+  glTranslatef(this->sphereCenter.x,this->sphereCenter.y,this->sphereCenter.z);
+  
+  glRotatef(-30, 1, 0, 0);
+  glRotatef(95.0f, 0.0f, 0.0f, 1.0f);
+  glRotatef(-250.0f, 0.0, 1.0f, 0.0f);
+  
+  gluSphere(sphereObj, sphereRadius, 20, 20);
+  glPopMatrix();
+  glDisable(GL_TEXTURE_2D);
+
+}
Index: /orxonox/trunk/src/world_entities/skysphere.h
===================================================================
--- /orxonox/trunk/src/world_entities/skysphere.h	(revision 3475)
+++ /orxonox/trunk/src/world_entities/skysphere.h	(revision 3475)
@@ -0,0 +1,48 @@
+/*! 
+    \file skysphere.h
+    \brief Definition of the Skysphere, that handles the Display of an atmosphere of orxonox.
+
+    A SkySphere is always centered at the current working Camera, and will only obey the cameras
+    movment but not its rotation.
+
+    \todo self-rotation
+    \todo handle reference to parent-object
+*/
+
+#ifndef _SKYSPHERE_H
+#define _SKYSPHERE_H
+
+/* INCLUDES */
+#include "p_node.h"
+
+/* FORWARD DEFINITION */
+class Material;
+class Vector;
+
+//! A Class to handle a SkySphere
+class Skysphere: public PNode 
+{
+ private: 
+  GLUquadricObj *sphereObj; //!< A Placeholder for the SkySphere.
+  Material *skyMaterial;    //!< A Material for the SkySphere.
+  Vector sphereCenter;      //!< Center of the SkySphere.
+  float sphereRadius;       //!< Radius of the SkySphere. This should match the frustum maximum range.
+
+ public:
+  Skysphere();
+  Skysphere(char* fileName);
+  ~Skysphere();
+
+  void setRadius(float radius);
+  void setTexture(char* fileName);
+
+  void updatePosition(Vector sphereCenter);
+  void draw();
+
+ private:
+  void initialize(char* fileName);  
+};
+
+#endif
+
+
