Index: orxonox/branches/sound/src/Makefile
===================================================================
--- orxonox/branches/sound/src/Makefile	(revision 3179)
+++ orxonox/branches/sound/src/Makefile	(revision 3238)
@@ -1,3 +1,3 @@
-# Makefile.in generated by automake 1.8.2 from Makefile.am.
+# Makefile.in generated by automake 1.8.5 from Makefile.am.
 # src/Makefile.  Generated from Makefile.in by configure.
 
@@ -38,4 +38,5 @@
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+host_triplet = i686-pc-linux-gnu
 bin_PROGRAMS = orxonox$(EXEEXT) sound$(EXEEXT)
 subdir = src
@@ -49,13 +50,15 @@
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
-am__installdirs = $(DESTDIR)$(bindir)
+am__installdirs = "$(DESTDIR)$(bindir)"
 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
 am_orxonox_OBJECTS = orxonox.$(OBJEXT) world.$(OBJEXT) \
-	player.$(OBJEXT) data_tank.$(OBJEXT) world_entity.$(OBJEXT) \
-	vector.$(OBJEXT) camera.$(OBJEXT) collision.$(OBJEXT) \
+	player.$(OBJEXT) collision.$(OBJEXT) data_tank.$(OBJEXT) \
+	world_entity.$(OBJEXT) vector.$(OBJEXT) camera.$(OBJEXT) \
 	command_node.$(OBJEXT) ini_parser.$(OBJEXT) keynames.$(OBJEXT) \
 	track.$(OBJEXT) base_entity.$(OBJEXT) game_loader.$(OBJEXT) \
-	campaign.$(OBJEXT) story_entity.$(OBJEXT)
+	campaign.$(OBJEXT) story_entity.$(OBJEXT) \
+	environment.$(OBJEXT) object.$(OBJEXT) array.$(OBJEXT) \
+	material.$(OBJEXT) list.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
 orxonox_LDADD = $(LDADD)
@@ -66,13 +69,15 @@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
-DEP_FILES = ./$(DEPDIR)/base_entity.Po \
-	./$(DEPDIR)/camera.Po ./$(DEPDIR)/campaign.Po \
-	./$(DEPDIR)/collision.Po \
+DEP_FILES = ./$(DEPDIR)/array.Po \
+	./$(DEPDIR)/base_entity.Po ./$(DEPDIR)/camera.Po \
+	./$(DEPDIR)/campaign.Po ./$(DEPDIR)/collision.Po \
 	./$(DEPDIR)/command_node.Po \
 	./$(DEPDIR)/data_tank.Po \
+	./$(DEPDIR)/environment.Po \
 	./$(DEPDIR)/game_loader.Po \
 	./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \
-	./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/player.Po \
-	./$(DEPDIR)/sound_control.Po \
+	./$(DEPDIR)/list.Po ./$(DEPDIR)/material.Po \
+	./$(DEPDIR)/object.Po ./$(DEPDIR)/orxonox.Po \
+	./$(DEPDIR)/player.Po ./$(DEPDIR)/sound_control.Po \
 	./$(DEPDIR)/sound_test.Po \
 	./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/track.Po \
@@ -86,15 +91,22 @@
 SOURCES = $(orxonox_SOURCES) $(sound_SOURCES)
 DIST_SOURCES = $(orxonox_SOURCES) $(sound_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
 HEADERS = $(noinst_HEADERS)
 ETAGS = etags
 CTAGS = ctags
+DIST_SUBDIRS = . importer gui console
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = aclocal-1.8
+ACLOCAL = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run aclocal-1.8
 AMDEP_FALSE = #
 AMDEP_TRUE = 
-AMTAR = tar
-AUTOCONF = autoconf
-AUTOHEADER = autoheader
-AUTOMAKE = automake-1.8
+AMTAR = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run tar
+AUTOCONF = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run automake-1.8
 AWK = gawk
 CC = gcc
@@ -102,40 +114,48 @@
 CFLAGS = -g -O2
 CPP = gcc -E
-CPPFLAGS = 
+CPPFLAGS = -I/usr/X11R6/include
 CXX = g++
 CXXDEPMODE = depmode=gcc3
 CXXFLAGS = -g -O2
 CYGPATH_W = echo
+DEBUG = 1
 DEFS = -DHAVE_CONFIG_H
 DEPDIR = .deps
+DOXYGEN = /usr/bin/doxygen
+DOXYGEN_FALSE = #
+DOXYGEN_TRUE = 
 ECHO_C = 
 ECHO_N = -n
 ECHO_T = 
 EGREP = grep -E
-EXEEXT = .exe
+EXEEXT = 
+GTK2_CFLAGS = -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  
+GTK2_LIBS = -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0  
+HAVE_GTK2_FALSE = #
+HAVE_GTK2_TRUE = 
 INSTALL_DATA = ${INSTALL} -m 644
 INSTALL_PROGRAM = ${INSTALL}
 INSTALL_SCRIPT = ${INSTALL}
 INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
-LDFLAGS = 
+LDFLAGS = -L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib 
 LIBOBJS = 
-LIBS = -lm  -lopengl32 -lGLU32 -lmingw32 -lsdlmain -lsdl -lSDL_mixer -Lc:/Prog/Utils/MinGW/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv  
+LIBS = -lm  -lGL -lGLU -lSDL -lSDL_mixer -lSDL_image
 LTLIBOBJS = 
-MAKEINFO = makeinfo
-MSBITFIELDS = -mms-bitfields
+MAKEINFO = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run makeinfo
+MSBITFIELDS = 
 OBJEXT = o
 PACKAGE = orxonox
 PACKAGE_BUGREPORT = orxonox-dev@mail.datacore.ch
 PACKAGE_NAME = orxonox
-PACKAGE_STRING = orxonox 0.1-pre-alpha
+PACKAGE_STRING = orxonox 0.2.0_alpha-r1
 PACKAGE_TARNAME = orxonox
-PACKAGE_VERSION = 0.1-pre-alpha
+PACKAGE_VERSION = 0.2.0_alpha-r1
 PATH_SEPARATOR = :
 SET_MAKE = 
 SHELL = /bin/sh
 STRIP = 
-VERSION = 0.1-pre-alpha
+VERSION = 0.2.0_alpha-r1
 ac_ct_CC = gcc
-ac_ct_CXX = g++
+ac_ct_CXX = 
 ac_ct_STRIP = 
 am__fastdepCC_FALSE = #
@@ -147,11 +167,19 @@
 am__quote = 
 bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
 build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
 datadir = ${prefix}/share
 exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
 host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
 includedir = ${prefix}/include
 infodir = ${prefix}/info
-install_sh = /c/Documents and Settings/bensch/Desktop/svn/orxonox/branches/sound/install-sh
+install_sh = /home/bensch/svn/orxonox/branches/sound/install-sh
 libdir = ${exec_prefix}/lib
 libexecdir = ${exec_prefix}/libexec
@@ -165,11 +193,79 @@
 sharedstatedir = ${prefix}/com
 sysconfdir = ${prefix}/etc
+target = i686-pc-linux-gnu
 target_alias = 
-AM_CXXFLAGS = "-I/usr/X11R6/include"
-AM_LDFLAGS = "-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11" $(MWINDOWS)
-orxonox_SOURCES = orxonox.cc world.cc player.cc data_tank.cc world_entity.cc vector.cc camera.cc collision.cc command_node.cc ini_parser.cc keynames.cc track.cc base_entity.cc game_loader.cc campaign.cc story_entity.cc
+target_cpu = i686
+target_os = linux-gnu
+target_vendor = pc
+
+#AM_CXXFLAGS=""
+AM_LDFLAGS = $(MWINDOWS)
 sound_SOURCES = sound_test.cc sound_control.cc
-noinst_HEADERS = ability.h data_tank.h npc.h stdincl.h ai.h environment.h orxonox.h synchronisable.h base_entity.h error.h player.h track.h camera.h ini_parser.h power_up.h vector.h collision.h keynames.h proto_class.h world.h command_node.h list.h shoot_laser.h world_entity.h coordinates.h message_structures.h shoot_rocket.h
-all: all-am
+orxonox_SOURCES = orxonox.cc \
+		 world.cc \
+		 player.cc \
+		 collision.cc \
+		 data_tank.cc \
+		 world_entity.cc \
+		 vector.cc \
+		 camera.cc \
+		 command_node.cc \
+		 ini_parser.cc \
+		 keynames.cc \
+		 track.cc \
+		 base_entity.cc \
+		 game_loader.cc \
+		 campaign.cc \
+		 story_entity.cc \
+		 environment.cc \
+		 importer/object.cc \
+		 importer/array.cc \
+		 importer/material.cc \
+		 list.cc
+
+noinst_HEADERS = ability.h \
+		 data_tank.h \
+		 collision.h \
+		 npc.h \
+		 stdincl.h \
+		 ai.h \
+		 environment.h \
+		 orxonox.h \
+		 synchronisable.h \
+		 base_entity.h \
+		 error.h \
+		 player.h \
+		 track.h \
+		 camera.h \
+		 ini_parser.h \
+		 power_up.h \
+		 vector.h \
+		 keynames.h \
+		 proto_class.h \
+		 world.h \
+		 command_node.h \
+		 list.h \
+		 shoot_laser.h \
+		 world_entity.h \
+		 coordinates.h \
+		 message_structures.h \
+		 shoot_rocket.h \
+		 list_template.h \
+		 story_entity.h \
+		 story_def.h \
+		 game_loader.h \
+		 campaign.h
+
+EXTRA_DIST = orxonox.conf
+#GTK_PROGS = 
+
+### GTK_RELATED
+GTK_PROGS = console
+SUBDIRS = . \
+	  importer \
+	  gui \
+	  $(GTK_PROGS)
+
+all: all-recursive
 
 .SUFFIXES:
@@ -184,7 +280,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
@@ -206,5 +302,5 @@
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	$(mkdir_p) $(DESTDIR)$(bindir)
+	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
 	@list='$(bin_PROGRAMS)'; for p in $$list; do \
 	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
@@ -212,6 +308,6 @@
 	  ; then \
 	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
-	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
 	  else :; fi; \
 	done
@@ -221,6 +317,6 @@
 	@list='$(bin_PROGRAMS)'; for p in $$list; do \
 	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
-	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
 	done
 
@@ -240,4 +336,5 @@
 	-rm -f *.tab.c
 
+include ./$(DEPDIR)/array.Po
 include ./$(DEPDIR)/base_entity.Po
 include ./$(DEPDIR)/camera.Po
@@ -246,7 +343,11 @@
 include ./$(DEPDIR)/command_node.Po
 include ./$(DEPDIR)/data_tank.Po
+include ./$(DEPDIR)/environment.Po
 include ./$(DEPDIR)/game_loader.Po
 include ./$(DEPDIR)/ini_parser.Po
 include ./$(DEPDIR)/keynames.Po
+include ./$(DEPDIR)/list.Po
+include ./$(DEPDIR)/material.Po
+include ./$(DEPDIR)/object.Po
 include ./$(DEPDIR)/orxonox.Po
 include ./$(DEPDIR)/player.Po
@@ -274,5 +375,112 @@
 #	$(CXXDEPMODE) $(depcomp) \
 #	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+object.o: importer/object.cc
+	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT object.o -MD -MP -MF "$(DEPDIR)/object.Tpo" -c -o object.o `test -f 'importer/object.cc' || echo '$(srcdir)/'`importer/object.cc; \
+	then mv -f "$(DEPDIR)/object.Tpo" "$(DEPDIR)/object.Po"; else rm -f "$(DEPDIR)/object.Tpo"; exit 1; fi
+#	source='importer/object.cc' object='object.o' libtool=no \
+#	depfile='$(DEPDIR)/object.Po' tmpdepfile='$(DEPDIR)/object.TPo' \
+#	$(CXXDEPMODE) $(depcomp) \
+#	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o object.o `test -f 'importer/object.cc' || echo '$(srcdir)/'`importer/object.cc
+
+object.obj: importer/object.cc
+	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT object.obj -MD -MP -MF "$(DEPDIR)/object.Tpo" -c -o object.obj `if test -f 'importer/object.cc'; then $(CYGPATH_W) 'importer/object.cc'; else $(CYGPATH_W) '$(srcdir)/importer/object.cc'; fi`; \
+	then mv -f "$(DEPDIR)/object.Tpo" "$(DEPDIR)/object.Po"; else rm -f "$(DEPDIR)/object.Tpo"; exit 1; fi
+#	source='importer/object.cc' object='object.obj' libtool=no \
+#	depfile='$(DEPDIR)/object.Po' tmpdepfile='$(DEPDIR)/object.TPo' \
+#	$(CXXDEPMODE) $(depcomp) \
+#	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o object.obj `if test -f 'importer/object.cc'; then $(CYGPATH_W) 'importer/object.cc'; else $(CYGPATH_W) '$(srcdir)/importer/object.cc'; fi`
+
+array.o: importer/array.cc
+	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT array.o -MD -MP -MF "$(DEPDIR)/array.Tpo" -c -o array.o `test -f 'importer/array.cc' || echo '$(srcdir)/'`importer/array.cc; \
+	then mv -f "$(DEPDIR)/array.Tpo" "$(DEPDIR)/array.Po"; else rm -f "$(DEPDIR)/array.Tpo"; exit 1; fi
+#	source='importer/array.cc' object='array.o' libtool=no \
+#	depfile='$(DEPDIR)/array.Po' tmpdepfile='$(DEPDIR)/array.TPo' \
+#	$(CXXDEPMODE) $(depcomp) \
+#	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o array.o `test -f 'importer/array.cc' || echo '$(srcdir)/'`importer/array.cc
+
+array.obj: importer/array.cc
+	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT array.obj -MD -MP -MF "$(DEPDIR)/array.Tpo" -c -o array.obj `if test -f 'importer/array.cc'; then $(CYGPATH_W) 'importer/array.cc'; else $(CYGPATH_W) '$(srcdir)/importer/array.cc'; fi`; \
+	then mv -f "$(DEPDIR)/array.Tpo" "$(DEPDIR)/array.Po"; else rm -f "$(DEPDIR)/array.Tpo"; exit 1; fi
+#	source='importer/array.cc' object='array.obj' libtool=no \
+#	depfile='$(DEPDIR)/array.Po' tmpdepfile='$(DEPDIR)/array.TPo' \
+#	$(CXXDEPMODE) $(depcomp) \
+#	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o array.obj `if test -f 'importer/array.cc'; then $(CYGPATH_W) 'importer/array.cc'; else $(CYGPATH_W) '$(srcdir)/importer/array.cc'; fi`
+
+material.o: importer/material.cc
+	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT material.o -MD -MP -MF "$(DEPDIR)/material.Tpo" -c -o material.o `test -f 'importer/material.cc' || echo '$(srcdir)/'`importer/material.cc; \
+	then mv -f "$(DEPDIR)/material.Tpo" "$(DEPDIR)/material.Po"; else rm -f "$(DEPDIR)/material.Tpo"; exit 1; fi
+#	source='importer/material.cc' object='material.o' libtool=no \
+#	depfile='$(DEPDIR)/material.Po' tmpdepfile='$(DEPDIR)/material.TPo' \
+#	$(CXXDEPMODE) $(depcomp) \
+#	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o material.o `test -f 'importer/material.cc' || echo '$(srcdir)/'`importer/material.cc
+
+material.obj: importer/material.cc
+	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT material.obj -MD -MP -MF "$(DEPDIR)/material.Tpo" -c -o material.obj `if test -f 'importer/material.cc'; then $(CYGPATH_W) 'importer/material.cc'; else $(CYGPATH_W) '$(srcdir)/importer/material.cc'; fi`; \
+	then mv -f "$(DEPDIR)/material.Tpo" "$(DEPDIR)/material.Po"; else rm -f "$(DEPDIR)/material.Tpo"; exit 1; fi
+#	source='importer/material.cc' object='material.obj' libtool=no \
+#	depfile='$(DEPDIR)/material.Po' tmpdepfile='$(DEPDIR)/material.TPo' \
+#	$(CXXDEPMODE) $(depcomp) \
+#	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o material.obj `if test -f 'importer/material.cc'; then $(CYGPATH_W) 'importer/material.cc'; else $(CYGPATH_W) '$(srcdir)/importer/material.cc'; fi`
 uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -286,8 +494,21 @@
 tags: TAGS
 
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
 	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
@@ -296,9 +517,11 @@
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
-	test -z "$(ETAGS_ARGS)$$tags$$unique" \
-	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	     $$tags $$unique
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
 ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
@@ -349,18 +572,34 @@
 	  fi; \
 	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || mkdir "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="../$(top_distdir)" \
+	        distdir="../$(distdir)/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
 check-am: all-am
-check: check-am
+check: check-recursive
 all-am: Makefile $(PROGRAMS) $(HEADERS)
-installdirs:
-	$(mkdir_p) $(DESTDIR)$(bindir)
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
 
 install-am: all-am
 	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installcheck: installcheck-am
+installcheck: installcheck-recursive
 install-strip:
 	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
@@ -378,9 +617,9 @@
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
+clean: clean-recursive
 
 clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
 
-distclean: distclean-am
+distclean: distclean-recursive
 	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
@@ -388,11 +627,11 @@
 	distclean-tags
 
-dvi: dvi-am
+dvi: dvi-recursive
 
 dvi-am:
 
-html: html-am
-
-info: info-am
+html: html-recursive
+
+info: info-recursive
 
 info-am:
@@ -402,5 +641,5 @@
 install-exec-am: install-binPROGRAMS
 
-install-info: install-info-am
+install-info: install-info-recursive
 
 install-man:
@@ -408,18 +647,18 @@
 installcheck-am:
 
-maintainer-clean: maintainer-clean-am
+maintainer-clean: maintainer-clean-recursive
 	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
-mostlyclean: mostlyclean-am
+mostlyclean: mostlyclean-recursive
 
 mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-pdf: pdf-am
+pdf: pdf-recursive
 
 pdf-am:
 
-ps: ps-am
+ps: ps-recursive
 
 ps-am:
@@ -427,17 +666,22 @@
 uninstall-am: uninstall-binPROGRAMS uninstall-info-am
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
-	clean-generic ctags distclean distclean-compile \
-	distclean-generic distclean-tags distdir dvi dvi-am html \
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+	clean clean-binPROGRAMS clean-generic clean-recursive ctags \
+	ctags-recursive distclean distclean-compile distclean-generic \
+	distclean-recursive distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-binPROGRAMS \
 	install-data install-data-am install-exec install-exec-am \
 	install-info install-info-am install-man install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-	uninstall-am uninstall-binPROGRAMS uninstall-info-am
-
-
-#  uncomment the following if bencoder requires the math library
+	installcheck installcheck-am installdirs installdirs-am \
+	maintainer-clean maintainer-clean-generic \
+	maintainer-clean-recursive mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \
+	tags tags-recursive uninstall uninstall-am \
+	uninstall-binPROGRAMS uninstall-info-am
+
+
+#  uncomment the following if orxonox requires the math library
 #orxonox_LDADD=-lm
 
Index: orxonox/branches/sound/src/Makefile.am
===================================================================
--- orxonox/branches/sound/src/Makefile.am	(revision 3179)
+++ orxonox/branches/sound/src/Makefile.am	(revision 3238)
@@ -1,4 +1,4 @@
-AM_CXXFLAGS="-I/usr/X11R6/include"
-AM_LDFLAGS="-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11" $(MWINDOWS)
+#AM_CXXFLAGS=""
+AM_LDFLAGS= $(MWINDOWS)
 
 #"-O3 -pedantic -fPIC -ffast-math -I/usr/X11R6/include"
@@ -6,12 +6,78 @@
 
 bin_PROGRAMS=orxonox sound
-orxonox_SOURCES=orxonox.cc world.cc player.cc data_tank.cc world_entity.cc vector.cc camera.cc collision.cc command_node.cc ini_parser.cc keynames.cc track.cc base_entity.cc game_loader.cc campaign.cc story_entity.cc
 
 sound_SOURCES=sound_test.cc sound_control.cc
 
-noinst_HEADERS=ability.h data_tank.h npc.h stdincl.h ai.h environment.h orxonox.h synchronisable.h base_entity.h error.h player.h track.h camera.h ini_parser.h power_up.h vector.h collision.h keynames.h proto_class.h world.h command_node.h list.h shoot_laser.h world_entity.h coordinates.h message_structures.h shoot_rocket.h
+orxonox_SOURCES= orxonox.cc \
+		 world.cc \
+		 player.cc \
+		 collision.cc \
+		 data_tank.cc \
+		 world_entity.cc \
+		 vector.cc \
+		 camera.cc \
+		 command_node.cc \
+		 ini_parser.cc \
+		 keynames.cc \
+		 track.cc \
+		 base_entity.cc \
+		 game_loader.cc \
+		 campaign.cc \
+		 story_entity.cc \
+		 environment.cc \
+		 importer/object.cc \
+		 importer/array.cc \
+		 importer/material.cc \
+		 list.cc
 
+noinst_HEADERS = ability.h \
+		 data_tank.h \
+		 collision.h \
+		 npc.h \
+		 stdincl.h \
+		 ai.h \
+		 environment.h \
+		 orxonox.h \
+		 synchronisable.h \
+		 base_entity.h \
+		 error.h \
+		 player.h \
+		 track.h \
+		 camera.h \
+		 ini_parser.h \
+		 power_up.h \
+		 vector.h \
+		 keynames.h \
+		 proto_class.h \
+		 world.h \
+		 command_node.h \
+		 list.h \
+		 shoot_laser.h \
+		 world_entity.h \
+		 coordinates.h \
+		 message_structures.h \
+		 shoot_rocket.h \
+		 list_template.h \
+		 story_entity.h \
+		 story_def.h \
+		 game_loader.h \
+		 campaign.h
 
-#  uncomment the following if bencoder requires the math library
+## orxonox.conf will be used from home-dir instead.
+EXTRA_DIST = orxonox.conf
+
+### GTK_RELATED
+if HAVE_GTK2
+  GTK_PROGS =console
+else
+  GTK_PROGS =
+endif
+
+SUBDIRS = . \
+	  importer \
+	  gui \
+	  $(GTK_PROGS)
+
+#  uncomment the following if orxonox requires the math library
 #orxonox_LDADD=-lm
 
Index: orxonox/branches/sound/src/Makefile.in
===================================================================
--- orxonox/branches/sound/src/Makefile.in	(revision 3179)
+++ orxonox/branches/sound/src/Makefile.in	(revision 3238)
@@ -1,3 +1,3 @@
-# Makefile.in generated by automake 1.8.2 from Makefile.am.
+# Makefile.in generated by automake 1.8.5 from Makefile.am.
 # @configure_input@
 
@@ -38,4 +38,5 @@
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+host_triplet = @host@
 bin_PROGRAMS = orxonox$(EXEEXT) sound$(EXEEXT)
 subdir = src
@@ -49,13 +50,15 @@
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
-am__installdirs = $(DESTDIR)$(bindir)
+am__installdirs = "$(DESTDIR)$(bindir)"
 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
 am_orxonox_OBJECTS = orxonox.$(OBJEXT) world.$(OBJEXT) \
-	player.$(OBJEXT) data_tank.$(OBJEXT) world_entity.$(OBJEXT) \
-	vector.$(OBJEXT) camera.$(OBJEXT) collision.$(OBJEXT) \
+	player.$(OBJEXT) collision.$(OBJEXT) data_tank.$(OBJEXT) \
+	world_entity.$(OBJEXT) vector.$(OBJEXT) camera.$(OBJEXT) \
 	command_node.$(OBJEXT) ini_parser.$(OBJEXT) keynames.$(OBJEXT) \
 	track.$(OBJEXT) base_entity.$(OBJEXT) game_loader.$(OBJEXT) \
-	campaign.$(OBJEXT) story_entity.$(OBJEXT)
+	campaign.$(OBJEXT) story_entity.$(OBJEXT) \
+	environment.$(OBJEXT) object.$(OBJEXT) array.$(OBJEXT) \
+	material.$(OBJEXT) list.$(OBJEXT)
 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
 orxonox_LDADD = $(LDADD)
@@ -66,13 +69,15 @@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/base_entity.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/camera.Po ./$(DEPDIR)/campaign.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/collision.Po \
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/base_entity.Po ./$(DEPDIR)/camera.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/campaign.Po ./$(DEPDIR)/collision.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/command_node.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/data_tank.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/environment.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/game_loader.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/player.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/sound_control.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/list.Po ./$(DEPDIR)/material.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/object.Po ./$(DEPDIR)/orxonox.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/player.Po ./$(DEPDIR)/sound_control.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/sound_test.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/track.Po \
@@ -86,7 +91,14 @@
 SOURCES = $(orxonox_SOURCES) $(sound_SOURCES)
 DIST_SOURCES = $(orxonox_SOURCES) $(sound_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
 HEADERS = $(noinst_HEADERS)
 ETAGS = etags
 CTAGS = ctags
+DIST_SUBDIRS = . importer gui console
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -107,6 +119,10 @@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
+DEBUG = @DEBUG@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DOXYGEN = @DOXYGEN@
+DOXYGEN_FALSE = @DOXYGEN_FALSE@
+DOXYGEN_TRUE = @DOXYGEN_TRUE@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
@@ -114,4 +130,8 @@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
+GTK2_CFLAGS = @GTK2_CFLAGS@
+GTK2_LIBS = @GTK2_LIBS@
+HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
+HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -147,8 +167,16 @@
 am__quote = @am__quote@
 bindir = @bindir@
+build = @build@
 build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
 datadir = @datadir@
 exec_prefix = @exec_prefix@
+host = @host@
 host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
 includedir = @includedir@
 infodir = @infodir@
@@ -165,11 +193,79 @@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
+target = @target@
 target_alias = @target_alias@
-AM_CXXFLAGS = "-I/usr/X11R6/include"
-AM_LDFLAGS = "-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11" $(MWINDOWS)
-orxonox_SOURCES = orxonox.cc world.cc player.cc data_tank.cc world_entity.cc vector.cc camera.cc collision.cc command_node.cc ini_parser.cc keynames.cc track.cc base_entity.cc game_loader.cc campaign.cc story_entity.cc
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+
+#AM_CXXFLAGS=""
+AM_LDFLAGS = $(MWINDOWS)
 sound_SOURCES = sound_test.cc sound_control.cc
-noinst_HEADERS = ability.h data_tank.h npc.h stdincl.h ai.h environment.h orxonox.h synchronisable.h base_entity.h error.h player.h track.h camera.h ini_parser.h power_up.h vector.h collision.h keynames.h proto_class.h world.h command_node.h list.h shoot_laser.h world_entity.h coordinates.h message_structures.h shoot_rocket.h
-all: all-am
+orxonox_SOURCES = orxonox.cc \
+		 world.cc \
+		 player.cc \
+		 collision.cc \
+		 data_tank.cc \
+		 world_entity.cc \
+		 vector.cc \
+		 camera.cc \
+		 command_node.cc \
+		 ini_parser.cc \
+		 keynames.cc \
+		 track.cc \
+		 base_entity.cc \
+		 game_loader.cc \
+		 campaign.cc \
+		 story_entity.cc \
+		 environment.cc \
+		 importer/object.cc \
+		 importer/array.cc \
+		 importer/material.cc \
+		 list.cc
+
+noinst_HEADERS = ability.h \
+		 data_tank.h \
+		 collision.h \
+		 npc.h \
+		 stdincl.h \
+		 ai.h \
+		 environment.h \
+		 orxonox.h \
+		 synchronisable.h \
+		 base_entity.h \
+		 error.h \
+		 player.h \
+		 track.h \
+		 camera.h \
+		 ini_parser.h \
+		 power_up.h \
+		 vector.h \
+		 keynames.h \
+		 proto_class.h \
+		 world.h \
+		 command_node.h \
+		 list.h \
+		 shoot_laser.h \
+		 world_entity.h \
+		 coordinates.h \
+		 message_structures.h \
+		 shoot_rocket.h \
+		 list_template.h \
+		 story_entity.h \
+		 story_def.h \
+		 game_loader.h \
+		 campaign.h
+
+EXTRA_DIST = orxonox.conf
+@HAVE_GTK2_FALSE@GTK_PROGS = 
+
+### GTK_RELATED
+@HAVE_GTK2_TRUE@GTK_PROGS = console
+SUBDIRS = . \
+	  importer \
+	  gui \
+	  $(GTK_PROGS)
+
+all: all-recursive
 
 .SUFFIXES:
@@ -184,7 +280,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
@@ -206,5 +302,5 @@
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	$(mkdir_p) $(DESTDIR)$(bindir)
+	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
 	@list='$(bin_PROGRAMS)'; for p in $$list; do \
 	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
@@ -212,6 +308,6 @@
 	  ; then \
 	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
-	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
 	  else :; fi; \
 	done
@@ -221,6 +317,6 @@
 	@list='$(bin_PROGRAMS)'; for p in $$list; do \
 	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
-	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
 	done
 
@@ -240,4 +336,5 @@
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_entity.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camera.Po@am__quote@
@@ -246,7 +343,11 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command_node.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data_tank.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/environment.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/game_loader.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ini_parser.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keynames.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/player.Po@am__quote@
@@ -274,5 +375,112 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+object.o: importer/object.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT object.o -MD -MP -MF "$(DEPDIR)/object.Tpo" -c -o object.o `test -f 'importer/object.cc' || echo '$(srcdir)/'`importer/object.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/object.Tpo" "$(DEPDIR)/object.Po"; else rm -f "$(DEPDIR)/object.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='importer/object.cc' object='object.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/object.Po' tmpdepfile='$(DEPDIR)/object.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 object.o `test -f 'importer/object.cc' || echo '$(srcdir)/'`importer/object.cc
+
+object.obj: importer/object.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT object.obj -MD -MP -MF "$(DEPDIR)/object.Tpo" -c -o object.obj `if test -f 'importer/object.cc'; then $(CYGPATH_W) 'importer/object.cc'; else $(CYGPATH_W) '$(srcdir)/importer/object.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/object.Tpo" "$(DEPDIR)/object.Po"; else rm -f "$(DEPDIR)/object.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='importer/object.cc' object='object.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/object.Po' tmpdepfile='$(DEPDIR)/object.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 object.obj `if test -f 'importer/object.cc'; then $(CYGPATH_W) 'importer/object.cc'; else $(CYGPATH_W) '$(srcdir)/importer/object.cc'; fi`
+
+array.o: importer/array.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT array.o -MD -MP -MF "$(DEPDIR)/array.Tpo" -c -o array.o `test -f 'importer/array.cc' || echo '$(srcdir)/'`importer/array.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/array.Tpo" "$(DEPDIR)/array.Po"; else rm -f "$(DEPDIR)/array.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='importer/array.cc' object='array.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/array.Po' tmpdepfile='$(DEPDIR)/array.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 array.o `test -f 'importer/array.cc' || echo '$(srcdir)/'`importer/array.cc
+
+array.obj: importer/array.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT array.obj -MD -MP -MF "$(DEPDIR)/array.Tpo" -c -o array.obj `if test -f 'importer/array.cc'; then $(CYGPATH_W) 'importer/array.cc'; else $(CYGPATH_W) '$(srcdir)/importer/array.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/array.Tpo" "$(DEPDIR)/array.Po"; else rm -f "$(DEPDIR)/array.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='importer/array.cc' object='array.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/array.Po' tmpdepfile='$(DEPDIR)/array.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 array.obj `if test -f 'importer/array.cc'; then $(CYGPATH_W) 'importer/array.cc'; else $(CYGPATH_W) '$(srcdir)/importer/array.cc'; fi`
+
+material.o: importer/material.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT material.o -MD -MP -MF "$(DEPDIR)/material.Tpo" -c -o material.o `test -f 'importer/material.cc' || echo '$(srcdir)/'`importer/material.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/material.Tpo" "$(DEPDIR)/material.Po"; else rm -f "$(DEPDIR)/material.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='importer/material.cc' object='material.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/material.Po' tmpdepfile='$(DEPDIR)/material.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 material.o `test -f 'importer/material.cc' || echo '$(srcdir)/'`importer/material.cc
+
+material.obj: importer/material.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT material.obj -MD -MP -MF "$(DEPDIR)/material.Tpo" -c -o material.obj `if test -f 'importer/material.cc'; then $(CYGPATH_W) 'importer/material.cc'; else $(CYGPATH_W) '$(srcdir)/importer/material.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/material.Tpo" "$(DEPDIR)/material.Po"; else rm -f "$(DEPDIR)/material.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='importer/material.cc' object='material.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/material.Po' tmpdepfile='$(DEPDIR)/material.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 material.obj `if test -f 'importer/material.cc'; then $(CYGPATH_W) 'importer/material.cc'; else $(CYGPATH_W) '$(srcdir)/importer/material.cc'; fi`
 uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -286,8 +494,21 @@
 tags: TAGS
 
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
 	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
@@ -296,9 +517,11 @@
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
-	test -z "$(ETAGS_ARGS)$$tags$$unique" \
-	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	     $$tags $$unique
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
 ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
@@ -349,18 +572,34 @@
 	  fi; \
 	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || mkdir "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="../$(top_distdir)" \
+	        distdir="../$(distdir)/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
 check-am: all-am
-check: check-am
+check: check-recursive
 all-am: Makefile $(PROGRAMS) $(HEADERS)
-installdirs:
-	$(mkdir_p) $(DESTDIR)$(bindir)
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
 
 install-am: all-am
 	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installcheck: installcheck-am
+installcheck: installcheck-recursive
 install-strip:
 	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
@@ -378,9 +617,9 @@
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
+clean: clean-recursive
 
 clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
 
-distclean: distclean-am
+distclean: distclean-recursive
 	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
@@ -388,11 +627,11 @@
 	distclean-tags
 
-dvi: dvi-am
+dvi: dvi-recursive
 
 dvi-am:
 
-html: html-am
-
-info: info-am
+html: html-recursive
+
+info: info-recursive
 
 info-am:
@@ -402,5 +641,5 @@
 install-exec-am: install-binPROGRAMS
 
-install-info: install-info-am
+install-info: install-info-recursive
 
 install-man:
@@ -408,18 +647,18 @@
 installcheck-am:
 
-maintainer-clean: maintainer-clean-am
+maintainer-clean: maintainer-clean-recursive
 	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
-mostlyclean: mostlyclean-am
+mostlyclean: mostlyclean-recursive
 
 mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-pdf: pdf-am
+pdf: pdf-recursive
 
 pdf-am:
 
-ps: ps-am
+ps: ps-recursive
 
 ps-am:
@@ -427,17 +666,22 @@
 uninstall-am: uninstall-binPROGRAMS uninstall-info-am
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
-	clean-generic ctags distclean distclean-compile \
-	distclean-generic distclean-tags distdir dvi dvi-am html \
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+	clean clean-binPROGRAMS clean-generic clean-recursive ctags \
+	ctags-recursive distclean distclean-compile distclean-generic \
+	distclean-recursive distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-binPROGRAMS \
 	install-data install-data-am install-exec install-exec-am \
 	install-info install-info-am install-man install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-	uninstall-am uninstall-binPROGRAMS uninstall-info-am
-
-
-#  uncomment the following if bencoder requires the math library
+	installcheck installcheck-am installdirs installdirs-am \
+	maintainer-clean maintainer-clean-generic \
+	maintainer-clean-recursive mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \
+	tags tags-recursive uninstall uninstall-am \
+	uninstall-binPROGRAMS uninstall-info-am
+
+
+#  uncomment the following if orxonox requires the math library
 #orxonox_LDADD=-lm
 
Index: orxonox/branches/sound/src/ability.h
===================================================================
--- orxonox/branches/sound/src/ability.h	(revision 3179)
+++ orxonox/branches/sound/src/ability.h	(revision 3238)
@@ -1,5 +1,5 @@
 
-#ifndef ABILITY_H
-#define ABILITY_H
+#ifndef _ABILITY_H
+#define _ABILITY_H
 
 #include "data_tank.h"
@@ -14,3 +14,3 @@
 };
 
-#endif
+#endif /* _ABILITY_H */
Index: orxonox/branches/sound/src/ai.h
===================================================================
--- orxonox/branches/sound/src/ai.h	(revision 3179)
+++ orxonox/branches/sound/src/ai.h	(revision 3238)
@@ -1,5 +1,5 @@
 
-#ifndef AI_H
-#define AI_H
+#ifndef _AI_H
+#define _AI_H
 
 #include "data_tank.h"
@@ -13,3 +13,3 @@
 };
 
-#endif
+#endif /* _AI_H */
Index: orxonox/branches/sound/src/base_entity.h
===================================================================
--- orxonox/branches/sound/src/base_entity.h	(revision 3179)
+++ orxonox/branches/sound/src/base_entity.h	(revision 3238)
@@ -1,5 +1,5 @@
 
-#ifndef BASE_ENTITY_H
-#define BASE_ENTITY_H
+#ifndef _BASE_ENTITY_H
+#define _BASE_ENTITY_H
 
 #include "stdincl.h"
@@ -14,3 +14,3 @@
 };
 
-#endif
+#endif /* _BASE_ENTITY_H */
Index: orxonox/branches/sound/src/camera.cc
===================================================================
--- orxonox/branches/sound/src/camera.cc	(revision 3179)
+++ orxonox/branches/sound/src/camera.cc	(revision 3238)
@@ -30,19 +30,19 @@
 {
   this->world = world;
-  bound = NULL;
+  this->bound = NULL;
   /* give it some physical live */
-  m = 10;
-  a = new Vector(0.0, 0.0, 0.0);
-  v = new Vector(0.0, 0.0, 0.0);
-  fs = new Vector(0.0, 0.0, 0.0);
-  cameraMode = NORMAL;
-  deltaTime = 3000.0;
-  cameraOffset = 1.0;
-  cameraOffsetZ = 10.0;
-  t = 0.0;
-
-  actual_place.r.x = 0.0;
-  actual_place.r.y = 10.0;
-  actual_place.r.z = -5.0;
+  this->m = 10;
+  this->a = new Vector(0.0, 0.0, 0.0);
+  this->v = new Vector(0.0, 0.0, 0.0);
+  this->fs = new Vector(0.0, 0.0, 0.0);
+  this->cameraMode = NORMAL;
+  this->deltaTime = 3000.0;
+  this->cameraOffset = 1.0;
+  this->cameraOffsetZ = 10.0;
+  this->t = 0.0;
+
+  this->actualPlace.r.x = 0.0;
+  this->actualPlace.r.y = 10.0;
+  this->actualPlace.r.z = -5.0;
 }
 
@@ -61,11 +61,11 @@
    as smooth camera movement or swaying).
 */
-void Camera::time_slice (Uint32 deltaT)
-{
-  if(t <= deltaTime)
-    {t += deltaT;}
+void Camera::timeSlice (Uint32 deltaT)
+{
+  if( this->t <= deltaTime)
+    {this->t += deltaT;}
   //printf("time is: t=%f\n", t );
-  update_desired_place ();
-  jump (NULL);
+  updateDesiredPlace();
+  jump(NULL);
 }
 
@@ -76,5 +76,5 @@
    bound entity's position on the track.
 */
-void Camera::update_desired_place ()
+void Camera::updateDesiredPlace ()
 {
   switch(cameraMode)
@@ -89,6 +89,6 @@
 	if( bound != NULL)
 	  {
-	    bound->get_lookat (&lookat);
-	    orx->get_world()->calc_camera_pos (&lookat, &plFocus);
+	    bound->getLookat (&lookat);
+	    orx->getWorld()->calcCameraPos (&lookat, &plFocus);
 	    Quaternion *fr;
 	    if(t < 20.0)
@@ -101,5 +101,5 @@
 		
 		Vector op(1.0, 0.0, 0.0);
-		float angle = angle_deg(op, *start);
+		float angle = angleDeg(op, *start);
 		printf("angle is: %f\n", angle);
 
@@ -144,7 +144,7 @@
 
 	    Vector ursp(0.0, 0.0, 0.0);
-	    desired_place.r = /*plFocus.r -*/ ursp - res->apply(r); 
-
-	    printf("desired place is: %f, %f, %f\n", desired_place.r.x, desired_place.r.y, desired_place.r.z);
+	    desiredPlace.r = /*plFocus.r -*/ ursp - res->apply(r); 
+
+	    printf("desired place is: %f, %f, %f\n", desiredPlace.r.x, desiredPlace.r.y, desiredPlace.r.z);
 	    //plLastBPlace = *bound->get_placement();
 	  } 
@@ -153,12 +153,12 @@
     case SMOTH_FOLLOW:
       {
-	Placement *plBound = bound->get_placement();
+	Placement *plBound = bound->getPlacement();
 	Location lcBound;
 	if(bound != null)
 	  {
-	    bound->get_lookat(&lcBound);
+	    bound->getLookat(&lcBound);
 	    Vector vDirection(0.0, 0.0, 1.0);
 	    vDirection = plBound->w.apply(vDirection);
-	    desired_place.r = (vDirection * ((lcBound.dist-10.0)/* / l*/)) + Vector(0,0,5.0);
+	    desiredPlace.r = (vDirection * ((lcBound.dist-10.0)/* / l*/)) + Vector(0,0,5.0);
 	  }
 	break;
@@ -169,9 +169,9 @@
 	if(bound != null)
 	  {
-	    Placement *plBound = bound->get_placement();
+	    Placement *plBound = bound->getPlacement();
 	    Vector vDirection(0.0, 0.0, 1.0);
 	    Vector eclipticOffset(0.0, 0.0, 5.0);
 	    vDirection = plBound->w.apply(vDirection);
-	    desired_place.r = plBound->r - vDirection*10 + eclipticOffset;
+	    desiredPlace.r = plBound->r - vDirection*10 + eclipticOffset;
 	  }
 	break;
@@ -182,11 +182,11 @@
       if( bound != NULL && world != NULL )
 	{
-	  bound->get_lookat (&lookat);
-	  world->calc_camera_pos (&lookat, &desired_place);
+	  bound->getLookat (&lookat);
+	  world->calcCameraPos (&lookat, &desiredPlace);
 	} 
       else
 	{
-	  desired_place.r = Vector (0,0,0);
-	  desired_place.w = Quaternion (); 
+	  desiredPlace.r = Vector (0,0,0);
+	  desiredPlace.w = Quaternion (); 
 	}
       break;
@@ -206,5 +206,7 @@
   // view
   // TO DO: implement options for frustum generation
-  glFrustum(-1.0, 1.0, -1.0, 1.0, 1.5, 250.0);
+  //glFrustum(-1.0, 1.0, -1.0, 1.0, 1.5, 250.0);
+  gluPerspective(60, 1.2f, 0.1, 250);
+  
   //Vector up(0,0,1);
   //Vector dir(1,0,0);
@@ -235,14 +237,14 @@
   // rotation
   float matrix[4][4];
-  actual_place.w.conjugate().matrix (matrix);
+  actualPlace.w.conjugate().matrix (matrix);
   /* orientation and */
   glMultMatrixf ((float*)matrix);
   /*  translation */
-  glTranslatef (-actual_place.r.x, -actual_place.r.y,- actual_place.r.z);
-  //Placement *plBound = bound->get_placement();
+  glTranslatef (-actualPlace.r.x, -actualPlace.r.y,- actualPlace.r.z);
+//Placement *plBound = bound->get_placement();
 
   // ===== second camera control calculation option
   /*
-    gluLookAt(actual_place.r.x, actual_place.r.y, actual_place.r.z, 
+   gluLookAt(actual_place.r.x, actual_place.r.y, actual_place.r.z, 
               plBound->r.x, plBound->r.y, plBound->r.z,
               0.0, 0.0, 1.0);
@@ -263,11 +265,11 @@
   if( plc == NULL)
     {
-      actual_place = desired_place;
+      actualPlace = desiredPlace;
       //printf("Camera|jump: camer@ %f, %f, %f\n\n", actual_place.r.x, actual_place.r.y, actual_place.r.z);
     }
   else
     {
-      desired_place = *plc;
-      actual_place = *plc;
+      desiredPlace = *plc;
+      actualPlace = *plc;
     }
 }
@@ -277,7 +279,7 @@
   \param entity: The enitity to bind the camera to
 	
-	This sets the focus of the camera to the given entity. This means that it will use the given WorldEntity's
-	Location and get_lookat() to determine the viewpoint the camera will render from.
-	Note that you cannot bind a camera to a free entity.
+  This sets the focus of the camera to the given entity. This means that it will use the given WorldEntity's
+  Location and get_lookat() to determine the viewpoint the camera will render from.
+  Note that you cannot bind a camera to a free entity.
 */
 void Camera::bind (WorldEntity* entity)
@@ -285,8 +287,8 @@
   if( entity != NULL)
     {
-      if( entity->isFree ()) printf("Cannot bind camera to free entity");
+      if( entity->isFree()) printf("Cannot bind camera to free entity");
       else 
 	{
-	  bound = entity;
+	  this->bound = entity;
 	}
     } 
@@ -298,2 +300,13 @@
   this->world = world;
 }
+
+
+/**
+   \brief destroy, reset the camera so that it doesn't perform anything anymore
+
+*/
+void Camera::destroy()
+{
+  this->bound = NULL;
+  this->world = NULL;
+}
Index: orxonox/branches/sound/src/camera.h
===================================================================
--- orxonox/branches/sound/src/camera.h	(revision 3179)
+++ orxonox/branches/sound/src/camera.h	(revision 3238)
@@ -4,6 +4,6 @@
 */ 
 
-#ifndef CAMERA_H
-#define CAMERA_H
+#ifndef _CAMERA_H
+#define _CAMERA_H
 
 #include "stdincl.h"
@@ -26,6 +26,6 @@
  private:
   WorldEntity* bound;		//!< the WorldEntity the Camera is bound to
-  Placement actual_place;	        //!< the Camera's current position
-  Placement desired_place;        //!< where the Camera should be according to calculations
+  Placement actualPlace;	        //!< the Camera's current position
+  Placement desiredPlace;        //!< where the Camera should be according to calculations
   World* world;
   
@@ -54,5 +54,5 @@
   CAMERA_MODE cameraMode; //!< saves the camera mode: how the camera follows the entity
   
-  void update_desired_place ();
+  void updateDesiredPlace ();
   
  public:
@@ -60,8 +60,9 @@
   ~Camera ();
   
-  void time_slice (Uint32 deltaT);
+  void timeSlice (Uint32 deltaT);
   void apply ();
   void bind (WorldEntity* entity);
   void jump (Placement* plc);
+  void destroy();
 
   void setWorld(World* world);  
@@ -69,3 +70,3 @@
 };
 
-#endif
+#endif /* _CAMERA_H */
Index: orxonox/branches/sound/src/campaign.cc
===================================================================
--- orxonox/branches/sound/src/campaign.cc	(revision 3179)
+++ orxonox/branches/sound/src/campaign.cc	(revision 3238)
@@ -27,5 +27,5 @@
 Campaign::Campaign () 
 {
-  this->entities = new List<StoryEntity>();
+  this->entities = new ListTemplate<StoryEntity>();
   this->isInit = false;
 }
@@ -34,5 +34,5 @@
 
 
-Error Campaign::init()
+ErrorMessage Campaign::init()
 {
   this->isInit = true;
@@ -48,5 +48,5 @@
     want to queue up in the campaign.
 */
-void Campaign::addEntity(StoryEntity* se, Uint32 storyID)
+void Campaign::addEntity(StoryEntity* se, int storyID)
 {
   se->setStoryID(storyID);
@@ -60,5 +60,5 @@
 
 
-void Campaign::removeEntity(Uint32 storyID)
+void Campaign::removeEntity(int storyID)
 {
   this->removeEntity(this->getStoryEntity(storyID));
@@ -73,37 +73,45 @@
 
 
-Error Campaign::start()
+ErrorMessage Campaign::start()
 {
   this->start(0);
 }
 
-Error Campaign::start(Uint32 storyID = 0)
+ErrorMessage Campaign::start(int storyID = 0)
 {
   printf("World::start() - starting new StoryEntity Nr:%i\n", storyID);
-  Error errorCode;
-  if(!this->isInit) return errorCode; 
-  if(storyID == WORLD_ID_GAMEEND) return errorCode;
+  ErrorMessage errorCode;
+  if( !this->isInit) return errorCode; 
+  if( storyID == WORLD_ID_GAMEEND) return errorCode;
   this->running = true;
   StoryEntity* se = this->getStoryEntity(storyID);
-  while(se != NULL && this->running)
+  this->currentEntity = se;
+  while( se != NULL && this->running)
     {
-      se = this->getStoryEntity(storyID);
-      this->currentEntity = se;
-      
-      se->displayEntityScreen();
+      se->displayLoadScreen();
       se->load();
       se->init();
-      se->releaseEntityScreen();
+      se->releaseLoadScreen();
       se->start();
+      se->destroy();
+     
+      delete se;
 
       int nextWorldID = se->getNextStoryID();
-      if(nextWorldID == WORLD_ID_GAMEEND) return errorCode;
+      //printf("Campaing::start() - got nextWorldID = %i\n", nextWorldID);
       se = this->getStoryEntity(nextWorldID);
-      if(se == NULL)
-	printf("Campaign::start() - ERROR: world it not found, oh oh...");
+      this->currentEntity = se;
+      if( ( nextWorldID == WORLD_ID_GAMEEND) ||( se == NULL) ) 
+	{
+	  printf("Campaign::start() - quitting campaing story loop\n");
+	  if(se != NULL)
+	    delete se;
+	  return errorCode;
+	}
+      
     }
 }
 
-Error Campaign::stop()
+ErrorMessage Campaign::stop()
 {
   this->running = false;
@@ -111,10 +119,10 @@
     {
       this->currentEntity->stop();
-      delete this->currentEntity;
-      this->currentEntity = NULL;
+      //delete this->currentEntity;
+      //this->currentEntity = NULL;
     }
 }
 
-Error Campaign::pause()
+ErrorMessage Campaign::pause()
 {
   if(this->currentEntity != NULL)
@@ -123,5 +131,5 @@
 
 
-Error Campaign::resume()
+ErrorMessage Campaign::resume()
 {
   if(this->currentEntity != NULL)
@@ -130,27 +138,59 @@
 
 
+void Campaign::destroy()
+{
+  if(this->currentEntity != NULL)
+    {
+      this->currentEntity->destroy();
+      delete this->currentEntity;
+      this->currentEntity = NULL;
+    }
+}
+
+/*
+  \brief this changes to the next level
+*/
 void Campaign::nextLevel()
 {
-  printf("Campaign|nextLevel\n");
-  int nextID = this->currentEntity->getNextStoryID();
-  this->stop();
-  this->start(nextID);
+  printf("Campaign:nextLevel()\n");
+  //int nextID = this->currentEntity->getNextStoryID();
+  //this->stop();
+  //this->start(nextID);
+  this->currentEntity->stop();
 }
 
+/*
+  \brief change to the previous level - not implemented
+
+  this propably useless
+*/
 void Campaign::previousLevel()
 {}
 
 
-StoryEntity* Campaign::getStoryEntity(Uint32 storyID)
+/*
+  \brief lookup a entity with a given id
+  \param story id to be lookuped
+  \returns the entity found or NULL if search ended without match
+*/
+StoryEntity* Campaign::getStoryEntity(int storyID)
 {
-  List<StoryEntity>* l;
-  StoryEntity* entity;
-  l = this->entities->get_next();  
+  //printf("Campaing::getStoryEntity(%i) - getting next Entity\n", storyID);
+  if( storyID == WORLD_ID_GAMEEND)
+    return NULL;
+  ListTemplate<StoryEntity>* l;
+  StoryEntity* entity = NULL;
+  l = this->entities->getNext();  
   while( l != NULL) 
     { 
-      entity = l->get_object();
-      l = l->get_next();
-      if(entity->getStoryID() == storyID)
-	return entity;
+      entity = l->getObject();
+      l = l->getNext();
+      int id = entity->getStoryID();
+      //printf("Campaing::getStoryEntity() - now looping, found entity nr=%i\n", id);
+      if(id == storyID)
+	{
+	  //printf("Campaing::getStoryEntity() - yea, this is what we where looking for: %id\n");
+	  return entity;
+	}
     }
   return NULL;
Index: orxonox/branches/sound/src/campaign.h
===================================================================
--- orxonox/branches/sound/src/campaign.h	(revision 3179)
+++ orxonox/branches/sound/src/campaign.h	(revision 3238)
@@ -1,5 +1,5 @@
 
-#ifndef CAMPAIGN_H
-#define CAMPAIGN_H
+#ifndef _CAMPAIGN_H
+#define _CAMPAIGN_H
 
 #include "stdincl.h"
@@ -17,14 +17,16 @@
   StoryEntity* currentEntity;
 
-  virtual Error init();
-  virtual Error start();
-  virtual Error start(Uint32 storyID);
-  virtual Error stop();
-  virtual Error pause();
-  virtual Error resume();
+  virtual ErrorMessage init();
+  virtual ErrorMessage start();
+  virtual ErrorMessage start(int storyID);
+  virtual ErrorMessage stop();
+  virtual ErrorMessage pause();
+  virtual ErrorMessage resume();
 
-  void addEntity(StoryEntity* se, Uint32 storyID);
+  virtual void destroy();
+
+  void addEntity(StoryEntity* se, int storyID);
   void addEntity(StoryEntity* se);
-  void removeEntity(Uint32 storyID);
+  void removeEntity(int storyID);
   void removeEntity(StoryEntity* se);
   
@@ -33,9 +35,9 @@
 
  private:
-  List<StoryEntity>* entities;
+  ListTemplate<StoryEntity>* entities;
   bool running;
 
-  StoryEntity* getStoryEntity(Uint32 storyID);
+  StoryEntity* getStoryEntity(int storyID);
 };
 
-#endif
+#endif /* _CAMPAIGN_H */
Index: orxonox/branches/sound/src/collision.cc
===================================================================
--- orxonox/branches/sound/src/collision.cc	(revision 3179)
+++ orxonox/branches/sound/src/collision.cc	(revision 3238)
@@ -28,5 +28,5 @@
 CollisionCluster::CollisionCluster (float rad = 1.0, Vector mid = Vector(0,0,0))
 {
-  root = (CC_Tree*) malloc( sizeof( CC_Tree));
+  root = (CCTree*) malloc( sizeof( CCTree));
   root->n = 0;
   root->data.ID = 0;
@@ -62,5 +62,5 @@
   }
   
-  root = load_CC_Tree (stream);
+  root = loadCCTree (stream);
   fclose (stream);
 }
@@ -71,5 +71,5 @@
 CollisionCluster::~CollisionCluster ()
 {
-  free_CC_Tree( root);
+  freeCCTree(root);
 }
 
@@ -85,5 +85,5 @@
   stream = fopen( filename, "wb");
   if( stream == NULL) return -1;
-  r = save_CC_Tree (root, stream);
+  r = saveCCTree(root, stream);
   fclose (stream);
   return r;
@@ -99,10 +99,10 @@
    \return true on collision, false otherwise. If true is returned, the flag in ahitflags that symbolises the hit subsphere is set, and impactpoint is set to the Location where the intersection occured
 */
-bool check_trace (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Line* trace, Vector* impactpoint)
-{
-	CC_Tree* t;
+bool checkTrace (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Line* trace, Vector* impactpoint)
+{
+	CCTree* t;
 	if( (t = a->root) == NULL) return false;
 	
-  return cctree_trace( pa, t, ahitflags, trace, impactpoint);
+  return ccTreeTrace( pa, t, ahitflags, trace, impactpoint);
 }
 
@@ -118,11 +118,11 @@
    If true is returned, all flags in ahitflags and bhitflags that symbolize intersecting subspheres in the respective CollisionCluster are set
 */
-bool check_collision (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Placement* pb, const CollisionCluster* b, unsigned long* bhitflags)
-{
-  CC_Tree* ta, *tb;
+bool checkCollision (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Placement* pb, const CollisionCluster* b, unsigned long* bhitflags)
+{
+  CCTree* ta, *tb;
   if( (ta = a->root) == NULL) return false;
   if( (tb = b->root) == NULL) return false;
   
-  return cctree_iterate(pa, ta, ahitflags, pb, tb, bhitflags);
+  return ccTreeIterate(pa, ta, ahitflags, pb, tb, bhitflags);
 }
 
@@ -135,5 +135,5 @@
    \return true on intersection, false otherwise
 */
-bool sphere_sphere_collision( Vector m1, float r1, Vector m2, float r2)
+bool sphereSphereCollision( Vector m1, float r1, Vector m2, float r2)
 {
   if ((m1-m2).len() < r1+r2) return true;
@@ -149,5 +149,5 @@
    \return true on intersection, false otherwise. If true is returned, impactpoint is set to the loaction where the intersection occured
 */
-bool trace_sphere_collision( Vector m, float r, const Line* l, Vector* impactpoint)
+bool traceSphereCollision( Vector m, float r, const Line* l, Vector* impactpoint)
 {
   float A, B, C, D, t[2];
@@ -176,5 +176,5 @@
 }
 
-bool cctree_iterate(const Placement* pa, CC_Tree* ta, unsigned long* ahitflags, const Placement* pb, CC_Tree* tb, unsigned long* bhitflags)
+bool ccTreeIterate(const Placement* pa, CCTree* ta, unsigned long* ahitflags, const Placement* pb, CCTree* tb, unsigned long* bhitflags)
 {
   bool r = false;
@@ -182,9 +182,9 @@
   Vector mra = pa->r + pa->w.apply(ta->m);
   Vector mrb = pb->r + pb->w.apply(tb->m);
-  CC_Tree* use_a, *use_b;
-  
-  if( use_a == NULL || use_b == NULL) return false;
-  
-  if( sphere_sphere_collision( mra, ta->r, mrb, tb->r))
+  CCTree* useA, *useB;
+  
+  if( useA == NULL || useB == NULL) return false;
+  
+  if( sphereSphereCollision( mra, ta->r, mrb, tb->r))
   {
     if( ta->n == 0 && tb->n == 0)
@@ -196,12 +196,12 @@
     for( ia = 0; ia < ta->n || ta->n == 0; ia++)
     {
-      if( ta->n == 0) use_a = ta;
-      else use_a = ta->data.b[ia];
+      if( ta->n == 0) useA = ta;
+      else useA = ta->data.b[ia];
       for( ib = 0; ib < tb->n || ta->n == 0; ib++)
       {
-        if( ta->n == 0) use_b = ta;
-        else use_b = ta->data.b[ib];
+        if( ta->n == 0) useB = ta;
+        else useB = ta->data.b[ib];
         
-        r = r || cctree_iterate( pa, use_a, ahitflags, pb, use_b, bhitflags);
+        r = r || ccTreeIterate( pa, useA, ahitflags, pb, useB, bhitflags);
         
         if( tb->n == 0) break;
@@ -233,12 +233,12 @@
 
 /**
-   \brief frees the memory allocated in a CC_Tree
-*/
-void free_CC_Tree( CC_Tree* tree)
+   \brief frees the memory allocated in a CCTree
+*/
+void freeCCTree( CCTree* tree)
 {
   if (tree == NULL) return;
   for (int i = 0; i < tree->n; i++)
   {
-    free_CC_Tree( tree->data.b[i]);
+    freeCCTree(tree->data.b[i]);
   }
   free( tree);
@@ -246,10 +246,10 @@
 
 /**
-   \brief loads a CC_Tree from a stream
-*/
-CC_Tree* load_CC_Tree (FILE* stream)
-{
-  CC_Tree* tree = NULL;
-  CC_Tree** branches = NULL;
+   \brief loads a CCTree from a stream
+*/
+CCTree* loadCCTree (FILE* stream)
+{
+  CCTree* tree = NULL;
+  CCTree** branches = NULL;
   float buf[4];
   unsigned long n;
@@ -267,13 +267,13 @@
   else
   {
-    branches = (CC_Tree**)malloc( sizeof(CC_Tree*) * n);
+    branches = (CCTree**)malloc( sizeof(CCTree*) * n);
     for( int i = 0; i < n; i++)
     {
-      if ((branches[i] = load_CC_Tree (stream)) == NULL)
+      if ((branches[i] = loadCCTree (stream)) == NULL)
       {
         for( int j = 0; j < i; j++)
         {
-          free_CC_Tree (branches[j]);
-          free (branches);
+          freeCCTree (branches[j]);
+          free(branches);
           return NULL;
         }
@@ -283,5 +283,5 @@
   
   // assemble
-  tree = (CC_Tree*) malloc (sizeof(CC_Tree));
+  tree = (CCTree*) malloc (sizeof(CCTree));
   tree->m.x = buf[0];
   tree->m.y = buf[1];
@@ -297,7 +297,7 @@
 
 /**
-   \brief saves a CC_Tree to a stream
-*/
-int save_CC_Tree (CC_Tree* tree, FILE* stream)
+   \brief saves a CCTree to a stream
+*/
+int saveCCTree (CCTree* tree, FILE* stream)
 {
   float buf[4];
@@ -321,5 +321,5 @@
     for( int i = 0; i < tree->n; i++)
     {
-      if ( save_CC_Tree (tree->data.b[i], stream) == -1) return -1;
+      if ( saveCCTree (tree->data.b[i], stream) == -1) return -1;
     }
   }
@@ -329,14 +329,14 @@
 }
 
-bool cctree_trace( const Placement* p, CC_Tree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint)
+bool ccTreeTrace( const Placement* p, CCTree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint)
 {
   bool r = false;
   int i;
   Vector mr = p->r + p->w.apply (t->m);
-  CC_Tree* use_t;
+  CCTree* useT;
   Vector* ips;
   unsigned long* hfs;
   
-  if( trace_sphere_collision (mr, t->r, trace, impactpoint))
+  if( traceSphereCollision (mr, t->r, trace, impactpoint))
   {
   	if( t->n == 0)
@@ -352,5 +352,5 @@
   		for (i = 0; i < t->n; i++)
   		{
-  			r = r || cctree_trace (p, t->data.b[i], &(hfs[i]), trace, &(ips[i]));
+  			r = r || ccTreeTrace (p, t->data.b[i], &(hfs[i]), trace, &(ips[i]));
   		}
   		if( r)
Index: orxonox/branches/sound/src/collision.h
===================================================================
--- orxonox/branches/sound/src/collision.h	(revision 3179)
+++ orxonox/branches/sound/src/collision.h	(revision 3238)
@@ -4,6 +4,6 @@
 */ 
 
-#ifndef COLLISION_H
-#define COLLISION_H
+#ifndef _COLLISION_H
+#define _COLLISION_H
 
 #include "vector.h"
@@ -14,15 +14,15 @@
 
 //! Tree structure used by the CollisionCluster
-typedef struct CC_Tree
+typedef struct CCTree
 {
   unsigned long n;
   union
   {
-  struct CC_Tree** b;
+  struct CCTree** b;
   unsigned long ID;
   } data;
   float r;
   Vector m;
-} CC_Tree;
+} CCTree;
 
 //! Basic collision detection class
@@ -42,5 +42,5 @@
 class CollisionCluster {
   
-  CC_Tree* root;
+  CCTree* root;
   
   
@@ -52,18 +52,18 @@
   int store (char* filename);
   
-  friend bool cctree_trace( const Placement* p, CC_Tree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint);
-  friend bool cctree_iterate(const Placement* pa, CC_Tree* ta, unsigned long* ahitflags, const Placement* pb, CC_Tree* tb, unsigned long* bhitflags);
-  friend bool check_trace (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Line* trace, Vector* impactpoint);
-  friend bool check_collision (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Placement* pb, const CollisionCluster* b, unsigned long* bhitflags);
+  friend bool ccTreeTrace( const Placement* p, CCTree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint);
+  friend bool ccTreeIterate(const Placement* pa, CCTree* ta, unsigned long* ahitflags, const Placement* pb, CCTree* tb, unsigned long* bhitflags);
+  friend bool checkTrace (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Line* trace, Vector* impactpoint);
+  friend bool checkCollision (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Placement* pb, const CollisionCluster* b, unsigned long* bhitflags);
 };
 
-bool sphere_sphere_collision( Vector m1, float r1, Vector m2, float r2);
-bool trace_sphere_collision( Vector m, float r, const Line* l, Vector* impactpoint);
+bool sphereSphereCollision( Vector m1, float r1, Vector m2, float r2);
+bool traceSphereCollision( Vector m, float r, const Line* l, Vector* impactpoint);
 
 void setflag( unsigned long* flags, unsigned long ID);
 
-void free_CC_Tree( CC_Tree* tree);
-CC_Tree* load_CC_Tree (FILE* stream);
-int save_CC_Tree (CC_Tree* tree, FILE* stream);
+void freeCCTree( CCTree* tree);
+CCTree* loadCCTree (FILE* stream);
+int saveCCTree (CCTree* tree, FILE* stream);
 
-#endif
+#endif /* _COLLISION_H */
Index: orxonox/branches/sound/src/command_node.cc
===================================================================
--- orxonox/branches/sound/src/command_node.cc	(revision 3179)
+++ orxonox/branches/sound/src/command_node.cc	(revision 3238)
@@ -11,5 +11,5 @@
    ### File Specific:
    main-programmer: Christian Meyer
-   co-programmer: ...
+   co-programmer: Patrick Boenzli
 */
 
@@ -20,4 +20,5 @@
 #include "world_entity.h"
 #include "game_loader.h"
+#include "world.h"
 
 #include <stdio.h>
@@ -33,8 +34,10 @@
 CommandNode::CommandNode (int ID)
 {
-  bound = new List<WorldEntity>();
-  aliases = NULL;
-  netID = ID;
-  bLocalInput = false;
+  this->bound = new tList<WorldEntity>();
+  this->aliases = NULL;
+  this->netID = ID;
+  this->bLocalInput = false;
+  this->bEnabled = true;
+  this->world = NULL;
 }
 
@@ -45,9 +48,11 @@
 CommandNode::CommandNode (char* filename = DEFAULT_KEYBIND_FILE)
 {
-  aliases = NULL;
-  bLocalInput = true;
-  netID = 0;
-  bound = new List<WorldEntity>();
-  load_bindings (filename);
+  this->aliases = NULL;
+  this->bLocalInput = true;
+  this->netID = 0;
+  this->bound = new tList<WorldEntity>();
+  this->bEnabled = true;
+  this->world = NULL;
+  this->loadBindings (filename);
 }
 
@@ -58,6 +63,44 @@
 {
   if( aliases != NULL) free (aliases);
-  if( bound != NULL) delete bound;
-}
+  if( bound != NULL) delete bound; /* \todo should this delete bound? dangerous FIX */
+}
+
+
+/**
+  \brief this resets the command node
+
+   deleting all data contained in the command node to fill it up again
+
+  \todo coppling to different game-entities
+  \todo reset/destroy has to be redesigned
+*/
+
+void CommandNode::reset()
+{
+  this->bound->destroy();
+  //this->bound = NULL; /* \todo this produces a NULLpointer error.. FIX */
+  this->bEnabled = false;
+  this->world = NULL;
+}
+
+void CommandNode::enable(bool bEnabled)
+{
+  this->bEnabled = bEnabled;
+}
+
+
+/**
+  \brief adds Node to a GameWorld
+
+   this is usefull, if you want to catch events in a world class. usualy
+   this is done automaticaly via GameLoader. Reset it via 
+   CommandNode::reset()
+
+*/
+void CommandNode::addToWorld(World* world)
+{
+  this->world = world;
+}
+
 
 /**
@@ -65,5 +108,5 @@
    \param filename: The path and name of the file to load the bindings from
 */
-void CommandNode::load_bindings (char* filename)
+void CommandNode::loadBindings (char* filename)
 {
   FILE* stream;
@@ -82,5 +125,5 @@
   // create parser
   IniParser parser (filename);
-  if( parser.get_section ("Bindings") == -1)
+  if( parser.getSection ("Bindings") == -1)
     {
       printf("Could not find key bindings in %s\n", filename);
@@ -96,15 +139,15 @@
   int* index;
   
-  while( parser.next_var (namebuf, valuebuf) != -1)
-    {
-      index = name_to_index (namebuf);
+  while( parser.nextVar (namebuf, valuebuf) != -1)
+    {
+      index = nameToIndex (namebuf);
       switch( index[0])
 	{
 	case 0:
-	  printf("Key binding %d(%s) set to %s\n", index[1], SDLK_to_keyname( index[1]), valuebuf);
+	  printf("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), valuebuf);
 	  strcpy (aliases->keys[index[1]], valuebuf);
 	  break;
 	case 1:
-	  printf("Button binding %d(%s) set to %s\n", index[1], SDLB_to_buttonname( index[1]), valuebuf);
+	  printf("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), valuebuf);
 	  strcpy (aliases->buttons[index[1]], valuebuf);
 	  break;
@@ -123,5 +166,5 @@
 void CommandNode::bind (WorldEntity* entity)
 {
-  bound->add (entity, LIST_ADD_NEXT, true);
+  bound->add (entity);
 }
 
@@ -132,18 +175,18 @@
 void CommandNode::unbind (WorldEntity* entity)
 {
-  bound->remove (entity, LIST_FIND_FW);
-}
-
-int* CommandNode::name_to_index (char* name)
+  bound->remove (entity);
+}
+
+int* CommandNode::nameToIndex (char* name)
 {
   coord[0] = -1;
   coord[1] = -1;
   int c;
-  if( (c = keyname_to_SDLK (name)) != -1)
+  if( (c = keynameToSDLK (name)) != -1)
     {
       coord[1] = c;
       coord[0] = 0;
     }
-  if( (c = buttonname_to_SDLB (name)) != -1)
+  if( (c = buttonnameToSDLB (name)) != -1)
     {
       coord[1] = c;
@@ -158,13 +201,15 @@
 void CommandNode::process ()
 {
-  if( bLocalInput) process_local ();
-  else process_network ();
-}
-
-void CommandNode::process_local ()
+  if( this->bEnabled) 
+    {
+      if( bLocalInput) processLocal ();
+      else processNetwork ();
+    }
+}
+
+void CommandNode::processLocal ()
 {
   SDL_Event event;
   Command cmd;
-  
   while( SDL_PollEvent (&event))
     {
@@ -175,10 +220,10 @@
 	  strcpy (cmd.cmd, aliases->keys[event.key.keysym.sym]);
 	  cmd.bUp = false;
-	  if( strlen (cmd.cmd) > 0) relay (&cmd);
+	  if( strlen (cmd.cmd) > 0) relay(&cmd);
 	  break;
 	case SDL_KEYUP:
 	  strcpy( cmd.cmd, aliases->keys[event.key.keysym.sym]);
 	  cmd.bUp = true;
-	  if( strlen (cmd.cmd) > 0) relay (&cmd);
+	  if( strlen (cmd.cmd) > 0) relay(&cmd);
 	  break;
 	case SDL_MOUSEMOTION:
@@ -192,10 +237,10 @@
 	  strcpy( cmd.cmd, aliases->buttons[event.button.button]);
 	  cmd.bUp = true;
-	  if( strlen (cmd.cmd) > 0) relay (&cmd);
+	  if( strlen (cmd.cmd) > 0) relay(&cmd);
 	  break;
 	case SDL_MOUSEBUTTONDOWN:
 	  strcpy( cmd.cmd, aliases->buttons[event.button.button]);
 	  cmd.bUp = false;
-	  if( strlen (cmd.cmd) > 0) relay (&cmd);
+	  if( strlen (cmd.cmd) > 0) relay(&cmd);
 	  break;
 	case SDL_JOYAXISMOTION:
@@ -207,6 +252,5 @@
 	default:
 	  Orxonox *orx = Orxonox::getInstance();
-	  orx->event_handler (&event);
-	  
+	  orx->eventHandler(&event);
 	  break;
 	}
@@ -214,26 +258,32 @@
 }
 
-void CommandNode::process_network ()
-{
-
-}
+
+void CommandNode::processNetwork ()
+{
+
+}
+
 
 void CommandNode::relay (Command* cmd)
 {
-  //printf("CommandNode|relay()\n");
-  List<WorldEntity>* plist = bound;
-  
+
   Orxonox *orx = Orxonox::getInstance();
-  if( orx->system_command (cmd)) return;
+  if( orx->systemCommand (cmd)) return;
+
   GameLoader* gl = GameLoader::getInstance();
-  if(gl->worldCommand(cmd)) return;
-  
-  if( bLocalInput) send_over_network (cmd);
-  
-  while( (plist = plist->get_next()) != NULL)
-    {
-      plist->get_object()->command (cmd);
-    }
-}
+  if( gl->worldCommand(cmd)) return;
+
+  if( bLocalInput) sendOverNetwork (cmd);
+  
+  if( this->world->command(cmd)) return;
+
+  WorldEntity* entity = bound->enumerate();
+  while( entity != NULL)
+    {
+      entity->command (cmd);
+      entity = bound->nextElement();
+    }
+}
+
 
 /**
@@ -241,10 +291,10 @@
    \param ID: the new ID to use
 */
-void CommandNode::set_netID (int ID)
+void CommandNode::setNetID (int ID)
 {
   netID = ID;
 }
 
-void CommandNode::send_over_network (Command* cmd)
-{
-}
+void CommandNode::sendOverNetwork (Command* cmd)
+{
+}
Index: orxonox/branches/sound/src/command_node.h
===================================================================
--- orxonox/branches/sound/src/command_node.h	(revision 3179)
+++ orxonox/branches/sound/src/command_node.h	(revision 3238)
@@ -6,10 +6,11 @@
 */
 
-#ifndef COMMAND_NODE_H
-#define COMMAND_NODE_H
+#ifndef _COMMAND_NODE_H
+#define _COMMAND_NODE_H
 
 #include "stdincl.h"
 
 class WorldEntity;
+class World;
 
 #define N_STD_KEYS SDLK_LAST
@@ -19,47 +20,53 @@
 //! Key aliasing structure
 /**
-	This structure contains the key aliasing information, e.g. the command strings that
-	have been bound to the keys.
+   This structure contains the key aliasing information, e.g. the command strings that
+   have been bound to the keys.
 */
 typedef struct
 {
-	char keys[N_STD_KEYS][CMD_LENGHT];
-	char buttons[N_BUTTONS][CMD_LENGHT];
+  char keys[N_STD_KEYS][CMD_LENGHT];
+  char buttons[N_BUTTONS][CMD_LENGHT];
 } KeyBindings;
 
 //! Command Node
 /**
-	This class gathers all incoming SDL_Events and processes them. Keyboard, mouse and joystick input is
-	captured and translated into command messages which are passed down to the bound WorldEntities (via WorldEntity::command()).
-	Other SDL_Events are passed to Orxonox::event_handler() to deal with them. If the CommandNode has been created
-	with bLocalInput set to false, it will query the network class for incoming commands that match his netID and pass
-	them on to it's WorldEntities.
+   This class gathers all incoming SDL_Events and processes them. Keyboard, mouse and joystick input is
+   captured and translated into command messages which are passed down to the bound WorldEntities (via WorldEntity::command()).
+   Other SDL_Events are passed to Orxonox::event_handler() to deal with them. If the CommandNode has been created
+   with bLocalInput set to false, it will query the network class for incoming commands that match his netID and pass
+   them on to it's WorldEntities.
 */
 class CommandNode {
  private:
- 	bool bLocalInput;	//!< Identifies the CommandNode that processes local input
- 	int netID;	//!< Unique identifier that is used to determine between remote CommandNodes
-	KeyBindings* aliases;
-	List<WorldEntity>* bound;	//!< List of WorldEntites that recieve commands from this CommandNode
-	Sint32 coord[2];
-	
-	void relay (Command* cmd);
-	int* name_to_index (char* name);
-	void process_local ();
-	void process_network ();
-	void send_over_network (Command* cmd);
-	
+  bool bLocalInput;	//!< Identifies the CommandNode that processes local input
+  bool bEnabled;
+  int netID;	//!< Unique identifier that is used to determine between remote CommandNodes
+  KeyBindings* aliases;
+  tList<WorldEntity>* bound;	//!< List of WorldEntites that recieve commands from this CommandNode
+  Sint32 coord[2];
+  World* world;
+  
+
+  void relay (Command* cmd);
+  int* nameToIndex (char* name);
+  void processLocal ();
+  void processNetwork ();
+  void sendOverNetwork (Command* cmd);
+  
  public:
   CommandNode (int ID);
   CommandNode (char* filename);
   ~CommandNode ();
-  
-  void load_bindings (char* filename);
+
+  void reset ();
+  void enable (bool bEnabled);
+  void loadBindings (char* filename);
   void bind (WorldEntity* entity);
   void unbind (WorldEntity* entity);
+  void addToWorld (World* world);
   void process ();
   
-  void set_netID (int ID);
+  void setNetID (int ID);
 };
 
-#endif
+#endif /* _COMMAND_NODE_H */
Index: orxonox/branches/sound/src/coordinates.h
===================================================================
--- orxonox/branches/sound/src/coordinates.h	(revision 3179)
+++ orxonox/branches/sound/src/coordinates.h	(revision 3238)
@@ -4,6 +4,6 @@
 */ 
 
-#ifndef COORDINATES_H
-#define COORDINATES_H
+#ifndef _COORDINATES_H
+#define _COORDINATES_H
 
 #include "vector.h"
@@ -34,3 +34,3 @@
 } Placement;
 
-#endif
+#endif /* _COORDINATS_H */
Index: orxonox/branches/sound/src/data_tank.h
===================================================================
--- orxonox/branches/sound/src/data_tank.h	(revision 3179)
+++ orxonox/branches/sound/src/data_tank.h	(revision 3238)
@@ -1,5 +1,5 @@
 
-#ifndef DATA_TANK_H
-#define DATA_TANK_H
+#ifndef _DATA_TANK_H
+#define _DATA_TANK_H
 
 
@@ -12,3 +12,3 @@
 };
 
-#endif
+#endif /* _DATA_TANK_H */
Index: orxonox/branches/sound/src/environment.cc
===================================================================
--- orxonox/branches/sound/src/environment.cc	(revision 3179)
+++ orxonox/branches/sound/src/environment.cc	(revision 3238)
@@ -16,11 +16,9 @@
 */
 
-#include <iostream>
-#include <GL/glut.h>
-#include <stdlib.h>
-
-#include "data_tank.h"
 
 #include "environment.h"
+#include "stdincl.h"
+#include "world_entity.h"
+#include "vector.h"
 
 using namespace std;
@@ -30,6 +28,5 @@
 #define LEVEL_LENGTH 500
 
-Environment::Environment () 
-  : WorldEntity()
+Environment::Environment () : WorldEntity()
 {
 
@@ -60,8 +57,46 @@
 Environment::~Environment () {}
 
+void Environment::tick (float time) {}
 
+void Environment::hit (WorldEntity* weapon, Vector loc) {}
+
+void Environment::destroy () {}
+
+void Environment::collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags) {}
+
+void Environment::draw () 
+{
+  glMatrixMode(GL_MODELVIEW);
+  glLoadIdentity();
+  float matrix[4][4];
+  
+  glTranslatef(getPlacement()->r.x,getPlacement()->r.y,getPlacement()->r.z);
+  getPlacement()->w.matrix (matrix);
+  glMultMatrixf ((float*)matrix);
+
+  glBegin(GL_TRIANGLES);
+  glColor3f(1,0,1);
+  glVertex3f(0,0,0.5);
+  glVertex3f(-0.5,0,-1);
+  glVertex3f(0.5,0,-1);
+  
+  glVertex3f(0,0,0.5);
+  glVertex3f(0,0.5,-1);
+  glVertex3f(0,-0.5,-1);
+  glEnd();
+    
+  glBegin(GL_QUADS);
+  glColor3f(1,0,1);
+  glVertex3f(0.5,0.5,-1);
+  glVertex3f(0.5,-0.5,-1);
+  glVertex3f(-0.5,-0.5,-1);
+  glVertex3f(-0.5,0.5,-1);
+  glEnd();
+}
+
+/*
 void Environment::paint()
 {
-  /*
+  
   glPushMatrix();
   //glScalef(0.5, 0.5, 1.0);
@@ -95,5 +130,5 @@
   
   glPopMatrix();
-  */
+  
 }
 
@@ -103,2 +138,3 @@
 }
 
+*/
Index: orxonox/branches/sound/src/environment.h
===================================================================
--- orxonox/branches/sound/src/environment.h	(revision 3179)
+++ orxonox/branches/sound/src/environment.h	(revision 3238)
@@ -1,12 +1,11 @@
-
-
-
-#ifndef ENVIRONEMENT_H
-#define ENVIRONEMENT_H
-
+#ifndef _ENVIRONEMENT_H
+#define _ENVIRONEMENT_H
 
 #include "world_entity.h"
 
-class Environment : public WorldEntity {
+
+class Environment : public WorldEntity 
+{
+  friend class World;
 
  private:
@@ -21,10 +20,12 @@
   ~Environment ();
 
-  void paint(void);
-  void drawEnvironment(void);
-  void setEnvPosition(void);
-  void getEnvPosition(void);
+  
+  virtual void tick (float time);
+  virtual void hit (WorldEntity* weapon, Vector loc);
+  virtual void destroy ();
+  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
+  virtual void draw ();
 
 };
 
-#endif
+#endif /* _ENVIRONEMENT_H */
Index: orxonox/branches/sound/src/error.h
===================================================================
--- orxonox/branches/sound/src/error.h	(revision 3179)
+++ orxonox/branches/sound/src/error.h	(revision 3238)
@@ -22,7 +22,12 @@
 */ 
 
-// this are the two undefined error nr. Don't use them ...
-#define ERROR -1
-#define NERROR 0
+
+#ifndef _ERROR_H
+#define _ERROR_H
+
+// these are the two undefined error nr. Don't use them ...
+#define oERROR -1
+
+#define oNOERROR 0
 
 /*!
@@ -54,3 +59,5 @@
   char* message;
   char* location;
-} Error;
+} ErrorMessage;
+
+#endif /* _ERROR_H */
Index: orxonox/branches/sound/src/game_loader.cc
===================================================================
--- orxonox/branches/sound/src/game_loader.cc	(revision 3179)
+++ orxonox/branches/sound/src/game_loader.cc	(revision 3238)
@@ -42,4 +42,10 @@
 
 
+/**
+   \brief this class is a singleton class
+   \returns an instance of itself
+
+   if you are unsure about singleton classes, check the theory out on the internet :)
+*/
 GameLoader* GameLoader::getInstance()
 {
@@ -50,5 +56,5 @@
 
 
-Error GameLoader::init()
+ErrorMessage GameLoader::init()
 {
   if(this->currentCampaign != NULL)
@@ -57,12 +63,25 @@
 
 
-Error GameLoader::loadCampaign(char* name)
-{
-  Error errorCode;
+/**
+   \brief reads a campaign definition file into a campaign class
+   \param filename to be loaded
+   \returns the loaded campaign
+
+   this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns
+*/
+ErrorMessage GameLoader::loadCampaign(char* name)
+{
+  ErrorMessage errorCode;
   
   this->currentCampaign = this->fileToCampaign(name);
 }
 
-Error GameLoader::loadDebugCampaign(Uint32 campaignID)
+
+/**
+   \brief loads a debug campaign for test purposes only.
+   \param the identifier of the campaign.
+   \returns error message if not able to do so.
+*/
+ErrorMessage GameLoader::loadDebugCampaign(Uint32 campaignID)
 {
   switch(campaignID)
@@ -72,7 +91,9 @@
       {
 	Campaign* debugCampaign = new Campaign();
+
 	World* world0 = new World(DEBUG_WORLD_0);
-	world0->setNextStoryID(DEBUG_WORLD_1);
+	world0->setNextStoryID(WORLD_ID_1);
 	debugCampaign->addEntity(world0, WORLD_ID_0);
+
 	World* world1 = new World(DEBUG_WORLD_1);
 	world1->setNextStoryID(WORLD_ID_GAMEEND);
@@ -85,5 +106,5 @@
 }
 
-Error GameLoader::start()
+ErrorMessage GameLoader::start()
 {
   if(this->currentCampaign != NULL)
@@ -92,5 +113,5 @@
 
 
-Error GameLoader::stop()
+ErrorMessage GameLoader::stop()
 {
   if(this->currentCampaign != NULL)
@@ -100,5 +121,5 @@
 
 
-Error GameLoader::pause()
+ErrorMessage GameLoader::pause()
 {
   this->isPaused = true;
@@ -108,5 +129,5 @@
 
 
-Error GameLoader::resume()
+ErrorMessage GameLoader::resume()
 {
   this->isPaused = false;
@@ -115,11 +136,18 @@
 }
 
-Error GameLoader::free()
+/**
+   \brief release the mem
+ */
+ErrorMessage GameLoader::destroy()
 {}
 
 
-
-
-
+/**
+   \brief reads a campaign definition file into a campaign class
+   \param filename to be loaded
+   \returns the loaded campaign
+
+   this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns
+*/
 Campaign* GameLoader::fileToCampaign(char *name)
 {
@@ -134,5 +162,5 @@
    \brief handle keyboard commands 
    \param cmd: the command to handle
-   \return true if the command was handled by the system
+   \returns true if the command was handled by the system
 */
 bool GameLoader::worldCommand (Command* cmd)
@@ -165,7 +193,16 @@
       return true;
     }
+  else if( !strcmp( cmd->cmd, "quit"))
+    {
+      if( !cmd->bUp) this->stop();
+      return true;
+    }
   return false;
 }
 
+
+/*
+  \brief this changes to the next level
+*/
 void GameLoader::nextLevel()
 {
@@ -174,4 +211,10 @@
 }
 
+
+/*
+  \brief change to the previous level - not implemented
+
+  this propably useless
+*/
 void GameLoader::previousLevel()
 {
Index: orxonox/branches/sound/src/game_loader.h
===================================================================
--- orxonox/branches/sound/src/game_loader.h	(revision 3179)
+++ orxonox/branches/sound/src/game_loader.h	(revision 3238)
@@ -1,4 +1,4 @@
-#ifndef GAME_LOADER_H
-#define GAME_LOADER_H
+#ifndef _GAME_LOADER_H
+#define _GAME_LOADER_H
 
 #include "stdincl.h"
@@ -20,11 +20,11 @@
   static GameLoader* getInstance();
 
-  Error init();
-  Error loadCampaign(char* name);
-  Error start();
-  Error stop();
-  Error pause();
-  Error resume();
-  Error free();
+  ErrorMessage init();
+  ErrorMessage loadCampaign(char* name);
+  ErrorMessage start();
+  ErrorMessage stop();
+  ErrorMessage pause();
+  ErrorMessage resume();
+  ErrorMessage destroy();
 
   void nextLevel();
@@ -32,5 +32,5 @@
 
   bool worldCommand(Command* cmd);
-  Error loadDebugCampaign(Uint32 campaignID);
+  ErrorMessage loadDebugCampaign(Uint32 campaignID);
   
  private:
@@ -47,3 +47,3 @@
 };
 
-#endif
+#endif /* _GAME_LOADER_H */
Index: orxonox/branches/sound/src/ini_parser.cc
===================================================================
--- orxonox/branches/sound/src/ini_parser.cc	(revision 3179)
+++ orxonox/branches/sound/src/ini_parser.cc	(revision 3238)
@@ -25,7 +25,7 @@
 IniParser::IniParser (char* filename)
 {
-	stream = NULL;
-	bInSection = false;
-	open_file (filename);
+  stream = NULL;
+  bInSection = false;
+  openFile(filename);
 }
 
@@ -35,31 +35,31 @@
 IniParser::~IniParser ()
 {
-	if( stream != NULL) fclose (stream);
+  if( stream != NULL) fclose (stream);
 }
 
 /**
-	\brief opens another file to parse
-	\param filename: path and name of the new file to parse
-	\return zero on success or -1 if an error occured;
+   \brief opens another file to parse
+   \param filename: path and name of the new file to parse
+   \return zero on success or -1 if an error occured;
 */
-int IniParser::open_file( char* filename)
+int IniParser::openFile( char* filename)
 {
-	if( filename == NULL) return -1;
-	if( stream != NULL)	fclose (stream);
-	if( (stream = fopen (filename, "r")) == NULL)
-	{
-		printf("IniParser could not open %s\n", filename);
-		return -1;
-	}
-	bInSection = false;
-	return 0;
+  if( filename == NULL) return -1;
+  if( stream != NULL)	fclose (stream);
+  if( (stream = fopen (filename, "r")) == NULL)
+    {
+      printf("IniParser could not open %s\n", filename);
+      return -1;
+    }
+  bInSection = false;
+  return 0;
 }
 
 /**
-	\brief set the parsing cursor to the specified section
-	\param section: the name of the section to set the cursor to
-	\return zero on success or -1 if the section could not be found
+   \brief set the parsing cursor to the specified section
+   \param section: the name of the section to set the cursor to
+   \return zero on success or -1 if the section could not be found
 */
-int IniParser::get_section( char* section)
+int IniParser::getSection( char* section)
 {
   bInSection = false;
@@ -95,69 +95,69 @@
 
 /**
-	\brief gets the next VarName=VarValue pair from the parsing stream
-	\param name: a pointer to a buffer to store the name of the entry
-	\param value: a pointer to a buffer to store the value of the entry
-	\return zero if the buffers have been filled with data or -1 if there are no entries left in the current section
+   \brief gets the next VarName=VarValue pair from the parsing stream
+   \param name: a pointer to a buffer to store the name of the entry
+   \param value: a pointer to a buffer to store the value of the entry
+   \return zero if the buffers have been filled with data or -1 if there are no entries left in the current section
 */
-int IniParser::next_var( char* name, char* value)
+int IniParser::nextVar( char* name, char* value)
 {
-	if( stream == NULL)
+  if( stream == NULL)
+    {
+      bInSection = false;
+      return -1;
+    }
+  if( !bInSection) return -1;
+  
+  char linebuffer[PARSELINELENGHT];
+  char* ptr;
+  
+  while( !feof( stream))
+    {
+      // get next line
+      fgets (linebuffer, PARSELINELENGHT, stream);
+      // remove newline char
+      if( (ptr = strchr( linebuffer, '\n')) != NULL) *ptr = 0;
+      if( linebuffer[0] == '[')
 	{
-		bInSection = false;
-		return -1;
+	  bInSection = false;
+	  return -1;
 	}
-	if( !bInSection) return -1;
-	
-	char linebuffer[PARSELINELENGHT];
-	char* ptr;
-
-	while( !feof( stream))
+      if( (ptr = strchr( linebuffer, '=')) != NULL)
 	{
-			// get next line
-		fgets (linebuffer, PARSELINELENGHT, stream);
-			// remove newline char
-		if( (ptr = strchr( linebuffer, '\n')) != NULL) *ptr = 0;
-		if( linebuffer[0] == '[')
-		{
-			bInSection = false;
-			return -1;
-		}
-		if( (ptr = strchr( linebuffer, '=')) != NULL)
-		{
-			if( ptr == linebuffer) continue;
-			strcpy (value, &ptr[1]);
-			strncpy (name, linebuffer, strlen (linebuffer) - strlen (value) - 1);
-			return 0;
-		}
+	  if( ptr == linebuffer) continue;
+	  strcpy (value, &ptr[1]);
+	  strncpy (name, linebuffer, strlen (linebuffer) - strlen (value) - 1);
+	  return 0;
 	}
-	return -1;	
+    }
+  return -1;	
 }
 
 /**
-	\brief directly acesses an entry in a section
-	\param name: the name of the entry to find
-	\param section: the section where the entry is to be found
-	\param defvalue: what should be returned in case the entry cannot be found
-	\return a pointer to a buffer conatining the value of the specified entry. This buffer will contain the data specified in defvalue in case the entry wasn't found
-
-	The returned pointer points to an internal buffer, so do not free it on your own. Do not give a NULL pointer to defvalue, this will certainly
-	lead to unwanted behaviour.
+   \brief directly acesses an entry in a section
+   \param name: the name of the entry to find
+   \param section: the section where the entry is to be found
+   \param defvalue: what should be returned in case the entry cannot be found
+   \return a pointer to a buffer conatining the value of the specified entry. This buffer will contain the data specified in defvalue in case the entry wasn't found
+   
+   The returned pointer points to an internal buffer, so do not free it on your own. Do not give a NULL pointer to defvalue, this will certainly
+   lead to unwanted behaviour.
 */
-char* IniParser::get_var( char* name, char* section, char* defvalue = "")
+char* IniParser::getVar( char* name, char* section, char* defvalue = "")
 {
-	strcpy (internbuf, defvalue);
-	if( get_section (section) == -1) return internbuf;
-	
-	char namebuf[PARSELINELENGHT];
-	char valuebuf[PARSELINELENGHT];
-	
-	while( next_var (namebuf, valuebuf) != -1)
+  strcpy (internbuf, defvalue);
+  if( getSection (section) == -1) return internbuf;
+  
+  char namebuf[PARSELINELENGHT];
+  char valuebuf[PARSELINELENGHT];
+  
+  while( nextVar (namebuf, valuebuf) != -1)
+    {
+      if( !strcmp (name, namebuf))
 	{
-		if( !strcmp (name, namebuf))
-		{
-			strcpy (internbuf, valuebuf);
-			return internbuf;
-		}
+	  strcpy (internbuf, valuebuf);
+	  return internbuf;
 	}
-	return internbuf;
+    }
+  return internbuf;
 }
Index: orxonox/branches/sound/src/ini_parser.h
===================================================================
--- orxonox/branches/sound/src/ini_parser.h	(revision 3179)
+++ orxonox/branches/sound/src/ini_parser.h	(revision 3238)
@@ -6,6 +6,6 @@
 */
 
-#ifndef INI_PARSER_H
-#define INI_PARSER_H
+#ifndef _INI_PARSER_H
+#define _INI_PARSER_H
 
 #include <stdio.h>
@@ -29,9 +29,9 @@
   ~IniParser ();
   
-  char* get_var( char* name, char* section, char* defvalue);
-	int open_file( char* name);
-  int get_section( char* section);
-  int next_var( char* name, char* value);
+  char* getVar( char* name, char* section, char* defvalue);
+	int openFile( char* name);
+  int getSection( char* section);
+  int nextVar( char* name, char* value);
 };
 
-#endif
+#endif /* _INI_PARSER_H */
Index: orxonox/branches/sound/src/keynames.cc
===================================================================
--- orxonox/branches/sound/src/keynames.cc	(revision 3179)
+++ orxonox/branches/sound/src/keynames.cc	(revision 3238)
@@ -13,5 +13,4 @@
    co-programmer: ...
 */
-#include <SDL/SDL.h>
 
 #include "keynames.h"
@@ -21,5 +20,5 @@
 using namespace std;
 
-int buttonname_to_SDLB( char* name)
+int buttonnameToSDLB( char* name)
 {
 	if( !strcmp (name, "BUTTON_LEFT")) return SDL_BUTTON_LEFT;
@@ -31,5 +30,5 @@
 }
 
-char* SDLB_to_buttonname( int button)
+char* SDLBToButtonname( int button)
 {
 	if( button == SDL_BUTTON_LEFT) return "BUTTON_LEFT";
@@ -41,5 +40,5 @@
 }
 
-int keyname_to_SDLK( char* name)
+int keynameToSDLK( char* name)
 {
 	if( !strcmp (name, "BACKSPACE")) return SDLK_BACKSPACE;
@@ -179,5 +178,5 @@
 }
 
-char* SDLK_to_keyname( int key)
+char* SDLKToKeyname( int key)
 {
 	if( key == SDLK_BACKSPACE) return "BACKSPACE";
Index: orxonox/branches/sound/src/keynames.h
===================================================================
--- orxonox/branches/sound/src/keynames.h	(revision 3179)
+++ orxonox/branches/sound/src/keynames.h	(revision 3238)
@@ -5,4 +5,7 @@
 		Converts strings to SDLK/SDL_BUTTON values and vice versa
 */
+#ifndef _KEYNAMES_H
+#define _KEYNAMES_H
+
 
 #ifdef __WIN32__
@@ -10,5 +13,9 @@
 #endif
 
+#ifndef __APPLE__
 #include <SDL/SDL.h>
+#else
+#include <SDL.h>
+#endif
 
 /**
@@ -17,5 +24,5 @@
 	\return an int containing the SDL identifier of the mouse button or -1 if the button name is not valid
 */
-int buttonname_to_SDLB( char* name);
+int buttonnameToSDLB( char* name);
 
 /**
@@ -24,5 +31,5 @@
 	\return a pointer to a string containing the name of the mouse button
 */
-char* SDLB_to_buttonname( int button);
+char* SDLBToButtonname( int button);
 
 /**
@@ -31,5 +38,5 @@
 	\return the SDLK sym of the named key or -1 if the key name is not valid
 */
-int keyname_to_SDLK( char* name);
+int keynameToSDLK( char* name);
 
 /**
@@ -38,4 +45,6 @@
 	\return a pointer to a string containig the name of the key
 */
-char* SDLK_to_keyname( int key);
+char* SDLKToKeyname( int key);
 
+
+#endif /* _KEYNAMES_H */
Index: orxonox/branches/sound/src/list.h
===================================================================
--- orxonox/branches/sound/src/list.h	(revision 3179)
+++ orxonox/branches/sound/src/list.h	(revision 3238)
@@ -1,300 +1,207 @@
-/* 
-   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: Christian Meyer
-
-   ADDONS/FIXES:
-  
-   Patrick Boenzli     :          Implemented getSize() function
-*/
-
-
-/*!
-  \file list.h
-  \brief Contains a template for a doubly linked list
-*/
-
-#ifndef LIST_H
-#define LIST_H
-
-#include "stdlib.h"
+
+#ifndef _LIST_H
+#define _LIST_H
+
+#include "stdincl.h"
 
 //! An enum to list all the modes available when adding an object to a List
-enum ADDMODE {LIST_ADD_NEXT, LIST_ADD_PREV, LIST_ADD_FIRST, LIST_ADD_LAST};
+//enum ADDMODE {LIST_ADD_FIRST, LIST_ADD_LAST};
 //! An enum to list the two searching directions available when removing an object from a List
-enum FINDMODE {LIST_FIND_BW, LIST_FIND_FW};
-
-//! A generic doubly linked list
-template<class T> class List 
-{
-  T* object;
-  List<T>* next;
-  List<T>* prev;
-  bool bReference;
-  int size;
+//enum FINDMODE {LIST_FIND_BW, LIST_FIND_FW};
+
+
+
+class WorldEntity;
+
+class List {
+
+ public:
+  List ();
+  ~List ();
+
+  void add(WorldEntity* entity);
+  void remove(WorldEntity* entity);
+  void destroy();
+  WorldEntity* firstElement();
+  bool isEmpty();
+  int getSize();
+  WorldEntity* enumerate();
+  WorldEntity* nextElement();
+  WorldEntity* toArray();
+  void debug();
+
+ private:
+  struct listElement
+  {
+    listElement* prev;
+    WorldEntity* curr;
+    listElement* next;
+  };
+  Uint32 size;
+  listElement* first;
+  listElement* last;
+  listElement* currentEl;
+
+
+};
+
+class Iterator
+{
+
+ public:
+  bool hasNext();
+  WorldEntity* next();
+
+ private:
+
+};
+
+
+template<class T> class tList 
+{
+ private:
+  struct listElement
+  {
+    listElement* prev;
+    T* curr;
+    listElement* next;
+  };
+
+  Uint32 size;
+  listElement* first;
+  listElement* last;
+  listElement* currentEl;
   
  public:
-  List (T* obj, List<T>* n, List<T>* p, bool bRef);
-  ~List ();
+  tList ();
+  ~tList ();
   
-  int add (T* obj, ADDMODE mode, bool bRef);
-  T* get_object();
-  List<T>* get_next ();
-  List<T>* get_previous ();
-  List<T>* get_last ();
-  List<T>* get_first ();
-  void set_next (List<T>* ptr);
-  void set_prev (List<T>* ptr);
-  int remove (T* obj, FINDMODE mode);
+
+  void add(WorldEntity* entity);
+  void remove(WorldEntity* entity);
+  void destroy();
+  T* firstElement();
+  bool isEmpty();
   int getSize();
+  T* enumerate();
+  T* nextElement();
+  T* toArray();
+  void debug();
 };
 
 
-/**
-  \brief Standard constructor
-  
-  Call this without any parameters to generate a new List which can be filled with content.
-  DO NOT create a List element that contains an object on your own, you'll lose the data
-  contained in that object and will have trouble removing the list from your memory.
-*/
-template<class T>
-List<T>::List (T* obj = NULL, List<T>* n = NULL, List<T>* p = NULL, bool bRef = false)
-{
-  object = obj;
-  next = n;
-  prev = p;
-  bReference = bRef;
-  if(obj != NULL)
-    ++size;
-}
-
-/**
-  \brief Standard destructor
-  
-  Call this on the initially generated base List element to remove the whole List from the memory.
-  You can safely do this to any List element you want without messing up the rest of the List, but keep in mind
-  that the contained object will be deleted as well when bRef had been set to false.
-*/
-template<class T>
-List<T>::~List ()
-{
-  if (object == NULL) // deleted foot node => disband the list
-  {
-    while( next != NULL)
+template<class T>
+tList<T>::tList () 
+{
+  this->first = NULL;
+  this->last = NULL;
+  this->size = 0;
+}
+
+template<class T>
+tList<T>::~tList () 
+{}
+
+template<class T>
+void tList<T>::add(WorldEntity* entity)
+{
+  listElement* el = new listElement;
+  el->prev = this->last;
+  el->curr = entity;
+  el->next = NULL;
+
+  this->last = el;
+
+  if(this->size == 0) this->first = el;
+  else el->prev->next = el;
+  this->size++;
+}
+
+
+template<class T>
+void tList<T>::remove(WorldEntity* entity)
+{
+  this->currentEl = this->first;
+  listElement* te;
+  while( this->currentEl != NULL)
     {
-      delete next;
+      if( this->currentEl->curr == entity)
+	{ 
+	  if( this->currentEl->prev  == NULL ) this->first = this->currentEl->next;
+	  else this->currentEl->prev->next = this->currentEl->next;
+
+	  if( this->currentEl->next == NULL) this->last = this->currentEl->prev;
+	  else this->currentEl->next->prev = this->currentEl->prev;
+
+	  te = this->currentEl->next;
+	  delete this->currentEl;
+	  this->currentEl = te;
+	  return;
+	}
+      this->currentEl = this->currentEl->next;
     }
-    while( prev != NULL)
+}
+
+
+template<class T>
+void tList<T>::destroy()
+{
+  this->currentEl = this->first;
+  while(this->currentEl != NULL)
     {
-      delete prev;
+      listElement* le = this->currentEl->next;
+      delete this->currentEl->curr;
+      delete this->currentEl;
+      this->currentEl = le;
     }
-  }
-  else
-  {
-    if (prev != NULL) prev->set_next (next);
-    if (next != NULL) next->set_prev (prev);
-    if (!bReference) delete object;
-  }
-}
- 
-/**
-  \brief Add an object to the List
-  \param obj: A pointer to an allocated object
-  \param mode: A Value of ADDMODE (default: LIST_ADD_NEXT)
-  \param bRef: Sets whether the element is serving as a storage point or a simple listing (default: false)
-  \return 0 if the operation succeded, -1 if the element could not be added
-  
-  This adds a new List element to the chain. The mode parameter can be used to specify
-  the location where the element should be added. LIST_ADD_NEXT will add the new element directly
-  after the base element. LIST_ADD_PREV will add the new element directly before the base element.
-  LIST_ADD_FIRST will add the element at the beginning of the List whereas LIST_ADD_LAST will add
-  it to the end of the chain. If the bRef parameter is set to true, the object pointer will not be deleted
-  when the element containing that object is deleted, thus the List can be used for temporary listings as
-  well as permanent data storage.
-*/
-template<class T> 
-int List<T>::add (T* obj, ADDMODE mode = LIST_ADD_NEXT, bool bRef = false)
-{
-  List<T>* p;
-  if( obj == NULL) return -1;
-  switch (mode)
-  {
-    case LIST_ADD_NEXT:
-      p = new List<T>( obj, next, this, bRef);
-      if( next != NULL) next->set_prev (p);
-      next = p;
-      break;
-    case LIST_ADD_PREV:
-      p = new List<T>( obj, this, prev, bRef);
-      if( prev != NULL) prev->set_next (p);
-      prev = p;
-      break;
-    case LIST_ADD_FIRST:
-      if (prev == NULL) prev = new List<T> (obj, this, NULL, bRef);
-      else return prev->add (obj, mode, bRef);
-      break;
-    case LIST_ADD_LAST:
-      if (next == NULL) next = new List<T> (obj, NULL, this, bRef);
-      else return next->add (obj, mode, bRef);
-      break;
-    default:
-        return -1;
-      break;
-  }
-  ++size;
-  return 0;
-}
-
-/**
-  \brief Get the next element of the List
-  \return The List element after the current List element
-*/
-template<class T>
-List<T>* List<T>::get_next ()
-{
-  return next;
-}
- 
-/**
-  \brief Get the previous element of the List
-  \return The List element before the current List element
-*/
-template<class T>
-List<T>* List<T>::get_previous ()
-{
-  return prev;
-}
-
-/**
-  \brief Get the last element of the List
-  \return The last List element
-*/
-template<class T>
-List<T>* List<T>::get_last ()
-{
-  if (next == NULL) return this;
-  else return next->get_last();
-}
-
-/**
-  \brief Get the first element of the List
-  \return The first List element
-*/
-template<class T>
-List<T>* List<T>::get_first ()
-{
-  if (prev == NULL) return this;
-  else return prev->get_first();
-}
-
-/**
-  \brief Removes a certain element from the List
-  \param obj: A pointer to the object that should be removed
-  \param mode: A value of FINDMODE
-  \return 0 if the element was found and removed, -1 if the element was not found
-  
-  This searches the part of the List specified with mode for the object in question.
-  When the object is found it is deleted and the List element is removed from the chain.
-  If mode is LIST_FIND_FW all elements AFTER the base element are searched, if mode is
-  LIST_FIND_BW all elements BEFORE the base element are searched. Note that the object
-  contained within the List element is NOT deleted when bRef was set to true.
-*/
-template<class T>
-int List<T>::remove (T* obj, FINDMODE mode = LIST_FIND_FW)
-{
-  if (obj == NULL) return -1;
-  else
-  {
-    switch (mode)
-    {
-      case LIST_FIND_BW:
-        if (prev == NULL) return -1;
-        else
-        {
-          if( prev->get_object() == obj)
-          {
-            delete prev;
-          }
-          else
-          {
-            return prev->remove( obj, mode);
-          }
-        }
-        break;
-      case LIST_FIND_FW:
-        if (next == NULL) return -1;
-        else
-        {
-          if( next->get_object() == obj)
-          {
-            delete next;
-          }
-          else
-          {
-            return next->remove( obj, mode);
-          }
-        }
-        break;
-      default:
-        return -1;
-    }
-  }
-  --size;
-  return 0;
-}
-
-/**
-  \brief Set the next element of a List element
-  \param ptr: A pointer to the new next element
-    
-  Sets the next element of a List element... Better not touch this, it can really mess up a List.
-*/
-template<class T>
-void List<T>::set_next (List<T>* ptr)
-{
-  next = ptr;
-}
-
-/**
-  \brief Set the prev element of a List element
-  \param ptr: A pointer to the new previous element
-    
-  Sets the previous element of a List element... Better not touch this, it can really mess up a List.
-*/
-template<class T>
-void List<T>::set_prev (List<T>* ptr)
-{
-  prev = ptr;
-}
-
-/**
-  \brief Get the pointer to the object the element is containing
-  \return The contained object (will be NULL if called on the base element).
-*/
-template<class T>
-T* List<T>::get_object()
-{
-  return object;
-}
-
-
-/**
-  \brief Returns the current size of the List
-  \return Size of List
-*/
-template<class T>
-int List<T>::getSize()
+  this->first = NULL;
+  this->last = NULL;
+  this->size = 0;
+}
+
+
+template<class T>
+T* tList<T>::firstElement()
+{
+  return this->first->curr;
+}
+
+
+template<class T>
+bool tList<T>::isEmpty()
+{
+  return (this->size==0)?true:false;
+}
+
+
+template<class T>
+int tList<T>::getSize()
 {
   return this->size;
 }
 
-#endif
-
+
+template<class T>
+T* tList<T>::enumerate()
+{
+  if(this->size == 0) return NULL;
+  this->currentEl = this->first;
+  return this->currentEl->curr;
+}
+
+
+template<class T>
+T* tList<T>::nextElement()
+{
+  if(this->size == 0) return NULL;
+  this->currentEl = this->currentEl->next;
+  if(this->currentEl == NULL) return NULL;
+  return this->currentEl->curr;
+}
+
+
+template<class T>
+T* tList<T>::toArray()
+{}
+
+#endif /* _LIST_H */
Index: orxonox/branches/sound/src/message_structures.h
===================================================================
--- orxonox/branches/sound/src/message_structures.h	(revision 3179)
+++ orxonox/branches/sound/src/message_structures.h	(revision 3238)
@@ -4,6 +4,6 @@
 */
 
-#ifndef _MESSAGESTRUCTURES_H
-#define _MESSAGESTRUCTURES_H
+#ifndef _MESSAGE_STRUCTURES_H
+#define _MESSAGE_STRUCTURES_H
 
 #define CMD_LENGHT 16
@@ -26,3 +26,3 @@
 } Command;
 
-#endif
+#endif /* _MESSAGE_STRUCTURES_H */
Index: orxonox/branches/sound/src/npc.h
===================================================================
--- orxonox/branches/sound/src/npc.h	(revision 3179)
+++ orxonox/branches/sound/src/npc.h	(revision 3238)
@@ -1,5 +1,5 @@
 
-#ifndef NPC_H
-#define NPC_H
+#ifndef _NPC_H
+#define _NPC_H
 
 #include "world_entity.h"
@@ -41,3 +41,3 @@
 };
 
-#endif
+#endif /* _NPC_H */
Index: orxonox/branches/sound/src/orxonox.cc
===================================================================
--- orxonox/branches/sound/src/orxonox.cc	(revision 3179)
+++ orxonox/branches/sound/src/orxonox.cc	(revision 3238)
@@ -47,5 +47,5 @@
 Orxonox::~Orxonox () 
 {
-  Orxonox::singleton_ref = NULL;
+  Orxonox::singletonRef = NULL;
   if( world != NULL) delete world;
   if( localinput != NULL) delete world;
@@ -56,11 +56,11 @@
 
 /* this is a singleton class to prevent duplicates */
-Orxonox* Orxonox::singleton_ref = 0;
+Orxonox* Orxonox::singletonRef = 0;
 
 Orxonox* Orxonox::getInstance (void)
 {
-  if (singleton_ref == NULL)
-    singleton_ref = new Orxonox();
-  return singleton_ref;
+  if (singletonRef == NULL)
+    singletonRef = new Orxonox();
+  return singletonRef;
 }
 
@@ -72,17 +72,6 @@
    it's path and name into configfilename
 */
-void Orxonox::get_config_file (int argc, char** argv)
-{
-  /*	char* path;
-    #ifdef __WIN32__
-    path = getenv("");
-    #else
-    path = getenv("HOME");
-    #endif
-    
-    if( path != NULL) strcpy (configfilename, path);
-    else strcpy (configfilename, "./");
-    strcat (configfilename, "/.orxonox.conf");*/
-  
+void Orxonox::getConfigFile (int argc, char** argv)
+{
   strcpy (configfilename, "orxonox.conf");
 }
@@ -96,42 +85,38 @@
   // config file
   
-  get_config_file (argc, argv);
-  
-  // initialize SDL
-  printf("> Initializing SDL\n");
-  if( SDL_Init (SDL_INIT_EVERYTHING) == -1)
+  getConfigFile (argc, argv);
+  SDL_Init (SDL_INIT_TIMER);
+  // initialize everything
+  if( initVideo() == -1) return -1;
+  if( initSound() == -1) return -1;
+  printf("> Initializing input\n");
+  if( initInput() == -1) return -1;
+  printf("> Initializing networking\n");
+  if( initNetworking () == -1) return -1;
+  printf("> Initializing resources\n");
+  if( initResources () == -1) return -1;
+  //printf("> Initializing world\n");
+  //if( init_world () == -1) return -1; PB: world will be initialized when started
+  
+  return 0;
+}
+
+/**
+   \brief initializes SDL and OpenGL
+*/
+int Orxonox::initVideo() 
+{
+  printf("> Initializing video\n");
+  if (SDL_Init(SDL_INIT_VIDEO) == -1)
     {
-      printf ("Could not SDL_Init(): %s\n", SDL_GetError());
+      printf ("could not initialize SDL Video\n");
       return -1;
     }
-  
-  // initialize everything
-  printf("> Initializing video\n");
-  if( init_video () == -1) return -1;
-  printf("> Initializing sound\n");
-  if( init_sound () == -1) return -1;
-  printf("> Initializing input\n");
-  if( init_input () == -1) return -1;
-  printf("> Initializing networking\n");
-  if( init_networking () == -1) return -1;
-  printf("> Initializing resources\n");
-  if( init_resources () == -1) return -1;
-  //printf("> Initializing world\n");
-  //if( init_world () == -1) return -1; PB: world will be initialized when started
-  
-  return 0;
-}
-
-/**
-   \brief initializes SDL and OpenGL
-*/
-int Orxonox::init_video () 
-{
   // Set video mode
   // TO DO: parse arguments for settings
-  SDL_GL_SetAttribute (SDL_GL_RED_SIZE, 5);
-  SDL_GL_SetAttribute (SDL_GL_GREEN_SIZE, 5);
-  SDL_GL_SetAttribute (SDL_GL_BLUE_SIZE, 5);
-  SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 16);
+  SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
+  SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
+  SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
+  SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
   
   int bpp = 16;
@@ -140,7 +125,7 @@
   Uint32 flags = SDL_HWSURFACE | SDL_OPENGL | SDL_GL_DOUBLEBUFFER;
   
-  if( (screen = SDL_SetVideoMode (width, height, bpp, flags)) == NULL)
+  if((screen = SDL_SetVideoMode (width, height, bpp, flags)) == NULL)
   {
-    printf ("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", width, height, bpp, flags, SDL_GetError());
+    printf("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", width, height, bpp, flags, SDL_GetError());
     SDL_Quit();
     return -1;
@@ -148,6 +133,5 @@
   
   // Set window labeling
-  // TO DO: Add version information to caption
-  SDL_WM_SetCaption( "Orxonox", "Orxonox");
+  SDL_WM_SetCaption("Orxonox " PACKAGE_VERSION, "Orxonox " PACKAGE_VERSION);
   
   // TO DO: Create a cool icon and use it here
@@ -158,26 +142,44 @@
   glClearColor(0.0, 0.0, 0.0, 0.0);
   glEnable(GL_DEPTH_TEST);
-  glEnable(GL_COLOR);
-  glShadeModel(GL_FLAT);
+ 
+  // LIGHTING
+  GLfloat lmodelAmbient[] = {.1, .1, .1, 1.0};
+  GLfloat whiteLight[] = {1.0, 1.0, 1.0,1.0};
+  GLfloat lightPosition[] = {10.0, 10, 19.0, 0.0};
+
+  glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight);
+  glLightfv(GL_LIGHT0, GL_SPECULAR, whiteLight);
+  glEnable(GL_LIGHTING);
+  glEnable(GL_LIGHT0);
+  glEnable(GL_DEPTH_TEST);
+  glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
+  glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight);
+   
+  //  glEnable(GL_COLOR);
+  //  glShadeModel(GL_SMOOTH);
   
   // create camera
-  localcamera = new Camera(world);
-  
-  return 0;
-}
+  //localcamera = new Camera(world); /* \todo camera/input node not used anymore*/
+  
+  return 0;
+}
+
 
 /**
    \brief initializes the sound engine
 */
-int Orxonox::init_sound () 
-{
+int Orxonox::initSound() 
+{
+  printf("> Initializing sound\n");
+  // SDL_Init(SDL_INIT_AUDIO);
   printf("Not yet implemented\n");
   return 0;
 }
 
+
 /**
    \brief initializes input functions
 */
-int Orxonox::init_input () 
+int Orxonox::initInput() 
 {
   // create localinput
@@ -187,8 +189,9 @@
 }
 
+
 /**
    \brief initializes network system
 */
-int Orxonox::init_networking () 
+int Orxonox::initNetworking() 
 {
   printf("Not yet implemented\n");
@@ -196,8 +199,9 @@
 }
 
+
 /**
    \brief initializes and loads resource files
 */
-int Orxonox::init_resources () 
+int Orxonox::initResources() 
 {
   printf("Not yet implemented\n");
@@ -205,8 +209,9 @@
 }
 
+
 /**
    \brief initializes the world
 */
-int Orxonox::init_world () 
+int Orxonox::initWorld() 
 {
   //world = new World();
@@ -236,4 +241,5 @@
 }
 
+
 /**
    \brief exits Orxonox
@@ -244,28 +250,5 @@
 }
 
-/**
-   \brief this runs all of Orxonox
-*/
-void Orxonox::mainLoop()
-{
-  lastframe = SDL_GetTicks();
-  bQuitOrxonox = false;
-  // This is where everything is run
-  printf("Orxonox|Entering main loop\n");
-  while( !bQuitOrxonox)
-    {
-      // Network
-      synchronize();
-      // Process input
-      handle_input();
-      // Process time
-      time_slice();
-      // Process collision
-      collision();
-      // Draw
-      display();
-    }
-  printf("Orxonox|Exiting the main loop\n");
-}
+
 
 /**
@@ -273,58 +256,9 @@
    \param event: an event not handled by the CommandNode 
 */
-void Orxonox::event_handler (SDL_Event* event)
+void Orxonox::eventHandler(SDL_Event* event)
 {
   // Handle special events such as reshape, quit, focus changes
 }
-
-/**
-   \brief synchronize local data with remote data
-*/
-void Orxonox::synchronize ()
-{
-  // Get remote input
-  // Update synchronizables
-}
-
-/**
-   \brief run all input processing
-*/
-void Orxonox::handle_input ()
-{
-  // localinput
-  localinput->process();
-  // remoteinput
-}
-
-/**
-   \brief advance the timeline
-*/
-void Orxonox::time_slice ()
-{
-  Uint32 curframe = SDL_GetTicks();
-  if( !pause)
-    {
-      Uint32 dt = curframe - lastframe;
-      
-      if(dt > 0)
-	{
-	  float fps = 1000/dt;
-	  printf("fps = %f\n", fps);
-	}
-      
-      world->time_slice (dt);
-      world->update ();
-      localcamera->time_slice (dt);
-    }
-  lastframe = curframe;
-}
-
-/**
-   \brief compute collision detection
-*/
-void Orxonox::collision ()
-{
-  world->collide ();
-}
+ 
 
 /**
@@ -333,6 +267,7 @@
    \return true if the command was handled by the system or false if it may be passed to the WorldEntities
 */
-bool Orxonox::system_command (Command* cmd)
-{
+bool Orxonox::systemCommand(Command* cmd)
+{
+  /*
   if( !strcmp( cmd->cmd, "quit"))
     {
@@ -341,21 +276,8 @@
     }
   return false;
-}
-
-/**
-   \brief render the current frame
-*/
-void Orxonox::display ()
-{
-  // clear buffer
-  glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
-  // set camera
-  localcamera->apply ();
-  // draw world
-  world->draw ();
-  // draw HUD
-  // flip buffers
-  SDL_GL_SwapBuffers();
-}
+  */
+  return false;
+}
+
 
 /**
@@ -363,8 +285,9 @@
    \return a pointer to localcamera
 */
-Camera* Orxonox::get_camera ()
+Camera* Orxonox::getCamera()
 {
   return localcamera;
 }
+
 
 /**
@@ -372,8 +295,9 @@
    \return a pointer to localinput
 */
-CommandNode* Orxonox::get_localinput ()
+CommandNode* Orxonox::getLocalInput()
 {
   return localinput;
 }
+
 
 /**
@@ -381,15 +305,18 @@
    \return a pointer to world
 */
-World* Orxonox::get_world ()
+World* Orxonox::getWorld()
 {
   return world;
 }
 
-int main (int argc, char** argv) 
+
+
+
+int main(int argc, char** argv) 
 {  
   printf(">>> Starting Orxonox <<<\n");
   Orxonox *orx = Orxonox::getInstance();
   
-  if( (*orx).init(argc, argv) == -1)
+  if((*orx).init(argc, argv) == -1)
     {
       printf("! Orxonox initialization failed\n");
@@ -397,6 +324,4 @@
     }
   
-  //(*orx).mainLoop();
-
   orx->start();
   
Index: orxonox/branches/sound/src/orxonox.h
===================================================================
--- orxonox/branches/sound/src/orxonox.h	(revision 3179)
+++ orxonox/branches/sound/src/orxonox.h	(revision 3238)
@@ -4,8 +4,6 @@
 */ 
 
-#ifndef ORXONOX_H
-#define ORXONOX_H
-
-#include <SDL/SDL.h>
+#ifndef _ORXONOX_H
+#define _ORXONOX_H
 
 #include "stdincl.h"
@@ -24,5 +22,5 @@
 
  private:
-  static Orxonox* singleton_ref;
+  static Orxonox* singletonRef;
   Orxonox ();
   ~Orxonox ();
@@ -40,20 +38,20 @@
   Uint32 lastframe;
   
-  void get_config_file (int argc, char** argv);
+  void getConfigFile (int argc, char** argv);
   
   // main loop functions
-  void synchronize ();
-  void handle_input ();
-  void time_slice ();
-  void collision ();
-  void display ();
+  //  void synchronize ();
+  //void handle_input ();
+  //void time_slice ();
+  //void collision ();
+  //void display ();
   
   	// subsystem initialization
-  int init_video ();
-  int init_sound ();
-  int init_input ();
-  int init_networking ();
-  int init_resources ();
-  int init_world ();
+  int initVideo ();
+  int initSound ();
+  int initInput ();
+  int initNetworking ();
+  int initResources ();
+  int initWorld ();
   
  public:
@@ -62,16 +60,16 @@
   void quitGame();
 
-  void event_handler (SDL_Event* event);
-  bool system_command (Command* cmd);
+  void eventHandler (SDL_Event* event);
+  bool systemCommand (Command* cmd);
 
   int init (int argc, char** argv);
   
-  CommandNode* get_localinput();
-  Camera* get_camera();
-  World* get_world();
+  CommandNode* getLocalInput();
+  Camera* getCamera();
+  World* getWorld();
   
-  void mainLoop();
+  //void mainLoop();
 };
 
-#endif
+#endif /* _ORXONOX_H */
 
Index: orxonox/branches/sound/src/player.cc
===================================================================
--- orxonox/branches/sound/src/player.cc	(revision 3179)
+++ orxonox/branches/sound/src/player.cc	(revision 3238)
@@ -25,59 +25,10 @@
 Player::Player(bool isFree) : WorldEntity(isFree)
 {
-}
 
-Player::~Player () 
+  this->obj = new Object("reaplow.obj");
+  /*
+  objectList = glGenLists(1);
+  glNewList (objectList, GL_COMPILE);
 
-{
-}
-
-void Player::post_spawn ()
-{
-	travel_speed = 15.0;
-	velocity = Vector();
-	bUp = bDown = bLeft = bRight = bAscend = bDescend = false;
-	bFire = false;
-	acceleration = 10.0;
-	set_collision (new CollisionCluster (1.0, Vector(0,0,0)));
-}
-
-void Player::tick (float time)
-{
-	// movement
-	move (time);
-}
-
-void Player::hit (WorldEntity* weapon, Vector loc)
-{
-}
-
-void Player::destroy ()
-{
-}
-
-void Player::collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags)
-{
-}
-
-void Player::command (Command* cmd)
-{
-  //printf("Player|recieved command [%s]\n", cmd->cmd);
-  if( !strcmp( cmd->cmd, "up")) bUp = !cmd->bUp;
-  else if( !strcmp( cmd->cmd, "down")) bDown = !cmd->bUp;
-  else if( !strcmp( cmd->cmd, "left")) bLeft = !cmd->bUp;
-  else if( !strcmp( cmd->cmd, "right")) bRight = !cmd->bUp;
-  else if( !strcmp( cmd->cmd, "fire")) bFire = !cmd->bUp;
-}
-
-void Player::draw ()
-{ 
-  glMatrixMode(GL_MODELVIEW);
-  glLoadIdentity();
-  float matrix[4][4];
-  
-  glTranslatef(get_placement()->r.x,get_placement()->r.y,get_placement()->r.z);
-  get_placement()->w.matrix (matrix);
-  glMultMatrixf ((float*)matrix);
-  
   glBegin(GL_TRIANGLES);
   glColor3f(1,1,1);
@@ -99,22 +50,85 @@
   glEnd();
   
-  //printf("Player@%f/%f/%f\n", get_placement()->r.x, get_placement()->r.y, get_placement()->r.z);
+  glEndList ();
+  */
 }
 
-void Player::get_lookat (Location* locbuf)
+Player::~Player()
 {
-	*locbuf = *get_location();
-	//locbuf->dist += 5.0;
+  delete this->obj;
 }
 
-void Player::left_world ()
+void Player::postSpawn()
+{
+  travelSpeed = 15.0;
+  velocity = Vector();
+  bUp = bDown = bLeft = bRight = bAscend = bDescend = false;
+  bFire = false;
+  acceleration = 10.0;
+  setCollision(new CollisionCluster(1.0, Vector(0,0,0)));
+}
+
+void Player::tick(float time)
+{
+  // movement
+  move (time);
+}
+
+void Player::hit(WorldEntity* weapon, Vector loc)
 {
 }
 
-void Player::move (float time)
+void Player::destroy()
+{
+}
+
+void Player::collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags)
+{
+}
+
+void Player::command(Command* cmd)
+{
+  //printf("Player|recieved command [%s]\n", cmd->cmd);
+  if( !strcmp( cmd->cmd, "up")) bUp = !cmd->bUp;
+  else if( !strcmp( cmd->cmd, "down")) bDown = !cmd->bUp;
+  else if( !strcmp( cmd->cmd, "left")) bLeft = !cmd->bUp;
+  else if( !strcmp( cmd->cmd, "right")) bRight = !cmd->bUp;
+  else if( !strcmp( cmd->cmd, "fire")) bFire = !cmd->bUp;
+}
+
+void Player::draw()
+{ 
+  glMatrixMode(GL_MODELVIEW);
+  glLoadIdentity();
+  float matrix[4][4];
+  
+  glTranslatef(getPlacement()->r.x, getPlacement()->r.y, getPlacement()->r.z);
+  getPlacement()->w.matrix (matrix);
+  glMultMatrixf((float*)matrix);
+  
+  glMatrixMode(GL_MODELVIEW);
+  glRotatef(-90, 0,1,0);
+  obj->draw();
+  // glCallList(objectList);
+
+  
+  
+}
+
+void Player::getLookat(Location* locbuf)
+{
+  *locbuf = *getLocation();
+  //locbuf->dist += 5.0;
+}
+
+void Player::leftWorld()
+{
+}
+
+void Player::move(float time)
 {
   Vector accel(0.0, 0.0, 0.0);
-  /* FIXME: calculating the direction and orthDirection every time_slice is redundant! save it somewhere */
-  Placement *pos = get_placement();
+  /* FIXME: calculating the direction and orthDirection every timeSlice is redundant! save it somewhere */
+  Placement *pos = getPlacement();
   /* calculate the direction in which the craft is heading  */
   Vector direction(0.0, 0.0, 1.0);
@@ -128,7 +142,7 @@
   if( bRight ) { accel = accel - (orthDirection*acceleration); }
   if( bAscend ) { /* not yet implemented but just: (0,0,1)*acceleration */}
-  if( bDescend) {/* FIXME */}
+  if( bDescend) {/* FIXME */} /* \todo up and down player movement */
 
-  Location* l = get_location();
+  Location* l = getLocation();
   
   // r(t) = r(0) + v(0)*t + 1/2*a*t^2
@@ -138,25 +152,7 @@
 
   /* this the base-speed of the player: determines how fast and how the player follows the track*/
-  l->dist = l->dist + travel_speed * time;
+  l->dist = l->dist + travelSpeed * time;
 
   /* this updates the player position on the track - user interaction */
   l->pos = l->pos + accel*time;
 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: orxonox/branches/sound/src/player.h
===================================================================
--- orxonox/branches/sound/src/player.h	(revision 3179)
+++ orxonox/branches/sound/src/player.h	(revision 3238)
@@ -4,8 +4,9 @@
 */
 
-#ifndef PLAYER_H
-#define PLAYER_H
+#ifndef _PLAYER_H
+#define _PLAYER_H
 
 #include "world_entity.h"
+#include "importer/object.h"
 
 //! Basic controllable WorldEntity
@@ -15,18 +16,18 @@
   
  public:
-  Player (bool isFree = false);
-  ~Player ();
+  Player(bool isFree = false);
+  ~Player();
   
-  virtual void post_spawn ();
-  virtual void tick (float time);
-  virtual void hit (WorldEntity* weapon, Vector loc);
-  virtual void destroy ();
-  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
-  virtual void command (Command* cmd);
+  virtual void postSpawn();
+  virtual void tick(float time);
+  virtual void hit(WorldEntity* weapon, Vector loc);
+  virtual void destroy();
+  virtual void collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags);
+  virtual void command(Command* cmd);
   
-  virtual void draw ();
-  virtual void get_lookat (Location* locbuf);
+  virtual void draw();
+  virtual void getLookat(Location* locbuf);
   
-  virtual void left_world ();
+  virtual void leftWorld();
   
  private:
@@ -34,10 +35,12 @@
   bool bFire;
   Vector velocity;
-  float travel_speed;
+  float travelSpeed;
   float acceleration;
+  GLuint objectList;
+  Object* obj;
   
-  void move (float time);
+  void move(float time);
   
 };
 
-#endif
+#endif /* _PLAYER_H */
Index: orxonox/branches/sound/src/power_up.h
===================================================================
--- orxonox/branches/sound/src/power_up.h	(revision 3179)
+++ orxonox/branches/sound/src/power_up.h	(revision 3238)
@@ -4,6 +4,6 @@
 */ 
 
-#ifndef POWER_UP_H
-#define POWER_UP_H
+#ifndef _POWER_UP_H
+#define _POWER_UP_H
 
 #include "data_tank.h"
@@ -19,3 +19,3 @@
 };
 
-#endif
+#endif /* _POWER_UP_H */
Index: orxonox/branches/sound/src/proto_class.h
===================================================================
--- orxonox/branches/sound/src/proto_class.h	(revision 3179)
+++ orxonox/branches/sound/src/proto_class.h	(revision 3238)
@@ -1,5 +1,5 @@
 
-#ifndef PROTO_CLASS_H
-#define PROTO_CLASS_H
+#ifndef _PROTO_CLASS_H
+#define _PROTO_CLASS_H
 
 #include "data_tank.h"
@@ -14,3 +14,3 @@
 };
 
-#endif
+#endif /* _PROTO_CLASS_H */
Index: orxonox/branches/sound/src/shoot_laser.h
===================================================================
--- orxonox/branches/sound/src/shoot_laser.h	(revision 3179)
+++ orxonox/branches/sound/src/shoot_laser.h	(revision 3238)
@@ -1,5 +1,5 @@
 
-#ifndef SHOOT_LASER_H
-#define SHOOT_LASER_H
+#ifndef _SHOOT_LASER_H
+#define _SHOOT_LASER_H
 
 
@@ -40,3 +40,3 @@
 };
 
-#endif
+#endif /* _SHOOT_LASER_H */
Index: orxonox/branches/sound/src/shoot_rocket.h
===================================================================
--- orxonox/branches/sound/src/shoot_rocket.h	(revision 3179)
+++ orxonox/branches/sound/src/shoot_rocket.h	(revision 3238)
@@ -1,5 +1,5 @@
 
-#ifndef SHOOT_ROCKET_H
-#define SHOOT_ROCKET_H
+#ifndef _SHOOT_ROCKET_H
+#define _SHOOT_ROCKET_H
 
 
@@ -54,3 +54,3 @@
 };
 
-#endif
+#endif /* _SHOOT_ROCKET_H */
Index: orxonox/branches/sound/src/stdincl.h
===================================================================
--- orxonox/branches/sound/src/stdincl.h	(revision 3179)
+++ orxonox/branches/sound/src/stdincl.h	(revision 3238)
@@ -1,21 +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
+#ifndef _STDINCL_H
+#define _STDINCL_H
 
-#define null 0
+#define null 0   //!< null
+
+// this includes the information from configure/makefiles
+#if HAVE_CONFIG_H 
+#include <config.h> 
+#endif
 
 #ifdef __WIN32__
 #include <windows.h>
 #endif
+
+#ifndef __APPLE__
 #include <SDL/SDL.h>
 #include <GL/gl.h>
 #include <GL/glu.h>
+#else
+#include <SDL.h>
+#include <OpenGL/gl.h>
+#include <OpenGL/glu.h>
+#endif
 
 #include "vector.h"
 #include "coordinates.h"
 #include "list.h"
+#include "list_template.h"
 #include "error.h"
+#include "debug.h"
 #include "message_structures.h"
 #include "orxonox.h"
 
-#endif
+#endif /* _STDINCL_H */
Index: orxonox/branches/sound/src/story_def.h
===================================================================
--- orxonox/branches/sound/src/story_def.h	(revision 3179)
+++ orxonox/branches/sound/src/story_def.h	(revision 3238)
@@ -1,14 +1,14 @@
 
-#ifndef STORY_DEF_H
-#define STORY_DEF_H
+#ifndef _STORY_DEF_H
+#define _STORY_DEF_H
 
 
-#define DEBUG_CAMPAIGN_0 0
-#define DEBUG_CAMPAIGN_1 1
-#define DEBUG_CAMPAIGN_2 2
+#define DEBUG_CAMPAIGN_0 1000
+#define DEBUG_CAMPAIGN_1 1001
+#define DEBUG_CAMPAIGN_2 1002
 
-#define DEBUG_WORLD_0 0
-#define DEBUG_WORLD_1 1
-#define DEBUG_WORLD_2 2
+#define DEBUG_WORLD_0 100
+#define DEBUG_WORLD_1 101
+#define DEBUG_WORLD_2 102
 
 #define WORLD_ID_0 0
@@ -20,5 +20,5 @@
 #define WORLD_ID_GAMEEND 999
 
-#define MAX_STORY_ENTITIES 99; //!> maximal StoryEntities in a Campaign
+#define MAX_STORY_ENTITIES 99 //!> maximal StoryEntities in a Campaign
 
-#endif
+#endif /* _STORY_DEF_H */
Index: orxonox/branches/sound/src/story_entity.cc
===================================================================
--- orxonox/branches/sound/src/story_entity.cc	(revision 3179)
+++ orxonox/branches/sound/src/story_entity.cc	(revision 3238)
@@ -30,18 +30,29 @@
 /** 
     \brief initialize the entity before use. 
+    \returns an error code if not able to apply.
 
     After execution of this function, the Entity is ready to be played/executed, 
     this shifts the initialisation work before the execution - very important...
-    
 */
-Error StoryEntity::init()
+ErrorMessage StoryEntity::init()
 {}
 
 
-void StoryEntity::setStoryID(Uint32 storyID)
+/** 
+    \brief sets the story ID
+
+    sets the story id of the current entity, this enables it to be identified in a 
+    global context.
+*/
+void StoryEntity::setStoryID(int storyID)
 {
   this->storyID = storyID;
 }
 
+
+/** 
+    \brief this reads the story id of the current entity
+    \returns the story entity id
+*/
 int StoryEntity::getStoryID()
 {
@@ -50,10 +61,21 @@
 
 
-void StoryEntity::setNextStoryID(Uint32 nextStoryID)
+/** 
+    \brief sets the id of the next story entity
+    
+    StoryEntities can choose their following entity themselfs. the entity id defined here
+    will be startet after this entity ends. this can be convenient if you want to have a
+    non linear story with switches.
+*/
+void StoryEntity::setNextStoryID(int nextStoryID)
 {
   this->nextStoryID = nextStoryID;
 }
 
-Uint32 StoryEntity::getNextStoryID()
+/** 
+    \brief gets the story id of the current entity
+    \returns story id
+*/
+int StoryEntity::getNextStoryID()
 {
   return this->nextStoryID;
@@ -61,27 +83,96 @@
 
 
-Error StoryEntity::start(Uint32 storyID)
-{}
+/** 
+    \brief starts the entity with the choosen id. only for entities with lists.
+    \param story id
+    \returns error code if this action has caused a error
 
-Error StoryEntity::start()
-{}
-
-Error StoryEntity::stop()
-{}
-
-Error StoryEntity::pause()
-{}
-
-Error StoryEntity::resume()
+    this simply starts the story with the id storyID. the story with the choosen id has
+    to be part of the current entity else, this doesn't make sense. this is used for
+    campaigns or the GameLoader, they have lists of Campaigns/Worlds with their own
+    storyID.
+*/
+ErrorMessage StoryEntity::start(int storyID)
 {}
 
 
+/** 
+    \brief starts the current entity
+    \returns error code if this action has caused a error    
+*/
+ErrorMessage StoryEntity::start()
+{}
+
+
+/** 
+    \brief stops the current entity
+    \returns error code if this action has caused a error
+
+    ATTENTION: this function shouldn't call other functions, or if so, they must return
+    after finishing. If you ignore or forget to do so, the current entity is not able to
+    terminate and it will run in the background or the ressources can't be freed or even
+    worse: are freed and the program will end in a segmentation fault!
+    hehehe, all seen... :)
+*/
+ErrorMessage StoryEntity::stop()
+{}
+
+
+/** 
+    \brief pause the current entity
+    \returns error code if this action has caused a error
+
+    this pauses the current entity or passes this call forth to the running entity.
+*/
+ErrorMessage StoryEntity::pause()
+{}
+
+
+/** 
+    \brief resumes a pause
+    \returns error code if this action has caused a error
+
+    this resumess the current entity or passes this call forth to the running entity.
+*/
+ErrorMessage StoryEntity::resume()
+{}
+
+
+/** 
+    \brief loads the current entity
+
+    this is here to enable you loading maps into the entities. for all other actions you
+    should take the init() function.
+*/
 void StoryEntity::load()
 {}
 
 
-void StoryEntity::displayEntityScreen()
+/** 
+    \brief destroys and cleans up the current entity. 
+
+    this cleans up ressources before the deconstructor is called. for terminating 
+    the entity please use the stop() function.
+*/
+void StoryEntity::destroy()
 {}
 
-void StoryEntity::releaseEntityScreen()
+
+/** 
+    \brief this displays the load screen
+
+    it will need some time to load maps or things like that. to inform the user about 
+    progress and to just show him/her something for the eyes, put here this stuff
+*/
+void StoryEntity::displayLoadScreen()
 {}
+
+
+/** 
+    \brief undisplay the load screen
+
+    the load process has terminated, you now can release the load screen and start this
+    entity.
+*/
+void StoryEntity::releaseLoadScreen()
+{}
Index: orxonox/branches/sound/src/story_entity.h
===================================================================
--- orxonox/branches/sound/src/story_entity.h	(revision 3179)
+++ orxonox/branches/sound/src/story_entity.h	(revision 3238)
@@ -1,41 +1,48 @@
+/*! 
+    \file story_entity.h
+    \brief holds the base class of everything that is playable - that is part of the story
+*/ 
 
-#ifndef STORY_ENTITY_H
-#define STORY_ENTITY_H
+
+#ifndef _STORY_ENTITY_H
+#define _STORY_ENTITY_H
 
 #include "stdincl.h"
 #include "story_def.h"
 
+//! A class that represents something to play in orxonox. it is a container for worlds, movies, mission briefings, etc...
 class StoryEntity {
 
  public:
   StoryEntity ();
-  ~StoryEntity ();
+  virtual ~StoryEntity ();
 
-  bool isInit;
-  bool isPaused;
+  bool isInit;  //! if the entity is initialized, this has to be true
+  bool isPaused; //! is true if the entity is paused
 
-  virtual Error init();
-  virtual Error start(Uint32 storyID);
-  virtual Error start();
-  virtual Error stop();
-  virtual Error pause();
-  virtual Error resume();
+  virtual ErrorMessage init();
+  virtual ErrorMessage start(int storyID);
+  virtual ErrorMessage start();
+  virtual ErrorMessage stop();
+  virtual ErrorMessage pause();
+  virtual ErrorMessage resume();
 
   virtual void load();
+  virtual void destroy();
 
-  virtual void displayEntityScreen();
-  virtual void releaseEntityScreen();
+  virtual void displayLoadScreen();
+  virtual void releaseLoadScreen();
 
-  void setStoryID(Uint32 storyID);
+  void setStoryID(int storyID);
   int getStoryID();
 
-  void setNextStoryID(Uint32 nextStoryID);
-  Uint32 getNextStoryID();
+  void setNextStoryID(int nextStoryID);
+  int getNextStoryID();
 
 
  private:
-  Uint32 storyID;
-  Uint32 nextStoryID;
+  int storyID; //! this is the number of this entity, identifying it in a list/tree...
+  int nextStoryID; //! if this entity has finished, this entity shall be called
 };
 
-#endif
+#endif /* _STORY_ENTITY_H */
Index: orxonox/branches/sound/src/synchronisable.h
===================================================================
--- orxonox/branches/sound/src/synchronisable.h	(revision 3179)
+++ orxonox/branches/sound/src/synchronisable.h	(revision 3238)
@@ -1,5 +1,5 @@
 
-#ifndef SYNCHRONISABLE_H
-#define SYNCHRONISABLE_H
+#ifndef _SYNCHRONISABLE_H
+#define _SYNCHRONISABLE_H
 
 #include "data_tank.h"
@@ -22,3 +22,3 @@
 };
 
-#endif
+#endif /* _SYNCHRONISABLE_H */
Index: orxonox/branches/sound/src/track.cc
===================================================================
--- orxonox/branches/sound/src/track.cc	(revision 3179)
+++ orxonox/branches/sound/src/track.cc	(revision 3238)
@@ -21,31 +21,31 @@
 
 /**
-	\brief creates a null Track part
+   \brief creates a null Track part
 */
 Track::Track ()
 {
-	ID = 0;
-	offset = NULL;
-	end = NULL;
-	nextID = 0;
+  this->ID = 0;
+  this->offset = NULL;
+  this->end = NULL;
+  this->nextID = 0;
 }
 
 /**
-	\brief creates a functional base Track part
-	\param number: the ID if this Track part
-	\param next: the ID of the next Track part
-	\param start: pointer to an anchor point (Vector) representing the offset of this part
-	\param finish: pointer to an anchor point (Vector) representing the end of this part
+   \brief creates a functional base Track part
+   \param number: the ID if this Track part
+   \param next: the ID of the next Track part
+   \param start: pointer to an anchor point (Vector) representing the offset of this part
+   \param finish: pointer to an anchor point (Vector) representing the end of this part
 */
 Track::Track (Uint32 number, Uint32 next, Vector* start, Vector* finish)
 {
-	ID = number;
-	offset = start;
-	end = finish;
-	nextID = next;
+  this->ID = number;
+  this->offset = start;
+  this->end = finish;
+  this->nextID = next;
 }
 
 /**
-	\brief removes the Track part from memory
+   \brief removes the Track part from memory
 */
 Track::~Track ()
@@ -68,5 +68,5 @@
    at inside camera boundaries.
 */
-void Track::map_camera (Location* lookat, Placement* camplc)
+void Track::mapCamera (Location* lookat, Placement* camplc)
 {
   Line trace(*offset, *end - *offset);
@@ -103,55 +103,58 @@
    when transfering between track parts.
 */
-bool Track::map_coords (Location* loc, Placement* plc)
+bool Track::mapCoords (Location* loc, Placement* plc)
 {
-	Line trace(*offset, *end - *offset);
-	float l = trace.len ();
-	
-	/* change to the next track? */
-	if( loc->dist > l)
-	{
-		loc->dist -= l;
-		loc->part = nextID;
-		//FIXME: loc->track = this;
-		return true;
-	}
-	
-	/* this quaternion represents the rotation from start-vector (0,0,1) to the direction of
-	 * the track */
-	Quaternion dir(trace.a, Vector(0,0,1)); 
-
-	plc->r = trace.r + (trace.a * ((loc->dist) / l)) + /*dir.apply*/(loc->pos);
-	plc->w = dir * loc->rot;
-	
-	return false;
+  Line trace(*offset, *end - *offset);
+  float l = trace.len ();
+  
+  /* change to the next track? */
+  if( loc->dist > l)
+    {
+      loc->dist -= l;
+      loc->part = nextID;
+      //FIXME: loc->track = this;
+      return true;
+    }
+  
+  /* this quaternion represents the rotation from start-vector (0,0,1) to the direction of
+   * the track */
+  Quaternion dir(trace.a, Vector(0,0,1)); 
+  
+  plc->r = trace.r + (trace.a * ((loc->dist) / l)) + /*dir.apply*/(loc->pos);
+  plc->w = dir * loc->rot;
+  
+  return false;
 }
 
+
 /**
-	\brief this is called when a WorldEntity enters a Track part
-	\param entity: pointer to the WorldEntity in question
-	
-	You can do stuff like add or remove effects, do some coordinate finetuning 
-	or whatever in here.
+   \brief this is called when a WorldEntity enters a Track part
+   \param entity: pointer to the WorldEntity in question
+   
+   You can do stuff like add or remove effects, do some coordinate finetuning 
+   or whatever in here.
 */
-void Track::post_enter (WorldEntity* entity)
+void Track::postEnter (WorldEntity* entity)
 {
 }
 
+
 /**
-	\brief this is called when a WorldEntity leaves a Track part
-	\param entity: pointer to the WorldEntity in question
-	
-	You can do stuff like add or remove effects, do some coordinate finetuning 
-	or whatever in here.
+   \brief this is called when a WorldEntity leaves a Track part
+   \param entity: pointer to the WorldEntity in question
+   
+   You can do stuff like add or remove effects, do some coordinate finetuning 
+   or whatever in here.
 */
-void Track::post_leave (WorldEntity* entity)
+void Track::postLeave (WorldEntity* entity)
 {
 }
 
+
 /**
-	\brief this is called every frame
-	\param deltaT: amount of time passed since the last frame in seconds
-	
-	Do time based or polling scripts here. 
+   \brief this is called every frame
+   \param deltaT: amount of time passed since the last frame in seconds
+   
+   Do time based or polling scripts here. 
 */
 void Track::tick (float deltaT)
Index: orxonox/branches/sound/src/track.h
===================================================================
--- orxonox/branches/sound/src/track.h	(revision 3179)
+++ orxonox/branches/sound/src/track.h	(revision 3238)
@@ -4,6 +4,6 @@
 */ 
 
-#ifndef TRACK_H
-#define TRACK_H
+#ifndef _TRACK_H
+#define _TRACK_H
 
 #include "stdincl.h"
@@ -25,5 +25,5 @@
   Uint32 nextID;
   
- 	
+  
  public:
   Track ();
@@ -32,10 +32,10 @@
   virtual void init();
   
-  virtual void post_enter (WorldEntity* entity);	// handle coordinate transition in here !!! (when dist < 0 or dist > lasttracklenght)
-  virtual void post_leave (WorldEntity* entity);
+  virtual void postEnter (WorldEntity* entity);	// handle coordinate transition in here !!! (when dist < 0 or dist > lasttracklenght)
+  virtual void postLeave (WorldEntity* entity);
   virtual void tick (float deltaT);
-  virtual void map_camera (Location* lookat, Placement* camplc);
-  virtual bool map_coords (Location* loc, Placement* plc);	// this should return true if the entity left track boundaries
+  virtual void mapCamera (Location* lookat, Placement* camplc);
+  virtual bool mapCoords (Location* loc, Placement* plc);	// this should return true if the entity left track boundaries
 };
 
-#endif
+#endif /* _TRACK_H */
Index: orxonox/branches/sound/src/vector.cc
===================================================================
--- orxonox/branches/sound/src/vector.cc	(revision 3179)
+++ orxonox/branches/sound/src/vector.cc	(revision 3238)
@@ -33,5 +33,5 @@
 {
   Vector r;
-  
+
   r.x = x + v.x;
   r.y = y + v.y;
@@ -203,5 +203,5 @@
    \return the angle between the vectors in radians
 */
-float angle_rad (const Vector& v1, const Vector& v2)
+float angleRad (const Vector& v1, const Vector& v2)
 {
   return acos( v1 * v2 / (v1.len() * v2.len()));
@@ -215,5 +215,5 @@
    \return the angle between the vectors in degrees
 */
-float angle_deg (const Vector& v1, const Vector& v2)
+float angleDeg (const Vector& v1, const Vector& v2)
 {
   float f;
@@ -243,5 +243,5 @@
 
 /**
-   \brief calculates a look_at rotation
+   \brief calculates a lookAt rotation
    \param dir: the direction you want to look
    \param up: specify what direction up should be
@@ -578,5 +578,5 @@
   Vector axis = x.cross( v);
   axis.normalize();
-  float angle = angle_rad( x, v);
+  float angle = angleRad( x, v);
   float ca = cos(angle);
   float sa = sin(angle);
@@ -714,5 +714,5 @@
    \return the rotated vector
 */
-Vector rotate_vector( const Vector& v, const Rotation& r)
+Vector rotateVector( const Vector& v, const Rotation& r)
 {
   Vector t;
@@ -745,5 +745,5 @@
    \return the distance between the Line and the point
 */
-float Line::distance_point (const Vector& v) const
+float Line::distancePoint (const Vector& v) const
 {
   Vector d = v-r;
@@ -761,7 +761,7 @@
   Vector* fp = new Vector[2];
   Plane p = Plane (r + a.cross(l.a), r, r + a);
-  fp[1] = p.intersect_line (l);
+  fp[1] = p.intersectLine (l);
   p = Plane (fp[1], l.a);
-  fp[0] = p.intersect_line (*this);
+  fp[0] = p.intersectLine (*this);
   return fp;
 }
@@ -783,6 +783,6 @@
 {
   Vector t = a + r;
-  t = rotate_vector( t, rot);
-  r = rotate_vector( r, rot),
+  t = rotateVector( t, rot);
+  r = rotateVector( r, rot),
   a = t - r;
 }
@@ -815,5 +815,5 @@
    \param l: a line
 */
-Vector Plane::intersect_line (const Line& l) const
+Vector Plane::intersectLine (const Line& l) const
 {
   if (n.x*l.a.x+n.y*l.a.y+n.z*l.a.z == 0.0) return Vector(0,0,0);
@@ -827,5 +827,5 @@
    \return the distance between the plane and the point (can be negative)
 */
-float Plane::distance_point (const Vector& p) const
+float Plane::distancePoint (const Vector& p) const
 {
   float l = n.len();
@@ -839,6 +839,127 @@
    \return 0 if the point is contained within the Plane, positive(negative) if the point is in the positive(negative) semi-space of the Plane
 */
-float Plane::locate_point (const Vector& p) const
+float Plane::locatePoint (const Vector& p) const
 {
   return (n.dot(p) + k);
 }
+
+
+/**
+   \brief Creates a new BezierCurve
+*/
+BezierCurve::BezierCurve (void)
+{
+  nodeCount = 0;
+  firstNode = new PathNode;
+  currentNode = firstNode;
+
+  firstNode->position = Vector (.0, .0, .0);
+  firstNode->number = 0;
+  firstNode->next = 0; // not sure if this really points to NULL!!
+
+  return;
+}
+
+/**
+   \brief Deletes a BezierCurve.
+   It does this by freeing all the space taken over from the nodes
+*/
+BezierCurve::~BezierCurve (void)
+{
+  PathNode* tmpNode;
+  currentNode = firstNode;
+  while (tmpNode != 0)
+    {
+      tmpNode = currentNode;
+      currentNode = currentNode->next;
+      delete tmpNode;
+    }
+}
+
+/**
+   \brief adds a new Node to the bezier Curve
+   \param newNode a Vector to the position of the new node
+*/
+void BezierCurve::addNode(const Vector& newNode)
+{
+  PathNode* tmpNode;
+  if (nodeCount == 0 )
+    tmpNode = firstNode;
+  else
+    {
+      tmpNode = new PathNode;
+      currentNode = currentNode->next = tmpNode;
+    }
+  tmpNode->position = newNode;
+  tmpNode->next = 0; // not sure if this really points to NULL!!
+  tmpNode->number = (++nodeCount);
+  return;
+}
+
+/**
+   \brief calculates the Position on the curve
+   \param t The position on the Curve (0<=t<=1)
+   \return the Position on the Path
+*/
+Vector BezierCurve::calcPos(float t) 
+{
+  if (nodeCount <=4)
+    {
+      //      if (verbose >= 1)
+      //      printf ("Please define at least 4 nodes, until now you have only defined %i.\n", nodeCount);
+      curvePoint = Vector(0,0,0);
+    }
+  PathNode* tmpNode = firstNode;
+    
+  int k,kn,nn,nkn;
+  double blend,muk,munk;
+  Vector b = Vector(0.0,0.0,0.0);
+  
+  muk = 1;
+  munk = pow(1-t,(double)nodeCount);
+  
+  for (k=0; k<=nodeCount; k++) {
+    nn = nodeCount;
+    kn = k;
+    nkn = nodeCount - k;
+    blend = muk * munk;
+    muk *= t;
+    munk /= (1-t);
+    while (nn >= 1) {
+      blend *= nn;
+      nn--;
+      if (kn > 1) {
+	blend /= (double)kn;
+	kn--;
+      }
+      if (nkn > 1) {
+	blend /= (double)nkn;
+	nkn--;
+      }
+    }
+    b.x += tmpNode->position.x * blend;
+    b.y += tmpNode->position.y * blend;
+    b.z += tmpNode->position.z * blend;
+
+    tmpNode = tmpNode->next;
+  }
+  return b;
+}
+
+Vector BezierCurve::calcDirection (float t)
+{
+  double diff = .00000000001;
+  
+  Vector diffV = ((calcPos(t+diff) - calcPos(t))/diff);
+  diffV.normalize();
+  return diffV;
+}
+
+/**
+  \brief returns the Position of the point calculated on the Curve
+  \return a Vector to the calculated position
+*/
+Vector BezierCurve::getPos() const
+{
+  return curvePoint;
+}
Index: orxonox/branches/sound/src/vector.h
===================================================================
--- orxonox/branches/sound/src/vector.h	(revision 3179)
+++ orxonox/branches/sound/src/vector.h	(revision 3238)
@@ -6,6 +6,6 @@
 */ 
 
-#ifndef VECTOR_H
-#define VECTOR_H
+#ifndef _VECTOR_H
+#define _VECTOR_H
 
 #include <math.h>
@@ -40,6 +40,6 @@
 };
 
-float angle_deg (const Vector& v1, const Vector& v2);
-float angle_rad (const Vector& v1, const Vector& v2);
+float angleDeg (const Vector& v1, const Vector& v2);
+float angleRad (const Vector& v1, const Vector& v2);
 
 //! Quaternion
@@ -98,5 +98,5 @@
 
 //!< Apply a rotation to a vector
-Vector rotate_vector( const Vector& v, const Rotation& r);
+Vector rotateVector( const Vector& v, const Rotation& r);
 
 //! 3D line
@@ -118,5 +118,5 @@
   
   float distance (const Line& l) const;
-  float distance_point (const Vector& v) const;
+  float distancePoint (const Vector& v) const;
   Vector* footpoints (const Line& l) const;
   float len () const;
@@ -144,8 +144,44 @@
   ~Plane () {}
   
-  Vector intersect_line (const Line& l) const;
-  float distance_point (const Vector& p) const;
-  float locate_point (const Vector& p) const;
+  Vector intersectLine (const Line& l) const;
+  float distancePoint (const Vector& p) const;
+  float locatePoint (const Vector& p) const;
 };
 
-#endif
+
+
+//! Bezier Curve
+/**
+   Class to handle bezier curves in 3-dimesnsional space
+   
+   needed for  the Tracking system in OrxOnoX.
+*/
+class BezierCurve
+{
+ private:
+  int nodeCount;
+  Vector curvePoint;
+  
+  struct PathNode
+  {
+    int number;
+    Vector position;
+    PathNode* next;
+  };
+
+  PathNode* firstNode; 
+  PathNode* currentNode; 
+
+ public:
+  BezierCurve (void);
+  ~BezierCurve (void);
+  void addNode (const Vector& newNode);
+  Vector calcPos (float t);
+  Vector calcDirection (float t);
+  
+  Vector getPos () const;
+};
+
+
+
+#endif /* _VECTOR_H */
Index: orxonox/branches/sound/src/world.cc
===================================================================
--- orxonox/branches/sound/src/world.cc	(revision 3179)
+++ orxonox/branches/sound/src/world.cc	(revision 3238)
@@ -22,4 +22,5 @@
 #include "command_node.h"
 #include "camera.h"
+#include "environment.h"
 
 using namespace std;
@@ -35,5 +36,5 @@
   this->worldName = name;
   this->debugWorldNr = -1;
-  this->entities = new List<WorldEntity>();
+  this->entities = new tList<WorldEntity>();
 }
 
@@ -42,5 +43,5 @@
   this->debugWorldNr = worldID;
   this->worldName = NULL;
-  this->entities = new List<WorldEntity>();
+  this->entities = new tList<WorldEntity>();
 }
 
@@ -50,41 +51,62 @@
 World::~World ()
 {
-  Orxonox *orx = Orxonox::getInstance();
-  orx->get_localinput()->unbind (this->localPlayer);
+  printf("World::~World() - deleting current world\n");
+  CommandNode* cn = Orxonox::getInstance()->getLocalInput();
+  cn->unbind(this->localPlayer);
+  cn->reset();
+  this->localCamera->destroy();
+
+  WorldEntity* entity = entities->enumerate();  
+  while( entity != NULL ) 
+    { 
+      entity->destroy();
+      entity = entities->nextElement();
+    }
+  this->entities->destroy();
+
   delete this->entities;
   delete this->localCamera;
-}
-
-
-/** 
-    \brief initialize the world before use.
-*/
-Error World::init()
+  /* this->localPlayer hasn't to be deleted explicitly, it is 
+     contained in entities*/
+}
+
+
+ErrorMessage World::init()
 {
   this->bPause = false;
-}
-
-Error World::start()
-{
+  CommandNode* cn = Orxonox::getInstance()->getLocalInput();
+  cn->addToWorld(this);
+  cn->enable(true);
+}
+
+ErrorMessage World::start()
+{
+  printf("World::start() - starting current World: nr %i\n", this->debugWorldNr);
+  this->bQuitOrxonox = false;
+  this->bQuitCurrentGame = false;
   this->mainLoop();
 }
 
-Error World::stop()
-{
+ErrorMessage World::stop()
+{
+  printf("World::stop() - got stop signal\n");
   this->bQuitCurrentGame = true;
-  this->localCamera->setWorld(NULL);
-  this->~World();
-}
-
-Error World::pause()
+}
+
+ErrorMessage World::pause()
 {
   this->isPaused = true;
 }
 
-Error World::resume()
+ErrorMessage World::resume()
 {
   this->isPaused = false;
 }
 
+void World::destroy()
+{
+
+}
+
 void World::load()
 {
@@ -93,4 +115,10 @@
       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:
 	  {
@@ -98,20 +126,20 @@
 	    this->pathnodes = new Vector[6];
 	    this->pathnodes[0] = Vector(0, 0, 0);
-	    this->pathnodes[1] = Vector(-100, 40, 0);
-	    this->pathnodes[2] = Vector(-100, 140, 0);
-	    this->pathnodes[3] = Vector(0, 180, 0);
-	    this->pathnodes[4] = Vector(100, 140, 0);
-	    this->pathnodes[5] = Vector(100, 40, 0);
+	    this->pathnodes[1] = Vector(1000, 0, 0);
+	    //	    this->pathnodes[2] = Vector(-100, 140, 0);
+	    //	    this->pathnodes[3] = Vector(0, 180, 0);
+	    //	    this->pathnodes[4] = Vector(100, 140, 0);
+	    //	    this->pathnodes[5] = Vector(100, 40, 0);
 	    
 	    // create the tracks
-	    this->tracklen = 6;
-	    this->track = new Track[6];
+	    this->tracklen = 2;
+	    this->track = new Track[2];
 	    for( int i = 0; i < this->tracklen; i++)
 	      {
 		this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]);
 	      }
-	    
+	    // !\todo old track-system has to be removed
+
 	    // create a player
-	    //WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>();
 	    WorldEntity* myPlayer = new Player();
 	    this->spawn(myPlayer);
@@ -120,9 +148,16 @@
 	    // bind input
 	    Orxonox *orx = Orxonox::getInstance();
-	    orx->get_localinput()->bind (myPlayer);
+	    orx->getLocalInput()->bind (myPlayer);
 	    
 	    // bind camera
 	    this->localCamera = new Camera(this);
 	    this->getCamera()->bind (myPlayer);	
+
+	    Placement* plc = new Placement;
+	    plc->r = Vector(100, 10, 10);
+	    plc->w = Quaternion();
+	    WorldEntity* env = new Environment();
+	    this->spawn(env, plc);
+
 	    break;
 	  }
@@ -145,14 +180,13 @@
 		this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]);
 	      }
-	    
+
 	    // create a player
-	    //WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>();
 	    WorldEntity* myPlayer = new Player();
 	    this->spawn(myPlayer);
-	    this->localPlayer = myPlayer;
+	    this->localPlayer = myPlayer;	    
 	    
 	    // bind input
 	    Orxonox *orx = Orxonox::getInstance();
-	    orx->get_localinput()->bind (myPlayer);
+	    orx->getLocalInput()->bind (myPlayer);
 	    
 	    // bind camera
@@ -169,4 +203,180 @@
 
     }
+
+  // initialize debug coord system
+  objectList = glGenLists(1);
+  glNewList (objectList, GL_COMPILE);
+  glLoadIdentity();
+  glColor3f(1.0,0,0);
+  glBegin(GL_QUADS);
+
+  int sizeX = 100;
+  int sizeY = 80;
+  float length = 1000;
+  float width = 200;
+  float widthX = float (length /sizeX);
+  float widthY = float (width /sizeY);
+  
+  float height [sizeX][sizeY];
+  Vector normal_vectors[sizeX][sizeY];
+  
+  
+  for ( int i = 0; i<sizeX-1; i+=1)
+    for (int j = 0; j<sizeY-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 Hügel ein wenig glätten
+  for (int h=1; h<2;h++)
+    for (int i=1;i<sizeX-2 ;i+=1 )
+      for(int j=1;j<sizeY-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<sizeY-2 ;j+=1)
+      {
+	Vector v1 = Vector (widthX*(1),      widthY*(j)  ,      height[i][j]);
+	Vector v2 = Vector (widthX*(i-1),    widthY*(j)  ,      height[i-1][j]);
+	Vector v3 = Vector (widthX*(i),      widthY*(j+1),      height[i][j+1]);
+	Vector v4 = Vector (widthX*(i+1),    widthY*(j),        height[i+1][j]);
+	Vector v5 = Vector (widthX*(i),      widthY*(j-1),      height[i][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(v4-v2)+c2.cross(v1-v3)+c3.cross(v2-v4)+c4.cross(v3-v1);
+	normal_vectors[i][j].normalize();
+      }
+
+  int snowheight=3;
+  for ( int i = 0; i<sizeX; i+=1)
+    for (int j = 0; j<sizeY;j+=1)
+      {	  
+	Vector v1 = Vector (widthX*(i),      widthY*(j)  -width/2,      height[i][j]-20 );
+	Vector v2 = Vector (widthX*(i+1),    widthY*(j)  -width/2,      height[i+1][j]-20);
+	Vector v3 = Vector (widthX*(i+1),    widthY*(j+1)-width/2,    height[i+1][j+1]-20);
+	Vector v4 = Vector (widthX*(i),      widthY*(j+1)-width/2,    height[i][j+1]-20);
+	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);
+	}
+      
+    }
+  */  
+  //draw track
+  glBegin(GL_LINES);
+  glColor3f(0,1,1);
+  for( int i = 0; i < tracklen; i++)
+    {
+      glVertex3f(pathnodes[i].x,pathnodes[i].y,pathnodes[i].z);
+      glVertex3f(pathnodes[(i+1)%tracklen].x,pathnodes[(i+1)%tracklen].y,pathnodes[(i+1)%tracklen].z);
+    }
+  glEnd();
+  glEndList();
 }
 
@@ -181,18 +391,19 @@
 void World::collide ()
 {
-  List<WorldEntity> *a, *b;
+  /*
+  List *a, *b;
   WorldEntity *aobj, *bobj;
-  
-  a = entities->get_next();
+   
+  a = entities;
   
   while( a != NULL)
     {
-      aobj = a->get_object();
+      aobj = a->nextElement();
       if( aobj->bCollide && aobj->collisioncluster != NULL)
 	{
-	  b = a->get_next();
+	  b = a->nextElement();
 	  while( b != NULL )
 	    {
-	      bobj = b->get_object();
+	      bobj = b->nextElement();
 	      if( bobj->bCollide && bobj->collisioncluster != NULL )
 		{
@@ -206,9 +417,10 @@
 		  }
 		}
-	      b = b->get_next();
+	      b = b->nextElement();
 	    }
 	}
-      a = a->get_next();
-    }
+      a = a->enumerate();
+    }
+  */
 }
 
@@ -221,68 +433,18 @@
   
   // draw entities
-  List<WorldEntity> *l;
   WorldEntity* entity;
   
-  l = entities->get_next();  
-  while( l != NULL ) 
+  entity = this->entities->enumerate();
+  while( entity != NULL ) 
     { 
-      entity = l->get_object();
       if( entity->bDraw ) entity->draw();
-      l = l->get_next();
+      entity = this->entities->nextElement();
     }
   
   
   // draw debug coord system
-  glLoadIdentity();
-  
-
-  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);
-	}
-      
-    }
-  
-  //draw track
-  glColor3f(0,1,1);
-  for( int i = 0; i < tracklen; i++)
-    {
-      glVertex3f(pathnodes[i].x,pathnodes[i].y,pathnodes[i].z);
-      glVertex3f(pathnodes[(i+1)%tracklen].x,pathnodes[(i+1)%tracklen].y,pathnodes[(i+1)%tracklen].z);
-    }
-  glEnd();
+  glCallList (objectList);
+
+
 }
 
@@ -297,5 +459,5 @@
 void World::update ()
 {
-  List<WorldEntity> *l;
+  //List<WorldEntity> *l;
   WorldEntity* entity;
   Location* loc;
@@ -303,13 +465,14 @@
   Uint32 t;
   
-  l = entities->get_next();  
-  while( l != NULL ) 
+  //  l = entities->enumerate(); 
+  entity = this->entities->enumerate();
+  while( entity != NULL ) 
     { 
-      entity = l->get_object();
+
       
       if( !entity->isFree() )
 	{
-	  loc = entity->get_location();
-	  plc = entity->get_placement();
+	  loc = entity->getLocation();
+	  plc = entity->getPlacement();
 	  t = loc->part;
 	  
@@ -318,18 +481,18 @@
 	    {
 	      printf("An entity is out of the game area\n");
-	      entity->left_world ();
+	      entity->leftWorld ();
 	    }
 	  else
 	    {
-	      while( track[t].map_coords( loc, plc) )
+	      while( track[t].mapCoords( loc, plc) )
 		{
-		  track[t].post_leave (entity);
+		  track[t].postLeave (entity);
 		  if( loc->part >= tracklen )
 		    {
 		      printf("An entity has left the game area\n");
-		      entity->left_world ();
+		      entity->leftWorld ();
 		      break;
 		    }
-		  track[loc->part].post_enter (entity);
+		  track[loc->part].postEnter (entity);
 		}
 	    }
@@ -337,12 +500,12 @@
       else
 	{
-	  /* TO DO: implement check whether this particular free entity 
+	  /* \todo: implement check whether this particular free entity 
 	     is out of the game area
-	     TO DO: call function to notify the entity that it left 
+	     \todo: call function to notify the entity that it left 
 	     the game area
 	  */
 	}
       
-      l = l->get_next();
+      entity = entities->nextElement();
     }
   
@@ -353,21 +516,18 @@
     \param deltaT: the time passed since the last frame in milliseconds
 */
-void World::time_slice (Uint32 deltaT)
-{
-  List<WorldEntity> *l;
+void World::timeSlice (Uint32 deltaT)
+{
+  //List<WorldEntity> *l;
   WorldEntity* entity;
-  float seconds = deltaT;
-  
-  seconds /= 1000;
-  
-  l = entities->get_next();  
-  while( l != NULL) 
+  float seconds = deltaT / 1000.0;
+  
+  entity = entities->enumerate(); 
+  while( entity != NULL) 
     { 
-      entity = l->get_object();
       entity->tick (seconds);
-      l = l->get_next();
-    }
-  
-  for( int i = 0; i < tracklen; i++) track[i].tick (seconds);
+      entity = entities->nextElement();
+    }
+
+  //for( int i = 0; i < tracklen; i++) track[i].tick (seconds);
 }
 
@@ -387,7 +547,7 @@
    Camera Placement
 */
-void World::calc_camera_pos (Location* loc, Placement* plc)
-{
-  track[loc->part].map_camera (loc, plc);
+void World::calcCameraPos (Location* loc, Placement* plc)
+{
+  track[loc->part].mapCamera (loc, plc);
 }
 
@@ -403,42 +563,58 @@
 }
 
+
+
+/**
+   \brief function to put your own debug stuff into it. it can display informations about
+   the current class/procedure
+*/
 void World::debug()
 {
-  List<WorldEntity> *l;
+  //List<WorldEntity> *l;
   WorldEntity* entity;
   
   printf("counting all entities\n");
-  l = entities->get_next();  
-  while( l != NULL ) 
+  printf("World::debug() - enumerate()\n");
+  entity = entities->enumerate();  
+  while( entity != NULL ) 
     { 
-      entity = l->get_object();
       if( entity->bDraw ) printf("got an entity\n");
-      l = l->get_next();
-    }
-}
-
-
+      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();
-  this->bQuitOrxonox = false;
-  this->bQuitCurrentGame = false;
-  printf("World|Entering main loop\n");
-  while(!this->bQuitOrxonox && !this->bQuitCurrentGame) /* pause pause pause ?!?!?*/
-    {
-      //debug routine
-      //debug();
+  printf("World::mainLoop() - Entering main loop\n");
+  while( !this->bQuitOrxonox && !this->bQuitCurrentGame) /* \todo implement pause */
+    {
       // Network
       synchronize();
       // Process input
-      handle_input();
+      handleInput();
+      if( this->bQuitCurrentGame || this->bQuitOrxonox)
+	{
+	  printf("World::mainLoop() - leaving loop earlier...\n");
+	  break;
+	}
       // Process time
-      time_slice();
+      timeSlice();
       // Process collision
       collision();
       // Draw
       display();
-    }
-  printf("World|Exiting the main loop\n");
+  
+      for(int i = 0; i < 10000000; i++) {}
+    }
+  printf("World::mainLoop() - Exiting the main loop\n");
 }
 
@@ -454,9 +630,13 @@
 /**
    \brief run all input processing
-*/
-void World::handle_input ()
+
+   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
-  Orxonox::getInstance()->get_localinput()->process();
+  CommandNode* cn = Orxonox::getInstance()->getLocalInput();
+  cn->process();
   // remoteinput
 }
@@ -464,6 +644,10 @@
 /**
    \brief advance the timeline
-*/
-void World::time_slice ()
+
+   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();
@@ -471,5 +655,5 @@
     {
       Uint32 dt = currentFrame - this->lastFrame;
-      /*
+      
       if(dt > 0)
 	{
@@ -479,14 +663,19 @@
       else
 	{
-	  printf("fps = 1000\n");
-	}
-      */
-      this->time_slice (dt);
+	  /* 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);
       this->update ();
-      this->localCamera->time_slice (dt);
+      this->localCamera->timeSlice(dt);
     }
   this->lastFrame = currentFrame;
 }
 
+
 /**
    \brief compute collision detection
@@ -497,21 +686,9 @@
 }
 
-/**
-   \brief handle keyboard commands that are not meant for WorldEntities
-   \param cmd: the command to handle
-   \return true if the command was handled by the system or false if it may be passed to the WorldEntities
-*/
-bool World::system_command (Command* cmd)
-{
-  if( !strcmp( cmd->cmd, "quit"))
-    {
-      if( !cmd->bUp) this->bQuitOrxonox = true;
-      return true;
-    }
-  return false;
-}
-
-/**
-	\brief render the current frame
+
+/**
+   \brief render the current frame
+   
+   clear all buffers and draw the world
 */
 void World::display ()
@@ -528,4 +705,10 @@
 }
 
+/**
+   \brief give back active camera
+   
+   this passes back the actualy active camera
+   \todo ability to define more than one camera or camera-places
+*/
 Camera* World::getCamera()
 {
@@ -534,4 +717,8 @@
 
 
+/**
+   \brief add and spawn a new entity to this world
+   \param entity to be added
+*/
 void World::spawn(WorldEntity* entity)
 {
@@ -539,20 +726,76 @@
   Location* loc = NULL;
   WorldEntity* owner;
-  //T* entity = new T();
-  entities->add (entity, LIST_ADD_NEXT);
-  //if( loc == NULL)
-  //{
-      zeroloc.dist = 0;
-      zeroloc.part = 0;
-      zeroloc.pos = Vector();
-      zeroloc.rot = Quaternion();
-      loc = &zeroloc;
-      //}
+
+  entities->add (entity);
+  zeroloc.dist = 0;
+  zeroloc.part = 0;
+  zeroloc.pos = Vector();
+  zeroloc.rot = Quaternion();
+  loc = &zeroloc;
   entity->init (loc, owner);
   if (entity->bFree)
     {
-      this->track[loc->part].map_coords( loc, entity->get_placement());
-    }
-  entity->post_spawn ();
+      this->track[loc->part].mapCoords( loc, entity->getPlacement());
+    }
+  entity->postSpawn ();
+}
+
+
+/**
+   \brief add and spawn a new entity to this world
+   \param entity to be added
+   \param location where to add
+*/
+void World::spawn(WorldEntity* entity, Location* loc)
+{
+  Location zeroLoc;
+  WorldEntity* owner;
+  this->entities->add (entity);
+  if( loc == NULL)
+    {
+      zeroLoc.dist = 0;
+      zeroLoc.part = 0;
+      zeroLoc.pos = Vector();
+      zeroLoc.rot = Quaternion();
+      loc = &zeroLoc;
+    }
+  entity->init (loc, owner);
+  if (entity->bFree)
+    {
+      this->track[loc->part].mapCoords( loc, entity->getPlacement());
+    }
+  entity->postSpawn ();
   //return entity;
 }
+
+
+/**
+   \brief add and spawn a new entity to this world
+   \param entity to be added
+   \param place where to be added
+*/
+void World::spawn(WorldEntity* entity, Placement* plc)
+{
+  Placement zeroPlc;
+  WorldEntity* owner;
+  if( plc == NULL)
+    {
+      zeroPlc.r = Vector();
+      zeroPlc.w = Quaternion();
+      plc = &zeroPlc;
+    }
+  this->entities->add (entity);
+  entity->init (plc, owner);
+  entity->postSpawn ();
+  //return entity;
+}
+
+
+/*
+  \brief commands that the world must catch
+  \returns false if not used by the world
+*/
+bool World::command(Command* cmd)
+{
+  return false;
+}
Index: orxonox/branches/sound/src/world.h
===================================================================
--- orxonox/branches/sound/src/world.h	(revision 3179)
+++ orxonox/branches/sound/src/world.h	(revision 3238)
@@ -4,6 +4,6 @@
 */ 
 
-#ifndef WORLD_H
-#define WORLD_H
+#ifndef _WORLD_H
+#define _WORLD_H
 
 #include "stdincl.h"
@@ -22,36 +22,39 @@
   World (char* name);
   World (int worldID);
-  ~World ();
+  virtual ~World ();
 
   template<typename T> 
-    T* spawn(Location* loc, WorldEntity* owner);	// template to be able to spawn any derivation of WorldEntity
+    T* spawn (Location* loc, WorldEntity* owner);	// template to be able to spawn any derivation of WorldEntity
   template<typename T> 
-    T* spawn(Placement* plc, WorldEntity* owner);
+    T* spawn (Placement* plc, WorldEntity* owner);
   
-  virtual Error init();
-  virtual Error start();
-  virtual Error stop();
-  virtual Error pause();
-  virtual Error resume();
+  virtual ErrorMessage init ();
+  virtual ErrorMessage start ();
+  virtual ErrorMessage stop ();
+  virtual ErrorMessage pause ();
+  virtual ErrorMessage resume ();
 
-  virtual void load();
+  virtual void load ();
+  virtual void destroy ();
 
-  void time_slice (Uint32 deltaT);
+  void timeSlice (Uint32 deltaT);
   void collide ();
   void draw ();
   void update ();	// maps Locations to Placements
-  void calc_camera_pos (Location* loc, Placement* plc);
+  void calcCameraPos (Location* loc, Placement* plc);
 	
   void unload ();
+  bool command (Command* cmd);
   
-  void setTrackLen(Uint32 tracklen);
-  int getTrackLen();
-  bool system_command (Command* cmd);
-  Camera* getCamera();
-  //private:
+  void setTrackLen (Uint32 tracklen);
+  int getTrackLen ();
+  //bool system_command (Command* cmd);
+  Camera* getCamera ();
 
-  void spawn(WorldEntity* entity);
+  void spawn (WorldEntity* entity);
+  void spawn (WorldEntity* entity, Location* loc);
+  void spawn (WorldEntity* entity, Placement* plc);
 
-  List<WorldEntity>* entities;
+  tList<WorldEntity>* entities;
   
   // base level data
@@ -69,75 +72,16 @@
   char* worldName;
   int debugWorldNr;
+  GLuint objectList;
 
   WorldEntity* localPlayer;
   
-  void mainLoop();
-  void synchronize();
-  void handle_input();
-  void time_slice();
-  void collision();
-  void display();
-  void debug();
+  void mainLoop ();
+  void synchronize ();
+  void handleInput ();
+  void timeSlice ();
+  void collision ();
+  void display ();
+  void debug ();
 };
 
-/**
-    \brief spawn a new WorldEntity at a Location
-    \param loc: the Location where the Entity should be spawned
-    \param owner: a pointer to the parent of the Entity
-    \return a pointer to the new WorldEntity or NULL if there was an error
-    
-    You can use this function to spawn any derivation of WorldEntity you want, just specify the desired
-    class within the template specification brackets. Do not attempt to spawn any classes that have NOT been
-    derived from WorldEntity, you won't even be able to compile the code. Note that this version of spawn()
-    works with both free and bound WorldEntities.
-*/ 
-template<typename T> T* World::spawn(Location* loc = NULL, WorldEntity* owner = NULL)
-{
-  Location zeroloc;
-  T* entity = new T();
-  entities->add ((WorldEntity*)entity, LIST_ADD_NEXT);
-  if( loc == NULL)
-    {
-      zeroloc.dist = 0;
-      zeroloc.part = 0;
-      zeroloc.pos = Vector();
-      zeroloc.rot = Quaternion();
-      loc = &zeroloc;
-    }
-  entity->init (loc, owner);
-  if (entity->bFree)
-    {
-      track[loc->part].map_coords( loc, entity->get_placement());
-    }
-  entity->post_spawn ();
-  return entity;
-}
-
-/**
-    \brief spawn a new WorldEntity at a Placement
-    \param lplc: the placement where the Entity should be spawned
-    \param owner: a pointer to the parent of the Entity
-    \return a pointer to the new WorldEntity or NULL if there was an error
-    
-    You can use this function to spawn any FREE derivation of WorldEntity you want, just specify the desired
-    class within the template specification brackets. Do not attempt to spawn any classes that have NOT been
-    derived from WorldEntity, you won't even be able to compile the code. Note that this version of spawn()
-    works with free WorldEntities only, you will provoke an error message if you try to spawn a bound Entity with 
-    a Placement.
-*/ 
-template<typename T> T* World::spawn(Placement* plc, WorldEntity* owner = NULL)
-{
-  T* entity = new T();
-  entities->add ((WorldEntity*)entity, LIST_ADD_NEXT);
-  entity->init (plc, owner);
-  if (!entity->bFree)
-    {
-      printf("Can't spawn unfree entity with placement\n"); 
-      entities->remove( (WorldEntity*)entity, LIST_FIND_FW);
-      return NULL;
-    }
-  entity->post_spawn ();
-  return entity;
-}
-
-#endif
+#endif /* _WORLD_H */
Index: orxonox/branches/sound/src/world_entity.cc
===================================================================
--- orxonox/branches/sound/src/world_entity.cc	(revision 3179)
+++ orxonox/branches/sound/src/world_entity.cc	(revision 3238)
@@ -36,6 +36,7 @@
 WorldEntity::WorldEntity (bool isFree) : bFree(isFree)
 {
-	collisioncluster = NULL;
-	owner = NULL;
+  this->bDraw = true;
+  collisioncluster = NULL;
+  owner = NULL;
 }
 
@@ -45,28 +46,28 @@
 WorldEntity::~WorldEntity ()
 {
-	if( collisioncluster != NULL) delete collisioncluster;
+  if( collisioncluster != NULL) delete collisioncluster;
 }
 
 /**
-	\brief get the Location of the WorldEntity
-	\return a pointer to location
+   \brief get the Location of the WorldEntity
+   \return a pointer to location
 */
-Location* WorldEntity::get_location ()
+Location* WorldEntity::getLocation ()
 {
-	return &loc;
+  return &loc;
 }
 
 /**
-	\brief get the Placement of the WorldEntity
-	\return a pointer to placement
+   \brief get the Placement of the WorldEntity
+   \return a pointer to placement
 */
-Placement* WorldEntity::get_placement ()
+Placement* WorldEntity::getPlacement ()
 {
-	return &place;
+  return &place;
 }
 
 /**
-	\brief query whether the WorldEntity in question is free
-	\return true if the WorldEntity is free or false if it isn't
+   \brief query whether the WorldEntity in question is free
+   \return true if the WorldEntity is free or false if it isn't
 */
 bool WorldEntity::isFree ()
@@ -76,21 +77,21 @@
 
 /**
-	\brief set the WorldEntity's collision hull
-	\param newhull: a pointer to a completely assembled CollisionCluster
-	
-	Any previously assigned collision hull will be deleted on reassignment
+   \brief set the WorldEntity's collision hull
+   \param newhull: a pointer to a completely assembled CollisionCluster
+   
+   Any previously assigned collision hull will be deleted on reassignment
 */
-void WorldEntity::set_collision (CollisionCluster* newhull)
+void WorldEntity::setCollision (CollisionCluster* newhull)
 {
-	if( newhull == NULL) return;
-	if( collisioncluster != NULL) delete collisioncluster;
-	collisioncluster = newhull;
+  if( newhull == NULL) return;
+  if( collisioncluster != NULL) delete collisioncluster;
+  collisioncluster = newhull;
 }
 
 /**
-	\brief this method is called every frame
-	\param time: the time in seconds that has passed since the last tick
-	
-	Handle all stuff that should update with time inside this method (movement, animation, etc.)
+   \brief this method is called every frame
+   \param time: the time in seconds that has passed since the last tick
+   
+   Handle all stuff that should update with time inside this method (movement, animation, etc.)
 */
 void WorldEntity::tick(float time) 
@@ -100,5 +101,5 @@
 /**
    \brief the entity is drawn onto the screen with this function
-
+   
    This is a central function of an entity: call it to let the entity painted to the screen. Just override this function with whatever you want to be drawn.
 */
@@ -108,10 +109,10 @@
 
 /**
-	\brief this function is called, when two entities collide
-	\param other: the world entity with whom it collides
-	\param ownhitflags: flags to the CollisionCluster subsections that registered an impact
-	\param otherhitflags: flags to the CollisionCluster subsections of the other entity that registered an impact
+   \brief this function is called, when two entities collide
+   \param other: the world entity with whom it collides
+   \param ownhitflags: flags to the CollisionCluster subsections that registered an impact
+   \param otherhitflags: flags to the CollisionCluster subsections of the other entity that registered an impact
 
-	Implement behaviour like damage application or other miscellaneous collision stuff in this function
+   Implement behaviour like damage application or other miscellaneous collision stuff in this function
 */
 void WorldEntity::collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags) {}
@@ -135,37 +136,37 @@
 
 /**
-	\brief basic initialisation for bound Entities
+   \brief basic initialisation for bound Entities
 */
 void WorldEntity::init( Location* spawnloc, WorldEntity* spawnowner)
 {
-	loc = *spawnloc;
-	owner = spawnowner;
+  loc = *spawnloc;
+  owner = spawnowner;
 }
 
 /**
-	\brief basic initialisation for free Entities
+   \brief basic initialisation for free Entities
 */
 void WorldEntity::init( Placement* spawnplc, WorldEntity* spawnowner)
 {
-	place = *spawnplc;
-	owner = spawnowner;
+  place = *spawnplc;
+  owner = spawnowner;
 }
 
 /**
-	\brief this is called immediately after the Entity has been constructed and initialized
-	
-	Put any initialisation code that requires knowledge of location (placement if the Entity is free) and owner of the entity here.
-	DO NOT place such code in the constructor, those variables are set AFTER the entity is constucted.
+   \brief this is called immediately after the Entity has been constructed and initialized
+   
+   Put any initialisation code that requires knowledge of location (placement if the Entity is free) and owner of the entity here.
+   DO NOT place such code in the constructor, those variables are set AFTER the entity is constucted.
 */
-void WorldEntity::post_spawn ()
+void WorldEntity::postSpawn ()
 {
 }
 
 /**
-	\brief this handles incoming command messages
-	\param cmd: a pointer to the incoming Command structure
-	
-	Put all code that handles Command messages here, this will mainly be called by the assigned CommandNode but can also be used
-	to send commands from one WorldEntity to another.
+   \brief this handles incoming command messages
+   \param cmd: a pointer to the incoming Command structure
+   
+   Put all code that handles Command messages here, this will mainly be called by the assigned CommandNode but can also be used
+   to send commands from one WorldEntity to another.
 */
 void WorldEntity::command (Command* cmd)
@@ -174,21 +175,21 @@
 
 /**
-	\brief this is called by the local Camera to determine the point it should look at on the WorldEntity
-	\param locbuf: a pointer to the buffer to fill with a location to look at
+   \brief this is called by the local Camera to determine the point it should look at on the WorldEntity
+   \param locbuf: a pointer to the buffer to fill with a location to look at
 	
-	You may put any Location you want into locbuf, the Camera will determine via the corresponding Track how
-	to look at the location you return with this.
+   You may put any Location you want into locbuf, the Camera will determine via the corresponding Track how
+   to look at the location you return with this.
 */
-void WorldEntity::get_lookat (Location* locbuf)
+void WorldEntity::getLookat (Location* locbuf)
 {
 }
 
 /**
-	\brief this method is called by the world if the WorldEntity leaves valid gamespace
-	
-	For free entities this means it left the Track boundaries. With bound entities it means its Location adresses a
-	place that is not in the world anymore. In both cases you might have to take extreme measures (a.k.a. call destroy).
+   \brief this method is called by the world if the WorldEntity leaves valid gamespace
+   
+   For free entities this means it left the Track boundaries. With bound entities it means its Location adresses a
+   place that is not in the world anymore. In both cases you might have to take extreme measures (a.k.a. call destroy).
 */
-void WorldEntity::left_world ()
+void WorldEntity::leftWorld ()
 {
 }
Index: orxonox/branches/sound/src/world_entity.h
===================================================================
--- orxonox/branches/sound/src/world_entity.h	(revision 3179)
+++ orxonox/branches/sound/src/world_entity.h	(revision 3238)
@@ -4,6 +4,6 @@
 */
 
-#ifndef WORLD_ENTITY_H
-#define WORLD_ENTITY_H
+#ifndef _WORLD_ENTITY_H
+#define _WORLD_ENTITY_H
 
 #include "stdincl.h"
@@ -18,9 +18,9 @@
  public:
   WorldEntity (bool isFree = false);
-  ~WorldEntity ();
+  virtual ~WorldEntity ();
   
-  Location* get_location ();
-  Placement* get_placement ();
-  void set_collision (CollisionCluster* newhull);
+  Location* getLocation ();
+  Placement* getPlacement ();
+  void setCollision (CollisionCluster* newhull);
   
   bool isFree ();
@@ -29,5 +29,5 @@
   //void removeAbility(Ability* ability);
   
-  virtual void post_spawn ();
+  virtual void postSpawn ();
   virtual void tick (float time);
   virtual void hit (WorldEntity* weapon, Vector loc);
@@ -37,7 +37,7 @@
   
   virtual void draw ();
-  virtual void get_lookat (Location* locbuf);
+  virtual void getLookat (Location* locbuf);
   
-  virtual void left_world ();
+  virtual void leftWorld ();
   
  private:
@@ -55,3 +55,3 @@
 };
 
-#endif
+#endif /* _WORLD_ENTITY_H */
