Changeset 3605 in orxonox.OLD for orxonox/branches/levelloader
- Timestamp:
- Mar 18, 2005, 11:52:15 AM (20 years ago)
- Location:
- orxonox/branches/levelloader
- Files:
-
- 8 deleted
- 70 edited
- 23 copied
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/levelloader/ChangeLog
r1956 r3605 1 2005-03-16 orxonox 2 Finished work on version 0.2.1-pre-alpha released 0.2.2-pre-alpha 3 4 2005-03-15 Patrick Boenzli <patrick@orxonox.ethz.ch> 5 parenting finished 6 7 2005-03-09 Patrick Boenzli <patrick@orxonox.ethz.ch> 8 Big Cleanup again 9 10 2005-03-01 Benjamin Grauer <bensch@orxonox.ethz.ch> 11 Added Light Class 12 13 2005-02-27 Benjamin Grauer <bensch@orxonox.ethz.ch> 14 Big Configure.ac-cleanup 15 16 2005-02-22 David Gruetter <davgr@gmx.ch> 17 Added Skysphere 18 19 2005-01-07 Patrick Boenzli <patrick@orxonox.ethz.ch> 20 LoadScreen implemented 21 22 2004-12-20 Patrick Boenzli <patrick@orxonox.ethz.ch> 23 New Version out 0.2.1-pre-alpha 24 25 2004-12-20 Patrick Boenzli <patrick@orxonox.ethz.ch> 26 HEAVY cleanup of the framework 27 28 2004-12-18 Patrick Boenzli <patrick@orxonox.ethz.ch> 29 enhanced the Command Node 30 31 2004-12-15 Nico Benold <bernoldn@ee.ethz.ch> 32 OS X support 33 34 2004-12-15 Benjamin Grauer <bensch@orxonox.ethz.ch> 35 Defined standard coding rules 36 37 2004-12-15 Benjamin Grauer <bensch@orxonox.ethz.ch> 38 Added Importer for showing 3D Object. 39 40 2004-11-07 David Gruetter <davgr@gmx.ch> 41 Shaded Terrain 42 43 2004-10-23 Adrian Buerli <buerlia@ee.ethz.ch> 44 Dynamic Mountains, dynamic movement. 45 46 2004-10-18 Patrick Boenzli <patrick@orxonox.ethz.ch> 47 Release 0.1-pre-alpha 48 49 2004-07-17 Christian Meyer <cmeyer@ee.ethz.ch> 50 SDL-Framework 51 52 2004-06-09 Tom of ethz 53 Added endless Mountains 54 55 2004-06-02 Benjamin Grauer <bensch@orxonox.ethz.ch> 56 Added Console 57 58 2004-05-20 Patrick Boenzli <patrick@orxonox.ethz.ch> 59 Added the ability to shoot 60 61 2004-05-05 Benjamin Grauer <bensch@orxonox.ethz.ch> 62 Added the GUI. 63 64 2004-04-21 Patrik Boenzli <patrick@orxonox.ethz.ch> 65 Added Makefile to orxonox 66 67 2004-04-25 Amir Guindehi <amir@guindehi.ch> 68 Created Project Orxonox 69 70 71 -
orxonox/branches/levelloader/INSTALL
r1956 r3605 1 2 INSTALLATION INSTRUCTIONS FOR ORXONOX 3 ===================================== 4 5 INSTALLATION 6 ============ 7 8 To make it quite easy for those of you who just want to install orxonox: 9 10 1. ./configure 11 2. make 12 3. make install 13 14 (Further Information please see below at autoconf information) 15 16 DEPENDENCIES 17 ============ 18 19 There are some dependencies for orxonox you have to install: 20 21 1. SDL (http://www.libsdl.org) 22 2. OPENGL (http://www.opengl.org) 23 3. SDL_mixer (http://www.libsdl.org/projects/SDL_mixer) 24 4. SDL_image (http://www.libsdl.org/projects/SDL_image) 25 5. SDL_ttf (http://www.libsdl.org/projects/SDL_ttf) 26 a) needs libttf (http://www.freetype.org/) 27 28 Nice to Have: 29 6. Doxygen (http://www.stack.nl/~dimitri/doxygen/) 30 7. Automake (http://www.gnu.org/software/automake/) 31 8. Autoconf (http://www.gnu.org/software/autoconf/) 32 33 Windows Users also need the following: 34 9. mingw (http://mingw.org/) 35 36 37 BUGS 38 ==== 39 Send bug reports to orxonox-dev@mail.datacore.ch 40 41 ORXONOX-> 42 ########################################################## 43 <-AUTOCONF 44 45 46 1 47 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software 2 48 Foundation, Inc. -
orxonox/branches/levelloader/Makefile.in
r3563 r3605 1 # Makefile.in generated by automake 1.8. 2from Makefile.am.1 # Makefile.in generated by automake 1.8.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 38 38 $(srcdir)/Makefile.in $(srcdir)/config.h.in \ 39 39 $(srcdir)/doc/documentation.am $(top_srcdir)/configure AUTHORS \ 40 COPYING ChangeLog INSTALL NEWS TODO config.guess config.sub\41 depcompinstall-sh missing mkinstalldirs40 COPYING ChangeLog INSTALL NEWS config.guess config.sub depcomp \ 41 install-sh missing mkinstalldirs 42 42 subdir = . 43 43 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 … … 94 94 DEFS = @DEFS@ 95 95 DEPDIR = @DEPDIR@ 96 DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@ 97 DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@ 96 98 DOXYGEN = @DOXYGEN@ 97 99 DOXYGEN_FALSE = @DOXYGEN_FALSE@ … … 326 328 tags=; \ 327 329 here=`pwd`; \ 328 if ( etags--etags-include --version) >/dev/null 2>&1; then \330 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ 329 331 include_option=--etags-include; \ 332 empty_fix=.; \ 330 333 else \ 331 334 include_option=--include; \ 335 empty_fix=; \ 332 336 fi; \ 333 337 list='$(SUBDIRS)'; for subdir in $$list; do \ 334 338 if test "$$subdir" = .; then :; else \ 335 test -f $$subdir/TAGS &&\339 test ! -f $$subdir/TAGS || \ 336 340 tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ 337 341 fi; \ … … 343 347 $(AWK) ' { files[$$0] = 1; } \ 344 348 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 348 354 ctags: CTAGS 349 355 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ … … 454 460 uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ 455 461 *.shar.gz*) \ 456 GZIP=$(GZIP_ENV) gunzip -c $(distdir). tar.gz | unshar ;;\462 GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ 457 463 *.zip*) \ 458 464 unzip $(distdir).zip ;;\ … … 477 483 && chmod -R a-w "$$dc_install_base" \ 478 484 && ({ \ 479 (cd ../.. && $(mkdir_p)"$$dc_destdir") \485 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ 480 486 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ 481 487 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ … … 654 660 @DOXYGEN_TRUE@clean-local: doc-delete 655 661 656 @DOXYGEN_TRUE@all-local: doc 662 @DOCUMENTATION_TRUE@@DOXYGEN_TRUE@all-local: doc 663 @DOCUMENTATION_FALSE@@DOXYGEN_TRUE@all-local: 657 664 658 665 @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 -*- 2 2 3 3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 … … 41 41 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 42 42 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 43 [AM_AUTOMAKE_VERSION([1.8. 2])])43 [AM_AUTOMAKE_VERSION([1.8.5])]) 44 44 45 45 # AM_AUX_DIR_EXPAND … … 150 150 fi])]) 151 151 152 # serial 6-*- Autoconf -*-152 # serial 7 -*- Autoconf -*- 153 153 154 154 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 … … 237 237 for i in 1 2 3 4 5 6; do 238 238 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 240 242 done 241 243 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf … … 265 267 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 266 268 # 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 270 277 am_cv_$1_dependencies_compiler_type=$depmode 271 278 break … … 313 320 # Generate code to set up dependency tracking. -*- Autoconf -*- 314 321 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. 316 323 317 324 # This program is free software; you can redistribute it and/or modify … … 352 359 # Extract the definition of DEP_FILES from the Makefile without 353 360 # running `make'. 354 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`361 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 355 362 test -z "$DEPDIR" && continue 356 363 # 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"` 358 365 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 359 366 # We invoke sed twice because it is the simplest approach to 360 367 # changing $(DEPDIR) to its actual value in the expansion. 361 for file in `sed -n -e'368 for file in `sed -n ' 362 369 /^DEP_FILES = .*\\\\$/ { 363 370 s/^DEP_FILES = // … … 718 725 # Do not use -m 0755 and let people choose whatever they expect by 719 726 # 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.) 720 735 AC_DEFUN([AM_PROG_MKDIR_P], 721 [if mkdir -p -- . 2>/dev/null; then736 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 722 737 # Keeping the `.' argument allows $(mkdir_p) to be used without 723 738 # argument. Indeed, we sometimes output rules like … … 732 747 # directories to create, and then abort because `.' already 733 748 # exists. 734 for d in ./-p ./-- ;749 for d in ./-p ./--version; 735 750 do 736 751 test -d $d && rmdir $d -
orxonox/branches/levelloader/config.h.in
r3499 r3605 89 89 #undef HAVE__BOOL 90 90 91 /* if Modular-DUBUG mode is enabled */ 92 #undef MODULAR_DEBUG 93 91 94 /* Name of package */ 92 95 #undef PACKAGE -
orxonox/branches/levelloader/configure
r3563 r3605 1 1 #! /bin/sh 2 2 # 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. 4 4 # 5 5 # Report bugs to <orxonox-dev at mail.datacore.ch>. … … 270 270 PACKAGE_NAME='orxonox' 271 271 PACKAGE_TARNAME='orxonox' 272 PACKAGE_VERSION='0.2. 1-pre-alpha'273 PACKAGE_STRING='orxonox 0.2. 1-pre-alpha'272 PACKAGE_VERSION='0.2.2-pre-alpha' 273 PACKAGE_STRING='orxonox 0.2.2-pre-alpha' 274 274 PACKAGE_BUGREPORT='orxonox-dev at mail.datacore.ch' 275 275 … … 312 312 #endif" 313 313 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 DO XYGEN 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'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 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' 315 315 ac_subst_files='' 316 316 … … 789 789 # This message is too long to be a string in the A/UX 3.1 sh. 790 790 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. 792 792 793 793 Usage: $0 [OPTION]... [VAR=VALUE]... … … 856 856 if test -n "$ac_init_help"; then 857 857 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:";; 859 859 esac 860 860 cat <<\_ACEOF … … 867 867 --enable-debug compiles in debug mode. Lots of debug info about the 868 868 game. 869 --disable-modular-debug compiles in modular-debug mode, that logs 870 differently on the many modules of orxonox. 869 871 --enable-sub-projects also builds the subProjects while make from srcdir 872 --enable-documentation also builds the sDocumentation while make from 873 srcdir 870 874 871 875 Optional Packages: … … 988 992 if $ac_init_version; then 989 993 cat <<\_ACEOF 990 orxonox configure 0.2. 1-pre-alpha994 orxonox configure 0.2.2-pre-alpha 991 995 generated by GNU Autoconf 2.59 992 996 … … 1002 1006 running configure, to aid debugging if configure makes a mistake. 1003 1007 1004 It was created by orxonox $as_me 0.2. 1-pre-alpha, which was1008 It was created by orxonox $as_me 0.2.2-pre-alpha, which was 1005 1009 generated by GNU Autoconf 2.59. Invocation command line was 1006 1010 … … 1599 1603 fi 1600 1604 1601 if mkdir -p -- . 2>/dev/null; then1605 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 1602 1606 # Keeping the `.' argument allows $(mkdir_p) to be used without 1603 1607 # argument. Indeed, we sometimes output rules like … … 1612 1616 # directories to create, and then abort because `.' already 1613 1617 # exists. 1614 for d in ./-p ./-- ;1618 for d in ./-p ./--version; 1615 1619 do 1616 1620 test -d $d && rmdir $d … … 1722 1726 # Define the identity of the package. 1723 1727 PACKAGE='orxonox' 1724 VERSION='0.2. 1-pre-alpha'1728 VERSION='0.2.2-pre-alpha' 1725 1729 1726 1730 … … 2518 2522 for i in 1 2 3 4 5 6; do 2519 2523 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 2521 2527 done 2522 2528 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf … … 2546 2552 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2547 2553 # 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 2551 2562 am_cv_CXX_dependencies_compiler_type=$depmode 2552 2563 break … … 3349 3360 for i in 1 2 3 4 5 6; do 3350 3361 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 3352 3365 done 3353 3366 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf … … 3377 3390 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 3378 3391 # 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 3382 3400 am_cv_CC_dependencies_compiler_type=$depmode 3383 3401 break … … 3846 3864 if test x$DEBUG = xno; then 3847 3865 echo "no" 3848 echo " -> Setting debuglevel to 3. (orxonox is still in Development. It really is needed."3849 DEBUG= 33866 echo " -> Setting debuglevel to 4. (orxonox is still in Development. It really is needed." 3867 DEBUG=4 3850 3868 elif test x$DEBUG = xyes; then 3851 3869 echo "yes" … … 3862 3880 3863 3881 3882 3883 #---------------# 3884 # Modular Debug # 3885 #---------------# 3886 MODULAR_DEBUG=yes 3887 echo "$as_me:$LINENO: checking if Modular-DEBUG-mode should be ebabled" >&5 3888 echo $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. 3890 if test "${enable_modular_debug+set}" = set; then 3891 enableval="$enable_modular_debug" 3892 MODULAR_DEBUG=$enableval 3893 fi; 3894 3895 if test x$MODULAR_DEBUG = xno; then 3896 echo "no" 3897 elif test x$MODULAR_DEBUG = xyes; then 3898 echo "yes" 3899 3900 cat >>confdefs.h <<_ACEOF 3901 #define MODULAR_DEBUG 1 3902 _ACEOF 3903 3904 fi 3864 3905 3865 3906 #--------------# … … 3961 4002 echo "no" 3962 4003 fi 4004 3963 4005 #-------------------# 3964 4006 # SubProject-enable # … … 3988 4030 fi 3989 4031 4032 4033 #----------------------# 4034 # Documentation-enable # 4035 #----------------------# 4036 def_documentation=no 4037 echo "$as_me:$LINENO: checking if the Documentation should be build by default" >&5 4038 echo $ECHO_N "checking if the Documentation should be build by default... $ECHO_C" >&6 4039 # Check whether --enable-documentation or --disable-documentation was given. 4040 if test "${enable_documentation+set}" = set; then 4041 enableval="$enable_documentation" 4042 def_documentation=yes 4043 fi; 4044 if test x$def_documentation = xyes; then 4045 echo "yes" 4046 fi 4047 if test x$def_documentation = xno; then 4048 echo "no" 4049 fi 4050 4051 4052 if test x$def_documentation = xyes; then 4053 DOCUMENTATION_TRUE= 4054 DOCUMENTATION_FALSE='#' 4055 else 4056 DOCUMENTATION_TRUE='#' 4057 DOCUMENTATION_FALSE= 4058 fi 3990 4059 3991 4060 ####################### … … 8168 8237 ## OUTPUT CONFIGURE ## 8169 8238 ###################### 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" 8171 8240 8172 8241 … … 8287 8356 Usually this means the macro was only invoked conditionally." >&5 8288 8357 echo "$as_me: error: conditional \"SUB_PROJECTS\" was never defined. 8358 Usually this means the macro was only invoked conditionally." >&2;} 8359 { (exit 1); exit 1; }; } 8360 fi 8361 if test -z "${DOCUMENTATION_TRUE}" && test -z "${DOCUMENTATION_FALSE}"; then 8362 { { echo "$as_me:$LINENO: error: conditional \"DOCUMENTATION\" was never defined. 8363 Usually this means the macro was only invoked conditionally." >&5 8364 echo "$as_me: error: conditional \"DOCUMENTATION\" was never defined. 8289 8365 Usually this means the macro was only invoked conditionally." >&2;} 8290 8366 { (exit 1); exit 1; }; } … … 8589 8665 cat >&5 <<_CSEOF 8590 8666 8591 This file was extended by orxonox $as_me 0.2. 1-pre-alpha, which was8667 This file was extended by orxonox $as_me 0.2.2-pre-alpha, which was 8592 8668 generated by GNU Autoconf 2.59. Invocation command line was 8593 8669 … … 8652 8728 cat >>$CONFIG_STATUS <<_ACEOF 8653 8729 ac_cs_version="\\ 8654 orxonox config.status 0.2. 1-pre-alpha8730 orxonox config.status 0.2.2-pre-alpha 8655 8731 configured by $0, generated by GNU Autoconf 2.59, 8656 8732 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" … … 8770 8846 "src/lib/gui/console/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/lib/gui/console/Makefile" ;; 8771 8847 "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" ;; 8772 8850 "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; 8773 8851 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; … … 8916 8994 s,@SUB_PROJECTS_TRUE@,$SUB_PROJECTS_TRUE,;t t 8917 8995 s,@SUB_PROJECTS_FALSE@,$SUB_PROJECTS_FALSE,;t t 8996 s,@DOCUMENTATION_TRUE@,$DOCUMENTATION_TRUE,;t t 8997 s,@DOCUMENTATION_FALSE@,$DOCUMENTATION_FALSE,;t t 8918 8998 s,@DOXYGEN@,$DOXYGEN,;t t 8919 8999 s,@DOXYGEN_TRUE@,$DOXYGEN_TRUE,;t t … … 9559 9639 # Extract the definition of DEP_FILES from the Makefile without 9560 9640 # running `make'. 9561 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`9641 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 9562 9642 test -z "$DEPDIR" && continue 9563 9643 # 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"` 9565 9645 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 9566 9646 # We invoke sed twice because it is the simplest approach to 9567 9647 # changing $(DEPDIR) to its actual value in the expansion. 9568 for file in `sed -n -e'9648 for file in `sed -n ' 9569 9649 /^DEP_FILES = .*\\\\$/ { 9570 9650 s/^DEP_FILES = // -
orxonox/branches/levelloader/configure.ac
r3499 r3605 23 23 ######################### 24 24 AC_PREREQ(2.56) 25 AC_INIT(orxonox, 0.2. 1-pre-alpha, [orxonox-dev at mail.datacore.ch])25 AC_INIT(orxonox, 0.2.2-pre-alpha, [orxonox-dev at mail.datacore.ch]) 26 26 27 27 ## Detect the canonical host and target build environment. … … 56 56 if test x$DEBUG = xno; then 57 57 echo "no" 58 echo " -> Setting debuglevel to 3. (orxonox is still in Development. It really is needed."59 DEBUG= 358 echo " -> Setting debuglevel to 4. (orxonox is still in Development. It really is needed." 59 DEBUG=4 60 60 elif test x$DEBUG = xyes; then 61 61 echo "yes" … … 68 68 69 69 AC_SUBST(DEBUG) 70 71 #---------------# 72 # Modular Debug # 73 #---------------# 74 MODULAR_DEBUG=yes 75 AC_MSG_CHECKING([if Modular-DEBUG-mode should be ebabled]) 76 AC_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 80 if test x$MODULAR_DEBUG = xno; then 81 echo "no" 82 elif test x$MODULAR_DEBUG = xyes; then 83 echo "yes" 84 AC_DEFINE_UNQUOTED(MODULAR_DEBUG, 1, [if Modular-DUBUG mode is enabled]) 85 fi 70 86 71 87 #--------------# … … 139 155 echo "no" 140 156 fi 157 141 158 #-------------------# 142 159 # SubProject-enable # … … 155 172 AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes) 156 173 174 #----------------------# 175 # Documentation-enable # 176 #----------------------# 177 def_documentation=no 178 AC_MSG_CHECKING([if the Documentation should be build by default]) 179 AC_ARG_ENABLE([documentation], 180 AC_HELP_STRING( [--enable-documentation], 181 [also builds the sDocumentation while make from srcdir]), [def_documentation=yes]) 182 if test x$def_documentation = xyes; then 183 echo "yes" 184 fi 185 if test x$def_documentation = xno; then 186 echo "no" 187 fi 188 AM_CONDITIONAL(DOCUMENTATION, test x$def_documentation = xyes) 157 189 ####################### 158 190 ## PROGRAMM CHECKING ## … … 534 566 src/lib/gui/Makefile 535 567 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]) 537 571 538 572 AC_OUTPUT -
orxonox/branches/levelloader/doc/documentation.am
r3219 r3605 50 50 clean-local: doc-delete 51 51 52 if DOCUMENTATION 52 53 all-local: doc 54 else 55 all-local: 56 endif 53 57 54 58 .PHONY: doc doc-config doc-delete -
orxonox/branches/levelloader/src/INSTALL
r1956 r3605 3 3 ===================================== 4 4 5 Installing an using orx is very simple: Just type: 5 INSTALLATION 6 ============ 6 7 7 cd ../orxonox/trunk 8 ./configure 9 make 10 ./bin/orxonox 8 To make it quite easy for those of you who just want to install orxonox: 9 10 1. ./configure 11 2. make 12 3. make install 13 14 DEPENDENCIES 15 ============ 16 17 There are some dependencies for orxonox you have to install: 18 19 1. SDL (http://www.libsdl.org) 20 2. OPENGL (http://www.opengl.org) 21 3. SDL_mixer (http://www.libsdl.org/projects/SDL_mixer) 22 4. SDL_image (http://www.libsdl.org/projects/SDL_image) 23 5. SDL_ttf (http://www.libsdl.org/projects/SDL_ttf) 24 a) needs libttf (http://www.freetype.org/) 25 26 Nice to Have: 27 6. Doxygen (http://www.stack.nl/~dimitri/doxygen/) 28 7. Automake (http://www.gnu.org/software/automake/) 29 8. Autoconf (http://www.gnu.org/software/autoconf/) 30 31 Windows Users also need the following: 32 9. mingw (http://mingw.org/) 11 33 12 34 -
orxonox/branches/levelloader/src/Makefile.am
r3525 r3605 6 6 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/coord 7 7 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/data 8 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/g aphics8 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics 9 9 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/font 10 10 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/importer … … 34 34 camera.cc \ 35 35 track_manager.cc \ 36 light.cc \ 36 track_node.cc \ 37 simple_animation.cc \ 37 38 factory.cc \ 38 39 story_entities/story_entity.cc \ … … 43 44 world_entities/environment.cc \ 44 45 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 \ 45 51 ai/ai.cc \ 46 52 lib/coord/p_node.cc \ … … 48 54 lib/coord/helper_parent.cc \ 49 55 lib/data/data_tank.cc \ 56 lib/graphics/light.cc \ 50 57 lib/graphics/font/fontset.cc \ 51 58 lib/graphics/importer/array.cc \ … … 60 67 lib/util/substring.cc \ 61 68 lib/math/vector.cc \ 62 lib/math/matrix.cc \63 69 lib/math/curve.cc \ 64 70 lib/xmlparser/tinystr.cc \ … … 77 83 command_node.h \ 78 84 message_structures.h \ 79 light.h \ 85 track_manager.h \ 86 track_node.h \ 87 simple_animation.h \ 80 88 story_entities/story_entity.h \ 81 89 story_entities/story_def.h \ … … 87 95 world_entities/environment.h \ 88 96 world_entities/skysphere.h \ 89 world_entities/shoot_laser.h \90 world_entities/shoot_rocket.h \91 97 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 \ 92 103 ai/ai.h \ 93 104 network/synchronisable.h \ … … 99 110 lib/coord/null_parent.h \ 100 111 lib/coord/helper_parent.h \ 112 lib/graphics/light.h \ 101 113 lib/graphics/font/fontset.h \ 102 114 lib/data/data_tank.h \ … … 110 122 lib/xmlparser/tinystr.h \ 111 123 lib/math/vector.h \ 112 lib/math/matrix.h \113 124 lib/math/curve.h \ 114 125 glmenu/glmenu_imagescreen.h … … 119 130 120 131 if SUB_PROJECTS 121 SUB_PROGS = lib 132 SUB_PROGS = lib subprojects 122 133 else 123 134 SUB_PROGS = -
orxonox/branches/levelloader/src/Makefile.in
r3563 r3605 1 # Makefile.in generated by automake 1.8. 2from Makefile.am.1 # Makefile.in generated by automake 1.8.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 50 50 CONFIG_HEADER = $(top_builddir)/config.h 51 51 CONFIG_CLEAN_FILES = 52 am__installdirs = $(DESTDIR)$(bindir)52 am__installdirs = "$(DESTDIR)$(bindir)" 53 53 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) 54 54 PROGRAMS = $(bin_PROGRAMS) 55 55 am_orxonox_OBJECTS = orxonox.$(OBJEXT) game_loader.$(OBJEXT) \ 56 56 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) \ 58 59 story_entity.$(OBJEXT) campaign.$(OBJEXT) world.$(OBJEXT) \ 59 60 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) \ 61 64 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) \ 67 70 tinystr.$(OBJEXT) tinyxml.$(OBJEXT) tinyxmlerror.$(OBJEXT) \ 68 71 tinyxmlparser.$(OBJEXT) glmenu_imagescreen.$(OBJEXT) … … 76 79 @AMDEP_TRUE@ ./$(DEPDIR)/base_object.Po ./$(DEPDIR)/camera.Po \ 77 80 @AMDEP_TRUE@ ./$(DEPDIR)/campaign.Po \ 81 @AMDEP_TRUE@ ./$(DEPDIR)/character_attributes.Po \ 78 82 @AMDEP_TRUE@ ./$(DEPDIR)/command_node.Po ./$(DEPDIR)/curve.Po \ 79 83 @AMDEP_TRUE@ ./$(DEPDIR)/data_tank.Po \ … … 84 88 @AMDEP_TRUE@ ./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \ 85 89 @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 \ 90 96 @AMDEP_TRUE@ ./$(DEPDIR)/skysphere.Po \ 91 97 @AMDEP_TRUE@ ./$(DEPDIR)/story_entity.Po \ 92 @AMDEP_TRUE@ ./$(DEPDIR)/substring.Po ./$(DEPDIR)/te xture.Po \93 @AMDEP_TRUE@ ./$(DEPDIR)/t inystr.Po ./$(DEPDIR)/tinyxml.Po \94 @AMDEP_TRUE@ ./$(DEPDIR)/tinyxml error.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 \ 95 101 @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 98 106 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 99 107 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) … … 112 120 ETAGS = etags 113 121 CTAGS = ctags 114 DIST_SUBDIRS = . lib 122 DIST_SUBDIRS = . lib subprojects 115 123 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 116 124 ACLOCAL = @ACLOCAL@ … … 136 144 DEFS = @DEFS@ 137 145 DEPDIR = @DEPDIR@ 146 DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@ 147 DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@ 138 148 DOXYGEN = @DOXYGEN@ 139 149 DOXYGEN_FALSE = @DOXYGEN_FALSE@ … … 221 231 target_vendor = @target_vendor@ 222 232 MAINSRCDIR = . 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/g aphics -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)/ai233 AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/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 224 234 AM_LDFLAGS = $(MWINDOWS) 225 235 orxonox_SOURCES = orxonox.cc \ … … 229 239 camera.cc \ 230 240 track_manager.cc \ 231 light.cc \ 241 track_node.cc \ 242 simple_animation.cc \ 232 243 factory.cc \ 233 244 story_entities/story_entity.cc \ … … 238 249 world_entities/environment.cc \ 239 250 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 \ 240 256 ai/ai.cc \ 241 257 lib/coord/p_node.cc \ … … 243 259 lib/coord/helper_parent.cc \ 244 260 lib/data/data_tank.cc \ 261 lib/graphics/light.cc \ 245 262 lib/graphics/font/fontset.cc \ 246 263 lib/graphics/importer/array.cc \ … … 255 272 lib/util/substring.cc \ 256 273 lib/math/vector.cc \ 257 lib/math/matrix.cc \258 274 lib/math/curve.cc \ 259 275 lib/xmlparser/tinystr.cc \ … … 272 288 command_node.h \ 273 289 message_structures.h \ 274 light.h \ 290 track_manager.h \ 291 track_node.h \ 292 simple_animation.h \ 275 293 story_entities/story_entity.h \ 276 294 story_entities/story_def.h \ … … 282 300 world_entities/environment.h \ 283 301 world_entities/skysphere.h \ 284 world_entities/shoot_laser.h \285 world_entities/shoot_rocket.h \286 302 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 \ 287 308 ai/ai.h \ 288 309 network/synchronisable.h \ … … 294 315 lib/coord/null_parent.h \ 295 316 lib/coord/helper_parent.h \ 317 lib/graphics/light.h \ 296 318 lib/graphics/font/fontset.h \ 297 319 lib/data/data_tank.h \ … … 305 327 lib/xmlparser/tinystr.h \ 306 328 lib/math/vector.h \ 307 lib/math/matrix.h \308 329 lib/math/curve.h \ 309 330 glmenu/glmenu_imagescreen.h … … 311 332 EXTRA_DIST = orxonox.conf 312 333 @SUB_PROJECTS_FALSE@SUB_PROGS = 313 @SUB_PROJECTS_TRUE@SUB_PROGS = lib 334 @SUB_PROJECTS_TRUE@SUB_PROGS = lib subprojects 314 335 SUBDIRS = . \ 315 336 $(SUB_PROGS) … … 328 349 esac; \ 329 350 done; \ 330 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/Makefile'; \351 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ 331 352 cd $(top_srcdir) && \ 332 $(AUTOMAKE) -- gnusrc/Makefile353 $(AUTOMAKE) --foreign src/Makefile 333 354 .PRECIOUS: Makefile 334 355 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status … … 350 371 install-binPROGRAMS: $(bin_PROGRAMS) 351 372 @$(NORMAL_INSTALL) 352 $(mkdir_p) $(DESTDIR)$(bindir)373 test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" 353 374 @list='$(bin_PROGRAMS)'; for p in $$list; do \ 354 375 p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ … … 356 377 ; then \ 357 378 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; \ 360 381 else :; fi; \ 361 382 done … … 365 386 @list='$(bin_PROGRAMS)'; for p in $$list; do \ 366 387 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"; \ 369 390 done 370 391 … … 387 408 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camera.Po@am__quote@ 388 409 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/campaign.Po@am__quote@ 410 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/character_attributes.Po@am__quote@ 389 411 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command_node.Po@am__quote@ 390 412 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curve.Po@am__quote@ … … 401 423 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@ 402 424 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@ 403 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Po@am__quote@404 425 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model.Po@am__quote@ 405 426 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/null_parent.Po@am__quote@ … … 408 429 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_node.Po@am__quote@ 409 430 @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@ 410 434 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skysphere.Po@am__quote@ 411 435 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/story_entity.Po@am__quote@ 412 436 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/substring.Po@am__quote@ 437 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terrain.Po@am__quote@ 413 438 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@ 414 439 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinystr.Po@am__quote@ … … 417 442 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinyxmlparser.Po@am__quote@ 418 443 @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@ 419 445 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@ 446 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/weapon.Po@am__quote@ 420 447 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/world.Po@am__quote@ 421 448 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/world_entity.Po@am__quote@ … … 549 576 @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` 550 577 578 terrain.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 586 terrain.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 594 primitive.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 602 primitive.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 610 weapon.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 618 weapon.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 626 projectile.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 634 projectile.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 642 character_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 650 character_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 551 658 ai.o: ai/ai.cc 552 659 @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; \ … … 629 736 @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` 630 737 738 light.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 746 light.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 631 754 fontset.o: lib/graphics/font/fontset.cc 632 755 @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; \ … … 820 943 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 821 944 @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.cc824 @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; fi826 @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.cc830 831 matrix.obj: lib/math/matrix.cc832 @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; fi834 @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`838 945 839 946 curve.o: lib/math/curve.cc … … 1007 1114 tags=; \ 1008 1115 here=`pwd`; \ 1009 if ( etags--etags-include --version) >/dev/null 2>&1; then \1116 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ 1010 1117 include_option=--etags-include; \ 1118 empty_fix=.; \ 1011 1119 else \ 1012 1120 include_option=--include; \ 1121 empty_fix=; \ 1013 1122 fi; \ 1014 1123 list='$(SUBDIRS)'; for subdir in $$list; do \ 1015 1124 if test "$$subdir" = .; then :; else \ 1016 test -f $$subdir/TAGS &&\1125 test ! -f $$subdir/TAGS || \ 1017 1126 tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ 1018 1127 fi; \ … … 1024 1133 $(AWK) ' { files[$$0] = 1; } \ 1025 1134 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 1029 1140 ctags: CTAGS 1030 1141 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ … … 1051 1162 1052 1163 distdir: $(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_entities1164 $(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 1054 1165 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ 1055 1166 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ … … 1096 1207 installdirs: installdirs-recursive 1097 1208 installdirs-am: 1098 $(mkdir_p) $(DESTDIR)$(bindir) 1209 for dir in "$(DESTDIR)$(bindir)"; do \ 1210 test -z "$$dir" || $(mkdir_p) "$$dir"; \ 1211 done 1099 1212 install: install-recursive 1100 1213 install-exec: install-exec-recursive -
orxonox/branches/levelloader/src/ability.h
r3224 r3605 10 10 public: 11 11 Ability (); 12 ~Ability ();12 virtual ~Ability (); 13 13 14 14 }; -
orxonox/branches/levelloader/src/ai/ai.h
r3499 r3605 9 9 public: 10 10 AI (); 11 ~AI ();11 virtual ~AI (); 12 12 13 13 }; -
orxonox/branches/levelloader/src/camera.cc
r3365 r3605 51 51 Camera::~Camera () 52 52 { 53 this->bound = NULL; 54 this->world = NULL; 55 53 56 } 54 57 … … 60 63 as smooth camera movement or swaying). 61 64 */ 62 void Camera::ti meSlice(Uint32 deltaT)65 void Camera::tick (Uint32 deltaT) 63 66 { 64 67 if( this->t <= deltaTime) … … 198 201 // TO DO: implement options for frustum generation 199 202 //glFrustum(-1.0, 1.0, -1.0, 1.0, 1.5, 250.0); 200 gluPerspective(60, 1.2f, 0.1, 2 50);203 gluPerspective(60, 1.2f, 0.1, 2000); 201 204 202 205 //Vector up(0,0,1); … … 276 279 277 280 278 /**279 \brief destroy, reset the camera so that it doesn't perform anything anymore280 281 */282 void Camera::destroy()283 {284 this->bound = NULL;285 this->world = NULL;286 } -
orxonox/branches/levelloader/src/camera.h
r3365 r3605 7 7 #define _CAMERA_H 8 8 9 #include "stdincl.h"10 9 #include "world_entity.h" 11 12 10 13 11 class World; … … 56 54 public: 57 55 Camera (World* world); 58 ~Camera ();56 virtual ~Camera (); 59 57 60 void ti meSlice(Uint32 deltaT);58 void tick (Uint32 deltaT); 61 59 void apply (); 62 60 void bind (WorldEntity* entity); 63 void destroy();64 61 65 62 void setWorld(World* world); -
orxonox/branches/levelloader/src/command_node.cc
r3236 r3605 14 14 */ 15 15 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COMMAND_NODE 16 17 17 18 #include "command_node.h" … … 112 113 FILE* stream; 113 114 114 printf("Loading key bindings from %s\n", filename);115 PRINTF(4)("Loading key bindings from %s\n", filename); 115 116 116 117 if( filename == NULL) filename = DEFAULT_KEYBIND_FILE; … … 127 128 if( parser.getSection ("Bindings") == -1) 128 129 { 129 printf("Could not find key bindings in %s\n", filename);130 PRINTF(1)("Could not find key bindings in %s\n", filename); 130 131 return; 131 132 } … … 145 146 { 146 147 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); 148 149 strcpy (aliases->keys[index[1]], valuebuf); 149 150 break; 150 151 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); 152 153 strcpy (aliases->buttons[index[1]], valuebuf); 153 154 break; … … 214 215 while( SDL_PollEvent (&event)) 215 216 { 217 PRINTF(3)("CommandNode::processLocal() =========================got Event\n"); 216 218 memset (cmd.cmd, 0, CMD_LENGHT); 217 219 switch( event.type) … … 267 269 void CommandNode::relay (Command* cmd) 268 270 { 269 270 271 Orxonox *orx = Orxonox::getInstance(); 271 272 if( orx->systemCommand (cmd)) return; … … 281 282 while( entity != NULL) 282 283 { 283 entity->command (cmd); 284 entity->command (cmd); /*no absorbtion of command! strange*/ 284 285 entity = bound->nextElement(); 285 286 } -
orxonox/branches/levelloader/src/defs/debug.h
r3542 r3605 17 17 \file debug.h 18 18 \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 19 23 */ 20 24 … … 28 32 #include <stdio.h> 29 33 30 #ifndef DEBUG 31 #define DEBUG 4 32 #endif 33 34 // DEFINE ERROR MODES 34 35 #define NO 0 35 36 #define ERR 1 … … 37 38 #define INFO 3 38 39 #define DEBUGING 4 39 40 #define vDEBUGING 5 41 42 extern 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 */ 40 77 /////////////////////////////////////////////////// 41 78 /// PRINTF: prints with filename and linenumber /// 42 79 /////////////////////////////////////////////////// 80 43 81 #ifdef DEBUG 44 extern int verbose; 82 45 83 #define PRINTF(x) \ 46 84 PRINTF ## x 47 48 #if DEBUG>= ERR85 86 #if HARD_DEBUG_LEVEL >= ERR 49 87 #define PRINTF1 \ 50 if ( verbose>= ERR) \51 printf(" %s:%d::ERROR:", __FILE__, __LINE__) && printf88 if (SOFT_DEBUG_LEVEL >= ERR) \ 89 printf("ERROR::%s:%d:", __FILE__, __LINE__) && printf 52 90 #else 53 91 #define PRINTF1 if (NO) 54 92 #endif 55 93 56 #if DEBUG>= WARN94 #if HARD_DEBUG_LEVEL >= WARN 57 95 #define PRINTF2 \ 58 if ( verbose>= WARN) \59 printf(" %s:%d::WARNING:", __FILE__, __LINE__) && printf96 if (SOFT_DEBUG_LEVEL >= WARN) \ 97 printf("WARNING::%s:%d:", __FILE__, __LINE__) && printf 60 98 61 99 #else … … 63 101 #endif 64 102 65 #if DEBUG>= INFO103 #if HARD_DEBUG_LEVEL >= INFO 66 104 #define PRINTF3 \ 67 if ( verbose>= INFO) \68 printf(" %s:%d::INFO:", __FILE__, __LINE__) && printf105 if (SOFT_DEBUG_LEVEL >= INFO) \ 106 printf("INFO::%s:%d:", __FILE__, __LINE__) && printf 69 107 #else 70 108 #define PRINTF3 if (NO) 71 109 #endif 72 110 73 #if DEBUG>= DEBUGING111 #if HARD_DEBUG_LEVEL >= DEBUGING 74 112 #define PRINTF4 \ 75 if ( verbose>= DEBUGING) \76 printf(" %s:%d::DEBUG:", __FILE__, __LINE__) && printf113 if (SOFT_DEBUG_LEVEL >= DEBUGING) \ 114 printf("DEBUG::%s:%d:", __FILE__, __LINE__) && printf 77 115 #else 78 116 #define PRINTF4 if (NO) 79 117 #endif 80 118 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 82 127 #else 83 128 #define PRINTF(x) if (NO) … … 92 137 /////////////////////////////////////////////////// 93 138 #ifdef DEBUG 94 extern int verbose;95 139 #define PRINT(x) \ 96 140 PRINT ## x 97 98 #if DEBUG>= ERR141 142 #if HARD_DEBUG_LEVEL >= ERR 99 143 #define PRINT1 \ 100 if ( verbose>= ERR) \144 if (SOFT_DEBUG_LEVEL >= ERR) \ 101 145 printf 102 146 #else … … 104 148 #endif 105 149 106 #if DEBUG>= WARN150 #if HARD_DEBUG_LEVEL >= WARN 107 151 #define PRINT2 \ 108 if ( verbose>= WARN) \152 if (SOFT_DEBUG_LEVEL >= WARN) \ 109 153 printf 110 154 … … 113 157 #endif 114 158 115 #if DEBUG>= INFO159 #if HARD_DEBUG_LEVEL >= INFO 116 160 #define PRINT3 \ 117 if ( verbose>= INFO) \161 if (SOFT_DEBUG_LEVEL >= INFO) \ 118 162 printf 119 163 #else … … 121 165 #endif 122 166 123 #if DEBUG>= DEBUGING167 #if HARD_DEBUG_LEVEL >= DEBUGING 124 168 #define PRINT4 \ 125 if ( verbose>= DEBUGING) \169 if (SOFT_DEBUG_LEVEL >= DEBUGING) \ 126 170 printf 127 171 #else 128 172 #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) 129 181 #endif 130 182 … … 144 196 COUT ## x 145 197 146 #if DEBUG>= 1198 #if HARD_DEBUG_LEVEL >= 1 147 199 #define COUT1 \ 148 if ( verbose>= 1 ) \200 if (SOFT_DEBUG_LEVEL >= 1 ) \ 149 201 cout 150 202 #else … … 152 204 #endif 153 205 154 #if DEBUG>= 2206 #if HARD_DEBUG_LEVEL >= 2 155 207 #define COUT2 \ 156 if ( verbose>= 2 ) \208 if (SOFT_DEBUG_LEVEL >= 2 ) \ 157 209 cout 158 210 … … 161 213 #endif 162 214 163 #if DEBUG>= 3215 #if HARD_DEBUG_LEVEL >= 3 164 216 #define COUT3 \ 165 if ( verbose>= 3 ) \217 if (SOFT_DEBUG_LEVEL >= 3 ) \ 166 218 cout 167 219 #else … … 169 221 #endif 170 222 171 #if DEBUG>= 4223 #if HARD_DEBUG_LEVEL >= 4 172 224 #define COUT4 \ 173 if ( verbose>= 4 ) \225 if (SOFT_DEBUG_LEVEL >= 4 ) \ 174 226 cout 175 227 #else -
orxonox/branches/levelloader/src/glmenu/glmenu_imagescreen.cc
r3499 r3605 19 19 #include "glmenu_imagescreen.h" 20 20 21 #include "stdincl.h" 21 22 #include "material.h" 22 23 … … 27 28 GLMenuImageScreen* GLMenuImageScreen::getInstance() 28 29 { 29 if( singletonRef == NULL)30 if(!singletonRef) 30 31 singletonRef = new GLMenuImageScreen (); 31 32 return singletonRef; … … 45 46 /** 46 47 \brief standard deconstructor 47 48 48 \todo this deconstructor is not jet implemented - do it 49 49 */ … … 53 53 delete backMat; 54 54 } 55 56 55 57 56 /** … … 171 170 glDisable(GL_LIGHTING); 172 171 173 backMat->select();174 172 glBegin(GL_QUADS); 175 173 glColor3f(0.96, 0.84, 0.34); … … 210 208 glEnd(); 211 209 212 glEnable(GL_TEXTURE_2D);210 backMat->select(); 213 211 glBegin(GL_QUADS); 214 212 glTexCoord2i(0, 0); glVertex2i(offsetX, offsetY); -
orxonox/branches/levelloader/src/glmenu/glmenu_imagescreen.h
r3499 r3605 8 8 #define _GLMENU_IMAGESCREEN_H 9 9 10 #include " stdincl.h"11 class Texture; 10 #include "base_object.h" 11 12 12 class Material; 13 13 … … 18 18 19 19 public: 20 ~GLMenuImageScreen ();21 20 virtual ~GLMenuImageScreen (); 21 22 22 static GLMenuImageScreen* getInstance(); 23 23 -
orxonox/branches/levelloader/src/keynames.cc
r3230 r3605 15 15 16 16 #include "keynames.h" 17 18 #include "stdincl.h" 17 19 18 20 #include <string.h> -
orxonox/branches/levelloader/src/keynames.h
r3230 r3605 7 7 #ifndef _KEYNAMES_H 8 8 #define _KEYNAMES_H 9 10 11 #ifdef __WIN32__12 #include <windows.h>13 #endif14 15 #ifndef __APPLE__16 #include <SDL/SDL.h>17 #else18 #include <SDL.h>19 #endif20 9 21 10 /** -
orxonox/branches/levelloader/src/lib/Makefile.in
r3563 r3605 1 # Makefile.in generated by automake 1.8. 2from Makefile.am.1 # Makefile.in generated by automake 1.8.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 78 78 DEFS = @DEFS@ 79 79 DEPDIR = @DEPDIR@ 80 DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@ 81 DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@ 80 82 DOXYGEN = @DOXYGEN@ 81 83 DOXYGEN_FALSE = @DOXYGEN_FALSE@ … … 181 183 esac; \ 182 184 done; \ 183 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/Makefile'; \185 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/Makefile'; \ 184 186 cd $(top_srcdir) && \ 185 $(AUTOMAKE) -- gnusrc/lib/Makefile187 $(AUTOMAKE) --foreign src/lib/Makefile 186 188 .PRECIOUS: Makefile 187 189 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status … … 276 278 tags=; \ 277 279 here=`pwd`; \ 278 if ( etags--etags-include --version) >/dev/null 2>&1; then \280 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ 279 281 include_option=--etags-include; \ 282 empty_fix=.; \ 280 283 else \ 281 284 include_option=--include; \ 285 empty_fix=; \ 282 286 fi; \ 283 287 list='$(SUBDIRS)'; for subdir in $$list; do \ 284 288 if test "$$subdir" = .; then :; else \ 285 test -f $$subdir/TAGS &&\289 test ! -f $$subdir/TAGS || \ 286 290 tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ 287 291 fi; \ … … 293 297 $(AWK) ' { files[$$0] = 1; } \ 294 298 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 298 304 ctags: CTAGS 299 305 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ -
orxonox/branches/levelloader/src/lib/coord/helper_parent.cc
r3499 r3605 39 39 \todo this deconstructor is not jet implemented - do it 40 40 */ 41 HelperParent::~HelperParent () {} 41 HelperParent::~HelperParent () 42 { 42 43 44 } -
orxonox/branches/levelloader/src/lib/coord/helper_parent.h
r3499 r3605 17 17 public: 18 18 HelperParent (); 19 ~HelperParent (); 20 19 virtual ~HelperParent (); 21 20 22 21 }; -
orxonox/branches/levelloader/src/lib/coord/null_parent.cc
r3499 r3605 16 16 */ 17 17 18 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_NULL_PARENT 18 19 19 20 #include "null_parent.h" … … 26 27 NullParent* NullParent::getInstance () 27 28 { 28 if( singletonRef == NULL)29 if(!singletonRef) 29 30 singletonRef = new NullParent (); 30 31 return singletonRef; … … 36 37 \todo this constructor is not jet implemented - do it 37 38 */ 38 NullParent::NullParent () 39 NullParent::NullParent () : PNode (new Vector(0,0,0), NULL) 39 40 { 41 PRINTF(4)("NullParent::NullParent() - making new NullParent, there can only be one..\n"); 40 42 this->parent = this; 41 this->mode = ALL; 43 this->mode = PNODE_ALL; 44 this->setName("NullParent"); 42 45 } 43 46 44 47 45 NullParent::NullParent (Vector* absCoordinate) 48 NullParent::NullParent (Vector* absCoordinate) : PNode (new Vector(0,0,0), NULL) 46 49 { 50 singletonRef = this; 47 51 this->parent = this; 48 this->mode = ALL;52 this->mode = PNODE_ALL; 49 53 this->absCoordinate = *absCoordinate; 54 this->setName("NullParent"); 50 55 } 51 56 … … 58 63 NullParent::~NullParent () 59 64 { 60 delete singletonRef;65 //delete singletonRef; 61 66 singletonRef = NULL; 62 67 } 63 64 65 66 68 67 69 /** … … 72 74 worry, normaly... 73 75 */ 74 void NullParent::update ( float timeStamp)76 void NullParent::update () 75 77 { 78 79 PRINTF(4)("NullParent::update - (%f, %f, %f)\n", this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z); 76 80 this->absCoordinate = this->relCoordinate; 77 81 this->absDirection = parent->getAbsDir () * this->relDirection; … … 85 89 if( this->bRelDirChanged || this->bAbsDirChanged) 86 90 pn->parentDirChanged (); 87 pn->update ( timeStamp);91 pn->update (); 88 92 pn = this->children->nextElement (); 89 93 } -
orxonox/branches/levelloader/src/lib/coord/null_parent.h
r3499 r3605 16 16 public: 17 17 static NullParent* getInstance (); 18 ~NullParent (); 19 20 static NullParent* singletonRef; 18 virtual ~NullParent (); 21 19 22 virtual void update (float timeStamp); 20 21 virtual void update (); 23 22 24 23 private: 25 24 NullParent (); 26 25 NullParent (Vector* absCoordinate); 26 static NullParent* singletonRef; 27 27 28 28 }; -
orxonox/branches/levelloader/src/lib/coord/p_node.cc
r3557 r3605 13 13 ### File Specific: 14 14 main-programmer: Patrick Boenzli 15 co-programmer: ... 16 17 \todo Null-Parent => center of the coord system - singleton 15 co-programmer: 16 18 17 \todo Smooth-Parent: delay, speed 19 \todo destroy the stuff again, delete... 20 */ 21 18 */ 19 20 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_PNODE 22 21 23 22 #include "p_node.h" 24 23 24 #include "null_parent.h" 25 #include "vector.h" 25 26 26 27 using namespace std; … … 34 35 PNode::PNode () 35 36 { 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); 42 41 this->objectName = NULL; 43 42 } … … 51 50 PNode::PNode (Vector* absCoordinate, PNode* parent ) 52 51 { 52 this->init(parent); 53 53 54 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 } 67 63 68 64 /** … … 80 76 delete &this->absDirection; 81 77 */ 82 this->parent = NULL;78 //this->parent = NULL; 83 79 if( this->objectName) delete this->objectName; 84 80 /* 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 96 void 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 } 87 106 88 107 /** … … 91 110 cleans up all pnodes 92 111 */ 112 /* 93 113 void PNode::destroy () 94 114 { … … 99 119 pn = this->children->nextElement(); 100 120 } 121 // this deletes all children in the list 101 122 this->children->destroy (); 102 } 103 123 124 static_cast<BaseObject*>(this)->destroy(); 125 } 126 */ 104 127 105 128 /** … … 262 285 {} 263 286 264 265 266 287 /** 267 288 \brief adds a child and makes this node to a parent … … 283 304 use this to add a child to this node. 284 305 */ 285 void PNode::addChild (PNode* pNode, parentingMode mode) 286 { 287 pNode->mode = mode; 306 void 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; 288 314 pNode->parent = this; 289 this->children->add 315 this->children->add(pNode); 290 316 } 291 317 … … 294 320 \brief removes a child from the node 295 321 \param pNode the child to remove from this pNode. 322 323 Children from pNode will not be lost, they are referenced to NullPointer 296 324 */ 297 325 void PNode::removeChild (PNode* pNode) 298 326 { 327 pNode->remove(); 299 328 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 */ 338 void 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 } 300 348 } 301 349 … … 307 355 void PNode::setParent (PNode* parent) 308 356 { 309 this->parent = parent; 310 } 357 parent->addChild(this); 358 } 359 311 360 312 361 /** … … 314 363 \param mode the mode of the bind-type. 315 364 */ 316 void PNode::setMode (parentingMode mode) 317 { 318 this->mode = mode; 365 void 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 */ 375 int PNode::getMode() 376 { 377 return this->mode; 319 378 } 320 379 … … 351 410 worry, normaly... 352 411 */ 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) 412 void 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*/) 358 419 { 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) 360 427 { 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; 364 429 } 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 */ 375 432 } 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*/) 378 438 { 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 391 467 PNode* pn = this->children->enumerate(); 392 468 while( pn != NULL) … … 397 473 if( this->bRelDirChanged || this->bAbsDirChanged) 398 474 pn->parentDirChanged (); 399 pn->update( timeStamp);475 pn->update(); 400 476 pn = this->children->nextElement(); 401 477 } … … 415 491 void PNode::processTick (float dt) 416 492 { 417 this->tick (dt);493 //this->tick (dt); 418 494 PNode* pn = this->children->enumerate(); 419 495 while( pn != NULL) … … 424 500 } 425 501 426 /**427 \param dt time to tick428 */429 void PNode::tick (float dt)430 {}431 502 432 503 /** … … 435 506 void PNode::debug() 436 507 { 437 printf("PNode::debug() - absCoord: (%f, %f, %f)\n",508 PRINTF(2)("PNode::debug() - absCoord: (%f, %f, %f)\n", 438 509 this->absCoordinate.x, 439 510 this->absCoordinate.y, … … 451 522 void PNode::setName (const char* newName) 452 523 { 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); 465 528 } 466 529 … … 473 536 return this->objectName; 474 537 } 538 -
orxonox/branches/levelloader/src/lib/coord/p_node.h
r3557 r3605 22 22 #define _P_NODE_H 23 23 24 #include " stdincl.h"24 #include "base_object.h" 25 25 26 // FORWARD DEFINITION \\ 26 27 class PNode; /* forward decleration, so that parentEntry has access to PNode */ 28 class Quaternion; 29 class Vector; 27 30 28 31 //! 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 30 41 //! The default mode of the translation-binding. 31 #define DEFAULT_MODE ALL42 #define DEFAULT_MODE PNODE_ALL 32 43 33 44 //! Patent Node is a Engine to calculate the position of an Object in respect to the position of its parent. … … 39 50 virtual ~PNode (); 40 51 41 void destroy ();42 43 52 PNode* parent; //!< a pointer to the parent node 44 53 tList<PNode>* children; //!< list of the children 45 54 46 parentingMode mode; //!< the mode of the binding 55 47 56 48 57 Vector getRelCoor (); … … 62 71 63 72 void addChild (PNode* pNode); 64 void addChild (PNode* pNode, parentingMode mode);73 void addChild (PNode* pNode, int parentingMode); 65 74 void removeChild (PNode* pNode); 75 void remove(); 76 77 66 78 void setParent (PNode* parent); 67 79 void parentCoorChanged (); 68 80 void parentDirChanged (); 69 void setMode (parentingMode mode); 81 void setMode (int parentingMode); 82 int getMode(); 70 83 71 virtual void update ( float timeStamp);84 virtual void update (); 72 85 void processTick (float dt); 73 virtual void tick (float dt);74 86 75 87 void setName (const char* newName); … … 79 91 void debug (); 80 92 93 private: 94 void init(PNode* parent); 95 96 protected: 81 97 float timeStamp; //!< this the timeStamp of when the abs{Coordinat, Direction} has been calculated 82 98 char* objectName; //!< The name of the Object … … 91 107 Quaternion absDirection; //!< absolute direvtion in the world ( from (0,0,1) ) 92 108 109 int mode; //!< the mode of the binding 110 93 111 }; 94 112 95 113 #endif /* _P_NODE_H */ 114 -
orxonox/branches/levelloader/src/lib/graphics/Makefile.in
r3563 r3605 1 # Makefile.in generated by automake 1.8. 2from Makefile.am.1 # Makefile.in generated by automake 1.8.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 78 78 DEFS = @DEFS@ 79 79 DEPDIR = @DEPDIR@ 80 DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@ 81 DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@ 80 82 DOXYGEN = @DOXYGEN@ 81 83 DOXYGEN_FALSE = @DOXYGEN_FALSE@ … … 175 177 esac; \ 176 178 done; \ 177 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/graphics/Makefile'; \179 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/graphics/Makefile'; \ 178 180 cd $(top_srcdir) && \ 179 $(AUTOMAKE) -- gnusrc/lib/graphics/Makefile181 $(AUTOMAKE) --foreign src/lib/graphics/Makefile 180 182 .PRECIOUS: Makefile 181 183 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status … … 270 272 tags=; \ 271 273 here=`pwd`; \ 272 if ( etags--etags-include --version) >/dev/null 2>&1; then \274 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ 273 275 include_option=--etags-include; \ 276 empty_fix=.; \ 274 277 else \ 275 278 include_option=--include; \ 279 empty_fix=; \ 276 280 fi; \ 277 281 list='$(SUBDIRS)'; for subdir in $$list; do \ 278 282 if test "$$subdir" = .; then :; else \ 279 test -f $$subdir/TAGS &&\283 test ! -f $$subdir/TAGS || \ 280 284 tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ 281 285 fi; \ … … 287 291 $(AWK) ' { files[$$0] = 1; } \ 288 292 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 292 298 ctags: CTAGS 293 299 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ -
orxonox/branches/levelloader/src/lib/graphics/font/fontset.cc
r3499 r3605 45 45 #include <stdarg.h> 46 46 47 #include "../importer/texture.h" 47 #include "texture.h" 48 #include <string.h> 48 49 49 50 /** -
orxonox/branches/levelloader/src/lib/graphics/importer/Makefile.in
r3563 r3605 1 # Makefile.in generated by automake 1.8. 2from Makefile.am.1 # Makefile.in generated by automake 1.8.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 42 42 subdir = src/lib/graphics/importer 43 43 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ 44 $(srcdir)/Makefile.in TODO44 $(srcdir)/Makefile.in 45 45 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 46 46 am__aclocal_m4_deps = $(top_srcdir)/configure.ac … … 50 50 CONFIG_HEADER = $(top_builddir)/config.h 51 51 CONFIG_CLEAN_FILES = 52 am__installdirs = $(DESTDIR)$(bindir)52 am__installdirs = "$(DESTDIR)$(bindir)" 53 53 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) 54 54 PROGRAMS = $(bin_PROGRAMS) … … 98 98 DEFS = @DEFS@ 99 99 DEPDIR = @DEPDIR@ 100 DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@ 101 DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@ 100 102 DOXYGEN = @DOXYGEN@ 101 103 DOXYGEN_FALSE = @DOXYGEN_FALSE@ … … 215 217 esac; \ 216 218 done; \ 217 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/graphics/importer/Makefile'; \219 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/graphics/importer/Makefile'; \ 218 220 cd $(top_srcdir) && \ 219 $(AUTOMAKE) -- gnusrc/lib/graphics/importer/Makefile221 $(AUTOMAKE) --foreign src/lib/graphics/importer/Makefile 220 222 .PRECIOUS: Makefile 221 223 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status … … 237 239 install-binPROGRAMS: $(bin_PROGRAMS) 238 240 @$(NORMAL_INSTALL) 239 $(mkdir_p) $(DESTDIR)$(bindir)241 test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" 240 242 @list='$(bin_PROGRAMS)'; for p in $$list; do \ 241 243 p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ … … 243 245 ; then \ 244 246 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; \ 247 249 else :; fi; \ 248 250 done … … 252 254 @list='$(bin_PROGRAMS)'; for p in $$list; do \ 253 255 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"; \ 256 258 done 257 259 … … 330 332 $(AWK) ' { files[$$0] = 1; } \ 331 333 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 335 339 ctags: CTAGS 336 340 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ … … 387 391 all-am: Makefile $(PROGRAMS) $(HEADERS) 388 392 installdirs: 389 $(mkdir_p) $(DESTDIR)$(bindir) 393 for dir in "$(DESTDIR)$(bindir)"; do \ 394 test -z "$$dir" || $(mkdir_p) "$$dir"; \ 395 done 390 396 install: install-am 391 397 install-exec: install-exec-am -
orxonox/branches/levelloader/src/lib/graphics/importer/array.cc
r3499 r3605 13 13 co-programmer: ... 14 14 */ 15 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER 15 17 16 18 #include "array.h" … … 30 32 Array::~Array() 31 33 { 32 PRINTF( 2)("deleting array\n");34 PRINTF(4)("deleting array\n"); 33 35 Entry* walker = this->firstEntry; 34 36 Entry* previous; … … 49 51 void Array::initializeArray () 50 52 { 51 PRINTF( 2)("crating new Array\n");53 PRINTF(4)("crating new Array\n"); 52 54 this->firstEntry = new Entry; 53 55 this->firstEntry->next =NULL; … … 64 66 void Array::finalizeArray (void) 65 67 { 66 PRINTF( 3)("Finalizing array. Length: %i\n", entryCount);68 PRINTF(4)("Finalizing array. Length: %i\n", entryCount); 67 69 // if ((array = (GLfloat*)malloc( entryCount* sizeof(GLfloat))) == NULL) 68 70 if (!(this->array = new GLfloat [this->entryCount])) … … 87 89 if (!this->finalized) 88 90 { 89 PRINTF( 3)("adding new Entry to Array: %f\n", entry);91 PRINTF(5)("adding new Entry to Array: %f\n", entry); 90 92 91 93 this->currentEntry->value = entry; … … 96 98 } 97 99 else 98 PRINTF( 1)("adding failed, because list has been finalized\n");100 PRINTF(2)("adding failed, because list has been finalized\n"); 99 101 } 100 102 … … 131 133 void Array::debug () 132 134 { 133 PRINT F(0)("entryCount=%i, address=%p\n", this->entryCount, this->array);135 PRINT(0)("entryCount=%i, address=%p\n", this->entryCount, this->array); 134 136 } -
orxonox/branches/levelloader/src/lib/graphics/importer/array.h
r3499 r3605 8 8 #ifndef _ARRAY_H 9 9 #define _ARRAY_H 10 11 extern int verbose; //!< will be obsolete soon12 10 13 11 #include "stdincl.h" -
orxonox/branches/levelloader/src/lib/graphics/importer/material.cc
r3499 r3605 15 15 */ 16 16 17 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER 18 17 19 #include "material.h" 18 20 19 21 #include "texture.h" 22 #include "debug.h" 20 23 #include <stdlib.h> 21 24 #include <string.h> … … 51 54 Material::~Material() 52 55 { 53 PRINTF( 2)("delete Material %s.\n", this->name);56 PRINTF(4)("delete Material %s.\n", this->name); 54 57 if (this->name) 55 58 delete []this->name; … … 67 70 Material* Material::addMaterial(char* mtlName) 68 71 { 69 PRINTF( 2)("adding Material %s.\n", mtlName);72 PRINTF(4)("adding Material %s.\n", mtlName); 70 73 Material* tmpMat = this; 71 74 while (tmpMat->nextMat != NULL) … … 83 86 void Material::init(void) 84 87 { 85 PRINTF( 2)("initializing new Material.\n");88 PRINTF(4)("initializing new Material.\n"); 86 89 this->nextMat = NULL; 87 90 this->name =""; … … 112 115 Material* Material::search(char* mtlName) 113 116 { 114 PRINTF( 2)("Searching for material %s", mtlName);117 PRINTF(5)("Searching for material %s", mtlName); 115 118 Material* searcher = this; 116 119 while (searcher != NULL) 117 120 { 118 PRINT( 2)(".");121 PRINT(5)("."); 119 122 if (!strcmp (searcher->getName(), mtlName)) 120 123 { 121 PRINT( 2)("found.\n");124 PRINT(5)("found.\n"); 122 125 return searcher; 123 126 } 124 127 searcher = searcher->nextMat; 125 128 } 126 PRINT(2)(" not found\n");129 PRINT(2)("material %s not found\n", mtlName); 127 130 return NULL; 128 131 } … … 153 156 154 157 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 } 156 162 else 157 glBindTexture(GL_TEXTURE_2D, 0); 158 163 { 164 glDisable(GL_TEXTURE_2D); 165 glBindTexture(GL_TEXTURE_2D, 0); 166 } 159 167 } 160 168 … … 166 174 void Material::setName (char* mtlName) 167 175 { 168 PRINTF( 3)("setting Material Name to %s.\n", this->name);176 PRINTF(4)("setting Material Name to %s.\n", this->name); 169 177 this->name = new char [strlen(mtlName)+1]; 170 178 strcpy(this->name, mtlName); … … 185 193 void Material::setIllum (int illum) 186 194 { 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); 188 196 this->illumModel = illum; 189 // PRINTF(3)("setting illumModel to: %i\n", illumModel);190 197 } 191 198 /** … … 205 212 void Material::setDiffuse (float r, float g, float b) 206 213 { 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); 208 215 this->diffuse[0] = r; 209 216 this->diffuse[1] = g; … … 231 238 void Material::setAmbient (float r, float g, float b) 232 239 { 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); 234 241 this->ambient[0] = r; 235 242 this->ambient[1] = g; … … 256 263 void Material::setSpecular (float r, float g, float b) 257 264 { 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); 259 266 this->specular[0] = r; 260 267 this->specular[1] = g; … … 296 303 void Material::setTransparency (float trans) 297 304 { 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); 299 306 this->transparency = trans; 300 307 } … … 325 332 void Material::setDiffuseMap(char* dMap) 326 333 { 327 PRINTF( 3)("setting Diffuse Map %s\n", dMap);334 PRINTF(4)("setting Diffuse Map %s\n", dMap); 328 335 diffuseTexture = new Texture(); 329 336 this->diffuseTextureSet = diffuseTexture->loadImage(dMap); -
orxonox/branches/levelloader/src/lib/graphics/importer/material.h
r3499 r3605 9 9 #define _MATERIAL_H 10 10 11 12 13 extern int verbose; //!< will be obsolete soon.14 11 15 12 #if HAVE_CONFIG_H -
orxonox/branches/levelloader/src/lib/graphics/importer/model.cc
r3499 r3605 13 13 co-programmer: ... 14 14 */ 15 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER 15 17 16 18 #include "model.h" … … 80 82 Model::~Model(void) 81 83 { 82 PRINTF( 3)("Deleting Model ");84 PRINTF(4)("Deleting Model "); 83 85 if (this->name) 84 86 { 85 PRINT( 3)("%s\n", this->name);87 PRINT(4)("%s\n", this->name); 86 88 delete []this->name; 87 89 } 88 90 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"); 92 94 Group* walker = this->firstGroup; 93 95 while (walker != NULL) … … 99 101 } 100 102 101 PRINTF( 3)("Deleting Materials.\n");103 PRINTF(4)("Deleting Materials.\n"); 102 104 if (this->material) 103 105 delete this->material; … … 122 124 void Model::draw (void) const 123 125 { 124 PRINTF( 2)("drawing the 3D-Models\n");126 PRINTF(4)("drawing the 3D-Models\n"); 125 127 Group* walker = this->firstGroup; 126 128 while (walker != NULL) 127 129 { 128 PRINTF( 3)("Drawing model %s\n", walker->name);130 PRINTF(5)("Drawing model %s\n", walker->name); 129 131 glCallList (walker->listNumber); 130 132 walker = walker->next; … … 142 144 if (groupNumber >= this->groupCount) 143 145 { 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); 145 147 return; 146 148 } 147 PRINTF( 2)("drawing the requested 3D-Models if found.\n");149 PRINTF(4)("drawing the requested 3D-Models if found.\n"); 148 150 Group* walker = this->firstGroup; 149 151 int counter = 0; … … 152 154 if (counter == groupNumber) 153 155 { 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); 155 157 glCallList (walker->listNumber); 156 158 return; … … 159 161 walker = walker->next; 160 162 } 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); 162 164 return; 163 165 … … 172 174 void Model::draw (char* groupName) const 173 175 { 174 PRINTF( 2)("drawing the requested 3D-Models if found.\n");176 PRINTF(4)("drawing the requested 3D-Models if found.\n"); 175 177 Group* walker = this->firstGroup; 176 178 while (walker != NULL) … … 178 180 if (!strcmp(walker->name, groupName)) 179 181 { 180 PRINTF( 2)("Drawing model %s\n", walker->name);182 PRINTF(4)("Drawing model %s\n", walker->name); 181 183 glCallList (walker->listNumber); 182 184 return; … … 184 186 walker = walker->next; 185 187 } 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); 187 189 return; 188 190 } … … 204 206 bool Model::initialize (void) 205 207 { 206 PRINTF( 2)("new 3D-Model is being created\n");208 PRINTF(4)("new 3D-Model is being created\n"); 207 209 208 210 this->name = NULL; … … 243 245 bool Model::initGroup(Group* group) 244 246 { 245 PRINTF( 3)("Adding new Group\n");247 PRINTF(4)("Adding new Group\n"); 246 248 group->name = ""; 247 249 group->faceMode = -1; … … 277 279 bool Model::cleanup(void) 278 280 { 279 PRINTF( 3)("cleaning up the 3D-Model to save Memory.\n");281 PRINTF(4)("cleaning up the 3D-Model to save Memory.\n"); 280 282 281 283 if (this->vertices) … … 296 298 bool Model::cleanupGroup (Group* group) 297 299 { 298 PRINTF( 3)("Cleaning up group\n");300 PRINTF(5)("Cleaning up group\n"); 299 301 if (group->firstFace != NULL) 300 302 { … … 314 316 bool Model::cleanupFace (Face* face) 315 317 { 316 PRINTF( 3)("Cleaning up Face\n");318 PRINTF(5)("Cleaning up Face\n"); 317 319 318 320 if (face->materialString != NULL) … … 355 357 bool Model::addGroup (char* groupString) 356 358 { 357 PRINTF( 3)("Read Group: %s.\n", groupString);359 PRINTF(5)("Read Group: %s.\n", groupString); 358 360 if (this->groupCount != 0 && this->currentGroup->faceCount>0) 359 361 { … … 384 386 float subbuffer3; 385 387 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); 387 389 this->vertices->addEntry(subbuffer1*scaleFactor, subbuffer2*scaleFactor, subbuffer3*scaleFactor); 388 390 return true; … … 398 400 bool Model::addVertex(const float x, const float y, const float z) 399 401 { 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); 401 403 this->vertices->addEntry(x*scaleFactor, y*scaleFactor, z*scaleFactor); 402 404 return true; … … 513 515 float subbuffer3; 514 516 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); 516 518 this->normals->addEntry(subbuffer1, subbuffer2, subbuffer3); 517 519 return true; … … 544 546 float subbuffer2; 545 547 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); 547 549 this->vTexture->addEntry(subbuffer1); 548 550 this->vTexture->addEntry(subbuffer2); … … 610 612 if ((this->currentGroup->listNumber = glGenLists(1)) == 0) 611 613 { 612 PRINTF( 1)("list could not be created for this Model\n");614 PRINTF(2)("glList could not be created for this Model\n"); 613 615 return false; 614 616 } … … 628 630 { 629 631 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); 631 633 } 632 634 else 633 PRINTF( 1)("material %s not found.\n", tmpFace->materialString);635 PRINTF(2)("material %s not found.\n", tmpFace->materialString); 634 636 635 637 … … 646 648 647 649 this->currentGroup->faceMode = 3; 648 PRINTF( 3)("found triag.\n");650 PRINTF(5)("found triag.\n"); 649 651 } 650 652 … … 658 660 } 659 661 this->currentGroup->faceMode = 4; 660 PRINTF( 3)("found quad.\n");662 PRINTF(5)("found quad.\n"); 661 663 } 662 664 … … 666 668 glEnd(); 667 669 glBegin(GL_POLYGON); 668 PRINTF( 3)("Polygon with %i faces found.", tmpFace->vertexCount);670 PRINTF(5)("Polygon with %i faces found.", tmpFace->vertexCount); 669 671 this->currentGroup->faceMode = tmpFace->vertexCount; 670 672 } … … 698 700 bool Model::addGLElement (FaceElement* elem) 699 701 { 700 PRINTF( 3)("importing grafical Element to openGL.\n");702 PRINTF(5)("importing grafical Element to openGL.\n"); 701 703 702 704 if (elem->texCoordNumber != -1) … … 721 723 { 722 724 723 PRINTF( 2)("Normals are being calculated.\n");725 PRINTF(4)("Normals are being calculated.\n"); 724 726 725 727 Vector* normArray = new Vector [vertices->getCount()/3]; … … 778 780 { 779 781 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); 781 783 782 784 this->normals->addEntry(normArray[i].x, normArray[i].y, normArray[i].z); … … 881 883 //printf ("%f %f\n", vz, sin (vz)); 882 884 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)); 884 886 } 885 887 } -
orxonox/branches/levelloader/src/lib/graphics/importer/objModel.cc
r3542 r3605 13 13 co-programmer: ... 14 14 */ 15 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER 15 17 16 18 #include "objModel.h" … … 86 88 bool OBJModel::importFile (const char* fileName) 87 89 { 88 PRINTF( 3)("preparing to read in file: %s\n", fileName);90 PRINTF(4)("preparing to read in file: %s\n", fileName); 89 91 90 92 … … 107 109 strncpy(this->objPath, fileName, name-fileName); 108 110 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); 114 115 115 116 this->setName(name); … … 144 145 return false; 145 146 } 146 PRINTF( 2)("Reading from opened file %s\n", fileName);147 PRINTF(4)("Reading from opened file %s\n", fileName); 147 148 char Buffer[10000]; 148 149 while(!OBJ_FILE->eof()) 149 150 { 150 151 OBJ_FILE->getline(Buffer, 10000); 151 PRINTF( 3)("Read input line: %s\n", Buffer);152 PRINTF(5)("Read input line: %s\n", Buffer); 152 153 153 154 … … 192 193 else if (!strncmp(Buffer, "s ", 2)) //! \todo smoothing groups have to be implemented 193 194 { 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); 196 196 } 197 197 } … … 221 221 222 222 223 PRINTF( 3)("Opening mtlFile: %s\n", fileName);223 PRINTF(4)("Opening mtlFile: %s\n", fileName); 224 224 225 225 ifstream* MTL_FILE = new ifstream (fileName); 226 226 if (MTL_FILE->fail()) 227 227 { 228 PRINTF( 1)("unable to open file: %s\n", fileName);228 PRINTF(2)("unable to open file: %s\n", fileName); 229 229 MTL_FILE->close(); 230 230 delete []fileName; … … 237 237 { 238 238 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); 240 240 241 241 -
orxonox/branches/levelloader/src/lib/graphics/importer/texture.cc
r3499 r3605 17 17 */ 18 18 19 20 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER 19 21 20 22 #include "texture.h" … … 87 89 if (pName[0] == '\0') 88 90 { 89 PRINTF( 3)("not Adding empty Path to the List.\n");91 PRINTF(2)("not Adding empty Path to the List.\n"); 90 92 return; 91 93 } … … 99 101 if (status.st_mode & S_IFDIR) 100 102 { 101 PRINTF( 2)("Adding Path %s to the PathList.\n", pName);103 PRINTF(4)("Adding Path %s to the PathList.\n", pName); 102 104 PathList* tmpPathList = this; 103 105 while (tmpPathList->next) … … 193 195 bool Texture::loadTexToGL (Image* pImage) 194 196 { 195 PRINTF( 2)("Loading texture to OpenGL-Environment.\n");197 PRINTF(4)("Loading texture to OpenGL-Environment.\n"); 196 198 glGenTextures(1, &this->texture); 197 199 glBindTexture(GL_TEXTURE_2D, this->texture); … … 229 231 pImage->format = GL_RGBA; 230 232 231 PRINTF(0)("Bits Per Pixel: %d\n", pImage->bpp);232 233 if( !IMG_isPNG(SDL_RWFromFile(imgNameWithPath, "rb")) && !IMG_isJPG(SDL_RWFromFile(imgNameWithPath, "rb"))) 233 234 for (int i=0;i<map->h * map->w *3;i+=3) … … 249 250 else 250 251 { 251 PRINTF( 1)("Image not Found: %s\n", imgNameWithPath);252 PRINTF(2)("Image not Found: %s\n", imgNameWithPath); 252 253 return false; 253 254 } … … 268 269 if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".bmp", 4)) 269 270 { 270 PRINTF( 3)("Requested bmp-image. Trying to Import.\n");271 PRINTF(4)("Requested bmp-image. Trying to Import.\n"); 271 272 return this->loadBMP(imgNameWithPath); 272 273 } … … 274 275 else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".jpg", 4) || !strncmp(imgNameWithPath+strlen(imgNameWithPath)-5, ".jpg", 5)) 275 276 { 276 PRINTF( 3)("Requested jpeg-image. Trying to Import\n");277 PRINTF(4)("Requested jpeg-image. Trying to Import\n"); 277 278 return this->loadJPG(imgNameWithPath); 278 279 } 279 280 else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".tga", 4)) 280 281 { 281 PRINTF( 3)("Requested tga-image. Trying to Import\n");282 PRINTF(4)("Requested tga-image. Trying to Import\n"); 282 283 return this->loadTGA(imgNameWithPath); 283 284 } 284 285 else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".png", 4)) 285 286 { 286 PRINTF( 3)("Requested png-image. Trying to Import\n");287 PRINTF(4)("Requested png-image. Trying to Import\n"); 287 288 return this->loadPNG(imgNameWithPath); 288 289 } 289 290 else 290 291 { 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); 292 293 return false; 293 294 } … … 295 296 else 296 297 { 297 PRINTF( 1)("Image not Found: %s\n", imgNameWithPath);298 PRINTF(2)("Image not Found: %s\n", imgNameWithPath); 298 299 return false; 299 300 } … … 316 317 if ((file = fopen(bmpName, "rb"))==NULL) 317 318 { 318 PRINTF( 1)("File Not Found : %s\n",bmpName);319 PRINTF(2)("File Not Found : %s\n",bmpName); 319 320 return false; 320 321 } … … 325 326 if ((i = fread(&pImage->width, 4, 1, file)) != 1) 326 327 { 327 PRINTF( 1)("Error reading width from %s.\n", bmpName);328 PRINTF(2)("Error reading width from %s.\n", bmpName); 328 329 return false; 329 330 } … … 331 332 if ((i = fread(&pImage->height, 4, 1, file)) != 1) 332 333 { 333 PRINTF( 1)("Error reading height from %s.\n", bmpName);334 PRINTF(2)("Error reading height from %s.\n", bmpName); 334 335 return false; 335 336 } … … 341 342 if ((fread(&planes, 2, 1, file)) != 1) 342 343 { 343 PRINTF( 1)("Error reading planes from %s.\n", bmpName);344 PRINTF(2)("Error reading planes from %s.\n", bmpName); 344 345 return false; 345 346 } … … 353 354 if ((i = fread(&bpp, 2, 1, file)) != 1) 354 355 { 355 PRINTF( 1)("Error reading bpp from %s.\n", bmpName);356 PRINTF(2)("Error reading bpp from %s.\n", bmpName); 356 357 return false; 357 358 } 358 359 if (bpp != 24) 359 360 { 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); 361 362 return false; 362 363 } … … 369 370 if (pImage->data == NULL) 370 371 { 371 PRINTF( 1)("Error allocating memory for color-corrected image data");372 PRINTF(2)("Error allocating memory for color-corrected image data"); 372 373 return false; 373 374 } … … 375 376 if ((i = fread(pImage->data, size, 1, file)) != 1) 376 377 { 377 PRINTF( 1)("Error reading image data from %s.\n", bmpName);378 PRINTF(2)("Error reading image data from %s.\n", bmpName); 378 379 return false; 379 380 } … … 418 419 { 419 420 // 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); 421 422 return false; 422 423 } … … 521 522 if(fTGA == NULL) 522 523 { 523 PRINTF( 1)("Error could not open texture file: %s\n", tgaName);524 PRINTF(2)("Error could not open texture file: %s\n", tgaName); 524 525 return false; 525 526 } … … 527 528 if(fread(&tgaHeader, sizeof(TGAHeader), 1, fTGA) == 0) 528 529 { 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); 530 531 if(fTGA != NULL) 531 532 { … … 549 550 else 550 551 { 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"); 552 553 if (fTGA) 553 554 fclose(fTGA); … … 576 577 if(fread(header, sizeof(header), 1, fTGA) == 0) 577 578 { 578 PRINTF( 1)("Error could not read info header\n");579 PRINTF(2)("Error could not read info header\n"); 579 580 return false; 580 581 } … … 586 587 if((pImage->width <= 0) || (pImage->height <= 0) || ((pImage->bpp != 24) && (pImage->bpp !=32))) 587 588 { 588 PRINTF( 1)("Error invalid texture information\n");589 PRINTF(2)("Error invalid texture information\n"); 589 590 return false; 590 591 } … … 605 606 if(pImage->data == NULL) 606 607 { 607 PRINTF( 1)("Error could not allocate memory for image\n");608 PRINTF(2)("Error could not allocate memory for image\n"); 608 609 return false; 609 610 } … … 611 612 if(fread(pImage->data, 1, imageSize, fTGA) != imageSize) 612 613 { 613 PRINTF( 1)("Error could not read image data\n");614 PRINTF(2)("Error could not read image data\n"); 614 615 if(pImage->data != NULL) 615 616 { … … 648 649 if(fread(header, sizeof(header), 1, fTGA) == 0) 649 650 { 650 PRINTF( 1)("Error could not read info header\n");651 PRINTF(2)("Error could not read info header\n"); 651 652 return false; 652 653 } … … 664 665 if((pImage->width <= 0) || (pImage->height <= 0) || ((pImage->bpp != 24) && (pImage->bpp !=32))) 665 666 { 666 PRINTF( 1)("Error Invalid pImage information\n");667 PRINTF(2)("Error Invalid pImage information\n"); 667 668 return false; 668 669 } … … 674 675 if(pImage->data == NULL) 675 676 { 676 PRINTF( 1)("Error could not allocate memory for image\n");677 PRINTF(2)("Error could not allocate memory for image\n"); 677 678 return false; 678 679 } … … 684 685 if(fread(&chunkheader, sizeof(GLubyte), 1, fTGA) == 0) 685 686 { 686 PRINTF( 1)("Error could not read RLE header\n");687 PRINTF(2)("Error could not read RLE header\n"); 687 688 if(pImage->data != NULL) 688 689 { … … 702 703 if(fread(colorbuffer, 1, bytesPerPixel, fTGA) != bytesPerPixel) 703 704 { 704 PRINTF( 1)("Error could not read image data\n");705 PRINTF(2)("Error could not read image data\n"); 705 706 if(colorbuffer != NULL) 706 707 { … … 732 733 if(currentpixel > pixelcount) 733 734 { 734 PRINTF( 1)("Error too many pixels read\n");735 PRINTF(2)("Error too many pixels read\n"); 735 736 if(colorbuffer != NULL) 736 737 { … … 754 755 if(fread(colorbuffer, 1, bytesPerPixel, fTGA) != bytesPerPixel) // Attempt to read following color values 755 756 { 756 PRINTF( 1)("Error could not read from file");757 PRINTF(2)("Error could not read from file"); 757 758 if(colorbuffer != NULL) 758 759 { … … 785 786 if(currentpixel > pixelcount) 786 787 { 787 PRINTF( 1)("Error too many pixels read\n");788 PRINTF(2)("Error too many pixels read\n"); 788 789 if(colorbuffer != NULL) 789 790 { -
orxonox/branches/levelloader/src/lib/graphics/importer/texture.h
r3499 r3605 10 10 #define _TEXTURE_H 11 11 12 #include "stdincl.h" 12 #include "glincl.h" 13 14 #include "debug.h" 15 13 16 #ifdef HAVE_SDL_SDL_IMAGE_H 14 17 #include <SDL/SDL_image.h> -
orxonox/branches/levelloader/src/lib/graphics/importer/windowHandler.h
r3499 r3605 7 7 #ifndef _WINDOWHANDLER_H 8 8 #define _WINDOWHANDLER_H 9 10 extern int verbose;11 9 12 10 #include "stdincl.h" -
orxonox/branches/levelloader/src/lib/gui/Makefile.in
r3563 r3605 1 # Makefile.in generated by automake 1.8. 2from Makefile.am.1 # Makefile.in generated by automake 1.8.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 78 78 DEFS = @DEFS@ 79 79 DEPDIR = @DEPDIR@ 80 DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@ 81 DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@ 80 82 DOXYGEN = @DOXYGEN@ 81 83 DOXYGEN_FALSE = @DOXYGEN_FALSE@ … … 177 179 esac; \ 178 180 done; \ 179 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/gui/Makefile'; \181 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/gui/Makefile'; \ 180 182 cd $(top_srcdir) && \ 181 $(AUTOMAKE) -- gnusrc/lib/gui/Makefile183 $(AUTOMAKE) --foreign src/lib/gui/Makefile 182 184 .PRECIOUS: Makefile 183 185 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status … … 272 274 tags=; \ 273 275 here=`pwd`; \ 274 if ( etags--etags-include --version) >/dev/null 2>&1; then \276 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ 275 277 include_option=--etags-include; \ 278 empty_fix=.; \ 276 279 else \ 277 280 include_option=--include; \ 281 empty_fix=; \ 278 282 fi; \ 279 283 list='$(SUBDIRS)'; for subdir in $$list; do \ 280 284 if test "$$subdir" = .; then :; else \ 281 test -f $$subdir/TAGS &&\285 test ! -f $$subdir/TAGS || \ 282 286 tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ 283 287 fi; \ … … 289 293 $(AWK) ' { files[$$0] = 1; } \ 290 294 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 294 300 ctags: CTAGS 295 301 CTAGS: 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. 2from Makefile.am.1 # Makefile.in generated by automake 1.8.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 50 50 CONFIG_HEADER = $(top_builddir)/config.h 51 51 CONFIG_CLEAN_FILES = 52 am__installdirs = $(DESTDIR)$(bindir)52 am__installdirs = "$(DESTDIR)$(bindir)" 53 53 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) 54 54 PROGRAMS = $(bin_PROGRAMS) … … 96 96 DEFS = @DEFS@ 97 97 DEPDIR = @DEPDIR@ 98 DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@ 99 DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@ 98 100 DOXYGEN = @DOXYGEN@ 99 101 DOXYGEN_FALSE = @DOXYGEN_FALSE@ … … 203 205 esac; \ 204 206 done; \ 205 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/gui/console/Makefile'; \207 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/gui/console/Makefile'; \ 206 208 cd $(top_srcdir) && \ 207 $(AUTOMAKE) -- gnusrc/lib/gui/console/Makefile209 $(AUTOMAKE) --foreign src/lib/gui/console/Makefile 208 210 .PRECIOUS: Makefile 209 211 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status … … 225 227 install-binPROGRAMS: $(bin_PROGRAMS) 226 228 @$(NORMAL_INSTALL) 227 $(mkdir_p) $(DESTDIR)$(bindir)229 test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" 228 230 @list='$(bin_PROGRAMS)'; for p in $$list; do \ 229 231 p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ … … 231 233 ; then \ 232 234 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; \ 235 237 else :; fi; \ 236 238 done … … 240 242 @list='$(bin_PROGRAMS)'; for p in $$list; do \ 241 243 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"; \ 244 246 done 245 247 … … 297 299 $(AWK) ' { files[$$0] = 1; } \ 298 300 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 302 306 ctags: CTAGS 303 307 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ … … 354 358 all-am: Makefile $(PROGRAMS) $(HEADERS) 355 359 installdirs: 356 $(mkdir_p) $(DESTDIR)$(bindir) 360 for dir in "$(DESTDIR)$(bindir)"; do \ 361 test -z "$$dir" || $(mkdir_p) "$$dir"; \ 362 done 357 363 install: install-am 358 364 install-exec: install-exec-am -
orxonox/branches/levelloader/src/lib/gui/gui/Makefile.in
r3563 r3605 1 # Makefile.in generated by automake 1.8. 2from Makefile.am.1 # Makefile.in generated by automake 1.8.5 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 50 50 CONFIG_HEADER = $(top_builddir)/config.h 51 51 CONFIG_CLEAN_FILES = 52 am__installdirs = $(DESTDIR)$(bindir)52 am__installdirs = "$(DESTDIR)$(bindir)" 53 53 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) 54 54 PROGRAMS = $(bin_PROGRAMS) … … 105 105 DEFS = @DEFS@ 106 106 DEPDIR = @DEPDIR@ 107 DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@ 108 DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@ 107 109 DOXYGEN = @DOXYGEN@ 108 110 DOXYGEN_FALSE = @DOXYGEN_FALSE@ … … 236 238 esac; \ 237 239 done; \ 238 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/lib/gui/gui/Makefile'; \240 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/gui/gui/Makefile'; \ 239 241 cd $(top_srcdir) && \ 240 $(AUTOMAKE) -- gnusrc/lib/gui/gui/Makefile242 $(AUTOMAKE) --foreign src/lib/gui/gui/Makefile 241 243 .PRECIOUS: Makefile 242 244 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status … … 258 260 install-binPROGRAMS: $(bin_PROGRAMS) 259 261 @$(NORMAL_INSTALL) 260 $(mkdir_p) $(DESTDIR)$(bindir)262 test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" 261 263 @list='$(bin_PROGRAMS)'; for p in $$list; do \ 262 264 p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ … … 264 266 ; then \ 265 267 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; \ 268 270 else :; fi; \ 269 271 done … … 273 275 @list='$(bin_PROGRAMS)'; for p in $$list; do \ 274 276 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"; \ 277 279 done 278 280 … … 336 338 $(AWK) ' { files[$$0] = 1; } \ 337 339 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 341 345 ctags: CTAGS 342 346 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ … … 393 397 all-am: Makefile $(PROGRAMS) $(HEADERS) 394 398 installdirs: 395 $(mkdir_p) $(DESTDIR)$(bindir) 399 for dir in "$(DESTDIR)$(bindir)"; do \ 400 test -z "$$dir" || $(mkdir_p) "$$dir"; \ 401 done 396 402 install: install-am 397 403 install-exec: install-exec-am -
orxonox/branches/levelloader/src/lib/gui/gui/orxonox_gui_gtk.h
r3499 r3605 9 9 #include <config.h> 10 10 #endif 11 12 //! verbose level, soon obsolete13 extern int verbose; // soon obsolete here14 11 15 12 #include "debug.h" -
orxonox/branches/levelloader/src/lib/lang/base_object.cc
r3499 r3605 26 26 \brief standard constructor 27 27 */ 28 BaseObject::BaseObject () {} 28 BaseObject::BaseObject () 29 { 30 this->className = NULL; 31 } 29 32 30 33 … … 32 35 \brief standard deconstructor 33 36 */ 34 BaseObject::~BaseObject () {} 35 37 BaseObject::~BaseObject () 38 { 39 delete []this->className; 40 } 36 41 37 42 void BaseObject::setClassName (char* className) 38 43 { 39 this->className = className; 44 this->className = new char[strlen(className)+1]; 45 strcpy(this->className, className); 40 46 } 41 47 -
orxonox/branches/levelloader/src/lib/lang/base_object.h
r3499 r3605 15 15 public: 16 16 BaseObject (); 17 ~BaseObject ();17 virtual ~BaseObject (); 18 18 19 19 void setClassName (char* className); -
orxonox/branches/levelloader/src/lib/math/curve.cc
r3499 r3605 19 19 local-Time implementation 20 20 NURBS 21 tList implementation 21 22 22 23 */ 23 24 25 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_MATH 26 24 27 #include "curve.h" 25 #include "matrix.h" 28 26 29 #include "debug.h" 27 30 28 31 #include <math.h> 29 32 #include <stdio.h> 33 34 35 /** 36 \brief default constructor for a Curve 37 */ 38 Curve::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 } 30 48 31 49 /** … … 131 149 this->derivation = 0; 132 150 dirCurve = new BezierCurve(1); 133 this->init();134 151 } 135 152 … … 141 158 this->derivation = derivation; 142 159 dirCurve=NULL; 143 this->init();144 160 } 145 161 … … 161 177 if (dirCurve) 162 178 delete dirCurve; 163 }164 165 /**166 \brief Initializes a BezierCurve167 */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;179 179 } 180 180 … … 285 285 return curvePoint; 286 286 } 287 288 289 290 ///////////////////////////////////291 //// Uniform Point curve /////////292 ///////////////////////////////////293 /**294 \brief Creates a new UPointCurve295 */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 degree304 */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 nodes316 */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 UPointCurve333 */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 UPointCurve349 350 \todo very bad algorithm351 */352 void UPointCurve::rebuild(void)353 {354 // rebuilding the Curve itself355 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 curve396 \param t The position on the Curve (0<=t<=1)397 \return the Position on the Path398 */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 rotations446 \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 Curve457 \return a Vector to the calculated position458 */459 Vector UPointCurve::getPos(void) const460 {461 return curvePoint;462 } -
orxonox/branches/levelloader/src/lib/math/curve.h
r3499 r3605 13 13 14 14 //! An Enumerator that defines what sort of Curves are availible 15 enum CurveType {BEZIERCURVE , UPOINTCURVE};15 enum CurveType {BEZIERCURVE}; 16 16 17 17 … … 38 38 PathNode* currentNode; //!< The node we are working with (the Last node). 39 39 40 40 41 private: 41 42 virtual void rebuild(void) = 0; 42 43 public: 44 Curve(void); 45 43 46 Curve* dirCurve; //!< The derivation-curve of this Curve. 44 47 void addNode(const Vector& newNode); … … 68 71 BezierCurve(void); 69 72 BezierCurve(int derivation); 70 ~BezierCurve(void); 71 void init(void); 73 virtual ~BezierCurve(void); 72 74 73 75 Vector calcPos(float t); … … 91 93 }; 92 94 93 //! Uniform Point Curve-class94 /**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 Curve101 {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 118 95 #endif /* _CURVE_H */ -
orxonox/branches/levelloader/src/lib/math/vector.cc
r3499 r3605 19 19 */ 20 20 21 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_MATH 21 22 22 23 #include "vector.h" 23 24 #include "debug.h" 24 25 25 26 using namespace std; … … 201 202 } 202 203 203 204 204 /** 205 205 \brief calculate the angle between two vectors in radiances … … 225 225 f = acos( v1 * v2 / (v1.len() * v2.len())); 226 226 return f * 180 / PI; 227 } 228 229 230 /** 231 \brief Outputs the values of the Vector 232 */ 233 void 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"); 227 239 } 228 240 … … 581 593 582 594 /** 595 \brief outputs some nice formated debug information about this quaternion 596 */ 597 void 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 /** 583 604 \brief create a rotation from a vector 584 605 \param v: a vector -
orxonox/branches/levelloader/src/lib/math/vector.h
r3499 r3605 41 41 Vector* getNormalized(); 42 42 Vector abs(); 43 44 void debug(); 43 45 }; 44 46 … … 53 55 { 54 56 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(); 76 79 private: 77 80 float DELTA; //!< resolution of calculation 78 81 79 82 }; -
orxonox/branches/levelloader/src/lib/util/list.h
r3499 r3605 86 86 T* enumerate(); 87 87 T* nextElement(); 88 T* nextElement(T* toEntity); 88 89 T* toArray(); 89 90 void debug(); … … 101 102 template<class T> 102 103 tList<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 104 118 105 119 template<class T> 106 120 void tList<T>::add(T* entity) 107 121 { 122 if( entity == NULL) return; 108 123 listElement* el = new listElement; 109 124 el->prev = this->last; … … 113 128 this->last = el; 114 129 115 if( this->size == 0) this->first = el;130 if(el->prev == NULL) this->first = el; /* if first element */ 116 131 else el->prev->next = el; 117 132 this->size++; … … 122 137 void tList<T>::remove(T* entity) 123 138 { 139 if( entity == NULL) return; 124 140 this->currentEl = this->first; 125 141 listElement* te; … … 134 150 else this->currentEl->next->prev = this->currentEl->prev; 135 151 136 te = this->currentEl->next; 152 te = this->currentEl->next; // for what am i doing this? 137 153 delete this->currentEl; 138 154 this->currentEl = te; 155 this->size--; 139 156 return; 140 157 } … … 151 168 { 152 169 listElement* le = this->currentEl->next; 153 delete this->currentEl->curr;170 //delete this->currentEl->curr; 154 171 delete this->currentEl; 155 172 this->currentEl = le; … … 185 202 T* tList<T>::enumerate() 186 203 { 204 //if( this->last == this->first == NULL) return NULL; 187 205 if(this->size == 0) return NULL; 188 206 this->currentEl = this->first; … … 194 212 T* tList<T>::nextElement() 195 213 { 214 // if( this->last == this->first == NULL) return NULL; 196 215 if(this->size == 0) return NULL; 197 216 this->currentEl = this->currentEl->next; … … 201 220 202 221 222 /** 223 \brief this returns the next element after toEntity or the first if toEntity is last 224 */ 225 template<class T> 226 T* 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 203 242 template<class T> 204 243 T* tList<T>::toArray() -
orxonox/branches/levelloader/src/orxonox.cc
r3542 r3605 31 31 #include "game_loader.h" 32 32 #include <string.h> 33 int verbose ;33 int verbose = 4; 34 34 35 35 using namespace std; … … 54 54 if( resources != NULL) delete resources; 55 55 } 56 57 56 58 57 /** \brief this is a singleton class to prevent duplicates */ … … 173 172 // SDL_WM_SetIcon(SDL_Surface *icon, Uint8 *mask); 174 173 175 // OpenGL stuff176 glClearColor (0.0, 0.0, 0.0, 0.0);177 glEnable (GL_DEPTH_TEST);178 179 174 return 0; 180 175 } -
orxonox/branches/levelloader/src/orxonox.conf
r2636 r3605 5 5 RIGHT=right 6 6 SPACE=fire 7 m=mode 7 8 ESCAPE=quit 8 9 p=pause … … 10 11 BUTTON_LEFT=fire 11 12 BUTTON_RIGHT=altfire 12 b=benscho13 13 x=up_world 14 14 z=down_world -
orxonox/branches/levelloader/src/orxonox.h
r3499 r3605 24 24 static Orxonox* singletonRef; 25 25 Orxonox (); 26 ~Orxonox ();27 26 virtual ~Orxonox (); 27 28 28 char configfilename[256]; //!< Filename of the configuration-file. 29 29 World* world; //!< Reference to the current running world. -
orxonox/branches/levelloader/src/proto_class.cc
r3365 r3605 16 16 */ 17 17 18 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY 18 19 19 20 #include "proto_class.h" 20 21 22 #include "stdincl.h" // maybe 21 23 22 24 using namespace std; … … 35 37 /** 36 38 \brief standard deconstructor 37 \todo this deconstructor is not jet implemented - do it38 39 39 40 */ 40 ProtoClass::~ProtoClass () {} 41 41 ProtoClass::~ProtoClass () 42 { 43 // delete what has to be deleted here 44 } 42 45 43 46 /** -
orxonox/branches/levelloader/src/proto_class.h
r3365 r3605 11 11 #define _PROTO_CLASS_H 12 12 13 #include "stdincl.h" 13 #include "what realy has to be included" 14 #include "base_object.h" 15 16 // FORWARD DEFINITION \\ 17 class someClassWeNeed; 18 14 19 15 20 /*class Test;*/ /* forward definition of class Test (without including it here!)*/ … … 22 27 23 28 public: 24 ProtoClass 25 ~ProtoClass();29 ProtoClass(); 30 virtual ~ProtoClass(); 26 31 27 32 bool doNonSense (int nothing); -
orxonox/branches/levelloader/src/story_entities/campaign.h
r3557 r3605 14 14 Campaign (); 15 15 Campaign ( TiXmlElement* root); 16 ~Campaign ();16 virtual ~Campaign (); 17 17 18 18 StoryEntity* currentEntity; -
orxonox/branches/levelloader/src/story_entities/world.cc
r3604 r3605 14 14 co-programmer: Christian Meyer 15 15 */ 16 17 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD 16 18 17 19 #include "world.h" … … 22 24 #include "camera.h" 23 25 #include "environment.h" 26 #include "primitive.h" 24 27 #include "p_node.h" 25 28 #include "null_parent.h" … … 31 34 #include "factory.h" 32 35 #include "game_loader.h" 36 #include "track_node.h" 37 #include "terrain.h" 33 38 34 39 using namespace std; … … 79 84 World::World (char* name) 80 85 { 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(); 85 88 } 86 89 … … 91 94 World::World (int worldID) 92 95 { 93 this->debugWorldNr = worldID; 94 this->worldName = NULL; 95 this->entities = new tList<WorldEntity>(); 96 this->init(NULL, worldID); 96 97 } 97 98 … … 104 105 World::~World () 105 106 { 106 printf("World::~World() - deleting current world\n");107 PRINTF(3)("World::~World() - deleting current world\n"); 107 108 CommandNode* cn = Orxonox::getInstance()->getLocalInput(); 108 109 cn->unbind(this->localPlayer); 109 110 cn->reset(); 110 111 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 } 114 117 if( this->worldName) delete this->worldName; 115 118 if( this->path) delete this->path; 116 119 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 */ 123 void 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 136 134 } 137 135 … … 142 140 ErrorMessage World::load() 143 141 { 142 <<<<<<< .working 144 143 145 144 PRINTF0("> Loading world: '%s'\n", getPath()); … … 156 155 // load the campaign document 157 156 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 158 239 { 240 <<<<<<< .working 159 241 // report an error 160 242 PRINTF0("Error loading XML File: %s @ %d:%d\n", XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol()); … … 234 316 PRINTF0("Done loading Track\n"); 235 317 } 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 236 331 237 332 … … 265 360 this->localPlayer->addChild (this->localCamera); 266 361 362 <<<<<<< .working 267 363 268 364 // stuff beyond this point remains to be loaded properly … … 270 366 /*monitor progress*/ 271 367 // 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 273 395 // 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); 275 400 276 401 /*monitor progress*/ … … 279 404 // trackManager->setBindSlave(env); 280 405 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 281 485 // initialize debug coord system 282 486 objectList = glGenLists(1); 283 487 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 455 489 trackManager->drawGraph(.01); 456 490 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 */467 491 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); 481 496 482 497 } … … 492 507 cn->enable(true); 493 508 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()); 509 PRINTF0("> Done Loading world: '%s'\n", getPath()); 502 510 } 503 511 … … 508 516 ErrorMessage World::start() 509 517 { 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); 511 519 this->bQuitOrxonox = false; 512 520 this->bQuitCurrentGame = false; … … 521 529 ErrorMessage World::stop() 522 530 { 523 printf("World::stop() - got stop signal\n");531 PRINTF(3)("World::stop() - got stop signal\n"); 524 532 this->bQuitCurrentGame = true; 525 533 } … … 546 554 ErrorMessage World::destroy() 547 555 { 548 delete trackManager; 556 549 557 } 550 558 … … 554 562 void World::displayLoadScreen () 555 563 { 556 printf("World::displayLoadScreen - start\n");564 PRINTF(3)("World::displayLoadScreen - start\n"); 557 565 558 566 //GLMenuImageScreen* … … 562 570 this->glmis->draw(); 563 571 564 printf("World::displayLoadScreen - end\n");572 PRINTF(3)("World::displayLoadScreen - end\n"); 565 573 } 566 574 … … 572 580 void World::releaseLoadScreen () 573 581 { 574 printf("World::releaseLoadScreen - start\n");582 PRINTF(3)("World::releaseLoadScreen - start\n"); 575 583 this->glmis->setValue(this->glmis->getMaximum()); 576 584 SDL_Delay(500); 577 printf("World::releaseLoadScreen - end\n");585 PRINTF(3)("World::releaseLoadScreen - end\n"); 578 586 } 579 587 … … 629 637 /* draw entities */ 630 638 WorldEntity* entity; 639 glLoadIdentity(); 640 631 641 entity = this->entities->enumerate(); 632 642 while( entity != NULL ) … … 642 652 testFont->printText(0, 0, 1, "orxonox_" PACKAGE_VERSION); 643 653 654 lightMan->draw(); // must be at the end of the drawing procedure, otherwise Light cannot be handled as PNodes // 644 655 } 645 656 … … 651 662 void World::debug() 652 663 { 653 printf ("World::debug() - starting debug\n");664 PRINTF(2)("debug() - starting debug\n"); 654 665 PNode* p1 = NullParent::getInstance (); 655 666 PNode* p2 = new PNode (new Vector(2, 2, 2), p1); … … 670 681 p4->debug (); 671 682 672 p1->update ( 1);683 p1->update (); 673 684 674 685 printf ("World::debug() - update\n"); … … 679 690 680 691 p2->shiftCoor (new Vector(-1, -1, -1)); 681 p1->update ( 2);692 p1->update (); 682 693 683 694 p1->debug (); … … 689 700 690 701 691 p1->update ( 2);702 p1->update (); 692 703 693 704 p1->debug (); … … 696 707 p4->debug (); 697 708 698 p1->destroy ();709 delete p1; 699 710 700 711 … … 726 737 while( !this->bQuitOrxonox && !this->bQuitCurrentGame) /* \todo implement pause */ 727 738 { 739 PRINTF(3)("World::mainloop() - number of entities: %i\n", this->entities->getSize()); 728 740 // Network 729 741 this->synchronize (); … … 731 743 this->handleInput (); 732 744 if( this->bQuitCurrentGame || this->bQuitOrxonox) 733 {734 printf("World::mainLoop() - leaving loop earlier...\n");735 745 break; 736 }737 746 // Process time 738 this->timeSlice (); 747 this->tick (); 748 // Update the state 749 this->update (); 739 750 // Process collision 740 751 this->collide (); 741 752 // Draw 742 753 this->display (); 743 744 for( int i = 0; i < 5000000; i++) {}754 755 // for( int i = 0; i < 5000000; i++) {} 745 756 /* \todo this is to slow down the program for openGl Software emulator computers, reimplement*/ 746 757 } 747 printf("World::mainLoop() - Exiting the main loop\n");758 PRINTF(3)("World::mainLoop() - Exiting the main loop\n"); 748 759 } 749 760 … … 781 792 a heart-beat. 782 793 */ 783 void World::ti meSlice()794 void World::tick () 784 795 { 785 796 Uint32 currentFrame = SDL_GetTicks(); … … 791 802 { 792 803 float fps = 1000/dt; 793 printf("fps = %f\n", fps);804 PRINTF(3)("fps = %f\n", fps); 794 805 } 795 806 else … … 798 809 nothing. 799 810 */ 800 printf("fps = 1000 - frame rate is adjusted\n");811 PRINTF(2)("fps = 1000 - frame rate is adjusted\n"); 801 812 SDL_Delay(10); 802 813 dt = 10; … … 808 819 float seconds = dt / 1000.0; 809 820 assert( this->nullParent != NULL); 810 this->nullParent->update (seconds);811 821 entity = entities->enumerate(); 812 822 while( entity != NULL) … … 815 825 entity = entities->nextElement(); 816 826 } 817 //assert( skySphere != NULL);818 //skySphere->updatePosition(localCamera->absCoordinate);819 820 827 /* update tick the rest */ 821 828 assert( this->localCamera != NULL); 822 829 assert( this->trackManager != NULL); 823 this->localCamera->timeSlice(dt); 830 this->localCamera->tick(dt); 831 824 832 this->trackManager->tick(dt); 825 833 } 826 834 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 */ 844 void World::update() 845 { 846 this->nullParent->update (); 827 847 } 828 848 … … 856 876 void World::spawn(WorldEntity* entity) 857 877 { 858 if( this->nullParent != NULL && entity->parent == NULL)859 this->nullParent->addChild (entity);860 861 878 this->entities->add (entity); 862 863 879 entity->postSpawn (); 864 880 } … … 873 889 void World::spawn(WorldEntity* entity, Vector* absCoor, Quaternion* absDir) 874 890 { 891 this->entities->add (entity); 892 875 893 entity->setAbsCoor (absCoor); 876 894 entity->setAbsDir (absDir); 877 878 if( this->nullParent != NULL && entity->parent == NULL)879 this->nullParent->addChild (entity);880 881 this->entities->add (entity);882 895 883 896 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 */ 907 void 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 } 884 924 } 885 925 -
orxonox/branches/levelloader/src/story_entities/world.h
r3530 r3605 10 10 11 11 #include "story_entity.h" 12 #include "p_node.h" 12 13 13 14 class TrackManager; … … 17 18 class GLMenuImageScreen; 18 19 class Skysphere; 19 class Light ;20 class LightManager; 20 21 class FontSet; 22 class Terrain; 23 21 24 22 25 //! The game world … … 55 58 void spawn (WorldEntity* entity); 56 59 void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir); 60 void spawn(WorldEntity* entity, PNode* parentNode, Vector* relCoor, Quaternion* relDir, 61 int parentingMode); 62 57 63 58 64 void setPath( char* name); 59 65 char* getPath(); 60 66 67 private: 68 void init(char* name, int worldID); 61 69 62 private:63 70 Uint32 lastFrame; //!< last time of frame 64 71 bool bQuitOrxonox; //!< quit this application … … 74 81 75 82 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 Camera83 TrackManager* trackManager; //!< The reference of the TrackManager that handles the course through the Level. 84 Camera* localCamera; //!< The current Camera 78 85 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. 80 88 81 89 GLuint objectList; //!< temporary: \todo this will be ereased soon … … 87 95 void synchronize (); 88 96 void handleInput (); 89 void timeSlice (); 97 void tick (); 98 void update (); 90 99 void collide (); 91 100 void draw (); -
orxonox/branches/levelloader/src/track_manager.cc
r3562 r3605 14 14 */ 15 15 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_TRACK_MANAGER 16 17 17 18 #include "track_manager.h" … … 19 20 #include "p_node.h" 20 21 #include "substring.h" 22 23 #include "track_node.h" 21 24 22 25 #include <stdarg.h> … … 35 38 this->isJoined = false; 36 39 this->mainJoin = false; 37 this->cond; //!< todo think!!38 40 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; 41 43 this->endTime = 1; 42 44 this->jumpTime = 0; 43 this-> curveType = BEZIERCURVE;45 this->width = TMAN_DEFAULT_WIDTH; 44 46 this->nodeCount = 0; 45 47 this->childCount = 0; … … 47 49 this->curve = NULL; 48 50 this->children = NULL; 51 52 this->history = NULL; 53 54 this->condFunc = &TrackElement::random; 49 55 } 50 56 … … 61 67 if ((!this->isJoined &&this->childCount > 0) || (this->isJoined && this->mainJoin)) 62 68 { 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 } 65 75 delete this->children; 66 76 } … … 81 91 // search on. 82 92 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; 102 105 } 103 106 … … 116 119 // search on. 117 120 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 */ 141 bool 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 */ 163 TrackElement* 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 */ 179 void 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 */ 197 char* TrackElement::getName(void) const 198 { 199 return this->name; 200 } 201 202 /** 203 \brief prints out debug information about this TrackElement 204 */ 205 void 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 */ 250 int 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 */ 260 int 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 */ 270 int 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 */ 285 int 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 */ 306 int 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 //////////////////////// 133 336 /** 134 337 \brief standard constructor … … 137 340 TrackManager::TrackManager(void) 138 341 { 139 this->setClassName ("TrackManager"); 342 this->setClassName("TrackManager"); 343 344 TrackManager::singletonRef = this; 140 345 141 346 PRINTF(3)("Initializing the TrackManager\n"); … … 146 351 this->maxTime = 0; 147 352 this->trackElemCount = 1; 148 this-> bindSlave = NULL;353 this->setBindSlave(this->trackNode = new TrackNode()); 149 354 } 150 355 … … 152 357 /** 153 358 \brief standard destructor 154 155 359 */ 156 360 TrackManager::~TrackManager(void) … … 158 362 PRINTF(3)("Destruct TrackManager\n"); 159 363 160 PRINTF( 3)("Deleting all the TrackElements\n");364 PRINTF(4)("Deleting all the TrackElements\n"); 161 365 delete this->firstTrackElem; 162 366 // delete this->name; 163 367 164 368 // we do not have a TrackManager anymore 165 singletonRef = NULL; 166 } 167 369 TrackManager::singletonRef = NULL; 370 } 371 372 //! Singleton Reference to TrackManager 168 373 TrackManager* TrackManager::singletonRef = NULL; 169 374 … … 175 380 TrackManager* TrackManager::getInstance(void) 176 381 { 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; 181 385 } 182 386 … … 189 393 this->currentTrackElem->childCount = childCount; 190 394 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 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) 200 404 { 201 202 203 204 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 } 207 411 208 412 } 413 if (childCount == 1) 414 this->currentTrackElem->getChild(0)->setName(this->currentTrackElem->getName()); 209 415 } 210 416 … … 240 446 this->currentTrackElem = tmpElem; 241 447 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); 244 450 245 451 } … … 247 453 /** 248 454 \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. 250 457 */ 251 458 void TrackManager::setCurveType(CurveType curveType, TrackElement* trackElem) … … 256 463 return; 257 464 } 258 t rackElem->curveType = curveType;465 this->curveType = curveType; 259 466 switch (curveType) 260 467 { … … 262 469 trackElem->curve = new BezierCurve(); 263 470 break; 264 case UPOINTCURVE: 265 trackElem->curve = new UPointCurve(); 266 break; 471 267 472 } 268 473 } … … 297 502 if (trackElem->isFresh) 298 503 { 299 this->setCurveType( BEZIERCURVE, trackElem);504 this->setCurveType(TMAN_DEFAULT_CURVETYPE, trackElem); 300 505 trackElem->isFresh = false; 301 506 } … … 311 516 int TrackManager::addHotPoint(Vector newPoint) 312 517 { 313 printf("setting up a HotPoint\n");518 PRINTF(4)("setting up a HotPoint\n"); 314 519 if (this->currentTrackElem->isFresh) 315 520 { … … 322 527 this->currentTrackElem->nodeCount++; 323 528 this->initChildren(1); 324 this->currentTrackElem = this->currentTrackElem-> children[0];529 this->currentTrackElem = this->currentTrackElem->getChild(0); 325 530 } 326 531 … … 334 539 int TrackManager::setSavePoint(void) 335 540 { 336 printf("setting up a SavePoint.\n");541 PRINTF(4)("setting up a SavePoint.\n"); 337 542 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 } 339 547 this->currentTrackElem->isSavePoint = true; 340 548 this->currentTrackElem->isHotPoint = true; 341 549 342 550 this->initChildren(1); 343 this->currentTrackElem = this->currentTrackElem-> children[0];551 this->currentTrackElem = this->currentTrackElem->getChild(0); 344 552 } 345 553 … … 377 585 void TrackManager::forkV(unsigned int count, int* trackIDs, SubString* names) 378 586 { 379 printf("Forking with %d children\n", count);587 PRINTF(4)("Forking with %d children\n", count); 380 588 if (this->currentTrackElem->isSavePoint) 381 589 { … … 392 600 /** 393 601 \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 */ 605 void 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. 394 611 \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 */ 615 void 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 401 649 402 650 /** … … 430 678 void TrackManager::joinV(unsigned int count, int* trackIDs) 431 679 { 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"); 433 686 434 687 // chanching work-on to temporary value. going back at the end. … … 480 733 } 481 734 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 } 489 746 // returning to the TrackElement we were working on. 490 747 this->workOn(tmpCurrentWorkingID); … … 501 758 { 502 759 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) 506 765 { 507 766 508 767 // 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) - 511 770 tmpElem->curve->getNode(tmpElem->curve->getNodeCount()-1)) 512 771 ),2); 513 tmpElem->children[j]->nodeCount++;772 enumElem->nodeCount++; 514 773 // c2-continuity 515 tmpElem->children[j]->curve->addNode((tmpElem->curve->getNode(tmpElem->curve->getNodeCount())-774 enumElem->curve->addNode((tmpElem->curve->getNode(tmpElem->curve->getNodeCount())- 516 775 tmpElem->curve->getNode(tmpElem->curve->getNodeCount()-1)) * 4 + 517 776 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", 520 779 tmpElem->ID, tmpElem->nodeCount, 521 780 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(); 524 785 } 525 786 } 526 787 } 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 :/ 527 791 } 528 792 … … 536 800 Vector TrackManager::calcPos() const 537 801 { 538 // PRINTF(0)("TrackElement:%d, localTime: %f\n",this->currentTrackElem->ID, this->localTime);539 802 return this->currentTrackElem->curve->calcPos((this->localTime-this->currentTrackElem->startingTime)/this->currentTrackElem->duration); 540 803 } … … 550 813 551 814 /** 815 \returns the current Width of the track 816 */ 817 float TrackManager::getWidth(void) const 818 { 819 return this->currentTrackElem->width; 820 } 821 822 /** 552 823 \brief Advances the local-time of the Track around dt 553 824 \param dt The time about which to advance. … … 558 829 { 559 830 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); 561 832 if (this->localTime <= this->firstTrackElem->duration) 562 833 this->jumpTo(this->localTime); 563 this->localTime += dt; 834 if (this->localTime <= this->maxTime) 835 this->localTime += dt; 564 836 if (this->localTime > this->currentTrackElem->endTime 565 837 && this->currentTrackElem->children) 566 838 { 567 if (this->currentTrackElem->jumpTime > 0)839 if (this->currentTrackElem->jumpTime != 0.0) 568 840 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; 570 845 } 571 846 if (this->bindSlave) … … 573 848 Vector tmp = this->calcPos(); 574 849 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 575 855 this->bindSlave->setAbsCoor(&tmp); 576 856 this->bindSlave->setAbsDir(&quat); … … 594 874 /** 595 875 \brief a Function that decides which Path we should follow. 596 \param graphIDThe Path to choose.876 \param trackElem The Path to choose. 597 877 598 878 */ 599 void TrackManager::choosePath(int graphID)600 { 601 879 int TrackManager::choosePath(TrackElement* trackElem) 880 { 881 return (trackElem->*(trackElem->condFunc))(trackElem->subject); 602 882 } 603 883 … … 608 888 void TrackManager::setBindSlave(PNode* bindSlave) 609 889 { 610 if (!this->bindSlave) 611 this->bindSlave = bindSlave; 612 } 613 890 this->bindSlave = bindSlave; 891 } 892 893 /** 894 \returns the main TrackNode 895 */ 896 PNode* TrackManager::getTrackNode(void) 897 { 898 return this->trackNode; 899 } 614 900 615 901 // DEBUG // … … 646 932 void TrackManager::debug(unsigned int level) const 647 933 { 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); 652 940 if (level >= 2) 653 941 { … … 655 943 { 656 944 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"); 688 949 } 689 950 -
orxonox/branches/levelloader/src/track_manager.h
r3530 r3605 19 19 class TrackNamer; 20 20 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 27 27 28 28 //! A Graph-Element, that holds the curve-structure of a Level. … … 38 38 39 39 TrackElement* findByID(unsigned int trackID); 40 40 41 TrackElement* findByName(const char* trackName); 41 void setName( const char* trackName);42 42 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 43 50 bool isFresh; //!< If no Points where added until now 44 51 bool isHotPoint; //!< If the first node is a specialPoint; … … 47 54 bool isJoined; //!< If the End of the Curve is joined. 48 55 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;50 56 int ID; //!< The ID of this TrackElement 51 57 float startingTime; //!< The time at which this Track begins. … … 53 59 float endTime; //!< The time at which this Track ends. 54 60 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. 56 62 int nodeCount; //!< The count of points this TrackElement has. 57 char* name; //!< A name for the Trac.58 63 Curve* curve; //!< The Curve of this TrackElement 59 64 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 61 88 }; 62 89 63 90 //! the Condition to choose between the different ways of the game. 91 enum CONDITION {LOWEST, HIGHEST, RANDOM, LEFTRIGHT, NEAREST, ENEMYKILLED}; 64 92 65 93 //! The TrackManager handles the flow of the Players through the game. … … 103 131 TrackManager(void); 104 132 105 static TrackManager* singletonRef; //!< There may only be one TrackManager existing. 133 static TrackManager* singletonRef; //!< There may only be one TrackManager. 134 106 135 TrackElement* firstTrackElem; //!< The first TrackElement that exists. 107 136 TrackElement* currentTrackElem; //!< The TrackElement we are working on. 137 CurveType curveType; //!< The CurveType the entire TrackSystem will have. 108 138 float localTime; //!< The time that has been passed since the traveling the Track. 109 139 float maxTime; //!< The maximal time the track has. 110 140 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. 112 143 113 144 void initChildren(unsigned int childCount, SubString* names = NULL); … … 117 148 118 149 public: 119 ~TrackManager(void); 150 virtual ~TrackManager(void); 151 120 152 static TrackManager* getInstance(void); 121 153 122 154 // Methods to change the Path (initialisation) 123 155 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);}; 125 158 void setCurveType(CurveType curveType, TrackElement* trackElem); 126 159 void setDuration(float time); … … 131 164 void fork(unsigned int count, ...); 132 165 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); 134 168 void join(unsigned int count, ...); 135 169 void joinV(unsigned int count, int* trackIDs); … … 143 177 144 178 // 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; 147 182 void tick(float dt); 148 183 void jumpTo(float time); 149 void choosePath(int graphID);184 inline int choosePath(TrackElement* trackElem); 150 185 151 186 void setBindSlave(PNode* bindSlave); 187 PNode* getTrackNode(void); 152 188 153 189 // DEBUG // -
orxonox/branches/levelloader/src/world_entities/environment.cc
r3557 r3605 100 100 Environment::~Environment () 101 101 { 102 delete this->model; 102 103 103 } 104 104 105 105 void Environment::tick (float time) {} 106 106 107 void Environment::hit (WorldEntity* weapon, Vector loc) {}107 void Environment::hit (WorldEntity* weapon, Vector* loc) {} 108 108 109 109 void Environment::destroy () {} … … 114 114 { 115 115 glMatrixMode(GL_MODELVIEW); 116 gl LoadIdentity();116 glPushMatrix(); 117 117 float matrix[4][4]; 118 118 … … 123 123 124 124 this->model->draw(); 125 126 glPopMatrix(); 125 127 } 126 128 -
orxonox/branches/levelloader/src/world_entities/environment.h
r3542 r3605 9 9 friend class World; 10 10 11 private:12 float xCor;13 float yCor;14 float zCor;15 16 float mountainTest[10][10];17 18 11 public: 19 12 Environment (); 20 13 Environment (TiXmlElement* root); 21 ~Environment (); 22 14 virtual ~Environment (); 23 15 24 16 virtual void tick (float time); 25 virtual void hit (WorldEntity* weapon, Vector loc);17 virtual void hit (WorldEntity* weapon, Vector* loc); 26 18 virtual void destroy (); 27 19 virtual void collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); -
orxonox/branches/levelloader/src/world_entities/player.cc
r3604 r3605 16 16 */ 17 17 18 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_PLAYER 19 18 20 #include "player.h" 21 19 22 #include "stdincl.h" 20 23 //#include "collision.h" 21 24 #include "objModel.h" 25 #include "list.h" 26 #include "weapon.h" 27 #include "track_manager.h" 22 28 23 29 using namespace std; … … 31 37 Player::Player(bool isFree) : WorldEntity(isFree) 32 38 { 33 34 39 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 */ 53 Player::~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 61 66 62 67 /** … … 102 107 103 108 /** 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 */ 112 void 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 */ 122 void Player::removeWeapon(Weapon* weapon) 123 { 124 this->weapons->remove(weapon); 125 } 126 110 127 111 128 /** … … 114 131 void Player::postSpawn () 115 132 { 116 travelSpeed = 15.0;117 velocity = Vector();118 bUp = bDown = bLeft = bRight = bAscend = bDescend = false;119 bFire = false;120 acceleration = 10.0;121 133 //setCollision(new CollisionCluster(1.0, Vector(0,0,0))); 122 134 } 123 135 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 */ 140 void Player::leftWorld () 141 {} 142 143 133 144 134 145 /** … … 137 148 \param loc ?? 138 149 */ 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 } 150 void Player::hit (WorldEntity* weapon, Vector* loc) 151 { 152 } 153 149 154 150 155 /** … … 158 163 } 159 164 160 /**161 \brief The connection to the command node162 \param cmd the Command unit from witch to map163 164 here the commands are mapped to the players movement/weaponary165 */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 }175 165 176 166 /** … … 180 170 { 181 171 glMatrixMode(GL_MODELVIEW); 182 gl LoadIdentity();172 glPushMatrix(); 183 173 float matrix[4][4]; 184 174 … … 191 181 glMultMatrixf((float*)matrix); 192 182 193 glMatrixMode(GL_MODELVIEW);194 183 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 */ 192 void Player::tick (float time) 193 { 194 // player controlled movement 195 this->move (time); 196 // weapon system manipulation 197 this->fire(); 198 } 199 213 200 214 201 /** … … 220 207 Vector accel(0.0, 0.0, 0.0); 221 208 /* FIXME: calculating the direction and orthDirection every timeSlice is redundant! save it somewhere */ 222 //Placement *pos = getPlacement();223 209 224 210 /* calculate the direction in which the craft is heading */ … … 228 214 //orthDirection = orthDirection.cross (direction); 229 215 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 252 227 Vector move = accel * time; 253 228 this->shiftCoor (&move); 254 229 } 230 231 232 /** 233 \brief weapon manipulation by the player 234 */ 235 void 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 */ 256 void 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 9 9 #include "world_entity.h" 10 10 11 template<class T> class tList; 11 12 class OBJModel; 13 class Weapon; 12 14 13 15 //! Basic controllable WorldEntity … … 19 21 Player(bool isFree = false); 20 22 Player(TiXmlElement* root); 21 ~Player(); 23 virtual ~Player(); 24 25 void addWeapon(Weapon* weapon); 26 void removeWeapon(Weapon* weapon); 22 27 23 28 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); 27 31 virtual void collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); 32 33 virtual void tick(float time); 34 virtual void draw(); 35 28 36 virtual void command(Command* cmd); 29 30 virtual void draw();31 // virtual void getLookat(Location* locbuf);32 33 virtual void leftWorld();34 37 35 38 private: … … 41 44 bool bDescend; //!< descend button presses. 42 45 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 43 50 44 51 Vector velocity; //!< the velocity of the player. … … 47 54 48 55 void move(float time); 56 void fire(void); 49 57 50 58 }; -
orxonox/branches/levelloader/src/world_entities/power_up.h
r3499 r3605 15 15 public: 16 16 PowerUp (); 17 ~PowerUp ();17 virtual ~PowerUp (); 18 18 19 19 }; -
orxonox/branches/levelloader/src/world_entities/skysphere.cc
r3499 r3605 24 24 */ 25 25 26 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY 27 26 28 #include "material.h" 27 29 #include "skysphere.h" … … 29 31 #include "vector.h" 30 32 #include "world_entity.h" 31 32 33 33 34 using namespace std; … … 38 39 Skysphere::Skysphere() 39 40 { 40 initialize("../data/pictures/sky-replace.jpg");41 this->initialize("../data/pictures/sky-replace.jpg"); 41 42 } 43 42 44 43 45 /** … … 47 49 Skysphere::Skysphere(char* fileName) 48 50 { 49 initialize(fileName);51 this->initialize(fileName); 50 52 } 53 51 54 52 55 /** … … 56 59 { 57 60 PRINTF(3)("Deleting the SkySphere\n"); 58 delete skyMaterial;59 free( sphereObj);61 delete this->skyMaterial; 62 free(this->sphereObj); 60 63 } 61 64 … … 69 72 this->sphereObj = gluNewQuadric(); 70 73 gluQuadricTexture(this->sphereObj, GL_TRUE); 71 this->setRadius( 250.0);74 this->setRadius(1900.0); 72 75 73 76 this->skyMaterial = new Material("Sky"); … … 75 78 this->skyMaterial->setIllum(3); 76 79 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 Sphere83 */84 void Skysphere::setRadius(float radius)85 {86 this->sphereRadius = radius;87 80 } 88 81 … … 99 92 100 93 /** 101 \brief updates the position of the Skysphere102 \param sphereCenter The coordinate of the Center of the Sphere103 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 /**113 94 \brief draws the Skysphere 114 95 … … 117 98 void Skysphere::draw() 118 99 { 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 120 110 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); 129 112 glPopMatrix(); 130 glDisable(GL_TEXTURE_2D);131 113 } 114 115 116 /** 117 \brief sets the Radius of the Sphere. 118 \param radius The Radius of The Sphere 119 */ 120 void Skysphere::setRadius(float radius) 121 { 122 this->sphereRadius = radius; 123 } -
orxonox/branches/levelloader/src/world_entities/skysphere.h
r3499 r3605 15 15 /* INCLUDES */ 16 16 #include "p_node.h" 17 #include "world_entity.h" 17 18 18 19 /* FORWARD DEFINITION */ … … 21 22 22 23 //! A Class to handle a SkySphere 23 class Skysphere : public PNode24 class Skysphere : public WorldEntity 24 25 { 25 26 … … 27 28 Skysphere(); 28 29 Skysphere(char* fileName); 29 ~Skysphere(); 30 virtual ~Skysphere(); 31 void destroy(); 30 32 31 33 void setRadius(float radius); 32 34 void setTexture(char* fileName); 33 35 34 void updatePosition(Vector sphereCenter); 35 void draw(); 36 virtual void draw(); 36 37 37 38 private: 38 39 GLUquadricObj *sphereObj; //!< A Placeholder for the SkySphere. 39 40 Material *skyMaterial; //!< A Material for the SkySphere. 40 Vector sphereCenter; //!< Center of the SkySphere.41 41 float sphereRadius; //!< Radius of the SkySphere. This should match the frustum maximum range. 42 43 42 44 43 void initialize(char* fileName); 45 44 }; -
orxonox/branches/levelloader/src/world_entities/world_entity.cc
r3499 r3605 38 38 this->setClassName ("WorldEntity"); 39 39 this->bDraw = true; 40 this->model = NULL; 40 41 // collisioncluster = NULL; 41 42 } … … 47 48 { 48 49 // if( collisioncluster != NULL) delete collisioncluster; 50 delete this->model; 49 51 } 50 52 51 53 /** 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 54 58 */ 55 /*PN 56 Location* WorldEntity::getLocation () 57 { 58 return &loc; 59 } 60 */ 59 void WorldEntity::setCharacterAttributes(CharacterAttributes* charAttr) 60 {} 61 61 62 62 63 /** 63 \brief get the Placement of the WorldEntity64 \return a pointer to placement64 \brief gets the Character attributes of this worldentity 65 \returns character attributes 65 66 */ 66 /*PN 67 Placement* WorldEntity::getPlacement () 68 { 69 return &place; 70 } 71 */ 67 CharacterAttributes* WorldEntity::getCharacterAttributes() 68 {} 69 70 72 71 /** 73 72 \brief query whether the WorldEntity in question is free … … 93 92 } 94 93 */ 95 96 /**97 \brief this method is called every frame98 \param time: the time in seconds that has passed since the last tick99 100 Handle all stuff that should update with time inside this method (movement, animation, etc.)101 */102 void WorldEntity::tick(float time)103 {104 }105 94 106 95 … … 130 119 131 120 /** 132 \brief the entity is drawn onto the screen with this function133 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 /**140 121 \brief this function is called, when two entities collide 141 122 \param other: the world entity with whom it collides … … 147 128 void WorldEntity::collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags) {} 148 129 130 149 131 /** 150 132 \brief this function is called, when the ship is hit by a waepon … … 154 136 calculate the damage depending 155 137 */ 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() {} 138 void WorldEntity::hit(WorldEntity* weapon, Vector* loc) {} 164 139 165 140 … … 174 149 } 175 150 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 */ 158 void 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 */ 169 void 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 */ 179 void WorldEntity::draw() 180 {} 181 182 176 183 /** 177 184 \brief this handles incoming command messages … … 184 191 { 185 192 } 186 187 /**188 \brief this is called by the local Camera to determine the point it should look at on the WorldEntity189 \param locbuf: a pointer to the buffer to fill with a location to look at190 191 You may put any Location you want into locbuf, the Camera will determine via the corresponding Track how192 to look at the location you return with this.193 */194 /*PN195 void WorldEntity::getLookat (Location* locbuf)196 {197 }198 */199 200 /**201 \brief this method is called by the world if the WorldEntity leaves valid gamespace202 203 For free entities this means it left the Track boundaries. With bound entities it means its Location adresses a204 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 9 9 #include "stdincl.h" 10 10 #include "p_node.h" 11 #include "objModel.h" 11 12 12 13 //class CollisionCluster; 13 class OBJModel; 14 class CharacterAttributes; 15 14 16 15 17 //! Basic class from which all interactive stuff in the world is derived from … … 22 24 virtual ~WorldEntity (); 23 25 24 OBJModel* model; //!< The model that should be loaded for this entity. 26 27 25 28 26 29 //void setCollision (CollisionCluster* newhull); 27 30 28 bool isFree ();29 30 31 //void addAbility(Ability* ability); 31 32 //void removeAbility(Ability* ability); 32 33 void setDrawable (bool bDraw); 34 bool isFree (); 35 void setCharacterAttributes(CharacterAttributes* charAttr); 36 CharacterAttributes* getCharacterAttributes(); 37 33 38 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); 37 42 virtual void collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); 38 43 virtual void command (Command* cmd); … … 40 45 void processDraw (); 41 46 virtual void draw (); 42 v oid setDrawable (bool bDraw);47 virtual void tick (float time); 43 48 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 45 52 46 53 private: … … 49 56 bool bDraw; //!< If it should be visible. 50 57 58 59 51 60 //CollisionCluster* collisioncluster; //!< The collision-Cluster of this entity. 52 61 };
Note: See TracChangeset
for help on using the changeset viewer.