Index: orxonox/branches/heightMap/ChangeLog
===================================================================
--- orxonox/branches/heightMap/ChangeLog	(revision 4122)
+++ orxonox/branches/heightMap/ChangeLog	(revision 4165)
@@ -1,2 +1,6 @@
+2005-05-10	Benjamin Grauer <bensch@orxonox.ethz.ch>
+	Merged the gui into the executable
+	Windows compiles again.
+
 2005-04-27	orxonox
 	Tagged Version 0.2.3-pre-alpha
Index: orxonox/branches/heightMap/Makefile.in
===================================================================
--- orxonox/branches/heightMap/Makefile.in	(revision 4122)
+++ orxonox/branches/heightMap/Makefile.in	(revision 4165)
@@ -129,4 +129,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
Index: orxonox/branches/heightMap/configure
===================================================================
--- orxonox/branches/heightMap/configure	(revision 4122)
+++ orxonox/branches/heightMap/configure	(revision 4165)
@@ -312,5 +312,5 @@
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE RANLIB ac_ct_RANLIB CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG SUB_PROJECTS_TRUE SUB_PROJECTS_FALSE DOCUMENTATION_TRUE DOCUMENTATION_FALSE DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE GPROF MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_FALSE CURL_LIBS CURL_CFLAGS HAVE_CURL_TRUE HAVE_CURL_FALSE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE RANLIB ac_ct_RANLIB CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG SUB_PROJECTS_TRUE SUB_PROJECTS_FALSE DOCUMENTATION_TRUE DOCUMENTATION_FALSE DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE GPROF PKG_CONFIG MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_FALSE CURL_LIBS CURL_CFLAGS HAVE_CURL_TRUE HAVE_CURL_FALSE LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
@@ -4216,4 +4216,50 @@
 
 
+#-------------------------#
+# checking for pkg-config #
+#-------------------------#
+if test x$def_gtk = xyes; then
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+
+
 #########################
 ## CHECKING FOR SYSTEM ##
@@ -6674,13 +6720,12 @@
 #-----#
 if test x$def_gtk = xyes; then
-
 	#PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
 	echo "$as_me:$LINENO: checking for gtk2.0" >&5
 echo $ECHO_N "checking for gtk2.0... $ECHO_C" >&6
-	if `pkg-config --exists gtk+-2.0`; then
+	if `$PKG_CONFIG --exists gtk+-2.0`; then
   		echo "yes"
   		have_gtk2=yes
-		GTK2_LIBS=`pkg-config --libs gtk+-2.0`
-		GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0`
+		GTK2_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
+		GTK2_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
 
 cat >>confdefs.h <<_ACEOF
@@ -6688,4 +6733,8 @@
 _ACEOF
 
+		if test $DEBUG -ge 3; then
+		 echo "cflags: $GTK2_CFLAGS"
+		 echo "libs: $GTK2_LIBS"
+		fi
 	else
 		echo "no"
@@ -8671,4 +8720,5 @@
 s,@DOXYGEN_FALSE@,$DOXYGEN_FALSE,;t t
 s,@GPROF@,$GPROF,;t t
+s,@PKG_CONFIG@,$PKG_CONFIG,;t t
 s,@MSBITFIELDS@,$MSBITFIELDS,;t t
 s,@GTK2_LIBS@,$GTK2_LIBS,;t t
Index: orxonox/branches/heightMap/configure.ac
===================================================================
--- orxonox/branches/heightMap/configure.ac	(revision 4122)
+++ orxonox/branches/heightMap/configure.ac	(revision 4165)
@@ -192,4 +192,12 @@
 AC_PATH_PROG(GPROF, gprof)
 
+#-------------------------#
+# checking for pkg-config #
+#-------------------------#
+if test x$def_gtk = xyes; then
+ AC_PATH_PROG(PKG_CONFIG, pkg-config)
+fi
+
+
 #########################
 ## CHECKING FOR SYSTEM ##
@@ -435,13 +443,16 @@
 #-----#
 if test x$def_gtk = xyes; then 
-
 	#PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
 	AC_MSG_CHECKING([for gtk2.0])
-	if `pkg-config --exists gtk+-2.0`; then
+	if `$PKG_CONFIG --exists gtk+-2.0`; then
   		echo "yes"
   		have_gtk2=yes
-		GTK2_LIBS=`pkg-config --libs gtk+-2.0`
-		GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0`
+		GTK2_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
+		GTK2_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
 		AC_DEFINE_UNQUOTED(HAVE_GTK2, 1, [if we have GTK2])
+		if test $DEBUG -ge 3; then
+		 echo "cflags: $GTK2_CFLAGS"
+		 echo "libs: $GTK2_LIBS"
+		fi
 	else
 		echo "no"
Index: orxonox/branches/heightMap/src/Makefile.am
===================================================================
--- orxonox/branches/heightMap/src/Makefile.am	(revision 4122)
+++ orxonox/branches/heightMap/src/Makefile.am	(revision 4165)
@@ -22,4 +22,5 @@
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/animation
 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/common
+AM_CXXFLAGS+=-I$(MAINSRCDIR)/subprojects
 
 
@@ -32,5 +33,5 @@
 
 orxonox_DEPENDENCIES = libORXgui.a
-orxonox_LDADD = libORXgui.a
+orxonox_LDADD = libORXgui.a $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
 orxonox_SOURCES= orxonox.cc \
 		 game_loader.cc \
@@ -89,5 +90,6 @@
 		 lib/xmlparser/tinystr.cc \
 		 lib/xmlparser/tinyxmlerror.cc \
-		 lib/xmlparser/tinyxmlparser.cc 
+		 lib/xmlparser/tinyxmlparser.cc \
+		 subprojects/benchmark.cc
 
 
@@ -163,8 +165,8 @@
 	         lib/gui/gui/gui_banner.h \
 	         lib/gui/gui/gui_keys.h \
-	         lib/gui/gui/gui_update.h
+	         lib/gui/gui/gui_update.h \
+		 subprojects/benchmark.h
 
 libORXgui_a_CPPFLAGS=$(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
-AM_LDFLAGS=$(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
 
 libORXgui_a_SOURCES = lib/gui/gui/gui.cc \
Index: orxonox/branches/heightMap/src/Makefile.in
===================================================================
--- orxonox/branches/heightMap/src/Makefile.in	(revision 4122)
+++ orxonox/branches/heightMap/src/Makefile.in	(revision 4165)
@@ -91,6 +91,7 @@
 	glmenu_imagescreen.$(OBJEXT) tinyxml.$(OBJEXT) \
 	tinystr.$(OBJEXT) tinyxmlerror.$(OBJEXT) \
-	tinyxmlparser.$(OBJEXT)
+	tinyxmlparser.$(OBJEXT) benchmark.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
+am__DEPENDENCIES_1 =
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -100,5 +101,6 @@
 @AMDEP_TRUE@	./$(DEPDIR)/animation_player.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/array.Po ./$(DEPDIR)/base_entity.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/base_object.Po ./$(DEPDIR)/camera.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/base_object.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/benchmark.Po ./$(DEPDIR)/camera.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/campaign.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/character_attributes.Po \
@@ -221,4 +223,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
@@ -272,8 +275,8 @@
 target_vendor = @target_vendor@
 MAINSRCDIR = .
-AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/graphics/particles -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/gui/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common
+AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/graphics/particles -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/gui/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common -I$(MAINSRCDIR)/subprojects
 noinst_LIBRARIES = libORXgui.a
 orxonox_DEPENDENCIES = libORXgui.a
-orxonox_LDADD = libORXgui.a
+orxonox_LDADD = libORXgui.a $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
 orxonox_SOURCES = orxonox.cc \
 		 game_loader.cc \
@@ -332,5 +335,6 @@
 		 lib/xmlparser/tinystr.cc \
 		 lib/xmlparser/tinyxmlerror.cc \
-		 lib/xmlparser/tinyxmlparser.cc 
+		 lib/xmlparser/tinyxmlparser.cc \
+		 subprojects/benchmark.cc
 
 noinst_HEADERS = orxonox.h \
@@ -405,8 +409,8 @@
 	         lib/gui/gui/gui_banner.h \
 	         lib/gui/gui/gui_keys.h \
-	         lib/gui/gui/gui_update.h
+	         lib/gui/gui/gui_update.h \
+		 subprojects/benchmark.h
 
 libORXgui_a_CPPFLAGS = $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
-AM_LDFLAGS = $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
 libORXgui_a_SOURCES = lib/gui/gui/gui.cc \
 			    lib/gui/gui/gui_gtk.cc \
@@ -446,7 +450,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/Makefile
+	  $(AUTOMAKE) --foreign  src/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -513,4 +517,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_entity.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_object.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/benchmark.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camera.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/campaign.Po@am__quote@
@@ -1533,4 +1538,20 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tinyxmlparser.obj `if test -f 'lib/xmlparser/tinyxmlparser.cc'; then $(CYGPATH_W) 'lib/xmlparser/tinyxmlparser.cc'; else $(CYGPATH_W) '$(srcdir)/lib/xmlparser/tinyxmlparser.cc'; fi`
+
+benchmark.o: subprojects/benchmark.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT benchmark.o -MD -MP -MF "$(DEPDIR)/benchmark.Tpo" -c -o benchmark.o `test -f 'subprojects/benchmark.cc' || echo '$(srcdir)/'`subprojects/benchmark.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/benchmark.Tpo" "$(DEPDIR)/benchmark.Po"; else rm -f "$(DEPDIR)/benchmark.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='subprojects/benchmark.cc' object='benchmark.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/benchmark.Po' tmpdepfile='$(DEPDIR)/benchmark.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 benchmark.o `test -f 'subprojects/benchmark.cc' || echo '$(srcdir)/'`subprojects/benchmark.cc
+
+benchmark.obj: subprojects/benchmark.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT benchmark.obj -MD -MP -MF "$(DEPDIR)/benchmark.Tpo" -c -o benchmark.obj `if test -f 'subprojects/benchmark.cc'; then $(CYGPATH_W) 'subprojects/benchmark.cc'; else $(CYGPATH_W) '$(srcdir)/subprojects/benchmark.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/benchmark.Tpo" "$(DEPDIR)/benchmark.Po"; else rm -f "$(DEPDIR)/benchmark.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='subprojects/benchmark.cc' object='benchmark.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/benchmark.Po' tmpdepfile='$(DEPDIR)/benchmark.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 benchmark.obj `if test -f 'subprojects/benchmark.cc'; then $(CYGPATH_W) 'subprojects/benchmark.cc'; else $(CYGPATH_W) '$(srcdir)/subprojects/benchmark.cc'; fi`
 uninstall-info-am:
 
@@ -1656,5 +1677,5 @@
 
 distdir: $(DISTFILES)
-	$(mkdir_p) $(distdir)/ai $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/data $(distdir)/lib/graphics $(distdir)/lib/graphics/importer $(distdir)/lib/graphics/particles $(distdir)/lib/gui/gui $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/network $(distdir)/proto $(distdir)/story_entities $(distdir)/util $(distdir)/util/animation $(distdir)/util/common $(distdir)/world_entities
+	$(mkdir_p) $(distdir)/ai $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/data $(distdir)/lib/graphics $(distdir)/lib/graphics/importer $(distdir)/lib/graphics/particles $(distdir)/lib/gui/gui $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/network $(distdir)/proto $(distdir)/story_entities $(distdir)/subprojects $(distdir)/util $(distdir)/util/animation $(distdir)/util/common $(distdir)/world_entities
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
Index: orxonox/branches/heightMap/src/factory.h
===================================================================
--- orxonox/branches/heightMap/src/factory.h	(revision 4122)
+++ orxonox/branches/heightMap/src/factory.h	(revision 4165)
@@ -57,5 +57,5 @@
 tFactory<T>::tFactory(const char* name) : Factory(name)
 {
-  printf("fileName: %s\n", name);
+  PRINTF(5)("fileName: %s\n", name);
 }
   
Index: orxonox/branches/heightMap/src/glmenu/glmenu_imagescreen.cc
===================================================================
--- orxonox/branches/heightMap/src/glmenu/glmenu_imagescreen.cc	(revision 4122)
+++ orxonox/branches/heightMap/src/glmenu/glmenu_imagescreen.cc	(revision 4165)
@@ -97,5 +97,5 @@
 {
   delete this->backMat;
-  delete barMat;
+  delete this->barMat;
 }
 
Index: orxonox/branches/heightMap/src/lib/Makefile.in
===================================================================
--- orxonox/branches/heightMap/src/lib/Makefile.in	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/Makefile.in	(revision 4165)
@@ -113,4 +113,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
@@ -182,7 +183,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/branches/heightMap/src/lib/coord/p_node.cc
===================================================================
--- orxonox/branches/heightMap/src/lib/coord/p_node.cc	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/coord/p_node.cc	(revision 4165)
@@ -99,5 +99,4 @@
   this->parent = parent; 
   this->objectName = NULL;
-  this->time = 1.0; /* set time to 1 to make divisions by zero impossible */
 }
 
@@ -281,22 +280,4 @@
 }
 
-
-
-/**
-   \brief this calculates the current movement speed of the node
-*/
-float PNode::getSpeed() const
-{
-  return (this->absCoordinate - this->lastAbsCoordinate).len() / this->time;
-}
-
-/**
-   \returns the Velocity of the PNode
-*/
-Vector PNode::getVelocity() const
-{
-  return (this->absCoordinate - this->lastAbsCoordinate) / this->time;
-}
-
 /**
    \brief adds a child and makes this node to a parent
@@ -424,5 +405,5 @@
 {
   this->lastAbsCoordinate = this->absCoordinate;
-  this->time = dt;
+
   PRINTF(4)("PNode::update - %s - (%f, %f, %f)\n", this->objectName, this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
 
@@ -499,4 +480,5 @@
   delete iterator;
 
+  this->velocity = (this->absCoordinate - this->lastAbsCoordinate) / dt;
   this->timeStamp = timeStamp;
   this->bRelCoorChanged = false;
Index: orxonox/branches/heightMap/src/lib/coord/p_node.h
===================================================================
--- orxonox/branches/heightMap/src/lib/coord/p_node.h	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/coord/p_node.h	(revision 4165)
@@ -69,6 +69,8 @@
   void shiftDir (const Quaternion& shift);
 
-  float getSpeed() const;
-  Vector getVelocity() const;
+  /** \returns the Speed of the Node */
+  inline float getSpeed() const {return this->velocity.len()/1000;} //! \FIX THIS SHOULD NOT BE /1000
+  /** \returns the Velocity of the Node */
+  inline const Vector& getVelocity() const {return this->velocity;}
 
   void addChild (PNode* pNode, int parentingMode = DEFAULT_MODE);
@@ -110,7 +112,6 @@
   void init(PNode* parent);
 
+  Vector velocity;          //!< Saves the velocity.
   Vector lastAbsCoordinate; //!< this is used for speedcalculation, it stores the last coordinate
-  Vector diffCoordinate;    //!< this is stored here for performance reasons, difference to the last vector
-  float time;                //!< time since last update
 };
 
Index: orxonox/branches/heightMap/src/lib/graphics/Makefile.in
===================================================================
--- orxonox/branches/heightMap/src/lib/graphics/Makefile.in	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/graphics/Makefile.in	(revision 4165)
@@ -113,4 +113,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
@@ -176,7 +177,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/graphics/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/graphics/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/branches/heightMap/src/lib/graphics/graphics_engine.cc
===================================================================
--- orxonox/branches/heightMap/src/lib/graphics/graphics_engine.cc	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/graphics/graphics_engine.cc	(revision 4165)
@@ -31,4 +31,7 @@
 {
   this->setClassName ("GraphicsEngine");
+
+  this->fullscreen = false;
+
   this->initVideo();
 
@@ -140,10 +143,15 @@
 int GraphicsEngine::setResolution(int width, int height, int bpp)
 {
+  Uint32 fullscreenFlag;
   this->resolutionX = width;
   this->resolutionY = height;
   this->bitsPerPixel = bpp;
+  if (this->fullscreen)
+    fullscreenFlag = SDL_FULLSCREEN;
+  else
+    fullscreenFlag = 0;
   
   printf ("ok\n");
-  if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags)) == NULL)
+  if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags | fullscreenFlag)) == NULL)
     {
       PRINTF(1)("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags, SDL_GetError());
@@ -151,5 +159,10 @@
       //    return -1;
     }
-
+}
+
+void GraphicsEngine::setFullscreen(bool fullscreen)
+{
+  this->fullscreen = fullscreen;
+  this->setResolution(this->resolutionX, this->resolutionY, this->bitsPerPixel);
 }
 
@@ -257,5 +270,5 @@
   /* Check if our resolution is restricted */
   if(this->videoModes == (SDL_Rect **)-1){
-    PRINTF(1)("All resolutions available.\n");
+    PRINTF(2)("All resolutions available.\n");
   }
   else{
@@ -263,5 +276,5 @@
     PRINT(0)("Available Resoulution Modes are\n");
     for(int i = 0; this->videoModes[i]; ++i)
-      PRINT(0)(" |  %d x %d\n", this->videoModes[i]->w, this->videoModes[i]->h);
+      PRINT(4)(" |  %d x %d\n", this->videoModes[i]->w, this->videoModes[i]->h);
   }
   
Index: orxonox/branches/heightMap/src/lib/graphics/graphics_engine.h
===================================================================
--- orxonox/branches/heightMap/src/lib/graphics/graphics_engine.h	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/graphics/graphics_engine.h	(revision 4165)
@@ -26,4 +26,5 @@
   int setGLattribs(void);
   int setResolution(int width, int height, int bpp);
+  void setFullscreen(bool fullscreen = false);
   /** \returns the x resolution */
   inline int getResolutionX(void) {return this->resolutionX;}
Index: orxonox/branches/heightMap/src/lib/graphics/importer/Makefile.in
===================================================================
--- orxonox/branches/heightMap/src/lib/graphics/importer/Makefile.in	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/graphics/importer/Makefile.in	(revision 4165)
@@ -150,4 +150,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
@@ -247,7 +248,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/branches/heightMap/src/lib/graphics/importer/material.cc
===================================================================
--- orxonox/branches/heightMap/src/lib/graphics/importer/material.cc	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/graphics/importer/material.cc	(revision 4165)
@@ -45,12 +45,7 @@
   this->setTransparency(1.0);
 
-
   this->diffuseTexture = NULL;
   this->ambientTexture = NULL;
   this->specularTexture = NULL;
-
-  this->diffuseTextureSet = false;
-  this->ambientTextureSet = false;
-  this->specularTextureSet = false;
 
   this->setName(mtlName);
@@ -107,5 +102,5 @@
     glShadeModel(GL_SMOOTH);
 
-  if (this->diffuseTextureSet)
+  if (this->diffuseTexture)
     {
       glEnable(GL_TEXTURE_2D);
@@ -300,10 +295,8 @@
 {
   PRINTF(4)("setting Diffuse Map %s\n", dMap);
-  //    diffuseTexture = new Texture();
-  //    this->diffuseTextureSet = diffuseTexture->loadImage(dMap);
 
   //! \todo check if RESOURCE MANAGER is availiable
   //! \todo Textures from .mtl-file need special care.
-  this->diffuseTextureSet = this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE);
+  this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE);
 }
 
Index: orxonox/branches/heightMap/src/lib/graphics/importer/material.h
===================================================================
--- orxonox/branches/heightMap/src/lib/graphics/importer/material.h	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/graphics/importer/material.h	(revision 4165)
@@ -67,9 +67,4 @@
   Texture* ambientTexture; //!< The ambient texture of the Material.
   Texture* specularTexture;//!< The specular texture of the Material.
-  
-  bool diffuseTextureSet; //!< Chekcs if the diffuse texture is Set.
-  bool ambientTextureSet; //!< Chekcs if the ambient texture is Set.
-  bool specularTextureSet;//!< Chekcs if the specular texture is Set.
-
 };
 #endif
Index: orxonox/branches/heightMap/src/lib/graphics/particles/particle_system.cc
===================================================================
--- orxonox/branches/heightMap/src/lib/graphics/particles/particle_system.cc	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/graphics/particles/particle_system.cc	(revision 4165)
@@ -40,4 +40,5 @@
    this->particleType = type;
    this->particles = NULL;
+   this->deadList = NULL;
    this->setConserve(.8);
    this->setLifeSpan(.1);
@@ -57,4 +58,20 @@
   // delete what has to be deleted here
    ParticleEngine::getInstance()->removeSystem(this);
+
+   // deleting all the living Particles
+   while (this->particles)
+     {
+       Particle* tmpDelPart = this->particles;
+       this->particles = this->particles->next;
+       delete tmpDelPart;
+     }
+
+   // deleting all the dead particles
+   while (this->deadList)
+     {
+       Particle* tmpDelPart = this->deadList;
+       this->deadList = this->deadList->next;
+       delete tmpDelPart;
+     }
 }
 
@@ -199,5 +216,6 @@
 	    {
 	      prevPart->next = tickPart->next;
-	      delete tickPart;
+	      tickPart->next = this->deadList;
+	      this->deadList = tickPart;
 	      tickPart = prevPart->next;
 	    }
@@ -206,5 +224,6 @@
 	      prevPart = NULL;
 	      this->particles = tickPart->next;
-	      delete tickPart;
+	      tickPart->next = this->deadList;
+	      this->deadList = tickPart;
 	      tickPart = this->particles;
 	    }
@@ -266,5 +285,11 @@
       if (unlikely(particles == NULL))
 	{
-	  this->particles = new Particle;
+	  if (likely(deadList != NULL))
+	    {
+	      this->particles = this->deadList;
+	      deadList = deadList->next;
+	    }
+	  else
+	    this->particles = new Particle;
 	  this->particles->next = NULL;
 	}
@@ -272,5 +297,12 @@
       else
 	{
-	  Particle* tmpPart = new Particle;
+	  Particle* tmpPart;
+	  if (likely(deadList != NULL))
+	    {
+	      tmpPart = this->deadList;
+	      deadList = deadList->next;
+	    }
+	  else
+	    tmpPart = new Particle;
 	  tmpPart->next = this->particles;
 	  this->particles = tmpPart;
@@ -300,3 +332,11 @@
   PRINT(0)("  ParticleSystem %s\n", this->name);
   PRINT(0)("  ParticleCount: %d, maximumCount: %d :: filled %d%%\n", this->count, this->maxCount, 100*this->count/this->maxCount);
-}
+  if (deadList)
+    {
+      PRINT(0)("  - ParticleDeadList is used: ");
+      int i = 1;
+      Particle* tmpPart = this->deadList;
+      while (tmpPart = tmpPart->next) ++i;
+      PRINT(0)("count: %d\n", i);
+    }
+}
Index: orxonox/branches/heightMap/src/lib/graphics/particles/particle_system.h
===================================================================
--- orxonox/branches/heightMap/src/lib/graphics/particles/particle_system.h	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/graphics/particles/particle_system.h	(revision 4165)
@@ -92,4 +92,5 @@
   Material* material;        //!< A Material for all the Particles.
   Particle* particles;       //!< A list of particles of this System.
+  Particle* deadList;        //!< A list of dead Particles in the System.
 
   GLuint* glID;              //!< A List of different gl-List-ID's
Index: orxonox/branches/heightMap/src/lib/gui/Makefile.in
===================================================================
--- orxonox/branches/heightMap/src/lib/gui/Makefile.in	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/gui/Makefile.in	(revision 4165)
@@ -113,4 +113,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
@@ -178,7 +179,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/gui/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/gui/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/branches/heightMap/src/lib/gui/console/Makefile.in
===================================================================
--- orxonox/branches/heightMap/src/lib/gui/console/Makefile.in	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/gui/console/Makefile.in	(revision 4165)
@@ -132,4 +132,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
@@ -204,7 +205,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/console/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/console/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/gui/console/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/gui/console/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/branches/heightMap/src/lib/gui/gui/Makefile.in
===================================================================
--- orxonox/branches/heightMap/src/lib/gui/gui/Makefile.in	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/gui/gui/Makefile.in	(revision 4165)
@@ -150,4 +150,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
@@ -264,7 +265,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/gui/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/gui/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/lib/gui/gui/Makefile
+	  $(AUTOMAKE) --foreign  src/lib/gui/gui/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/branches/heightMap/src/lib/gui/gui/gui.cc
===================================================================
--- orxonox/branches/heightMap/src/lib/gui/gui/gui.cc	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/gui/gui/gui.cc	(revision 4165)
@@ -53,5 +53,6 @@
 {
   Window* orxonoxGUI = NULL;
-
+  executable = NULL;
+  
   initGUI(argc, argv);
 
@@ -80,13 +81,12 @@
       Box* optionBoxR = new Box('v');
       {
-	exec = new GuiExec();
-	optionBoxR->fill(exec->getWidget());
-	
 	flags = new GuiFlags();
-	
 	optionBoxR->fill(flags->getWidget());
 	
 	update = new GuiUpdate();
 	optionBoxR->fill(update->getWidget());
+
+	exec = new GuiExec();
+	optionBoxR->fill(exec->getWidget());
       }
       windowBox->fill(optionBoxR);
@@ -94,4 +94,6 @@
     orxonoxGUI->fill(windowBox);
   }
+
+
   // Reading Values from File
   exec->setConfDir(GUI_DEFAULT_CONF_DIR);
@@ -116,6 +118,13 @@
     }
 #endif /* HAVE_CURL */
+}
 
+/**
+   \brief starts the OrxonoxGUI
+*/
+void Gui::startGui(void)
+{
   mainloopGUI();
+  
 #ifndef HAVE_GTK2
   GuiExec::startOrxonox(NULL, exec);
@@ -123,4 +132,12 @@
 }
 
+void Gui::printHelp()
+{
+  Window::mainWindow->walkThrough(Widget::printHelp, 1);
+}
+
+/**
+   \brief a bool that knows if orxonox should be started
+*/
 bool Gui::startOrxonox = false;
 
Index: orxonox/branches/heightMap/src/lib/gui/gui/gui.h
===================================================================
--- orxonox/branches/heightMap/src/lib/gui/gui/gui.h	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/gui/gui/gui.h	(revision 4165)
@@ -26,4 +26,7 @@
   ~Gui(void);
 
+  void startGui(void);
+  void printHelp(void);
+
   static bool startOrxonox;
 };
Index: orxonox/branches/heightMap/src/lib/gui/gui/gui_audio.cc
===================================================================
--- orxonox/branches/heightMap/src/lib/gui/gui/gui_audio.cc	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/gui/gui/gui_audio.cc	(revision 4165)
@@ -47,4 +47,6 @@
       enableSound = new CheckButton(CONFIG_NAME_DISABLE_AUDIO);
       enableSound->setFlagName ("no-sound", 0);
+      enableSound->setDescription("Disables Sound", "Check this to disable Sound in Orxonox");
+      enableSound->setDefaultValue(0);
       enableSound->saveability();
       audioBox->fill(enableSound);
@@ -53,4 +55,5 @@
       musicVolume = new Slider("Music Volume", 0, 100);
       musicVolume->setFlagName("music-volume", "m", 80);
+      musicVolume->setDescription("Sets the volume of the ingame music");
       musicVolume->saveability();
       audioBox->fill (musicVolume);
@@ -59,4 +62,5 @@
       effectsVolume = new Slider ("Effects Volume", 0, 100);
       effectsVolume->setFlagName ("effects-volume", "e", 80);
+      effectsVolume->setDescription("Sets the volune of the ingame SoundEffects");
       effectsVolume->saveability();
       audioBox->fill (effectsVolume);
Index: orxonox/branches/heightMap/src/lib/gui/gui/gui_exec.cc
===================================================================
--- orxonox/branches/heightMap/src/lib/gui/gui/gui_exec.cc	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/gui/gui/gui_exec.cc	(revision 4165)
@@ -70,11 +70,48 @@
       execBox->fill(this->saveSettings);
 
-      verboseMode = new Menu(CONFIG_NAME_VERBOSE_MODE, "nothing", "error", "warning", "info", "lastItem");
+#ifdef DEBUG
+      verboseMode = new Menu(CONFIG_NAME_VERBOSE_MODE, "nothing",
+#if DEBUG >=1
+			     "error",
+#endif
+#if DEBUG >=2
+			     "warning",
+#endif
+#if DEBUG >=3
+			     "info",
+#endif
+#if DEBUG >=4
+			     "debug",
+#endif
+#if DEBUG >=5
+			     "heavydebug",
+#endif
+			     "lastItem");
       verboseMode->setFlagName("verbose", "v", 2);
+      verboseMode->setDescription("Sets the Output Mode", "This Enables Outbug messages\n"
+				  "0: nothing will be displayed, but stuff one cannot do without (eg.GUI)\n"
+#if DEBUG >=1
+				  "1: error: outputs all the above and errors"
+#endif
+#if DEBUG >=2
+				  "2: warning: outputs all the above plus warnings"
+#endif
+#if DEBUG >=3
+				  "3: info: outputs all the above plus Information"
+#endif
+#if DEBUG >=4
+				  "4: debug: displays all the above plus debug information"
+#endif
+#if DEBUG >=5
+				  "5: heavydebug: displays all the above plus heavy debug information: WARNING: the game will run very slow with this."
+#endif
+				  );
       verboseMode->saveability();
       execBox->fill(verboseMode);
+#endif
 
       alwaysShow = new CheckButton(CONFIG_NAME_ALWAYS_SHOW_GUI);
       alwaysShow->setFlagName("gui", "g", 0);
+      alwaysShow->setDescription("shows the gui when starting orxonox");
       alwaysShow->saveability();
       execBox->fill(alwaysShow);
@@ -114,5 +151,5 @@
   this->confDir = ResourceManager::homeDirCheck(confDir);
 
-  PRINTF(3)("Config Directory is: %s.\n", this->confDir);
+  PRINTF(5)("Config Directory is: %s.\n", this->confDir);
   //! \todo F** Windows-support
 #ifndef __WIN32__
@@ -135,5 +172,5 @@
   this->confFile = new char[strlen(this->confDir)+strlen(fileName)+2];
   sprintf(this->confFile, "%s/%s", this->confDir, fileName);
-  PRINTF(3)("ConfigurationFile is %s.\n", this->confFile);
+  PRINTF(5)("ConfigurationFile is %s.\n", this->confFile);
 }
 
Index: orxonox/branches/heightMap/src/lib/gui/gui/gui_flags.cc
===================================================================
--- orxonox/branches/heightMap/src/lib/gui/gui/gui_flags.cc	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/gui/gui/gui_flags.cc	(revision 4165)
@@ -38,4 +38,5 @@
   this->flagsBox->fill(flagsLabel);
   this->shortFlags = new CheckButton("shortFlags");
+  this->shortFlags->setDefaultValue(0);
   this->flagsBox->fill(shortFlags);
 
Index: orxonox/branches/heightMap/src/lib/gui/gui/gui_gtk.cc
===================================================================
--- orxonox/branches/heightMap/src/lib/gui/gui/gui_gtk.cc	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/gui/gui/gui_gtk.cc	(revision 4165)
@@ -312,4 +312,44 @@
 
 /** 
+    \brief This is for listing the options of "widget"
+    \param widget specifies the widget that should be listed
+    \param data A Counter, that always knows how many Options have been found yet.
+*/
+void Widget::printHelp(Widget* widget)
+{
+  int helpLen=0;
+
+  if (widget->optionType > GUI_NOTHING)
+    {
+      Option* option = (Option*)widget;
+      if (option->flagName || option->flagNameShort)
+	{
+	  PRINT(0)("  ");
+	  if (option->flagNameShort)
+	    {
+	      PRINT(0)("-%s", option->flagNameShort);
+	      helpLen += strlen(option->flagNameShort)+1;
+	    }
+	  if (option->flagName)
+	    {
+	      if (helpLen > 0)
+		{
+		  PRINT(0)("|");
+		  helpLen++;
+		}
+	      PRINT(0)("--%s:", option->flagName);
+	      helpLen += strlen(option->flagName)+2;
+	    }
+	  while ((helpLen ++) < 29)
+	    PRINT(0)(" ");
+	  if (option->shortDescription)
+	    PRINT(0)("%s\n", option->shortDescription);
+	  else
+	    PRINT(0)("\n");
+	}
+    }
+}
+
+/** 
     \brief Finds an Option by a given number(the n'th option found away from this Widget)
     \param number The Count of options to wait(by reference)
@@ -595,5 +635,5 @@
     }
   else
-    PRINTF(1)("You tried to put more than one Widget into a Container. \nNot including this item.\nThis is only possible with Boxes.\n");
+    PRINTF(2)("You tried to put more than one Widget into a Container. \nNot including this item.\nThis is only possible with Boxes.\n");
 }
 
@@ -1177,6 +1217,7 @@
   if ((this->value = atoi(tmpChar))=!0)
     this->value = 1;
-#endif /* HAVE_GTK2 */
+
   PRINT(0)("%s set to: %d\n", this->title, this->value);
+#endif /* HAVE_GTK2 */
 }
 
@@ -1262,6 +1303,7 @@
   if (this->value <= this->start)
     this->value = this->start;
-#endif /* HAVE_GTK2 */
+
   PRINT(0)("%s set to: %d\n",this->title, this->value);
+#endif /* HAVE_GTK2 */
 }
 
@@ -1370,7 +1412,7 @@
     {
       this->value = 0;
-      PRINTF(2)("Sorry, but %s has not been found in the Itemlist of %s\n", loadString, this->title);
-    }
-  PRINTF(4)( "Loading %s: setting to %d\n", this->title, this->value); 
+      PRINTF(2)("%s has not been found in the Itemlist of %s\n", loadString, this->title);
+    }
+  PRINTF(5)( "Loading %s: setting to %d\n", this->title, this->value); 
   this->redraw();
 }
@@ -1429,5 +1471,5 @@
 
 #endif /* HAVE_GTK2 */
-  PRINT(4)("%s set to: %d\n", this->title, this->value);
+  PRINT(5)("%s set to: %d\n", this->title, this->value);
 }
 
@@ -1518,5 +1560,5 @@
 void OptionLabel::load(char* loadString)
 {
-  PRINTF(4)("Loading %s: setting to %s\n", this->title, loadString); 
+  PRINTF(5)("Loading %s: setting to %s\n", this->title, loadString); 
   this->setValue(loadString);
 }
@@ -1668,5 +1710,5 @@
 #ifdef HAVE_GTK2
   gtk_progress_set_value(GTK_PROGRESS(widget), this->progress*100.0/this->totalSize);
-  PRINTF(4)("Progress: %f%%\n", this->progress*100.0/this->totalSize);
+  PRINTF(5)("Progress: %f%%\n", this->progress*100.0/this->totalSize);
 #else /* HVE_GTK2 */
   PRINT(0)("Progress: %f%%\n", this->progress*100.0/this->totalSize);
Index: orxonox/branches/heightMap/src/lib/gui/gui/gui_gtk.h
===================================================================
--- orxonox/branches/heightMap/src/lib/gui/gui/gui_gtk.h	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/gui/gui/gui_gtk.h	(revision 4165)
@@ -71,4 +71,5 @@
    static void listGroups(Widget* widget);
    static void listGroups(Widget* widget, void* data);
+   static void printHelp(Widget* widget);
    Widget* findGroupByNumber(int* number, unsigned int depth);
    static void setOptions(Widget* widget);
Index: orxonox/branches/heightMap/src/lib/gui/gui/gui_update.cc
===================================================================
--- orxonox/branches/heightMap/src/lib/gui/gui/gui_update.cc	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/gui/gui/gui_update.cc	(revision 4165)
@@ -55,4 +55,6 @@
   dataDirButton = new Button(CONFIG_NAME_DATADIR);
   dataDirLabel = new OptionLabel(CONFIG_NAME_DATADIR, "unknown");
+  dataDirLabel->setFlagName("data-dir", "d", 0);
+  dataDirLabel->setDescription("Sets the location of the orxonox' Data-Directory");
   dataDirLabel->saveability();
   dataDirDialog = new FileDialog("data-Repos-location");
@@ -73,4 +75,5 @@
   this->updateBox->fill(this->autoUpdate);
   this->autoUpdate->setFlagName("update", "u", 0);
+  this->autoUpdate->setDescription("Updates orxonox", "When this option is selected orxonox automatically searches for updates, and if found installs them");
   this->autoUpdate->saveability();
 
@@ -127,9 +130,9 @@
 bool GuiUpdate::getSystemInfo(void)
 {
-  PRINTF(3)("Grabbing system information\n");
+  PRINTF(5)("Grabbing system information\n");
   this->tmpDir = getenv("TMPDIR");
   if(!tmpDir)
     this->tmpDir = "/tmp";
-  PRINTF(4)("Temporary directory is: %s\n", this->tmpDir);
+  PRINTF(5)("Temporary directory is: %s\n", this->tmpDir);
 
 #ifdef __WIN32__
@@ -138,14 +141,15 @@
   this->homeDir = getenv("HOME");
 #endif
-  PRINTF(4)("Home directory is %s\n", homeDir);
-
-  this->installDataDir = "/usr/share/games/orxonox";
-  PRINTF(4)("Installation of orxonox-data will go to this directory: %s\n", this->installDataDir);
+  PRINTF(5)("Home directory is %s\n", homeDir);
+
+
+  this->installDataDir = DEFAULT_DATA_DIR;
+  PRINTF(5)("Installation of orxonox-data will go to this directory: %s\n", this->installDataDir);
 
   this->installSourceDir = "/usr/games/bin";
-  PRINTF(4)("Installation of orxonox-source will go to this directory: %s\n", this->installSourceDir);
+  PRINTF(5)("Installation of orxonox-source will go to this directory: %s\n", this->installSourceDir);
 
   this->userName = getenv("USER");
-  PRINTF(4)("Logged in username is: %s\n", this->userName);
+  PRINTF(5)("Logged in username is: %s\n", this->userName);
 }
 
@@ -153,5 +157,5 @@
 bool* GuiUpdate::checkForUpdates(void)
 {
-  PRINTF(3)("checking for new version of orxonox\n");
+  PRINTF(4)("checking for new version of orxonox\n");
   FileInfo updateFileInfo;
   updateFileInfo.fileName = "update_info";
@@ -263,5 +267,5 @@
   dataInfo->webRoot  = "http://www.orxonox.ethz.ch/files/";
   dataInfo->localRoot = "./";
-  PRINTF(3)("Preparing to download file %s.\n", dataInfo->fileName);
+  PRINTF(4)("Preparing to download file %s.\n", dataInfo->fileName);
   downloadWithStyle(dataInfo);
 }
@@ -348,5 +352,5 @@
       return false;
     }
-  PRINTF(3)("Downloading.\n");
+  PRINTF(4)("Downloading.\n");
   FileInfo* info =(FileInfo*)fileInfo;
   CURLcode res;
@@ -396,5 +400,5 @@
       return false;
     }
-  PRINTF(3)("Downloading.\n");
+  PRINTF(4)("Downloading.\n");
   FileInfo* info =(FileInfo*)fileInfo;
   CURLcode res;
@@ -464,5 +468,5 @@
     curl_easy_cleanup(curlHandle);
  
-  PRINTF(3)("Closing the downloaded file.\n");
+  PRINTF(4)("Closing the downloaded file.\n");
   fclose(info->fileHandle);
 
@@ -490,5 +494,5 @@
 gint GuiUpdate::cancelDownload(GtkWidget* w, GdkEventKey* event, void* bar)
 {
-  PRINTF(4)("Cannot cancle the Downloading process until after this File\n");
+  PRINTF(3)("Cannot cancle the Downloading process until after this File\n");
 }
 #endif /* HAVE_GTK2 */
Index: orxonox/branches/heightMap/src/lib/gui/gui/gui_video.cc
===================================================================
--- orxonox/branches/heightMap/src/lib/gui/gui/gui_video.cc	(revision 4122)
+++ orxonox/branches/heightMap/src/lib/gui/gui/gui_video.cc	(revision 4165)
@@ -51,4 +51,5 @@
       fullscreen = new CheckButton(CONFIG_NAME_FULLSCREEN);
       fullscreen->setFlagName("windowed", "q", 1);
+      fullscreen->setDescription("Starts orxonox in windowed mode");
       fullscreen->saveability();
       videoBox->fill(fullscreen);
@@ -57,7 +58,9 @@
       resolution->saveability();
       resolution->setFlagName("resolution", "r", 0);
+      resolution->setDescription("Sets the resolution of orxonox");
       videoBox->fill(resolution);
       wireframe = new CheckButton(CONFIG_NAME_WIREFRAME);
       wireframe->setFlagName("wireframe", "w", 0);
+      wireframe->setDescription("Starts orxonox in wireframe mode");
       wireframe->saveability();
       videoBox->fill(wireframe);
@@ -199,10 +202,10 @@
   else{
     /* Print valid modes */
-    PRINT(4)("Available Modes\n");
+    PRINT(5)("Available Modes\n");
     for(i = 0; modes[i] ;++i)
       {
 	if (x != modes[i]->w || y != modes[i]->h)
 	  { 
-	    PRINT(4)("  %d x %d\n", modes[i]->w, modes[i]->h);
+	    PRINTF(5)("  %d x %d\n", modes[i]->w, modes[i]->h);
 	    sprintf(tmpChar, "%dx%d", modes[i]->w, modes[i]->h);
 	    menu->addItem(tmpChar);
Index: orxonox/branches/heightMap/src/orxonox.cc
===================================================================
--- orxonox/branches/heightMap/src/orxonox.cc	(revision 4122)
+++ orxonox/branches/heightMap/src/orxonox.cc	(revision 4165)
@@ -38,4 +38,5 @@
 #include "text_engine.h"
 #include "factory.h"
+#include "benchmark.h"
 
 #include <string.h>
@@ -47,4 +48,6 @@
 /**
    \brief create a new Orxonox
+
+   In this funcitons only global values are set. The game will not be started here.
 */
 Orxonox::Orxonox ()
@@ -55,4 +58,7 @@
   this->resources = NULL;
   this->localinput = NULL;
+
+  this->argc = 0;
+  this->argv = NULL;
 }
 
@@ -102,4 +108,6 @@
 int Orxonox::init (int argc, char** argv)
 {
+  this->argc = argc;
+  this->argv = argv;
   // parse command line
   // config file
@@ -131,5 +139,5 @@
   
   GraphicsEngine::getInstance();
-  
+    
   return 0;
 }
@@ -219,4 +227,6 @@
   PRINT(3)("initializing TextEngine\n");
   TextEngine::getInstance();
+
+  return 0;
 }
 
@@ -336,24 +346,14 @@
 */
 int main(int argc, char** argv) 
-{  
-  
-  /* reading arguments 
-     
-     currently supported arguments are:
-     <no args>                   ::    just starts orxonox
-     --benchmark                 ::    start the benchmark without starting orxonox
-     
-     this is a preselection: it matches to one of the start* functions, the
-     finetuning is made in those functions.
-  */
-
-
+{ 
+
+  // here the pre-arguments are loaded, these are needed to go either to orxonx itself, Help, or Benchmark.
   int i;
   for(i = 1; i < argc; ++i)
     {
-      if(! strcmp( "--help", argv[i])) return startHelp();
-      else if(! strcmp( "--benchmark", argv[i])) return startBenchmarks();
-      else if(! strcmp( "--gui", argv[i]) || !strcmp("-g", argv[i])) showGui = true;
-      else PRINTF(2)("Orxonox does not understand the arguments %s\n", argv[i]);
+      if(! strcmp( "--help", argv[i]) || !strcmp("-h", argv[i])) return startHelp(argc, argv);
+      else if(!strcmp( "--benchmark", argv[i]) || !strcmp("-b", argv[i])) return startBenchmarks();
+      else if(!strcmp( "--gui", argv[i]) || !strcmp("-g", argv[i])) showGui = true;
+      //      else PRINTF(2)("Orxonox does not understand the arguments %s\n", argv[i]);
     }
 
@@ -363,12 +363,16 @@
 
 
-int startHelp()
+int startHelp(int argc, char** argv)
 {
   PRINT(0)("orxonox: starts the orxonox game - rules\n");
-  PRINT(0)("usage: orxonox [arg]\n\n");
+  PRINT(0)("usage: orxonox [arg [arg...]]\n\n");
   PRINT(0)("valid options:\n");
-  PRINT(0)(" --benchmark\tstarts the orxonox benchmark\n");
-  PRINT(0)(" --help \tshows this menu\n");
-  PRINT(0)(" --gui/-g \tDisplays the Gui on startup\n");
+  {
+    Gui* gui = new Gui(argc, argv);
+    gui->printHelp();
+    delete gui;
+  }
+  PRINT(0)(" -b|--benchmark:\t\tstarts the orxonox benchmark\n");
+  PRINT(0)(" -h|--help:\t\t\tshows this help\n");
 }
 
@@ -383,7 +387,9 @@
       if (ResourceManager::isFile("~/.orxonox/orxonox.lock"))
 	ResourceManager::deleteFile("~/.orxonox/orxonox.lock");
-      //      char* guiExec = new char[strlen(argv[0])+20];
-      //      sprintf(guiExec,"%sGui --gui", argv[0]);
+      
+      // starting the GUI
       Gui* gui = new Gui(argc, argv);
+      gui->startGui();
+
       if (! gui->startOrxonox)
 	return 0;
@@ -410,446 +416,2 @@
   
 }
-
-#if defined __linux__ 
-
-#include "list.h"
-#include "world_entity.h"
-#include "vector.h"
-#include "player.h"
-#include "base_object.h"
-
-#include <asm/msr.h>
-#include <linux/timex.h>
-
-
-#define LIST_MAX 1000
-#define VECTOR_MAX 1000000
-#define ITERATIONS 10000
-
-
-int startBenchmarks()
-{
-
-  printf("===========================================================\n");
-  printf("=                      BENCHMARKS                         =\n");
-  printf("===========================================================\n");
-  printf(" the author is not paying any attention to cacheing effects\n");
-  printf(" of the CPU.\n\n");
-  printf("[title]\t\t\t\t\t     [cycles]\t[loops]\n\n");
-  //  printf("------------------------------------------------------------\n\n");
-
-  // first measure the time overhead:
-  unsigned long ini, end, dt, tmp;
-  rdtscl(ini); rdtscl(end);
-  dt = end - ini;
-
-  int type = -1; 
-  /* type   -1 == all 
-     type    0 == framework
-     type    1 == vector
-     type    2 == quaternion
-     type    3 == lists
-  */
-  if(type == 0 || type == -1)
-    {
-      /* framework test*/
-      
-      printf("Generating Objects:\t\t\t\t\t%i\n", ITERATIONS);
-      /* ************WorldEntity class test************** */
-      WorldEntity* w = NULL;
-      int i = 0;
-      unsigned long mittel = 0;
-      
-      for(i = 0; i < ITERATIONS; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  WorldEntity* w = new WorldEntity();
-	  
-	  rdtscl(end);
-	  delete w;
-	  mittel += (end - ini - dt);
-	}
-      float mi = mittel / (float)ITERATIONS;
-      printf(" Generate a WorldEntity object:\t\t%11.2f\n", mi);
-      
-      /*
-	mittel = 0;
-	for(i = 0; i < ITERATIONS; ++i)
-	{
-	rdtscl(ini);
-	
-	WorldEntity* w = new Primitive(P_SPHERE);
-	
-	rdtscl(end);
-	delete w;
-	mittel += (end - ini - dt);
-	}
-	mi = mittel / (float)ITERATIONS;
-	printf(" Generate a Primitive  object:\t\t%11.2f\n", mi);
-      */
-
-      mittel = 0;
-      for(i = 0; i < ITERATIONS; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  Vector* v = new Vector();
-	  
-	  rdtscl(end);
-	  delete v;
-	  mittel += (end - ini - dt);
-	}
-      mi = mittel / (float)ITERATIONS;
-      printf(" Generate a Vector object:\t\t%11.2f\n", mi);
-
-
-     mittel = 0;
-      for(i = 0; i < ITERATIONS; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  Quaternion* q = new Quaternion();
-	  
-	  rdtscl(end);
-	  delete q;
-	  mittel += (end - ini - dt);
-	}
-      mi = mittel / (float)ITERATIONS;
-      printf(" Generate a Quaternion object:\t\t%11.2f\n", mi);
-
-
-
-
-      printf("\nCalling function inline &| virtual, \t\t\t%i\n", ITERATIONS);
-      mittel = 0;
-      w = new WorldEntity();
-      for(i = 0; i < ITERATIONS; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  w->tick(0.0f);
-
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	  }
-      //delete w;
-      mi = mittel / (float)ITERATIONS;
-      printf(" Virt funct tick() of WE: \t\t%11.2f\n", mi);
-
-
-      mittel = 0;
-      WorldEntity wo;
-      for(i = 0; i < ITERATIONS; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  wo.tick(0.0f);
-	   
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	  }
-      //delete w;
-      mi = mittel / (float)ITERATIONS;
-      printf(" Inl virt funct tick() of WE v2: \t%11.2f\n", mi);
-
-      
-      mittel = 0;
-      BaseObject* bo = new BaseObject();
-      for(i = 0; i < ITERATIONS; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  bo->isFinalized();
-	   
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	  }
-      //delete w;
-      mi = mittel / (float)ITERATIONS;
-      printf(" Inl funct BaseObject::isFinazlized(): \t%11.2f\n", mi);
-
-      
-      tList<WorldEntity>* list = new tList<WorldEntity>();
-
-      
-      /* ************Primitvie class test************** */
-      list = new tList<WorldEntity>();
- 
-      
-      /*
-	mittel = 0;
-	w = new Primitive(P_SPHERE);
-	for(i = 0; i < ITERATIONS; ++i)
-	{
-	rdtscl(ini);
-	
-	w->tick(0.0f);
-	
-	rdtscl(end);
-	mittel += (end - ini - dt);
-	}
-	mi = mittel / (float)ITERATIONS;
-	printf(" Call function tick() of Prim:\t\t%11.2f\n", mi);
-      */
-      
-    }
-  
-  if(type == 1 || type == -1)
-    {
-      printf("\nDoing some simple vector operations: \t\t\t%i\n", VECTOR_MAX);
-      /* vector test */
-      Vector* a = new Vector(1.3, 5.3, 4.1);
-      Vector* b = new Vector(0.4, 2.5, 6.2);
-      Vector* c = new Vector();
-      
-      unsigned long mittel, ini, end;
-      float mi;
-      int i = 0;
-      // addition
-      mittel = 0;
-      for(i = 0; i < VECTOR_MAX; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  *c = *a + *b;
-	   
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	}
-      mi = mittel / (float)VECTOR_MAX;
-      printf(" Addition of two vectors:\t\t%11.2f\n", mi);
-      
-      // multiplikation
-
-      mittel = 0;
-      for(i = 0; i < VECTOR_MAX; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  *c = a->cross( *b);
-	   
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	}
-      mi = mittel / (float)VECTOR_MAX;
-      printf(" CrossMult of two vectors:\t\t%11.2f\n", mi);
-
-    }
-  if( type == 2 || type == -1)
-    {
-      /* quaternion test */
-      printf("\nDoing some simple quaternion operations: \t\t%i\n", VECTOR_MAX);
-      /* vector test */
-      Quaternion* a = new Quaternion();
-      Quaternion* b = new Quaternion();
-      Quaternion* c = new Quaternion();
-      
-      unsigned long mittel, ini, end;
-      float mi;
-      int i = 0;
-      // quaternion generieren mit spez konstruktor
-      mittel = 0;
-      Vector* qa = new Vector(4.6, 9.3, 0.4);
-      Vector* qb = new Vector(3.5, 6.1, 4.3);
-      for(i = 0; i < VECTOR_MAX; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  Quaternion* qu = new Quaternion(*qa, *qb);
-	  
-	  rdtscl(end);
-	  delete qu;
-	  mittel += (end - ini - dt);
-	}
-      delete a;
-      delete b;
-      mi = mittel / (float)VECTOR_MAX;
-      printf(" Gen. quatern. betw. two vectors:\t%11.2f\n", mi);
-      
-      
-      // multiplication
-      mittel = 0;
-      for(i = 0; i < VECTOR_MAX; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  *c = *a * *b;
-	  
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	}
-      mi = mittel / (float)VECTOR_MAX;
-      printf(" Multiplying two quat.(=rot): a * b\t%11.2f\n", mi);
-      
-      
-      
-      // rotating a vector by a quaternion
-      mittel = 0;
-      for(i = 0; i < VECTOR_MAX; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  *qa = a->apply(*qb);
-	  
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	}
-      mi = mittel / (float)VECTOR_MAX;
-      printf(" Rot a vec by a quat: q->apply(v)\t%11.2f\n", mi);
-      
-      
-      
-      // generate rotation matrix
-      mittel = 0;
-      float matrix[4][4];
-      for(i = 0; i < VECTOR_MAX; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  a->matrix(matrix);
-	  
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	}
-      mi = mittel / (float)VECTOR_MAX;
-      printf(" Generate rot matrix: q->matrix(m)\t%11.2f\n", mi);
-    }
-  if( type == 3 || type == -1)
-    {
-      /* list tests*/
-      printf("\nList operations tests: \t\t\t\t\t%i\n", LIST_MAX);
-      tList<char>* list = new tList<char>();
-      char* name;
-      
-      printf(" Adding[1..10] elements to list, found:\n");
-      list->add("1");
-      list->add("2");
-      list->add("3");
-      list->add("4");
-      list->add("5");
-      list->add("6");
-      list->add("7");
-      list->add("8");
-      list->add("9");
-      list->add("10");
-      
-      /*give list out */
-      tIterator<char>* iterator = list->getIterator();
-      name = iterator->nextElement();
-      printf("  List Elements: \t\t");
-      while( name != NULL)
-	{
-	  printf("%s,", name);
-	  name = iterator->nextElement();
-	}
-      delete iterator;
-      printf("\n");
-      
-      
-      /*removing some elements from the list*/
-      printf(" Removing elements [2,3,6,8,10], adding [11] now found:\n");
-      list->remove("2");
-      list->remove("3");
-      list->remove("6");
-      list->remove("8");
-      list->remove("10");
-      list->add("11");
-      /*give list out */
-      iterator = list->getIterator();
-      name = iterator->nextElement();
-      printf("  List Elements: \t\t");
-      while( name != NULL)
-	{
-	  printf("%s,", name);
-	  name = iterator->nextElement();
-	}
-      delete iterator;
-      printf("\n");
-      
-      delete list;
-      printf("\nChecking list performance:\t\t\t\t%i\n", LIST_MAX);
-      
-      tList<int>* plist = new tList<int>();
-      unsigned long mittel, ini, end;
-      float mi;
-      int i = 0;
-      mittel = 0;
-      for(i = 0; i < LIST_MAX; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  plist->add(&i);
-	  
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	}
-      mi = mittel / (float)LIST_MAX;
-      printf(" Adding reference to list:\t\t%11.2f\n", mi);
-      
-      mittel = 0;
-      for(i = 0; i < LIST_MAX; ++i)
-	{
-	  rdtscl(ini);
-	  
-	  plist->remove(&i);
-	  
-	  rdtscl(end);
-	  mittel += (end - ini - dt);
-	}
-      mi = mittel / (float)LIST_MAX;
-      printf(" Removing 1st reference from list:\t%11.2f\n", mi);
-      
-
-      printf("\nList operations tests: \t\t\t\t\t%i\n", LIST_MAX);
-      list = new tList<char>();
-      printf(" Adding[1..10] elements to list, found:\n");
-      list->add("1");
-      list->add("2");
-      list->add("3");
-      list->add("4");
-      list->add("5");
-      list->add("6");
-      list->add("7");
-      list->add("8");
-      list->add("9");
-      list->add("10");
-      
-      /*give list out */
-      iterator = list->getIterator();
-      name = iterator->nextElement();
-      printf("  List Elements: \t\t");
-      while( name != NULL)
-	{
-	  printf("%s,", name);
-	  name = iterator->nextElement();
-	}
-      delete iterator;
-      printf("\n");
-      
-      
-      int c = 0;
-      printf(" Going trough list with nextElement(el) func: ");
-      name = list->firstElement();
-      while(c < 20)
-	{
-	  printf("%s,", name);
-	  name = list->nextElement(name);
-	  c++;
-	}
-      printf("\n");
-      
-
-      
-    }
-  
-}
-
-#else
-
-int startBenchmarks()
-{
-  PRINTF(1)("Benchmark is not implemented in this system\n");
-}
-
-#endif
Index: orxonox/branches/heightMap/src/orxonox.h
===================================================================
--- orxonox/branches/heightMap/src/orxonox.h	(revision 4122)
+++ orxonox/branches/heightMap/src/orxonox.h	(revision 4165)
@@ -39,14 +39,10 @@
   Uint32 lastframe;           //!< Time of the last Frame
   
+  unsigned int argc;          //!< Count of Arguments of orxonox
+  char** argv;                //!< Values of th Arguments of orxonox.
+  
   void getConfigFile (int argc, char** argv);
   
-  // main loop functions
-  //  void synchronize ();
-  //void handle_input ();
-  //void time_slice ();
-  //void collision ();
-  //void display ();
-  
-  	// subsystem initialization
+  // subsystem initialization
   int initVideo ();
   int initSound ();
@@ -75,7 +71,6 @@
 };
 
-int startHelp(void);
+int startHelp(int argc, char** argv);
 int startOrxonox(int argc, char** argv);
-int startBenchmarks(void);
 
 #endif /* _ORXONOX_H */
Index: orxonox/branches/heightMap/src/story_entities/world.cc
===================================================================
--- orxonox/branches/heightMap/src/story_entities/world.cc	(revision 4122)
+++ orxonox/branches/heightMap/src/story_entities/world.cc	(revision 4165)
@@ -197,8 +197,4 @@
   cn->reset();
 
-  ResourceManager::getInstance()->debug();
-  ResourceManager::getInstance()->unloadAllByPriority(RP_LEVEL);
-  ResourceManager::getInstance()->debug();
-
   delete WorldInterface::getInstance();
 
@@ -209,10 +205,9 @@
   TextEngine::getInstance()->flush();
 
-  AnimationPlayer::getInstance()->debug();
   delete AnimationPlayer::getInstance(); // this should be at the end of the unloading sequence.
   //delete garbagecollecor
   //delete animator
 
-
+  ResourceManager::getInstance()->unloadAllByPriority(RP_LEVEL);
 }
 
@@ -844,5 +839,4 @@
   this->glmis = new GLMenuImageScreen();
   this->glmis->init();
-  glmis->setBackgroundImage("pictures/load_screen.jpg");
   this->glmis->setMaximum(8);
   //  this->glmis->draw();
@@ -1118,6 +1112,6 @@
       
       /* function to let all entities tick (iterate through list) */
-      float seconds = this->dt / 1000.0;      
-      this->gameTime += seconds;
+      this->dtS = (float)this->dt / 1000.0;      
+      this->gameTime += this->dtS;
       //entity = entities->enumerate(); 
       tIterator<WorldEntity>* iterator = this->entities->getIterator();
@@ -1125,5 +1119,5 @@
       while( entity != NULL) 
 	{ 
-	  entity->tick (seconds);
+	  entity->tick (this->dtS);
 	  entity = iterator->nextElement();
 	}
@@ -1133,7 +1127,7 @@
       this->trackManager->tick(this->dt);
       this->localCamera->tick(this->dt);
-      this->garbageCollector->tick(seconds);
-
-      AnimationPlayer::getInstance()->tick(seconds);
+      this->garbageCollector->tick(this->dtS);
+
+      AnimationPlayer::getInstance()->tick(this->dtS);
     }
   this->lastFrame = currentFrame;
@@ -1150,5 +1144,5 @@
 {
   this->garbageCollector->update();
-  this->nullParent->update (dt);
+  this->nullParent->update (this->dtS);
 }
 
Index: orxonox/branches/heightMap/src/story_entities/world.h
===================================================================
--- orxonox/branches/heightMap/src/story_entities/world.h	(revision 4122)
+++ orxonox/branches/heightMap/src/story_entities/world.h	(revision 4165)
@@ -94,4 +94,5 @@
   Uint32 lastFrame;                   //!< last time of frame
   Uint32 dt;                          //!< time needed to calculate this frame
+  float dtS;                          //!< The time needed for caluculations in seconds
   double gameTime;                    //!< this is where the game time is saved
   bool bQuitOrxonox;                  //!< quit this application
Index: orxonox/branches/heightMap/src/subprojects/Makefile.in
===================================================================
--- orxonox/branches/heightMap/src/subprojects/Makefile.in	(revision 4122)
+++ orxonox/branches/heightMap/src/subprojects/Makefile.in	(revision 4165)
@@ -113,4 +113,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
@@ -176,7 +177,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/subprojects/Makefile
+	  $(AUTOMAKE) --foreign  src/subprojects/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/branches/heightMap/src/subprojects/benchmark.cc
===================================================================
--- orxonox/branches/heightMap/src/subprojects/benchmark.cc	(revision 4165)
+++ orxonox/branches/heightMap/src/subprojects/benchmark.cc	(revision 4165)
@@ -0,0 +1,470 @@
+/* 
+   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.
+
+   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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: ...
+
+*/
+
+
+#if defined __linux__ 
+
+#include "list.h"
+#include "world_entity.h"
+#include "vector.h"
+#include "player.h"
+#include "base_object.h"
+
+#include <asm/msr.h>
+#include <linux/timex.h>
+
+
+#define LIST_MAX 1000
+#define VECTOR_MAX 1000000
+#define ITERATIONS 10000
+
+
+int startBenchmarks()
+{
+
+  printf("===========================================================\n");
+  printf("=                      BENCHMARKS                         =\n");
+  printf("===========================================================\n");
+  printf(" the author is not paying any attention to cacheing effects\n");
+  printf(" of the CPU.\n\n");
+  printf("[title]\t\t\t\t\t     [cycles]\t[loops]\n\n");
+  //  printf("------------------------------------------------------------\n\n");
+
+  // first measure the time overhead:
+  unsigned long ini, end, dt, tmp;
+  rdtscl(ini); rdtscl(end);
+  dt = end - ini;
+
+  int type = -1; 
+  /* type   -1 == all 
+     type    0 == framework
+     type    1 == vector
+     type    2 == quaternion
+     type    3 == lists
+  */
+  if(type == 0 || type == -1)
+    {
+      /* framework test*/
+      
+      printf("Generating Objects:\t\t\t\t\t%i\n", ITERATIONS);
+      /* ************WorldEntity class test************** */
+      WorldEntity* w = NULL;
+      int i = 0;
+      unsigned long mittel = 0;
+      
+      for(i = 0; i < ITERATIONS; ++i)
+	{
+	  rdtscl(ini);
+	  
+	  WorldEntity* w = new WorldEntity();
+	  
+	  rdtscl(end);
+	  delete w;
+	  mittel += (end - ini - dt);
+	}
+      float mi = mittel / (float)ITERATIONS;
+      printf(" Generate a WorldEntity object:\t\t%11.2f\n", mi);
+      
+      /*
+	mittel = 0;
+	for(i = 0; i < ITERATIONS; ++i)
+	{
+	rdtscl(ini);
+	
+	WorldEntity* w = new Primitive(P_SPHERE);
+	
+	rdtscl(end);
+	delete w;
+	mittel += (end - ini - dt);
+	}
+	mi = mittel / (float)ITERATIONS;
+	printf(" Generate a Primitive  object:\t\t%11.2f\n", mi);
+      */
+
+      mittel = 0;
+      for(i = 0; i < ITERATIONS; ++i)
+	{
+	  rdtscl(ini);
+	  
+	  Vector* v = new Vector();
+	  
+	  rdtscl(end);
+	  delete v;
+	  mittel += (end - ini - dt);
+	}
+      mi = mittel / (float)ITERATIONS;
+      printf(" Generate a Vector object:\t\t%11.2f\n", mi);
+
+
+     mittel = 0;
+      for(i = 0; i < ITERATIONS; ++i)
+	{
+	  rdtscl(ini);
+	  
+	  Quaternion* q = new Quaternion();
+	  
+	  rdtscl(end);
+	  delete q;
+	  mittel += (end - ini - dt);
+	}
+      mi = mittel / (float)ITERATIONS;
+      printf(" Generate a Quaternion object:\t\t%11.2f\n", mi);
+
+
+
+
+      printf("\nCalling function inline &| virtual, \t\t\t%i\n", ITERATIONS);
+      mittel = 0;
+      w = new WorldEntity();
+      for(i = 0; i < ITERATIONS; ++i)
+	{
+	  rdtscl(ini);
+	  
+	  w->tick(0.0f);
+
+	  rdtscl(end);
+	  mittel += (end - ini - dt);
+	  }
+      //delete w;
+      mi = mittel / (float)ITERATIONS;
+      printf(" Virt funct tick() of WE: \t\t%11.2f\n", mi);
+
+
+      mittel = 0;
+      WorldEntity wo;
+      for(i = 0; i < ITERATIONS; ++i)
+	{
+	  rdtscl(ini);
+	  
+	  wo.tick(0.0f);
+	   
+	  rdtscl(end);
+	  mittel += (end - ini - dt);
+	  }
+      //delete w;
+      mi = mittel / (float)ITERATIONS;
+      printf(" Inl virt funct tick() of WE v2: \t%11.2f\n", mi);
+
+      
+      mittel = 0;
+      BaseObject* bo = new BaseObject();
+      for(i = 0; i < ITERATIONS; ++i)
+	{
+	  rdtscl(ini);
+	  
+	  bo->isFinalized();
+	   
+	  rdtscl(end);
+	  mittel += (end - ini - dt);
+	  }
+      //delete w;
+      mi = mittel / (float)ITERATIONS;
+      printf(" Inl funct BaseObject::isFinazlized(): \t%11.2f\n", mi);
+
+      
+      tList<WorldEntity>* list = new tList<WorldEntity>();
+
+      
+      /* ************Primitvie class test************** */
+      list = new tList<WorldEntity>();
+ 
+      
+      /*
+	mittel = 0;
+	w = new Primitive(P_SPHERE);
+	for(i = 0; i < ITERATIONS; ++i)
+	{
+	rdtscl(ini);
+	
+	w->tick(0.0f);
+	
+	rdtscl(end);
+	mittel += (end - ini - dt);
+	}
+	mi = mittel / (float)ITERATIONS;
+	printf(" Call function tick() of Prim:\t\t%11.2f\n", mi);
+      */
+      
+    }
+  
+  if(type == 1 || type == -1)
+    {
+      printf("\nDoing some simple vector operations: \t\t\t%i\n", VECTOR_MAX);
+      /* vector test */
+      Vector* a = new Vector(1.3, 5.3, 4.1);
+      Vector* b = new Vector(0.4, 2.5, 6.2);
+      Vector* c = new Vector();
+      
+      unsigned long mittel, ini, end;
+      float mi;
+      int i = 0;
+      // addition
+      mittel = 0;
+      for(i = 0; i < VECTOR_MAX; ++i)
+	{
+	  rdtscl(ini);
+	  
+	  *c = *a + *b;
+	   
+	  rdtscl(end);
+	  mittel += (end - ini - dt);
+	}
+      mi = mittel / (float)VECTOR_MAX;
+      printf(" Addition of two vectors:\t\t%11.2f\n", mi);
+      
+      // multiplikation
+
+      mittel = 0;
+      for(i = 0; i < VECTOR_MAX; ++i)
+	{
+	  rdtscl(ini);
+	  
+	  *c = a->cross( *b);
+	   
+	  rdtscl(end);
+	  mittel += (end - ini - dt);
+	}
+      mi = mittel / (float)VECTOR_MAX;
+      printf(" CrossMult of two vectors:\t\t%11.2f\n", mi);
+
+    }
+  if( type == 2 || type == -1)
+    {
+      /* quaternion test */
+      printf("\nDoing some simple quaternion operations: \t\t%i\n", VECTOR_MAX);
+      /* vector test */
+      Quaternion* a = new Quaternion();
+      Quaternion* b = new Quaternion();
+      Quaternion* c = new Quaternion();
+      
+      unsigned long mittel, ini, end;
+      float mi;
+      int i = 0;
+      // quaternion generieren mit spez konstruktor
+      mittel = 0;
+      Vector* qa = new Vector(4.6, 9.3, 0.4);
+      Vector* qb = new Vector(3.5, 6.1, 4.3);
+      for(i = 0; i < VECTOR_MAX; ++i)
+	{
+	  rdtscl(ini);
+	  
+	  Quaternion* qu = new Quaternion(*qa, *qb);
+	  
+	  rdtscl(end);
+	  delete qu;
+	  mittel += (end - ini - dt);
+	}
+      delete a;
+      delete b;
+      mi = mittel / (float)VECTOR_MAX;
+      printf(" Gen. quatern. betw. two vectors:\t%11.2f\n", mi);
+      
+      
+      // multiplication
+      mittel = 0;
+      for(i = 0; i < VECTOR_MAX; ++i)
+	{
+	  rdtscl(ini);
+	  
+	  *c = *a * *b;
+	  
+	  rdtscl(end);
+	  mittel += (end - ini - dt);
+	}
+      mi = mittel / (float)VECTOR_MAX;
+      printf(" Multiplying two quat.(=rot): a * b\t%11.2f\n", mi);
+      
+      
+      
+      // rotating a vector by a quaternion
+      mittel = 0;
+      for(i = 0; i < VECTOR_MAX; ++i)
+	{
+	  rdtscl(ini);
+	  
+	  *qa = a->apply(*qb);
+	  
+	  rdtscl(end);
+	  mittel += (end - ini - dt);
+	}
+      mi = mittel / (float)VECTOR_MAX;
+      printf(" Rot a vec by a quat: q->apply(v)\t%11.2f\n", mi);
+      
+      
+      
+      // generate rotation matrix
+      mittel = 0;
+      float matrix[4][4];
+      for(i = 0; i < VECTOR_MAX; ++i)
+	{
+	  rdtscl(ini);
+	  
+	  a->matrix(matrix);
+	  
+	  rdtscl(end);
+	  mittel += (end - ini - dt);
+	}
+      mi = mittel / (float)VECTOR_MAX;
+      printf(" Generate rot matrix: q->matrix(m)\t%11.2f\n", mi);
+    }
+  if( type == 3 || type == -1)
+    {
+      /* list tests*/
+      printf("\nList operations tests: \t\t\t\t\t%i\n", LIST_MAX);
+      tList<char>* list = new tList<char>();
+      char* name;
+      
+      printf(" Adding[1..10] elements to list, found:\n");
+      list->add("1");
+      list->add("2");
+      list->add("3");
+      list->add("4");
+      list->add("5");
+      list->add("6");
+      list->add("7");
+      list->add("8");
+      list->add("9");
+      list->add("10");
+      
+      /*give list out */
+      tIterator<char>* iterator = list->getIterator();
+      name = iterator->nextElement();
+      printf("  List Elements: \t\t");
+      while( name != NULL)
+	{
+	  printf("%s,", name);
+	  name = iterator->nextElement();
+	}
+      delete iterator;
+      printf("\n");
+      
+      
+      /*removing some elements from the list*/
+      printf(" Removing elements [2,3,6,8,10], adding [11] now found:\n");
+      list->remove("2");
+      list->remove("3");
+      list->remove("6");
+      list->remove("8");
+      list->remove("10");
+      list->add("11");
+      /*give list out */
+      iterator = list->getIterator();
+      name = iterator->nextElement();
+      printf("  List Elements: \t\t");
+      while( name != NULL)
+	{
+	  printf("%s,", name);
+	  name = iterator->nextElement();
+	}
+      delete iterator;
+      printf("\n");
+      
+      delete list;
+      printf("\nChecking list performance:\t\t\t\t%i\n", LIST_MAX);
+      
+      tList<int>* plist = new tList<int>();
+      unsigned long mittel, ini, end;
+      float mi;
+      int i = 0;
+      mittel = 0;
+      for(i = 0; i < LIST_MAX; ++i)
+	{
+	  rdtscl(ini);
+	  
+	  plist->add(&i);
+	  
+	  rdtscl(end);
+	  mittel += (end - ini - dt);
+	}
+      mi = mittel / (float)LIST_MAX;
+      printf(" Adding reference to list:\t\t%11.2f\n", mi);
+      
+      mittel = 0;
+      for(i = 0; i < LIST_MAX; ++i)
+	{
+	  rdtscl(ini);
+	  
+	  plist->remove(&i);
+	  
+	  rdtscl(end);
+	  mittel += (end - ini - dt);
+	}
+      mi = mittel / (float)LIST_MAX;
+      printf(" Removing 1st reference from list:\t%11.2f\n", mi);
+      
+
+      printf("\nList operations tests: \t\t\t\t\t%i\n", LIST_MAX);
+      list = new tList<char>();
+      printf(" Adding[1..10] elements to list, found:\n");
+      list->add("1");
+      list->add("2");
+      list->add("3");
+      list->add("4");
+      list->add("5");
+      list->add("6");
+      list->add("7");
+      list->add("8");
+      list->add("9");
+      list->add("10");
+      
+      /*give list out */
+      iterator = list->getIterator();
+      name = iterator->nextElement();
+      printf("  List Elements: \t\t");
+      while( name != NULL)
+	{
+	  printf("%s,", name);
+	  name = iterator->nextElement();
+	}
+      delete iterator;
+      printf("\n");
+      
+      
+      int c = 0;
+      printf(" Going trough list with nextElement(el) func: ");
+      name = list->firstElement();
+      while(c < 20)
+	{
+	  printf("%s,", name);
+	  name = list->nextElement(name);
+	  c++;
+	}
+      printf("\n");
+      
+
+      
+    }
+  
+}
+
+#else
+
+int startBenchmarks()
+{
+  PRINTF(1)("Benchmark is not implemented in this system\n");
+}
+
+#endif
Index: orxonox/branches/heightMap/src/subprojects/benchmark.h
===================================================================
--- orxonox/branches/heightMap/src/subprojects/benchmark.h	(revision 4165)
+++ orxonox/branches/heightMap/src/subprojects/benchmark.h	(revision 4165)
@@ -0,0 +1,13 @@
+/*! 
+    \file benchmark.h
+    \brief benchmark functions
+*/ 
+
+
+#ifndef _BENCHMARK_H
+#define _BENCHMARK_H
+
+int startBenchmarks(void);
+
+
+#endif /* _BENCHMARK_H */
Index: orxonox/branches/heightMap/src/subprojects/testmain/Makefile.in
===================================================================
--- orxonox/branches/heightMap/src/subprojects/testmain/Makefile.in	(revision 4122)
+++ orxonox/branches/heightMap/src/subprojects/testmain/Makefile.in	(revision 4165)
@@ -128,4 +128,5 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
@@ -196,7 +197,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/testmain/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/testmain/Makefile'; \
 	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/subprojects/testmain/Makefile
+	  $(AUTOMAKE) --foreign  src/subprojects/testmain/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: orxonox/branches/heightMap/src/world_entities/skybox.cc
===================================================================
--- orxonox/branches/heightMap/src/world_entities/skybox.cc	(revision 4122)
+++ orxonox/branches/heightMap/src/world_entities/skybox.cc	(revision 4165)
@@ -66,5 +66,5 @@
       PRINTF(0)("SkyBox is missing a proper 'MaterialSet'\n");
     }
-  if( this->model == NULL)
+  if( this->skyModel == NULL)
     {
       PRINTF(0)("SkyBox model '%s' could not be loaded\n", string);
@@ -76,6 +76,7 @@
 {
   this->setClassName("SkyBox");
+  this->skyModel = NULL;
   this->material = new Material*[6];
-  for (int i = 0; i <6; i++) 
+  for (int i = 0; i < 6; i++) 
     {
       this->material[i] = new Material();
@@ -100,5 +101,5 @@
 SkyBox::~SkyBox()
 {
-  PRINTF(5)("Deleting the SkyBox\n");
+  PRINTF(5)("Deleting SkyBox\n");
   for (int i = 0; i < 6; i++)
     delete this->material[i];
@@ -179,5 +180,5 @@
   glTranslatef(r.x, r.y, r.z);
 
-  this->model->draw();
+  this->skyModel->draw();
 
   glPopMatrix();
@@ -192,42 +193,42 @@
 void SkyBox::rebuild()
 {
-  if (this->model)
-    delete model;
-  model = new Model();
-
-  model->addVertex (-0.5*size, -0.5*size, 0.5*size);  
-  model->addVertex (0.5*size, -0.5*size, 0.5*size);
-  model->addVertex (-0.5*size, 0.5*size, 0.5*size);
-  model->addVertex (0.5*size, 0.5*size, 0.5*size);
-  model->addVertex (-0.5*size, 0.5*size, -0.5*size);
-  model->addVertex (0.5*size, 0.5*size, -0.5*size);
-  model->addVertex (-0.5*size, -0.5*size, -0.5*size);
-  model->addVertex (0.5*size, -0.5*size, -0.5*size);
-
-  model->addVertexTexture (0.0, 0.0);
-  model->addVertexTexture (1.0, 0.0);
-  model->addVertexTexture (1.0, 1.0);
-  model->addVertexTexture (0.0, 1.0);
-
-  model->addVertexNormal (0.0, 0.0, 1.0);
-  model->addVertexNormal (0.0, 1.0, 0.0);
-  model->addVertexNormal (0.0, 0.0, -1.0);
-  model->addVertexNormal (0.0, -1.0, 0.0);
-  model->addVertexNormal (1.0, 0.0, 0.0);
-  model->addVertexNormal (-1.0, 0.0, 0.0);
-
-  model->setMaterial(material[0]);
-  model->addFace (4, VERTEX_TEXCOORD_NORMAL, 2,1,3, 3,2,3, 5,3,3, 4,0,3); // top
-  model->setMaterial(material[1]);
-  model->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,3,1, 7,0,1, 1,1,1, 0,2,1); // bottom
-  model->setMaterial(material[2]);
-  model->addFace (4, VERTEX_TEXCOORD_NORMAL, 0,0,2, 1,1,2, 3,2,2, 2,3,2); // left
-  model->setMaterial(material[3]);
-  model->addFace (4, VERTEX_TEXCOORD_NORMAL, 4,2,0, 5,3,0, 7,0,0, 6,1,0); // right
-  model->setMaterial(material[4]);
-  model->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,0,5, 7,1,5, 5,2,5, 3,3,6); // front
-  model->setMaterial(material[5]);
-  model->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,0,4, 0,1,4, 2,2,4, 4,3,4); // back
+  if (this->skyModel)
+    delete skyModel;
+  skyModel = new Model();
+
+  this->skyModel->addVertex (-0.5*size, -0.5*size, 0.5*size);  
+  this->skyModel->addVertex (0.5*size, -0.5*size, 0.5*size);
+  this->skyModel->addVertex (-0.5*size, 0.5*size, 0.5*size);
+  this->skyModel->addVertex (0.5*size, 0.5*size, 0.5*size);
+  this->skyModel->addVertex (-0.5*size, 0.5*size, -0.5*size);
+  this->skyModel->addVertex (0.5*size, 0.5*size, -0.5*size);
+  this->skyModel->addVertex (-0.5*size, -0.5*size, -0.5*size);
+  this->skyModel->addVertex (0.5*size, -0.5*size, -0.5*size);
+
+  this->skyModel->addVertexTexture (0.0, 0.0);
+  this->skyModel->addVertexTexture (1.0, 0.0);
+  this->skyModel->addVertexTexture (1.0, 1.0);
+  this->skyModel->addVertexTexture (0.0, 1.0);
+
+  this->skyModel->addVertexNormal (0.0, 0.0, 1.0);
+  this->skyModel->addVertexNormal (0.0, 1.0, 0.0);
+  this->skyModel->addVertexNormal (0.0, 0.0, -1.0);
+  this->skyModel->addVertexNormal (0.0, -1.0, 0.0);
+  this->skyModel->addVertexNormal (1.0, 0.0, 0.0);
+  this->skyModel->addVertexNormal (-1.0, 0.0, 0.0);
+
+  this->skyModel->setMaterial(material[0]);
+  this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 2,1,3, 3,2,3, 5,3,3, 4,0,3); // top
+  this->skyModel->setMaterial(material[1]);
+  this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,3,1, 7,0,1, 1,1,1, 0,2,1); // bottom
+  this->skyModel->setMaterial(material[2]);
+  this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 0,0,2, 1,1,2, 3,2,2, 2,3,2); // left
+  this->skyModel->setMaterial(material[3]);
+  this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 4,2,0, 5,3,0, 7,0,0, 6,1,0); // right
+  this->skyModel->setMaterial(material[4]);
+  this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,0,5, 7,1,5, 5,2,5, 3,3,6); // front
+  this->skyModel->setMaterial(material[5]);
+  this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,0,4, 0,1,4, 2,2,4, 4,3,4); // back
   
-  model->finalize();
-}
+  this->skyModel->finalize();
+}
Index: orxonox/branches/heightMap/src/world_entities/skybox.h
===================================================================
--- orxonox/branches/heightMap/src/world_entities/skybox.h	(revision 4122)
+++ orxonox/branches/heightMap/src/world_entities/skybox.h	(revision 4165)
@@ -39,4 +39,5 @@
   void rebuild();
 
+  Model* skyModel;        //!< A Model for the Sky. This must not be the same as the Model from WorldEntity, because it is not alocated through the ResourceManager.
   Material **material;    //!< Materials for the SkyBox. sorted by number (0-5) top, bottom, left, right, front, back
   float size;             //!< Size of the SkyBox. This should match the frustum maximum range.
Index: orxonox/branches/heightMap/src/world_entities/terrain.cc
===================================================================
--- orxonox/branches/heightMap/src/world_entities/terrain.cc	(revision 4122)
+++ orxonox/branches/heightMap/src/world_entities/terrain.cc	(revision 4165)
@@ -109,7 +109,7 @@
 void Terrain::init(void)
 {
-   this->setClassName ("Terrain");
-
-   this->objectList = 0;
+  this->setClassName ("Terrain");
+  
+  this->objectList = 0;
 }
 
@@ -130,9 +130,8 @@
   glMultMatrixf((float*)matrix);
 
-  if (objectList)
-    glCallList(objectList);
-  else if (model)
-    model->draw();
-  //  this->model->draw();
+  if (this->objectList)
+    glCallList(this->objectList);
+  else if (this->model)
+    this->model->draw();
   glPopMatrix();
 }
