Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3605 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Mar 18, 2005, 11:52:15 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: merged trunk back to levelloader
merged with command:
svn merge -r 3499:HEAD trunk branches/levelloader

Conflicts in
C track_manager.h
C world_entities/player.cc
C world_entities/player.h
C world_entities/environment.h
C lib/coord/p_node.cc
C defs/debug.h
C track_manager.cc
C story_entities/campaign.h

solved in merge-favouring. It was quite easy because Chris only worked on the headers, and he didi it quite clean. Thats the spirit :)

Conflits in world.cc are a MESS: fix it

Location:
orxonox/branches/levelloader
Files:
8 deleted
70 edited
23 copied

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelloader/ChangeLog

    r1956 r3605  
     12005-03-16      orxonox
     2        Finished work on version 0.2.1-pre-alpha released 0.2.2-pre-alpha
     3
     42005-03-15      Patrick Boenzli <patrick@orxonox.ethz.ch>
     5        parenting finished
     6
     72005-03-09      Patrick Boenzli <patrick@orxonox.ethz.ch>
     8        Big Cleanup again
     9       
     102005-03-01      Benjamin Grauer <bensch@orxonox.ethz.ch>
     11        Added Light Class
     12       
     132005-02-27      Benjamin Grauer <bensch@orxonox.ethz.ch>
     14        Big Configure.ac-cleanup
     15
     162005-02-22      David Gruetter <davgr@gmx.ch>
     17        Added Skysphere
     18       
     192005-01-07      Patrick Boenzli <patrick@orxonox.ethz.ch>
     20        LoadScreen implemented
     21       
     222004-12-20      Patrick Boenzli <patrick@orxonox.ethz.ch>
     23        New Version out 0.2.1-pre-alpha
     24       
     252004-12-20      Patrick Boenzli <patrick@orxonox.ethz.ch>
     26        HEAVY cleanup of the framework
     27
     282004-12-18      Patrick Boenzli <patrick@orxonox.ethz.ch>
     29        enhanced the Command Node
     30
     312004-12-15      Nico Benold <bernoldn@ee.ethz.ch>
     32        OS X support
     33       
     342004-12-15      Benjamin Grauer <bensch@orxonox.ethz.ch>
     35        Defined standard coding rules
     36
     372004-12-15      Benjamin Grauer <bensch@orxonox.ethz.ch>
     38        Added Importer for showing 3D Object.
     39
     402004-11-07      David Gruetter <davgr@gmx.ch>
     41        Shaded Terrain
     42       
     432004-10-23      Adrian Buerli <buerlia@ee.ethz.ch>
     44        Dynamic Mountains, dynamic movement.
     45       
     462004-10-18      Patrick Boenzli <patrick@orxonox.ethz.ch>
     47        Release 0.1-pre-alpha
     48
     492004-07-17      Christian Meyer <cmeyer@ee.ethz.ch>
     50        SDL-Framework
     51       
     522004-06-09      Tom of ethz
     53        Added endless Mountains
     54
     552004-06-02      Benjamin Grauer <bensch@orxonox.ethz.ch>
     56        Added Console
     57       
     582004-05-20      Patrick Boenzli <patrick@orxonox.ethz.ch>
     59        Added the ability to shoot
     60
     612004-05-05      Benjamin Grauer <bensch@orxonox.ethz.ch>
     62        Added the GUI.
     63
     642004-04-21      Patrik Boenzli <patrick@orxonox.ethz.ch>
     65        Added Makefile to orxonox
     66
     672004-04-25      Amir Guindehi <amir@guindehi.ch>
     68        Created Project Orxonox
     69       
     70
     71       
  • orxonox/branches/levelloader/INSTALL

    r1956 r3605  
     1
     2INSTALLATION INSTRUCTIONS FOR ORXONOX
     3=====================================
     4
     5INSTALLATION
     6============
     7
     8To make it quite easy for those of you who just want to install orxonox:
     9
     101. ./configure
     112. make
     123. make install
     13
     14(Further Information please see below at autoconf information)
     15
     16DEPENDENCIES
     17============
     18
     19There are some dependencies for orxonox you have to install:
     20
     211. SDL           (http://www.libsdl.org)
     222. OPENGL        (http://www.opengl.org)
     233. SDL_mixer     (http://www.libsdl.org/projects/SDL_mixer)
     244. SDL_image     (http://www.libsdl.org/projects/SDL_image)
     255. SDL_ttf       (http://www.libsdl.org/projects/SDL_ttf)
     26 a) needs libttf (http://www.freetype.org/)
     27
     28Nice to Have:
     296. Doxygen       (http://www.stack.nl/~dimitri/doxygen/)
     307. Automake      (http://www.gnu.org/software/automake/)
     318. Autoconf      (http://www.gnu.org/software/autoconf/)
     32
     33Windows Users also need the following:
     349. mingw         (http://mingw.org/)
     35
     36
     37BUGS
     38====
     39Send bug reports to orxonox-dev@mail.datacore.ch
     40
     41ORXONOX->
     42##########################################################
     43                                                <-AUTOCONF
     44
     45
     46
    147Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
    248Foundation, Inc.
  • orxonox/branches/levelloader/Makefile.in

    r3563 r3605  
    1 # Makefile.in generated by automake 1.8.2 from Makefile.am.
     1# Makefile.in generated by automake 1.8.5 from Makefile.am.
    22# @configure_input@
    33
     
    3838        $(srcdir)/Makefile.in $(srcdir)/config.h.in \
    3939        $(srcdir)/doc/documentation.am $(top_srcdir)/configure AUTHORS \
    40         COPYING ChangeLog INSTALL NEWS TODO config.guess config.sub \
    41         depcomp install-sh missing mkinstalldirs
     40        COPYING ChangeLog INSTALL NEWS config.guess config.sub depcomp \
     41        install-sh missing mkinstalldirs
    4242subdir = .
    4343ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     
    9494DEFS = @DEFS@
    9595DEPDIR = @DEPDIR@
     96DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@
     97DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@
    9698DOXYGEN = @DOXYGEN@
    9799DOXYGEN_FALSE = @DOXYGEN_FALSE@
     
    326328        tags=; \
    327329        here=`pwd`; \
    328         if (etags --etags-include --version) >/dev/null 2>&1; then \
     330        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
    329331          include_option=--etags-include; \
     332          empty_fix=.; \
    330333        else \
    331334          include_option=--include; \
     335          empty_fix=; \
    332336        fi; \
    333337        list='$(SUBDIRS)'; for subdir in $$list; do \
    334338          if test "$$subdir" = .; then :; else \
    335             test -f $$subdir/TAGS && \
     339            test ! -f $$subdir/TAGS || \
    336340              tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
    337341          fi; \
     
    343347          $(AWK) '    { files[$$0] = 1; } \
    344348               END { for (i in files) print i; }'`; \
    345         test -z "$(ETAGS_ARGS)$$tags$$unique" \
    346           || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    347              $$tags $$unique
     349        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
     350          test -n "$$unique" || unique=$$empty_fix; \
     351          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     352            $$tags $$unique; \
     353        fi
    348354ctags: CTAGS
    349355CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
     
    454460          uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\
    455461        *.shar.gz*) \
    456           GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | unshar ;;\
     462          GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
    457463        *.zip*) \
    458464          unzip $(distdir).zip ;;\
     
    477483          && chmod -R a-w "$$dc_install_base" \
    478484          && ({ \
    479                (cd ../.. && $(mkdir_p) "$$dc_destdir") \
     485               (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
    480486               && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
    481487               && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
     
    654660@DOXYGEN_TRUE@clean-local:  doc-delete
    655661
    656 @DOXYGEN_TRUE@all-local: doc
     662@DOCUMENTATION_TRUE@@DOXYGEN_TRUE@all-local: doc
     663@DOCUMENTATION_FALSE@@DOXYGEN_TRUE@all-local:
    657664
    658665@DOXYGEN_TRUE@.PHONY: doc doc-config doc-delete
  • orxonox/branches/levelloader/aclocal.m4

    r3563 r3605  
    1 # generated automatically by aclocal 1.8.2 -*- Autoconf -*-
     1# generated automatically by aclocal 1.8.5 -*- Autoconf -*-
    22
    33# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
     
    4141# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
    4242AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
    43          [AM_AUTOMAKE_VERSION([1.8.2])])
     43         [AM_AUTOMAKE_VERSION([1.8.5])])
    4444
    4545# AM_AUX_DIR_EXPAND
     
    150150fi])])
    151151
    152 # serial 6                                              -*- Autoconf -*-
     152# serial 7                                              -*- Autoconf -*-
    153153
    154154# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
     
    237237    for i in 1 2 3 4 5 6; do
    238238      echo '#include "conftst'$i'.h"' >> sub/conftest.c
    239       : > sub/conftst$i.h
     239      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
     240      # Solaris 8's {/usr,}/bin/sh.
     241      touch sub/conftst$i.h
    240242    done
    241243    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
     
    265267       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
    266268      # icc doesn't choke on unknown options, it will just issue warnings
    267       # (even with -Werror).  So we grep stderr for any message
    268       # that says an option was ignored.
    269       if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
     269      # or remarks (even with -Werror).  So we grep stderr for any message
     270      # that says an option was ignored or not supported.
     271      # When given -MP, icc 7.0 and 7.1 complain thusly:
     272      #   icc: Command line warning: ignoring option '-M'; no argument required
     273      # The diagnosis changed in icc 8.0:
     274      #   icc: Command line remark: option '-MP' not supported
     275      if (grep 'ignoring option' conftest.err ||
     276          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
    270277        am_cv_$1_dependencies_compiler_type=$depmode
    271278        break
     
    313320# Generate code to set up dependency tracking.   -*- Autoconf -*-
    314321
    315 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
     322# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    316323
    317324# This program is free software; you can redistribute it and/or modify
     
    352359  # Extract the definition of DEP_FILES from the Makefile without
    353360  # running `make'.
    354   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
     361  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
    355362  test -z "$DEPDIR" && continue
    356363  # When using ansi2knr, U may be empty or an underscore; expand it
    357   U=`sed -n -e '/^U = / s///p' < "$mf"`
     364  U=`sed -n 's/^U = //p' < "$mf"`
    358365  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
    359366  # We invoke sed twice because it is the simplest approach to
    360367  # changing $(DEPDIR) to its actual value in the expansion.
    361   for file in `sed -n -e '
     368  for file in `sed -n '
    362369    /^DEP_FILES = .*\\\\$/ {
    363370      s/^DEP_FILES = //
     
    718725# Do not use -m 0755 and let people choose whatever they expect by
    719726# setting umask.
     727#
     728# We cannot accept any implementation of `mkdir' that recognizes `-p'.
     729# Some implementations (such as Solaris 8's) are not thread-safe: if a
     730# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
     731# concurrently, both version can detect that a/ is missing, but only
     732# one can create it and the other will error out.  Consequently we
     733# restrict ourselves to GNU make (using the --version option ensures
     734# this.)
    720735AC_DEFUN([AM_PROG_MKDIR_P],
    721 [if mkdir -p -- . 2>/dev/null; then
     736[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
    722737  # Keeping the `.' argument allows $(mkdir_p) to be used without
    723738  # argument.  Indeed, we sometimes output rules like
     
    732747  # directories to create, and then abort because `.' already
    733748  # exists.
    734   for d in ./-p ./--;
     749  for d in ./-p ./--version;
    735750  do
    736751    test -d $d && rmdir $d
  • orxonox/branches/levelloader/config.h.in

    r3499 r3605  
    8989#undef HAVE__BOOL
    9090
     91/* if Modular-DUBUG mode is enabled */
     92#undef MODULAR_DEBUG
     93
    9194/* Name of package */
    9295#undef PACKAGE
  • orxonox/branches/levelloader/configure

    r3563 r3605  
    11#! /bin/sh
    22# Guess values for system-dependent variables and create Makefiles.
    3 # Generated by GNU Autoconf 2.59 for orxonox 0.2.1-pre-alpha.
     3# Generated by GNU Autoconf 2.59 for orxonox 0.2.2-pre-alpha.
    44#
    55# Report bugs to <orxonox-dev at mail.datacore.ch>.
     
    270270PACKAGE_NAME='orxonox'
    271271PACKAGE_TARNAME='orxonox'
    272 PACKAGE_VERSION='0.2.1-pre-alpha'
    273 PACKAGE_STRING='orxonox 0.2.1-pre-alpha'
     272PACKAGE_VERSION='0.2.2-pre-alpha'
     273PACKAGE_STRING='orxonox 0.2.2-pre-alpha'
    274274PACKAGE_BUGREPORT='orxonox-dev at mail.datacore.ch'
    275275
     
    312312#endif"
    313313
    314 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG SUB_PROJECTS_TRUE SUB_PROJECTS_FALSE DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_FALSE GTHREAD_LIBS GTHREAD_CFLAGS HAVE_GTHREAD_TRUE HAVE_GTHREAD_FALSE CURL_LIBS CURL_CFLAGS HAVE_CURL_TRUE HAVE_CURL_FALSE LIBOBJS LTLIBOBJS'
     314ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG SUB_PROJECTS_TRUE SUB_PROJECTS_FALSE DOCUMENTATION_TRUE DOCUMENTATION_FALSE DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_FALSE GTHREAD_LIBS GTHREAD_CFLAGS HAVE_GTHREAD_TRUE HAVE_GTHREAD_FALSE CURL_LIBS CURL_CFLAGS HAVE_CURL_TRUE HAVE_CURL_FALSE LIBOBJS LTLIBOBJS'
    315315ac_subst_files=''
    316316
     
    789789  # This message is too long to be a string in the A/UX 3.1 sh.
    790790  cat <<_ACEOF
    791 \`configure' configures orxonox 0.2.1-pre-alpha to adapt to many kinds of systems.
     791\`configure' configures orxonox 0.2.2-pre-alpha to adapt to many kinds of systems.
    792792
    793793Usage: $0 [OPTION]... [VAR=VALUE]...
     
    856856if test -n "$ac_init_help"; then
    857857  case $ac_init_help in
    858      short | recursive ) echo "Configuration of orxonox 0.2.1-pre-alpha:";;
     858     short | recursive ) echo "Configuration of orxonox 0.2.2-pre-alpha:";;
    859859   esac
    860860  cat <<\_ACEOF
     
    867867  --enable-debug          compiles in debug mode. Lots of debug info about the
    868868                          game.
     869  --disable-modular-debug compiles in modular-debug mode, that logs
     870                          differently on the many modules of orxonox.
    869871  --enable-sub-projects   also builds the subProjects while make from srcdir
     872  --enable-documentation  also builds the sDocumentation while make from
     873                          srcdir
    870874
    871875Optional Packages:
     
    988992if $ac_init_version; then
    989993  cat <<\_ACEOF
    990 orxonox configure 0.2.1-pre-alpha
     994orxonox configure 0.2.2-pre-alpha
    991995generated by GNU Autoconf 2.59
    992996
     
    10021006running configure, to aid debugging if configure makes a mistake.
    10031007
    1004 It was created by orxonox $as_me 0.2.1-pre-alpha, which was
     1008It was created by orxonox $as_me 0.2.2-pre-alpha, which was
    10051009generated by GNU Autoconf 2.59.  Invocation command line was
    10061010
     
    15991603fi
    16001604
    1601 if mkdir -p -- . 2>/dev/null; then
     1605if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
    16021606  # Keeping the `.' argument allows $(mkdir_p) to be used without
    16031607  # argument.  Indeed, we sometimes output rules like
     
    16121616  # directories to create, and then abort because `.' already
    16131617  # exists.
    1614   for d in ./-p ./--;
     1618  for d in ./-p ./--version;
    16151619  do
    16161620    test -d $d && rmdir $d
     
    17221726# Define the identity of the package.
    17231727 PACKAGE='orxonox'
    1724  VERSION='0.2.1-pre-alpha'
     1728 VERSION='0.2.2-pre-alpha'
    17251729
    17261730
     
    25182522    for i in 1 2 3 4 5 6; do
    25192523      echo '#include "conftst'$i'.h"' >> sub/conftest.c
    2520       : > sub/conftst$i.h
     2524      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
     2525      # Solaris 8's {/usr,}/bin/sh.
     2526      touch sub/conftst$i.h
    25212527    done
    25222528    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
     
    25462552       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
    25472553      # icc doesn't choke on unknown options, it will just issue warnings
    2548       # (even with -Werror).  So we grep stderr for any message
    2549       # that says an option was ignored.
    2550       if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
     2554      # or remarks (even with -Werror).  So we grep stderr for any message
     2555      # that says an option was ignored or not supported.
     2556      # When given -MP, icc 7.0 and 7.1 complain thusly:
     2557      #   icc: Command line warning: ignoring option '-M'; no argument required
     2558      # The diagnosis changed in icc 8.0:
     2559      #   icc: Command line remark: option '-MP' not supported
     2560      if (grep 'ignoring option' conftest.err ||
     2561          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
    25512562        am_cv_CXX_dependencies_compiler_type=$depmode
    25522563        break
     
    33493360    for i in 1 2 3 4 5 6; do
    33503361      echo '#include "conftst'$i'.h"' >> sub/conftest.c
    3351       : > sub/conftst$i.h
     3362      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
     3363      # Solaris 8's {/usr,}/bin/sh.
     3364      touch sub/conftst$i.h
    33523365    done
    33533366    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
     
    33773390       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
    33783391      # icc doesn't choke on unknown options, it will just issue warnings
    3379       # (even with -Werror).  So we grep stderr for any message
    3380       # that says an option was ignored.
    3381       if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
     3392      # or remarks (even with -Werror).  So we grep stderr for any message
     3393      # that says an option was ignored or not supported.
     3394      # When given -MP, icc 7.0 and 7.1 complain thusly:
     3395      #   icc: Command line warning: ignoring option '-M'; no argument required
     3396      # The diagnosis changed in icc 8.0:
     3397      #   icc: Command line remark: option '-MP' not supported
     3398      if (grep 'ignoring option' conftest.err ||
     3399          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
    33823400        am_cv_CC_dependencies_compiler_type=$depmode
    33833401        break
     
    38463864if test x$DEBUG = xno; then
    38473865        echo "no"
    3848         echo " -> Setting debuglevel to 3. (orxonox is still in Development. It really is needed."
    3849         DEBUG=3
     3866        echo " -> Setting debuglevel to 4. (orxonox is still in Development. It really is needed."
     3867        DEBUG=4
    38503868elif test x$DEBUG = xyes; then
    38513869        echo "yes"
     
    38623880
    38633881
     3882
     3883#---------------#
     3884# Modular Debug #
     3885#---------------#
     3886MODULAR_DEBUG=yes
     3887echo "$as_me:$LINENO: checking if Modular-DEBUG-mode should be ebabled" >&5
     3888echo $ECHO_N "checking if Modular-DEBUG-mode should be ebabled... $ECHO_C" >&6
     3889# Check whether --enable-modular-debug or --disable-modular-debug was given.
     3890if test "${enable_modular_debug+set}" = set; then
     3891  enableval="$enable_modular_debug"
     3892  MODULAR_DEBUG=$enableval
     3893fi;
     3894
     3895if test x$MODULAR_DEBUG = xno; then
     3896        echo "no"
     3897elif test x$MODULAR_DEBUG = xyes; then
     3898        echo "yes"
     3899
     3900cat >>confdefs.h <<_ACEOF
     3901#define MODULAR_DEBUG 1
     3902_ACEOF
     3903
     3904fi
    38643905
    38653906#--------------#
     
    39614002  echo "no"
    39624003fi
     4004
    39634005#-------------------#
    39644006# SubProject-enable #
     
    39884030fi
    39894031
     4032
     4033#----------------------#
     4034# Documentation-enable #
     4035#----------------------#
     4036def_documentation=no
     4037echo "$as_me:$LINENO: checking if the Documentation should be build by default" >&5
     4038echo $ECHO_N "checking if the Documentation should be build by default... $ECHO_C" >&6
     4039# Check whether --enable-documentation or --disable-documentation was given.
     4040if test "${enable_documentation+set}" = set; then
     4041  enableval="$enable_documentation"
     4042  def_documentation=yes
     4043fi;
     4044if test x$def_documentation = xyes; then
     4045  echo "yes"
     4046fi
     4047if test x$def_documentation = xno; then
     4048  echo "no"
     4049fi
     4050
     4051
     4052if test x$def_documentation = xyes; then
     4053  DOCUMENTATION_TRUE=
     4054  DOCUMENTATION_FALSE='#'
     4055else
     4056  DOCUMENTATION_TRUE='#'
     4057  DOCUMENTATION_FALSE=
     4058fi
    39904059
    39914060#######################
     
    81688237## OUTPUT CONFIGURE ##
    81698238######################
    8170                                                                                 ac_config_files="$ac_config_files Makefile src/Makefile src/lib/Makefile src/lib/graphics/Makefile src/lib/graphics/importer/Makefile src/lib/gui/Makefile src/lib/gui/console/Makefile src/lib/gui/gui/Makefile"
     8239                                                                                                    ac_config_files="$ac_config_files Makefile src/Makefile src/lib/Makefile src/lib/graphics/Makefile src/lib/graphics/importer/Makefile src/lib/gui/Makefile src/lib/gui/console/Makefile src/lib/gui/gui/Makefile src/subprojects/Makefile src/subprojects/testmain/Makefile"
    81718240
    81728241
     
    82878356Usually this means the macro was only invoked conditionally." >&5
    82888357echo "$as_me: error: conditional \"SUB_PROJECTS\" was never defined.
     8358Usually this means the macro was only invoked conditionally." >&2;}
     8359   { (exit 1); exit 1; }; }
     8360fi
     8361if test -z "${DOCUMENTATION_TRUE}" && test -z "${DOCUMENTATION_FALSE}"; then
     8362  { { echo "$as_me:$LINENO: error: conditional \"DOCUMENTATION\" was never defined.
     8363Usually this means the macro was only invoked conditionally." >&5
     8364echo "$as_me: error: conditional \"DOCUMENTATION\" was never defined.
    82898365Usually this means the macro was only invoked conditionally." >&2;}
    82908366   { (exit 1); exit 1; }; }
     
    85898665cat >&5 <<_CSEOF
    85908666
    8591 This file was extended by orxonox $as_me 0.2.1-pre-alpha, which was
     8667This file was extended by orxonox $as_me 0.2.2-pre-alpha, which was
    85928668generated by GNU Autoconf 2.59.  Invocation command line was
    85938669
     
    86528728cat >>$CONFIG_STATUS <<_ACEOF
    86538729ac_cs_version="\\
    8654 orxonox config.status 0.2.1-pre-alpha
     8730orxonox config.status 0.2.2-pre-alpha
    86558731configured by $0, generated by GNU Autoconf 2.59,
    86568732  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
     
    87708846  "src/lib/gui/console/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/lib/gui/console/Makefile" ;;
    87718847  "src/lib/gui/gui/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/lib/gui/gui/Makefile" ;;
     8848  "src/subprojects/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/subprojects/Makefile" ;;
     8849  "src/subprojects/testmain/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/subprojects/testmain/Makefile" ;;
    87728850  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
    87738851  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     
    89168994s,@SUB_PROJECTS_TRUE@,$SUB_PROJECTS_TRUE,;t t
    89178995s,@SUB_PROJECTS_FALSE@,$SUB_PROJECTS_FALSE,;t t
     8996s,@DOCUMENTATION_TRUE@,$DOCUMENTATION_TRUE,;t t
     8997s,@DOCUMENTATION_FALSE@,$DOCUMENTATION_FALSE,;t t
    89188998s,@DOXYGEN@,$DOXYGEN,;t t
    89198999s,@DOXYGEN_TRUE@,$DOXYGEN_TRUE,;t t
     
    95599639  # Extract the definition of DEP_FILES from the Makefile without
    95609640  # running `make'.
    9561   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
     9641  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
    95629642  test -z "$DEPDIR" && continue
    95639643  # When using ansi2knr, U may be empty or an underscore; expand it
    9564   U=`sed -n -e '/^U = / s///p' < "$mf"`
     9644  U=`sed -n 's/^U = //p' < "$mf"`
    95659645  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
    95669646  # We invoke sed twice because it is the simplest approach to
    95679647  # changing $(DEPDIR) to its actual value in the expansion.
    9568   for file in `sed -n -e '
     9648  for file in `sed -n '
    95699649    /^DEP_FILES = .*\\\\$/ {
    95709650      s/^DEP_FILES = //
  • orxonox/branches/levelloader/configure.ac

    r3499 r3605  
    2323#########################
    2424AC_PREREQ(2.56)
    25 AC_INIT(orxonox, 0.2.1-pre-alpha, [orxonox-dev at mail.datacore.ch])
     25AC_INIT(orxonox, 0.2.2-pre-alpha, [orxonox-dev at mail.datacore.ch])
    2626
    2727## Detect the canonical host and target build environment.
     
    5656if test x$DEBUG = xno; then
    5757        echo "no"
    58         echo " -> Setting debuglevel to 3. (orxonox is still in Development. It really is needed."
    59         DEBUG=3
     58        echo " -> Setting debuglevel to 4. (orxonox is still in Development. It really is needed."
     59        DEBUG=4
    6060elif test x$DEBUG = xyes; then
    6161        echo "yes"
     
    6868
    6969AC_SUBST(DEBUG)
     70
     71#---------------#
     72# Modular Debug #
     73#---------------#
     74MODULAR_DEBUG=yes
     75AC_MSG_CHECKING([if Modular-DEBUG-mode should be ebabled])
     76AC_ARG_ENABLE([modular-debug],
     77        AC_HELP_STRING( [--disable-modular-debug], [compiles in modular-debug mode, that logs differently on the many modules of orxonox.]),
     78         MODULAR_DEBUG=$enableval)
     79
     80if test x$MODULAR_DEBUG = xno; then
     81        echo "no"
     82elif test x$MODULAR_DEBUG = xyes; then
     83        echo "yes"
     84        AC_DEFINE_UNQUOTED(MODULAR_DEBUG, 1, [if Modular-DUBUG mode is enabled])
     85fi
    7086
    7187#--------------#
     
    139155  echo "no"
    140156fi
     157
    141158#-------------------#
    142159# SubProject-enable #
     
    155172AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes)
    156173
     174#----------------------#
     175# Documentation-enable #
     176#----------------------#
     177def_documentation=no
     178AC_MSG_CHECKING([if the Documentation should be build by default])
     179AC_ARG_ENABLE([documentation],
     180        AC_HELP_STRING( [--enable-documentation],
     181        [also builds the sDocumentation while make from srcdir]), [def_documentation=yes])
     182if test x$def_documentation = xyes; then
     183  echo "yes"
     184fi
     185if test x$def_documentation = xno; then
     186  echo "no"
     187fi
     188AM_CONDITIONAL(DOCUMENTATION, test x$def_documentation = xyes)
    157189#######################
    158190## PROGRAMM CHECKING ##
     
    534566                 src/lib/gui/Makefile
    535567                 src/lib/gui/console/Makefile
    536                  src/lib/gui/gui/Makefile])
     568                 src/lib/gui/gui/Makefile
     569                 src/subprojects/Makefile
     570                 src/subprojects/testmain/Makefile])
    537571
    538572AC_OUTPUT
  • orxonox/branches/levelloader/doc/documentation.am

    r3219 r3605  
    5050clean-local:  doc-delete
    5151
     52if DOCUMENTATION
    5253all-local: doc
     54else
     55all-local:
     56endif
    5357
    5458.PHONY: doc doc-config doc-delete
  • orxonox/branches/levelloader/src/INSTALL

    r1956 r3605  
    33=====================================
    44
    5 Installing an using orx is very simple: Just type:
     5INSTALLATION
     6============
    67
    7 cd ../orxonox/trunk
    8 ./configure
    9 make
    10 ./bin/orxonox
     8To make it quite easy for those of you who just want to install orxonox:
     9
     101. ./configure
     112. make
     123. make install
     13
     14DEPENDENCIES
     15============
     16
     17There are some dependencies for orxonox you have to install:
     18
     191. SDL           (http://www.libsdl.org)
     202. OPENGL        (http://www.opengl.org)
     213. SDL_mixer     (http://www.libsdl.org/projects/SDL_mixer)
     224. SDL_image     (http://www.libsdl.org/projects/SDL_image)
     235. SDL_ttf       (http://www.libsdl.org/projects/SDL_ttf)
     24 a) needs libttf (http://www.freetype.org/)
     25
     26Nice to Have:
     276. Doxygen       (http://www.stack.nl/~dimitri/doxygen/)
     287. Automake      (http://www.gnu.org/software/automake/)
     298. Autoconf      (http://www.gnu.org/software/autoconf/)
     30
     31Windows Users also need the following:
     329. mingw         (http://mingw.org/)
    1133
    1234
  • orxonox/branches/levelloader/src/Makefile.am

    r3525 r3605  
    66AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/coord
    77AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/data
    8 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gaphics
     8AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics
    99AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/font
    1010AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/importer
     
    3434                 camera.cc \
    3535                 track_manager.cc \
    36                  light.cc \
     36                 track_node.cc \
     37                 simple_animation.cc \
    3738                 factory.cc \
    3839                 story_entities/story_entity.cc \
     
    4344                 world_entities/environment.cc \
    4445                 world_entities/skysphere.cc \
     46                 world_entities/terrain.cc \
     47                 world_entities/primitive.cc \
     48                 world_entities/weapon.cc \
     49                 world_entities/projectile.cc \
     50                 world_entities/character_attributes.cc \
    4551                 ai/ai.cc \
    4652                 lib/coord/p_node.cc \
     
    4854                 lib/coord/helper_parent.cc \
    4955                 lib/data/data_tank.cc \
     56                 lib/graphics/light.cc \
    5057                 lib/graphics/font/fontset.cc \
    5158                 lib/graphics/importer/array.cc \
     
    6067                 lib/util/substring.cc \
    6168                 lib/math/vector.cc \
    62                  lib/math/matrix.cc \
    6369                 lib/math/curve.cc \
    6470                 lib/xmlparser/tinystr.cc \
     
    7783                 command_node.h \
    7884                 message_structures.h \
    79                  light.h \
     85                 track_manager.h \
     86                 track_node.h \
     87                 simple_animation.h \
    8088                 story_entities/story_entity.h \
    8189                 story_entities/story_def.h \
     
    8795                 world_entities/environment.h \
    8896                 world_entities/skysphere.h \
    89                  world_entities/shoot_laser.h \
    90                  world_entities/shoot_rocket.h \
    9197                 world_entities/power_up.h \
     98                 world_entities/terrain.h \
     99                 world_entities/primitive.h \
     100                 world_entities/weapon.h \
     101                 world_entities/projectile.h \
     102                 world_entities/character_attributes.h \
    92103                 ai/ai.h \
    93104                 network/synchronisable.h \
     
    99110                 lib/coord/null_parent.h \
    100111                 lib/coord/helper_parent.h \
     112                 lib/graphics/light.h \
    101113                 lib/graphics/font/fontset.h \
    102114                 lib/data/data_tank.h \
     
    110122                 lib/xmlparser/tinystr.h \
    111123                 lib/math/vector.h \
    112                  lib/math/matrix.h \
    113124                 lib/math/curve.h \
    114125                 glmenu/glmenu_imagescreen.h
     
    119130
    120131if SUB_PROJECTS
    121   SUB_PROGS = lib
     132  SUB_PROGS = lib subprojects
    122133else
    123134  SUB_PROGS =
  • orxonox/branches/levelloader/src/Makefile.in

    r3563 r3605  
    1 # Makefile.in generated by automake 1.8.2 from Makefile.am.
     1# Makefile.in generated by automake 1.8.5 from Makefile.am.
    22# @configure_input@
    33
     
    5050CONFIG_HEADER = $(top_builddir)/config.h
    5151CONFIG_CLEAN_FILES =
    52 am__installdirs = $(DESTDIR)$(bindir)
     52am__installdirs = "$(DESTDIR)$(bindir)"
    5353binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
    5454PROGRAMS = $(bin_PROGRAMS)
    5555am_orxonox_OBJECTS = orxonox.$(OBJEXT) game_loader.$(OBJEXT) \
    5656        command_node.$(OBJEXT) keynames.$(OBJEXT) camera.$(OBJEXT) \
    57         track_manager.$(OBJEXT) light.$(OBJEXT) factory.$(OBJEXT) \
     57        track_manager.$(OBJEXT) track_node.$(OBJEXT) \
     58        simple_animation.$(OBJEXT) factory.$(OBJEXT) \
    5859        story_entity.$(OBJEXT) campaign.$(OBJEXT) world.$(OBJEXT) \
    5960        world_entity.$(OBJEXT) player.$(OBJEXT) environment.$(OBJEXT) \
    60         skysphere.$(OBJEXT) ai.$(OBJEXT) p_node.$(OBJEXT) \
     61        skysphere.$(OBJEXT) terrain.$(OBJEXT) primitive.$(OBJEXT) \
     62        weapon.$(OBJEXT) projectile.$(OBJEXT) \
     63        character_attributes.$(OBJEXT) ai.$(OBJEXT) p_node.$(OBJEXT) \
    6164        null_parent.$(OBJEXT) helper_parent.$(OBJEXT) \
    62         data_tank.$(OBJEXT) fontset.$(OBJEXT) array.$(OBJEXT) \
    63         objModel.$(OBJEXT) model.$(OBJEXT) material.$(OBJEXT) \
    64         texture.$(OBJEXT) base_entity.$(OBJEXT) base_object.$(OBJEXT) \
    65         ini_parser.$(OBJEXT) list.$(OBJEXT) substring.$(OBJEXT) \
    66         vector.$(OBJEXT) matrix.$(OBJEXT) curve.$(OBJEXT) \
     65        data_tank.$(OBJEXT) light.$(OBJEXT) fontset.$(OBJEXT) \
     66        array.$(OBJEXT) objModel.$(OBJEXT) model.$(OBJEXT) \
     67        material.$(OBJEXT) texture.$(OBJEXT) base_entity.$(OBJEXT) \
     68        base_object.$(OBJEXT) ini_parser.$(OBJEXT) list.$(OBJEXT) \
     69        substring.$(OBJEXT) vector.$(OBJEXT) curve.$(OBJEXT) \
    6770        tinystr.$(OBJEXT) tinyxml.$(OBJEXT) tinyxmlerror.$(OBJEXT) \
    6871        tinyxmlparser.$(OBJEXT) glmenu_imagescreen.$(OBJEXT)
     
    7679@AMDEP_TRUE@    ./$(DEPDIR)/base_object.Po ./$(DEPDIR)/camera.Po \
    7780@AMDEP_TRUE@    ./$(DEPDIR)/campaign.Po \
     81@AMDEP_TRUE@    ./$(DEPDIR)/character_attributes.Po \
    7882@AMDEP_TRUE@    ./$(DEPDIR)/command_node.Po ./$(DEPDIR)/curve.Po \
    7983@AMDEP_TRUE@    ./$(DEPDIR)/data_tank.Po \
     
    8488@AMDEP_TRUE@    ./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \
    8589@AMDEP_TRUE@    ./$(DEPDIR)/light.Po ./$(DEPDIR)/list.Po \
    86 @AMDEP_TRUE@    ./$(DEPDIR)/material.Po ./$(DEPDIR)/matrix.Po \
    87 @AMDEP_TRUE@    ./$(DEPDIR)/model.Po ./$(DEPDIR)/null_parent.Po \
    88 @AMDEP_TRUE@    ./$(DEPDIR)/objModel.Po ./$(DEPDIR)/orxonox.Po \
    89 @AMDEP_TRUE@    ./$(DEPDIR)/p_node.Po ./$(DEPDIR)/player.Po \
     90@AMDEP_TRUE@    ./$(DEPDIR)/material.Po ./$(DEPDIR)/model.Po \
     91@AMDEP_TRUE@    ./$(DEPDIR)/null_parent.Po ./$(DEPDIR)/objModel.Po \
     92@AMDEP_TRUE@    ./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/p_node.Po \
     93@AMDEP_TRUE@    ./$(DEPDIR)/player.Po ./$(DEPDIR)/primitive.Po \
     94@AMDEP_TRUE@    ./$(DEPDIR)/projectile.Po \
     95@AMDEP_TRUE@    ./$(DEPDIR)/simple_animation.Po \
    9096@AMDEP_TRUE@    ./$(DEPDIR)/skysphere.Po \
    9197@AMDEP_TRUE@    ./$(DEPDIR)/story_entity.Po \
    92 @AMDEP_TRUE@    ./$(DEPDIR)/substring.Po ./$(DEPDIR)/texture.Po \
    93 @AMDEP_TRUE@    ./$(DEPDIR)/tinystr.Po ./$(DEPDIR)/tinyxml.Po \
    94 @AMDEP_TRUE@    ./$(DEPDIR)/tinyxmlerror.Po \
     98@AMDEP_TRUE@    ./$(DEPDIR)/substring.Po ./$(DEPDIR)/terrain.Po \
     99@AMDEP_TRUE@    ./$(DEPDIR)/texture.Po ./$(DEPDIR)/tinystr.Po \
     100@AMDEP_TRUE@    ./$(DEPDIR)/tinyxml.Po ./$(DEPDIR)/tinyxmlerror.Po \
    95101@AMDEP_TRUE@    ./$(DEPDIR)/tinyxmlparser.Po \
    96 @AMDEP_TRUE@    ./$(DEPDIR)/track_manager.Po ./$(DEPDIR)/vector.Po \
    97 @AMDEP_TRUE@    ./$(DEPDIR)/world.Po ./$(DEPDIR)/world_entity.Po
     102@AMDEP_TRUE@    ./$(DEPDIR)/track_manager.Po \
     103@AMDEP_TRUE@    ./$(DEPDIR)/track_node.Po ./$(DEPDIR)/vector.Po \
     104@AMDEP_TRUE@    ./$(DEPDIR)/weapon.Po ./$(DEPDIR)/world.Po \
     105@AMDEP_TRUE@    ./$(DEPDIR)/world_entity.Po
    98106CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    99107        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     
    112120ETAGS = etags
    113121CTAGS = ctags
    114 DIST_SUBDIRS = . lib
     122DIST_SUBDIRS = . lib subprojects
    115123DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    116124ACLOCAL = @ACLOCAL@
     
    136144DEFS = @DEFS@
    137145DEPDIR = @DEPDIR@
     146DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@
     147DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@
    138148DOXYGEN = @DOXYGEN@
    139149DOXYGEN_FALSE = @DOXYGEN_FALSE@
     
    221231target_vendor = @target_vendor@
    222232MAINSRCDIR = .
    223 AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/gaphics -I$(MAINSRCDIR)/lib/graphics/font -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/lib/xmlparser -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai
     233AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/font -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/lib/xmlparser -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai
    224234AM_LDFLAGS = $(MWINDOWS)
    225235orxonox_SOURCES = orxonox.cc \
     
    229239                 camera.cc \
    230240                 track_manager.cc \
    231                  light.cc \
     241                 track_node.cc \
     242                 simple_animation.cc \
    232243                 factory.cc \
    233244                 story_entities/story_entity.cc \
     
    238249                 world_entities/environment.cc \
    239250                 world_entities/skysphere.cc \
     251                 world_entities/terrain.cc \
     252                 world_entities/primitive.cc \
     253                 world_entities/weapon.cc \
     254                 world_entities/projectile.cc \
     255                 world_entities/character_attributes.cc \
    240256                 ai/ai.cc \
    241257                 lib/coord/p_node.cc \
     
    243259                 lib/coord/helper_parent.cc \
    244260                 lib/data/data_tank.cc \
     261                 lib/graphics/light.cc \
    245262                 lib/graphics/font/fontset.cc \
    246263                 lib/graphics/importer/array.cc \
     
    255272                 lib/util/substring.cc \
    256273                 lib/math/vector.cc \
    257                  lib/math/matrix.cc \
    258274                 lib/math/curve.cc \
    259275                 lib/xmlparser/tinystr.cc \
     
    272288                 command_node.h \
    273289                 message_structures.h \
    274                  light.h \
     290                 track_manager.h \
     291                 track_node.h \
     292                 simple_animation.h \
    275293                 story_entities/story_entity.h \
    276294                 story_entities/story_def.h \
     
    282300                 world_entities/environment.h \
    283301                 world_entities/skysphere.h \
    284                  world_entities/shoot_laser.h \
    285                  world_entities/shoot_rocket.h \
    286302                 world_entities/power_up.h \
     303                 world_entities/terrain.h \
     304                 world_entities/primitive.h \
     305                 world_entities/weapon.h \
     306                 world_entities/projectile.h \
     307                 world_entities/character_attributes.h \
    287308                 ai/ai.h \
    288309                 network/synchronisable.h \
     
    294315                 lib/coord/null_parent.h \
    295316                 lib/coord/helper_parent.h \
     317                 lib/graphics/light.h \
    296318                 lib/graphics/font/fontset.h \
    297319                 lib/data/data_tank.h \
     
    305327                 lib/xmlparser/tinystr.h \
    306328                 lib/math/vector.h \
    307                  lib/math/matrix.h \
    308329                 lib/math/curve.h \
    309330                 glmenu/glmenu_imagescreen.h
     
    311332EXTRA_DIST = orxonox.conf
    312333@SUB_PROJECTS_FALSE@SUB_PROGS =
    313 @SUB_PROJECTS_TRUE@SUB_PROGS = lib
     334@SUB_PROJECTS_TRUE@SUB_PROGS = lib subprojects
    314335SUBDIRS = . \
    315336          $(SUB_PROGS)
     
    328349          esac; \
    329350        done; \
    330         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
     351        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
    331352        cd $(top_srcdir) && \
    332           $(AUTOMAKE) --gnu  src/Makefile
     353          $(AUTOMAKE) --foreign  src/Makefile
    333354.PRECIOUS: Makefile
    334355Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    350371install-binPROGRAMS: $(bin_PROGRAMS)
    351372        @$(NORMAL_INSTALL)
    352         $(mkdir_p) $(DESTDIR)$(bindir)
     373        test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
    353374        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    354375          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
     
    356377          ; then \
    357378            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
    358            echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
    359            $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
     379           echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
     380           $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
    360381          else :; fi; \
    361382        done
     
    365386        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    366387          f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
    367           echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
    368           rm -f $(DESTDIR)$(bindir)/$$f; \
     388          echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
     389          rm -f "$(DESTDIR)$(bindir)/$$f"; \
    369390        done
    370391
     
    387408@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camera.Po@am__quote@
    388409@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/campaign.Po@am__quote@
     410@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/character_attributes.Po@am__quote@
    389411@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command_node.Po@am__quote@
    390412@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curve.Po@am__quote@
     
    401423@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
    402424@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@
    403 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Po@am__quote@
    404425@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model.Po@am__quote@
    405426@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/null_parent.Po@am__quote@
     
    408429@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_node.Po@am__quote@
    409430@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/player.Po@am__quote@
     431@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primitive.Po@am__quote@
     432@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/projectile.Po@am__quote@
     433@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_animation.Po@am__quote@
    410434@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skysphere.Po@am__quote@
    411435@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/story_entity.Po@am__quote@
    412436@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/substring.Po@am__quote@
     437@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terrain.Po@am__quote@
    413438@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@
    414439@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinystr.Po@am__quote@
     
    417442@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinyxmlparser.Po@am__quote@
    418443@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track_manager.Po@am__quote@
     444@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track_node.Po@am__quote@
    419445@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
     446@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/weapon.Po@am__quote@
    420447@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/world.Po@am__quote@
    421448@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/world_entity.Po@am__quote@
     
    549576@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o skysphere.obj `if test -f 'world_entities/skysphere.cc'; then $(CYGPATH_W) 'world_entities/skysphere.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/skysphere.cc'; fi`
    550577
     578terrain.o: world_entities/terrain.cc
     579@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT terrain.o -MD -MP -MF "$(DEPDIR)/terrain.Tpo" -c -o terrain.o `test -f 'world_entities/terrain.cc' || echo '$(srcdir)/'`world_entities/terrain.cc; \
     580@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/terrain.Tpo" "$(DEPDIR)/terrain.Po"; else rm -f "$(DEPDIR)/terrain.Tpo"; exit 1; fi
     581@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='world_entities/terrain.cc' object='terrain.o' libtool=no @AMDEPBACKSLASH@
     582@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/terrain.Po' tmpdepfile='$(DEPDIR)/terrain.TPo' @AMDEPBACKSLASH@
     583@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     584@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o terrain.o `test -f 'world_entities/terrain.cc' || echo '$(srcdir)/'`world_entities/terrain.cc
     585
     586terrain.obj: world_entities/terrain.cc
     587@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT terrain.obj -MD -MP -MF "$(DEPDIR)/terrain.Tpo" -c -o terrain.obj `if test -f 'world_entities/terrain.cc'; then $(CYGPATH_W) 'world_entities/terrain.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/terrain.cc'; fi`; \
     588@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/terrain.Tpo" "$(DEPDIR)/terrain.Po"; else rm -f "$(DEPDIR)/terrain.Tpo"; exit 1; fi
     589@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='world_entities/terrain.cc' object='terrain.obj' libtool=no @AMDEPBACKSLASH@
     590@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/terrain.Po' tmpdepfile='$(DEPDIR)/terrain.TPo' @AMDEPBACKSLASH@
     591@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     592@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o terrain.obj `if test -f 'world_entities/terrain.cc'; then $(CYGPATH_W) 'world_entities/terrain.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/terrain.cc'; fi`
     593
     594primitive.o: world_entities/primitive.cc
     595@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT primitive.o -MD -MP -MF "$(DEPDIR)/primitive.Tpo" -c -o primitive.o `test -f 'world_entities/primitive.cc' || echo '$(srcdir)/'`world_entities/primitive.cc; \
     596@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/primitive.Tpo" "$(DEPDIR)/primitive.Po"; else rm -f "$(DEPDIR)/primitive.Tpo"; exit 1; fi
     597@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='world_entities/primitive.cc' object='primitive.o' libtool=no @AMDEPBACKSLASH@
     598@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/primitive.Po' tmpdepfile='$(DEPDIR)/primitive.TPo' @AMDEPBACKSLASH@
     599@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     600@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o primitive.o `test -f 'world_entities/primitive.cc' || echo '$(srcdir)/'`world_entities/primitive.cc
     601
     602primitive.obj: world_entities/primitive.cc
     603@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT primitive.obj -MD -MP -MF "$(DEPDIR)/primitive.Tpo" -c -o primitive.obj `if test -f 'world_entities/primitive.cc'; then $(CYGPATH_W) 'world_entities/primitive.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/primitive.cc'; fi`; \
     604@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/primitive.Tpo" "$(DEPDIR)/primitive.Po"; else rm -f "$(DEPDIR)/primitive.Tpo"; exit 1; fi
     605@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='world_entities/primitive.cc' object='primitive.obj' libtool=no @AMDEPBACKSLASH@
     606@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/primitive.Po' tmpdepfile='$(DEPDIR)/primitive.TPo' @AMDEPBACKSLASH@
     607@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     608@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o primitive.obj `if test -f 'world_entities/primitive.cc'; then $(CYGPATH_W) 'world_entities/primitive.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/primitive.cc'; fi`
     609
     610weapon.o: world_entities/weapon.cc
     611@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT weapon.o -MD -MP -MF "$(DEPDIR)/weapon.Tpo" -c -o weapon.o `test -f 'world_entities/weapon.cc' || echo '$(srcdir)/'`world_entities/weapon.cc; \
     612@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/weapon.Tpo" "$(DEPDIR)/weapon.Po"; else rm -f "$(DEPDIR)/weapon.Tpo"; exit 1; fi
     613@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='world_entities/weapon.cc' object='weapon.o' libtool=no @AMDEPBACKSLASH@
     614@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/weapon.Po' tmpdepfile='$(DEPDIR)/weapon.TPo' @AMDEPBACKSLASH@
     615@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     616@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o weapon.o `test -f 'world_entities/weapon.cc' || echo '$(srcdir)/'`world_entities/weapon.cc
     617
     618weapon.obj: world_entities/weapon.cc
     619@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT weapon.obj -MD -MP -MF "$(DEPDIR)/weapon.Tpo" -c -o weapon.obj `if test -f 'world_entities/weapon.cc'; then $(CYGPATH_W) 'world_entities/weapon.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/weapon.cc'; fi`; \
     620@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/weapon.Tpo" "$(DEPDIR)/weapon.Po"; else rm -f "$(DEPDIR)/weapon.Tpo"; exit 1; fi
     621@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='world_entities/weapon.cc' object='weapon.obj' libtool=no @AMDEPBACKSLASH@
     622@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/weapon.Po' tmpdepfile='$(DEPDIR)/weapon.TPo' @AMDEPBACKSLASH@
     623@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     624@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o weapon.obj `if test -f 'world_entities/weapon.cc'; then $(CYGPATH_W) 'world_entities/weapon.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/weapon.cc'; fi`
     625
     626projectile.o: world_entities/projectile.cc
     627@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT projectile.o -MD -MP -MF "$(DEPDIR)/projectile.Tpo" -c -o projectile.o `test -f 'world_entities/projectile.cc' || echo '$(srcdir)/'`world_entities/projectile.cc; \
     628@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/projectile.Tpo" "$(DEPDIR)/projectile.Po"; else rm -f "$(DEPDIR)/projectile.Tpo"; exit 1; fi
     629@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='world_entities/projectile.cc' object='projectile.o' libtool=no @AMDEPBACKSLASH@
     630@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/projectile.Po' tmpdepfile='$(DEPDIR)/projectile.TPo' @AMDEPBACKSLASH@
     631@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     632@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o projectile.o `test -f 'world_entities/projectile.cc' || echo '$(srcdir)/'`world_entities/projectile.cc
     633
     634projectile.obj: world_entities/projectile.cc
     635@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT projectile.obj -MD -MP -MF "$(DEPDIR)/projectile.Tpo" -c -o projectile.obj `if test -f 'world_entities/projectile.cc'; then $(CYGPATH_W) 'world_entities/projectile.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/projectile.cc'; fi`; \
     636@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/projectile.Tpo" "$(DEPDIR)/projectile.Po"; else rm -f "$(DEPDIR)/projectile.Tpo"; exit 1; fi
     637@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='world_entities/projectile.cc' object='projectile.obj' libtool=no @AMDEPBACKSLASH@
     638@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/projectile.Po' tmpdepfile='$(DEPDIR)/projectile.TPo' @AMDEPBACKSLASH@
     639@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     640@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o projectile.obj `if test -f 'world_entities/projectile.cc'; then $(CYGPATH_W) 'world_entities/projectile.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/projectile.cc'; fi`
     641
     642character_attributes.o: world_entities/character_attributes.cc
     643@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT character_attributes.o -MD -MP -MF "$(DEPDIR)/character_attributes.Tpo" -c -o character_attributes.o `test -f 'world_entities/character_attributes.cc' || echo '$(srcdir)/'`world_entities/character_attributes.cc; \
     644@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/character_attributes.Tpo" "$(DEPDIR)/character_attributes.Po"; else rm -f "$(DEPDIR)/character_attributes.Tpo"; exit 1; fi
     645@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='world_entities/character_attributes.cc' object='character_attributes.o' libtool=no @AMDEPBACKSLASH@
     646@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/character_attributes.Po' tmpdepfile='$(DEPDIR)/character_attributes.TPo' @AMDEPBACKSLASH@
     647@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     648@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o character_attributes.o `test -f 'world_entities/character_attributes.cc' || echo '$(srcdir)/'`world_entities/character_attributes.cc
     649
     650character_attributes.obj: world_entities/character_attributes.cc
     651@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT character_attributes.obj -MD -MP -MF "$(DEPDIR)/character_attributes.Tpo" -c -o character_attributes.obj `if test -f 'world_entities/character_attributes.cc'; then $(CYGPATH_W) 'world_entities/character_attributes.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/character_attributes.cc'; fi`; \
     652@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/character_attributes.Tpo" "$(DEPDIR)/character_attributes.Po"; else rm -f "$(DEPDIR)/character_attributes.Tpo"; exit 1; fi
     653@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='world_entities/character_attributes.cc' object='character_attributes.obj' libtool=no @AMDEPBACKSLASH@
     654@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/character_attributes.Po' tmpdepfile='$(DEPDIR)/character_attributes.TPo' @AMDEPBACKSLASH@
     655@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     656@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o character_attributes.obj `if test -f 'world_entities/character_attributes.cc'; then $(CYGPATH_W) 'world_entities/character_attributes.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/character_attributes.cc'; fi`
     657
    551658ai.o: ai/ai.cc
    552659@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ai.o -MD -MP -MF "$(DEPDIR)/ai.Tpo" -c -o ai.o `test -f 'ai/ai.cc' || echo '$(srcdir)/'`ai/ai.cc; \
     
    629736@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o data_tank.obj `if test -f 'lib/data/data_tank.cc'; then $(CYGPATH_W) 'lib/data/data_tank.cc'; else $(CYGPATH_W) '$(srcdir)/lib/data/data_tank.cc'; fi`
    630737
     738light.o: lib/graphics/light.cc
     739@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT light.o -MD -MP -MF "$(DEPDIR)/light.Tpo" -c -o light.o `test -f 'lib/graphics/light.cc' || echo '$(srcdir)/'`lib/graphics/light.cc; \
     740@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/light.Tpo" "$(DEPDIR)/light.Po"; else rm -f "$(DEPDIR)/light.Tpo"; exit 1; fi
     741@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='lib/graphics/light.cc' object='light.o' libtool=no @AMDEPBACKSLASH@
     742@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/light.Po' tmpdepfile='$(DEPDIR)/light.TPo' @AMDEPBACKSLASH@
     743@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     744@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o light.o `test -f 'lib/graphics/light.cc' || echo '$(srcdir)/'`lib/graphics/light.cc
     745
     746light.obj: lib/graphics/light.cc
     747@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT light.obj -MD -MP -MF "$(DEPDIR)/light.Tpo" -c -o light.obj `if test -f 'lib/graphics/light.cc'; then $(CYGPATH_W) 'lib/graphics/light.cc'; else $(CYGPATH_W) '$(srcdir)/lib/graphics/light.cc'; fi`; \
     748@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/light.Tpo" "$(DEPDIR)/light.Po"; else rm -f "$(DEPDIR)/light.Tpo"; exit 1; fi
     749@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='lib/graphics/light.cc' object='light.obj' libtool=no @AMDEPBACKSLASH@
     750@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/light.Po' tmpdepfile='$(DEPDIR)/light.TPo' @AMDEPBACKSLASH@
     751@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     752@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o light.obj `if test -f 'lib/graphics/light.cc'; then $(CYGPATH_W) 'lib/graphics/light.cc'; else $(CYGPATH_W) '$(srcdir)/lib/graphics/light.cc'; fi`
     753
    631754fontset.o: lib/graphics/font/fontset.cc
    632755@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fontset.o -MD -MP -MF "$(DEPDIR)/fontset.Tpo" -c -o fontset.o `test -f 'lib/graphics/font/fontset.cc' || echo '$(srcdir)/'`lib/graphics/font/fontset.cc; \
     
    820943@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    821944@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o vector.obj `if test -f 'lib/math/vector.cc'; then $(CYGPATH_W) 'lib/math/vector.cc'; else $(CYGPATH_W) '$(srcdir)/lib/math/vector.cc'; fi`
    822 
    823 matrix.o: lib/math/matrix.cc
    824 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matrix.o -MD -MP -MF "$(DEPDIR)/matrix.Tpo" -c -o matrix.o `test -f 'lib/math/matrix.cc' || echo '$(srcdir)/'`lib/math/matrix.cc; \
    825 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/matrix.Tpo" "$(DEPDIR)/matrix.Po"; else rm -f "$(DEPDIR)/matrix.Tpo"; exit 1; fi
    826 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='lib/math/matrix.cc' object='matrix.o' libtool=no @AMDEPBACKSLASH@
    827 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/matrix.Po' tmpdepfile='$(DEPDIR)/matrix.TPo' @AMDEPBACKSLASH@
    828 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    829 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matrix.o `test -f 'lib/math/matrix.cc' || echo '$(srcdir)/'`lib/math/matrix.cc
    830 
    831 matrix.obj: lib/math/matrix.cc
    832 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matrix.obj -MD -MP -MF "$(DEPDIR)/matrix.Tpo" -c -o matrix.obj `if test -f 'lib/math/matrix.cc'; then $(CYGPATH_W) 'lib/math/matrix.cc'; else $(CYGPATH_W) '$(srcdir)/lib/math/matrix.cc'; fi`; \
    833 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/matrix.Tpo" "$(DEPDIR)/matrix.Po"; else rm -f "$(DEPDIR)/matrix.Tpo"; exit 1; fi
    834 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='lib/math/matrix.cc' object='matrix.obj' libtool=no @AMDEPBACKSLASH@
    835 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/matrix.Po' tmpdepfile='$(DEPDIR)/matrix.TPo' @AMDEPBACKSLASH@
    836 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    837 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matrix.obj `if test -f 'lib/math/matrix.cc'; then $(CYGPATH_W) 'lib/math/matrix.cc'; else $(CYGPATH_W) '$(srcdir)/lib/math/matrix.cc'; fi`
    838945
    839946curve.o: lib/math/curve.cc
     
    10071114        tags=; \
    10081115        here=`pwd`; \
    1009         if (etags --etags-include --version) >/dev/null 2>&1; then \
     1116        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
    10101117          include_option=--etags-include; \
     1118          empty_fix=.; \
    10111119        else \
    10121120          include_option=--include; \
     1121          empty_fix=; \
    10131122        fi; \
    10141123        list='$(SUBDIRS)'; for subdir in $$list; do \
    10151124          if test "$$subdir" = .; then :; else \
    1016             test -f $$subdir/TAGS && \
     1125            test ! -f $$subdir/TAGS || \
    10171126              tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
    10181127          fi; \
     
    10241133          $(AWK) '    { files[$$0] = 1; } \
    10251134               END { for (i in files) print i; }'`; \
    1026         test -z "$(ETAGS_ARGS)$$tags$$unique" \
    1027           || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    1028              $$tags $$unique
     1135        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
     1136          test -n "$$unique" || unique=$$empty_fix; \
     1137          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     1138            $$tags $$unique; \
     1139        fi
    10291140ctags: CTAGS
    10301141CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     
    10511162
    10521163distdir: $(DISTFILES)
    1053         $(mkdir_p) $(distdir)/ai $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/data $(distdir)/lib/graphics/font $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/lib/xmlparser $(distdir)/network $(distdir)/story_entities $(distdir)/world_entities
     1164        $(mkdir_p) $(distdir)/ai $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/data $(distdir)/lib/graphics $(distdir)/lib/graphics/font $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/lib/xmlparser $(distdir)/network $(distdir)/story_entities $(distdir)/world_entities
    10541165        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
    10551166        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
     
    10961207installdirs: installdirs-recursive
    10971208installdirs-am:
    1098         $(mkdir_p) $(DESTDIR)$(bindir)
     1209        for dir in "$(DESTDIR)$(bindir)"; do \
     1210          test -z "$$dir" || $(mkdir_p) "$$dir"; \
     1211        done
    10991212install: install-recursive
    11001213install-exec: install-exec-recursive
  • orxonox/branches/levelloader/src/ability.h

    r3224 r3605  
    1010 public:
    1111  Ability ();
    12   ~Ability ();
     12  virtual ~Ability ();
    1313
    1414};
  • orxonox/branches/levelloader/src/ai/ai.h

    r3499 r3605  
    99 public:
    1010  AI ();
    11   ~AI ();
     11  virtual ~AI ();
    1212
    1313};
  • orxonox/branches/levelloader/src/camera.cc

    r3365 r3605  
    5151Camera::~Camera ()
    5252{
     53  this->bound = NULL;
     54  this->world = NULL;
     55
    5356}
    5457
     
    6063   as smooth camera movement or swaying).
    6164*/
    62 void Camera::timeSlice (Uint32 deltaT)
     65void Camera::tick (Uint32 deltaT)
    6366{
    6467  if( this->t <= deltaTime)
     
    198201  // TO DO: implement options for frustum generation
    199202  //glFrustum(-1.0, 1.0, -1.0, 1.0, 1.5, 250.0);
    200   gluPerspective(60, 1.2f, 0.1, 250);
     203  gluPerspective(60, 1.2f, 0.1, 2000);
    201204 
    202205  //Vector up(0,0,1);
     
    276279
    277280
    278 /**
    279    \brief destroy, reset the camera so that it doesn't perform anything anymore
    280 
    281 */
    282 void Camera::destroy()
    283 {
    284   this->bound = NULL;
    285   this->world = NULL;
    286 }
  • orxonox/branches/levelloader/src/camera.h

    r3365 r3605  
    77#define _CAMERA_H
    88
    9 #include "stdincl.h"
    109#include "world_entity.h"
    11 
    1210
    1311class World;
     
    5654 public:
    5755  Camera (World* world);
    58   ~Camera ();
     56  virtual ~Camera ();
    5957 
    60   void timeSlice (Uint32 deltaT);
     58  void tick (Uint32 deltaT);
    6159  void apply ();
    6260  void bind (WorldEntity* entity);
    63   void destroy();
    6461
    6562  void setWorld(World* world); 
  • orxonox/branches/levelloader/src/command_node.cc

    r3236 r3605  
    1414*/
    1515
     16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COMMAND_NODE
    1617
    1718#include "command_node.h"
     
    112113  FILE* stream;
    113114 
    114   printf("Loading key bindings from %s\n", filename);
     115  PRINTF(4)("Loading key bindings from %s\n", filename);
    115116 
    116117  if( filename == NULL) filename = DEFAULT_KEYBIND_FILE;
     
    127128  if( parser.getSection ("Bindings") == -1)
    128129    {
    129       printf("Could not find key bindings in %s\n", filename);
     130      PRINTF(1)("Could not find key bindings in %s\n", filename);
    130131      return;
    131132    }
     
    145146        {
    146147        case 0:
    147           printf("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), valuebuf);
     148          PRINTF(4)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), valuebuf);
    148149          strcpy (aliases->keys[index[1]], valuebuf);
    149150          break;
    150151        case 1:
    151           printf("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), valuebuf);
     152          PRINTF(4)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), valuebuf);
    152153          strcpy (aliases->buttons[index[1]], valuebuf);
    153154          break;
     
    214215  while( SDL_PollEvent (&event))
    215216    {
     217      PRINTF(3)("CommandNode::processLocal() =========================got Event\n");
    216218      memset (cmd.cmd, 0, CMD_LENGHT);
    217219      switch( event.type)
     
    267269void CommandNode::relay (Command* cmd)
    268270{
    269 
    270271  Orxonox *orx = Orxonox::getInstance();
    271272  if( orx->systemCommand (cmd)) return;
     
    281282  while( entity != NULL)
    282283    {
    283       entity->command (cmd);
     284      entity->command (cmd); /*no absorbtion of command! strange*/
    284285      entity = bound->nextElement();
    285286    }
  • orxonox/branches/levelloader/src/defs/debug.h

    r3542 r3605  
    1717    \file debug.h
    1818    \brief Handles output to console for different Verbose-Modes.
     19
     20    There are two main modes HARD and SOFT. HARD is precessed during compileTime where SOFT is for runtime.
     21    \li HARD: One can choose between different modes. see: // DEFINE_MODULES \\
     22    \li SOFT: If you want each module can have its own variable for processing. just pass it to DEBUG_MODULE_SOFT
    1923*/
    2024
     
    2832#include <stdio.h>
    2933
    30 #ifndef DEBUG
    31 #define DEBUG 4
    32 #endif
    33 
     34// DEFINE ERROR MODES
    3435#define NO              0
    3536#define ERR             1
     
    3738#define INFO            3
    3839#define DEBUGING        4
    39 
     40#define vDEBUGING       5
     41
     42extern int verbose;
     43
     44//definitions
     45#ifndef MODULAR_DEBUG
     46#define HARD_DEBUG_LEVEL DEBUG
     47#define SOFT_DEBUG_LEVEL verbose
     48#else /* MODULAR_DEBUG */
     49#ifndef DEBUG_MODULE_SOFT
     50#define SOFT_DEBUG_LEVEL verbose
     51#else /* DEBUG_MODULE_SOFT */
     52#define SOFT_DEBUG_LEVEL DEBUG_MODULE_SOFT
     53#endif /* DEBUG_MODULE_SOFT */
     54
     55#ifndef DEBUG_SPECIAL_MODULE
     56#define HARD_DEBUG_LEVEL DEBUG
     57#else /* DEBUG_SPECIAL_MODULE */
     58// DEFINE MODULES \\
     59#define DEBUG_MODULE_ORXONOX            0
     60#define DEBUG_MODULE_WORLD              0
     61#define DEBUG_MODULE_PNODE              2
     62#define DEBUG_MODULE_WORLD_ENTITY       0
     63#define DEBUG_MODULE_COMMAND_NODE       0
     64
     65#define DEBUG_MODULE_IMPORTER           0
     66#define DEBUG_MODULE_TRACK_MANAGER      0
     67#define DEBUG_MODULE_LIGHT              3
     68#define DEBUG_MODULE_PLAYER             0
     69#define DEBUG_MODULE_MATH               0
     70
     71#define DEBUG_MODULE_NULL_PARENT        0
     72
     73
     74#define HARD_DEBUG_LEVEL DEBUG_SPECIAL_MODULE
     75#endif /* DEBUG_SPECIAL_MODULE */
     76#endif /* MODULAR_DEBUG */
    4077///////////////////////////////////////////////////
    4178/// PRINTF: prints with filename and linenumber ///
    4279///////////////////////////////////////////////////
     80
    4381#ifdef DEBUG
    44 extern int verbose;
     82
    4583#define PRINTF(x) \
    4684           PRINTF ## x
    47            
    48 #if DEBUG >= ERR
     85
     86#if HARD_DEBUG_LEVEL >= ERR
    4987#define PRINTF1 \
    50     if (verbose >= ERR) \
    51       printf("%s:%d::ERROR:", __FILE__, __LINE__) && printf
     88    if (SOFT_DEBUG_LEVEL >= ERR) \
     89      printf("ERROR::%s:%d:", __FILE__, __LINE__) && printf
    5290#else
    5391#define PRINTF1 if (NO)
    5492#endif
    5593     
    56 #if DEBUG >= WARN
     94#if HARD_DEBUG_LEVEL >= WARN
    5795#define PRINTF2 \
    58      if (verbose >= WARN) \
    59        printf("%s:%d::WARNING:", __FILE__, __LINE__) && printf
     96     if (SOFT_DEBUG_LEVEL >= WARN) \
     97       printf("WARNING::%s:%d:", __FILE__, __LINE__) && printf
    6098         
    6199#else
     
    63101#endif
    64102     
    65 #if DEBUG >= INFO
     103#if HARD_DEBUG_LEVEL >= INFO
    66104#define PRINTF3 \
    67      if (verbose >= INFO) \
    68        printf("%s:%d::INFO:", __FILE__, __LINE__) && printf
     105     if (SOFT_DEBUG_LEVEL >= INFO) \
     106       printf("INFO::%s:%d:", __FILE__, __LINE__) && printf
    69107#else
    70108#define PRINTF3 if (NO)
    71109#endif
    72110     
    73 #if DEBUG >= DEBUGING
     111#if HARD_DEBUG_LEVEL >= DEBUGING
    74112#define PRINTF4 \
    75      if (verbose >= DEBUGING) \
    76        printf("%s:%d::DEBUG:", __FILE__, __LINE__) && printf
     113     if (SOFT_DEBUG_LEVEL >= DEBUGING) \
     114       printf("DEBUG::%s:%d:", __FILE__, __LINE__) && printf
    77115#else
    78116#define PRINTF4 if (NO)
    79117#endif
    80118     
    81      
     119#if HARD_DEBUG_LEVEL >= vDEBUGING
     120#define PRINTF5 \
     121     if (SOFT_DEBUG_LEVEL >= vDEBUGING) \
     122       printf("VERYDEBUG::%s:%d:", __FILE__, __LINE__) && printf
     123#else
     124#define PRINTF5 if (NO)
     125#endif
     126   
    82127#else 
    83128#define PRINTF(x) if (NO)
     
    92137///////////////////////////////////////////////////
    93138#ifdef  DEBUG
    94 extern int verbose;
    95139#define PRINT(x) \
    96140  PRINT ## x
    97  
    98 #if DEBUG >= ERR
     141
     142#if HARD_DEBUG_LEVEL >= ERR
    99143#define PRINT1  \
    100   if (verbose >= ERR)   \
     144  if (SOFT_DEBUG_LEVEL >= ERR)  \
    101145    printf
    102146#else
     
    104148#endif
    105149
    106 #if DEBUG >= WARN
     150#if HARD_DEBUG_LEVEL >= WARN
    107151#define PRINT2 \
    108   if (verbose >= WARN) \
     152  if (SOFT_DEBUG_LEVEL >= WARN) \
    109153    printf
    110154
     
    113157#endif
    114158
    115 #if DEBUG >= INFO
     159#if HARD_DEBUG_LEVEL >= INFO
    116160#define PRINT3 \
    117   if (verbose >= INFO) \
     161  if (SOFT_DEBUG_LEVEL >= INFO) \
    118162    printf
    119163#else
     
    121165#endif
    122166
    123 #if DEBUG >= DEBUGING
     167#if HARD_DEBUG_LEVEL >= DEBUGING
    124168#define PRINT4 \
    125   if (verbose >= DEBUGING) \
     169  if (SOFT_DEBUG_LEVEL >= DEBUGING) \
    126170    printf
    127171#else
    128172#define PRINT4 if (NO)
     173#endif
     174
     175#if HARD_DEBUG_LEVEL >= vDEBUGING
     176#define PRINT5 \
     177     if (SOFT_DEBUG_LEVEL >= vDEBUGING) \
     178       printf("VERYDEBUG::%s:%d:", __FILE__, __LINE__) && printf
     179#else
     180#define PRINT5 if (NO)
    129181#endif
    130182
     
    144196           COUT ## x
    145197
    146 #if DEBUG >= 1
     198#if HARD_DEBUG_LEVEL >= 1
    147199#define COUT1 \
    148     if (verbose >= 1 ) \
     200    if (SOFT_DEBUG_LEVEL >= 1 ) \
    149201      cout
    150202#else
     
    152204#endif
    153205     
    154 #if DEBUG >= 2
     206#if HARD_DEBUG_LEVEL >= 2
    155207#define COUT2 \
    156      if (verbose >= 2 ) \
     208     if (SOFT_DEBUG_LEVEL >= 2 ) \
    157209       cout
    158210
     
    161213#endif
    162214     
    163 #if DEBUG >= 3
     215#if HARD_DEBUG_LEVEL >= 3
    164216#define COUT3 \
    165      if (verbose >= 3 ) \
     217     if (SOFT_DEBUG_LEVEL >= 3 ) \
    166218       cout
    167219#else
     
    169221#endif
    170222     
    171 #if DEBUG >= 4
     223#if HARD_DEBUG_LEVEL >= 4
    172224#define COUT4 \
    173      if (verbose >= 4 ) \
     225     if (SOFT_DEBUG_LEVEL >= 4 ) \
    174226       cout
    175227#else
  • orxonox/branches/levelloader/src/glmenu/glmenu_imagescreen.cc

    r3499 r3605  
    1919#include "glmenu_imagescreen.h"
    2020
     21#include "stdincl.h"
    2122#include "material.h"
    2223
     
    2728GLMenuImageScreen* GLMenuImageScreen::getInstance()
    2829{
    29   if( singletonRef == NULL)
     30  if(!singletonRef)
    3031    singletonRef = new GLMenuImageScreen ();
    3132  return singletonRef;
     
    4546/**
    4647   \brief standard deconstructor
    47 
    4848   \todo this deconstructor is not jet implemented - do it
    4949*/
     
    5353    delete backMat;
    5454}
    55 
    5655
    5756/**
     
    171170  glDisable(GL_LIGHTING);
    172171
    173   backMat->select();
    174172  glBegin(GL_QUADS);
    175173  glColor3f(0.96, 0.84, 0.34);
     
    210208  glEnd();
    211209
    212   glEnable(GL_TEXTURE_2D);
     210  backMat->select();
    213211  glBegin(GL_QUADS);
    214212  glTexCoord2i(0, 0); glVertex2i(offsetX, offsetY);
  • orxonox/branches/levelloader/src/glmenu/glmenu_imagescreen.h

    r3499 r3605  
    88#define _GLMENU_IMAGESCREEN_H
    99
    10 #include "stdincl.h"
    11 class Texture;
     10#include "base_object.h"
     11
    1212class Material;
    1313
     
    1818
    1919 public:
    20   ~GLMenuImageScreen ();
    21 
     20  virtual ~GLMenuImageScreen ();
     21 
    2222  static GLMenuImageScreen* getInstance();
    2323
  • orxonox/branches/levelloader/src/keynames.cc

    r3230 r3605  
    1515
    1616#include "keynames.h"
     17
     18#include "stdincl.h"
    1719
    1820#include <string.h>
  • orxonox/branches/levelloader/src/keynames.h

    r3230 r3605  
    77#ifndef _KEYNAMES_H
    88#define _KEYNAMES_H
    9 
    10 
    11 #ifdef __WIN32__
    12 #include <windows.h>
    13 #endif
    14 
    15 #ifndef __APPLE__
    16 #include <SDL/SDL.h>
    17 #else
    18 #include <SDL.h>
    19 #endif
    209
    2110/**
  • orxonox/branches/levelloader/src/lib/Makefile.in

    r3563 r3605  
    1 # Makefile.in generated by automake 1.8.2 from Makefile.am.
     1# Makefile.in generated by automake 1.8.5 from Makefile.am.
    22# @configure_input@
    33
     
    7878DEFS = @DEFS@
    7979DEPDIR = @DEPDIR@
     80DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@
     81DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@
    8082DOXYGEN = @DOXYGEN@
    8183DOXYGEN_FALSE = @DOXYGEN_FALSE@
     
    181183          esac; \
    182184        done; \
    183         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/Makefile'; \
     185        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/Makefile'; \
    184186        cd $(top_srcdir) && \
    185           $(AUTOMAKE) --gnu  src/lib/Makefile
     187          $(AUTOMAKE) --foreign  src/lib/Makefile
    186188.PRECIOUS: Makefile
    187189Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    276278        tags=; \
    277279        here=`pwd`; \
    278         if (etags --etags-include --version) >/dev/null 2>&1; then \
     280        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
    279281          include_option=--etags-include; \
     282          empty_fix=.; \
    280283        else \
    281284          include_option=--include; \
     285          empty_fix=; \
    282286        fi; \
    283287        list='$(SUBDIRS)'; for subdir in $$list; do \
    284288          if test "$$subdir" = .; then :; else \
    285             test -f $$subdir/TAGS && \
     289            test ! -f $$subdir/TAGS || \
    286290              tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
    287291          fi; \
     
    293297          $(AWK) '    { files[$$0] = 1; } \
    294298               END { for (i in files) print i; }'`; \
    295         test -z "$(ETAGS_ARGS)$$tags$$unique" \
    296           || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    297              $$tags $$unique
     299        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
     300          test -n "$$unique" || unique=$$empty_fix; \
     301          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     302            $$tags $$unique; \
     303        fi
    298304ctags: CTAGS
    299305CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
  • orxonox/branches/levelloader/src/lib/coord/helper_parent.cc

    r3499 r3605  
    3939   \todo this deconstructor is not jet implemented - do it
    4040*/
    41 HelperParent::~HelperParent () {}
     41HelperParent::~HelperParent ()
     42{
    4243
     44}
  • orxonox/branches/levelloader/src/lib/coord/helper_parent.h

    r3499 r3605  
    1717 public:
    1818  HelperParent ();
    19   ~HelperParent ();
    20 
     19  virtual ~HelperParent ();
    2120
    2221};
  • orxonox/branches/levelloader/src/lib/coord/null_parent.cc

    r3499 r3605  
    1616*/
    1717
     18#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_NULL_PARENT
    1819
    1920#include "null_parent.h"
     
    2627NullParent* NullParent::getInstance ()
    2728{
    28   if( singletonRef == NULL)
     29  if(!singletonRef)
    2930    singletonRef = new NullParent ();
    3031  return singletonRef;
     
    3637   \todo this constructor is not jet implemented - do it
    3738*/
    38 NullParent::NullParent ()
     39NullParent::NullParent () : PNode (new Vector(0,0,0), NULL)
    3940{
     41  PRINTF(4)("NullParent::NullParent() - making new NullParent, there can only be one..\n");
    4042  this->parent = this;
    41   this->mode = ALL;
     43  this->mode = PNODE_ALL;
     44  this->setName("NullParent");
    4245}
    4346
    4447
    45 NullParent::NullParent (Vector* absCoordinate)
     48NullParent::NullParent (Vector* absCoordinate) : PNode (new Vector(0,0,0), NULL)
    4649{
     50  singletonRef = this;
    4751  this->parent = this;
    48   this->mode = ALL;
     52  this->mode = PNODE_ALL;
    4953  this->absCoordinate = *absCoordinate;
     54  this->setName("NullParent");
    5055}
    5156
     
    5863NullParent::~NullParent ()
    5964{
    60   delete singletonRef;
     65  //delete singletonRef;
    6166  singletonRef = NULL;
    6267}
    63 
    64 
    65 
    6668
    6769/**
     
    7274   worry, normaly...
    7375*/
    74 void NullParent::update (float timeStamp)
     76void NullParent::update ()
    7577{
     78
     79  PRINTF(4)("NullParent::update - (%f, %f, %f)\n", this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
    7680  this->absCoordinate = this->relCoordinate;
    7781  this->absDirection = parent->getAbsDir () * this->relDirection;
     
    8589      if( this->bRelDirChanged || this->bAbsDirChanged)
    8690        pn->parentDirChanged ();
    87       pn->update (timeStamp);
     91      pn->update ();
    8892      pn = this->children->nextElement ();
    8993    }
  • orxonox/branches/levelloader/src/lib/coord/null_parent.h

    r3499 r3605  
    1616 public:
    1717  static NullParent* getInstance ();
    18   ~NullParent ();
    19  
    20   static NullParent* singletonRef;
     18  virtual ~NullParent ();
    2119
    22   virtual void update (float timeStamp);
     20
     21  virtual void update ();
    2322
    2423 private:
    2524  NullParent ();
    2625  NullParent (Vector* absCoordinate);
     26  static NullParent* singletonRef;
    2727
    2828};
  • orxonox/branches/levelloader/src/lib/coord/p_node.cc

    r3557 r3605  
    1313   ### File Specific:
    1414   main-programmer: Patrick Boenzli
    15    co-programmer: ...
    16 
    17    \todo Null-Parent => center of the coord system - singleton
     15   co-programmer:
     16
    1817   \todo Smooth-Parent: delay, speed
    19    \todo destroy the stuff again, delete...
    20 */
    21 
     18*/
     19
     20#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_PNODE
    2221
    2322#include "p_node.h"
    2423
     24#include "null_parent.h"
     25#include "vector.h"
    2526
    2627using namespace std;
     
    3435PNode::PNode ()
    3536{
    36   this->children = new tList<PNode>();
    37   this->bRelCoorChanged = true;
    38   this->bAbsCoorChanged = false;
    39   this->bRelDirChanged = true;
    40   this->bAbsDirChanged = false;
    41   this->parent = NULL;
     37  init(NULL);
     38
     39  NullParent* np = NullParent::getInstance();
     40  np->addChild(this);
    4241  this->objectName = NULL;
    4342}
     
    5150PNode::PNode (Vector* absCoordinate, PNode* parent )
    5251{
     52  this->init(parent);
     53
    5354  this->absCoordinate = *absCoordinate;
    54   this->relCoordinate = this->absCoordinate - parent->getAbsCoor ();
    55  
    56   this->children = new tList<PNode>();
    57   this->bRelCoorChanged = true;
    58   this->bAbsCoorChanged = false;
    59   this->bRelDirChanged = true;
    60   this->bAbsDirChanged = false;
    61   this->parent = parent;
    62   this->objectName = NULL;
    63  
    64   parent->addChild (this);
    65 }
    66 
     55  if (parent != NULL)
     56    {
     57      this->relCoordinate = this->absCoordinate - parent->getAbsCoor ();
     58      parent->addChild (this);
     59    }
     60  else
     61    this->relCoordinate = Vector(0,0,0);
     62}
    6763
    6864/**
     
    8076  delete &this->absDirection;
    8177  */
    82   this->parent = NULL;
     78  //this->parent = NULL;
    8379  if( this->objectName) delete this->objectName;
    8480  /* there is currently a problem with cleaning up - fix*/
    85 }
    86 
     81
     82  PNode* pn = this->children->enumerate();
     83  while( pn != NULL)
     84    {
     85      delete pn;
     86      pn = this->children->nextElement();
     87
     88    }
     89   
     90  /* this deletes all children in the list */
     91  delete this->children;
     92
     93  delete []this->objectName;
     94}
     95
     96void PNode::init(PNode* parent)
     97{
     98  this->children = new tList<PNode>();
     99  this->bRelCoorChanged = true;
     100  this->bAbsCoorChanged = false;
     101  this->bRelDirChanged = true;
     102  this->bAbsDirChanged = false;
     103  this->parent = parent;
     104  this->objectName = NULL;
     105}
    87106
    88107/**
     
    91110   cleans up all pnodes
    92111*/
     112/*
    93113void PNode::destroy ()
    94114{
     
    99119      pn = this->children->nextElement();
    100120    }
     121  // this deletes all children in the list
    101122  this->children->destroy ();
    102 }
    103 
     123
     124  static_cast<BaseObject*>(this)->destroy();
     125}
     126*/
    104127
    105128/**
     
    262285{}
    263286
    264 
    265 
    266287/**
    267288   \brief adds a child and makes this node to a parent
     
    283304   use this to add a child to this node.
    284305*/
    285 void PNode::addChild (PNode* pNode, parentingMode mode)
    286 {
    287   pNode->mode = mode;
     306void PNode::addChild (PNode* pNode, int parentingMode)
     307{
     308  if( pNode->parent != NULL )
     309    {
     310      PRINTF(2)("PNode::addChild() - reparenting node: removing it and adding it again\n");
     311      pNode->parent->children->remove(pNode);
     312    }
     313  pNode->mode = parentingMode;
    288314  pNode->parent = this;
    289   this->children->add (pNode);
     315  this->children->add(pNode);
    290316}
    291317
     
    294320   \brief removes a child from the node
    295321   \param pNode the child to remove from this pNode.
     322
     323   Children from pNode will not be lost, they are referenced to NullPointer
    296324*/
    297325void PNode::removeChild (PNode* pNode)
    298326{
     327  pNode->remove();
    299328  this->children->remove (pNode);
     329  pNode->parent = NULL;
     330}
     331
     332
     333/**
     334   \brief remove this pnode from the tree and adds all following to NullParent
     335
     336   this can be the case, if an entity in the world is been destroyed.
     337*/
     338void PNode::remove()
     339{
     340  NullParent* np = NullParent::getInstance();
     341  PNode* pn = this->children->enumerate();
     342  while( pn != NULL)
     343    {
     344      this->children->remove(pn);
     345      np->addChild(pn, pn->getMode());
     346      pn = this->children->nextElement();
     347    }
    300348}
    301349
     
    307355void PNode::setParent (PNode* parent)
    308356{
    309   this->parent = parent;
    310 }
     357  parent->addChild(this);
     358}
     359
    311360
    312361/**
     
    314363   \param mode the mode of the bind-type.
    315364*/
    316 void PNode::setMode (parentingMode mode)
    317 {
    318   this->mode = mode;
     365void PNode::setMode (int parentingMode)
     366{
     367  this->mode = parentingMode;
     368}
     369
     370
     371/**
     372   \brief gets the mode of this parent manualy
     373   \return the mode of the bind-type.
     374*/
     375int PNode::getMode()
     376{
     377  return this->mode;
    319378}
    320379
     
    351410   worry, normaly...
    352411*/
    353 void PNode::update (float timeStamp)
    354 {
    355   printf ("PNode::update - %s - (%f, %f, %f)\n", this->objectName, this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
    356 
    357       if( this->mode == MOVEMENT || this->mode == ALL)
     412void PNode::update ()
     413{
     414  PRINTF(2)("PNode::update - %s - (%f, %f, %f)\n", this->objectName, this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
     415  // printf("%s", this->objectName);
     416  if(this->mode & PNODE_MOVEMENT )
     417    {
     418      if( this->bAbsCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
    358419        {
    359           if( this->bAbsCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
     420          /* if you have set the absolute coordinates this overrides all other changes */
     421          this->relCoordinate = this->absCoordinate - parent->getAbsCoor ();
     422        }
     423      else if( this->bRelCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
     424        {
     425          /*this is bad style... must be deleted later - just for testing*/
     426          if( this->parent == NULL)
    360427            {
    361               printf("PNode::update () - this->bAbsCoorChanged = true\n");
    362               /* if you have set the absolute coordinates this overrides all other changes */
    363               this->relCoordinate = this->absCoordinate - parent->getAbsCoor ();
     428              this->absCoordinate = this->relCoordinate;
    364429            }
    365           else if( this->bRelCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
    366             {
    367               /*this is bad style... must be deleted later - just for testing*/
    368               if( this->parent == NULL)
    369                 {
    370                 this->absCoordinate = this->relCoordinate;
    371                 }
    372               else
    373                 this->absCoordinate = parent->getAbsCoor () + this->relCoordinate;            /* update the current absCoordinate */
    374             }
     430          else
     431            this->absCoordinate = parent->getAbsCoor() + this->relCoordinate;         /* update the current absCoordinate */
    375432        }
    376      
    377       if( this->mode == ROTATION && this->mode == ALL)
     433    }
     434 
     435  if( this->mode & PNODE_LOCAL_ROTATE)
     436    {
     437      if( this->bAbsDirChanged /*&& this->timeStamp != DataTank::timeStamp*/)
    378438        {
    379           if( this->bAbsDirChanged /*&& this->timeStamp != DataTank::timeStamp*/)
    380             {
    381               /* if you have set the absolute coordinates this overrides all other changes */
    382               this->relDirection = this->absDirection - parent->getAbsDir ();
    383             }
    384           else if( this->bRelDirChanged /*&& this->timeStamp != DataTank::timeStamp*/)
    385             {
    386               /* update the current absDirection - remember * means rotation around sth.*/
    387               this->absDirection = parent->getAbsDir () * this->relDirection;
    388             }
    389         }   
    390       // }
     439          /* if you have set the absolute coordinates this overrides all other changes */
     440          this->relDirection = this->absDirection - parent->getAbsDir();
     441        }
     442      else if( this->bRelDirChanged /*&& this->timeStamp != DataTank::timeStamp*/)
     443        {
     444          /* update the current absDirection - remember * means rotation around sth.*/
     445          this->absDirection = parent->getAbsDir() * this->relDirection;
     446        }
     447    }
     448 
     449  if( this->mode & PNODE_ROTATE_MOVEMENT)
     450    {
     451      if( this->bAbsCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
     452        {
     453          /* if you have set the absolute coordinates this overrides all other changes */
     454          this->relCoordinate = this->absCoordinate - parent->getAbsCoor ();
     455        }
     456      else if( this->bRelCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
     457        {
     458          /*this is bad style... must be deleted later - just for testing*/
     459          if( this->parent == NULL)
     460            this->absCoordinate = this->relCoordinate;
     461          else
     462            this->absCoordinate = parent->getAbsCoor() + parent->getAbsDir().apply(this->relCoordinate);              /* update the current absCoordinate */
     463        }
     464    }
     465 
     466 
    391467  PNode* pn = this->children->enumerate();
    392468  while( pn != NULL)
     
    397473      if( this->bRelDirChanged || this->bAbsDirChanged)
    398474        pn->parentDirChanged ();
    399       pn->update(timeStamp);
     475      pn->update();
    400476      pn = this->children->nextElement();
    401477    }
     
    415491void PNode::processTick (float dt)
    416492{
    417   this->tick (dt);
     493  //this->tick (dt);
    418494  PNode* pn = this->children->enumerate();
    419495  while( pn != NULL)
     
    424500}
    425501
    426 /**
    427    \param dt time to tick
    428 */
    429 void PNode::tick (float dt)
    430 {}
    431502
    432503/**
     
    435506void PNode::debug()
    436507{
    437   printf("PNode::debug() - absCoord: (%f, %f, %f)\n",
     508  PRINTF(2)("PNode::debug() - absCoord: (%f, %f, %f)\n",
    438509         this->absCoordinate.x,
    439510         this->absCoordinate.y,
     
    451522void PNode::setName (const char* newName)
    452523{
    453         int l = strlen( newName);
    454        
    455         if( this->objectName != NULL) delete this->objectName;
    456         this->objectName = NULL;
    457        
    458         if( newName != NULL)
    459         {
    460                 this->objectName = new char[l+1];
    461                
    462                 for( int i = 0; i < l+1; i++)
    463                         this->objectName[i] = newName[i];
    464         }
     524  if (this->objectName)
     525    delete []this->objectName;
     526  this->objectName = new char[strlen(newName)+1];
     527  strcpy(this->objectName,newName);
    465528}
    466529
     
    473536  return this->objectName;
    474537}
     538
  • orxonox/branches/levelloader/src/lib/coord/p_node.h

    r3557 r3605  
    2222#define _P_NODE_H
    2323
    24 #include "stdincl.h"
     24#include "base_object.h"
    2525
     26// FORWARD DEFINITION \\
    2627class PNode; /* forward decleration, so that parentEntry has access to PNode */
     28class Quaternion;
     29class Vector;
    2730
    2831//! enumeration for the different translation-binding-types
    29 typedef enum parentingMode {MOVEMENT = 0, ROTATION, ALL};
     32//typedef enum parentingMode {PNODE_LOCAL_ROTATE, PNODE_ROTATE_MOVEMENT, PNODE_ALL, PNODE_MOVEMENT, PNODE_ROTATE_AND_MOVE};
     33// linkage modes
     34#define PNODE_LOCAL_ROTATE       1    //!< Rotates all the children around their centers.
     35#define PNODE_ROTATE_MOVEMENT    2    //!< Moves all the children around the center of their parent, without the rotation around their own centers.
     36#define PNODE_MOVEMENT           4    //!< Moves all children along with the parent.
     37// special linkage modes
     38#define PNODE_ALL                3    //!< Moves all children around the center of their parent, and also rotates their centers
     39#define PNODE_ROTATE_AND_MOVE    5    //!< Rotates all children around their axis, and moves them as the Parent Moves, but does not rotate around the center of their parent.
     40
    3041//! The default mode of the translation-binding.
    31 #define DEFAULT_MODE ALL
     42#define DEFAULT_MODE PNODE_ALL
    3243
    3344//! Patent Node is a Engine to calculate the position of an Object in respect to the position of its parent.
     
    3950  virtual ~PNode ();
    4051
    41   void destroy ();
    42 
    4352  PNode* parent;            //!< a pointer to the parent node
    4453  tList<PNode>* children;   //!< list of the children
    4554
    46   parentingMode mode;       //!< the mode of the binding
     55
    4756
    4857  Vector getRelCoor ();
     
    6271
    6372  void addChild (PNode* pNode);
    64   void addChild (PNode* pNode, parentingMode mode);
     73  void addChild (PNode* pNode, int parentingMode);
    6574  void removeChild (PNode* pNode);
     75  void remove();
     76
     77
    6678  void setParent (PNode* parent);
    6779  void parentCoorChanged ();
    6880  void parentDirChanged ();
    69   void setMode (parentingMode mode);
     81  void setMode (int parentingMode);
     82  int getMode();
    7083
    71   virtual void update (float timeStamp);
     84  virtual void update ();
    7285  void processTick (float dt);
    73   virtual void tick (float dt);
    7486
    7587  void setName (const char* newName);
     
    7991  void debug ();
    8092
     93 private:
     94  void init(PNode* parent);
     95
     96 protected:
    8197  float timeStamp;         //!< this the timeStamp of when the abs{Coordinat, Direction} has been calculated
    8298  char* objectName;        //!< The name of the Object
     
    91107  Quaternion absDirection; //!< absolute direvtion in the world ( from (0,0,1) )
    92108
     109  int mode;                //!< the mode of the binding
     110
    93111};
    94112
    95113#endif /* _P_NODE_H */
     114 
  • orxonox/branches/levelloader/src/lib/graphics/Makefile.in

    r3563 r3605  
    1 # Makefile.in generated by automake 1.8.2 from Makefile.am.
     1# Makefile.in generated by automake 1.8.5 from Makefile.am.
    22# @configure_input@
    33
     
    7878DEFS = @DEFS@
    7979DEPDIR = @DEPDIR@
     80DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@
     81DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@
    8082DOXYGEN = @DOXYGEN@
    8183DOXYGEN_FALSE = @DOXYGEN_FALSE@
     
    175177          esac; \
    176178        done; \
    177         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/Makefile'; \
     179        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/Makefile'; \
    178180        cd $(top_srcdir) && \
    179           $(AUTOMAKE) --gnu  src/lib/graphics/Makefile
     181          $(AUTOMAKE) --foreign  src/lib/graphics/Makefile
    180182.PRECIOUS: Makefile
    181183Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    270272        tags=; \
    271273        here=`pwd`; \
    272         if (etags --etags-include --version) >/dev/null 2>&1; then \
     274        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
    273275          include_option=--etags-include; \
     276          empty_fix=.; \
    274277        else \
    275278          include_option=--include; \
     279          empty_fix=; \
    276280        fi; \
    277281        list='$(SUBDIRS)'; for subdir in $$list; do \
    278282          if test "$$subdir" = .; then :; else \
    279             test -f $$subdir/TAGS && \
     283            test ! -f $$subdir/TAGS || \
    280284              tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
    281285          fi; \
     
    287291          $(AWK) '    { files[$$0] = 1; } \
    288292               END { for (i in files) print i; }'`; \
    289         test -z "$(ETAGS_ARGS)$$tags$$unique" \
    290           || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    291              $$tags $$unique
     293        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
     294          test -n "$$unique" || unique=$$empty_fix; \
     295          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     296            $$tags $$unique; \
     297        fi
    292298ctags: CTAGS
    293299CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
  • orxonox/branches/levelloader/src/lib/graphics/font/fontset.cc

    r3499 r3605  
    4545#include <stdarg.h>
    4646
    47 #include "../importer/texture.h"
     47#include "texture.h"
     48#include <string.h>
    4849
    4950/**
  • orxonox/branches/levelloader/src/lib/graphics/importer/Makefile.in

    r3563 r3605  
    1 # Makefile.in generated by automake 1.8.2 from Makefile.am.
     1# Makefile.in generated by automake 1.8.5 from Makefile.am.
    22# @configure_input@
    33
     
    4242subdir = src/lib/graphics/importer
    4343DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
    44         $(srcdir)/Makefile.in TODO
     44        $(srcdir)/Makefile.in
    4545ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    4646am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     
    5050CONFIG_HEADER = $(top_builddir)/config.h
    5151CONFIG_CLEAN_FILES =
    52 am__installdirs = $(DESTDIR)$(bindir)
     52am__installdirs = "$(DESTDIR)$(bindir)"
    5353binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
    5454PROGRAMS = $(bin_PROGRAMS)
     
    9898DEFS = @DEFS@
    9999DEPDIR = @DEPDIR@
     100DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@
     101DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@
    100102DOXYGEN = @DOXYGEN@
    101103DOXYGEN_FALSE = @DOXYGEN_FALSE@
     
    215217          esac; \
    216218        done; \
    217         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile'; \
     219        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile'; \
    218220        cd $(top_srcdir) && \
    219           $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile
     221          $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile
    220222.PRECIOUS: Makefile
    221223Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    237239install-binPROGRAMS: $(bin_PROGRAMS)
    238240        @$(NORMAL_INSTALL)
    239         $(mkdir_p) $(DESTDIR)$(bindir)
     241        test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
    240242        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    241243          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
     
    243245          ; then \
    244246            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
    245            echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
    246            $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
     247           echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
     248           $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
    247249          else :; fi; \
    248250        done
     
    252254        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    253255          f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
    254           echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
    255           rm -f $(DESTDIR)$(bindir)/$$f; \
     256          echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
     257          rm -f "$(DESTDIR)$(bindir)/$$f"; \
    256258        done
    257259
     
    330332          $(AWK) '    { files[$$0] = 1; } \
    331333               END { for (i in files) print i; }'`; \
    332         test -z "$(ETAGS_ARGS)$$tags$$unique" \
    333           || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    334              $$tags $$unique
     334        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
     335          test -n "$$unique" || unique=$$empty_fix; \
     336          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     337            $$tags $$unique; \
     338        fi
    335339ctags: CTAGS
    336340CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     
    387391all-am: Makefile $(PROGRAMS) $(HEADERS)
    388392installdirs:
    389         $(mkdir_p) $(DESTDIR)$(bindir)
     393        for dir in "$(DESTDIR)$(bindir)"; do \
     394          test -z "$$dir" || $(mkdir_p) "$$dir"; \
     395        done
    390396install: install-am
    391397install-exec: install-exec-am
  • orxonox/branches/levelloader/src/lib/graphics/importer/array.cc

    r3499 r3605  
    1313   co-programmer: ...
    1414*/
     15
     16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER
    1517
    1618#include "array.h"
     
    3032Array::~Array()
    3133{
    32   PRINTF(2)("deleting array\n");
     34  PRINTF(4)("deleting array\n");
    3335  Entry* walker = this->firstEntry;
    3436  Entry* previous;
     
    4951void Array::initializeArray ()
    5052{
    51   PRINTF(2)("crating new Array\n");
     53  PRINTF(4)("crating new Array\n");
    5254  this->firstEntry = new Entry;
    5355  this->firstEntry->next =NULL;
     
    6466void Array::finalizeArray (void)
    6567{
    66   PRINTF(3)("Finalizing array. Length: %i\n", entryCount); 
     68  PRINTF(4)("Finalizing array. Length: %i\n", entryCount); 
    6769  //  if ((array = (GLfloat*)malloc( entryCount* sizeof(GLfloat))) == NULL)
    6870  if (!(this->array = new GLfloat [this->entryCount]))
     
    8789  if (!this->finalized)
    8890    {
    89       PRINTF(3)("adding new Entry to Array: %f\n", entry);
     91      PRINTF(5)("adding new Entry to Array: %f\n", entry);
    9092     
    9193      this->currentEntry->value = entry;
     
    9698    }
    9799  else
    98     PRINTF(1)("adding failed, because list has been finalized\n");
     100    PRINTF(2)("adding failed, because list has been finalized\n");
    99101}
    100102
     
    131133void Array::debug ()
    132134{
    133   PRINTF(0)("entryCount=%i, address=%p\n", this->entryCount, this->array);
     135  PRINT(0)("entryCount=%i, address=%p\n", this->entryCount, this->array);
    134136}
  • orxonox/branches/levelloader/src/lib/graphics/importer/array.h

    r3499 r3605  
    88#ifndef _ARRAY_H
    99#define _ARRAY_H
    10 
    11 extern int verbose; //!< will be obsolete soon
    1210
    1311#include "stdincl.h"
  • orxonox/branches/levelloader/src/lib/graphics/importer/material.cc

    r3499 r3605  
    1515*/
    1616
     17#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER
     18
    1719#include "material.h"
    1820
    1921#include "texture.h"
     22#include "debug.h"
    2023#include <stdlib.h>
    2124#include <string.h>
     
    5154Material::~Material()
    5255{
    53   PRINTF(2)("delete Material %s.\n", this->name);
     56  PRINTF(4)("delete Material %s.\n", this->name);
    5457  if (this->name)
    5558    delete []this->name;
     
    6770Material* Material::addMaterial(char* mtlName)
    6871{
    69   PRINTF(2)("adding Material %s.\n", mtlName);
     72  PRINTF(4)("adding Material %s.\n", mtlName);
    7073   Material* tmpMat = this;
    7174  while (tmpMat->nextMat != NULL)
     
    8386void Material::init(void)
    8487{
    85   PRINTF(2)("initializing new Material.\n");
     88  PRINTF(4)("initializing new Material.\n");
    8689  this->nextMat = NULL;
    8790  this->name ="";
     
    112115Material* Material::search(char* mtlName)
    113116{
    114   PRINTF(2)("Searching for material %s", mtlName);
     117  PRINTF(5)("Searching for material %s", mtlName);
    115118  Material* searcher = this;
    116119  while (searcher != NULL)
    117120    {
    118       PRINT(2)(".");
     121      PRINT(5)(".");
    119122      if (!strcmp (searcher->getName(), mtlName))
    120123        {
    121           PRINT(2)("found.\n");
     124          PRINT(5)("found.\n");
    122125          return searcher;
    123126        }
    124127      searcher = searcher->nextMat;
    125128    }
    126   PRINT(2)("not found\n");
     129  PRINT(2)("material %s not found\n", mtlName);
    127130  return NULL;
    128131}
     
    153156
    154157  if (this->diffuseTextureSet)
    155     glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture());
     158    {
     159      glEnable(GL_TEXTURE_2D);
     160      glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture());
     161    }
    156162  else
    157     glBindTexture(GL_TEXTURE_2D, 0);
    158  
     163    {
     164      glDisable(GL_TEXTURE_2D);
     165      glBindTexture(GL_TEXTURE_2D, 0);
     166    }
    159167}
    160168
     
    166174void Material::setName (char* mtlName)
    167175{
    168   PRINTF(3)("setting Material Name to %s.\n", this->name);
     176  PRINTF(4)("setting Material Name to %s.\n", this->name);
    169177  this->name = new char [strlen(mtlName)+1];
    170178  strcpy(this->name, mtlName);
     
    185193void Material::setIllum (int illum)
    186194{
    187   PRINTF(3)("setting illumModel of Material %s to %i\n", this->name, illum);
     195  PRINTF(4)("setting illumModel of Material %s to %i\n", this->name, illum);
    188196  this->illumModel = illum;
    189   //  PRINTF(3)("setting illumModel to: %i\n", illumModel);
    190197}
    191198/**
     
    205212void Material::setDiffuse (float r, float g, float b)
    206213{
    207   PRINTF(3)("setting Diffuse Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
     214  PRINTF(4)("setting Diffuse Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
    208215  this->diffuse[0] = r;
    209216  this->diffuse[1] = g;
     
    231238void Material::setAmbient (float r, float g, float b)
    232239{
    233   PRINTF(3)("setting Ambient Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
     240  PRINTF(4)("setting Ambient Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
    234241  this->ambient[0] = r;
    235242  this->ambient[1] = g;
     
    256263void Material::setSpecular (float r, float g, float b)
    257264{
    258   PRINTF(3)("setting Specular Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
     265  PRINTF(4)("setting Specular Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
    259266  this->specular[0] = r;
    260267  this->specular[1] = g;
     
    296303void Material::setTransparency (float trans)
    297304{
    298   PRINTF(3)("setting Transparency of Material %s to %f.\n", this->name, trans);
     305  PRINTF(4)("setting Transparency of Material %s to %f.\n", this->name, trans);
    299306  this->transparency = trans;
    300307}
     
    325332void Material::setDiffuseMap(char* dMap)
    326333{
    327   PRINTF(3)("setting Diffuse Map %s\n", dMap);
     334  PRINTF(4)("setting Diffuse Map %s\n", dMap);
    328335  diffuseTexture = new Texture();
    329336  this->diffuseTextureSet = diffuseTexture->loadImage(dMap);
  • orxonox/branches/levelloader/src/lib/graphics/importer/material.h

    r3499 r3605  
    99#define _MATERIAL_H
    1010
    11 
    12 
    13 extern int verbose; //!< will be obsolete soon.
    1411
    1512#if HAVE_CONFIG_H
  • orxonox/branches/levelloader/src/lib/graphics/importer/model.cc

    r3499 r3605  
    1313   co-programmer: ...
    1414*/
     15
     16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER
    1517
    1618#include "model.h"
     
    8082Model::~Model(void)
    8183{
    82   PRINTF(3)("Deleting Model ");
     84  PRINTF(4)("Deleting Model ");
    8385  if (this->name)
    8486    {
    85       PRINT(3)("%s\n", this->name);
     87      PRINT(4)("%s\n", this->name);
    8688      delete []this->name;
    8789    }
    8890  else
    89       PRINT(3)("\n");
    90 
    91   PRINTF(3)("Deleting display Lists.\n");
     91      PRINT(4)("\n");
     92
     93  PRINTF(4)("Deleting display Lists.\n");
    9294  Group* walker = this->firstGroup;
    9395  while (walker != NULL)
     
    99101    }
    100102
    101   PRINTF(3)("Deleting Materials.\n");
     103  PRINTF(4)("Deleting Materials.\n");
    102104  if (this->material)
    103105    delete this->material;
     
    122124void Model::draw (void) const
    123125{
    124   PRINTF(2)("drawing the 3D-Models\n");
     126  PRINTF(4)("drawing the 3D-Models\n");
    125127  Group* walker = this->firstGroup;
    126128  while (walker != NULL)
    127129    {
    128       PRINTF(3)("Drawing model %s\n", walker->name);
     130      PRINTF(5)("Drawing model %s\n", walker->name);
    129131      glCallList (walker->listNumber);
    130132      walker = walker->next;
     
    142144  if (groupNumber >= this->groupCount)
    143145    {
    144       PRINTF(1)("You requested model number %i, but this File only contains of %i Models.\n", groupNumber-1, this->groupCount);
     146      PRINTF(2)("You requested model number %i, but this File only contains of %i Models.\n", groupNumber-1, this->groupCount);
    145147      return;
    146148    }
    147   PRINTF(2)("drawing the requested 3D-Models if found.\n");
     149  PRINTF(4)("drawing the requested 3D-Models if found.\n");
    148150  Group* walker = this->firstGroup;
    149151  int counter = 0;
     
    152154      if (counter == groupNumber)
    153155        {
    154           PRINTF(2)("Drawing model number %i named %s\n", counter, walker->name);
     156          PRINTF(4)("Drawing model number %i named %s\n", counter, walker->name);
    155157          glCallList (walker->listNumber);
    156158          return;
     
    159161      walker = walker->next;
    160162    }
    161   PRINTF(1)("Model number %i in %s not Found.\n", groupNumber, this->name);
     163  PRINTF(2)("Model number %i in %s not Found.\n", groupNumber, this->name);
    162164  return;
    163165
     
    172174void Model::draw (char* groupName) const
    173175{
    174   PRINTF(2)("drawing the requested 3D-Models if found.\n");
     176  PRINTF(4)("drawing the requested 3D-Models if found.\n");
    175177  Group* walker = this->firstGroup;
    176178  while (walker != NULL)
     
    178180      if (!strcmp(walker->name, groupName))
    179181        {
    180           PRINTF(2)("Drawing model %s\n", walker->name);
     182          PRINTF(4)("Drawing model %s\n", walker->name);
    181183          glCallList (walker->listNumber);
    182184          return;
     
    184186      walker = walker->next;
    185187    }
    186   PRINTF(1)("Model Named %s in %s not Found.\n", groupName, this->name);
     188  PRINTF(2)("Model Named %s in %s not Found.\n", groupName, this->name);
    187189  return;
    188190}
     
    204206bool Model::initialize (void)
    205207{
    206   PRINTF(2)("new 3D-Model is being created\n");
     208  PRINTF(4)("new 3D-Model is being created\n");
    207209
    208210  this->name = NULL;
     
    243245bool Model::initGroup(Group* group)
    244246{
    245   PRINTF(3)("Adding new Group\n");
     247  PRINTF(4)("Adding new Group\n");
    246248  group->name = "";
    247249  group->faceMode = -1;
     
    277279bool Model::cleanup(void)
    278280{
    279   PRINTF(3)("cleaning up the 3D-Model to save Memory.\n");
     281  PRINTF(4)("cleaning up the 3D-Model to save Memory.\n");
    280282
    281283  if (this->vertices)
     
    296298bool Model::cleanupGroup (Group* group)
    297299{
    298   PRINTF(3)("Cleaning up group\n");
     300  PRINTF(5)("Cleaning up group\n");
    299301  if (group->firstFace != NULL)
    300302    {
     
    314316bool Model::cleanupFace (Face* face)
    315317{
    316   PRINTF(3)("Cleaning up Face\n");
     318  PRINTF(5)("Cleaning up Face\n");
    317319
    318320  if (face->materialString != NULL)
     
    355357bool Model::addGroup (char* groupString)
    356358{
    357   PRINTF(3)("Read Group: %s.\n", groupString);
     359  PRINTF(5)("Read Group: %s.\n", groupString);
    358360  if (this->groupCount != 0 && this->currentGroup->faceCount>0)
    359361    {
     
    384386  float subbuffer3;
    385387  sscanf (vertexString, "%f %f %f", &subbuffer1, &subbuffer2, &subbuffer3);
    386   PRINTF(3)("reading in a vertex: %f %f %f\n", &subbuffer1, &subbuffer2, &subbuffer3);
     388  PRINTF(5)("reading in a vertex: %f %f %f\n", &subbuffer1, &subbuffer2, &subbuffer3);
    387389  this->vertices->addEntry(subbuffer1*scaleFactor, subbuffer2*scaleFactor, subbuffer3*scaleFactor);
    388390  return true;
     
    398400bool Model::addVertex(const float x, const float y, const float z)
    399401{
    400   PRINTF(4)("reading in a vertex: %f %f %f\n", x, y, z);
     402  PRINTF(5)("reading in a vertex: %f %f %f\n", x, y, z);
    401403  this->vertices->addEntry(x*scaleFactor, y*scaleFactor, z*scaleFactor);
    402404  return true;
     
    513515  float subbuffer3;
    514516  sscanf (normalString, "%f %f %f", &subbuffer1, &subbuffer2, &subbuffer3);
    515   PRINTF(3)("found vertex-Normal %f, %f, %f\n", &subbuffer1,&subbuffer2,&subbuffer3);
     517  PRINTF(5)("found vertex-Normal %f, %f, %f\n", &subbuffer1,&subbuffer2,&subbuffer3);
    516518  this->normals->addEntry(subbuffer1, subbuffer2, subbuffer3);
    517519  return true;
     
    544546  float subbuffer2;
    545547  sscanf (vTextureString, "%f %f", &subbuffer1, &subbuffer2);
    546   PRINTF(3)("found vertex-Texture %f, %f\n", &subbuffer1, &subbuffer2);
     548  PRINTF(5)("found vertex-Texture %f, %f\n", &subbuffer1, &subbuffer2);
    547549  this->vTexture->addEntry(subbuffer1);
    548550  this->vTexture->addEntry(subbuffer2);
     
    610612      if ((this->currentGroup->listNumber = glGenLists(1)) == 0)
    611613        {
    612           PRINTF(1)("list could not be created for this Model\n");
     614          PRINTF(2)("glList could not be created for this Model\n");
    613615          return false;
    614616        }
     
    628630                {
    629631                  tmpMat->select();
    630                   PRINTF(2)("using material %s for coming Faces.\n", tmpFace->materialString);
     632                  PRINTF(5)("using material %s for coming Faces.\n", tmpFace->materialString);
    631633                }
    632634              else
    633                 PRINTF(1)("material %s not found.\n", tmpFace->materialString);
     635                PRINTF(2)("material %s not found.\n", tmpFace->materialString);
    634636
    635637
     
    646648             
    647649              this->currentGroup->faceMode = 3;
    648               PRINTF(3)("found triag.\n");
     650              PRINTF(5)("found triag.\n");
    649651            }
    650652         
     
    658660                }
    659661              this->currentGroup->faceMode = 4;
    660               PRINTF(3)("found quad.\n");
     662              PRINTF(5)("found quad.\n");
    661663            }
    662664         
     
    666668                glEnd();
    667669              glBegin(GL_POLYGON);
    668               PRINTF(3)("Polygon with %i faces found.", tmpFace->vertexCount);
     670              PRINTF(5)("Polygon with %i faces found.", tmpFace->vertexCount);
    669671              this->currentGroup->faceMode = tmpFace->vertexCount;
    670672            }
     
    698700bool Model::addGLElement (FaceElement* elem)
    699701{
    700   PRINTF(3)("importing grafical Element to openGL.\n");
     702  PRINTF(5)("importing grafical Element to openGL.\n");
    701703
    702704  if (elem->texCoordNumber != -1)
     
    721723{
    722724 
    723   PRINTF(2)("Normals are being calculated.\n");
     725  PRINTF(4)("Normals are being calculated.\n");
    724726
    725727  Vector* normArray = new Vector [vertices->getCount()/3];
     
    778780    {
    779781      normArray[i].normalize();
    780       PRINTF(3)("Found Normale number %d: (%f; %f, %f).\n", i, normArray[i].x, normArray[i].y, normArray[i].z);
     782      PRINTF(5)("Found Normale number %d: (%f; %f, %f).\n", i, normArray[i].x, normArray[i].y, normArray[i].z);
    781783     
    782784      this->normals->addEntry(normArray[i].x, normArray[i].y, normArray[i].z);
     
    881883        //printf ("%f %f\n", vz, sin (vz));
    882884        if (i==0.0)
    883                   printf("%f, %f\n", j/df*2.0*PI, cos(j/df*PI));
     885          PRINTF(0)("%f, %f\n", j/df*2.0*PI, cos(j/df*PI));
    884886      }
    885887    }
  • orxonox/branches/levelloader/src/lib/graphics/importer/objModel.cc

    r3542 r3605  
    1313   co-programmer: ...
    1414*/
     15
     16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER
    1517
    1618#include "objModel.h"
     
    8688bool OBJModel::importFile (const char* fileName)
    8789{
    88   PRINTF(3)("preparing to read in file: %s\n", fileName);
     90  PRINTF(4)("preparing to read in file: %s\n", fileName);
    8991
    9092
     
    107109  strncpy(this->objPath, fileName, name-fileName);
    108110  this->objPath[name-fileName] = '\0';
    109   if (verbose>=2)
    110     if (strlen(objPath)> 0)
    111       PRINTF(0)("Resolved file %s to folder: %s.\n", name, objPath);
    112     else
    113       PRINTF(0)("Resolved file %s.\n", name);
     111  if (strlen(objPath)> 0)
     112    PRINTF(5)("Resolved file %s to folder: %s.\n", name, objPath);
     113  else
     114    PRINTF(5)("Resolved file %s.\n", name);
    114115 
    115116  this->setName(name);
     
    144145      return false;
    145146    }
    146   PRINTF(2)("Reading from opened file %s\n", fileName);
     147  PRINTF(4)("Reading from opened file %s\n", fileName);
    147148  char Buffer[10000];
    148149  while(!OBJ_FILE->eof())
    149150    {
    150151      OBJ_FILE->getline(Buffer, 10000);
    151       PRINTF(3)("Read input line: %s\n", Buffer);
     152      PRINTF(5)("Read input line: %s\n", Buffer);
    152153     
    153154
     
    192193      else if (!strncmp(Buffer, "s ", 2)) //! \todo smoothing groups have to be implemented
    193194        {
    194           if (verbose >= 2)
    195             PRINTF(2)("smoothing groups not supportet yet. line: %s\n", Buffer);
     195          PRINTF(3)("smoothing groups not supportet yet. line: %s\n", Buffer);
    196196        }
    197197    }
     
    221221 
    222222
    223   PRINTF(3)("Opening mtlFile: %s\n", fileName);
     223  PRINTF(4)("Opening mtlFile: %s\n", fileName);
    224224
    225225  ifstream* MTL_FILE = new ifstream (fileName);
    226226  if (MTL_FILE->fail())
    227227    {
    228       PRINTF(1)("unable to open file: %s\n", fileName);
     228      PRINTF(2)("unable to open file: %s\n", fileName);
    229229      MTL_FILE->close();
    230230      delete []fileName;
     
    237237    {
    238238      MTL_FILE->getline(Buffer, 500);
    239       PRINTF(4)("found line in mtlFile: %s\n", Buffer);
     239      PRINTF(5)("found line in mtlFile: %s\n", Buffer);
    240240     
    241241
  • orxonox/branches/levelloader/src/lib/graphics/importer/texture.cc

    r3499 r3605  
    1717*/
    1818
     19
     20#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER
    1921
    2022#include "texture.h"
     
    8789  if (pName[0] == '\0')
    8890    {
    89       PRINTF(3)("not Adding empty Path to the List.\n");
     91      PRINTF(2)("not Adding empty Path to the List.\n");
    9092      return;
    9193    }
     
    99101      if (status.st_mode & S_IFDIR)
    100102        {
    101           PRINTF(2)("Adding Path %s to the PathList.\n", pName);
     103          PRINTF(4)("Adding Path %s to the PathList.\n", pName);
    102104          PathList* tmpPathList = this;
    103105          while (tmpPathList->next)
     
    193195bool Texture::loadTexToGL (Image* pImage)
    194196{
    195   PRINTF(2)("Loading texture to OpenGL-Environment.\n");
     197  PRINTF(4)("Loading texture to OpenGL-Environment.\n");
    196198  glGenTextures(1, &this->texture);
    197199  glBindTexture(GL_TEXTURE_2D, this->texture);
     
    229231        pImage->format = GL_RGBA;
    230232         
    231       PRINTF(0)("Bits Per Pixel: %d\n", pImage->bpp);
    232233      if( !IMG_isPNG(SDL_RWFromFile(imgNameWithPath, "rb")) && !IMG_isJPG(SDL_RWFromFile(imgNameWithPath, "rb")))
    233234        for (int i=0;i<map->h * map->w *3;i+=3)
     
    249250  else
    250251    {
    251       PRINTF(1)("Image not Found: %s\n", imgNameWithPath);
     252      PRINTF(2)("Image not Found: %s\n", imgNameWithPath);
    252253      return false;
    253254    }
     
    268269      if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".bmp", 4))
    269270        {
    270           PRINTF(3)("Requested bmp-image. Trying to Import.\n");
     271          PRINTF(4)("Requested bmp-image. Trying to Import.\n");
    271272          return this->loadBMP(imgNameWithPath);
    272273        }
     
    274275      else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".jpg", 4) || !strncmp(imgNameWithPath+strlen(imgNameWithPath)-5, ".jpg", 5))
    275276        {
    276           PRINTF(3)("Requested jpeg-image. Trying to Import\n");
     277          PRINTF(4)("Requested jpeg-image. Trying to Import\n");
    277278          return this->loadJPG(imgNameWithPath);
    278279        }
    279280      else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".tga", 4))
    280281        {
    281           PRINTF(3)("Requested tga-image. Trying to Import\n");
     282          PRINTF(4)("Requested tga-image. Trying to Import\n");
    282283          return this->loadTGA(imgNameWithPath);
    283284        }
    284285      else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".png", 4))
    285286        {
    286           PRINTF(3)("Requested png-image. Trying to Import\n");
     287          PRINTF(4)("Requested png-image. Trying to Import\n");
    287288          return this->loadPNG(imgNameWithPath);
    288289        }
    289290      else
    290291        {
    291           PRINTF(1)("Requested Image was not recognized in its type. (Maybe a type-Cast-error.)\n FileName: %s", imgNameWithPath);
     292          PRINTF(2)("Requested Image was not recognized in its type. (Maybe a type-Cast-error.)\n FileName: %s", imgNameWithPath);
    292293          return false;
    293294        }
     
    295296  else
    296297    {
    297       PRINTF(1)("Image not Found: %s\n", imgNameWithPath);
     298      PRINTF(2)("Image not Found: %s\n", imgNameWithPath);
    298299      return false;
    299300    }
     
    316317  if ((file = fopen(bmpName, "rb"))==NULL)
    317318    {
    318       PRINTF(1)("File Not Found : %s\n",bmpName);
     319      PRINTF(2)("File Not Found : %s\n",bmpName);
    319320      return false;
    320321    }
     
    325326  if ((i = fread(&pImage->width, 4, 1, file)) != 1)
    326327    {
    327       PRINTF(1)("Error reading width from %s.\n", bmpName);
     328      PRINTF(2)("Error reading width from %s.\n", bmpName);
    328329      return false;
    329330    }
     
    331332  if ((i = fread(&pImage->height, 4, 1, file)) != 1)
    332333    {
    333       PRINTF(1)("Error reading height from %s.\n", bmpName);
     334      PRINTF(2)("Error reading height from %s.\n", bmpName);
    334335      return false;
    335336    }
     
    341342  if ((fread(&planes, 2, 1, file)) != 1)
    342343    {
    343       PRINTF(1)("Error reading planes from %s.\n", bmpName);
     344      PRINTF(2)("Error reading planes from %s.\n", bmpName);
    344345      return false;
    345346    }
     
    353354  if ((i = fread(&bpp, 2, 1, file)) != 1)
    354355    {
    355       PRINTF(1)("Error reading bpp from %s.\n", bmpName);
     356      PRINTF(2)("Error reading bpp from %s.\n", bmpName);
    356357      return false;
    357358    }
    358359  if (bpp != 24)
    359360    {
    360       PRINTF(1)("Bpp from %s is not 24: %u\n", bmpName, bpp);
     361      PRINTF(2)("Bpp from %s is not 24: %u\n", bmpName, bpp);
    361362      return false;
    362363    }
     
    369370  if (pImage->data == NULL)
    370371    {
    371       PRINTF(1)("Error allocating memory for color-corrected image data");
     372      PRINTF(2)("Error allocating memory for color-corrected image data");
    372373      return false;     
    373374    }
     
    375376  if ((i = fread(pImage->data, size, 1, file)) != 1)
    376377    {
    377       PRINTF(1)("Error reading image data from %s.\n", bmpName);
     378      PRINTF(2)("Error reading image data from %s.\n", bmpName);
    378379      return false;
    379380    }
     
    418419    {
    419420      // Display an error message saying the file was not found, then return NULL
    420       PRINTF(1)("Unable to load JPG File %s.\n", jpgName);
     421      PRINTF(2)("Unable to load JPG File %s.\n", jpgName);
    421422      return false;
    422423    }
     
    521522  if(fTGA == NULL)
    522523    {
    523       PRINTF(1)("Error could not open texture file: %s\n", tgaName);
     524      PRINTF(2)("Error could not open texture file: %s\n", tgaName);
    524525      return false;
    525526    }
     
    527528  if(fread(&tgaHeader, sizeof(TGAHeader), 1, fTGA) == 0)
    528529    {
    529       PRINTF(1)("Error could not read file header of %s\n", tgaName);
     530      PRINTF(2)("Error could not read file header of %s\n", tgaName);
    530531      if(fTGA != NULL)
    531532        {
     
    549550  else
    550551    {
    551       PRINTF(1)("Error TGA file be type 2 or type 10\n");
     552      PRINTF(2)("Error TGA file be type 2 or type 10\n");
    552553      if (fTGA)
    553554        fclose(fTGA);
     
    576577  if(fread(header, sizeof(header), 1, fTGA) == 0)
    577578    {
    578       PRINTF(1)("Error could not read info header\n");
     579      PRINTF(2)("Error could not read info header\n");
    579580      return false;
    580581    }
     
    586587  if((pImage->width <= 0) || (pImage->height <= 0) || ((pImage->bpp != 24) && (pImage->bpp !=32)))
    587588    {
    588       PRINTF(1)("Error invalid texture information\n");
     589      PRINTF(2)("Error invalid texture information\n");
    589590      return false;
    590591    }
     
    605606  if(pImage->data == NULL)
    606607    {
    607       PRINTF(1)("Error could not allocate memory for image\n");
     608      PRINTF(2)("Error could not allocate memory for image\n");
    608609      return false;
    609610    }
     
    611612  if(fread(pImage->data, 1, imageSize, fTGA) != imageSize)
    612613    {
    613       PRINTF(1)("Error could not read image data\n");
     614      PRINTF(2)("Error could not read image data\n");
    614615      if(pImage->data != NULL)
    615616        {
     
    648649  if(fread(header, sizeof(header), 1, fTGA) == 0)
    649650    {
    650       PRINTF(1)("Error could not read info header\n");
     651      PRINTF(2)("Error could not read info header\n");
    651652      return false;
    652653    }
     
    664665  if((pImage->width <= 0) || (pImage->height <= 0) || ((pImage->bpp != 24) && (pImage->bpp !=32)))
    665666    {
    666       PRINTF(1)("Error Invalid pImage information\n");
     667      PRINTF(2)("Error Invalid pImage information\n");
    667668      return false;
    668669    }
     
    674675  if(pImage->data == NULL)
    675676    {
    676       PRINTF(1)("Error could not allocate memory for image\n");
     677      PRINTF(2)("Error could not allocate memory for image\n");
    677678      return false;
    678679    }
     
    684685      if(fread(&chunkheader, sizeof(GLubyte), 1, fTGA) == 0)
    685686        {
    686           PRINTF(1)("Error could not read RLE header\n");
     687          PRINTF(2)("Error could not read RLE header\n");
    687688          if(pImage->data != NULL)
    688689            {
     
    702703              if(fread(colorbuffer, 1, bytesPerPixel, fTGA) != bytesPerPixel)
    703704                {
    704                   PRINTF(1)("Error could not read image data\n");
     705                  PRINTF(2)("Error could not read image data\n");
    705706                  if(colorbuffer != NULL)
    706707                    {
     
    732733              if(currentpixel > pixelcount)     
    733734                {
    734                   PRINTF(1)("Error too many pixels read\n");
     735                  PRINTF(2)("Error too many pixels read\n");
    735736                  if(colorbuffer != NULL)
    736737                    {
     
    754755          if(fread(colorbuffer, 1, bytesPerPixel, fTGA) != bytesPerPixel) // Attempt to read following color values
    755756            {
    756               PRINTF(1)("Error could not read from file");
     757              PRINTF(2)("Error could not read from file");
    757758              if(colorbuffer != NULL)
    758759                {
     
    785786              if(currentpixel > pixelcount)
    786787                {
    787                   PRINTF(1)("Error too many pixels read\n");
     788                  PRINTF(2)("Error too many pixels read\n");
    788789                  if(colorbuffer != NULL)
    789790                    {
  • orxonox/branches/levelloader/src/lib/graphics/importer/texture.h

    r3499 r3605  
    1010#define _TEXTURE_H
    1111
    12 #include "stdincl.h"
     12#include "glincl.h"
     13
     14#include "debug.h"
     15
    1316#ifdef HAVE_SDL_SDL_IMAGE_H
    1417#include <SDL/SDL_image.h>
  • orxonox/branches/levelloader/src/lib/graphics/importer/windowHandler.h

    r3499 r3605  
    77#ifndef _WINDOWHANDLER_H
    88#define _WINDOWHANDLER_H
    9 
    10 extern int verbose;
    119
    1210#include "stdincl.h"
  • orxonox/branches/levelloader/src/lib/gui/Makefile.in

    r3563 r3605  
    1 # Makefile.in generated by automake 1.8.2 from Makefile.am.
     1# Makefile.in generated by automake 1.8.5 from Makefile.am.
    22# @configure_input@
    33
     
    7878DEFS = @DEFS@
    7979DEPDIR = @DEPDIR@
     80DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@
     81DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@
    8082DOXYGEN = @DOXYGEN@
    8183DOXYGEN_FALSE = @DOXYGEN_FALSE@
     
    177179          esac; \
    178180        done; \
    179         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/Makefile'; \
     181        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/Makefile'; \
    180182        cd $(top_srcdir) && \
    181           $(AUTOMAKE) --gnu  src/lib/gui/Makefile
     183          $(AUTOMAKE) --foreign  src/lib/gui/Makefile
    182184.PRECIOUS: Makefile
    183185Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    272274        tags=; \
    273275        here=`pwd`; \
    274         if (etags --etags-include --version) >/dev/null 2>&1; then \
     276        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
    275277          include_option=--etags-include; \
     278          empty_fix=.; \
    276279        else \
    277280          include_option=--include; \
     281          empty_fix=; \
    278282        fi; \
    279283        list='$(SUBDIRS)'; for subdir in $$list; do \
    280284          if test "$$subdir" = .; then :; else \
    281             test -f $$subdir/TAGS && \
     285            test ! -f $$subdir/TAGS || \
    282286              tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
    283287          fi; \
     
    289293          $(AWK) '    { files[$$0] = 1; } \
    290294               END { for (i in files) print i; }'`; \
    291         test -z "$(ETAGS_ARGS)$$tags$$unique" \
    292           || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    293              $$tags $$unique
     295        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
     296          test -n "$$unique" || unique=$$empty_fix; \
     297          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     298            $$tags $$unique; \
     299        fi
    294300ctags: CTAGS
    295301CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
  • orxonox/branches/levelloader/src/lib/gui/console/Makefile.in

    r3563 r3605  
    1 # Makefile.in generated by automake 1.8.2 from Makefile.am.
     1# Makefile.in generated by automake 1.8.5 from Makefile.am.
    22# @configure_input@
    33
     
    5050CONFIG_HEADER = $(top_builddir)/config.h
    5151CONFIG_CLEAN_FILES =
    52 am__installdirs = $(DESTDIR)$(bindir)
     52am__installdirs = "$(DESTDIR)$(bindir)"
    5353binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
    5454PROGRAMS = $(bin_PROGRAMS)
     
    9696DEFS = @DEFS@
    9797DEPDIR = @DEPDIR@
     98DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@
     99DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@
    98100DOXYGEN = @DOXYGEN@
    99101DOXYGEN_FALSE = @DOXYGEN_FALSE@
     
    203205          esac; \
    204206        done; \
    205         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/console/Makefile'; \
     207        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/console/Makefile'; \
    206208        cd $(top_srcdir) && \
    207           $(AUTOMAKE) --gnu  src/lib/gui/console/Makefile
     209          $(AUTOMAKE) --foreign  src/lib/gui/console/Makefile
    208210.PRECIOUS: Makefile
    209211Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    225227install-binPROGRAMS: $(bin_PROGRAMS)
    226228        @$(NORMAL_INSTALL)
    227         $(mkdir_p) $(DESTDIR)$(bindir)
     229        test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
    228230        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    229231          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
     
    231233          ; then \
    232234            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
    233            echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
    234            $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
     235           echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
     236           $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
    235237          else :; fi; \
    236238        done
     
    240242        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    241243          f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
    242           echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
    243           rm -f $(DESTDIR)$(bindir)/$$f; \
     244          echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
     245          rm -f "$(DESTDIR)$(bindir)/$$f"; \
    244246        done
    245247
     
    297299          $(AWK) '    { files[$$0] = 1; } \
    298300               END { for (i in files) print i; }'`; \
    299         test -z "$(ETAGS_ARGS)$$tags$$unique" \
    300           || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    301              $$tags $$unique
     301        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
     302          test -n "$$unique" || unique=$$empty_fix; \
     303          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     304            $$tags $$unique; \
     305        fi
    302306ctags: CTAGS
    303307CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     
    354358all-am: Makefile $(PROGRAMS) $(HEADERS)
    355359installdirs:
    356         $(mkdir_p) $(DESTDIR)$(bindir)
     360        for dir in "$(DESTDIR)$(bindir)"; do \
     361          test -z "$$dir" || $(mkdir_p) "$$dir"; \
     362        done
    357363install: install-am
    358364install-exec: install-exec-am
  • orxonox/branches/levelloader/src/lib/gui/gui/Makefile.in

    r3563 r3605  
    1 # Makefile.in generated by automake 1.8.2 from Makefile.am.
     1# Makefile.in generated by automake 1.8.5 from Makefile.am.
    22# @configure_input@
    33
     
    5050CONFIG_HEADER = $(top_builddir)/config.h
    5151CONFIG_CLEAN_FILES =
    52 am__installdirs = $(DESTDIR)$(bindir)
     52am__installdirs = "$(DESTDIR)$(bindir)"
    5353binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
    5454PROGRAMS = $(bin_PROGRAMS)
     
    105105DEFS = @DEFS@
    106106DEPDIR = @DEPDIR@
     107DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@
     108DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@
    107109DOXYGEN = @DOXYGEN@
    108110DOXYGEN_FALSE = @DOXYGEN_FALSE@
     
    236238          esac; \
    237239        done; \
    238         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/gui/gui/Makefile'; \
     240        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/gui/gui/Makefile'; \
    239241        cd $(top_srcdir) && \
    240           $(AUTOMAKE) --gnu  src/lib/gui/gui/Makefile
     242          $(AUTOMAKE) --foreign  src/lib/gui/gui/Makefile
    241243.PRECIOUS: Makefile
    242244Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    258260install-binPROGRAMS: $(bin_PROGRAMS)
    259261        @$(NORMAL_INSTALL)
    260         $(mkdir_p) $(DESTDIR)$(bindir)
     262        test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
    261263        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    262264          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
     
    264266          ; then \
    265267            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
    266            echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
    267            $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
     268           echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
     269           $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
    268270          else :; fi; \
    269271        done
     
    273275        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    274276          f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
    275           echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
    276           rm -f $(DESTDIR)$(bindir)/$$f; \
     277          echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
     278          rm -f "$(DESTDIR)$(bindir)/$$f"; \
    277279        done
    278280
     
    336338          $(AWK) '    { files[$$0] = 1; } \
    337339               END { for (i in files) print i; }'`; \
    338         test -z "$(ETAGS_ARGS)$$tags$$unique" \
    339           || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    340              $$tags $$unique
     340        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
     341          test -n "$$unique" || unique=$$empty_fix; \
     342          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     343            $$tags $$unique; \
     344        fi
    341345ctags: CTAGS
    342346CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     
    393397all-am: Makefile $(PROGRAMS) $(HEADERS)
    394398installdirs:
    395         $(mkdir_p) $(DESTDIR)$(bindir)
     399        for dir in "$(DESTDIR)$(bindir)"; do \
     400          test -z "$$dir" || $(mkdir_p) "$$dir"; \
     401        done
    396402install: install-am
    397403install-exec: install-exec-am
  • orxonox/branches/levelloader/src/lib/gui/gui/orxonox_gui_gtk.h

    r3499 r3605  
    99#include <config.h>
    1010#endif
    11 
    12 //! verbose level, soon obsolete
    13 extern int verbose; // soon obsolete here
    1411
    1512#include "debug.h"
  • orxonox/branches/levelloader/src/lib/lang/base_object.cc

    r3499 r3605  
    2626   \brief standard constructor
    2727*/
    28 BaseObject::BaseObject () {}
     28BaseObject::BaseObject ()
     29{
     30  this->className = NULL;
     31}
    2932
    3033
     
    3235   \brief standard deconstructor
    3336*/
    34 BaseObject::~BaseObject () {}
    35 
     37BaseObject::~BaseObject ()
     38{
     39  delete []this->className;
     40}
    3641
    3742void BaseObject::setClassName (char* className)
    3843{
    39   this->className = className;
     44  this->className = new char[strlen(className)+1];
     45  strcpy(this->className, className);
    4046}
    4147
  • orxonox/branches/levelloader/src/lib/lang/base_object.h

    r3499 r3605  
    1515 public:
    1616  BaseObject ();
    17   ~BaseObject ();
     17  virtual ~BaseObject ();
    1818
    1919  void setClassName (char* className);
  • orxonox/branches/levelloader/src/lib/math/curve.cc

    r3499 r3605  
    1919     local-Time implementation
    2020     NURBS
     21     tList implementation
    2122     
    2223*/
    2324
     25#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_MATH
     26
    2427#include "curve.h"
    25 #include "matrix.h"
     28
    2629#include "debug.h"
    2730
    2831#include <math.h>
    2932#include <stdio.h>
     33
     34
     35/**
     36    \brief default constructor for a Curve
     37*/
     38Curve::Curve(void)
     39{
     40  nodeCount = 0;
     41  firstNode = new PathNode;
     42  currentNode = firstNode;
     43
     44  firstNode->position = Vector (.0, .0, .0);
     45  firstNode->number = 0;
     46  firstNode->next = 0; // not sure if this really points to NULL!!
     47}
    3048
    3149/**
     
    131149  this->derivation = 0;
    132150  dirCurve = new BezierCurve(1);
    133   this->init();
    134151}
    135152
     
    141158  this->derivation = derivation;
    142159  dirCurve=NULL;
    143   this->init();
    144160}
    145161
     
    161177  if (dirCurve)
    162178    delete dirCurve;
    163 }
    164 
    165 /**
    166    \brief Initializes a BezierCurve
    167 */
    168 void BezierCurve::init(void)
    169 {
    170   nodeCount = 0;
    171   firstNode = new PathNode;
    172   currentNode = firstNode;
    173 
    174   firstNode->position = Vector (.0, .0, .0);
    175   firstNode->number = 0;
    176   firstNode->next = 0; // not sure if this really points to NULL!!
    177 
    178   return;
    179179}
    180180
     
    285285  return curvePoint;
    286286}
    287 
    288 
    289 
    290 ///////////////////////////////////
    291 //// Uniform Point curve  /////////
    292 ///////////////////////////////////
    293 /**
    294    \brief Creates a new UPointCurve
    295 */
    296 UPointCurve::UPointCurve (void)
    297 {
    298   this->derivation = 0;
    299   this->init();
    300 }
    301 
    302 /**
    303    \brief Creates a new UPointCurve-Derivation-Curve of deriavation'th degree
    304 */
    305 UPointCurve::UPointCurve (int derivation)
    306 {
    307   this->derivation = derivation;
    308   dirCurve=NULL;
    309   this->init();
    310 }
    311 
    312 /**
    313    \brief Deletes a UPointCurve.
    314 
    315    It does this by freeing all the space taken over from the nodes
    316 */
    317 UPointCurve::~UPointCurve(void)
    318 {
    319   PathNode* tmpNode;
    320   currentNode = firstNode;
    321   while (tmpNode != 0)
    322     {
    323       tmpNode = currentNode;
    324       currentNode = currentNode->next;
    325       delete tmpNode;
    326     }
    327   if (dirCurve)
    328     delete dirCurve;
    329 }
    330 
    331 /**
    332    \brief Initializes a UPointCurve
    333 */
    334 void UPointCurve::init(void)
    335 {
    336   nodeCount = 0;
    337   firstNode = new PathNode;
    338   currentNode = firstNode;
    339 
    340   firstNode->position = Vector (.0, .0, .0);
    341   firstNode->number = 0;
    342   firstNode->next = 0; // not sure if this really points to NULL!!
    343 
    344   return;
    345 }
    346 
    347 /**
    348    \brief Rebuilds a UPointCurve
    349    
    350    \todo very bad algorithm
    351 */
    352 void UPointCurve::rebuild(void)
    353 {
    354   // rebuilding the Curve itself
    355   PathNode* tmpNode = this->firstNode;
    356   int i=0;
    357   Matrix xTmpMat = Matrix(this->nodeCount, this->nodeCount);
    358   Matrix yTmpMat = Matrix(this->nodeCount, this->nodeCount);
    359   Matrix zTmpMat = Matrix(this->nodeCount, this->nodeCount);
    360   Matrix xValMat = Matrix(this->nodeCount, 3);
    361   Matrix yValMat = Matrix(this->nodeCount, 3);
    362   Matrix zValMat = Matrix(this->nodeCount, 3);
    363   while(tmpNode)
    364     {
    365       Vector fac = Vector(1,1,1);
    366       for (int j = 0; j < this->nodeCount; j++)
    367         {
    368           xTmpMat(i,j) = fac.x; fac.x *= (float)i/(float)this->nodeCount;//tmpNode->position.x;
    369           yTmpMat(i,j) = fac.y; fac.y *= (float)i/(float)this->nodeCount;//tmpNode->position.y;
    370           zTmpMat(i,j) = fac.z; fac.z *= (float)i/(float)this->nodeCount;//tmpNode->position.z;
    371         }
    372       xValMat(i,0) = tmpNode->position.x;
    373       yValMat(i,0) = tmpNode->position.y;
    374       zValMat(i,0) = tmpNode->position.z;
    375       ++i;
    376       tmpNode = tmpNode->next;
    377     }
    378   tmpNode = this->firstNode;
    379   xValMat = xTmpMat.Inv() *= xValMat;
    380   yValMat = yTmpMat.Inv() *= yValMat;
    381   zValMat = zTmpMat.Inv() *= zValMat;
    382   i = 0;
    383   while(tmpNode)
    384     {
    385       tmpNode->vFactor.x = xValMat(i,0);
    386       tmpNode->vFactor.y = yValMat(i,0);
    387       tmpNode->vFactor.z = zValMat(i,0);
    388 
    389       i++;
    390       tmpNode = tmpNode->next;
    391     }
    392 }
    393 
    394 /**
    395    \brief calculates the Position on the curve
    396    \param t The position on the Curve (0<=t<=1)
    397    \return the Position on the Path
    398 */
    399 Vector UPointCurve::calcPos(float t)
    400 {
    401   PathNode* tmpNode = firstNode;
    402   Vector ret = Vector(0.0,0.0,0.0);
    403   float factor = 1.0;
    404   while(tmpNode)
    405     {
    406       ret.x += tmpNode->vFactor.x * factor;
    407       ret.y += tmpNode->vFactor.y * factor;
    408       ret.z += tmpNode->vFactor.z * factor;
    409       factor *= t;
    410 
    411       tmpNode = tmpNode->next;
    412     }
    413   return ret;
    414 }
    415 
    416 /**
    417    \brief Calulates the direction of the Curve at time t.
    418    \param The time at which to evaluate the curve.
    419    \returns The vvaluated Vector.
    420 */
    421 Vector UPointCurve::calcDir (float t)
    422 {
    423   PathNode* tmpNode = firstNode;
    424   Vector ret = Vector(0.0,0.0,0.0);
    425   float factor = 1.0/t;
    426   int k=0;
    427   while(tmpNode)
    428     {
    429       ret.x += tmpNode->vFactor.x * factor *k;
    430       ret.y += tmpNode->vFactor.y * factor *k;
    431       ret.z += tmpNode->vFactor.z * factor *k;
    432       factor *= t;
    433       k++;
    434       tmpNode = tmpNode->next;
    435     }
    436   ret.normalize();
    437   return ret;
    438 }
    439 
    440 Vector UPointCurve::calcAcc (float t)
    441 {
    442 }
    443 
    444 /**
    445    \brief Calculates the Quaternion needed for our rotations
    446    \param t The time at which to evaluate the cuve.
    447    \returns The evaluated Quaternion.
    448 */
    449 Quaternion UPointCurve::calcQuat (float t)
    450 {
    451   return Quaternion (calcDir(t), Vector(0,0,1));
    452 }
    453 
    454 
    455 /**
    456   \brief returns the Position of the point calculated on the Curve
    457   \return a Vector to the calculated position
    458 */
    459 Vector UPointCurve::getPos(void) const
    460 {
    461   return curvePoint;
    462 }
  • orxonox/branches/levelloader/src/lib/math/curve.h

    r3499 r3605  
    1313
    1414//! An Enumerator that defines what sort of Curves are availible
    15 enum CurveType {BEZIERCURVE, UPOINTCURVE};
     15enum CurveType {BEZIERCURVE};
    1616
    1717
     
    3838  PathNode* currentNode; //!< The node we are working with (the Last node).
    3939
     40
    4041 private:
    4142  virtual void rebuild(void) = 0;
    4243 public:
     44  Curve(void);
     45
    4346  Curve* dirCurve;       //!< The derivation-curve of this Curve.
    4447  void addNode(const Vector& newNode);
     
    6871  BezierCurve(void);
    6972  BezierCurve(int derivation);
    70   ~BezierCurve(void);
    71   void init(void);
     73  virtual ~BezierCurve(void);
    7274
    7375  Vector calcPos(float t);
     
    9193};
    9294
    93 //! Uniform Point Curve-class
    94 /**
    95    A UPoint Curve is a A Curve, that flows through all the nodes given it.
    96    The Algorithm to buid the curve is rather slow, but Painting and tracing along the curve has high speed, so do not change this curve during the Game.
    97 
    98    This Curve is very erattic, so i do not recommend to use it.
    99 */
    100 class UPointCurve : public Curve
    101 {
    102  private:
    103   void rebuild(void);
    104  public:
    105   UPointCurve(void);
    106   UPointCurve(int derivation);
    107   ~UPointCurve(void);
    108   void init(void);
    109 
    110   Vector calcPos(float t);
    111   Vector calcDir(float t);
    112   Vector calcAcc(float t);
    113   Quaternion calcQuat(float t);
    114  
    115   Vector getPos(void) const;
    116 };
    117 
    11895#endif /* _CURVE_H */
  • orxonox/branches/levelloader/src/lib/math/vector.cc

    r3499 r3605  
    1919*/
    2020
     21#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_MATH
    2122
    2223#include "vector.h"
    23 
     24#include "debug.h"
    2425
    2526using namespace std;
     
    201202}
    202203
    203 
    204204/**
    205205   \brief calculate the angle between two vectors in radiances
     
    225225  f = acos( v1 * v2 / (v1.len() * v2.len()));
    226226  return f * 180 / PI;
     227}
     228
     229
     230/**
     231   \brief Outputs the values of the Vector
     232*/
     233void Vector::debug(void)
     234{
     235  PRINT(0)("Vector Debug information\n");
     236  PRINT(0)("x: %f; y: %f; z: %f", x, y, z);
     237  PRINT(3)(" lenght: %f", len());
     238  PRINT(0)("\n");
    227239}
    228240
     
    581593
    582594/**
     595   \brief outputs some nice formated debug information about this quaternion
     596*/
     597void Quaternion::debug(void)
     598{
     599  PRINT(0)("Quaternion Debug Information\n");
     600  PRINT(0)("real a=%f; imag: x=%f y=%f z=%f\n", w, v.x, v.y, v.z);
     601}
     602
     603/**
    583604   \brief create a rotation from a vector
    584605   \param v: a vector
  • orxonox/branches/levelloader/src/lib/math/vector.h

    r3499 r3605  
    4141  Vector* getNormalized();
    4242  Vector abs();
     43
     44  void debug();
    4345};
    4446
     
    5355{
    5456 public:
    55         Vector v;       //!< Imaginary Vector
    56         float w;        //!< Real part of the number
    57 
    58         Quaternion ();
    59         Quaternion (float m[4][4]);
    60         Quaternion (float angle, const Vector& axis);
    61         Quaternion (const Vector& dir, const Vector& up);
    62         Quaternion (float roll, float pitch, float yaw);
    63        
    64         Quaternion operator/ (const float& f) const;
    65         Quaternion operator* (const float& f) const;
    66         Quaternion operator* (const Quaternion& q) const;
    67         Quaternion operator+ (const Quaternion& q) const;
    68         Quaternion operator- (const Quaternion& q) const;
    69         Quaternion conjugate () const;
    70         Quaternion inverse () const;
    71         Vector apply (Vector& f) const;
    72         float norm () const;
    73         void matrix (float m[4][4]) const;
    74         void quatSlerp(const Quaternion* from, const Quaternion* to, const float t, Quaternion* res);
    75 
     57  Vector v;     //!< Imaginary Vector
     58  float w;        //!< Real part of the number
     59 
     60  Quaternion ();
     61  Quaternion (float m[4][4]);
     62  Quaternion (float angle, const Vector& axis);
     63  Quaternion (const Vector& dir, const Vector& up);
     64  Quaternion (float roll, float pitch, float yaw);
     65 
     66  Quaternion operator/ (const float& f) const;
     67  Quaternion operator* (const float& f) const;
     68  Quaternion operator* (const Quaternion& q) const;
     69  Quaternion operator+ (const Quaternion& q) const;
     70  Quaternion operator- (const Quaternion& q) const;
     71  Quaternion conjugate () const;
     72  Quaternion inverse () const;
     73  Vector apply (Vector& f) const;
     74  float norm () const;
     75  void matrix (float m[4][4]) const;
     76  void quatSlerp(const Quaternion* from, const Quaternion* to, const float t, Quaternion* res);
     77 
     78  void debug();
    7679 private:
    77         float DELTA;      //!< resolution of calculation
     80  float DELTA;      //!< resolution of calculation
    7881
    7982};
  • orxonox/branches/levelloader/src/lib/util/list.h

    r3499 r3605  
    8686  T* enumerate();
    8787  T* nextElement();
     88  T* nextElement(T* toEntity);
    8889  T* toArray();
    8990  void debug();
     
    101102template<class T>
    102103tList<T>::~tList ()
    103 {}
     104{
     105  this->currentEl = this->first;
     106  while(this->currentEl != NULL)
     107    {
     108      listElement* le = this->currentEl->next;
     109      //delete this->currentEl->curr;
     110      delete this->currentEl;
     111      this->currentEl = le;
     112    }
     113  this->first = NULL;
     114  this->last = NULL;
     115  this->size = 0;
     116}
     117
    104118
    105119template<class T>
    106120void tList<T>::add(T* entity)
    107121{
     122  if( entity == NULL) return;
    108123  listElement* el = new listElement;
    109124  el->prev = this->last;
     
    113128  this->last = el;
    114129
    115   if(this->size == 0) this->first = el;
     130  if(el->prev == NULL) this->first = el; /* if first element */
    116131  else el->prev->next = el;
    117132  this->size++;
     
    122137void tList<T>::remove(T* entity)
    123138{
     139  if( entity == NULL) return;
    124140  this->currentEl = this->first;
    125141  listElement* te;
     
    134150          else this->currentEl->next->prev = this->currentEl->prev;
    135151
    136           te = this->currentEl->next;
     152          te = this->currentEl->next;  // for what am i doing this?
    137153          delete this->currentEl;
    138154          this->currentEl = te;
     155          this->size--;
    139156          return;
    140157        }
     
    151168    {
    152169      listElement* le = this->currentEl->next;
    153       delete this->currentEl->curr;
     170      //delete this->currentEl->curr;
    154171      delete this->currentEl;
    155172      this->currentEl = le;
     
    185202T* tList<T>::enumerate()
    186203{
     204  //if( this->last == this->first == NULL) return NULL;
    187205  if(this->size == 0) return NULL;
    188206  this->currentEl = this->first;
     
    194212T* tList<T>::nextElement()
    195213{
     214  // if( this->last == this->first == NULL) return NULL;
    196215  if(this->size == 0) return NULL;
    197216  this->currentEl = this->currentEl->next;
     
    201220
    202221
     222/**
     223   \brief this returns the next element after toEntity or the first if toEntity is last
     224*/
     225template<class T>
     226T* tList<T>::nextElement(T* toEntity)
     227{
     228  //if( this->last == this->first == NULL) return NULL;
     229  if(this->size == 0) return NULL;
     230  if( toEntity == NULL) return this->first->curr;
     231  if( toEntity == this->last->curr ) return this->first->curr;
     232  this->currentEl = this->first;
     233  while(this->currentEl->curr != toEntity && this->currentEl->next != NULL)
     234    {
     235      this->currentEl = this->currentEl->next;
     236    }
     237  if(this->currentEl == NULL) return NULL;
     238  return this->currentEl->next->curr;
     239}
     240
     241
    203242template<class T>
    204243T* tList<T>::toArray()
  • orxonox/branches/levelloader/src/orxonox.cc

    r3542 r3605  
    3131#include "game_loader.h"
    3232#include <string.h>
    33 int verbose;
     33int verbose = 4;
    3434
    3535using namespace std;
     
    5454  if( resources != NULL) delete resources;
    5555}
    56 
    5756
    5857/** \brief this is a singleton class to prevent duplicates */
     
    173172  // SDL_WM_SetIcon(SDL_Surface *icon, Uint8 *mask); 
    174173
    175   // OpenGL stuff
    176   glClearColor (0.0, 0.0, 0.0, 0.0);
    177   glEnable (GL_DEPTH_TEST);
    178    
    179174  return 0;
    180175}
  • orxonox/branches/levelloader/src/orxonox.conf

    r2636 r3605  
    55RIGHT=right
    66SPACE=fire
     7m=mode
    78ESCAPE=quit
    89p=pause
     
    1011BUTTON_LEFT=fire
    1112BUTTON_RIGHT=altfire
    12 b=benscho
    1313x=up_world
    1414z=down_world
  • orxonox/branches/levelloader/src/orxonox.h

    r3499 r3605  
    2424  static Orxonox* singletonRef;
    2525  Orxonox ();
    26   ~Orxonox ();
    27  
     26  virtual ~Orxonox ();
     27
    2828  char configfilename[256];   //!< Filename of the configuration-file.
    2929  World* world;               //!< Reference to the current running world.
  • orxonox/branches/levelloader/src/proto_class.cc

    r3365 r3605  
    1616*/
    1717
     18#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
    1819
    1920#include "proto_class.h"
    2021
     22#include "stdincl.h" // maybe
    2123
    2224using namespace std;
     
    3537/**
    3638   \brief standard deconstructor
    37    \todo this deconstructor is not jet implemented - do it
    3839
    3940*/
    40 ProtoClass::~ProtoClass () {}
    41 
     41ProtoClass::~ProtoClass ()
     42{
     43  // delete what has to be deleted here
     44}
    4245
    4346/**
  • orxonox/branches/levelloader/src/proto_class.h

    r3365 r3605  
    1111#define _PROTO_CLASS_H
    1212
    13 #include "stdincl.h"
     13#include "what realy has to be included"
     14#include "base_object.h"
     15
     16// FORWARD DEFINITION \\
     17class someClassWeNeed;
     18
    1419
    1520/*class Test;*/ /* forward definition of class Test (without including it here!)*/
     
    2227
    2328 public:
    24   ProtoClass ();
    25   ~ProtoClass ();
     29  ProtoClass();
     30  virtual ~ProtoClass();
    2631
    2732  bool doNonSense (int nothing);
  • orxonox/branches/levelloader/src/story_entities/campaign.h

    r3557 r3605  
    1414  Campaign ();
    1515  Campaign ( TiXmlElement* root);
    16   ~Campaign ();
     16  virtual ~Campaign ();
    1717
    1818  StoryEntity* currentEntity;
  • orxonox/branches/levelloader/src/story_entities/world.cc

    r3604 r3605  
    1414   co-programmer: Christian Meyer
    1515*/
     16
     17#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD
    1618
    1719#include "world.h"
     
    2224#include "camera.h"
    2325#include "environment.h"
     26#include "primitive.h"
    2427#include "p_node.h"
    2528#include "null_parent.h"
     
    3134#include "factory.h"
    3235#include "game_loader.h"
     36#include "track_node.h"
     37#include "terrain.h"
    3338
    3439using namespace std;
     
    7984World::World (char* name)
    8085{
    81   this->setClassName ("World");
    82   this->worldName = name;
    83   this->debugWorldNr = -1;
    84   this->entities = new tList<WorldEntity>();
     86  this->init(name, -1);
     87  //NullParent* np = NullParent::getInstance();
    8588}
    8689
     
    9194World::World (int worldID)
    9295{
    93   this->debugWorldNr = worldID;
    94   this->worldName = NULL;
    95   this->entities = new tList<WorldEntity>();
     96  this->init(NULL, worldID);
    9697}
    9798
     
    104105World::~World ()
    105106{
    106   printf("World::~World() - deleting current world\n");
     107  PRINTF(3)("World::~World() - deleting current world\n");
    107108  CommandNode* cn = Orxonox::getInstance()->getLocalInput();
    108109  cn->unbind(this->localPlayer);
    109110  cn->reset();
    110111
    111   this->localCamera->destroy();
    112   this->nullParent->destroy(); 
    113   delete this->skySphere;
     112  delete this->nullParent;
     113  delete this->entities;
     114  delete this->lightMan;
     115  delete this->trackManager;
     116}
    114117  if( this->worldName) delete this->worldName;
    115118  if( this->path) delete this->path;
    116119
    117   //delete this->trackManager;
    118 
    119   /*
    120   WorldEntity* entity = entities->enumerate(); 
    121   while( entity != NULL )
    122     {
    123       entity->destroy();
    124       entity = entities->nextElement();
    125     }
    126   this->entities->destroy();
    127   */
    128 
    129   /* FIX the parent list has to be cleared - not possible if we got the old list also*/
    130 
    131 
    132   //delete this->entities;
    133   //delete this->localCamera;
    134   /* this->localPlayer hasn't to be deleted explicitly, it is
    135      contained in entities*/
     120/**
     121   \brief initializes a new World
     122*/
     123void World::init(char* name, int worldID)
     124{
     125  this->setClassName ("World");
     126
     127  this->worldName = name;
     128  this->debugWorldNr = worldID;
     129  this->entities = new tList<WorldEntity>();
     130
     131  // Enable default GL stuff
     132  glEnable(GL_DEPTH_TEST);
     133
    136134}
    137135
     
    142140ErrorMessage World::load()
    143141{
     142<<<<<<< .working
    144143       
    145144        PRINTF0("> Loading world: '%s'\n", getPath());
     
    156155        // load the campaign document
    157156        if( !XMLDoc->LoadFile())
     157=======
     158  //  BezierCurve* tmpCurve = new BezierCurve();
     159  if(this->debugWorldNr != -1)
     160    {
     161      // initializing Font
     162      testFont = new FontSet();
     163      testFont->buildFont("../data/pictures/font.tga");
     164
     165      // initializing the TrackManager
     166      trackManager = TrackManager::getInstance();
     167      trackManager->addPoint(Vector(0,0,0));
     168      trackManager->addPoint(Vector(100, -40, 5));
     169      trackManager->addPoint(Vector(200,-40,-8));
     170      trackManager->addPoint(Vector(250, -35, -2));
     171      trackManager->addPoint(Vector(320,-33,-.55));
     172      trackManager->setDuration(1);
     173      trackManager->setSavePoint();
     174      trackManager->addPoint(Vector(410, 0, 0));
     175      trackManager->addPoint(Vector(510, 20, -10));
     176      trackManager->addPoint(Vector(550, 20, -10));
     177      trackManager->addPoint(Vector(570, 20, -10));
     178      trackManager->setDuration(1);
     179     
     180      int fork11, fork12;
     181      trackManager->fork(2, &fork11, &fork12);
     182      trackManager->workOn(fork11);
     183      trackManager->addPoint(Vector(640, 25, -30));
     184      trackManager->addPoint(Vector(700, 40, -120));
     185      trackManager->addPoint(Vector(800, 50, -150));
     186      trackManager->addPoint(Vector(900, 60, -100));
     187      trackManager->addPoint(Vector(900, 60, -70));
     188      trackManager->addPoint(Vector(990, 65, -15));
     189      trackManager->addPoint(Vector(1050, 65, -10));
     190      trackManager->addPoint(Vector(1100, 65, -20));
     191      trackManager->setDuration(4);
     192
     193      trackManager->workOn(fork12);
     194      trackManager->addPoint(Vector(640, 25, 20));
     195      trackManager->addPoint(Vector(670, 50, 120));
     196      trackManager->addPoint(Vector(700, 70, 80));
     197      trackManager->addPoint(Vector(800, 70, 65));
     198      trackManager->addPoint(Vector(850, 65, 65));
     199      trackManager->addPoint(Vector(920, 35, 40));
     200      trackManager->addPoint(Vector(945, 40, 40));
     201      trackManager->addPoint(Vector(970, 24, 40));
     202      trackManager->addPoint(Vector(1000, 40, -7));
     203      trackManager->setDuration(4);
     204     
     205
     206      trackManager->join(2, fork11, fork12);
     207
     208      trackManager->workOn(5);
     209      trackManager->addPoint(Vector(1200, 60, -50));
     210      trackManager->addPoint(Vector(1300, 50, -50));
     211      trackManager->addPoint(Vector(1400, 40, -50));
     212      trackManager->addPoint(Vector(1500, 40, -60));
     213      trackManager->addPoint(Vector(1600, 35, -55));
     214      trackManager->addPoint(Vector(1700, 45, -40));
     215      trackManager->addPoint(Vector(1750, 60, -40));
     216      trackManager->addPoint(Vector(1770, 80, -40));
     217      trackManager->addPoint(Vector(1800, 100, -40));
     218      trackManager->setDuration(4);
     219
     220      trackManager->finalize();
     221
     222     
     223      /*monitor progress*/
     224      this->glmis->step();
     225
     226      // LIGHT initialisation
     227      lightMan = LightManager::getInstance();
     228      lightMan->setAmbientColor(.1,.1,.1);
     229      lightMan->addLight();
     230      //      lightMan->setAttenuation(1.0, .01, 0.0);
     231      //      lightMan->setDiffuseColor(1,1,1);
     232      //  lightMan->addLight(1);
     233      //  lightMan->setPosition(20, 10, -20);
     234      //  lightMan->setDiffuseColor(0,0,0);
     235      lightMan->debug();
     236
     237      switch(this->debugWorldNr)
     238>>>>>>> .merge-right.r3604
    158239        {
     240<<<<<<< .working
    159241                // report an error
    160242                PRINTF0("Error loading XML File: %s @ %d:%d\n", XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol());
     
    234316                PRINTF0("Done loading Track\n");
    235317        }
     318=======
     319          /*
     320            this loads the hard-coded debug world. this only for simplicity and will be
     321            removed by a reald world-loader, which interprets a world-file.
     322            if you want to add an own debug world, just add a case DEBUG_WORLD_[nr] and
     323            make whatever you want...
     324           */
     325        case DEBUG_WORLD_0:
     326          {
     327            lightMan->setPosition(-5.0, 10.0, -40.0);
     328            this->nullParent = NullParent::getInstance ();
     329            this->nullParent->setName ("NullParent");
     330>>>>>>> .merge-right.r3604
    236331
    237332       
     
    265360    this->localPlayer->addChild (this->localCamera);
    266361
     362<<<<<<< .working
    267363       
    268364        // stuff beyond this point remains to be loaded properly
     
    270366      /*monitor progress*/
    271367  //  this->glmis->step();
    272 
     368=======
     369            //create helper for player
     370            //HelperParent* hp = new HelperParent ();
     371            /* the player has to be added to this helper */
     372>>>>>>> .merge-right.r3604
     373
     374<<<<<<< .working
     375=======
     376            // create a player
     377            this->localPlayer = new Player ();
     378            this->localPlayer->setName ("player");
     379            this->spawn (this->localPlayer);
     380            /*monitor progress*/
     381            this->glmis->step();           
     382
     383            // bind input
     384            Orxonox *orx = Orxonox::getInstance ();
     385            orx->getLocalInput()->bind (this->localPlayer);
     386           
     387            // bind camera
     388            this->localCamera = new Camera(this);
     389            this->localCamera->setName ("camera");
     390            this->localCamera->bind (this->localPlayer);
     391            /*monitor progress*/
     392            this->glmis->step();           
     393
     394>>>>>>> .merge-right.r3604
    273395            // Create SkySphere
    274             skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
     396            this->skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
     397            this->skySphere->setName("SkySphere");
     398            this->localCamera->addChild(this->skySphere);
     399            this->skySphere->setMode(PNODE_MOVEMENT);
    275400
    276401            /*monitor progress*/
     
    279404          //  trackManager->setBindSlave(env);
    280405
     406<<<<<<< .working
     407=======
     408           
     409            WorldEntity* env = new Environment();
     410            env->setName ("env");
     411            this->spawn(env);
     412
     413           
     414            Vector* es = new Vector (10, 5, 0);
     415            Quaternion* qs = new Quaternion ();
     416            WorldEntity* pr = new Primitive(PSPHERE);
     417            pr->setName("primitive");
     418            this->spawn(pr, this->localPlayer, es, qs, PNODE_MOVEMENT);
     419           
     420
     421            /*monitor progress*/
     422            this->glmis->step();
     423
     424            //      trackManager->setBindSlave(env);
     425            PNode* tn = trackManager->getTrackNode();
     426            tn->addChild(this->localPlayer);
     427
     428            //localCamera->setParent(TrackNode::getInstance());
     429            tn->addChild (this->localCamera);
     430            this->localPlayer->setMode(PNODE_ROTATE_AND_MOVE);
     431            //Vector* cameraOffset = new Vector (0, 5, -10);
     432            Vector* cameraOffset = new Vector (-10, 5, 0);
     433            this->localCamera->setRelCoor (cameraOffset);
     434            trackManager->condition(2, LEFTRIGHT, this->localPlayer);
     435
     436            break;
     437          }
     438        case DEBUG_WORLD_1:
     439          {
     440            lightMan->setPosition(.0, .0, .0);
     441            lightMan->setAttenuation(1.0, .01, 0.0);
     442            lightMan->setSpecularColor(1,0,0);
     443            this->nullParent = NullParent::getInstance ();
     444            this->nullParent->setName ("NullParent");
     445
     446            // create a player
     447            WorldEntity* myPlayer = new Player();
     448            myPlayer->setName ("player");
     449            this->spawn(myPlayer);
     450            this->localPlayer = myPlayer;           
     451           
     452            // bind input
     453            Orxonox *orx = Orxonox::getInstance();
     454            orx->getLocalInput()->bind (myPlayer);
     455           
     456            // bind camera
     457            this->localCamera = new Camera (this);
     458            this->localCamera->setName ("camera");
     459            this->localCamera->bind (myPlayer);
     460            this->localPlayer->addChild (this->localCamera);
     461
     462            // Create SkySphere
     463            skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
     464            this->localPlayer->addChild(this->skySphere);
     465
     466            Vector* es = new Vector (20, 0, 0);
     467            Quaternion* qs = new Quaternion ();
     468            WorldEntity* pr = new Primitive(PSPHERE);
     469            pr->setName("primitive");
     470            this->spawn(pr, this->localPlayer, es, qs, PNODE_ROTATE_AND_MOVE);
     471
     472            lightMan->getLight(0)->setParent(trackManager->getTrackNode());
     473            break;
     474          }
     475        default:
     476          printf("World::load() - no world with ID %i found", this->debugWorldNr );
     477        }
     478    }
     479  else if(this->worldName != NULL)
     480    {
     481
     482    }
     483
     484>>>>>>> .merge-right.r3604
    281485  // initialize debug coord system
    282486  objectList = glGenLists(1);
    283487  glNewList (objectList, GL_COMPILE);
    284   glLoadIdentity();
    285   glColor3f(1.0,0,0);
    286   glBegin(GL_QUADS);
    287 
    288   int sizeX = 100;
    289   int sizeZ = 80;
    290   float length = 1000;
    291   float width = 200;
    292   float widthX = float (length /sizeX);
    293   float widthZ = float (width /sizeZ);
    294  
    295   float height [sizeX][sizeZ];
    296   Vector normal_vectors[sizeX][sizeZ];
    297  
    298  
    299   for ( int i = 0; i<sizeX-1; i+=1)
    300     for (int j = 0; j<sizeZ-1;j+=1)
    301       //height[i][j] = rand()/20046 + (j-25)*(j-25)/30;
    302 #ifdef __WIN32__
    303       height[i][j]=(sin((float)j/3)*rand()*i/182400)*.5;
    304 #else
    305       height[i][j]=(sin((float)j/3)*rand()*(long)i/6282450500.0)*.5;
    306 #endif
    307 
    308   //Die Huegel ein wenig glaetten
    309   for (int h=1; h<2;h++)
    310     for (int i=1;i<sizeX-2 ;i+=1 )
    311       for(int j=1;j<sizeZ-2;j+=1)
    312         height[i][j]=(height[i+1][j]+height[i][j+1]+height[i-1][j]+height[i][j-1])/4;
    313  
    314   //Berechnung von normalen Vektoren
    315   for(int i=1;i<sizeX-2;i+=1)
    316     for(int j=1;j<sizeZ-2 ;j+=1)
    317       {
    318         Vector v1 = Vector (widthX*(1),      height[i][j],      widthZ*(j) );
    319         Vector v2 = Vector (widthX*(i-1),    height[i-1][j],    widthZ*(j));
    320         Vector v3 = Vector (widthX*(i),      height[i][j+1],    widthZ*(j+1));
    321         Vector v4 = Vector (widthX*(i+1),    height[i+1][j],    widthZ*(j));
    322         Vector v5 = Vector (widthX*(i),      height[i][j-1],    widthZ*(j-1));
    323        
    324         Vector c1 = v2 - v1;
    325         Vector c2 = v3 - v1;
    326         Vector c3=  v4 - v1;
    327         Vector c4 = v5 - v1;
    328         Vector zero = Vector (0,0,0);
    329         normal_vectors[i][j]=c1.cross(v3-v5)+c2.cross(v4-v2)+c3.cross(v5-v3)+c4.cross(v2-v4);
    330         normal_vectors[i][j].normalize();
    331       }
    332 
    333   int snowheight=3;
    334   for ( int i = 0; i<sizeX; i+=1)
    335     for (int j = 0; j<sizeZ;j+=1)
    336       {   
    337         Vector v1 = Vector (widthX*(i),      height[i][j]-20,       widthZ*(j)  -width/2);
    338         Vector v2 = Vector (widthX*(i+1),    height[i+1][j]-20,     widthZ*(j)  -width/2);
    339         Vector v3 = Vector (widthX*(i+1),    height[i+1][j+1]-20,   widthZ*(j+1)-width/2);
    340         Vector v4 = Vector (widthX*(i),      height[i][j+1]-20,     widthZ*(j+1)-width/2);
    341         float a[3];
    342         if(height[i][j]<snowheight){
    343           a[0]=0;
    344           a[1]=1.0-height[i][j]/10-.3;
    345           a[2]=0;
    346           glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
    347         }
    348         else{
    349             a[0]=1.0;
    350             a[1]=1.0;
    351             a[2]=1.0;
    352             glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
    353            
    354         }
    355         glNormal3f(normal_vectors[i][j].x, normal_vectors[i][j].y, normal_vectors[i][j].z);
    356         glVertex3f(v1.x, v1.y, v1.z);
    357         if(height[i+1][j]<snowheight){
    358           a[0]=0;
    359           a[1] =1.0-height[i+1][j]/10-.3;
    360           a[2]=0;
    361           glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
    362         }
    363         else{
    364           a[0]=1.0;
    365           a[1]=1.0;
    366           a[2]=1.0;
    367           glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
    368          
    369         }
    370         glNormal3f(normal_vectors[i+1][j].x, normal_vectors[i+1][j].y, normal_vectors[i+1][j].z);
    371         glVertex3f(v2.x, v2.y, v2.z);
    372         if(height[i+1][j+1]<snowheight){
    373           a[0]=0;
    374           a[1] =1.0-height[i+1][j+1]/10-.3;
    375           a[2]=0;
    376           glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
    377         }
    378         else{
    379           a[0]=1.0;
    380           a[1]=1.0;
    381           a[2]=1.0;
    382           glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
    383          
    384          
    385         }
    386         glNormal3f(normal_vectors[i+1][j+1].x, normal_vectors[i+1][j+1].y, normal_vectors[i+1][j+1].z);
    387         glVertex3f(v3.x, v3.y, v3.z);
    388         if(height[i][j+1]<snowheight){
    389           a[0]=0;
    390           a[1] =1.0-height[i+1][j+1]/10-.3;
    391           a[2]=0;
    392           glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
    393         }
    394         else{
    395           a[0]=1.0;
    396           a[1]=1.0;
    397           a[2]=1.0;
    398           glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
    399         }
    400         glNormal3f(normal_vectors[i][j+1].x, normal_vectors[i][j+1].y, normal_vectors[i][j+1].z);
    401         glVertex3f(v4.x, v4.y, v4.z);
    402        
    403       }
    404   glEnd();
    405   /* 
    406   glBegin(GL_LINES);
    407   for( float x = -128.0; x < 128.0; x += 25.0)
    408     {
    409       for( float y = -128.0; y < 128.0; y += 25.0)
    410         {
    411           glColor3f(1,0,0);
    412           glVertex3f(x,y,-128.0);
    413           glVertex3f(x,y,0.0);
    414           glColor3f(0.5,0,0);
    415           glVertex3f(x,y,0.0);
    416           glVertex3f(x,y,128.0);
    417         }
    418     }
    419   for( float y = -128.0; y < 128.0; y += 25.0)
    420     {
    421       for( float z = -128.0; z < 128.0; z += 25.0)
    422         {
    423           glColor3f(0,1,0);
    424           glVertex3f(-128.0,y,z);
    425           glVertex3f(0.0,y,z);
    426           glColor3f(0,0.5,0);
    427           glVertex3f(0.0,y,z);
    428           glVertex3f(128.0,y,z);
    429         }
    430     }
    431   for( float x = -128.0; x < 128.0; x += 25.0)
    432     {
    433       for( float z = -128.0; z < 128.0; z += 25.0)
    434         {
    435           glColor3f(0,0,1);
    436           glVertex3f(x,-128.0,z);
    437           glVertex3f(x,0.0,z);
    438           glColor3f(0,0,0.5);
    439           glVertex3f(x,0.0,z);
    440           glVertex3f(x,128.0,z);
    441         }
    442      
    443     }
    444   */ 
    445   /*
    446   glBegin(GL_LINE_STRIP);
    447   glColor3f(1.0, 5.0, 1.0);
    448   for( int i = 0; i <= 30; i++)
    449     {
    450       glEvalCoord1f ((GLfloat) i/30.0);
    451     }
    452   glEnd();
    453   */
    454 
     488 
    455489  trackManager->drawGraph(.01);
    456490  trackManager->debug(2);
    457   /* 
    458   glBegin(GL_LINES);
    459   float i;
    460   for(i = 0.0; i<1; i+=.01)
    461     {
    462       printf("%f, %f, %f\n",tmpCurve->calcPos(i).x, tmpCurve->calcPos(i).y, tmpCurve->calcPos(i).z);
    463       glVertex3f(tmpCurve->calcPos(i).x, tmpCurve->calcPos(i).y, tmpCurve->calcPos(i).z);
    464     }
    465   glEnd();
    466   */
    467491  glEndList();
    468   // LIGHT initialisation
    469   light = Light::getInstance();
    470   light->addLight(0);
    471   light->setAttenuation(QUADRATIC, 1.0);
    472   light->setAttenuation(CONSTANT, 2.0);
    473   light->setAttenuation(QUADRATIC, 1.0);
    474   light->setPosition(10.0, 10.0, 50.0);
    475   light->setDiffuseColor(1,1,1);
    476   //  light->addLight(1);
    477   //  light->setPosition(20, 10, -20);
    478   //  light->setDiffuseColor(0,0,0);
    479   light->debug();
    480 
     492
     493  terrain = new Terrain("../data/worlds/newGround.obj");
     494  terrain->setRelCoor(new Vector(0,-10,0));
     495  this->spawn(terrain);
    481496
    482497}
     
    492507  cn->enable(true);
    493508
    494   //glMap1f (GL_MAP1_VERTEX_3, 0.0, 1.0, 3, 4, &ctrlpoints[0][0]);
    495   //glEnable (GL_MAP1_VERTEX_3);
    496  
    497   //theNurb = gluNewNurbsRenderer ();
    498   //gluNurbsProperty (theNurb, GLU_NURBS_MODE, GLU_NURBS_TESSELLATOR);
    499   //gluNurbsProperty (theNurb, GLU_NURBS_VERTEX, vertexCallback );
    500        
    501         PRINTF0("> Done Loading world: '%s'\n", getPath());
     509PRINTF0("> Done Loading world: '%s'\n", getPath());
    502510}
    503511
     
    508516ErrorMessage World::start()
    509517{
    510   printf("World::start() - starting current World: nr %i\n", this->debugWorldNr);
     518  PRINTF(3)("World::start() - starting current World: nr %i\n", this->debugWorldNr);
    511519  this->bQuitOrxonox = false;
    512520  this->bQuitCurrentGame = false;
     
    521529ErrorMessage World::stop()
    522530{
    523   printf("World::stop() - got stop signal\n");
     531  PRINTF(3)("World::stop() - got stop signal\n");
    524532  this->bQuitCurrentGame = true;
    525533}
     
    546554ErrorMessage World::destroy()
    547555{
    548   delete trackManager;
     556
    549557}
    550558
     
    554562void World::displayLoadScreen ()
    555563{
    556   printf ("World::displayLoadScreen - start\n");
     564  PRINTF(3)("World::displayLoadScreen - start\n");
    557565 
    558566  //GLMenuImageScreen*
     
    562570  this->glmis->draw();
    563571 
    564   printf ("World::displayLoadScreen - end\n");
     572  PRINTF(3)("World::displayLoadScreen - end\n");
    565573}
    566574
     
    572580void World::releaseLoadScreen ()
    573581{
    574   printf ("World::releaseLoadScreen - start\n");
     582  PRINTF(3)("World::releaseLoadScreen - start\n");
    575583  this->glmis->setValue(this->glmis->getMaximum());
    576584  SDL_Delay(500);
    577   printf ("World::releaseLoadScreen - end\n");
     585  PRINTF(3)("World::releaseLoadScreen - end\n");
    578586}
    579587
     
    629637  /* draw entities */
    630638  WorldEntity* entity;
     639  glLoadIdentity();
     640
    631641  entity = this->entities->enumerate();
    632642  while( entity != NULL )
     
    642652  testFont->printText(0, 0, 1, "orxonox_" PACKAGE_VERSION);
    643653
     654  lightMan->draw(); // must be at the end of the drawing procedure, otherwise Light cannot be handled as PNodes //
    644655}
    645656
     
    651662void World::debug()
    652663{
    653   printf ("World::debug() - starting debug\n");
     664  PRINTF(2)("debug() - starting debug\n");
    654665  PNode* p1 = NullParent::getInstance ();
    655666  PNode* p2 = new PNode (new Vector(2, 2, 2), p1);
     
    670681  p4->debug ();
    671682 
    672   p1->update (1);
     683  p1->update ();
    673684
    674685  printf ("World::debug() - update\n");
     
    679690
    680691  p2->shiftCoor (new Vector(-1, -1, -1));
    681   p1->update (2);
     692  p1->update ();
    682693
    683694  p1->debug ();
     
    689700
    690701
    691  p1->update (2);
     702 p1->update ();
    692703
    693704  p1->debug ();
     
    696707  p4->debug ();
    697708
    698   p1->destroy ();
     709  delete p1;
    699710 
    700711 
     
    726737  while( !this->bQuitOrxonox && !this->bQuitCurrentGame) /* \todo implement pause */
    727738    {
     739      PRINTF(3)("World::mainloop() - number of entities: %i\n", this->entities->getSize());
    728740      // Network
    729741      this->synchronize ();
     
    731743      this->handleInput ();
    732744      if( this->bQuitCurrentGame || this->bQuitOrxonox)
    733         {
    734           printf("World::mainLoop() - leaving loop earlier...\n");
    735745          break;
    736         }
    737746      // Process time
    738      this->timeSlice ();
     747      this->tick ();
     748      // Update the state
     749      this->update ();     
    739750      // Process collision
    740751     this->collide ();
    741752      // Draw
    742753     this->display ();
    743  
    744       for( int i = 0; i < 5000000; i++) {}
     754
     755      //      for( int i = 0; i < 5000000; i++) {}
    745756      /* \todo this is to slow down the program for openGl Software emulator computers, reimplement*/
    746757    }
    747   printf("World::mainLoop() - Exiting the main loop\n");
     758  PRINTF(3)("World::mainLoop() - Exiting the main loop\n");
    748759}
    749760
     
    781792   a heart-beat.
    782793*/
    783 void World::timeSlice ()
     794void World::tick ()
    784795{
    785796  Uint32 currentFrame = SDL_GetTicks();
     
    791802        {
    792803          float fps = 1000/dt;
    793           printf("fps = %f\n", fps);
     804          PRINTF(3)("fps = %f\n", fps);
    794805        }
    795806      else
     
    798809             nothing.
    799810          */
    800           printf("fps = 1000 - frame rate is adjusted\n");
     811          PRINTF(2)("fps = 1000 - frame rate is adjusted\n");
    801812          SDL_Delay(10);
    802813          dt = 10;
     
    808819      float seconds = dt / 1000.0; 
    809820      assert( this->nullParent != NULL);
    810       this->nullParent->update (seconds);
    811821      entity = entities->enumerate();
    812822      while( entity != NULL)
     
    815825          entity = entities->nextElement();
    816826        }
    817       //assert( skySphere != NULL);
    818       //skySphere->updatePosition(localCamera->absCoordinate);
    819      
    820827      /* update tick the rest */
    821828      assert( this->localCamera != NULL);
    822829      assert( this->trackManager != NULL);
    823       this->localCamera->timeSlice(dt);
     830      this->localCamera->tick(dt);
     831
    824832      this->trackManager->tick(dt);
    825833    }
    826834  this->lastFrame = currentFrame;
     835}
     836
     837
     838/**
     839   \brief this function gives the world a consistant state
     840
     841   after ticking (updating the world state) this will give a constistant
     842   state to the whole system.
     843*/
     844void World::update()
     845{
     846  this->nullParent->update ();
    827847}
    828848
     
    856876void World::spawn(WorldEntity* entity)
    857877{
    858   if( this->nullParent != NULL && entity->parent == NULL)
    859     this->nullParent->addChild (entity);
    860 
    861878  this->entities->add (entity);
    862 
    863879  entity->postSpawn ();
    864880}
     
    873889void World::spawn(WorldEntity* entity, Vector* absCoor, Quaternion* absDir)
    874890{
     891  this->entities->add (entity);
     892
    875893  entity->setAbsCoor (absCoor);
    876894  entity->setAbsDir (absDir);
    877  
    878   if( this->nullParent != NULL && entity->parent == NULL)
    879     this->nullParent->addChild (entity);
    880 
    881   this->entities->add (entity);
    882895
    883896  entity->postSpawn ();
     897}
     898
     899
     900/**
     901   \brief add and spawn a new entity to this world
     902   \param entity to be added
     903   \param entity to be added to (PNode)
     904   \param At what relative  coordinates to add this entity.
     905   \param In which relative direction should it look.
     906*/
     907void World::spawn(WorldEntity* entity, PNode* parentNode,
     908                  Vector* relCoor, Quaternion* relDir,
     909                  int parentingMode)
     910{
     911  this->nullParent = NullParent::getInstance();
     912  if( parentNode != NULL)
     913    {
     914      parentNode->addChild (entity);
     915     
     916      entity->setRelCoor (relCoor);
     917      entity->setRelDir (relDir);
     918      entity->setMode(parentingMode);
     919     
     920      this->entities->add (entity);
     921     
     922      entity->postSpawn ();
     923    }
    884924}
    885925
  • orxonox/branches/levelloader/src/story_entities/world.h

    r3530 r3605  
    1010
    1111#include "story_entity.h"
     12#include "p_node.h"
    1213
    1314class TrackManager;
     
    1718class GLMenuImageScreen;
    1819class Skysphere;
    19 class Light;
     20class LightManager;
    2021class FontSet;
     22class Terrain;
     23
    2124
    2225//! The game world
     
    5558  void spawn (WorldEntity* entity);
    5659  void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir);
     60  void spawn(WorldEntity* entity, PNode* parentNode, Vector* relCoor, Quaternion* relDir,
     61             int parentingMode);
     62
    5763       
    5864        void setPath( char* name);
    5965        char* getPath();
    6066
     67 private:
     68  void init(char* name, int worldID);
    6169
    62  private:
    6370  Uint32 lastFrame;             //!< last time of frame
    6471  bool bQuitOrxonox;            //!< quit this application
     
    7481
    7582  PNode* nullParent;            //!< The zero-point, that everything has as its parent.
    76   TrackManager* trackManager;  //!< The reference of the TrackManager that handles the course through the Level.
    77   Camera* localCamera;         //!< The current Camera
     83  TrackManager* trackManager;   //!< The reference of the TrackManager that handles the course through the Level.
     84  Camera* localCamera;          //!< The current Camera
    7885  Skysphere* skySphere;         //!< The Environmental Heaven of orxonox \todo insert this to environment insted
    79   Light* light;                 //!< The Lights of the Level
     86  LightManager* lightMan;       //!< The Lights of the Level
     87  Terrain* terrain;             //!< The Terrain of the World.
    8088
    8189  GLuint objectList;            //!< temporary: \todo this will be ereased soon
     
    8795  void synchronize ();
    8896  void handleInput ();
    89   void timeSlice ();
     97  void tick ();
     98  void update ();
    9099  void collide ();
    91100  void draw ();
  • orxonox/branches/levelloader/src/track_manager.cc

    r3562 r3605  
    1414*/
    1515
     16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_TRACK_MANAGER
    1617
    1718#include "track_manager.h"
     
    1920#include "p_node.h"
    2021#include "substring.h"
     22
     23#include "track_node.h"
    2124
    2225#include <stdarg.h>
     
    3538  this->isJoined = false;
    3639  this->mainJoin = false;
    37   this->cond; //!< todo think!!
    3840  this->ID = -1;
    39   this->startingTime = 0; //!< \todo eventually set this to the max time of TrackManager.
    40   this->duration = 1;
     41  this->startingTime = 0;
     42  this->duration = TMAN_DEFAULT_DURATION;
    4143  this->endTime = 1;
    4244  this->jumpTime = 0;
    43   this->curveType = BEZIERCURVE;
     45  this->width = TMAN_DEFAULT_WIDTH;
    4446  this->nodeCount = 0;
    4547  this->childCount = 0;
     
    4749  this->curve = NULL;
    4850  this->children = NULL;
     51
     52  this->history = NULL;
     53
     54  this->condFunc = &TrackElement::random;
    4955}
    5056
     
    6167  if ((!this->isJoined &&this->childCount > 0) || (this->isJoined && this->mainJoin))
    6268    {
    63       for (int i=0; i < this->childCount; i++)
    64         delete this->children[i];
     69      TrackElement* enumElem = children->enumerate();
     70      while (enumElem)
     71        {
     72          delete enumElem;
     73          enumElem = children->nextElement();
     74        }
    6575      delete this->children;
    6676    }
     
    8191  // search on.
    8292  if (this->childCount > 0)
    83     for (int i=0; i < this->childCount; i++)
    84       {
    85         TrackElement* tmpElem;
    86         if ((tmpElem = this->children[i]->findByID(trackID)))
    87           return tmpElem;
    88       }
    89   else return NULL;
    90 }
    91 
    92 /**
    93    \brief Sets the name of this TrackElement
    94    \param trackName The new name for this element
    95 */
    96 void TrackElement::setName(const char* trackName)
    97 {
    98         if( this->name != NULL) delete this->name;
    99        
    100         this->name = new char[strlen(trackName) + 1];
    101         strcpy( this->name, trackName);
     93    {
     94      TrackElement* enumElem = this->children->enumerate();
     95      TrackElement* tmpElem;
     96      while (enumElem)
     97        {
     98          if ((tmpElem = enumElem->findByID(trackID)))
     99            return tmpElem;
     100          enumElem = this->children->nextElement();
     101        }
     102    }
     103  else
     104    return NULL;
    102105}
    103106
     
    116119  // search on.
    117120  if (this->childCount > 0)
    118     for (int i=0; i < this->childCount; i++)
    119       {
    120         TrackElement* tmpElem;
    121         if ((tmpElem = this->children[i]->findByName(trackName)))
    122           return tmpElem;
    123       }
    124   else return NULL;
    125 }
    126 
    127 
    128 
    129 
    130 /////////////////////////////////////
    131 ///// TRACKMANAGER //////////////////
    132 /////////////////////////////////////
     121    {
     122   
     123      TrackElement* enumElem = this->children->enumerate();
     124      TrackElement* tmpElem;
     125      while (enumElem)
     126        {
     127          if ((tmpElem = enumElem->findByName(trackName)))
     128            return tmpElem;
     129          enumElem = this->children->nextElement();
     130        }
     131    }
     132  else
     133    return NULL;
     134}
     135
     136/**
     137   \brief checks if there are any BackLoops in the Track
     138   \param trackElem the trackElement to check about
     139   it simply does this by looking if the current trackElem is found again somewhere else in the Track
     140*/
     141bool TrackElement::backLoopCheck(TrackElement* trackElem)
     142{
     143  if (this->childCount == 0)
     144    return true;
     145  else
     146    {
     147      TrackElement* enumElem = this->children->enumerate();
     148      while (enumElem)
     149        {
     150          if(!enumElem->backLoopCheck(trackElem))
     151            return false;
     152          enumElem = this->children->nextElement();
     153        }
     154     
     155      return true;
     156    }
     157}
     158
     159/**
     160   \param childNumber which child to return
     161   \returns the n-the children (starting at 0)
     162*/
     163TrackElement* TrackElement::getChild(int childCount)
     164{
     165  if (this->childCount == 0)
     166    return NULL;
     167  if (childCount > this->childCount)
     168    childCount = this->childCount;
     169 
     170  TrackElement* enumElem = this->children->enumerate();
     171  for (int i = 0; i < childCount; i++)
     172    enumElem = this->children->nextElement();
     173  return enumElem;
     174}
     175
     176/**
     177   \param name the Name to set.
     178*/
     179void TrackElement::setName(const char* name)
     180{
     181  //  delete the old name
     182  if (this->name)
     183    delete []this->name;
     184  // if a name was given already.
     185  if (name)
     186    {
     187      this->name = new char[strlen(name)+1];
     188      strcpy(this->name, name);
     189    }
     190  else
     191    this->name = NULL;
     192}
     193
     194/**
     195   \returns The name of this TrackElement
     196*/
     197char* TrackElement::getName(void) const
     198{
     199  return this->name;
     200}
     201
     202/**
     203   \brief prints out debug information about this TrackElement
     204*/
     205void TrackElement::debug(void)
     206{
     207  PRINT(0)("--== TrackElement:%i ==--", this->ID);
     208  if(this->getName())
     209    PRINT(0)("Name: %s::", this->getName());
     210  if(this->isFresh)
     211    PRINT(0)("  -- has not jet eddited in any way --\n");
     212  PRINT(0)("\n   TimeTable: startingTime=%f; endTime=%f; duration=%f; jumpTime=%f\n", this->startingTime, this->endTime, this->duration, this->jumpTime);
     213  PRINT(0)("   consists of %d Points\n", this->nodeCount);
     214  if (this->childCount == 0)
     215    PRINT(0)("   has no child\n");
     216  else if (this->childCount == 1)
     217    PRINT(0)("   has 1 child: =%d=\n", this->getChild(0)->ID);
     218  else if (this->childCount > 1)
     219    {
     220      PRINT(0)("   has %d children: ", this->childCount);
     221      TrackElement* enumElem = this->children->enumerate();
     222      while (enumElem)
     223        {
     224          PRINT(0)("=%d= ", enumElem->ID);
     225          enumElem = this->children->nextElement();
     226        }
     227      PRINT(0)("\n");
     228    }
     229 
     230  if(this->isHotPoint)
     231    PRINT(0)("   is a special Point:\n");
     232  if(this->isSavePoint)
     233    PRINT(0)("    is a SavePoint\n");
     234  if(this->isFork)
     235    {
     236      PRINT(0)("    is A Fork with with %d children.\n", this->childCount);
     237    }
     238  if(this->isJoined)
     239    PRINT(0)("   is Joined at the End\n");
     240 
     241  if(!this->backLoopCheck(this)) /* this should not happen */
     242    PRINT(2)(" THERE IS A BACKLOOP TO THIS ELEMENT\n");
     243}
     244
     245/**
     246   \brief CONDITION that chooses the first child for the decision (static)
     247   \param nothing Nothing in this function
     248   \returns the chosen child
     249*/
     250int TrackElement::lowest(void* nothing)
     251{
     252  return 0;
     253}
     254
     255/**
     256   \brief CONDITION that chooses the last child for the decision (static)
     257   \param nothing Nothing in this function
     258   \returns the chosen child
     259*/
     260int TrackElement::highest(void* nothing)
     261{
     262  return this->childCount-1;
     263}
     264
     265/**
     266   \brief CONDITION that chooses a random child for the decision (static)
     267   \param nothing Nothing in this function
     268   \returns the chosen child
     269*/
     270int TrackElement::random(void* nothing)
     271{
     272  int i = (int)floor ((float)rand()/(float)RAND_MAX * (float)this->childCount);
     273  if (i >= this->childCount)
     274    return this->childCount-1;
     275  else
     276    return i;
     277}
     278
     279/**
     280   \brief CONDITION that chooses child 0, if the node(probably Player)
     281   is left of its parent (z<0)) and 1/right otherwise.
     282   \param node The node to act upon.
     283   \returns the chosen child
     284*/
     285int TrackElement::leftRight(void* node)
     286{
     287  PNode* tmpNode = (PNode*)node;
     288
     289  if (tmpNode->getRelCoor().z < 0)
     290    return 0;
     291  else
     292    return 1;
     293}
     294
     295
     296/**
     297   \brief CONDITION that chooses the child, that has the nearest distance to the node (probably player).
     298   \param node The node to act upon.
     299   \returns the chosen child
     300
     301   This is rather dangerous, because one must carefully set the points on the curve.
     302   The best Way is to set the nodes as wide away of each other as possible,
     303   but take into consideration, that if the nodes are to far from a center node, the center will be chosen.
     304   (play with this!!).
     305*/
     306int TrackElement::nearest(void* node)
     307{
     308  PNode* tmpNode = (PNode*)node;
     309
     310  Vector nodeRelCoord = tmpNode->getRelCoor();
     311  float minDist = 100000000;
     312  int childNumber = 0;
     313  int i = 0;
     314
     315  TrackElement* enumElem = this->children->enumerate();
     316  while (enumElem)
     317    {
     318      float dist = (nodeRelCoord - enumElem->curve->getNode(4)).len();
     319      if (dist < minDist)
     320        {
     321          minDist = dist;
     322          childNumber = i;
     323        }
     324      i++;
     325      enumElem = this->children->nextElement();
     326    }
     327
     328  PRINTF(4)("PathDecision with nearest algorithm: %d\n", childNumber);
     329  return childNumber;
     330}
     331
     332
     333////////////////////////
     334///// TRACKMANAGER /////
     335////////////////////////
    133336/**
    134337   \brief standard constructor
     
    137340TrackManager::TrackManager(void)
    138341{
    139   this->setClassName ("TrackManager");
     342  this->setClassName("TrackManager");
     343 
     344  TrackManager::singletonRef = this;
    140345
    141346  PRINTF(3)("Initializing the TrackManager\n");
     
    146351  this->maxTime = 0;
    147352  this->trackElemCount = 1;
    148   this->bindSlave = NULL;
     353  this->setBindSlave(this->trackNode = new TrackNode());
    149354}
    150355
     
    152357/**
    153358   \brief standard destructor
    154 
    155359*/
    156360TrackManager::~TrackManager(void)
     
    158362  PRINTF(3)("Destruct TrackManager\n");
    159363
    160   PRINTF(3)("Deleting all the TrackElements\n");
     364  PRINTF(4)("Deleting all the TrackElements\n");
    161365  delete this->firstTrackElem;
    162366  // delete this->name;
    163367
    164368  // we do not have a TrackManager anymore
    165   singletonRef = NULL;
    166 }
    167 
     369  TrackManager::singletonRef = NULL;
     370}
     371
     372//! Singleton Reference to TrackManager
    168373TrackManager* TrackManager::singletonRef = NULL;
    169374
     
    175380TrackManager* TrackManager::getInstance(void)
    176381{
    177   if (singletonRef)
    178     return singletonRef;
    179   else
    180     return singletonRef = new TrackManager();
     382  if (!TrackManager::singletonRef)
     383    TrackManager::singletonRef = new TrackManager();
     384  return TrackManager::singletonRef;
    181385}
    182386
     
    189393  this->currentTrackElem->childCount = childCount;
    190394  this->currentTrackElem->mainJoin = true;
    191   this->currentTrackElem->children = new TrackElement*[childCount];
    192   for (int i=0; i<childCount; i++)
    193     {
    194            
    195       this->currentTrackElem->children[i] = new TrackElement();
    196       this->currentTrackElem->children[i]->ID = ++trackElemCount;
    197       this->currentTrackElem->children[i]->startingTime = this->currentTrackElem->endTime + this->currentTrackElem->jumpTime;
    198       this->addPoint(this->currentTrackElem->curve->getNode(this->currentTrackElem->curve->getNodeCount()), this->currentTrackElem->children[i]);
    199         if( names != NULL)
     395  this->currentTrackElem->children =  new tList<TrackElement>();
     396  for (int i = 0; i < childCount; i++)
     397    {
     398      TrackElement* newElem = new TrackElement();
     399      this->currentTrackElem->children->add(newElem);
     400      newElem->ID = ++trackElemCount;
     401      newElem->startingTime = this->currentTrackElem->endTime + this->currentTrackElem->jumpTime;
     402      this->addPoint(this->currentTrackElem->curve->getNode(this->currentTrackElem->curve->getNodeCount()), this->currentTrackElem->getChild(i));
     403      if( names != NULL)
    200404        {
    201                 // todo check for duplicate track names to avoid confusion
    202                 /*if( this->findTrackElementByName( names->getString(i)) != NULL)
    203                         PRINTF0("Track name '%s' already taken", names->getString(i));
    204                 else*/
    205                         this->currentTrackElem->children[i]->setName( names->getString(i));
    206             }
     405          // todo check for duplicate track names to avoid confusion
     406          /*if( this->findTrackElementByName( names->getString(i)) != NULL)
     407            PRINTF0("Track name '%s' already taken", names->getString(i));
     408            else*/
     409          this->currentTrackElem->getChild(i)->setName(names->getString(i));
     410        }
    207411           
    208412   }
     413  if (childCount == 1)
     414    this->currentTrackElem->getChild(0)->setName(this->currentTrackElem->getName());
    209415}
    210416
     
    240446    this->currentTrackElem = tmpElem;
    241447  else
    242     printf("TrackElement not Found, leaving unchanged\n");
    243   printf("now Working on %d\n", this->currentTrackElem->ID);
     448    PRINTF(2)("TrackElement not Found, leaving unchanged\n");
     449  PRINTF(4)("now Working on %d\n", this->currentTrackElem->ID);
    244450
    245451}
     
    247453/**
    248454   \brief Sets the Type of the Curve
    249    \brief curveType The Type to set
     455   \param curveType The Type to set
     456   \param trackElem the TrackElement that should get a new Curve.
    250457*/
    251458void TrackManager::setCurveType(CurveType curveType, TrackElement* trackElem)
     
    256463      return;
    257464    }
    258   trackElem->curveType = curveType;
     465  this->curveType = curveType;
    259466  switch (curveType)
    260467    {
     
    262469      trackElem->curve = new BezierCurve();
    263470      break;
    264     case UPOINTCURVE:
    265       trackElem->curve = new UPointCurve();
    266       break;
     471
    267472    }
    268473}
     
    297502  if (trackElem->isFresh)
    298503    {
    299       this->setCurveType(BEZIERCURVE, trackElem);
     504      this->setCurveType(TMAN_DEFAULT_CURVETYPE, trackElem);
    300505      trackElem->isFresh = false;
    301506    }
     
    311516int TrackManager::addHotPoint(Vector newPoint)
    312517{
    313   printf("setting up a HotPoint\n");
     518  PRINTF(4)("setting up a HotPoint\n");
    314519  if (this->currentTrackElem->isFresh)
    315520    {
     
    322527  this->currentTrackElem->nodeCount++;
    323528  this->initChildren(1);
    324   this->currentTrackElem = this->currentTrackElem->children[0];
     529  this->currentTrackElem = this->currentTrackElem->getChild(0);
    325530}
    326531
     
    334539int TrackManager::setSavePoint(void)
    335540{
    336   printf("setting up a SavePoint.\n");
     541  PRINTF(4)("setting up a SavePoint.\n");
    337542  if (this->currentTrackElem->isFork || this->currentTrackElem->isSavePoint)
    338     return this->currentTrackElem->children[1]->ID;
     543    {
     544      PRINTF(2)("%d is already finished \n", currentTrackElem->ID);
     545      return this->currentTrackElem->getChild(0)->ID;
     546    }
    339547  this->currentTrackElem->isSavePoint = true;
    340548  this->currentTrackElem->isHotPoint = true;
    341549
    342550  this->initChildren(1);
    343   this->currentTrackElem = this->currentTrackElem->children[0];
     551  this->currentTrackElem = this->currentTrackElem->getChild(0);
    344552}
    345553
     
    377585void TrackManager::forkV(unsigned int count, int* trackIDs, SubString* names)
    378586{
    379   printf("Forking with %d children\n", count);
     587  PRINTF(4)("Forking with %d children\n", count);
    380588  if (this->currentTrackElem->isSavePoint)
    381589  {
     
    392600/**
    393601   \brief decides under what condition a certain Path will be chosen.
     602   \param cond the CONDITION of the decision
     603   \param subject the Subject that will be decided upon with CONDITION cond.
     604*/
     605void TrackManager::condition(CONDITION cond, void* subject)
     606{
     607  this->condition(this->currentTrackElem->ID, cond, subject);
     608}
     609/**
     610   \brief decides under what condition a certain Path will be chosen.
    394611   \param groupID the ID on which to choose the preceding move
    395    \param cond \todo think about this
    396 */
    397 void TrackManager::condition(unsigned int groupID, PathCondition cond)
    398 {
    399  
    400 }
     612   \param cond the CONDITION of the decision
     613   \param subject the Subject that will be decided upon with CONDITION cond.
     614*/
     615void TrackManager::condition(unsigned int groupID, CONDITION cond, void* subject)
     616{
     617  TrackElement* tmpElem = this->findTrackElementByID(groupID);
     618  if (!tmpElem->isFork)
     619    {
     620      PRINTF(2)("%d is not a Fork, and no condition can be set in this case\n", tmpElem->ID);
     621      return;
     622    }
     623  else
     624    {
     625      switch (cond)
     626        {
     627        case LOWEST:
     628          tmpElem->condFunc = &TrackElement::lowest;
     629          break;
     630        case HIGHEST:
     631          tmpElem->condFunc = &TrackElement::highest;
     632          break;
     633        case RANDOM:
     634          tmpElem->condFunc = &TrackElement::random;
     635          break;
     636        case LEFTRIGHT:
     637          tmpElem->condFunc = &TrackElement::leftRight;
     638          break;
     639        case NEAREST:
     640          tmpElem->condFunc = &TrackElement::nearest;
     641          break;
     642        case ENEMYKILLED:
     643          break;
     644        }
     645      tmpElem->subject=subject;
     646    }
     647}
     648
    401649
    402650/**
     
    430678void TrackManager::joinV(unsigned int count, int* trackIDs)
    431679{
    432   printf("Joining %d tracks and merging to Track %d\n", count, trackIDs[0]);
     680  PRINTF(3)("Joining %d tracks and merging to Track %d\n", count, trackIDs[0]);
     681
     682  // checking if there is a back-loop-connection and ERROR if it is.
     683  TrackElement* tmpTrackElem = this->findTrackElementByID(trackIDs[0]);
     684  if (!tmpTrackElem->backLoopCheck(tmpTrackElem))
     685    PRINTF(2)("Backloop connection detected at joining trackElements\n");
    433686
    434687  // chanching work-on to temporary value. going back at the end.
     
    480733    }
    481734  if(firstJoint->childCount > 0)
    482     for(int i = 0; i < firstJoint->childCount; i++)
    483       {
    484         printf("Setting startingTime of %d to %f.\n", firstJoint->children[i]->ID, tmpLatestTime);
    485         firstJoint->children[i]->startingTime = tmpLatestTime;
    486         firstJoint->children[i]->endTime = tmpLatestTime+firstJoint->children[i]->duration;
    487       }
    488 
     735    {
     736      TrackElement* enumElem = firstJoint->children->enumerate();
     737      while (enumElem)
     738        {
     739          PRINTF(4)("Setting startingTime of %d to %f.\n", enumElem->ID, tmpLatestTime);
     740          enumElem->startingTime = tmpLatestTime;
     741          enumElem->endTime = tmpLatestTime + enumElem->duration;
     742         
     743          enumElem = firstJoint->children->nextElement();
     744        }
     745    }
    489746  // returning to the TrackElement we were working on.
    490747  this->workOn(tmpCurrentWorkingID);
     
    501758    {
    502759      TrackElement* tmpElem = findTrackElementByID(i);
    503       if (tmpElem->childCount>0 && tmpElem->mainJoin)
    504         {
    505           for (int j = 0; j < tmpElem->childCount; j++)
     760      if (tmpElem->childCount > 0 && tmpElem->mainJoin)
     761        {
     762
     763          TrackElement* enumElem = tmpElem->children->enumerate();
     764          while (enumElem)
    506765            {
    507766             
    508767              // c1-continuity
    509               tmpElem->children[j]->curve->addNode(tmpElem->children[j]->curve->getNode(0) +
    510                                                    ((tmpElem->children[j]->curve->getNode(0) -
     768              enumElem->curve->addNode(enumElem->curve->getNode(0) +
     769                                                   ((enumElem->curve->getNode(0) -
    511770                                                    tmpElem->curve->getNode(tmpElem->curve->getNodeCount()-1))
    512771                                                    ),2);
    513               tmpElem->children[j]->nodeCount++;
     772              enumElem->nodeCount++;
    514773              // c2-continuity
    515               tmpElem->children[j]->curve->addNode((tmpElem->curve->getNode(tmpElem->curve->getNodeCount())-
     774              enumElem->curve->addNode((tmpElem->curve->getNode(tmpElem->curve->getNodeCount())-
    516775                                                    tmpElem->curve->getNode(tmpElem->curve->getNodeCount()-1)) * 4 +
    517776                                                   tmpElem->curve->getNode(tmpElem->curve->getNodeCount()-2), 3);
    518               tmpElem->children[j]->nodeCount++;                                                   
    519               printf("accelerations: %d-in: count: %d, %f, %f, %f\n                  %d-out: count: %d %f, %f, %f\n",
     777              enumElem->nodeCount++;                                               
     778              PRINTF(5)("accelerations: %d-in: count: %d, %f, %f, %f\n                  %d-out: count: %d %f, %f, %f\n",
    520779                     tmpElem->ID, tmpElem->nodeCount,
    521780                     tmpElem->curve->calcAcc(0.999).x, tmpElem->curve->calcAcc(0.999).y, tmpElem->curve->calcAcc(0.999).z,
    522                      tmpElem->children[j]->ID, tmpElem->children[j]->nodeCount,
    523                      tmpElem->children[j]->curve->calcAcc(0).x, tmpElem->children[j]->curve->calcAcc(0).y, tmpElem->children[j]->curve->calcAcc(0).z);
     781                     enumElem->ID, enumElem->nodeCount,
     782                     enumElem->curve->calcAcc(0).x, enumElem->curve->calcAcc(0).y, enumElem->curve->calcAcc(0).z);
     783             
     784              enumElem = tmpElem->children->nextElement();
    524785            }
    525786        }
    526787    }
     788  for (int i = 1; i <=trackElemCount;i++)
     789    if (this->findTrackElementByID(i)->endTime > this->maxTime)
     790      this->maxTime = findTrackElementByID(i)->endTime; // very bad implemented :/
    527791}
    528792
     
    536800Vector TrackManager::calcPos() const
    537801{
    538   //  PRINTF(0)("TrackElement:%d, localTime: %f\n",this->currentTrackElem->ID, this->localTime);
    539802  return this->currentTrackElem->curve->calcPos((this->localTime-this->currentTrackElem->startingTime)/this->currentTrackElem->duration);
    540803}
     
    550813
    551814/**
     815   \returns the current Width of the track
     816*/
     817float TrackManager::getWidth(void) const
     818{
     819  return this->currentTrackElem->width;
     820}
     821
     822/**
    552823   \brief Advances the local-time of the Track around dt
    553824   \param dt The time about which to advance.
     
    558829{
    559830  dt /= 1000;
    560   printf("CurrentTrackID: %d, LocalTime is: %f, timestep is: %f\n", this->currentTrackElem->ID, this->localTime, dt);
     831  PRINTF(4)("CurrentTrackID: %d, LocalTime is: %f, timestep is: %f\n", this->currentTrackElem->ID, this->localTime, dt);
    561832  if (this->localTime <= this->firstTrackElem->duration)
    562833    this->jumpTo(this->localTime);
    563   this->localTime += dt;
     834  if (this->localTime <= this->maxTime)
     835    this->localTime += dt;
    564836  if (this->localTime > this->currentTrackElem->endTime
    565837      && this->currentTrackElem->children)
    566838    {
    567       if (this->currentTrackElem->jumpTime > 0)
     839      if (this->currentTrackElem->jumpTime != 0.0)
    568840        this->jumpTo(this->localTime + this->currentTrackElem->jumpTime);
    569       this->currentTrackElem = this->currentTrackElem->children[0];
     841      // jump to the next TrackElement and also set the history of the new Element to the old one.
     842      TrackElement* tmpHistoryElem = this->currentTrackElem;
     843      this->currentTrackElem = this->currentTrackElem->getChild(this->choosePath(this->currentTrackElem));
     844      this->currentTrackElem->history = tmpHistoryElem;
    570845    }
    571846  if (this->bindSlave)
     
    573848      Vector tmp = this->calcPos();
    574849      Quaternion quat = Quaternion(this->calcDir(), Vector(this->currentTrackElem->curve->calcAcc((localTime-this->currentTrackElem->startingTime)/this->currentTrackElem->duration).x,1,this->currentTrackElem->curve->calcAcc((localTime-this->currentTrackElem->startingTime)/this->currentTrackElem->duration).z));
     850
     851      Vector v(0.0, 1.0, 0.0);
     852      Quaternion q(-PI/2, v);
     853      quat = quat * q;
     854
    575855      this->bindSlave->setAbsCoor(&tmp);
    576856      this->bindSlave->setAbsDir(&quat);
     
    594874/**
    595875   \brief a Function that decides which Path we should follow.
    596    \param graphID The Path to choose.
     876   \param trackElem The Path to choose.
    597877   
    598878*/
    599 void TrackManager::choosePath(int graphID)
    600 {
    601 
     879int TrackManager::choosePath(TrackElement* trackElem)
     880{
     881  return (trackElem->*(trackElem->condFunc))(trackElem->subject);
    602882}
    603883
     
    608888void TrackManager::setBindSlave(PNode* bindSlave)
    609889{
    610   if (!this->bindSlave)
    611     this->bindSlave = bindSlave;
    612 }
    613 
     890  this->bindSlave = bindSlave;
     891}
     892
     893/**
     894   \returns the main TrackNode
     895*/
     896PNode* TrackManager::getTrackNode(void)
     897{
     898  return this->trackNode;
     899}
    614900
    615901// DEBUG //
     
    646932void TrackManager::debug(unsigned int level) const
    647933{
    648   printf("::CLASS TRACKMANAGER::debug information::\n");
    649   //  printf("Status is: %
    650   printf(" Consists of %d elements\n", this->trackElemCount);
    651   printf(" localTime is: %f\n", this->localTime);
     934  PRINT(0)("=========================================\n");
     935  PRINT(0)("= CLASS TRACKMANAGER::debug information =\n");
     936  PRINT(0)("=========================================\n");
     937  //  PRINT(0)("Status is: %
     938  PRINT(0)(" Consists of %d elements\n", this->trackElemCount);
     939  PRINT(0)(" localTime is: %f\n", this->localTime);
    652940  if (level >= 2)
    653941    {
     
    655943        {
    656944          TrackElement* tmpElem = this->findTrackElementByID(i);
    657           printf("  ::TrackElement:%i::", tmpElem->ID);
    658           if(tmpElem->name)
    659             printf("name:%s::", tmpElem->name);
    660           if(tmpElem->isFresh)
    661             printf("   has not jet eddited in any way\n");
    662           printf("\n   TimeTable: startingTime=%f; endTime=%f; duration=%f; jumpTime=%f\n", tmpElem->startingTime, tmpElem->endTime, tmpElem->duration, tmpElem->jumpTime);
    663           printf("   consists of %d Points\n", tmpElem->nodeCount);
    664           if (tmpElem->childCount == 0)
    665             printf("   has no child\n");           
    666           else if (tmpElem->childCount == 1)
    667             printf("   has 1 child: ==%d==\n", tmpElem->children[0]->ID);
    668           else if (tmpElem->childCount > 1)
    669             {
    670               printf("   has %d children: ", tmpElem->childCount);
    671               for(int i = 0; i < tmpElem->childCount; i++)
    672                 printf("=%d= ", tmpElem->children[i]->ID);
    673               printf("\n");
    674             }
    675 
    676           if(tmpElem->isHotPoint)
    677             printf("   is a special Point:\n");
    678           if(tmpElem->isSavePoint)
    679             printf("    is a SavePoint\n");
    680           if(tmpElem->isFork)
    681             {
    682               printf("    is A Fork with with %d children.\n", tmpElem->childCount);
    683             }
    684           if(tmpElem->isJoined)
    685             printf("   is Joined at the End\n");
    686         }
    687     }
     945          tmpElem->debug();
     946        }
     947    }
     948  PRINT(0)("-----------------------------------------\n");
    688949}
    689950
  • orxonox/branches/levelloader/src/track_manager.h

    r3530 r3605  
    1919class TrackNamer;
    2020
    21 //! condition for choosing a certain Path. \todo implement a useful way.
    22 struct PathCondition
    23 {
    24  
    25 };
    26  
     21// Static Definitions
     22
     23//! The Default Curve-Type to set for the whole path (if not chosen otherwise).
     24#define TMAN_DEFAULT_CURVETYPE BEZIERCURVE
     25#define TMAN_DEFAULT_DURATION 10
     26#define TMAN_DEFAULT_WIDTH    10
    2727
    2828//! A Graph-Element, that holds the curve-structure of a Level.
     
    3838
    3939  TrackElement* findByID(unsigned int trackID);
     40
    4041  TrackElement* findByName(const char* trackName);
    41         void setName( const char* trackName);
    4242       
     43  bool backLoopCheck(TrackElement* trackElem);
     44
     45  TrackElement* getChild(int childNumber);
     46  void setName(const char* name);
     47  char* getName(void) const;
     48
     49  // atributes
    4350  bool isFresh;              //!< If no Points where added until now
    4451  bool isHotPoint;           //!< If the first node is a specialPoint;
     
    4754  bool isJoined;             //!< If the End of the Curve is joined.
    4855  bool mainJoin;             //!< If the End of the Curve is joined, and this is the one Curve the others join to.
    49   PathCondition cond;        //!< The Split Condition;
    5056  int ID;                    //!< The ID of this TrackElement
    5157  float startingTime;        //!< The time at which this Track begins.
     
    5359  float endTime;             //!< The time at which this Track ends.
    5460  float jumpTime;            //!< The Time this Track has to jump to its preceding Track (only >0 if Track isJoined==true)
    55   CurveType curveType;       //!< The CurveType this will have.
     61  float width;               //!< Th width of the Path. This tells the Player(s), how far he(they) can go to the left/right.
    5662  int nodeCount;             //!< The count of points this TrackElement has.
    57   char* name;                //!< A name for the Trac.
    5863  Curve* curve;              //!< The Curve of this TrackElement
    5964  int childCount;            //!< The number of Children This TrackElement has.
    60   TrackElement** children;   //!< A TrackElement can have a Tree of following TrackElements.
     65  tList<TrackElement>* children;   //!< A TrackElement can have a Tree of following TrackElements.
     66
     67
     68  // runtime
     69  TrackElement* history;     //!< a pointer to the last TrackElement we were on. This is if you want to walk the path backwards again.
     70
     71  void debug(void);
     72
     73  // CONDITION FUNCTIONS and STUFF
     74  void* subject;             //!< The Subject the Condition should act upon.
     75  int (TrackElement::*condFunc)(void*); //!< Pointer to the condition function
     76
     77  int lowest(void* nothing);
     78  int highest(void* nothing);
     79  int random(void* nothing);
     80
     81  int leftRight(void* node);
     82  int nearest(void* node);
     83  // todo  int enemyKilled(void* entity);
     84
     85 private:
     86  char* name;                //!< A name for the Trac.
     87 
    6188};
    6289
    63 
     90//! the Condition to choose between the different ways of the game.
     91enum CONDITION {LOWEST, HIGHEST, RANDOM, LEFTRIGHT, NEAREST, ENEMYKILLED};
    6492
    6593//! The TrackManager handles the flow of the Players through the game.
     
    103131  TrackManager(void);
    104132
    105   static TrackManager* singletonRef;  //!< There may only be one TrackManager existing.
     133  static TrackManager* singletonRef;  //!< There may only be one TrackManager.
     134
    106135  TrackElement* firstTrackElem;       //!< The first TrackElement that exists.
    107136  TrackElement* currentTrackElem;     //!< The TrackElement we are working on.
     137  CurveType curveType;                //!< The CurveType the entire TrackSystem will have.
    108138  float localTime;                    //!< The time that has been passed since the traveling the Track.
    109139  float maxTime;                      //!< The maximal time the track has.
    110140  int trackElemCount;                 //!< The count of TrackElements that exist.
    111   PNode* bindSlave;
     141  PNode* bindSlave;                   //!< The node that is slave to the TrackManager. This node will be moved while update the TrackManager, and must NOT move itself.
     142  PNode* trackNode;                   //!< The main TrackNode of this Track.
    112143 
    113144  void initChildren(unsigned int childCount, SubString* names = NULL);
     
    117148 
    118149 public:
    119   ~TrackManager(void);
     150  virtual ~TrackManager(void);
     151
    120152  static TrackManager* getInstance(void);
    121153
    122154  // Methods to change the Path (initialisation)
    123155  void workOn(unsigned int trackID);
    124   inline void setCurveType(CurveType curveType) { this->setCurveType (curveType, this->currentTrackElem);}
     156  /** \see setCurveType(CurveType curveType, TrackElement* trackElem); \param curveType the type of the Curve */
     157  inline void setCurveType(CurveType curveType) { this->setCurveType (curveType, this->currentTrackElem);};
    125158  void setCurveType(CurveType curveType, TrackElement* trackElem);
    126159  void setDuration(float time);
     
    131164  void fork(unsigned int count, ...);
    132165  void forkV(unsigned int count, int* trackIDs, SubString* names = NULL);
    133   void condition(unsigned int groupID, PathCondition cond); //!< \todo really do this!!
     166  void condition(CONDITION cond, void* subject);
     167  void condition(unsigned int groupID, CONDITION cond, void* subject);
    134168  void join(unsigned int count, ...);
    135169  void joinV(unsigned int count, int* trackIDs);
     
    143177
    144178  // Methods to calculate the position on the Path (runtime)
    145   Vector calcPos(void) const;
    146   Vector calcDir(void) const;
     179  inline Vector calcPos(void) const;
     180  inline Vector calcDir(void) const;
     181  float getWidth(void) const;
    147182  void tick(float dt);
    148183  void jumpTo(float time);
    149   void choosePath(int graphID);
     184  inline int choosePath(TrackElement* trackElem);
    150185
    151186  void setBindSlave(PNode* bindSlave);
     187  PNode* getTrackNode(void);
    152188
    153189  // DEBUG //
  • orxonox/branches/levelloader/src/world_entities/environment.cc

    r3557 r3605  
    100100Environment::~Environment ()
    101101{
    102   delete this->model;
     102
    103103}
    104104
    105105void Environment::tick (float time) {}
    106106
    107 void Environment::hit (WorldEntity* weapon, Vector loc) {}
     107void Environment::hit (WorldEntity* weapon, Vector* loc) {}
    108108
    109109void Environment::destroy () {}
     
    114114{
    115115  glMatrixMode(GL_MODELVIEW);
    116   glLoadIdentity();
     116  glPushMatrix();
    117117  float matrix[4][4];
    118118 
     
    123123 
    124124  this->model->draw();
     125
     126  glPopMatrix();
    125127}
    126128
  • orxonox/branches/levelloader/src/world_entities/environment.h

    r3542 r3605  
    99  friend class World;
    1010
    11  private:
    12   float xCor;
    13   float yCor;
    14   float zCor;
    15 
    16   float mountainTest[10][10];
    17 
    1811 public:
    1912  Environment ();
    2013  Environment (TiXmlElement* root);
    21   ~Environment ();
    22 
     14  virtual ~Environment ();
    2315 
    2416  virtual void tick (float time);
    25   virtual void hit (WorldEntity* weapon, Vector loc);
     17  virtual void hit (WorldEntity* weapon, Vector* loc);
    2618  virtual void destroy ();
    2719  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
  • orxonox/branches/levelloader/src/world_entities/player.cc

    r3604 r3605  
    1616*/
    1717
     18#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_PLAYER
     19
    1820#include "player.h"
     21
    1922#include "stdincl.h"
    2023//#include "collision.h"
    2124#include "objModel.h"
     25#include "list.h"
     26#include "weapon.h"
     27#include "track_manager.h"
    2228
    2329using namespace std;
     
    3137Player::Player(bool isFree) : WorldEntity(isFree)
    3238{
    33 
    3439  this->model = new OBJModel("../data/models/reaplow.obj");
    35   /*
    36   objectList = glGenLists(1);
    37   glNewList (objectList, GL_COMPILE);
    38 
    39   glBegin(GL_TRIANGLES);
    40   glColor3f(1,1,1);
    41   glVertex3f(0,0,0.5);
    42   glVertex3f(-0.5,0,-1);
    43   glVertex3f(0.5,0,-1);
    44 
    45   glVertex3f(0,0,0.5);
    46   glVertex3f(0,0.5,-1);
    47   glVertex3f(0,-0.5,-1);
    48   glEnd();
    49    
    50   glBegin(GL_QUADS);
    51   glColor3f(0,0,1);
    52   glVertex3f(0.5,0.5,-1);
    53   glVertex3f(0.5,-0.5,-1);
    54   glVertex3f(-0.5,-0.5,-1);
    55   glVertex3f(-0.5,0.5,-1);
    56   glEnd();
    57  
    58   glEndList ();
    59   */
    60 }
     40  this->weapons = new tList<Weapon>();
     41  this->activeWeapon = NULL;
     42
     43  travelSpeed = 15.0;
     44  velocity = Vector();
     45  bUp = bDown = bLeft = bRight = bAscend = bDescend = false;
     46  bFire = false;
     47  acceleration = 10.0;
     48}
     49
     50/**
     51   \brief destructs the player, deletes alocated memory
     52*/
     53Player::~Player ()
     54{
     55  Weapon* w = this->weapons->enumerate();
     56  while( w != NULL)
     57    {
     58      delete w;
     59      w = this->weapons->nextElement();
     60    }
     61  delete this->weapons;
     62 
     63  //delete this->velocity;
     64}
     65
    6166
    6267/**
     
    102107
    103108/**
    104    \brief destructs the player
    105 */
    106 Player::~Player ()
    107 {
    108   delete this->model;
    109 }
     109   \brief adds a weapon to the weapon list of player
     110   \param weapon to add
     111*/
     112void Player::addWeapon(Weapon* weapon)
     113{
     114  this->weapons->add(weapon);
     115}
     116
     117
     118/**
     119   \brief removes a weapon from the player
     120   \param weapon to remove
     121*/
     122void Player::removeWeapon(Weapon* weapon)
     123{
     124  this->weapons->remove(weapon);
     125}
     126
    110127
    111128/**
     
    114131void Player::postSpawn ()
    115132{
    116   travelSpeed = 15.0;
    117   velocity = Vector();
    118   bUp = bDown = bLeft = bRight = bAscend = bDescend = false;
    119   bFire = false;
    120   acceleration = 10.0;
    121133  //setCollision(new CollisionCluster(1.0, Vector(0,0,0)));
    122134}
    123135
    124 /**
    125    \brief the function called for each passing timeSnap
    126    \param time The timespan passed since last update
    127 */
    128 void Player::tick (float time)
    129 {
    130   // movement
    131   this->move (time);
    132 }
     136
     137/**
     138   \brief the action occuring if the player left the game
     139*/
     140void Player::leftWorld ()
     141{}
     142
     143
    133144
    134145/**
     
    137148   \param loc ??
    138149*/
    139 void Player::hit (WorldEntity* weapon, Vector loc)
    140 {
    141 }
    142 
    143 /**
    144    \brief action that happens when the player is destroyed.
    145 */
    146 void Player::destroy ()
    147 {
    148 }
     150void Player::hit (WorldEntity* weapon, Vector* loc)
     151{
     152}
     153
    149154
    150155/**
     
    158163}
    159164
    160 /**
    161    \brief The connection to the command node
    162    \param cmd the Command unit from witch to map
    163 
    164    here the commands are mapped to the players movement/weaponary
    165 */
    166 void Player::command (Command* cmd)
    167 {
    168   //printf("Player|recieved command [%s]\n", cmd->cmd);
    169   if( !strcmp( cmd->cmd, "up")) bUp = !cmd->bUp;
    170   else if( !strcmp( cmd->cmd, "down")) bDown = !cmd->bUp;
    171   else if( !strcmp( cmd->cmd, "left")) bLeft = !cmd->bUp;
    172   else if( !strcmp( cmd->cmd, "right")) bRight = !cmd->bUp;
    173   else if( !strcmp( cmd->cmd, "fire")) bFire = !cmd->bUp;
    174 }
    175165
    176166/**
     
    180170{
    181171  glMatrixMode(GL_MODELVIEW);
    182   glLoadIdentity();
     172  glPushMatrix();
    183173  float matrix[4][4];
    184174 
     
    191181  glMultMatrixf((float*)matrix);
    192182 
    193   glMatrixMode(GL_MODELVIEW);
    194183  this->model->draw();
    195   // glCallList(objectList);
    196 }
    197 
    198 
    199 /*PN
    200   void Player::getLookat(Location* locbuf)
    201   {
    202   *locbuf = *getLocation();
    203   //locbuf->dist += 5.0;
    204   }
    205 */
    206 
    207 /**
    208    \brief the action occuring if the player left the game
    209 */
    210 void Player::leftWorld ()
    211 {
    212 }
     184  glPopMatrix();
     185}
     186
     187
     188/**
     189   \brief the function called for each passing timeSnap
     190   \param time The timespan passed since last update
     191*/
     192void Player::tick (float time)
     193{
     194  // player controlled movement
     195  this->move (time);
     196  // weapon system manipulation
     197  this->fire();
     198}
     199
    213200
    214201/**
     
    220207  Vector accel(0.0, 0.0, 0.0);
    221208  /* FIXME: calculating the direction and orthDirection every timeSlice is redundant! save it somewhere */
    222   //Placement *pos = getPlacement();
    223209 
    224210  /* calculate the direction in which the craft is heading  */
     
    228214  //orthDirection = orthDirection.cross (direction);
    229215
    230   if( bUp) { accel = accel+(direction*acceleration); }
    231   if( bDown) { accel = accel-(direction*acceleration); }
    232   if( bLeft ) { accel = accel - (orthDirection*acceleration); }
    233   if( bRight ) { accel = accel + (orthDirection*acceleration); }
    234   if( bAscend ) { /* not yet implemented but just: (0,0,1)*acceleration */}
    235   if( bDescend) {/* FIXME */} /* \todo up and down player movement */
    236 
    237   //Location* l = getLocation();
    238  
    239   // r(t) = r(0) + v(0)*t + 1/2*a*t^2
    240   // r = position
    241   // v = velocity
    242   // a = acceleration
    243 
    244   /* this the base-speed of the player: determines how fast and how the player follows the track*/
    245   //l->dist = l->dist + travelSpeed * time;
    246  
    247   Vector* shift = new Vector (this->travelSpeed * time, 0, 0);
    248   this->shiftCoor (shift);
    249  
    250   /* this updates the player position on the track - user interaction */
    251   //l->pos = l->pos + accel*time;
     216  if( this->bUp && this->getRelCoor().x < 20)
     217    accel = accel+(direction*acceleration);
     218  if( this->bDown && this->getRelCoor().x > -5)
     219    accel = accel-(direction*acceleration);
     220  if( this->bLeft &&  TrackManager::getInstance()->getWidth() > -this->getRelCoor().z*2)
     221    accel = accel - (orthDirection*acceleration);
     222  if( this->bRight &&  TrackManager::getInstance()->getWidth() > this->getRelCoor().z*2)
     223    accel = accel + (orthDirection*acceleration);
     224  if( this->bAscend )
     225  if( this->bDescend) {/* FIXME */} /* \todo up and down player movement */
     226
    252227  Vector move = accel * time;
    253228  this->shiftCoor (&move);
    254229}
     230
     231
     232/**
     233   \brief weapon manipulation by the player
     234*/
     235void Player::fire()
     236{
     237  if(this->bFire)
     238    {
     239      if(this->activeWeapon != NULL)
     240        this->activeWeapon->fire();
     241    }
     242  if(this->bWeaponChange)
     243    {
     244      Weapon* w = this->weapons->enumerate();
     245      this->activeWeapon = this->weapons->nextElement(this->activeWeapon);
     246    }
     247}
     248
     249
     250/**
     251   \brief The connection to the command node
     252   \param cmd the Command unit from witch to map
     253
     254   here the commands are mapped to the players movement/weaponary
     255*/
     256void Player::command (Command* cmd)
     257{
     258  PRINTF(3)("recieved command [%s]\n", cmd->cmd);
     259  if( !strcmp( cmd->cmd, "up")) this->bUp = !cmd->bUp;
     260  else if( !strcmp( cmd->cmd, "down")) this->bDown = !cmd->bUp;
     261  else if( !strcmp( cmd->cmd, "left")) this->bLeft = !cmd->bUp;
     262  else if( !strcmp( cmd->cmd, "right")) this->bRight = !cmd->bUp;
     263  else if( !strcmp( cmd->cmd, "fire")) this->bFire = !cmd->bUp;
     264  else if( !strcmp( cmd->cmd, "mode")) this->bWeaponChange = !cmd->bUp;
     265}
  • orxonox/branches/levelloader/src/world_entities/player.h

    r3542 r3605  
    99#include "world_entity.h"
    1010
     11template<class T> class tList;
    1112class OBJModel;
     13class Weapon;
    1214
    1315//! Basic controllable WorldEntity
     
    1921  Player(bool isFree = false);
    2022  Player(TiXmlElement* root);
    21   ~Player();
     23  virtual ~Player();
     24
     25  void addWeapon(Weapon* weapon);
     26  void removeWeapon(Weapon* weapon);
    2227 
    2328  virtual void postSpawn();
    24   virtual void tick(float time);
    25   virtual void hit(WorldEntity* weapon, Vector loc);
    26   virtual void destroy();
     29  virtual void leftWorld();
     30  virtual void hit(WorldEntity* weapon, Vector* loc);
    2731  virtual void collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags);
     32
     33  virtual void tick(float time); 
     34  virtual void draw();
     35
    2836  virtual void command(Command* cmd);
    29  
    30   virtual void draw();
    31   // virtual void getLookat(Location* locbuf);
    32  
    33   virtual void leftWorld();
    3437 
    3538 private:
     
    4144  bool bDescend;         //!< descend button presses.
    4245  bool bFire;            //!< fire button pressed.
     46  bool bWeaponChange;    //!< weapon change button pressed
     47
     48  tList<Weapon>* weapons;//!< a list of weapon
     49  Weapon* activeWeapon;  //!< the weapon that is currenty activated
    4350
    4451  Vector velocity;       //!< the velocity of the player.
     
    4754 
    4855  void move(float time);
     56  void fire(void);
    4957 
    5058};
  • orxonox/branches/levelloader/src/world_entities/power_up.h

    r3499 r3605  
    1515 public:
    1616  PowerUp ();
    17   ~PowerUp ();
     17  virtual ~PowerUp ();
    1818 
    1919};
  • orxonox/branches/levelloader/src/world_entities/skysphere.cc

    r3499 r3605  
    2424*/
    2525
     26#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
     27
    2628#include "material.h"
    2729#include "skysphere.h"
     
    2931#include "vector.h"
    3032#include "world_entity.h"
    31 
    3233
    3334using namespace std;
     
    3839Skysphere::Skysphere()
    3940
    40   initialize("../data/pictures/sky-replace.jpg");
     41  this->initialize("../data/pictures/sky-replace.jpg");
    4142}
     43
    4244
    4345/**
     
    4749Skysphere::Skysphere(char* fileName)
    4850{
    49   initialize(fileName);
     51  this->initialize(fileName);
    5052}
     53
    5154
    5255/**
     
    5659{
    5760  PRINTF(3)("Deleting the SkySphere\n");
    58   delete skyMaterial;
    59   free(sphereObj);
     61  delete this->skyMaterial;
     62  free(this->sphereObj);
    6063}
    6164
     
    6972  this->sphereObj = gluNewQuadric();
    7073  gluQuadricTexture(this->sphereObj, GL_TRUE);
    71   this->setRadius(250.0);
     74  this->setRadius(1900.0);
    7275
    7376  this->skyMaterial = new Material("Sky");
     
    7578  this->skyMaterial->setIllum(3);
    7679  this->skyMaterial->setAmbient(1.0, 1.0, 1.0);
    77 }
    78 
    79 
    80 /**
    81    \brief sets the Radius of the Sphere.
    82    \param radius The Radius of The Sphere
    83 */
    84 void Skysphere::setRadius(float radius)
    85 {
    86   this->sphereRadius = radius;
    8780}
    8881
     
    9992
    10093/**
    101    \brief updates the position of the Skysphere
    102    \param sphereCenter The coordinate of the Center of the Sphere
    103    
    104    This is normally done in the update-phase of world, so the Skysphere is always centered at the Camera.
    105 */
    106 void Skysphere::updatePosition(Vector sphereCenter)
    107 {
    108   this->sphereCenter = sphereCenter;
    109 }
    110 
    111 
    112 /**
    11394   \brief draws the Skysphere
    11495   
     
    11798void Skysphere::draw()
    11899{
    119   glEnable(GL_TEXTURE_2D);
     100  glPushMatrix();
     101  glMatrixMode(GL_MODELVIEW);
     102  glTranslatef(this->absCoordinate.x,
     103               this->absCoordinate.y,
     104               this->absCoordinate.z);
     105
     106  //glRotatef(-30, 1, 0, 0);
     107  //glRotatef(95.0f, 0.0f, 0.0f, 1.0f);
     108  //glRotatef(-250.0f, 0.0, 1.0f, 0.0f);
     109 
    120110  skyMaterial->select();
    121   glPushMatrix();
    122   glTranslatef(this->sphereCenter.x,this->sphereCenter.y,this->sphereCenter.z);
    123  
    124   glRotatef(-30, 1, 0, 0);
    125   glRotatef(95.0f, 0.0f, 0.0f, 1.0f);
    126   glRotatef(-250.0f, 0.0, 1.0f, 0.0f);
    127  
    128   gluSphere(sphereObj, sphereRadius, 20, 20);
     111  gluSphere(this->sphereObj, this->sphereRadius, 20, 20);
    129112  glPopMatrix();
    130   glDisable(GL_TEXTURE_2D);
    131113}
     114
     115
     116/**
     117   \brief sets the Radius of the Sphere.
     118   \param radius The Radius of The Sphere
     119*/
     120void Skysphere::setRadius(float radius)
     121{
     122  this->sphereRadius = radius;
     123}
  • orxonox/branches/levelloader/src/world_entities/skysphere.h

    r3499 r3605  
    1515/* INCLUDES */
    1616#include "p_node.h"
     17#include "world_entity.h"
    1718
    1819/* FORWARD DEFINITION */
     
    2122
    2223//! A Class to handle a SkySphere
    23 class Skysphere : public PNode
     24class Skysphere : public WorldEntity
    2425{
    2526
     
    2728  Skysphere();
    2829  Skysphere(char* fileName);
    29   ~Skysphere();
     30  virtual ~Skysphere();
     31  void destroy();
    3032
    3133  void setRadius(float radius);
    3234  void setTexture(char* fileName);
    3335
    34   void updatePosition(Vector sphereCenter);
    35   void draw();
     36  virtual void draw();
    3637
    3738 private:
    3839  GLUquadricObj *sphereObj; //!< A Placeholder for the SkySphere.
    3940  Material *skyMaterial;    //!< A Material for the SkySphere.
    40   Vector sphereCenter;      //!< Center of the SkySphere.
    4141  float sphereRadius;       //!< Radius of the SkySphere. This should match the frustum maximum range.
    42 
    43 
     42   
    4443  void initialize(char* fileName); 
    4544};
  • orxonox/branches/levelloader/src/world_entities/world_entity.cc

    r3499 r3605  
    3838  this->setClassName ("WorldEntity");
    3939  this->bDraw = true;
     40  this->model = NULL;
    4041  //  collisioncluster = NULL;
    4142}
     
    4748{
    4849  // if( collisioncluster != NULL) delete collisioncluster;
     50  delete this->model;
    4951}
    5052
    5153/**
    52    \brief get the Location of the WorldEntity
    53    \return a pointer to location
     54   \brief sets the character attributes of a worldentity
     55   \param character attributes
     56
     57   these attributes don't have to be set, only use them, if you need them
    5458*/
    55 /*PN
    56 Location* WorldEntity::getLocation ()
    57 {
    58   return &loc;
    59 }
    60 */
     59void WorldEntity::setCharacterAttributes(CharacterAttributes* charAttr)
     60{}
     61
    6162
    6263/**
    63    \brief get the Placement of the WorldEntity
    64    \return a pointer to placement
     64   \brief gets the Character attributes of this worldentity
     65   \returns character attributes
    6566*/
    66  /*PN
    67 Placement* WorldEntity::getPlacement ()
    68 {
    69   return &place;
    70 }
    71  */
     67CharacterAttributes* WorldEntity::getCharacterAttributes()
     68{}
     69
     70
    7271/**
    7372   \brief query whether the WorldEntity in question is free
     
    9392}
    9493*/
    95 
    96 /**
    97    \brief this method is called every frame
    98    \param time: the time in seconds that has passed since the last tick
    99    
    100    Handle all stuff that should update with time inside this method (movement, animation, etc.)
    101 */
    102 void WorldEntity::tick(float time)
    103 {
    104 }
    10594
    10695
     
    130119
    131120/**
    132    \brief the entity is drawn onto the screen with this function
    133    
    134    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.
    135 */
    136 void WorldEntity::draw()
    137 {}
    138 
    139 /**
    140121   \brief this function is called, when two entities collide
    141122   \param other: the world entity with whom it collides
     
    147128void WorldEntity::collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags) {}
    148129
     130
    149131/**
    150132   \brief this function is called, when the ship is hit by a waepon
     
    154136   calculate the damage depending
    155137*/
    156 void WorldEntity::hit(WorldEntity* weapon, Vector loc) {}
    157 
    158 /**
    159    \brief this function is called when the entity is to be destroied
    160    
    161    This can be called, if eg. something realy bad happens :)
    162 */
    163 void WorldEntity::destroy() {}
     138void WorldEntity::hit(WorldEntity* weapon, Vector* loc) {}
    164139
    165140
     
    174149}
    175150
     151
     152/**
     153   \brief this method is called by the world if the WorldEntity leaves valid gamespace
     154   
     155   For free entities this means it left the Track boundaries. With bound entities it means its Location adresses a
     156   place that is not in the world anymore. In both cases you might have to take extreme measures (a.k.a. call destroy).
     157*/
     158void WorldEntity::leftWorld ()
     159{
     160}
     161
     162
     163/**
     164   \brief this method is called every frame
     165   \param time: the time in seconds that has passed since the last tick
     166   
     167   Handle all stuff that should update with time inside this method (movement, animation, etc.)
     168*/
     169void WorldEntity::tick(float time)
     170{
     171}
     172
     173
     174/**
     175   \brief the entity is drawn onto the screen with this function
     176   
     177   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.
     178*/
     179void WorldEntity::draw()
     180{}
     181
     182
    176183/**
    177184   \brief this handles incoming command messages
     
    184191{
    185192}
    186 
    187 /**
    188    \brief this is called by the local Camera to determine the point it should look at on the WorldEntity
    189    \param locbuf: a pointer to the buffer to fill with a location to look at
    190        
    191    You may put any Location you want into locbuf, the Camera will determine via the corresponding Track how
    192    to look at the location you return with this.
    193 */
    194 /*PN
    195 void WorldEntity::getLookat (Location* locbuf)
    196 {
    197 }
    198 */
    199 
    200 /**
    201    \brief this method is called by the world if the WorldEntity leaves valid gamespace
    202    
    203    For free entities this means it left the Track boundaries. With bound entities it means its Location adresses a
    204    place that is not in the world anymore. In both cases you might have to take extreme measures (a.k.a. call destroy).
    205 */
    206 void WorldEntity::leftWorld ()
    207 {
    208 }
  • orxonox/branches/levelloader/src/world_entities/world_entity.h

    r3499 r3605  
    99#include "stdincl.h"
    1010#include "p_node.h"
     11#include "objModel.h"
    1112
    1213//class CollisionCluster;
    13 class OBJModel;
     14class CharacterAttributes;
     15
    1416
    1517//! Basic class from which all interactive stuff in the world is derived from
     
    2224  virtual ~WorldEntity ();
    2325
    24   OBJModel* model;                  //!< The model that should be loaded for this entity.
     26
     27
    2528 
    2629  //void setCollision (CollisionCluster* newhull);
    2730 
    28   bool isFree ();
    29  
    3031  //void addAbility(Ability* ability);
    3132  //void removeAbility(Ability* ability);
    32  
     33  void setDrawable (bool bDraw); 
     34  bool isFree ();
     35  void setCharacterAttributes(CharacterAttributes* charAttr);
     36  CharacterAttributes* getCharacterAttributes();
     37
    3338  virtual void postSpawn ();
    34   virtual void tick (float time);
    35   virtual void hit (WorldEntity* weapon, Vector loc);
    36   virtual void destroy ();
     39  virtual void leftWorld ();
     40
     41  virtual void hit (WorldEntity* weapon, Vector* loc);
    3742  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
    3843  virtual void command (Command* cmd);
     
    4045  void processDraw ();
    4146  virtual void draw ();
    42   void setDrawable (bool bDraw);
     47  virtual void tick (float time);
    4348 
    44   virtual void leftWorld ();
     49 protected:
     50  OBJModel* model;                  //!< The model that should be loaded for this entity.
     51  CharacterAttributes* charAttr;      //!< the character attributes of a world_entity
    4552 
    4653 private:
     
    4956  bool bDraw;                         //!< If it should be visible.
    5057
     58
     59
    5160  //CollisionCluster* collisioncluster; //!< The collision-Cluster of this entity.
    5261};
Note: See TracChangeset for help on using the changeset viewer.