Changeset 4178 in orxonox.OLD for orxonox/branches
- Timestamp:
- May 13, 2005, 11:16:33 PM (20 years ago)
- Location:
- orxonox/branches/physics
- Files:
-
- 22 deleted
- 78 edited
- 48 copied
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics
- Property svn:externals
-
old new 1 data http://svn.orxonox.ethz.ch/data 1
-
- Property svn:externals
-
orxonox/branches/physics/ChangeLog
r3790 r4178 1 2005-05-10 Benjamin Grauer <bensch@orxonox.ethz.ch> 2 Merged the gui into the executable 3 Windows compiles again. 4 5 2005-04-27 orxonox 6 Tagged Version 0.2.3-pre-alpha 7 8 2005-04-23 Patrick Boenzli <patrick@orxonox.ethz.ch> 9 Finished most work on Animation-classes 10 11 2005-04-21 Benjamin Grauer <bensch@orxonox.ethz.ch> 12 Material Class update: possibility for transparency. 13 14 2005-04-15 Patrick Boenzli <partick@orxonox.ethz.ch> 15 Added AnimationPlayer and two animation classes. 16 17 2005-04-07 Patrick Boenzli <patrick@orxonox.ethz.ch> 18 Reimplemeted the Weapon and shoot-functions 19 1 20 2005-03-31 Benjamin Grauer <bensch@orxonox.ethz.ch> 2 21 Added Text Engine -
orxonox/branches/physics/Makefile.in
r3789 r4178 105 105 EXEEXT = @EXEEXT@ 106 106 GPROF = @GPROF@ 107 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@108 GTHREAD_LIBS = @GTHREAD_LIBS@109 107 GTK2_CFLAGS = @GTK2_CFLAGS@ 110 108 GTK2_LIBS = @GTK2_LIBS@ 111 109 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 112 110 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 113 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@114 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@115 111 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 116 112 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ … … 133 129 PACKAGE_VERSION = @PACKAGE_VERSION@ 134 130 PATH_SEPARATOR = @PATH_SEPARATOR@ 131 PKG_CONFIG = @PKG_CONFIG@ 132 RANLIB = @RANLIB@ 135 133 SET_MAKE = @SET_MAKE@ 136 134 SHELL = @SHELL@ … … 141 139 ac_ct_CC = @ac_ct_CC@ 142 140 ac_ct_CXX = @ac_ct_CXX@ 141 ac_ct_RANLIB = @ac_ct_RANLIB@ 143 142 ac_ct_STRIP = @ac_ct_STRIP@ 144 143 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -
orxonox/branches/physics/config.h.in
r3866 r4178 18 18 /* Define to 1 if you have the <GL/gl.h> header file. */ 19 19 #undef HAVE_GL_GL_H 20 21 /* if we have gThread */22 #undef HAVE_GTHREAD23 20 24 21 /* if we have GTK2 */ … … 43 40 /* Define to 1 if you have the <OpenGL/gl.h> header file. */ 44 41 #undef HAVE_OPENGL_GL_H 45 46 /* Define to 1 if you have the <pthread.h> header file. */47 #undef HAVE_PTHREAD_H48 42 49 43 /* Define to 1 if you have the <SDL.h> header file. */ -
orxonox/branches/physics/configure
r3953 r4178 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. 2-pre-alpha.3 # Generated by GNU Autoconf 2.59 for orxonox 0.2.3-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. 2-pre-alpha'273 PACKAGE_STRING='orxonox 0.2. 2-pre-alpha'272 PACKAGE_VERSION='0.2.3-pre-alpha' 273 PACKAGE_STRING='orxonox 0.2.3-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 DOCUMENTATION_TRUE DOCUMENTATION_FALSE DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE GPROF 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 RANLIB ac_ct_RANLIB CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG SUB_PROJECTS_TRUE SUB_PROJECTS_FALSE DOCUMENTATION_TRUE DOCUMENTATION_FALSE DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE GPROF PKG_CONFIG MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_FALSE CURL_LIBS CURL_CFLAGS HAVE_CURL_TRUE HAVE_CURL_FALSE LIBOBJS LTLIBOBJS' 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. 2-pre-alpha to adapt to many kinds of systems.791 \`configure' configures orxonox 0.2.3-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. 2-pre-alpha:";;858 short | recursive ) echo "Configuration of orxonox 0.2.3-pre-alpha:";; 859 859 esac 860 860 cat <<\_ACEOF … … 879 879 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 880 880 --without-gtk Prevents GTK from being loaded 881 --without-gthread Prevents gThread from being loaded882 --without-pthread Prevents pthread from being loaded883 881 --without-curl Prevents libcURL from being loaded 884 882 … … 993 991 if $ac_init_version; then 994 992 cat <<\_ACEOF 995 orxonox configure 0.2. 2-pre-alpha993 orxonox configure 0.2.3-pre-alpha 996 994 generated by GNU Autoconf 2.59 997 995 … … 1007 1005 running configure, to aid debugging if configure makes a mistake. 1008 1006 1009 It was created by orxonox $as_me 0.2. 2-pre-alpha, which was1007 It was created by orxonox $as_me 0.2.3-pre-alpha, which was 1010 1008 generated by GNU Autoconf 2.59. Invocation command line was 1011 1009 … … 1727 1725 # Define the identity of the package. 1728 1726 PACKAGE='orxonox' 1729 VERSION='0.2. 2-pre-alpha'1727 VERSION='0.2.3-pre-alpha' 1730 1728 1731 1729 … … 2591 2589 2592 2590 2591 if test -n "$ac_tool_prefix"; then 2592 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 2593 set dummy ${ac_tool_prefix}ranlib; ac_word=$2 2594 echo "$as_me:$LINENO: checking for $ac_word" >&5 2595 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2596 if test "${ac_cv_prog_RANLIB+set}" = set; then 2597 echo $ECHO_N "(cached) $ECHO_C" >&6 2598 else 2599 if test -n "$RANLIB"; then 2600 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 2601 else 2602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2603 for as_dir in $PATH 2604 do 2605 IFS=$as_save_IFS 2606 test -z "$as_dir" && as_dir=. 2607 for ac_exec_ext in '' $ac_executable_extensions; do 2608 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2609 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 2610 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2611 break 2 2612 fi 2613 done 2614 done 2615 2616 fi 2617 fi 2618 RANLIB=$ac_cv_prog_RANLIB 2619 if test -n "$RANLIB"; then 2620 echo "$as_me:$LINENO: result: $RANLIB" >&5 2621 echo "${ECHO_T}$RANLIB" >&6 2622 else 2623 echo "$as_me:$LINENO: result: no" >&5 2624 echo "${ECHO_T}no" >&6 2625 fi 2626 2627 fi 2628 if test -z "$ac_cv_prog_RANLIB"; then 2629 ac_ct_RANLIB=$RANLIB 2630 # Extract the first word of "ranlib", so it can be a program name with args. 2631 set dummy ranlib; ac_word=$2 2632 echo "$as_me:$LINENO: checking for $ac_word" >&5 2633 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2634 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then 2635 echo $ECHO_N "(cached) $ECHO_C" >&6 2636 else 2637 if test -n "$ac_ct_RANLIB"; then 2638 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. 2639 else 2640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2641 for as_dir in $PATH 2642 do 2643 IFS=$as_save_IFS 2644 test -z "$as_dir" && as_dir=. 2645 for ac_exec_ext in '' $ac_executable_extensions; do 2646 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2647 ac_cv_prog_ac_ct_RANLIB="ranlib" 2648 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2649 break 2 2650 fi 2651 done 2652 done 2653 2654 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" 2655 fi 2656 fi 2657 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB 2658 if test -n "$ac_ct_RANLIB"; then 2659 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 2660 echo "${ECHO_T}$ac_ct_RANLIB" >&6 2661 else 2662 echo "$as_me:$LINENO: result: no" >&5 2663 echo "${ECHO_T}no" >&6 2664 fi 2665 2666 RANLIB=$ac_ct_RANLIB 2667 else 2668 RANLIB="$ac_cv_prog_RANLIB" 2669 fi 2670 2593 2671 ac_ext=c 2594 2672 ac_cpp='$CPP $CPPFLAGS' … … 3926 4004 3927 4005 #------------------# 3928 # gThread-disabled #3929 #------------------#3930 echo "$as_me:$LINENO: checking if gThread should be enabled" >&53931 echo $ECHO_N "checking if gThread should be enabled... $ECHO_C" >&63932 3933 # Check whether --with-gthread or --without-gthread was given.3934 if test "${with_gthread+set}" = set; then3935 withval="$with_gthread"3936 def_gthread=no3937 else3938 def_gthread=yes3939 fi;3940 if test x$def_gthread = xyes; then3941 echo "yes"3942 fi3943 if test x$def_gthread = xno; then3944 echo "no"3945 fi3946 3947 #------------------#3948 # pthread-disabled #3949 #------------------#3950 echo "$as_me:$LINENO: checking if pthread should be enabled" >&53951 echo $ECHO_N "checking if pthread should be enabled... $ECHO_C" >&63952 3953 # Check whether --with-pthread or --without-pthread was given.3954 if test "${with_pthread+set}" = set; then3955 withval="$with_pthread"3956 def_pthread=no3957 else3958 def_pthread=yes3959 fi;3960 if test x$def_pthread = xyes; then3961 echo "yes"3962 fi3963 if test x$def_pthread = xno; then3964 echo "no"3965 fi3966 3967 #------------------#3968 4006 # libCurl-disabled # 3969 4007 #------------------# … … 4175 4213 echo "$as_me:$LINENO: result: no" >&5 4176 4214 echo "${ECHO_T}no" >&6 4215 fi 4216 4217 4218 #-------------------------# 4219 # checking for pkg-config # 4220 #-------------------------# 4221 if test x$def_gtk = xyes; then 4222 # Extract the first word of "pkg-config", so it can be a program name with args. 4223 set dummy pkg-config; ac_word=$2 4224 echo "$as_me:$LINENO: checking for $ac_word" >&5 4225 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 4226 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then 4227 echo $ECHO_N "(cached) $ECHO_C" >&6 4228 else 4229 case $PKG_CONFIG in 4230 [\\/]* | ?:[\\/]*) 4231 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. 4232 ;; 4233 *) 4234 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4235 for as_dir in $PATH 4236 do 4237 IFS=$as_save_IFS 4238 test -z "$as_dir" && as_dir=. 4239 for ac_exec_ext in '' $ac_executable_extensions; do 4240 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4241 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" 4242 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4243 break 2 4244 fi 4245 done 4246 done 4247 4248 ;; 4249 esac 4250 fi 4251 PKG_CONFIG=$ac_cv_path_PKG_CONFIG 4252 4253 if test -n "$PKG_CONFIG"; then 4254 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 4255 echo "${ECHO_T}$PKG_CONFIG" >&6 4256 else 4257 echo "$as_me:$LINENO: result: no" >&5 4258 echo "${ECHO_T}no" >&6 4259 fi 4260 4177 4261 fi 4178 4262 … … 6636 6720 #-----# 6637 6721 if test x$def_gtk = xyes; then 6638 6639 6722 #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no) 6640 6723 echo "$as_me:$LINENO: checking for gtk2.0" >&5 6641 6724 echo $ECHO_N "checking for gtk2.0... $ECHO_C" >&6 6642 if ` pkg-config--exists gtk+-2.0`; then6725 if `$PKG_CONFIG --exists gtk+-2.0`; then 6643 6726 echo "yes" 6644 6727 have_gtk2=yes 6645 GTK2_LIBS=` pkg-config--libs gtk+-2.0`6646 GTK2_CFLAGS=` pkg-config--cflags gtk+-2.0`6728 GTK2_LIBS=`$PKG_CONFIG --libs gtk+-2.0` 6729 GTK2_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0` 6647 6730 6648 6731 cat >>confdefs.h <<_ACEOF … … 6650 6733 _ACEOF 6651 6734 6735 if test $DEBUG -ge 3; then 6736 echo "cflags: $GTK2_CFLAGS" 6737 echo "libs: $GTK2_LIBS" 6738 fi 6652 6739 else 6653 6740 echo "no" … … 6665 6752 HAVE_GTK2_TRUE='#' 6666 6753 HAVE_GTK2_FALSE= 6667 fi6668 6669 6670 #---------#6671 # gThread #6672 #---------#6673 if test x$def_gthread = xyes; then6674 6675 echo "$as_me:$LINENO: checking for gthread" >&56676 echo $ECHO_N "checking for gthread... $ECHO_C" >&66677 if `pkg-config --exists gthread-2.0`; then6678 echo "yes"6679 have_gthread=yes6680 GTHREAD_LIBS=`pkg-config --libs gthread-2.0`6681 GTHREAD_CFLAGS=`pkg-config --cflags gthread-2.0`6682 6683 cat >>confdefs.h <<_ACEOF6684 #define HAVE_GTHREAD 16685 _ACEOF6686 6687 else6688 echo "no"6689 fi6690 6691 fi6692 6693 6694 6695 6696 if test x$have_gthread = xyes; then6697 HAVE_GTHREAD_TRUE=6698 HAVE_GTHREAD_FALSE='#'6699 else6700 HAVE_GTHREAD_TRUE='#'6701 HAVE_GTHREAD_FALSE=6702 6754 fi 6703 6755 … … 6949 7001 6950 7002 6951 #---------# 6952 # pthread # 6953 #---------# 6954 if test x$def_pthread = xyes ; then 6955 if test x$have_gthread = xyes ; then 6956 6957 for ac_header in pthread.h 7003 #--------# 7004 # efence # 7005 #--------# 7006 if test x$def_efence = xyes ; then 7007 echo "$as_me:$LINENO: checking for main in -lefence" >&5 7008 echo $ECHO_N "checking for main in -lefence... $ECHO_C" >&6 7009 if test "${ac_cv_lib_efence_main+set}" = set; then 7010 echo $ECHO_N "(cached) $ECHO_C" >&6 7011 else 7012 ac_check_lib_save_LIBS=$LIBS 7013 LIBS="-lefence $LIBS" 7014 cat >conftest.$ac_ext <<_ACEOF 7015 /* confdefs.h. */ 7016 _ACEOF 7017 cat confdefs.h >>conftest.$ac_ext 7018 cat >>conftest.$ac_ext <<_ACEOF 7019 /* end confdefs.h. */ 7020 7021 7022 int 7023 main () 7024 { 7025 main (); 7026 ; 7027 return 0; 7028 } 7029 _ACEOF 7030 rm -f conftest.$ac_objext conftest$ac_exeext 7031 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 7032 (eval $ac_link) 2>conftest.er1 7033 ac_status=$? 7034 grep -v '^ *+' conftest.er1 >conftest.err 7035 rm -f conftest.er1 7036 cat conftest.err >&5 7037 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7038 (exit $ac_status); } && 7039 { ac_try='test -z "$ac_c_werror_flag" 7040 || test ! -s conftest.err' 7041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7042 (eval $ac_try) 2>&5 7043 ac_status=$? 7044 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7045 (exit $ac_status); }; } && 7046 { ac_try='test -s conftest$ac_exeext' 7047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7048 (eval $ac_try) 2>&5 7049 ac_status=$? 7050 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7051 (exit $ac_status); }; }; then 7052 ac_cv_lib_efence_main=yes 7053 else 7054 echo "$as_me: failed program was:" >&5 7055 sed 's/^/| /' conftest.$ac_ext >&5 7056 7057 ac_cv_lib_efence_main=no 7058 fi 7059 rm -f conftest.err conftest.$ac_objext \ 7060 conftest$ac_exeext conftest.$ac_ext 7061 LIBS=$ac_check_lib_save_LIBS 7062 fi 7063 echo "$as_me:$LINENO: result: $ac_cv_lib_efence_main" >&5 7064 echo "${ECHO_T}$ac_cv_lib_efence_main" >&6 7065 if test $ac_cv_lib_efence_main = yes; then 7066 FOUND_efence=yes 7067 fi 7068 7069 if test x$FOUND_efence = xyes ; then 7070 LIBS="$LIBS -lefence" 7071 fi 7072 7073 fi 7074 7075 # FIXME: Replace `main' with a function in `-lm': 7076 7077 echo "$as_me:$LINENO: checking for main in -lm" >&5 7078 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6 7079 if test "${ac_cv_lib_m_main+set}" = set; then 7080 echo $ECHO_N "(cached) $ECHO_C" >&6 7081 else 7082 ac_check_lib_save_LIBS=$LIBS 7083 LIBS="-lm $LIBS" 7084 cat >conftest.$ac_ext <<_ACEOF 7085 /* confdefs.h. */ 7086 _ACEOF 7087 cat confdefs.h >>conftest.$ac_ext 7088 cat >>conftest.$ac_ext <<_ACEOF 7089 /* end confdefs.h. */ 7090 7091 7092 int 7093 main () 7094 { 7095 main (); 7096 ; 7097 return 0; 7098 } 7099 _ACEOF 7100 rm -f conftest.$ac_objext conftest$ac_exeext 7101 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 7102 (eval $ac_link) 2>conftest.er1 7103 ac_status=$? 7104 grep -v '^ *+' conftest.er1 >conftest.err 7105 rm -f conftest.er1 7106 cat conftest.err >&5 7107 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7108 (exit $ac_status); } && 7109 { ac_try='test -z "$ac_c_werror_flag" 7110 || test ! -s conftest.err' 7111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7112 (eval $ac_try) 2>&5 7113 ac_status=$? 7114 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7115 (exit $ac_status); }; } && 7116 { ac_try='test -s conftest$ac_exeext' 7117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7118 (eval $ac_try) 2>&5 7119 ac_status=$? 7120 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7121 (exit $ac_status); }; }; then 7122 ac_cv_lib_m_main=yes 7123 else 7124 echo "$as_me: failed program was:" >&5 7125 sed 's/^/| /' conftest.$ac_ext >&5 7126 7127 ac_cv_lib_m_main=no 7128 fi 7129 rm -f conftest.err conftest.$ac_objext \ 7130 conftest$ac_exeext conftest.$ac_ext 7131 LIBS=$ac_check_lib_save_LIBS 7132 fi 7133 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 7134 echo "${ECHO_T}$ac_cv_lib_m_main" >&6 7135 if test $ac_cv_lib_m_main = yes; then 7136 cat >>confdefs.h <<_ACEOF 7137 #define HAVE_LIBM 1 7138 _ACEOF 7139 7140 LIBS="-lm $LIBS" 7141 7142 fi 7143 7144 7145 7146 # Checks for header files. 7147 echo "$as_me:$LINENO: checking for ANSI C header files" >&5 7148 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 7149 if test "${ac_cv_header_stdc+set}" = set; then 7150 echo $ECHO_N "(cached) $ECHO_C" >&6 7151 else 7152 cat >conftest.$ac_ext <<_ACEOF 7153 /* confdefs.h. */ 7154 _ACEOF 7155 cat confdefs.h >>conftest.$ac_ext 7156 cat >>conftest.$ac_ext <<_ACEOF 7157 /* end confdefs.h. */ 7158 #include <stdlib.h> 7159 #include <stdarg.h> 7160 #include <string.h> 7161 #include <float.h> 7162 7163 int 7164 main () 7165 { 7166 7167 ; 7168 return 0; 7169 } 7170 _ACEOF 7171 rm -f conftest.$ac_objext 7172 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 7173 (eval $ac_compile) 2>conftest.er1 7174 ac_status=$? 7175 grep -v '^ *+' conftest.er1 >conftest.err 7176 rm -f conftest.er1 7177 cat conftest.err >&5 7178 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7179 (exit $ac_status); } && 7180 { ac_try='test -z "$ac_c_werror_flag" 7181 || test ! -s conftest.err' 7182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7183 (eval $ac_try) 2>&5 7184 ac_status=$? 7185 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7186 (exit $ac_status); }; } && 7187 { ac_try='test -s conftest.$ac_objext' 7188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7189 (eval $ac_try) 2>&5 7190 ac_status=$? 7191 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7192 (exit $ac_status); }; }; then 7193 ac_cv_header_stdc=yes 7194 else 7195 echo "$as_me: failed program was:" >&5 7196 sed 's/^/| /' conftest.$ac_ext >&5 7197 7198 ac_cv_header_stdc=no 7199 fi 7200 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7201 7202 if test $ac_cv_header_stdc = yes; then 7203 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 7204 cat >conftest.$ac_ext <<_ACEOF 7205 /* confdefs.h. */ 7206 _ACEOF 7207 cat confdefs.h >>conftest.$ac_ext 7208 cat >>conftest.$ac_ext <<_ACEOF 7209 /* end confdefs.h. */ 7210 #include <string.h> 7211 7212 _ACEOF 7213 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 7214 $EGREP "memchr" >/dev/null 2>&1; then 7215 : 7216 else 7217 ac_cv_header_stdc=no 7218 fi 7219 rm -f conftest* 7220 7221 fi 7222 7223 if test $ac_cv_header_stdc = yes; then 7224 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 7225 cat >conftest.$ac_ext <<_ACEOF 7226 /* confdefs.h. */ 7227 _ACEOF 7228 cat confdefs.h >>conftest.$ac_ext 7229 cat >>conftest.$ac_ext <<_ACEOF 7230 /* end confdefs.h. */ 7231 #include <stdlib.h> 7232 7233 _ACEOF 7234 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 7235 $EGREP "free" >/dev/null 2>&1; then 7236 : 7237 else 7238 ac_cv_header_stdc=no 7239 fi 7240 rm -f conftest* 7241 7242 fi 7243 7244 if test $ac_cv_header_stdc = yes; then 7245 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 7246 if test "$cross_compiling" = yes; then 7247 : 7248 else 7249 cat >conftest.$ac_ext <<_ACEOF 7250 /* confdefs.h. */ 7251 _ACEOF 7252 cat confdefs.h >>conftest.$ac_ext 7253 cat >>conftest.$ac_ext <<_ACEOF 7254 /* end confdefs.h. */ 7255 #include <ctype.h> 7256 #if ((' ' & 0x0FF) == 0x020) 7257 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 7258 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 7259 #else 7260 # define ISLOWER(c) \ 7261 (('a' <= (c) && (c) <= 'i') \ 7262 || ('j' <= (c) && (c) <= 'r') \ 7263 || ('s' <= (c) && (c) <= 'z')) 7264 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) 7265 #endif 7266 7267 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 7268 int 7269 main () 7270 { 7271 int i; 7272 for (i = 0; i < 256; i++) 7273 if (XOR (islower (i), ISLOWER (i)) 7274 || toupper (i) != TOUPPER (i)) 7275 exit(2); 7276 exit (0); 7277 } 7278 _ACEOF 7279 rm -f conftest$ac_exeext 7280 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 7281 (eval $ac_link) 2>&5 7282 ac_status=$? 7283 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7284 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 7285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7286 (eval $ac_try) 2>&5 7287 ac_status=$? 7288 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7289 (exit $ac_status); }; }; then 7290 : 7291 else 7292 echo "$as_me: program exited with status $ac_status" >&5 7293 echo "$as_me: failed program was:" >&5 7294 sed 's/^/| /' conftest.$ac_ext >&5 7295 7296 ( exit $ac_status ) 7297 ac_cv_header_stdc=no 7298 fi 7299 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 7300 fi 7301 fi 7302 fi 7303 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 7304 echo "${ECHO_T}$ac_cv_header_stdc" >&6 7305 if test $ac_cv_header_stdc = yes; then 7306 7307 cat >>confdefs.h <<\_ACEOF 7308 #define STDC_HEADERS 1 7309 _ACEOF 7310 7311 fi 7312 7313 7314 7315 for ac_header in stdlib.h string.h 6958 7316 do 6959 7317 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 7099 7457 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 7100 7458 _ACEOF 7101 pthreadHeader="yes" 7102 else 7103 pthreadHeader="no" 7459 7104 7460 fi 7105 7461 7106 7462 done 7107 7463 7108 echo "$as_me:$LINENO: checking for main in -lpthread" >&5 7109 echo $ECHO_N "checking for main in -lpthread... $ECHO_C" >&6 7110 if test "${ac_cv_lib_pthread_main+set}" = set; then 7464 7465 # Checks for typedefs, structures, and compiler characteristics. 7466 echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 7467 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6 7468 if test "${ac_cv_header_stdbool_h+set}" = set; then 7111 7469 echo $ECHO_N "(cached) $ECHO_C" >&6 7112 7470 else 7113 ac_check_lib_save_LIBS=$LIBS 7114 LIBS="-lpthread $LIBS" 7115 cat >conftest.$ac_ext <<_ACEOF 7471 cat >conftest.$ac_ext <<_ACEOF 7116 7472 /* confdefs.h. */ 7117 7473 _ACEOF … … 7120 7476 /* end confdefs.h. */ 7121 7477 7478 #include <stdbool.h> 7479 #ifndef bool 7480 # error bool is not defined 7481 #endif 7482 #ifndef false 7483 # error false is not defined 7484 #endif 7485 #if false 7486 # error false is not 0 7487 #endif 7488 #ifndef true 7489 # error true is not defined 7490 #endif 7491 #if true != 1 7492 # error true is not 1 7493 #endif 7494 #ifndef __bool_true_false_are_defined 7495 # error __bool_true_false_are_defined is not defined 7496 #endif 7497 7498 struct s { _Bool s: 1; _Bool t; } s; 7499 7500 char a[true == 1 ? 1 : -1]; 7501 char b[false == 0 ? 1 : -1]; 7502 char c[__bool_true_false_are_defined == 1 ? 1 : -1]; 7503 char d[(bool) -0.5 == true ? 1 : -1]; 7504 bool e = &s; 7505 char f[(_Bool) -0.0 == false ? 1 : -1]; 7506 char g[true]; 7507 char h[sizeof (_Bool)]; 7508 char i[sizeof s.t]; 7122 7509 7123 7510 int 7124 7511 main () 7125 7512 { 7126 main ();7513 return !a + !b + !c + !d + !e + !f + !g + !h + !i; 7127 7514 ; 7128 7515 return 0; 7129 7516 } 7130 7517 _ACEOF 7131 rm -f conftest.$ac_objext conftest$ac_exeext7132 if { (eval echo "$as_me:$LINENO: \"$ac_ link\"") >&57133 (eval $ac_ link) 2>conftest.er17518 rm -f conftest.$ac_objext 7519 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 7520 (eval $ac_compile) 2>conftest.er1 7134 7521 ac_status=$? 7135 7522 grep -v '^ *+' conftest.er1 >conftest.err … … 7145 7532 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7146 7533 (exit $ac_status); }; } && 7147 { ac_try='test -s conftest $ac_exeext'7534 { ac_try='test -s conftest.$ac_objext' 7148 7535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7149 7536 (eval $ac_try) 2>&5 … … 7151 7538 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7152 7539 (exit $ac_status); }; }; then 7153 ac_cv_ lib_pthread_main=yes7540 ac_cv_header_stdbool_h=yes 7154 7541 else 7155 7542 echo "$as_me: failed program was:" >&5 7156 7543 sed 's/^/| /' conftest.$ac_ext >&5 7157 7544 7158 ac_cv_lib_pthread_main=no 7159 fi 7160 rm -f conftest.err conftest.$ac_objext \ 7161 conftest$ac_exeext conftest.$ac_ext 7162 LIBS=$ac_check_lib_save_LIBS 7163 fi 7164 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_main" >&5 7165 echo "${ECHO_T}$ac_cv_lib_pthread_main" >&6 7166 if test $ac_cv_lib_pthread_main = yes; then 7167 FOUND_pthread=yes 7168 fi 7169 7170 if test x$FOUND_pthread = xyes ; then 7171 LIBS="$LIBS -lpthread" 7172 fi 7173 fi 7174 fi 7175 7176 7177 #--------# 7178 # efence # 7179 #--------# 7180 if test x$def_efence = xyes ; then 7181 echo "$as_me:$LINENO: checking for main in -lefence" >&5 7182 echo $ECHO_N "checking for main in -lefence... $ECHO_C" >&6 7183 if test "${ac_cv_lib_efence_main+set}" = set; then 7545 ac_cv_header_stdbool_h=no 7546 fi 7547 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7548 fi 7549 echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 7550 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 7551 echo "$as_me:$LINENO: checking for _Bool" >&5 7552 echo $ECHO_N "checking for _Bool... $ECHO_C" >&6 7553 if test "${ac_cv_type__Bool+set}" = set; then 7184 7554 echo $ECHO_N "(cached) $ECHO_C" >&6 7185 7555 else 7186 ac_check_lib_save_LIBS=$LIBS 7187 LIBS="-lefence $LIBS" 7188 cat >conftest.$ac_ext <<_ACEOF 7556 cat >conftest.$ac_ext <<_ACEOF 7189 7557 /* confdefs.h. */ 7190 7558 _ACEOF … … 7192 7560 cat >>conftest.$ac_ext <<_ACEOF 7193 7561 /* end confdefs.h. */ 7194 7195 7562 $ac_includes_default 7196 7563 int 7197 7564 main () 7198 7565 { 7199 main (); 7566 if ((_Bool *) 0) 7567 return 0; 7568 if (sizeof (_Bool)) 7569 return 0; 7200 7570 ; 7201 7571 return 0; 7202 7572 } 7203 7573 _ACEOF 7204 rm -f conftest.$ac_objext conftest$ac_exeext7205 if { (eval echo "$as_me:$LINENO: \"$ac_ link\"") >&57206 (eval $ac_ link) 2>conftest.er17574 rm -f conftest.$ac_objext 7575 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 7576 (eval $ac_compile) 2>conftest.er1 7207 7577 ac_status=$? 7208 7578 grep -v '^ *+' conftest.er1 >conftest.err … … 7218 7588 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7219 7589 (exit $ac_status); }; } && 7220 { ac_try='test -s conftest$ac_exeext'7221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&57222 (eval $ac_try) 2>&57223 ac_status=$?7224 echo "$as_me:$LINENO: \$? = $ac_status" >&57225 (exit $ac_status); }; }; then7226 ac_cv_lib_efence_main=yes7227 else7228 echo "$as_me: failed program was:" >&57229 sed 's/^/| /' conftest.$ac_ext >&57230 7231 ac_cv_lib_efence_main=no7232 fi7233 rm -f conftest.err conftest.$ac_objext \7234 conftest$ac_exeext conftest.$ac_ext7235 LIBS=$ac_check_lib_save_LIBS7236 fi7237 echo "$as_me:$LINENO: result: $ac_cv_lib_efence_main" >&57238 echo "${ECHO_T}$ac_cv_lib_efence_main" >&67239 if test $ac_cv_lib_efence_main = yes; then7240 FOUND_efence=yes7241 fi7242 7243 if test x$FOUND_efence = xyes ; then7244 LIBS="$LIBS -lefence"7245 fi7246 7247 fi7248 7249 # FIXME: Replace `main' with a function in `-lm':7250 7251 echo "$as_me:$LINENO: checking for main in -lm" >&57252 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&67253 if test "${ac_cv_lib_m_main+set}" = set; then7254 echo $ECHO_N "(cached) $ECHO_C" >&67255 else7256 ac_check_lib_save_LIBS=$LIBS7257 LIBS="-lm $LIBS"7258 cat >conftest.$ac_ext <<_ACEOF7259 /* confdefs.h. */7260 _ACEOF7261 cat confdefs.h >>conftest.$ac_ext7262 cat >>conftest.$ac_ext <<_ACEOF7263 /* end confdefs.h. */7264 7265 7266 int7267 main ()7268 {7269 main ();7270 ;7271 return 0;7272 }7273 _ACEOF7274 rm -f conftest.$ac_objext conftest$ac_exeext7275 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&57276 (eval $ac_link) 2>conftest.er17277 ac_status=$?7278 grep -v '^ *+' conftest.er1 >conftest.err7279 rm -f conftest.er17280 cat conftest.err >&57281 echo "$as_me:$LINENO: \$? = $ac_status" >&57282 (exit $ac_status); } &&7283 { ac_try='test -z "$ac_c_werror_flag"7284 || test ! -s conftest.err'7285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&57286 (eval $ac_try) 2>&57287 ac_status=$?7288 echo "$as_me:$LINENO: \$? = $ac_status" >&57289 (exit $ac_status); }; } &&7290 { ac_try='test -s conftest$ac_exeext'7291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&57292 (eval $ac_try) 2>&57293 ac_status=$?7294 echo "$as_me:$LINENO: \$? = $ac_status" >&57295 (exit $ac_status); }; }; then7296 ac_cv_lib_m_main=yes7297 else7298 echo "$as_me: failed program was:" >&57299 sed 's/^/| /' conftest.$ac_ext >&57300 7301 ac_cv_lib_m_main=no7302 fi7303 rm -f conftest.err conftest.$ac_objext \7304 conftest$ac_exeext conftest.$ac_ext7305 LIBS=$ac_check_lib_save_LIBS7306 fi7307 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&57308 echo "${ECHO_T}$ac_cv_lib_m_main" >&67309 if test $ac_cv_lib_m_main = yes; then7310 cat >>confdefs.h <<_ACEOF7311 #define HAVE_LIBM 17312 _ACEOF7313 7314 LIBS="-lm $LIBS"7315 7316 fi7317 7318 7319 7320 # Checks for header files.7321 echo "$as_me:$LINENO: checking for ANSI C header files" >&57322 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&67323 if test "${ac_cv_header_stdc+set}" = set; then7324 echo $ECHO_N "(cached) $ECHO_C" >&67325 else7326 cat >conftest.$ac_ext <<_ACEOF7327 /* confdefs.h. */7328 _ACEOF7329 cat confdefs.h >>conftest.$ac_ext7330 cat >>conftest.$ac_ext <<_ACEOF7331 /* end confdefs.h. */7332 #include <stdlib.h>7333 #include <stdarg.h>7334 #include <string.h>7335 #include <float.h>7336 7337 int7338 main ()7339 {7340 7341 ;7342 return 0;7343 }7344 _ACEOF7345 rm -f conftest.$ac_objext7346 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&57347 (eval $ac_compile) 2>conftest.er17348 ac_status=$?7349 grep -v '^ *+' conftest.er1 >conftest.err7350 rm -f conftest.er17351 cat conftest.err >&57352 echo "$as_me:$LINENO: \$? = $ac_status" >&57353 (exit $ac_status); } &&7354 { ac_try='test -z "$ac_c_werror_flag"7355 || test ! -s conftest.err'7356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&57357 (eval $ac_try) 2>&57358 ac_status=$?7359 echo "$as_me:$LINENO: \$? = $ac_status" >&57360 (exit $ac_status); }; } &&7361 7590 { ac_try='test -s conftest.$ac_objext' 7362 7591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 … … 7365 7594 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7366 7595 (exit $ac_status); }; }; then 7367 ac_cv_ header_stdc=yes7596 ac_cv_type__Bool=yes 7368 7597 else 7369 7598 echo "$as_me: failed program was:" >&5 7370 7599 sed 's/^/| /' conftest.$ac_ext >&5 7371 7600 7372 ac_cv_ header_stdc=no7601 ac_cv_type__Bool=no 7373 7602 fi 7374 7603 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7375 7376 if test $ac_cv_header_stdc = yes; then 7377 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 7378 cat >conftest.$ac_ext <<_ACEOF 7379 /* confdefs.h. */ 7380 _ACEOF 7381 cat confdefs.h >>conftest.$ac_ext 7382 cat >>conftest.$ac_ext <<_ACEOF 7383 /* end confdefs.h. */ 7384 #include <string.h> 7385 7386 _ACEOF 7387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 7388 $EGREP "memchr" >/dev/null 2>&1; then 7389 : 7390 else 7391 ac_cv_header_stdc=no 7392 fi 7393 rm -f conftest* 7394 7395 fi 7396 7397 if test $ac_cv_header_stdc = yes; then 7398 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 7399 cat >conftest.$ac_ext <<_ACEOF 7400 /* confdefs.h. */ 7401 _ACEOF 7402 cat confdefs.h >>conftest.$ac_ext 7403 cat >>conftest.$ac_ext <<_ACEOF 7404 /* end confdefs.h. */ 7405 #include <stdlib.h> 7406 7407 _ACEOF 7408 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 7409 $EGREP "free" >/dev/null 2>&1; then 7410 : 7411 else 7412 ac_cv_header_stdc=no 7413 fi 7414 rm -f conftest* 7415 7416 fi 7417 7418 if test $ac_cv_header_stdc = yes; then 7419 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 7420 if test "$cross_compiling" = yes; then 7421 : 7422 else 7423 cat >conftest.$ac_ext <<_ACEOF 7424 /* confdefs.h. */ 7425 _ACEOF 7426 cat confdefs.h >>conftest.$ac_ext 7427 cat >>conftest.$ac_ext <<_ACEOF 7428 /* end confdefs.h. */ 7429 #include <ctype.h> 7430 #if ((' ' & 0x0FF) == 0x020) 7431 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 7432 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 7433 #else 7434 # define ISLOWER(c) \ 7435 (('a' <= (c) && (c) <= 'i') \ 7436 || ('j' <= (c) && (c) <= 'r') \ 7437 || ('s' <= (c) && (c) <= 'z')) 7438 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) 7439 #endif 7440 7441 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 7442 int 7443 main () 7444 { 7445 int i; 7446 for (i = 0; i < 256; i++) 7447 if (XOR (islower (i), ISLOWER (i)) 7448 || toupper (i) != TOUPPER (i)) 7449 exit(2); 7450 exit (0); 7451 } 7452 _ACEOF 7453 rm -f conftest$ac_exeext 7454 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 7455 (eval $ac_link) 2>&5 7456 ac_status=$? 7457 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7458 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 7459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7460 (eval $ac_try) 2>&5 7461 ac_status=$? 7462 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7463 (exit $ac_status); }; }; then 7464 : 7465 else 7466 echo "$as_me: program exited with status $ac_status" >&5 7467 echo "$as_me: failed program was:" >&5 7468 sed 's/^/| /' conftest.$ac_ext >&5 7469 7470 ( exit $ac_status ) 7471 ac_cv_header_stdc=no 7472 fi 7473 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 7474 fi 7475 fi 7476 fi 7477 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 7478 echo "${ECHO_T}$ac_cv_header_stdc" >&6 7479 if test $ac_cv_header_stdc = yes; then 7604 fi 7605 echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 7606 echo "${ECHO_T}$ac_cv_type__Bool" >&6 7607 if test $ac_cv_type__Bool = yes; then 7608 7609 cat >>confdefs.h <<_ACEOF 7610 #define HAVE__BOOL 1 7611 _ACEOF 7612 7613 7614 fi 7615 7616 if test $ac_cv_header_stdbool_h = yes; then 7480 7617 7481 7618 cat >>confdefs.h <<\_ACEOF 7482 #define STDC_HEADERS 1 7483 _ACEOF 7484 7485 fi 7486 7487 7488 7489 for ac_header in stdlib.h string.h 7619 #define HAVE_STDBOOL_H 1 7620 _ACEOF 7621 7622 fi 7623 7624 7625 # Checks for library functions. 7626 7627 for ac_header in stdlib.h 7490 7628 do 7491 7629 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 7636 7774 done 7637 7775 7638 7639 # Checks for typedefs, structures, and compiler characteristics.7640 echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&57641 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&67642 if test "${ac_cv_header_stdbool_h+set}" = set; then7643 echo $ECHO_N "(cached) $ECHO_C" >&67644 else7645 cat >conftest.$ac_ext <<_ACEOF7646 /* confdefs.h. */7647 _ACEOF7648 cat confdefs.h >>conftest.$ac_ext7649 cat >>conftest.$ac_ext <<_ACEOF7650 /* end confdefs.h. */7651 7652 #include <stdbool.h>7653 #ifndef bool7654 # error bool is not defined7655 #endif7656 #ifndef false7657 # error false is not defined7658 #endif7659 #if false7660 # error false is not 07661 #endif7662 #ifndef true7663 # error true is not defined7664 #endif7665 #if true != 17666 # error true is not 17667 #endif7668 #ifndef __bool_true_false_are_defined7669 # error __bool_true_false_are_defined is not defined7670 #endif7671 7672 struct s { _Bool s: 1; _Bool t; } s;7673 7674 char a[true == 1 ? 1 : -1];7675 char b[false == 0 ? 1 : -1];7676 char c[__bool_true_false_are_defined == 1 ? 1 : -1];7677 char d[(bool) -0.5 == true ? 1 : -1];7678 bool e = &s;7679 char f[(_Bool) -0.0 == false ? 1 : -1];7680 char g[true];7681 char h[sizeof (_Bool)];7682 char i[sizeof s.t];7683 7684 int7685 main ()7686 {7687 return !a + !b + !c + !d + !e + !f + !g + !h + !i;7688 ;7689 return 0;7690 }7691 _ACEOF7692 rm -f conftest.$ac_objext7693 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&57694 (eval $ac_compile) 2>conftest.er17695 ac_status=$?7696 grep -v '^ *+' conftest.er1 >conftest.err7697 rm -f conftest.er17698 cat conftest.err >&57699 echo "$as_me:$LINENO: \$? = $ac_status" >&57700 (exit $ac_status); } &&7701 { ac_try='test -z "$ac_c_werror_flag"7702 || test ! -s conftest.err'7703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&57704 (eval $ac_try) 2>&57705 ac_status=$?7706 echo "$as_me:$LINENO: \$? = $ac_status" >&57707 (exit $ac_status); }; } &&7708 { ac_try='test -s conftest.$ac_objext'7709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&57710 (eval $ac_try) 2>&57711 ac_status=$?7712 echo "$as_me:$LINENO: \$? = $ac_status" >&57713 (exit $ac_status); }; }; then7714 ac_cv_header_stdbool_h=yes7715 else7716 echo "$as_me: failed program was:" >&57717 sed 's/^/| /' conftest.$ac_ext >&57718 7719 ac_cv_header_stdbool_h=no7720 fi7721 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext7722 fi7723 echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&57724 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&67725 echo "$as_me:$LINENO: checking for _Bool" >&57726 echo $ECHO_N "checking for _Bool... $ECHO_C" >&67727 if test "${ac_cv_type__Bool+set}" = set; then7728 echo $ECHO_N "(cached) $ECHO_C" >&67729 else7730 cat >conftest.$ac_ext <<_ACEOF7731 /* confdefs.h. */7732 _ACEOF7733 cat confdefs.h >>conftest.$ac_ext7734 cat >>conftest.$ac_ext <<_ACEOF7735 /* end confdefs.h. */7736 $ac_includes_default7737 int7738 main ()7739 {7740 if ((_Bool *) 0)7741 return 0;7742 if (sizeof (_Bool))7743 return 0;7744 ;7745 return 0;7746 }7747 _ACEOF7748 rm -f conftest.$ac_objext7749 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&57750 (eval $ac_compile) 2>conftest.er17751 ac_status=$?7752 grep -v '^ *+' conftest.er1 >conftest.err7753 rm -f conftest.er17754 cat conftest.err >&57755 echo "$as_me:$LINENO: \$? = $ac_status" >&57756 (exit $ac_status); } &&7757 { ac_try='test -z "$ac_c_werror_flag"7758 || test ! -s conftest.err'7759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&57760 (eval $ac_try) 2>&57761 ac_status=$?7762 echo "$as_me:$LINENO: \$? = $ac_status" >&57763 (exit $ac_status); }; } &&7764 { ac_try='test -s conftest.$ac_objext'7765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&57766 (eval $ac_try) 2>&57767 ac_status=$?7768 echo "$as_me:$LINENO: \$? = $ac_status" >&57769 (exit $ac_status); }; }; then7770 ac_cv_type__Bool=yes7771 else7772 echo "$as_me: failed program was:" >&57773 sed 's/^/| /' conftest.$ac_ext >&57774 7775 ac_cv_type__Bool=no7776 fi7777 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext7778 fi7779 echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&57780 echo "${ECHO_T}$ac_cv_type__Bool" >&67781 if test $ac_cv_type__Bool = yes; then7782 7783 cat >>confdefs.h <<_ACEOF7784 #define HAVE__BOOL 17785 _ACEOF7786 7787 7788 fi7789 7790 if test $ac_cv_header_stdbool_h = yes; then7791 7792 cat >>confdefs.h <<\_ACEOF7793 #define HAVE_STDBOOL_H 17794 _ACEOF7795 7796 fi7797 7798 7799 # Checks for library functions.7800 7801 for ac_header in stdlib.h7802 do7803 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`7804 if eval "test \"\${$as_ac_Header+set}\" = set"; then7805 echo "$as_me:$LINENO: checking for $ac_header" >&57806 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&67807 if eval "test \"\${$as_ac_Header+set}\" = set"; then7808 echo $ECHO_N "(cached) $ECHO_C" >&67809 fi7810 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&57811 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&67812 else7813 # Is the header compilable?7814 echo "$as_me:$LINENO: checking $ac_header usability" >&57815 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&67816 cat >conftest.$ac_ext <<_ACEOF7817 /* confdefs.h. */7818 _ACEOF7819 cat confdefs.h >>conftest.$ac_ext7820 cat >>conftest.$ac_ext <<_ACEOF7821 /* end confdefs.h. */7822 $ac_includes_default7823 #include <$ac_header>7824 _ACEOF7825 rm -f conftest.$ac_objext7826 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&57827 (eval $ac_compile) 2>conftest.er17828 ac_status=$?7829 grep -v '^ *+' conftest.er1 >conftest.err7830 rm -f conftest.er17831 cat conftest.err >&57832 echo "$as_me:$LINENO: \$? = $ac_status" >&57833 (exit $ac_status); } &&7834 { ac_try='test -z "$ac_c_werror_flag"7835 || test ! -s conftest.err'7836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&57837 (eval $ac_try) 2>&57838 ac_status=$?7839 echo "$as_me:$LINENO: \$? = $ac_status" >&57840 (exit $ac_status); }; } &&7841 { ac_try='test -s conftest.$ac_objext'7842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&57843 (eval $ac_try) 2>&57844 ac_status=$?7845 echo "$as_me:$LINENO: \$? = $ac_status" >&57846 (exit $ac_status); }; }; then7847 ac_header_compiler=yes7848 else7849 echo "$as_me: failed program was:" >&57850 sed 's/^/| /' conftest.$ac_ext >&57851 7852 ac_header_compiler=no7853 fi7854 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext7855 echo "$as_me:$LINENO: result: $ac_header_compiler" >&57856 echo "${ECHO_T}$ac_header_compiler" >&67857 7858 # Is the header present?7859 echo "$as_me:$LINENO: checking $ac_header presence" >&57860 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&67861 cat >conftest.$ac_ext <<_ACEOF7862 /* confdefs.h. */7863 _ACEOF7864 cat confdefs.h >>conftest.$ac_ext7865 cat >>conftest.$ac_ext <<_ACEOF7866 /* end confdefs.h. */7867 #include <$ac_header>7868 _ACEOF7869 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&57870 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er17871 ac_status=$?7872 grep -v '^ *+' conftest.er1 >conftest.err7873 rm -f conftest.er17874 cat conftest.err >&57875 echo "$as_me:$LINENO: \$? = $ac_status" >&57876 (exit $ac_status); } >/dev/null; then7877 if test -s conftest.err; then7878 ac_cpp_err=$ac_c_preproc_warn_flag7879 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag7880 else7881 ac_cpp_err=7882 fi7883 else7884 ac_cpp_err=yes7885 fi7886 if test -z "$ac_cpp_err"; then7887 ac_header_preproc=yes7888 else7889 echo "$as_me: failed program was:" >&57890 sed 's/^/| /' conftest.$ac_ext >&57891 7892 ac_header_preproc=no7893 fi7894 rm -f conftest.err conftest.$ac_ext7895 echo "$as_me:$LINENO: result: $ac_header_preproc" >&57896 echo "${ECHO_T}$ac_header_preproc" >&67897 7898 # So? What about this header?7899 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in7900 yes:no: )7901 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&57902 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}7903 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&57904 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}7905 ac_header_preproc=yes7906 ;;7907 no:yes:* )7908 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&57909 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}7910 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&57911 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}7912 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&57913 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}7914 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&57915 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}7916 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&57917 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}7918 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&57919 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}7920 (7921 cat <<\_ASBOX7922 ## ---------------------------------------------- ##7923 ## Report this to orxonox-dev at mail.datacore.ch ##7924 ## ---------------------------------------------- ##7925 _ASBOX7926 ) |7927 sed "s/^/$as_me: WARNING: /" >&27928 ;;7929 esac7930 echo "$as_me:$LINENO: checking for $ac_header" >&57931 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&67932 if eval "test \"\${$as_ac_Header+set}\" = set"; then7933 echo $ECHO_N "(cached) $ECHO_C" >&67934 else7935 eval "$as_ac_Header=\$ac_header_preproc"7936 fi7937 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&57938 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&67939 7940 fi7941 if test `eval echo '${'$as_ac_Header'}'` = yes; then7942 cat >>confdefs.h <<_ACEOF7943 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 17944 _ACEOF7945 7946 fi7947 7948 done7949 7950 7776 echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 7951 7777 echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6 … … 8276 8102 Usually this means the macro was only invoked conditionally." >&5 8277 8103 echo "$as_me: error: conditional \"HAVE_GTK2\" was never defined. 8278 Usually this means the macro was only invoked conditionally." >&2;}8279 { (exit 1); exit 1; }; }8280 fi8281 if test -z "${HAVE_GTHREAD_TRUE}" && test -z "${HAVE_GTHREAD_FALSE}"; then8282 { { echo "$as_me:$LINENO: error: conditional \"HAVE_GTHREAD\" was never defined.8283 Usually this means the macro was only invoked conditionally." >&58284 echo "$as_me: error: conditional \"HAVE_GTHREAD\" was never defined.8285 8104 Usually this means the macro was only invoked conditionally." >&2;} 8286 8105 { (exit 1); exit 1; }; } … … 8564 8383 cat >&5 <<_CSEOF 8565 8384 8566 This file was extended by orxonox $as_me 0.2. 2-pre-alpha, which was8385 This file was extended by orxonox $as_me 0.2.3-pre-alpha, which was 8567 8386 generated by GNU Autoconf 2.59. Invocation command line was 8568 8387 … … 8627 8446 cat >>$CONFIG_STATUS <<_ACEOF 8628 8447 ac_cs_version="\\ 8629 orxonox config.status 0.2. 2-pre-alpha8448 orxonox config.status 0.2.3-pre-alpha 8630 8449 configured by $0, generated by GNU Autoconf 2.59, 8631 8450 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" … … 8882 8701 s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t 8883 8702 s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t 8703 s,@RANLIB@,$RANLIB,;t t 8704 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t 8884 8705 s,@CC@,$CC,;t t 8885 8706 s,@CFLAGS@,$CFLAGS,;t t … … 8899 8720 s,@DOXYGEN_FALSE@,$DOXYGEN_FALSE,;t t 8900 8721 s,@GPROF@,$GPROF,;t t 8722 s,@PKG_CONFIG@,$PKG_CONFIG,;t t 8901 8723 s,@MSBITFIELDS@,$MSBITFIELDS,;t t 8902 8724 s,@GTK2_LIBS@,$GTK2_LIBS,;t t … … 8904 8726 s,@HAVE_GTK2_TRUE@,$HAVE_GTK2_TRUE,;t t 8905 8727 s,@HAVE_GTK2_FALSE@,$HAVE_GTK2_FALSE,;t t 8906 s,@GTHREAD_LIBS@,$GTHREAD_LIBS,;t t8907 s,@GTHREAD_CFLAGS@,$GTHREAD_CFLAGS,;t t8908 s,@HAVE_GTHREAD_TRUE@,$HAVE_GTHREAD_TRUE,;t t8909 s,@HAVE_GTHREAD_FALSE@,$HAVE_GTHREAD_FALSE,;t t8910 8728 s,@CURL_LIBS@,$CURL_LIBS,;t t 8911 8729 s,@CURL_CFLAGS@,$CURL_CFLAGS,;t t -
orxonox/branches/physics/configure.ac
r3953 r4178 23 23 ######################### 24 24 AC_PREREQ(2.56) 25 AC_INIT(orxonox, 0.2. 2-pre-alpha, [orxonox-dev at mail.datacore.ch])25 AC_INIT(orxonox, 0.2.3-pre-alpha, [orxonox-dev at mail.datacore.ch]) 26 26 27 27 ## Detect the canonical host and target build environment. … … 39 39 ######################### 40 40 AC_PROG_CXX 41 AC_PROG_RANLIB 41 42 AC_HEADER_STDC 42 43 … … 96 97 fi 97 98 if test x$def_gtk = xno; then 98 echo "no"99 fi100 101 #------------------#102 # gThread-disabled #103 #------------------#104 AC_MSG_CHECKING([if gThread should be enabled])105 AC_ARG_WITH([gthread],106 AC_HELP_STRING( [--without-gthread],107 [Prevents gThread from being loaded]), [def_gthread=no], [def_gthread=yes])108 if test x$def_gthread = xyes; then109 echo "yes"110 fi111 if test x$def_gthread = xno; then112 echo "no"113 fi114 115 #------------------#116 # pthread-disabled #117 #------------------#118 AC_MSG_CHECKING([if pthread should be enabled])119 AC_ARG_WITH([pthread],120 AC_HELP_STRING( [--without-pthread],121 [Prevents pthread from being loaded]), [def_pthread=no], [def_pthread=yes])122 if test x$def_pthread = xyes; then123 echo "yes"124 fi125 if test x$def_pthread = xno; then126 99 echo "no" 127 100 fi … … 218 191 #--------------------# 219 192 AC_PATH_PROG(GPROF, gprof) 193 194 #-------------------------# 195 # checking for pkg-config # 196 #-------------------------# 197 if test x$def_gtk = xyes; then 198 AC_PATH_PROG(PKG_CONFIG, pkg-config) 199 fi 200 220 201 221 202 ######################### … … 462 443 #-----# 463 444 if test x$def_gtk = xyes; then 464 465 445 #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no) 466 446 AC_MSG_CHECKING([for gtk2.0]) 467 if ` pkg-config--exists gtk+-2.0`; then447 if `$PKG_CONFIG --exists gtk+-2.0`; then 468 448 echo "yes" 469 449 have_gtk2=yes 470 GTK2_LIBS=` pkg-config--libs gtk+-2.0`471 GTK2_CFLAGS=` pkg-config--cflags gtk+-2.0`450 GTK2_LIBS=`$PKG_CONFIG --libs gtk+-2.0` 451 GTK2_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0` 472 452 AC_DEFINE_UNQUOTED(HAVE_GTK2, 1, [if we have GTK2]) 453 if test $DEBUG -ge 3; then 454 echo "cflags: $GTK2_CFLAGS" 455 echo "libs: $GTK2_LIBS" 456 fi 473 457 else 474 458 echo "no" … … 479 463 AC_SUBST(GTK2_CFLAGS) 480 464 AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes) 481 482 #---------#483 # gThread #484 #---------#485 if test x$def_gthread = xyes; then486 487 AC_MSG_CHECKING([for gthread])488 if `pkg-config --exists gthread-2.0`; then489 echo "yes"490 have_gthread=yes491 GTHREAD_LIBS=`pkg-config --libs gthread-2.0`492 GTHREAD_CFLAGS=`pkg-config --cflags gthread-2.0`493 AC_DEFINE_UNQUOTED(HAVE_GTHREAD, 1, [if we have gThread])494 else495 echo "no"496 fi497 498 fi499 AC_SUBST(GTHREAD_LIBS)500 AC_SUBST(GTHREAD_CFLAGS)501 AM_CONDITIONAL(HAVE_GTHREAD, test x$have_gthread = xyes)502 465 503 466 #---------# … … 521 484 AC_SUBST(CURL_CFLAGS) 522 485 AM_CONDITIONAL(HAVE_CURL, test x$have_curl = xyes) 523 524 #---------#525 # pthread #526 #---------#527 if test x$def_pthread = xyes ; then528 if test x$have_gthread = xyes ; then529 AC_CHECK_HEADERS([pthread.h], [pthreadHeader="yes"], [pthreadHeader="no"])530 AC_CHECK_LIB([pthread], [main], [FOUND_pthread=yes])531 if test x$FOUND_pthread = xyes ; then532 LIBS="$LIBS -lpthread"533 fi534 fi535 fi536 537 486 538 487 #--------# -
orxonox/branches/physics/src/Makefile.am
r3961 r4178 8 8 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics 9 9 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/importer 10 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/particles 10 11 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui 12 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui/gui 11 13 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/lang 12 14 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/util … … 21 23 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/common 22 24 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/physics 23 24 25 AM_LDFLAGS= $(MWINDOWS) 25 AM_CXXFLAGS+=-I$(MAINSRCDIR)/subprojects 26 27 26 28 27 29 #"-O3 -pedantic -fPIC -ffast-math -I/usr/X11R6/include" 28 30 29 31 30 bin_PROGRAMS=orxonox 31 32 bin_PROGRAMS=orxonox 33 noinst_LIBRARIES = libORXgui.a 34 35 orxonox_DEPENDENCIES = libORXgui.a 36 orxonox_LDADD = libORXgui.a $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS) 32 37 orxonox_SOURCES= orxonox.cc \ 33 38 game_loader.cc \ … … 37 42 track_manager.cc \ 38 43 track_node.cc \ 44 factory.cc \ 39 45 util/animation/animation.cc \ 40 46 util/animation/animation3d.cc \ … … 70 76 lib/graphics/importer/material.cc \ 71 77 lib/graphics/importer/texture.cc \ 78 lib/graphics/particles/particle_engine.cc \ 79 lib/graphics/particles/particle_system.cc \ 80 lib/graphics/particles/particle_emitter.cc \ 72 81 lib/lang/base_entity.cc \ 73 82 lib/lang/base_object.cc \ … … 82 91 lib/math/vector.cc \ 83 92 lib/math/curve.cc \ 84 glmenu/glmenu_imagescreen.cc 93 glmenu/glmenu_imagescreen.cc \ 94 lib/xmlparser/tinyxml.cc \ 95 lib/xmlparser/tinystr.cc \ 96 lib/xmlparser/tinyxmlerror.cc \ 97 lib/xmlparser/tinyxmlparser.cc \ 98 subprojects/benchmark.cc 85 99 86 100 noinst_HEADERS = orxonox.h \ … … 125 139 defs/error.h \ 126 140 defs/debug.h \ 141 defs/globals.h \ 127 142 lib/coord/p_node.h \ 128 143 lib/coord/null_parent.h \ … … 131 146 lib/graphics/light.h \ 132 147 lib/graphics/text_engine.h \ 148 lib/graphics/particles/particle_engine.h \ 149 lib/graphics/particles/particle_system.h \ 150 lib/graphics/particles/particle_emitter.h \ 133 151 lib/data/data_tank.h \ 134 152 lib/lang/base_entity.h \ … … 140 158 util/physics/physics_engine.h \ 141 159 util/physics/physical_interaction.h \ 142 160 util/physics/physical_interaction_sym.h \ 143 161 util/physics/physical_interaction_asym.h \ 144 162 lib/util/ini_parser.h \ 145 163 lib/math/vector.h \ 146 164 lib/math/curve.h \ 147 glmenu/glmenu_imagescreen.h 165 glmenu/glmenu_imagescreen.h \ 166 lib/gui/gui/gui.h \ 167 lib/gui/gui/gui_gtk.h \ 168 lib/gui/gui/gui_element.h \ 169 lib/gui/gui/gui_video.h \ 170 lib/gui/gui/gui_audio.h \ 171 lib/gui/gui/gui_exec.h \ 172 lib/gui/gui/gui_flags.h \ 173 lib/gui/gui/gui_banner.h \ 174 lib/gui/gui/gui_keys.h \ 175 lib/gui/gui/gui_update.h \ 176 subprojects/benchmark.h 177 178 libORXgui_a_CPPFLAGS=$(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS) 179 180 libORXgui_a_SOURCES = lib/gui/gui/gui.cc \ 181 lib/gui/gui/gui_gtk.cc \ 182 lib/gui/gui/gui_element.cc \ 183 lib/gui/gui/gui_video.cc \ 184 lib/gui/gui/gui_audio.cc \ 185 lib/gui/gui/gui_exec.cc \ 186 lib/gui/gui/gui_flags.cc \ 187 lib/gui/gui/gui_banner.cc \ 188 lib/gui/gui/gui_keys.cc \ 189 lib/gui/gui/gui_update.cc 148 190 149 191 -
orxonox/branches/physics/src/command_node.cc
r3654 r4178 57 57 this->bEnabled = true; 58 58 this->world = NULL; 59 this->loadBindings 59 this->loadBindings(filename); 60 60 } 61 61 … … 111 111 \param filename: The path and name of the file to load the bindings from 112 112 */ 113 void CommandNode::loadBindings (char* filename )113 void CommandNode::loadBindings (char* filename = DEFAULT_KEYBIND_FILE) 114 114 { 115 115 FILE* stream; 116 116 117 117 PRINTF(4)("Loading key bindings from %s\n", filename); 118 119 if( filename == NULL) filename = DEFAULT_KEYBIND_FILE;120 118 121 119 // remove old bindings if present … … 128 126 // create parser 129 127 IniParser parser (filename); 130 if( parser.getSection ( "Bindings") == -1)131 { 132 PRINTF(1)("Could not find key bindings in %s\n", filename);128 if( parser.getSection (CONFIG_SECTION_PLAYER "1") == -1) 129 { 130 PRINTF(1)("Could not find key bindings " CONFIG_SECTION_PLAYER"1 in %s\n", filename); 133 131 return; 134 132 } … … 144 142 while( parser.nextVar (namebuf, valuebuf) != -1) 145 143 { 146 index = nameToIndex ( namebuf);144 index = nameToIndex (valuebuf); 147 145 switch( index[0]) 148 146 { 149 147 case 0: 150 PRINTF(4)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), valuebuf);151 strcpy (aliases->keys[index[1]], valuebuf);148 PRINTF(4)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), namebuf); 149 strcpy (aliases->keys[index[1]], namebuf); 152 150 break; 153 151 case 1: 154 PRINTF(4)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), valuebuf);155 strcpy (aliases->buttons[index[1]], valuebuf);152 PRINTF(4)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), namebuf); 153 strcpy (aliases->buttons[index[1]], namebuf); 156 154 break; 157 155 default: … … 161 159 memset (valuebuf, 0, 256); 162 160 } 161 162 163 // PARSE MISC SECTION 164 if( parser.getSection (CONFIG_SECTION_MISC_KEYS) == -1) 165 { 166 PRINTF(1)("Could not find key bindings in %s\n", filename); 167 return; 168 } 169 170 while( parser.nextVar (namebuf, valuebuf) != -1) 171 { 172 index = nameToIndex (valuebuf); 173 switch( index[0]) 174 { 175 case 0: 176 PRINTF(4)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), namebuf); 177 strcpy (aliases->keys[index[1]], namebuf); 178 break; 179 case 1: 180 PRINTF(4)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), namebuf); 181 strcpy (aliases->buttons[index[1]], namebuf); 182 break; 183 default: 184 break; 185 } 186 memset (namebuf, 0, 256); 187 memset (valuebuf, 0, 256); 188 } 189 163 190 } 164 191 -
orxonox/branches/physics/src/command_node.h
r3608 r4178 18 18 #define N_STD_KEYS SDLK_LAST 19 19 #define N_BUTTONS 6 20 #define DEFAULT_KEYBIND_FILE " default.ini"20 #define DEFAULT_KEYBIND_FILE "~/.orxonox/orxonox.conf" 21 21 22 22 //! Key aliasing structure -
orxonox/branches/physics/src/defs/debug.h
r3953 r4178 59 59 #define DEBUG_MODULE_PNODE 1 60 60 #define DEBUG_MODULE_WORLD_ENTITY 0 61 #define DEBUG_MODULE_COMMAND_NODE 061 #define DEBUG_MODULE_COMMAND_NODE 4 62 62 #define DEBUG_MODULE_GRAPHICS 0 63 #define DEBUG_MODULE_LOAD 064 65 #define DEBUG_MODULE_IMPORTER 163 #define DEBUG_MODULE_LOAD 2 64 65 #define DEBUG_MODULE_IMPORTER 3 66 66 #define DEBUG_MODULE_TRACK_MANAGER 0 67 67 #define DEBUG_MODULE_GARBAGE_COLLECTOR 0 … … 72 72 #define DEBUG_MODULE_FONT 1 73 73 #define DEBUG_MODULE_ANIM 1 74 #define DEBUG_MODULE_PARTICLE 4 74 75 75 76 #define DEBUG_MODULE_NULL_PARENT 0 -
orxonox/branches/physics/src/defs/stdincl.h
r3863 r4178 25 25 #include "error.h" 26 26 #include "debug.h" 27 #include "globals.h" 27 28 28 29 #include "compiler.h" 30 #include "xmlparser/tinyxml.h" 31 #include "factory.h" 29 32 30 33 #endif /* _STDINCL_H */ -
orxonox/branches/physics/src/game_loader.cc
r3727 r4178 25 25 #include "command_node.h" 26 26 #include "vector.h" 27 #include "resource_manager.h" 28 #include "factory.h" 27 29 28 30 #include <string.h> … … 35 37 36 38 37 GameLoader::GameLoader () {} 39 GameLoader::GameLoader () 40 { 41 first = NULL; 42 } 38 43 39 44 … … 72 77 { 73 78 ErrorMessage errorCode; 74 75 this->currentCampaign = this->fileToCampaign(name); 79 char* campaignName; 80 if (ResourceManager::isFile(name)) 81 { 82 this->currentCampaign = this->fileToCampaign(name); 83 } 84 else 85 { 86 campaignName = new char[strlen(ResourceManager::getInstance()->getDataDir())+strlen(name)]; 87 sprintf(campaignName, "%s%s", ResourceManager::getInstance()->getDataDir(), name); 88 this->currentCampaign = this->fileToCampaign(campaignName); 89 delete campaignName; 90 } 76 91 } 77 92 … … 158 173 this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns 159 174 */ 160 Campaign* GameLoader::fileToCampaign(c har *name)175 Campaign* GameLoader::fileToCampaign(const char *name) 161 176 { 162 177 /* do not entirely load the campaign. just the current world … … 164 179 can load everything it needs into memory then. 165 180 */ 181 182 if( name == NULL) 183 { 184 PRINTF(2)("No filename specified for loading"); 185 return NULL; 186 } 187 188 TiXmlDocument* XMLDoc = new TiXmlDocument( name); 189 // load the campaign document 190 if( !XMLDoc->LoadFile()) 191 { 192 // report an error 193 PRINTF(1)("Could not load XML File %s: %s @ %d:%d\n", name, XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol()); 194 delete XMLDoc; 195 return NULL; 196 } 197 198 // check basic validity 199 TiXmlElement* root = XMLDoc->RootElement(); 200 assert( root != NULL); 201 202 if( strcmp( root->Value(), "Campaign")) 203 { 204 // report an error 205 PRINTF(2)("Specified XML File is not an orxonox campaign file (Campaign element missing)\n"); 206 delete XMLDoc; 207 return NULL; 208 } 209 210 // construct campaign 211 Campaign* c = new Campaign( root); 212 213 // free the XML data 214 delete XMLDoc; 215 216 return c; 166 217 } 167 218 … … 174 225 bool GameLoader::worldCommand (Command* cmd) 175 226 { 176 if( !strcmp( cmd->cmd, "up_world"))227 if( !strcmp( cmd->cmd, CONFIG_NAME_NEXT_WORLD)) 177 228 { 178 229 if( !cmd->bUp) … … 182 233 return true; 183 234 } 184 else if( !strcmp( cmd->cmd, "down_world"))235 else if( !strcmp( cmd->cmd, CONFIG_NAME_PREV_WORLD)) 185 236 { 186 237 if( !cmd->bUp) … … 190 241 return true; 191 242 } 192 else if( !strcmp( cmd->cmd, "pause"))243 else if( !strcmp( cmd->cmd, CONFIG_NAME_PAUSE)) 193 244 { 194 245 if( !cmd->bUp) … … 201 252 return true; 202 253 } 203 else if( !strcmp( cmd->cmd, "quit"))254 else if( !strcmp( cmd->cmd, CONFIG_NAME_QUIT)) 204 255 { 205 256 if( !cmd->bUp) this->stop(); … … 230 281 this->currentCampaign->previousLevel(); 231 282 } 283 284 /** 285 \brief add a Factory to the Factory Q 286 \param factory a Factory to be registered 287 */ 288 void GameLoader::registerFactory( Factory* factory) 289 { 290 assert( factory != NULL); 291 292 PRINTF(4)("Registered factory for '%s'\n", factory->getFactoryName()); 293 294 if( first == NULL) first = factory; 295 else first->registerFactory( factory); 296 } 297 298 /** 299 \brief load a StoryEntity 300 \param element a XMLElement containing all the needed info 301 */ 302 BaseObject* GameLoader::fabricate( TiXmlElement* element) 303 { 304 assert( element != NULL); 305 306 if( first == NULL) 307 { 308 PRINTF(1)("GameLoader does not know any factories, fabricate() failed\n"); 309 return NULL; 310 } 311 312 if( element->Value() != NULL) 313 { 314 PRINTF(4)("Attempting fabrication of a '%s'\n", element->Value()); 315 BaseObject* b = first->fabricate( element); 316 if( b == NULL) 317 PRINTF(2)("Failed to fabricate a '%s'\n", element->Value()); 318 else 319 PRINTF(4)("Successfully fabricated a '%s'\n", element->Value()); 320 return b; 321 } 322 323 PRINTF(2)("Fabricate failed, TiXmlElement did not contain a value\n"); 324 325 return NULL; 326 } -
orxonox/branches/physics/src/game_loader.h
r3629 r4178 10 10 #include "story_def.h" 11 11 #include "comincl.h" 12 12 13 13 14 //----------------------------------------------------------------------------- … … 51 52 ErrorMessage loadDebugCampaign(Uint32 campaignID); 52 53 54 void registerFactory( Factory* factory); 55 BaseObject* fabricate( TiXmlElement* data); 56 53 57 private: 54 58 GameLoader (); … … 60 64 Campaign* currentCampaign; //!> the current campaign playing 61 65 62 Campaign* fileToCampaign(c har* name);66 Campaign* fileToCampaign(const char* name); 63 67 68 Factory* first; 64 69 }; 65 70 -
orxonox/branches/physics/src/glmenu/glmenu_imagescreen.cc
r3729 r4178 20 20 21 21 #include "stdincl.h" 22 #include "graphics_engine.h" 22 23 #include "material.h" 23 24 25 CREATE_FACTORY(GLMenuImageScreen); 26 27 24 28 using namespace std; 25 26 GLMenuImageScreen* GLMenuImageScreen::singletonRef = 0;27 28 GLMenuImageScreen* GLMenuImageScreen::getInstance()29 {30 if(!singletonRef)31 singletonRef = new GLMenuImageScreen ();32 return singletonRef;33 }34 35 29 /** 36 30 \brief standard constructor 37 38 \todo this constructor is not jet implemented - do it39 31 */ 40 32 GLMenuImageScreen::GLMenuImageScreen () 41 33 { 42 this->setClassName ("GLMenuImageScreen");43 34 this->init(); 44 35 } 45 36 37 /** 38 \param root The Element to load the GLMenu from 39 */ 40 GLMenuImageScreen::GLMenuImageScreen (TiXmlElement* root) 41 { 42 this->init(); 43 this->load(root); 44 45 } 46 47 /** 48 \brief Loads a GLMenu from an inputElement 49 \param root The Element to load the GLMenu from 50 51 Tags are: 52 \li BackgroundImage STRING: the background Image 53 \li BarImage: STRING: the Image on the Bar 54 \li BackgroundPS: FLOAT FLOAT FLOAT FLOAT: posX posY scaleX scaleY 55 \li BarPS: FLOAT FLOAT FLOAT FLOAT: posX posY scaleX scaleY 56 \li ElementCount: INT: how many elements will be loaded 57 */ 58 void GLMenuImageScreen::load(TiXmlElement* root) 59 { 60 const char* string; 61 62 // Model Loading 63 string = grabParameter( root, "BackgroundImage"); 64 if( string != NULL) 65 this->setBackgroundImage(string); 66 67 string = grabParameter(root, "BackgroundPS"); 68 if (string != NULL) 69 { 70 float f1, f2, f3, f4; 71 sscanf (string, "%f %f %f %f", &f1, &f2, &f3, &f4); 72 this->setPosition(f1,f2); 73 this->setScale(f3,f4); 74 } 75 76 string = grabParameter( root, "BarImage"); 77 if (string != NULL) 78 this->setBarImage(string); 79 string = grabParameter(root, "BarPS"); 80 if (string != NULL) 81 { 82 float f1, f2, f3, f4; 83 sscanf (string, "%f %f %f %f", &f1, &f2, &f3, &f4); 84 this->setBarPosScale(f1,f2,f3,f4); 85 } 86 87 string = grabParameter( root, "ElementCount"); 88 if (string != NULL) 89 this->setMaximum(atoi(string)); 90 } 46 91 47 92 /** … … 51 96 GLMenuImageScreen::~GLMenuImageScreen() 52 97 { 53 if (this->backMat)54 delete this->backMat;98 delete this->backMat; 99 delete this->barMat; 55 100 } 56 101 … … 60 105 void GLMenuImageScreen::init () 61 106 { 62 /* 63 int w = 680; 64 int h = 480; 65 66 glViewport(0,0,w,h); 67 68 glMatrixMode(GL_PROJECTION); 69 glLoadIdentity(); 70 gluPerspective(45.0f,(GLfloat)w/(GLfloat)h, .5f ,150.0f); 71 glMatrixMode(GL_MODELVIEW); 72 73 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 74 glLoadIdentity(); 75 gluLookAt(0, 0, 6, 0, 0, 0, 0, 1, 0); 76 77 // Bind the texture stored at the zero index of g_Texture[] 78 //glBindTexture(GL_TEXTURE_2D, g_Texture[0]); 79 */ 80 81 107 this->setClassName ("GLMenuImageScreen"); 108 82 109 // Select Our VU Meter Background Texture 83 110 this->backMat = new Material("load_screen"); 84 this->ba ckMat->setDiffuseMap("pictures/load_screen.jpg");111 this->barMat = new Material("bar"); 85 112 this->maxValue = 10; 86 113 this->currentValue = 0; 87 114 this->setPosition(0,0); 115 this->setScale(1,1); 116 this->setBarPosScale( .6, .75, .3, .1); 88 117 // End of Background image code. 89 118 } 90 91 92 /**93 \brief function to innit screen with all attributes set94 \param name of the background-image file95 \param height of the ImageScreen96 \param width of the Image Screen97 \param x offset from (0, 0)98 \param y offset from (0, 0)99 100 GLMenu uses its own coordinating system: upper left corner is (0, 0). x-axis is down=height,101 right axis is right direction (=width)102 */103 void GLMenuImageScreen::init (char* backImageName, float height, float width,104 float offsetX, float offsetY)105 {}106 107 108 /**109 \brief draws the ImageScreen to the screenbuffer110 */111 void GLMenuImageScreen::draw ()112 {113 114 glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);115 116 PRINTF(4)("GLMenuImagEscreen::draw() - drawing step %i/%i\n",117 this->currentValue, this->maxValue);118 119 /* screen size */120 int screenWidth = 640;121 int screenHeight = 480;122 123 /* set image size */124 int imageWidth = 640;125 int imageHeight = 480;126 127 /* start pos of image */128 int offsetX = (screenWidth - imageWidth)/2;129 int offsetY = (screenHeight - imageHeight)/2;130 131 /* loadbar pos */132 int barX = 390;133 int barY = 50;134 int barWidth = 230;135 int barHeight = 30;136 137 float val = ((float)this->currentValue/(float)this->maxValue) * barWidth;138 if( val > (float)barWidth)139 val = (float)barWidth;140 141 glMatrixMode(GL_PROJECTION);142 glPushMatrix();143 glLoadIdentity();144 /* set up an ortho screen */145 glOrtho(0, screenWidth, 0, screenHeight, -1, 1);146 glMatrixMode(GL_MODELVIEW);147 glLoadIdentity();148 glPushMatrix();149 150 glEnable(GL_BLEND);151 glPushAttrib(GL_LIGHTING_BIT | GL_TRANSFORM_BIT);152 glDisable(GL_LIGHTING);153 154 /* draw the progress bar */155 glBegin(GL_QUADS);156 glColor3f(0.96, 0.84, 0.34);157 glVertex2i(barX, barY);158 glVertex2i(barX + (int)val, barY);159 glVertex2i(barX + (int)val, barY + barHeight);160 glVertex2i(barX, barY + barHeight);161 glColor3f(1.0, 1.0, 1.0);162 glEnd();163 164 glBegin(GL_QUADS);165 glColor3f(0.0, 0.0, 0.0);166 glVertex2i(barX, barY);167 glVertex2i(barX + barWidth, barY);168 glVertex2i(barX + barWidth, barY + barHeight);169 glVertex2i(barX, barY + barHeight);170 glColor3f(1.0, 1.0, 1.0);171 glEnd();172 173 /* draw black border */174 glBegin(GL_QUADS);175 glColor3f(0.0, 0.0, 0.0);176 glVertex2i(barX-1, barY-1);177 glVertex2i(barX + barWidth +1, barY-1);178 glVertex2i(barX + barWidth+1, barY + barHeight+1);179 glVertex2i(barX - 1, barY + barHeight +1);180 glColor3f(1.0, 1.0, 1.0);181 glEnd();182 183 /* draw white border */184 glBegin(GL_QUADS);185 glColor3f(1.0, 1.0, 1.0);186 glVertex2i(barX-2, barY-2);187 glVertex2i(barX + barWidth +2, barY-2);188 glVertex2i(barX + barWidth+2, barY + barHeight+2);189 glVertex2i(barX - 2, barY + barHeight +2);190 glColor3f(1.0, 1.0, 1.0);191 glEnd();192 193 backMat->select();194 glBegin(GL_QUADS);195 glTexCoord2i(0, 0); glVertex2i(offsetX, offsetY);196 glTexCoord2i(1, 0); glVertex2i(offsetX + imageWidth, offsetY);197 glTexCoord2i(1, 1); glVertex2i(offsetX + imageWidth, offsetY + imageHeight);198 glTexCoord2i(0, 1); glVertex2i(offsetX, offsetY + imageHeight);199 glEnd();200 glDisable(GL_TEXTURE_2D);201 202 glDisable(GL_BLEND);203 glPopMatrix();204 glMatrixMode(GL_PROJECTION);205 glPopMatrix();206 glPopAttrib();207 208 SDL_GL_SwapBuffers();209 }210 211 119 212 120 /** … … 214 122 \param file name of the backgroun-image 215 123 */ 216 void GLMenuImageScreen::setBackImageName (char* backImageName) 217 {} 124 void GLMenuImageScreen::setBackgroundImage (const char* backImageName) 125 { 126 this->backMat->setDiffuseMap(backImageName); 127 } 218 128 219 129 220 130 /** 221 131 \brief sets position of the ImageScreen 222 \param x offset from (0, 0)223 \param y offset from (0, 0)132 \param x offset from the top left corner in percent(0-1) of the screensize 133 \param y offset from the top left corner in percent(0-1) of the screensize 224 134 */ 225 135 void GLMenuImageScreen::setPosition(float offsetX, float offsetY) 226 {} 136 { 137 this->offsetX = offsetX; 138 this->offsetY = offsetY; 139 } 227 140 228 141 229 142 /* 230 143 \brief sets size of the ImageScreen 231 \param height of the ImageScreen 232 \param width of the Image Screen 233 */ 234 void GLMenuImageScreen::setSize(float height, float width) 235 {} 144 \param scaleX the scaleing of the image into the x-direction (in percent (0-1)) 145 \param scaleY the scaleing of the image into the y-direction (in percent (0-1)) 146 */ 147 void GLMenuImageScreen::setScale(float scaleX, float scaleY) 148 { 149 this->scaleX = scaleX; 150 this->scaleY = scaleY; 151 } 152 153 /** 154 \param barImage An image for the Bar 155 */ 156 void GLMenuImageScreen::setBarImage(const char* barImage) 157 { 158 this->barMat->setDiffuseMap(barImage); 159 } 160 161 /** 162 \brief sets the Position and the Size of the bar 163 \param barX The Position in the x-direction in percent of the screen (0-1) 164 \param barY The Position in the y-direction in percent of the screen (0-1) 165 \param barW The Size in the x-direction in percent of the screen (0-1) 166 \param barH The Size in the y-direction in percent of the screen (0-1) 167 */ 168 void GLMenuImageScreen::setBarPosScale(float barX, float barY, float barW, float barH) 169 { 170 this->barX = barX; 171 this->barY = barY; 172 this->barW = barW; 173 this->barH = barH; 174 } 236 175 237 176 … … 285 224 this->draw(); 286 225 } 226 227 228 229 /** 230 \brief draws the ImageScreen to the screenbuffer 231 */ 232 void GLMenuImageScreen::draw () 233 { 234 glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); 235 236 PRINTF(4)("GLMenuImagEscreen::draw() - drawing step %i/%i\n", 237 this->currentValue, this->maxValue); 238 239 /* screen size */ 240 int screenWidth = GraphicsEngine::getInstance()->getResolutionX(); 241 int screenHeight = GraphicsEngine::getInstance()->getResolutionY(); 242 243 int imageWidth = (int)(screenWidth * this->scaleX); 244 int imageHeight = (int)(screenHeight * this->scaleY); 245 246 int offsetX = (int)(this->offsetX * screenWidth); 247 int offsetY = (int)(this->offsetY * screenHeight); 248 249 /* loadbar pos */ 250 int barX = (int)(this->barX *screenWidth); 251 int barY = (int)(this->barY *screenHeight); 252 int barW = (int)(this->barW *screenWidth); 253 int barH = (int)(this->barH *screenHeight); 254 255 float val = (float)this->currentValue/(float)this->maxValue; 256 257 if( val > barW) 258 val = barW; 259 260 GraphicsEngine::enter2DMode(); 261 262 /* draw the BackGround */ 263 backMat->select(); 264 glBegin(GL_TRIANGLE_STRIP); 265 glTexCoord2i(0, 0); glVertex2i(offsetX, offsetY + imageHeight); 266 glTexCoord2i(1, 0); glVertex2i(offsetX +imageWidth, offsetY + imageHeight); 267 glTexCoord2i(0, 1); glVertex2i(offsetX, offsetY); 268 glTexCoord2i(1, 1); glVertex2i(offsetX + imageWidth, offsetY); 269 glEnd(); 270 271 glDisable(GL_TEXTURE_2D); 272 /* draw white border */ 273 glBegin(GL_LINE_LOOP); 274 glColor3f(1.0, 1.0, 1.0); 275 glVertex2i(barX - 2, barY - 2); 276 glVertex2i(barX + barW + 2, barY - 2); 277 glVertex2i(barX + barW + 2, barY + barH + 2); 278 glVertex2i(barX - 2, barY + barH + 2); 279 glColor3f(1.0, 1.0, 1.0); 280 glEnd(); 281 282 /* draw the progress bar */ 283 barMat->select(); 284 glBegin(GL_TRIANGLE_STRIP); 285 glTexCoord2f(0, 0); glVertex2i(barX, barY + barH); 286 glTexCoord2f(val, 0); glVertex2i(barX + (int)(val * this->barW * (float)screenWidth), barY + barH); 287 glTexCoord2f(0, 1); glVertex2i(barX, barY); 288 glTexCoord2f(val, 1); glVertex2i(barX + (int)(val * this->barW * (float)screenWidth), barY); 289 glEnd(); 290 291 /* 292 glBegin(GL_QUADS); 293 glColor3f(0.0, 0.0, 0.0); 294 glVertex2i(barX, barY); 295 glVertex2i(barX + barWidth, barY); 296 glVertex2i(barX + barWidth, barY + barHeight); 297 glVertex2i(barX, barY + barHeight); 298 glColor3f(1.0, 1.0, 1.0); 299 glEnd(); 300 301 /* draw black border 302 glBegin(GL_QUADS); 303 glColor3f(0.0, 0.0, 0.0); 304 glVertex2i(barX-1, barY-1); 305 glVertex2i(barX + barWidth +1, barY-1); 306 glVertex2i(barX + barWidth+1, barY + barHeight+1); 307 glVertex2i(barX - 1, barY + barHeight +1); 308 glColor3f(1.0, 1.0, 1.0); 309 glEnd(); 310 311 */ 312 313 GraphicsEngine::leave2DMode(); 314 315 SDL_GL_SwapBuffers(); 316 } 317 318 -
orxonox/branches/physics/src/glmenu/glmenu_imagescreen.h
r3675 r4178 11 11 12 12 class Material; 13 class TiXmlElement; 13 14 14 15 class GLMenuImageScreen : public BaseObject { 15 16 16 p rivate:17 public: 17 18 GLMenuImageScreen (); 18 19 public:19 GLMenuImageScreen (TiXmlElement* root); 20 void load(TiXmlElement* root); 20 21 virtual ~GLMenuImageScreen (); 21 22 static GLMenuImageScreen* getInstance();23 24 static GLMenuImageScreen* singletonRef;25 22 26 23 void init (); 27 void init (char* backImageName, float height, float width,28 float offsetX, float offsetY);29 24 30 25 void draw (); 31 26 32 void setBackImageName (char* backImageName); 33 void setPosition (float offsetX, float offsetY); 34 void setSize (float height, float width); 35 27 void setBackgroundImage(const char* backImageName); 28 void setPosition(float offsetX, float offsetY); 29 void setScale (float scaleX, float scaleY); 30 31 void setBarImage(const char* barImage); 32 void setBarPosScale(float barX, float barY, float barW, float barH); 33 36 34 void setMaximum (int maxValue); 37 35 int getMaximum (); … … 42 40 private: 43 41 char* backImageName; //!< the name of the file of the background image 44 float height, width;//!< hight and width of the image42 float scaleX, scaleY; //!< hight and width of the image 45 43 float offsetX, offsetY; //!< offset of the image from left and up 46 44 Material* backMat; //!< Background Material. 45 float barX, barY, barW, barH; //!< Position and Scale of the bar. 46 Material* barMat; //!< A Material for the Loading-Bar 47 47 48 48 /* progress bar values */ -
orxonox/branches/physics/src/lib/Makefile.in
r3789 r4178 89 89 EXEEXT = @EXEEXT@ 90 90 GPROF = @GPROF@ 91 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@92 GTHREAD_LIBS = @GTHREAD_LIBS@93 91 GTK2_CFLAGS = @GTK2_CFLAGS@ 94 92 GTK2_LIBS = @GTK2_LIBS@ 95 93 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 96 94 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 97 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@98 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@99 95 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 100 96 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ … … 117 113 PACKAGE_VERSION = @PACKAGE_VERSION@ 118 114 PATH_SEPARATOR = @PATH_SEPARATOR@ 115 PKG_CONFIG = @PKG_CONFIG@ 116 RANLIB = @RANLIB@ 119 117 SET_MAKE = @SET_MAKE@ 120 118 SHELL = @SHELL@ … … 125 123 ac_ct_CC = @ac_ct_CC@ 126 124 ac_ct_CXX = @ac_ct_CXX@ 125 ac_ct_RANLIB = @ac_ct_RANLIB@ 127 126 ac_ct_STRIP = @ac_ct_STRIP@ 128 127 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -
orxonox/branches/physics/src/lib/coord/null_parent.cc
r3809 r4178 54 54 this->parent = this; 55 55 this->mode = PNODE_ALL; 56 *this->absCoordinate = absCoordinate;56 this->absCoordinate = absCoordinate; 57 57 this->setName("NullParent"); 58 58 } … … 80 80 { 81 81 82 PRINTF(4)("NullParent::update - (%f, %f, %f)\n", this->absCoordinate ->x, this->absCoordinate->y, this->absCoordinate->z);83 *this->absCoordinate = *this->relCoordinate;84 *this->absDirection = parent->getAbsDir () * *this->relDirection;82 PRINTF(4)("NullParent::update - (%f, %f, %f)\n", this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z); 83 this->absCoordinate = this->relCoordinate; 84 this->absDirection = parent->getAbsDir () * this->relDirection; 85 85 86 86 tIterator<PNode>* iterator = this->children->getIterator(); -
orxonox/branches/physics/src/lib/coord/p_node.cc
r3860 r4178 60 60 this->init(parent); 61 61 62 *this->absCoordinate = absCoordinate;62 this->absCoordinate = absCoordinate; 63 63 64 64 if (likely(parent != NULL)) 65 65 { 66 *this->relCoordinate = *this->absCoordinate - parent->getAbsCoor();66 this->relCoordinate = this->absCoordinate - parent->getAbsCoor(); 67 67 parent->addChild (this); 68 68 } 69 else70 this->relCoordinate = new Vector();71 69 } 72 70 … … 89 87 delete []this->objectName; 90 88 91 delete this->relCoordinate;92 delete this->absCoordinate;93 delete this->relDirection;94 delete this->absDirection;95 delete this->lastAbsCoordinate;96 delete this->diffCoordinate;97 89 } 98 90 … … 107 99 this->parent = parent; 108 100 this->objectName = NULL; 109 this->time = 1.0; /* set time to 1 to make divisions by zero impossible */110 111 this->absCoordinate = new Vector();112 this->relCoordinate = new Vector();113 this->absDirection = new Quaternion();114 this->relDirection = new Quaternion();115 this->lastAbsCoordinate = new Vector();116 this->diffCoordinate = new Vector();117 101 } 118 102 … … 158 142 { 159 143 this->bRelCoorChanged = true; 160 *this->relCoordinate = relCoord;144 this->relCoordinate = relCoord; 161 145 } 162 146 … … 182 166 { 183 167 this->bAbsCoorChanged = true; 184 *this->absCoordinate = absCoord;168 this->absCoordinate = absCoord; 185 169 } 186 170 … … 211 195 if( unlikely(this->bAbsCoorChanged)) 212 196 { 213 *this->absCoordinate = *this->absCoordinate +shift;197 this->absCoordinate += shift; 214 198 } 215 199 else 216 200 { 217 *this->relCoordinate = *this->relCoordinate +shift;201 this->relCoordinate += shift; 218 202 this->bRelCoorChanged = true; 219 203 } … … 241 225 { 242 226 this->bRelCoorChanged = true; 243 *this->relDirection = relDir;227 this->relDirection = relDir; 244 228 } 245 229 … … 264 248 { 265 249 this->bAbsDirChanged = true; 266 *this->absDirection = absDir;250 this->absDirection = absDir; 267 251 } 268 252 … … 293 277 { 294 278 this->bRelDirChanged = true; 295 *this->relDirection = *this->relDirection * shift; 296 } 297 298 299 300 /** 301 \brief this calculates the current movement speed of the node 302 */ 303 float PNode::getSpeed() const 304 { 305 *this->diffCoordinate = *this->absCoordinate - *this->lastAbsCoordinate; 306 return this->diffCoordinate->len() / this->time; 307 } 308 279 this->relDirection = this->relDirection * shift; 280 } 309 281 310 282 /** … … 432 404 void PNode::update (float dt) 433 405 { 434 *this->lastAbsCoordinate = *this->absCoordinate;435 this->time = dt; 436 PRINTF(4)("PNode::update - %s - (%f, %f, %f)\n", this->objectName, this->absCoordinate ->x, this->absCoordinate->y, this->absCoordinate->z);406 this->lastAbsCoordinate = this->absCoordinate; 407 408 PRINTF(4)("PNode::update - %s - (%f, %f, %f)\n", this->objectName, this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z); 437 409 438 410 … … 442 414 { 443 415 /* if you have set the absolute coordinates this overrides all other changes */ 444 *this->relCoordinate = *this->absCoordinate - parent->getAbsCoor ();416 this->relCoordinate = this->absCoordinate - parent->getAbsCoor (); 445 417 } 446 418 if( likely(this->bRelCoorChanged) /*&& this->timeStamp != DataTank::timeStamp*/) … … 455 427 } 456 428 else */ 457 *this->absCoordinate = parent->getAbsCoor() + *this->relCoordinate; /* update the current absCoordinate */429 this->absCoordinate = parent->getAbsCoor() + this->relCoordinate; /* update the current absCoordinate */ 458 430 } 459 431 } … … 464 436 { 465 437 /* if you have set the absolute coordinates this overrides all other changes */ 466 *this->relDirection = *this->absDirection - parent->getAbsDir();438 this->relDirection = this->absDirection - parent->getAbsDir(); 467 439 } 468 440 else if( likely(this->bRelDirChanged) /*&& this->timeStamp != DataTank::timeStamp*/) 469 441 { 470 442 /* update the current absDirection - remember * means rotation around sth.*/ 471 *this->absDirection = parent->getAbsDir() * *this->relDirection;443 this->absDirection = parent->getAbsDir() * this->relDirection; 472 444 } 473 445 } … … 478 450 { 479 451 /* if you have set the absolute coordinates this overrides all other changes */ 480 *this->relCoordinate = *this->absCoordinate - parent->getAbsCoor ();452 this->relCoordinate = this->absCoordinate - parent->getAbsCoor (); 481 453 } 482 454 else if( likely(this->bRelCoorChanged) /*&& this->timeStamp != DataTank::timeStamp*/) … … 486 458 *this->absCoordinate = *this->relCoordinate; 487 459 else*/ 488 *this->absCoordinate = parent->getAbsCoor() + parent->getAbsDir().apply(*this->relCoordinate); /* update the current absCoordinate */460 this->absCoordinate = parent->getAbsCoor() + parent->getAbsDir().apply(this->relCoordinate); /* update the current absCoordinate */ 489 461 } 490 462 } … … 508 480 delete iterator; 509 481 482 this->velocity = (this->absCoordinate - this->lastAbsCoordinate) / dt; 510 483 this->timeStamp = timeStamp; 511 484 this->bRelCoorChanged = false; … … 540 513 { 541 514 PRINTF(2)("PNode::debug() - absCoord: (%f, %f, %f)\n", 542 this->absCoordinate ->x,543 this->absCoordinate ->y,544 this->absCoordinate ->z);515 this->absCoordinate.x, 516 this->absCoordinate.y, 517 this->absCoordinate.z); 545 518 } 546 519 … … 551 524 for debug purposes realy usefull, not used to work properly 552 525 */ 553 void PNode::setName (c har* newName)526 void PNode::setName (const char* newName) 554 527 { 555 528 this->objectName = new char[strlen(newName)+1]; … … 561 534 \brief gets the name of the node 562 535 */ 563 c har* PNode::getName ()536 const char* PNode::getName () 564 537 { 565 538 return this->objectName; -
orxonox/branches/physics/src/lib/coord/p_node.h
r3813 r4178 57 57 58 58 59 inline Vector*getRelCoor () const { return this->relCoordinate; }59 inline const Vector& getRelCoor () const { return this->relCoordinate; } 60 60 void setRelCoor (const Vector& relCoord); 61 inline Vector getAbsCoor () const { return *this->absCoordinate; }61 inline const Vector& getAbsCoor () const { return this->absCoordinate; } 62 62 void setAbsCoor (const Vector& absCoord); 63 63 void shiftCoor (const Vector& shift); 64 64 65 inline Quaternion getRelDir () const { return *this->relDirection; }65 inline const Quaternion& getRelDir () const { return this->relDirection; } 66 66 void setRelDir (const Quaternion& relDir); 67 inline Quaternion getAbsDir () const { return *this->absDirection; }67 inline const Quaternion& getAbsDir () const { return this->absDirection; } 68 68 void setAbsDir (const Quaternion& absDir); 69 69 void shiftDir (const Quaternion& shift); 70 70 71 float getSpeed() const; 71 /** \returns the Speed of the Node */ 72 inline float getSpeed() const {return this->velocity.len()/1000;} //! \FIX THIS SHOULD NOT BE /1000 73 /** \returns the Velocity of the Node */ 74 inline const Vector& getVelocity() const {return this->velocity;} 72 75 73 76 void addChild (PNode* pNode, int parentingMode = DEFAULT_MODE); … … 85 88 void processTick (float dt); 86 89 87 void setName (c har* newName);88 c har* getName ();90 void setName (const char* newName); 91 const char* getName (); 89 92 90 93 … … 99 102 bool bRelDirChanged; //!< If Relative Direction has changed since last time we checked 100 103 101 Vector *relCoordinate; //!< coordinates relative to the parent102 Vector *absCoordinate; //!< absolute coordinates in the world ( from (0,0,0) )103 Quaternion *relDirection; //!< direction relative to the parent104 Quaternion *absDirection; //!< absolute direvtion in the world ( from (0,0,1) )104 Vector relCoordinate; //!< coordinates relative to the parent 105 Vector absCoordinate; //!< absolute coordinates in the world ( from (0,0,0) ) 106 Quaternion relDirection; //!< direction relative to the parent 107 Quaternion absDirection; //!< absolute direvtion in the world ( from (0,0,1) ) 105 108 106 109 int mode; //!< the mode of the binding … … 109 112 void init(PNode* parent); 110 113 111 Vector* lastAbsCoordinate; //!< this is used for speedcalculation, it stores the last coordinate 112 Vector* diffCoordinate; //!< this is stored here for performance reasons, difference to the last vector 113 float time; //!< time since last update 114 Vector velocity; //!< Saves the velocity. 115 Vector lastAbsCoordinate; //!< this is used for speedcalculation, it stores the last coordinate 114 116 }; 115 117 -
orxonox/branches/physics/src/lib/graphics/Makefile.in
r3789 r4178 89 89 EXEEXT = @EXEEXT@ 90 90 GPROF = @GPROF@ 91 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@92 GTHREAD_LIBS = @GTHREAD_LIBS@93 91 GTK2_CFLAGS = @GTK2_CFLAGS@ 94 92 GTK2_LIBS = @GTK2_LIBS@ 95 93 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 96 94 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 97 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@98 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@99 95 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 100 96 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ … … 117 113 PACKAGE_VERSION = @PACKAGE_VERSION@ 118 114 PATH_SEPARATOR = @PATH_SEPARATOR@ 115 PKG_CONFIG = @PKG_CONFIG@ 116 RANLIB = @RANLIB@ 119 117 SET_MAKE = @SET_MAKE@ 120 118 SHELL = @SHELL@ … … 125 123 ac_ct_CC = @ac_ct_CC@ 126 124 ac_ct_CXX = @ac_ct_CXX@ 125 ac_ct_RANLIB = @ac_ct_RANLIB@ 127 126 ac_ct_STRIP = @ac_ct_STRIP@ 128 127 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -
orxonox/branches/physics/src/lib/graphics/graphics_engine.cc
r3844 r4178 17 17 18 18 #include "graphics_engine.h" 19 #include "resource_manager.h" 19 20 20 21 #include "debug.h" … … 30 31 { 31 32 this->setClassName ("GraphicsEngine"); 33 34 this->fullscreen = false; 35 32 36 this->initVideo(); 33 37 … … 101 105 102 106 // TO DO: Create a cool icon and use it here 103 SDL_WM_SetIcon(SDL_LoadBMP("../data/pictures/orxonox-icon32x32.bmp"), NULL); 104 107 char* loadPic = new char[strlen(ResourceManager::getInstance()->getDataDir())+ 100]; 108 sprintf(loadPic, "%s%s", ResourceManager::getInstance()->getDataDir(), "pictures/orxonox-icon32x32.bmp"); 109 SDL_WM_SetIcon(SDL_LoadBMP(loadPic), NULL); 110 delete loadPic; 105 111 // Enable default GL stuff 106 112 glEnable(GL_DEPTH_TEST); … … 137 143 int GraphicsEngine::setResolution(int width, int height, int bpp) 138 144 { 145 Uint32 fullscreenFlag; 139 146 this->resolutionX = width; 140 147 this->resolutionY = height; 141 148 this->bitsPerPixel = bpp; 149 if (this->fullscreen) 150 fullscreenFlag = SDL_FULLSCREEN; 151 else 152 fullscreenFlag = 0; 142 153 143 154 printf ("ok\n"); 144 if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags )) == NULL)155 if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags | fullscreenFlag)) == NULL) 145 156 { 146 157 PRINTF(1)("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags, SDL_GetError()); … … 148 159 // return -1; 149 160 } 150 161 } 162 163 void GraphicsEngine::setFullscreen(bool fullscreen) 164 { 165 this->fullscreen = fullscreen; 166 this->setResolution(this->resolutionX, this->resolutionY, this->bitsPerPixel); 151 167 } 152 168 … … 254 270 /* Check if our resolution is restricted */ 255 271 if(this->videoModes == (SDL_Rect **)-1){ 256 PRINTF( 1)("All resolutions available.\n");272 PRINTF(2)("All resolutions available.\n"); 257 273 } 258 274 else{ … … 260 276 PRINT(0)("Available Resoulution Modes are\n"); 261 277 for(int i = 0; this->videoModes[i]; ++i) 262 PRINT( 0)(" | %d x %d\n", this->videoModes[i]->w, this->videoModes[i]->h);278 PRINT(4)(" | %d x %d\n", this->videoModes[i]->w, this->videoModes[i]->h); 263 279 } 264 280 -
orxonox/branches/physics/src/lib/graphics/graphics_engine.h
r3844 r4178 26 26 int setGLattribs(void); 27 27 int setResolution(int width, int height, int bpp); 28 void setFullscreen(bool fullscreen = false); 28 29 /** \returns the x resolution */ 29 30 inline int getResolutionX(void) {return this->resolutionX;} -
orxonox/branches/physics/src/lib/graphics/importer/Makefile.in
r3953 r4178 119 119 EXEEXT = @EXEEXT@ 120 120 GPROF = @GPROF@ 121 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@122 GTHREAD_LIBS = @GTHREAD_LIBS@123 121 GTK2_CFLAGS = @GTK2_CFLAGS@ 124 122 GTK2_LIBS = @GTK2_LIBS@ 125 123 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 126 124 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 127 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@128 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@129 125 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 130 126 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ … … 147 143 PACKAGE_VERSION = @PACKAGE_VERSION@ 148 144 PATH_SEPARATOR = @PATH_SEPARATOR@ 145 PKG_CONFIG = @PKG_CONFIG@ 146 RANLIB = @RANLIB@ 149 147 SET_MAKE = @SET_MAKE@ 150 148 SHELL = @SHELL@ … … 155 153 ac_ct_CC = @ac_ct_CC@ 156 154 ac_ct_CXX = @ac_ct_CXX@ 155 ac_ct_RANLIB = @ac_ct_RANLIB@ 157 156 ac_ct_STRIP = @ac_ct_STRIP@ 158 157 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -
orxonox/branches/physics/src/lib/graphics/importer/array.cc
r3590 r4178 112 112 113 113 /** 114 \brief Gives back the array !! MUST be executed AFTER finalize.115 \returns The created array.116 */117 GLfloat* Array::getArray ()118 {119 return this->array;120 }121 122 /**123 \returns The Count of entries in the Array124 */125 int Array::getCount()126 {127 return this->entryCount;128 }129 130 /**131 114 \brief Simple debug info about the Array 132 115 */ 133 void Array::debug ( )116 void Array::debug (void) const 134 117 { 135 118 PRINT(0)("entryCount=%i, address=%p\n", this->entryCount, this->array); -
orxonox/branches/physics/src/lib/graphics/importer/array.h
r3590 r4178 23 23 void addEntry(GLfloat entry0, GLfloat entry1, GLfloat entry2); 24 24 25 GLfloat* getArray (); 26 int getCount(); 27 void debug(void); 25 /** \returns The array */ 26 inline const GLfloat* getArray () const {return this->array;} 27 /** \returns The Count of entries in the Array*/ 28 inline int getCount(void)const {return this->entryCount;} 29 void debug(void) const ; 28 30 private: 29 31 //! One entry of the Array -
orxonox/branches/physics/src/lib/graphics/importer/framework.cc
r3657 r4178 79 79 obj = new OBJModel(argv[1]); 80 80 else 81 obj = new PrimitiveModel( SPHERE);81 obj = new PrimitiveModel(CYLINDER); 82 82 83 83 M = Vector(wHandler.screen->w/2, wHandler.screen->h/2, 0); -
orxonox/branches/physics/src/lib/graphics/importer/material.cc
r3953 r4178 45 45 this->setTransparency(1.0); 46 46 47 48 47 this->diffuseTexture = NULL; 49 48 this->ambientTexture = NULL; 50 49 this->specularTexture = NULL; 51 52 this->diffuseTextureSet = false;53 this->ambientTextureSet = false;54 this->specularTextureSet = false;55 50 56 51 this->setName(mtlName); … … 88 83 89 84 // setting the transparency 90 if (this->transparency == 1.0) 91 { 92 glDisable(GL_BLEND); 93 } 94 else 85 if (this->transparency < 1.0) 95 86 { 96 87 glEnable(GL_BLEND); … … 98 89 glBlendFunc(GL_SRC_ALPHA, GL_ONE); 99 90 } 91 else 92 { 93 glDisable(GL_BLEND); 94 glColor4f(1.0f, 1.0f, 1.0f, 1.0f); 95 } 96 100 97 101 98 // setting illumination Model … … 105 102 glShadeModel(GL_SMOOTH); 106 103 107 if (this->diffuseTexture Set)104 if (this->diffuseTexture) 108 105 { 109 106 glEnable(GL_TEXTURE_2D); 110 107 glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture()); 108 109 /* This allows alpha blending of 2D textures with the scene */ 110 if (this->diffuseTexture->hasAlpha()) 111 { 112 glEnable(GL_BLEND); 113 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 114 } 111 115 } 112 116 else … … 291 295 { 292 296 PRINTF(4)("setting Diffuse Map %s\n", dMap); 293 // diffuseTexture = new Texture();294 // this->diffuseTextureSet = diffuseTexture->loadImage(dMap);295 297 296 298 //! \todo check if RESOURCE MANAGER is availiable 297 299 //! \todo Textures from .mtl-file need special care. 298 this->diffuseTexture Set = this->diffuseTexture= (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE);300 this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE); 299 301 } 300 302 -
orxonox/branches/physics/src/lib/graphics/importer/material.h
r3953 r4178 67 67 Texture* ambientTexture; //!< The ambient texture of the Material. 68 68 Texture* specularTexture;//!< The specular texture of the Material. 69 70 bool diffuseTextureSet; //!< Chekcs if the diffuse texture is Set.71 bool ambientTextureSet; //!< Chekcs if the ambient texture is Set.72 bool specularTextureSet;//!< Chekcs if the specular texture is Set.73 74 69 }; 75 70 #endif -
orxonox/branches/physics/src/lib/graphics/importer/model.cc
r3953 r4178 27 27 using namespace std; 28 28 29 ////////////////// 30 // DE-CONSTRUCT // 31 ////////////////// 32 /** 33 \brief Creates a 3D-Model. and assigns it a Name. 29 30 //////////////////// 31 /// SUB-Elements /// 32 //////////////////// 33 /** 34 \brief creates a new ModelFaceElement 35 */ 36 ModelFaceElement::ModelFaceElement() 37 { 38 this->vertexNumber = -1; 39 this->normalNumber = -1; 40 this->texCoordNumber = -1; 41 42 this->next = NULL; 43 } 44 45 /** 46 \brief destroys a ModelFaceElement 47 */ 48 ModelFaceElement::~ModelFaceElement() 49 { 50 if (this->next) 51 delete this->next; 52 } 53 54 /** 55 \brief creates a new ModelFace 56 */ 57 ModelFace::ModelFace() 58 { 59 this->vertexCount = 0; 60 61 this->firstElem = NULL; 62 63 this->material = NULL; 64 65 this->next = NULL; 66 67 } 68 69 /** 70 \brief deletes a ModelFace 71 */ 72 ModelFace::~ModelFace() 73 { 74 PRINTF(5)("Cleaning up Face\n"); 75 76 if (this->firstElem != NULL) 77 delete this->firstElem; 78 79 if (this->next != NULL) 80 delete this->next; 81 } 82 83 /** 84 \brief Creates a new ModelGroup 85 */ 86 ModelGroup::ModelGroup() 87 { 88 PRINTF(4)("Adding new Group\n"); 89 this->name = ""; 90 this->faceMode = -1; 91 this->faceCount = 0; 92 this->next = NULL; 93 94 this->firstFace = new ModelFace; 95 this->currentFace = this->firstFace; 96 } 97 98 /** 99 \brief deletes a ModelGroup 100 */ 101 ModelGroup::~ModelGroup() 102 { 103 PRINTF(5)("Cleaning up group\n"); 104 if (this->firstFace != NULL) 105 delete this->firstFace; 106 107 if (this->next !=NULL) 108 delete this->next; 109 } 110 111 /** 112 \brief cleans up a ModelGroup 113 114 actually does the same as the delete Operator, but does not delete the predecessing group 115 */ 116 void ModelGroup::cleanup(void) 117 { 118 PRINTF(5)("Cleaning up group\n"); 119 if (this->firstFace) 120 delete this->firstFace; 121 this->firstFace = NULL; 122 if (this->next) 123 this->next->cleanup(); 124 } 125 126 127 ///////////// 128 /// MODEL /// 129 ///////////// 130 /** 131 \brief Creates a 3D-Model. 132 133 assigns it a Name and a Type 34 134 */ 35 135 Model::Model(const char* modelName, MODEL_TYPE type) … … 42 142 this->finalized = false; 43 143 // setting the start group; 44 this->firstGroup = new Group; 45 this->currentGroup = this->firstGroup; 144 this->currentGroup = this->firstGroup = new ModelGroup; 46 145 this->groupCount = 0; 47 48 this->initGroup (this->currentGroup); 146 this->vertexCount = 0; 147 this->normalCount = 0; 148 this->texCoordCount = 0; 149 49 150 this->scaleFactor = 1; 50 151 … … 76 177 77 178 PRINTF(5)("Deleting display Lists.\n"); 78 Group* walker = this->firstGroup; 79 while (walker != NULL) 80 { 81 glDeleteLists (walker->listNumber, 1); 82 Group* delWalker = walker; 83 walker = walker->next; 84 delete delWalker; 85 } 179 delete this->firstGroup; 86 180 87 181 // deleting Arrays … … 92 186 tIterator<Material>* tmpIt = this->materialList->getIterator(); 93 187 Material* material = tmpIt->nextElement(); 188 189 //! \todo do we really have to delete this material?? 94 190 while(material) 95 191 { … … 128 224 { 129 225 PRINTF(4)("drawing the 3D-Models\n"); 130 Group* walker= this->firstGroup;131 while ( walker!= NULL)132 { 133 PRINTF(5)("Drawing model %s\n", walker->name);134 glCallList ( walker->listNumber);135 walker = walker->next;226 ModelGroup* tmpGroup = this->firstGroup; 227 while (tmpGroup != NULL) 228 { 229 PRINTF(5)("Drawing model %s\n", tmpGroup->name); 230 glCallList (tmpGroup->listNumber); 231 tmpGroup = tmpGroup->next; 136 232 } 137 233 } … … 151 247 } 152 248 PRINTF(4)("drawing the requested 3D-Models if found.\n"); 153 Group* walker= this->firstGroup;249 ModelGroup* tmpGroup = this->firstGroup; 154 250 int counter = 0; 155 while ( walker!= NULL)251 while (tmpGroup != NULL) 156 252 { 157 253 if (counter == groupNumber) 158 254 { 159 PRINTF(4)("Drawing model number %i named %s\n", counter, walker->name);160 glCallList ( walker->listNumber);255 PRINTF(4)("Drawing model number %i named %s\n", counter, tmpGroup->name); 256 glCallList (tmpGroup->listNumber); 161 257 return; 162 258 } 163 259 ++counter; 164 walker = walker->next;260 tmpGroup = tmpGroup->next; 165 261 } 166 262 PRINTF(2)("Model number %i in %s not Found.\n", groupNumber, this->name); … … 178 274 { 179 275 PRINTF(4)("drawing the requested 3D-Models if found.\n"); 180 Group* walker= this->firstGroup;181 while ( walker!= NULL)182 { 183 if (!strcmp( walker->name, groupName))276 ModelGroup* tmpGroup = this->firstGroup; 277 while (tmpGroup != NULL) 278 { 279 if (!strcmp(tmpGroup->name, groupName)) 184 280 { 185 PRINTF(4)("Drawing model %s\n", walker->name);186 glCallList ( walker->listNumber);281 PRINTF(4)("Drawing model %s\n", tmpGroup->name); 282 glCallList (tmpGroup->listNumber); 187 283 return; 188 284 } 189 walker = walker->next;285 tmpGroup = tmpGroup->next; 190 286 } 191 287 PRINTF(2)("Model Named %s in %s not Found.\n", groupName, this->name); 192 288 return; 193 }194 195 /**196 \returns Count of the Models in this File197 */198 int Model::getGroupCount (void) const199 {200 return this->groupCount;201 289 } 202 290 … … 210 298 void Model::setName(const char* name) 211 299 { 212 if (this->name) 213 delete this->name;300 if (this->name) 301 delete []this->name; 214 302 if (name) 215 303 { … … 219 307 else 220 308 this->name = NULL; 221 }222 223 /**224 \brief initializes a new Group model225 \param group the group that should be initialized.226 \todo Maybe Group should be a Class, because it does a lot of stuff227 228 */229 bool Model::initGroup(Group* group)230 {231 PRINTF(4)("Adding new Group\n");232 group->name = "";233 group->faceMode = -1;234 group->faceCount = 0;235 group->next = NULL;236 237 group->firstFace = new Face;238 this->initFace (group->firstFace);239 group->currentFace = group->firstFace;240 }241 242 /**243 \brief initializes a new Face. (sets default Values)244 \param face The face to initialize245 */246 bool Model::initFace (Face* face)247 {248 face->vertexCount = 0;249 250 face->firstElem = NULL;251 252 face->material = NULL;253 254 face->next = NULL;255 256 return true;257 309 } 258 310 … … 268 320 if (this->normals) 269 321 delete this->normals; 322 270 323 this->vertices = NULL; 271 324 this->vTexture = NULL; … … 280 333 { 281 334 PRINTF(4)("cleaning up the 3D-Model to save Memory.\n"); 282 this-> cleanupGroup(this->firstGroup);335 this->firstGroup->cleanup(); 283 336 return true; 284 337 } 285 338 286 /** 287 \brief Cleans up all groups starting from group. 288 \param group the first Group to clean 289 */ 290 bool Model::cleanupGroup (Group* group) 291 { 292 PRINTF(5)("Cleaning up group\n"); 293 if (group->firstFace != NULL) 294 { 295 cleanupFace (group->firstFace); 296 delete group->firstFace; 297 } 298 299 if (group->next !=NULL) 300 cleanupGroup (group->next); 301 return true; 302 } 303 304 /** 305 \brief Cleans up all Faces starting from face until NULL is reached. 306 \param face the first face to clean. 307 */ 308 bool Model::cleanupFace (Face* face) 309 { 310 PRINTF(5)("Cleaning up Face\n"); 311 312 if (face->firstElem != NULL) 313 { 314 this->cleanupFaceElement(face->firstElem); 315 delete face->firstElem; 316 } 317 318 if (face->next != NULL) 319 { 320 this->cleanupFace (face->next); 321 delete face->next; 322 } 323 } 324 325 /** 326 \brief Cleans up all FaceElements starting from faceElem. 327 \param faceElem the first FaceElement to clean. 328 */ 329 bool Model::cleanupFaceElement(FaceElement* faceElem) 330 { 331 if (faceElem->next != NULL) 332 { 333 this->cleanupFaceElement (faceElem->next); 334 delete faceElem->next; 335 } 336 } 339 337 340 338 341 ////////// … … 354 357 /** 355 358 \brief adds a new Material to the Material List 356 \param material the name of the Material to add359 \param materialName the name of the Material to add 357 360 \returns the added material 358 361 */ 359 362 Material* Model::addMaterial(const char* materialName) 360 363 { 361 362 364 Material* newMat = new Material(); 363 365 newMat->setName(materialName); … … 395 397 396 398 This function initializes a new Group. 397 With it you should be able to import .obj-files with more than one Models inside.398 */ 399 bool Model::addGroup 399 With it you should be able to create Models with more than one SubModel inside 400 */ 401 bool Model::addGroup(const char* groupString) 400 402 { 401 403 PRINTF(5)("Read Group: %s.\n", groupString); 402 if (this->groupCount != 0 && this->currentGroup->faceCount >0)404 if (this->groupCount != 0 && this->currentGroup->faceCount > 0) 403 405 { 404 406 // finalizeGroup(currentGroup); 405 this->currentGroup = this->currentGroup->next = new Group; 406 this->initGroup(this->currentGroup); 407 this->currentGroup = this->currentGroup->next = new ModelGroup; 407 408 } 408 409 // setting the group name if not default. … … 429 430 PRINTF(5)("reading in a vertex: %f %f %f\n", &subbuffer1, &subbuffer2, &subbuffer3); 430 431 this->vertices->addEntry(subbuffer1*scaleFactor, subbuffer2*scaleFactor, subbuffer3*scaleFactor); 432 this->vertexCount++; 431 433 return true; 432 434 } … … 443 445 PRINTF(5)("reading in a vertex: %f %f %f\n", x, y, z); 444 446 this->vertices->addEntry(x*scaleFactor, y*scaleFactor, z*scaleFactor); 447 this->vertexCount++; 445 448 return true; 446 449 } … … 460 463 PRINTF(5)("found vertex-Normal %f, %f, %f\n", &subbuffer1,&subbuffer2,&subbuffer3); 461 464 this->normals->addEntry(subbuffer1, subbuffer2, subbuffer3); 465 this->normalCount++; 462 466 return true; 463 467 } … … 475 479 PRINTF(5)("found vertex-Normal %f, %f, %f\n", x, y, z); 476 480 this->normals->addEntry(x, y, z); 481 this->normalCount++; 482 return true; 477 483 } 478 484 … … 492 498 this->vTexture->addEntry(subbuffer1); 493 499 this->vTexture->addEntry(subbuffer2); 500 this->texCoordCount++; 494 501 return true; 495 502 } … … 507 514 this->vTexture->addEntry(u); 508 515 this->vTexture->addEntry(v); 516 this->texCoordCount++; 517 return true; 509 518 } 510 519 … … 514 523 515 524 If a face line is found this function will add it to the glList. 525 526 String is different from the argument addFace, in this that the first Vertex/Normal/Texcoord is 1 instead of 0 516 527 */ 517 528 bool Model::addFace (const char* faceString) 518 529 { 519 530 if (this->currentGroup->faceCount >0) 520 this->currentGroup->currentFace = this->currentGroup->currentFace->next = new Face; 521 this->initFace (this->currentGroup->currentFace); 522 523 FaceElement* tmpElem = this->currentGroup->currentFace->firstElem = new FaceElement; 531 this->currentGroup->currentFace = this->currentGroup->currentFace->next = new ModelFace; 532 533 ModelFaceElement* tmpElem = this->currentGroup->currentFace->firstElem = new ModelFaceElement; 524 534 tmpElem->next = NULL; 525 535 while(strcmp (faceString, "\0")) 526 536 { 527 537 if (this->currentGroup->currentFace->vertexCount>0) 528 tmpElem = tmpElem->next = new FaceElement;538 tmpElem = tmpElem->next = new ModelFaceElement; 529 539 tmpElem->next = NULL; 530 540 … … 552 562 if (vertex) 553 563 tmpElem->vertexNumber = atoi(vertex)-1; 554 else555 tmpElem->vertexNumber = -1;556 564 if (texture) 557 565 tmpElem->texCoordNumber = atoi(texture)-1; 558 else559 tmpElem->texCoordNumber = -1;560 566 if (normal) 561 567 tmpElem->normalNumber = atoi(normal)-1; 562 else563 tmpElem->normalNumber = -1;564 568 565 569 faceString += tmpLen; … … 575 579 \brief adds a new Face 576 580 \param faceElemCount the number of Vertices to add to the Face. 577 \param type 0: vertex only, 1: vertex and normal, 2: vertex and Texture, 3 vertex, normal and texture581 \param type The information Passed with each Vertex 578 582 */ 579 583 bool Model::addFace(int faceElemCount, VERTEX_FORMAT type, ...) 580 584 { 581 if (this->currentGroup->faceCount > 0) 582 this->currentGroup->currentFace = this->currentGroup->currentFace->next = new Face; 583 this->initFace (this->currentGroup->currentFace); 584 585 FaceElement* tmpElem = this->currentGroup->currentFace->firstElem = new FaceElement; 586 tmpElem->next = NULL; 585 if (this->currentGroup->faceCount > 0) 586 this->currentGroup->currentFace = this->currentGroup->currentFace->next = new ModelFace; 587 588 ModelFaceElement* tmpElem = this->currentGroup->currentFace->firstElem = new ModelFaceElement; 587 589 588 590 va_list itemlist; … … 591 593 for (int i = 0; i < faceElemCount; i++) 592 594 { 593 if (this->currentGroup->currentFace->vertexCount>0) 594 tmpElem = tmpElem->next = new FaceElement; 595 tmpElem->next = NULL; 596 597 tmpElem->vertexNumber = va_arg (itemlist, int) -1; 595 if (this->currentGroup->currentFace->vertexCount > 0) 596 tmpElem = tmpElem->next = new ModelFaceElement; 597 598 tmpElem->vertexNumber = va_arg (itemlist, int); 598 599 if (type & TEXCOORD) 599 tmpElem->texCoordNumber = va_arg (itemlist, int) -1;600 tmpElem->texCoordNumber = va_arg (itemlist, int); 600 601 if (type & NORMAL) 601 tmpElem->normalNumber = va_arg(itemlist, int) -1;602 tmpElem->normalNumber = va_arg(itemlist, int); 602 603 this->currentGroup->currentFace->vertexCount++; 603 604 } … … 614 615 { 615 616 if (this->currentGroup->faceCount > 0) 616 this->currentGroup->currentFace = this->currentGroup->currentFace->next = new Face; 617 this->initFace (this->currentGroup->currentFace); 617 this->currentGroup->currentFace = this->currentGroup->currentFace->next = new ModelFace; 618 618 619 619 this->currentGroup->currentFace->material = this->findMaterialByName(matString); … … 630 630 { 631 631 if (this->currentGroup->faceCount > 0) 632 this->currentGroup->currentFace = this->currentGroup->currentFace->next = new Face; 633 this->initFace (this->currentGroup->currentFace); 632 this->currentGroup->currentFace = this->currentGroup->currentFace->next = new ModelFace; 634 633 635 634 this->currentGroup->currentFace->material = mtl; … … 662 661 Vector curV; 663 662 664 Group* tmpGroup = firstGroup;663 ModelGroup* tmpGroup = firstGroup; 665 664 while (tmpGroup) 666 665 { 667 Face* tmpFace = tmpGroup->firstFace;666 ModelFace* tmpFace = tmpGroup->firstFace; 668 667 while (tmpFace) 669 668 { 670 669 if (tmpFace->firstElem) 671 670 { 672 FaceElement* firstElem = tmpFace->firstElem;673 FaceElement* prevElem;674 FaceElement* curElem = firstElem;675 FaceElement* nextElem;676 FaceElement* lastElem;671 ModelFaceElement* firstElem = tmpFace->firstElem; 672 ModelFaceElement* prevElem; 673 ModelFaceElement* curElem = firstElem; 674 ModelFaceElement* nextElem; 675 ModelFaceElement* lastElem; 677 676 // find last Element of the Chain. !! IMPORTANT:the last Element of the Chain must point to NULL, or it will resolv into an infinity-loop. 678 677 while (curElem) … … 704 703 } 705 704 706 for (int i=0; i <vertices->getCount()/3;i++)705 for (int i=0; i < vertices->getCount()/3;i++) 707 706 { 708 707 normArray[i].normalize(); 709 708 PRINTF(5)("Found Normale number %d: (%f; %f, %f).\n", i, normArray[i].x, normArray[i].y, normArray[i].z); 710 709 711 this-> normals->addEntry(normArray[i].x, normArray[i].y, normArray[i].z);710 this->addVertexNormal(normArray[i].x, normArray[i].y, normArray[i].z); 712 711 713 712 } … … 744 743 745 744 // Putting Faces to GL 746 Face* tmpFace = this->currentGroup->firstFace;745 ModelFace* tmpFace = this->currentGroup->firstFace; 747 746 while (tmpFace != NULL) 748 747 { … … 794 793 } 795 794 796 FaceElement* tmpElem = tmpFace->firstElem;795 ModelFaceElement* tmpElem = tmpFace->firstElem; 797 796 while (tmpElem != NULL) 798 797 { … … 826 825 glNormalPointer(3, 0, this->normals->getArray()); 827 826 glTexCoordPointer(2, GL_FLOAT, 0, this->vTexture->getArray()); 828 829 827 } 830 828 … … 841 839 merging this information, the face will be drawn. 842 840 */ 843 bool Model::addGLElement ( FaceElement* elem)841 bool Model::addGLElement (ModelFaceElement* elem) 844 842 { 845 843 PRINTF(5)("importing grafical Element to openGL.\n"); 846 844 847 845 if (elem->texCoordNumber != -1) 848 glTexCoord2fv(this->vTexture->getArray() + elem->texCoordNumber * 2); 846 { 847 if (likely(elem->texCoordNumber < this->texCoordCount)) 848 glTexCoord2fv(this->vTexture->getArray() + elem->texCoordNumber * 2); 849 else 850 PRINTF(2)("TextureCoordinate %d is not in the List (max: %d)\nThe Model might be incomplete\n", 851 elem->texCoordNumber, this->texCoordCount); 852 } 849 853 if (elem->normalNumber != -1) 850 glNormal3fv(this->normals->getArray() + elem->normalNumber * 3); 854 { 855 if (likely(elem->normalNumber < this->normalCount)) 856 glNormal3fv(this->normals->getArray() + elem->normalNumber * 3); 857 else 858 PRINTF(2)("Normal %d is not in the List (max: %d)\nThe Model might be incomplete", 859 elem->normalNumber, this->normalCount); 860 } 851 861 if (elem->vertexNumber != -1) 852 glVertex3fv(this->vertices->getArray() + elem->vertexNumber * 3); 862 { 863 if (likely(elem->vertexNumber < this->vertexCount)) 864 glVertex3fv(this->vertices->getArray() + elem->vertexNumber * 3); 865 else 866 PRINTF(2)("Vertex %d is not in the List (max: %d)\nThe Model might be incomplete", 867 elem->vertexNumber, this->vertexCount); 868 } 853 869 854 870 } … … 910 926 this->addVertexNormal (-1.0, 0.0, 0.0); 911 927 912 /* normaleLess-testingMode 913 this->addFace ("1 2 4 3"); 914 this->addFace ("3 4 6 5"); 915 this->addFace ("5 6 8 7"); 916 this->addFace ("7 8 2 1"); 917 this->addFace ("2 8 6 4"); 918 this->addFace ("7 1 3 5"); 919 */ 920 921 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,1,1, 2,2,2, 4,4,3, 3,3,4); 922 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 3,3,5, 4,4,6, 6,6,7, 5,5,8); 923 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 5,5,9, 6,6,10, 8,8,11, 7,7,12); 924 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 7,7,13, 8,8,14, 2,10,15, 1,9,16); 925 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 2,2,17, 8,11,18, 6,12,19, 4,4,20); 926 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 7,13,21, 1,1,22, 3,3,23, 5,14,24); 927 928 } 928 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 0,0,0, 1,1,1, 3,3,2, 2,2,3); 929 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 2,2,4, 3,3,5, 5,5,6, 4,4,7); 930 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 4,4,8, 5,5,9, 7,7,10, 6,6,11); 931 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,6,12, 7,7,13, 1,9,14, 0,8,15); 932 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,1,16, 7,10,17, 5,11,18, 3,3,19); 933 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,12,20, 0,0,21, 2,2,22, 4,13,23); 934 935 } -
orxonox/branches/physics/src/lib/graphics/importer/model.h
r3953 r4178 34 34 VERTEX_TEXCOORD_NORMAL = NORMAL | TEXCOORD}; 35 35 36 //////////////////// 37 /// SUB-ELEMENTS /// 38 //////////////////// 39 //! This is the placeholder of one Vertex beloning to a Face. 40 class ModelFaceElement 41 { 42 public: 43 ModelFaceElement(); 44 ~ModelFaceElement(); 45 46 int vertexNumber; //!< The number of the Vertex out of the Array* vertices, this vertex points to. 47 int normalNumber; //!< The number of the Normal out of the Array* normals, this vertex points to. 48 int texCoordNumber; //!< The number of the textureCoordinate out of the Array* vTexture, this vertex points to. 49 ModelFaceElement* next; //!< Point to the next FaceElement in this List. 50 }; 51 52 //! This is the placeholder of a Face belonging to a Group of Faces. 53 class ModelFace 54 { 55 public: 56 ModelFace(); 57 ~ModelFace(); 58 59 int vertexCount; //!< The Count of vertices this Face has. 60 ModelFaceElement* firstElem; //!< Points to the first Vertex (FaceElement) of this Face. 61 62 Material* material; //!< The Material to use. 63 64 ModelFace* next; //!< Pointer to the next Face. 65 }; 66 67 //! Group to handle multiple Models per obj-file. 68 class ModelGroup 69 { 70 public: 71 ModelGroup(); 72 ~ModelGroup(); 73 74 void cleanup(); 75 76 char* name; //!< the Name of the Group. this is an identifier, that can be accessed via the draw (char* name) function. 77 78 GLubyte* indices; //!< The indices of the Groups. Needed for vertex-arrays 79 GLuint listNumber; //!< The number of the GL-List this Group gets. 80 ModelFace* firstFace; //!< The first Face in this group. 81 ModelFace* currentFace; //!< The current Face in this Group (the one we are currently working with.) 82 int faceMode; //!< The Mode the Face is in: initially -1, 0 for FaceList opened, 1 for Material, 3 for triangle, 4 for Quad, 5+ for Poly \todo ENUM... 83 int faceCount; //!< The Number of Faces this Group holds. 84 85 ModelGroup* next; //!< Pointer to the next Group. 86 }; 87 88 ///////////// 89 /// MODEL /// 90 ///////////// 91 36 92 //! Class that handles 3D-Models. it can also read them in and display them. 37 93 class Model 38 94 { 39 95 private: 40 /////////////41 // structs //42 /////////////43 //! This is the placeholder of one Vertex beloning to a Face.44 struct FaceElement45 {46 int vertexNumber; //!< The number of the Vertex out of the Array* vertices, this vertex points to.47 int normalNumber; //!< The number of the Normal out of the Array* normals, this vertex points to.48 int texCoordNumber; //!< The number of the textureCoordinate out of the Array* vTexture, this vertex points to.49 FaceElement* next; //!< Point to the next FaceElement in this List.50 };51 96 52 //! This is the placeholder of a Face belonging to a Group of Faces. 53 struct Face 54 { 55 int vertexCount; //!< The Count of vertices this Face has. 56 FaceElement* firstElem; //!< Points to the first Vertex (FaceElement) of this Face. 97 char* name; //!< This is the name of the Model. 98 MODEL_TYPE type; //!< A type for the Model 99 bool finalized; //!< Sets the Object to be finalized. 57 100 58 Material* material; //!< The Material to use. 101 int vertexCount; //!< A modelwide Counter for vertices. 102 int normalCount; //!< A modelwide Counter for the normals. 103 int texCoordCount; //!< A modelwide Counter for the texCoord. 104 Array* vertices; //!< The Array that handles the Vertices. 105 Array* normals; //!< The Array that handles the Normals. 106 Array* vTexture; //!< The Array that handles the VertexTextureCoordinates. 59 107 60 Face* next; //!< Pointer to the next Face. 61 }; 108 ModelGroup* firstGroup; //!< The first of all groups. 109 ModelGroup* currentGroup; //!< The currentGroup. this is the one we will work with. 110 int groupCount; //!< The Count of Groups. 62 111 63 //! Group to handle multiple Models per obj-file. 64 struct Group 65 { 66 char* name; //!< the Name of the Group. this is an identifier, that can be accessed via the draw (char* name) function. 67 68 GLubyte* indices; //!< The indices of the Groups. Needed for vertex-arrays 69 GLuint listNumber; //!< The number of the GL-List this Group gets. 70 Face* firstFace; //!< The first Face in this group. 71 Face* currentFace; //!< The current Face in this Group (the one we are currently working with.) 72 int faceMode; //!< The Mode the Face is in: initially -1, 0 for FaceList opened, 1 for Material, 3 for triangle, 4 for Quad, 5+ for Poly \todo ENUM... 73 int faceCount; //!< The Number of Faces this Group holds. 74 75 Group* next; //!< Pointer to the next Group. 76 }; 77 78 char* name; //!< This is the name of the Model. 79 MODEL_TYPE type; 80 bool finalized; //!< Sets the Object to be finalized. 81 82 Array* vertices; //!< The Array that handles the Vertices. 83 int verticesCount; //!< A global Counter for vertices. 84 Array* normals; //!< The Array that handles the Normals. 85 Array* vTexture; //!< The Array that handles the VertexTextureCoordinates. 86 87 Group* firstGroup; //!< The first of all groups. 88 Group* currentGroup; //!< The currentGroup. this is the one we will work with. 89 int groupCount; //!< The Count of Groups. 90 91 tList<Material>* materialList; 112 tList<Material>* materialList;//!< A list for all the Materials in this Model 92 113 93 94 bool initGroup(Group* group);95 bool initFace (Face* face);96 97 114 bool buildVertexNormals(void); 98 115 99 116 bool importToDisplayList(void); 100 bool addGLElement( FaceElement* elem);117 bool addGLElement(ModelFaceElement* elem); 101 118 102 119 bool importToVertexArray(void); … … 104 121 bool deleteArrays(void); 105 122 bool cleanup(void); 106 bool cleanupGroup(Group* group);107 bool cleanupFace(Face* face);108 bool cleanupFaceElement(FaceElement* faceElem);109 123 110 124 … … 121 135 122 136 void setName(const char* name); 137 /** \returns the Name of the Model */ 123 138 inline const char* getName() {return this->name;} 124 139 … … 126 141 void draw(int groupNumber) const; 127 142 void draw(char* groupName) const; 128 int getGroupCount() const; 143 144 /** \returns Count of the Models (Groups) in this File */ 145 inline int getGroupCount(void) const {return this->groupCount;} 129 146 130 147 Material* addMaterial(Material* material); … … 143 160 bool setMaterial(Material* mtl); 144 161 void finalize(void); 162 163 /** \returns The number of Vertices of the Model */ 164 inline int getVertexCount(void) const {return this->vertexCount;} 165 /** \returns The number of Normals of the Model */ 166 inline int getNormalCount(void) const {return this->normalCount;} 167 /** \returns The number of Texture Coordinates of the Model*/ 168 inline int getTexCoordCount(void) const {return this->texCoordCount;} 145 169 }; 146 170 -
orxonox/branches/physics/src/lib/graphics/importer/objModel.cc
r3953 r4178 34 34 OBJModel::OBJModel(const char* fileName, float scaling) : Model(fileName) 35 35 { 36 this->initializeOBJ(); 36 this->objPath = "./"; 37 37 38 this->scaleFactor = scaling; 38 39 … … 52 53 if (this->objPath) 53 54 delete []this->objPath; 54 if (this->objFileName)55 delete []this->objFileName;56 if (this->mtlFileName)57 delete []this->mtlFileName;58 }59 60 /**61 \brief Initializes an obj-model62 */63 void OBJModel::initializeOBJ(void)64 {65 this->objPath = NULL;66 this->objFileName = NULL;67 this->mtlFileName = NULL;68 55 } 69 56 … … 71 58 \brief Imports a obj file and handles the the relative location 72 59 \param fileName The file to import 60 61 Splits the FileName from the DirectoryName 73 62 */ 74 63 bool OBJModel::importFile (const char* fileName) 75 64 { 76 65 PRINTF(4)("preparing to read in file: %s\n", fileName); 77 78 79 #ifdef __WIN32__ 80 // win32 path reading 81 char pathSplitter= '\\'; 82 #else /* __WIN32__ */ 83 // unix path reading 84 char pathSplitter='/'; 85 #endif /* __WIN32__ */ 86 char* tmpName; 87 strcpy(tmpName, fileName); 88 if (tmpName[0] == pathSplitter) 89 tmpName++; 90 char* name = tmpName; 91 while (( tmpName = strchr (tmpName+1, pathSplitter))) 92 { 93 name = tmpName+1; 94 } 95 this->objPath = new char[name-fileName+1]; 96 strncpy(this->objPath, fileName, name-fileName); 97 this->objPath[name-fileName] = '\0'; 98 if (strlen(objPath)> 0) 99 PRINTF(5)("Resolved file %s to folder: %s.\n", name, objPath); 100 else 101 PRINTF(5)("Resolved file %s.\n", name); 102 103 this->setName(name); 104 105 this->objFileName = new char[strlen(name)+1]; 106 strcpy (this->objFileName, name); 107 this->readFromObjFile (); 66 // splitting the 67 char* split = NULL; 68 69 if (!(split = strrchr(fileName, '/'))) 70 split = strrchr(fileName, '\\'); // windows Case 71 if (split) 72 { 73 int len = split - fileName+1; 74 this->objPath = new char[len +2]; 75 strncpy(this->objPath, fileName, len); 76 this->objPath[len] = '\0'; 77 PRINTF(1)("Resolved file %s to Path %s.\n", fileName, this->objPath); 78 } 79 this->readFromObjFile (fileName); 108 80 return true; 109 81 } … … 113 85 This function does read the file, parses it for the occurence of things like vertices, faces and so on, and executes the specific tasks 114 86 */ 115 bool OBJModel::readFromObjFile (void) 116 { 117 char* fileName = new char [strlen(objPath)+strlen(objFileName)+1]; 118 if (this->objFileName != NULL && !strcmp(this->objFileName, "")) 119 return false; 120 strcpy(fileName, this->objPath); 121 strcat(fileName, this->objFileName); 122 87 bool OBJModel::readFromObjFile(const char* fileName) 88 { 123 89 FILE* stream; 124 90 if( (stream = fopen (fileName, "r")) == NULL) 125 91 { 126 printf(" IniParser could not open%s\n", fileName);92 printf("Object File Could not be Opened %s\n", fileName); 127 93 return false; 128 94 } … … 179 145 } 180 146 fclose (stream); 181 delete []fileName;182 147 return true; 183 148 } … … 194 159 bool OBJModel::readMtlLib (const char* mtlFile) 195 160 { 196 this->mtlFileName = new char [strlen(mtlFile)+1]; 197 strcpy(this->mtlFileName, mtlFile); 198 char* fileName = new char [strlen(objPath) + strlen(this->mtlFileName)+1]; 199 strcpy(fileName, this->objPath); 200 strcat(fileName, this->mtlFileName); 201 161 char* fileName = new char [strlen(this->objPath) + strlen(mtlFile)+1]; 162 sprintf(fileName, "%s%s", this->objPath, mtlFile); 202 163 203 164 FILE* stream; 204 165 if( (stream = fopen (fileName, "r")) == NULL) 205 166 { 206 printf("IniParser could not open %s\n", fileName); 167 PRINTF(2)("MaterialLibrary could not be opened %s\n", fileName); 168 delete []fileName; 207 169 return false; 208 170 } -
orxonox/branches/physics/src/lib/graphics/importer/objModel.h
r3953 r4178 15 15 OBJModel(const char* fileName, float scaling = 1.0); 16 16 virtual ~OBJModel(); 17 void initializeOBJ(void);18 17 19 18 private: 20 19 // Variables 21 20 char* objPath; //!< The Path where the obj and mtl-file are located. 22 char* objFileName; //!< The Name of the obj-file.23 char* mtlFileName; //!< The Name of the mtl-file (parsed out of the obj-file)24 21 25 22 ///// readin ///// 26 23 bool importFile (const char* fileName); 27 bool readFromObjFile ( void);24 bool readFromObjFile (const char* fileName); 28 25 bool readMtlLib (const char* matFile); 29 26 }; -
orxonox/branches/physics/src/lib/graphics/importer/primitive_model.cc
r3953 r4178 71 71 void PrimitiveModel::sphereModel(float size, unsigned int detail) 72 72 { 73 int vertexCount = 0;74 73 if (detail <= 0) 75 74 detail = 1; … … 89 88 size * sin(vi) * cos(vj)); 90 89 this->addVertexTexture(i / (df *2.0), (j-1.0)/(df)+.5); 91 vertexCount++;92 90 } 93 91 } 94 92 this->addVertex(0, -size, 0); 93 this->addVertexTexture(0,0); 95 94 this->addVertex(0, size, 0); 95 this->addVertexTexture(0 ,1); 96 96 97 97 // defining the binding Faces. … … 102 102 { 103 103 104 v1 = i*detail + j ;105 v4 = i*detail + (j+1);104 v1 = i*detail + j-1; 105 v4 = i*detail + j; 106 106 107 107 if (i == detail*2 -1) 108 108 { 109 v2 = j ;110 v3 = j +1;109 v2 = j-1; 110 v3 = j; 111 111 } 112 112 else 113 113 { 114 v2 = (i+1)*detail + j ;115 v3 = (i+1)*detail + (j+1);116 } 117 114 v2 = (i+1)*detail + j-1; 115 v3 = (i+1)*detail + j; 116 } 117 118 118 if (j == 0) 119 119 { 120 v1 = vertexCount+1;120 v1 = this->getVertexCount()-2; 121 121 this->addFace(3, VERTEX_TEXCOORD, v1, v1, v3, v3, v4, v4); 122 122 } 123 123 else if (j == detail) 124 124 { 125 v3 = vertexCount+2;125 v3 = this->getVertexCount()-1; 126 126 this->addFace(3, VERTEX_TEXCOORD, v1, v1, v2, v2, v3, v3); 127 127 } … … 157 157 { 158 158 int p1, p2, p3, p4; 159 p1 = 2*i +1;160 p2 = 2*i+ 2;161 p3 = 2*i+ 4;162 p4 = 2*i+ 3;159 p1 = 2*i; 160 p2 = 2*i+1; 161 p3 = 2*i+3; 162 p4 = 2*i+2; 163 163 // something is wrong here 164 164 this->addFace(4, VERTEX_ONLY, p1, p2, p3, p4); 165 this->addFace(3, VERTEX_ONLY, p4, p1, 2*detail +1);166 this->addFace(3, VERTEX_ONLY, p2, p3, 2*detail+ 2);165 this->addFace(3, VERTEX_ONLY, p4, p1, 2*detail); 166 this->addFace(3, VERTEX_ONLY, p2, p3, 2*detail+1); 167 167 } 168 168 // caps 169 this->addFace(4, VERTEX_ONLY, 2*detail- 1, 2*detail, 2, 1);170 this->addFace(3, VERTEX_ONLY, 1, 2*detail-1, 2*detail+1);171 this->addFace(3, VERTEX_ONLY, 2*detail , 2, 2*detail+2);169 this->addFace(4, VERTEX_ONLY, 2*detail-2, 2*detail-1, 1, 0); 170 this->addFace(3, VERTEX_ONLY, 0, 2*detail-2, 2*detail); 171 this->addFace(3, VERTEX_ONLY, 2*detail-1, 1, 2*detail+1); 172 172 } 173 173 … … 198 198 { 199 199 unsigned int v1, v2; 200 v1 = i+ 3;200 v1 = i+2; 201 201 if (i == detail -1) 202 v2 = 3;202 v2 = 2; 203 203 else 204 v2 = i+ 4;205 this->addFace(3, VERTEX_ONLY, 1, v1, v2);206 this->addFace(3, VERTEX_ONLY, 2, v1, v2);204 v2 = i+3; 205 this->addFace(3, VERTEX_ONLY, 0, v1, v2); 206 this->addFace(3, VERTEX_ONLY, 1, v1, v2); 207 207 } 208 208 } … … 228 228 unsigned int v1, v2, v3, v4; 229 229 for (int i = 0; i < detail-1; i++) 230 for (int j = 1; j < detail; j++)230 for (int j = 0; j < detail-1; j++) 231 231 { 232 232 v1 = i*detail + j; -
orxonox/branches/physics/src/lib/graphics/importer/texture.cc
r3953 r4178 25 25 Texture::Texture(const char* imageName) 26 26 { 27 bAlpha = false; 27 28 this->texture = 0; 28 29 if (imageName) … … 112 113 if ( (saved_flags & SDL_SRCALPHA) == SDL_SRCALPHA ) { 113 114 SDL_SetAlpha(surface, saved_flags | SDL_OPENGL, saved_alpha); 115 this->bAlpha = true; 114 116 } 115 117 … … 119 121 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); 120 122 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); 121 /* glTexImage2D(GL_TEXTURE_2D, 123 // build the Texture 124 glTexImage2D(GL_TEXTURE_2D, 122 125 0, 123 126 GL_RGBA, … … 127 130 GL_UNSIGNED_BYTE, 128 131 image->pixels); 129 */132 // build the MipMaps 130 133 gluBuild2DMipmaps(GL_TEXTURE_2D, 131 3,134 GL_RGBA, 132 135 w, 133 136 h, … … 135 138 GL_UNSIGNED_BYTE, 136 139 image->pixels); 137 140 138 141 SDL_FreeSurface(image); /* No longer needed */ 139 142 -
orxonox/branches/physics/src/lib/graphics/importer/texture.h
r3953 r4178 23 23 char* searchTextureInPaths(const char* texName) const; 24 24 void swap(unsigned char &a, unsigned char &b); 25 26 bool bAlpha; //!< if the texture has an alpha channel. 25 27 public: 26 28 Texture(const char* imageName = NULL); … … 30 32 inline GLuint getTexture(void) {return this->texture;} 31 33 GLuint loadTexToGL (SDL_Surface* surface); 34 inline bool hasAlpha(void) {return bAlpha;} 32 35 33 36 bool loadImage(const char* imageName); -
orxonox/branches/physics/src/lib/gui/Makefile.in
r3789 r4178 89 89 EXEEXT = @EXEEXT@ 90 90 GPROF = @GPROF@ 91 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@92 GTHREAD_LIBS = @GTHREAD_LIBS@93 91 GTK2_CFLAGS = @GTK2_CFLAGS@ 94 92 GTK2_LIBS = @GTK2_LIBS@ 95 93 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 96 94 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 97 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@98 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@99 95 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 100 96 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ … … 117 113 PACKAGE_VERSION = @PACKAGE_VERSION@ 118 114 PATH_SEPARATOR = @PATH_SEPARATOR@ 115 PKG_CONFIG = @PKG_CONFIG@ 116 RANLIB = @RANLIB@ 119 117 SET_MAKE = @SET_MAKE@ 120 118 SHELL = @SHELL@ … … 125 123 ac_ct_CC = @ac_ct_CC@ 126 124 ac_ct_CXX = @ac_ct_CXX@ 125 ac_ct_RANLIB = @ac_ct_RANLIB@ 127 126 ac_ct_STRIP = @ac_ct_STRIP@ 128 127 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -
orxonox/branches/physics/src/lib/gui/console/Makefile.in
r3789 r4178 107 107 EXEEXT = @EXEEXT@ 108 108 GPROF = @GPROF@ 109 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@110 GTHREAD_LIBS = @GTHREAD_LIBS@111 109 GTK2_CFLAGS = @GTK2_CFLAGS@ 112 110 GTK2_LIBS = @GTK2_LIBS@ 113 111 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 114 112 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 115 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@116 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@117 113 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 118 114 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ … … 136 132 PACKAGE_VERSION = @PACKAGE_VERSION@ 137 133 PATH_SEPARATOR = @PATH_SEPARATOR@ 134 PKG_CONFIG = @PKG_CONFIG@ 135 RANLIB = @RANLIB@ 138 136 SET_MAKE = @SET_MAKE@ 139 137 SHELL = @SHELL@ … … 144 142 ac_ct_CC = @ac_ct_CC@ 145 143 ac_ct_CXX = @ac_ct_CXX@ 144 ac_ct_RANLIB = @ac_ct_RANLIB@ 146 145 ac_ct_STRIP = @ac_ct_STRIP@ 147 146 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -
orxonox/branches/physics/src/lib/gui/gui/Makefile.am
r3624 r4178 7 7 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/coord 8 8 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/data 9 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gaphics 10 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/font 9 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics 11 10 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/importer 12 11 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui … … 19 18 AM_CXXFLAGS+=-I$(MAINSRCDIR)/glmenu 20 19 AM_CXXFLAGS+=-I$(MAINSRCDIR)/ai 20 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util 21 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/animation 22 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/common 21 23 22 24 #AM_LDFLAGS=$(GTK2_LIBS) $(GTHREAD_LIBS) … … 24 26 25 27 bin_PROGRAMS=gui 26 gui_SOURCES=orxonox_gui.cc \ 27 orxonox_gui_gtk.cc \ 28 orxonox_gui_video.cc \ 29 orxonox_gui_audio.cc \ 30 orxonox_gui_exec.cc \ 31 orxonox_gui_flags.cc \ 32 orxonox_gui_banner.cc \ 33 orxonox_gui_keys.cc \ 34 orxonox_gui_update.cc 28 gui_SOURCES=gui_main.cc \ 29 gui.cc \ 30 gui_gtk.cc \ 31 gui_element.cc \ 32 gui_video.cc \ 33 gui_audio.cc \ 34 gui_exec.cc \ 35 gui_flags.cc \ 36 gui_banner.cc \ 37 gui_keys.cc \ 38 gui_update.cc \ 39 $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \ 40 $(MAINSRCDIR)/lib/lang/base_object.cc \ 41 $(MAINSRCDIR)/lib/math/vector.cc \ 42 $(MAINSRCDIR)/util/resource_manager.cc \ 43 $(MAINSRCDIR)/lib/graphics/text_engine.cc \ 44 $(MAINSRCDIR)/lib/coord/p_node.cc \ 45 $(MAINSRCDIR)/lib/coord/null_parent.cc \ 46 $(MAINSRCDIR)/lib/graphics/importer/array.cc \ 47 $(MAINSRCDIR)/lib/graphics/importer/model.cc \ 48 $(MAINSRCDIR)/lib/graphics/importer/objModel.cc \ 49 $(MAINSRCDIR)/lib/graphics/importer/material.cc \ 50 $(MAINSRCDIR)/lib/graphics/importer/texture.cc \ 51 $(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc 35 52 36 noinst_HEADERS=orxonox_gui.h \ 37 orxonox_gui_gtk.h \ 38 orxonox_gui_video.h \ 39 orxonox_gui_audio.h \ 40 orxonox_gui_exec.h \ 41 orxonox_gui_flags.h \ 42 orxonox_gui_banner.h \ 43 orxonox_gui_keys.h \ 44 orxonox_gui_update.h 53 noinst_HEADERS=gui.h \ 54 gui_gtk.h \ 55 gui_element.h \ 56 gui_video.h \ 57 gui_audio.h \ 58 gui_exec.h \ 59 gui_flags.h \ 60 gui_banner.h \ 61 gui_keys.h \ 62 gui_update.h 45 63 46 64 # uncomment the following if orxonox requires the mathlibrary -
orxonox/branches/physics/src/lib/gui/gui/Makefile.in
r3789 r4178 53 53 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) 54 54 PROGRAMS = $(bin_PROGRAMS) 55 am_gui_OBJECTS = orxonox_gui.$(OBJEXT) orxonox_gui_gtk.$(OBJEXT) \ 56 orxonox_gui_video.$(OBJEXT) orxonox_gui_audio.$(OBJEXT) \ 57 orxonox_gui_exec.$(OBJEXT) orxonox_gui_flags.$(OBJEXT) \ 58 orxonox_gui_banner.$(OBJEXT) orxonox_gui_keys.$(OBJEXT) \ 59 orxonox_gui_update.$(OBJEXT) 55 am_gui_OBJECTS = gui_main.$(OBJEXT) gui.$(OBJEXT) gui_gtk.$(OBJEXT) \ 56 gui_element.$(OBJEXT) gui_video.$(OBJEXT) gui_audio.$(OBJEXT) \ 57 gui_exec.$(OBJEXT) gui_flags.$(OBJEXT) gui_banner.$(OBJEXT) \ 58 gui_keys.$(OBJEXT) gui_update.$(OBJEXT) \ 59 graphics_engine.$(OBJEXT) base_object.$(OBJEXT) \ 60 vector.$(OBJEXT) resource_manager.$(OBJEXT) \ 61 text_engine.$(OBJEXT) p_node.$(OBJEXT) null_parent.$(OBJEXT) \ 62 array.$(OBJEXT) model.$(OBJEXT) objModel.$(OBJEXT) \ 63 material.$(OBJEXT) texture.$(OBJEXT) primitive_model.$(OBJEXT) 60 64 gui_OBJECTS = $(am_gui_OBJECTS) 61 65 gui_LDADD = $(LDADD) … … 63 67 depcomp = $(SHELL) $(top_srcdir)/depcomp 64 68 am__depfiles_maybe = depfiles 65 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/orxonox_gui.Po \ 66 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_audio.Po \ 67 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_banner.Po \ 68 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_exec.Po \ 69 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_flags.Po \ 70 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_gtk.Po \ 71 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_keys.Po \ 72 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_update.Po \ 73 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_video.Po 69 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po \ 70 @AMDEP_TRUE@ ./$(DEPDIR)/base_object.Po \ 71 @AMDEP_TRUE@ ./$(DEPDIR)/graphics_engine.Po ./$(DEPDIR)/gui.Po \ 72 @AMDEP_TRUE@ ./$(DEPDIR)/gui_audio.Po ./$(DEPDIR)/gui_banner.Po \ 73 @AMDEP_TRUE@ ./$(DEPDIR)/gui_element.Po ./$(DEPDIR)/gui_exec.Po \ 74 @AMDEP_TRUE@ ./$(DEPDIR)/gui_flags.Po ./$(DEPDIR)/gui_gtk.Po \ 75 @AMDEP_TRUE@ ./$(DEPDIR)/gui_keys.Po ./$(DEPDIR)/gui_main.Po \ 76 @AMDEP_TRUE@ ./$(DEPDIR)/gui_update.Po ./$(DEPDIR)/gui_video.Po \ 77 @AMDEP_TRUE@ ./$(DEPDIR)/material.Po ./$(DEPDIR)/model.Po \ 78 @AMDEP_TRUE@ ./$(DEPDIR)/null_parent.Po ./$(DEPDIR)/objModel.Po \ 79 @AMDEP_TRUE@ ./$(DEPDIR)/p_node.Po \ 80 @AMDEP_TRUE@ ./$(DEPDIR)/primitive_model.Po \ 81 @AMDEP_TRUE@ ./$(DEPDIR)/resource_manager.Po \ 82 @AMDEP_TRUE@ ./$(DEPDIR)/text_engine.Po ./$(DEPDIR)/texture.Po \ 83 @AMDEP_TRUE@ ./$(DEPDIR)/vector.Po 74 84 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 75 85 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) … … 116 126 EXEEXT = @EXEEXT@ 117 127 GPROF = @GPROF@ 118 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@119 GTHREAD_LIBS = @GTHREAD_LIBS@120 128 GTK2_CFLAGS = @GTK2_CFLAGS@ 121 129 GTK2_LIBS = @GTK2_LIBS@ 122 130 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 123 131 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 124 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@125 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@126 132 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 127 133 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ … … 144 150 PACKAGE_VERSION = @PACKAGE_VERSION@ 145 151 PATH_SEPARATOR = @PATH_SEPARATOR@ 152 PKG_CONFIG = @PKG_CONFIG@ 153 RANLIB = @RANLIB@ 146 154 SET_MAKE = @SET_MAKE@ 147 155 SHELL = @SHELL@ … … 152 160 ac_ct_CC = @ac_ct_CC@ 153 161 ac_ct_CXX = @ac_ct_CXX@ 162 ac_ct_RANLIB = @ac_ct_RANLIB@ 154 163 ac_ct_STRIP = @ac_ct_STRIP@ 155 164 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ … … 193 202 target_vendor = @target_vendor@ 194 203 MAINSRCDIR = ../../.. 195 AM_CXXFLAGS = $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS) -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)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai204 AM_CXXFLAGS = $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS) -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common 196 205 197 206 #AM_LDFLAGS=$(GTK2_LIBS) $(GTHREAD_LIBS) 198 207 AM_LDFLAGS = $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS) 199 gui_SOURCES = orxonox_gui.cc \ 200 orxonox_gui_gtk.cc \ 201 orxonox_gui_video.cc \ 202 orxonox_gui_audio.cc \ 203 orxonox_gui_exec.cc \ 204 orxonox_gui_flags.cc \ 205 orxonox_gui_banner.cc \ 206 orxonox_gui_keys.cc \ 207 orxonox_gui_update.cc 208 209 noinst_HEADERS = orxonox_gui.h \ 210 orxonox_gui_gtk.h \ 211 orxonox_gui_video.h \ 212 orxonox_gui_audio.h \ 213 orxonox_gui_exec.h \ 214 orxonox_gui_flags.h \ 215 orxonox_gui_banner.h \ 216 orxonox_gui_keys.h \ 217 orxonox_gui_update.h 208 gui_SOURCES = gui_main.cc \ 209 gui.cc \ 210 gui_gtk.cc \ 211 gui_element.cc \ 212 gui_video.cc \ 213 gui_audio.cc \ 214 gui_exec.cc \ 215 gui_flags.cc \ 216 gui_banner.cc \ 217 gui_keys.cc \ 218 gui_update.cc \ 219 $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \ 220 $(MAINSRCDIR)/lib/lang/base_object.cc \ 221 $(MAINSRCDIR)/lib/math/vector.cc \ 222 $(MAINSRCDIR)/util/resource_manager.cc \ 223 $(MAINSRCDIR)/lib/graphics/text_engine.cc \ 224 $(MAINSRCDIR)/lib/coord/p_node.cc \ 225 $(MAINSRCDIR)/lib/coord/null_parent.cc \ 226 $(MAINSRCDIR)/lib/graphics/importer/array.cc \ 227 $(MAINSRCDIR)/lib/graphics/importer/model.cc \ 228 $(MAINSRCDIR)/lib/graphics/importer/objModel.cc \ 229 $(MAINSRCDIR)/lib/graphics/importer/material.cc \ 230 $(MAINSRCDIR)/lib/graphics/importer/texture.cc \ 231 $(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc 232 233 noinst_HEADERS = gui.h \ 234 gui_gtk.h \ 235 gui_element.h \ 236 gui_video.h \ 237 gui_audio.h \ 238 gui_exec.h \ 239 gui_flags.h \ 240 gui_banner.h \ 241 gui_keys.h \ 242 gui_update.h 218 243 219 244 … … 293 318 -rm -f *.tab.c 294 319 295 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui.Po@am__quote@ 296 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_audio.Po@am__quote@ 297 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_banner.Po@am__quote@ 298 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_exec.Po@am__quote@ 299 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_flags.Po@am__quote@ 300 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_gtk.Po@am__quote@ 301 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_keys.Po@am__quote@ 302 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_update.Po@am__quote@ 303 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_video.Po@am__quote@ 320 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@ 321 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_object.Po@am__quote@ 322 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphics_engine.Po@am__quote@ 323 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui.Po@am__quote@ 324 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_audio.Po@am__quote@ 325 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_banner.Po@am__quote@ 326 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_element.Po@am__quote@ 327 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_exec.Po@am__quote@ 328 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_flags.Po@am__quote@ 329 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_gtk.Po@am__quote@ 330 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_keys.Po@am__quote@ 331 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_main.Po@am__quote@ 332 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_update.Po@am__quote@ 333 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_video.Po@am__quote@ 334 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@ 335 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model.Po@am__quote@ 336 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/null_parent.Po@am__quote@ 337 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objModel.Po@am__quote@ 338 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_node.Po@am__quote@ 339 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primitive_model.Po@am__quote@ 340 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource_manager.Po@am__quote@ 341 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text_engine.Po@am__quote@ 342 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@ 343 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@ 304 344 305 345 .cc.o: … … 318 358 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 319 359 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 360 361 graphics_engine.o: $(MAINSRCDIR)/lib/graphics/graphics_engine.cc 362 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT graphics_engine.o -MD -MP -MF "$(DEPDIR)/graphics_engine.Tpo" -c -o graphics_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/graphics_engine.cc; \ 363 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/graphics_engine.Tpo" "$(DEPDIR)/graphics_engine.Po"; else rm -f "$(DEPDIR)/graphics_engine.Tpo"; exit 1; fi 364 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/graphics_engine.cc' object='graphics_engine.o' libtool=no @AMDEPBACKSLASH@ 365 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/graphics_engine.Po' tmpdepfile='$(DEPDIR)/graphics_engine.TPo' @AMDEPBACKSLASH@ 366 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 367 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o graphics_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/graphics_engine.cc 368 369 graphics_engine.obj: $(MAINSRCDIR)/lib/graphics/graphics_engine.cc 370 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT graphics_engine.obj -MD -MP -MF "$(DEPDIR)/graphics_engine.Tpo" -c -o graphics_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; fi`; \ 371 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/graphics_engine.Tpo" "$(DEPDIR)/graphics_engine.Po"; else rm -f "$(DEPDIR)/graphics_engine.Tpo"; exit 1; fi 372 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/graphics_engine.cc' object='graphics_engine.obj' libtool=no @AMDEPBACKSLASH@ 373 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/graphics_engine.Po' tmpdepfile='$(DEPDIR)/graphics_engine.TPo' @AMDEPBACKSLASH@ 374 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 375 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o graphics_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; fi` 376 377 base_object.o: $(MAINSRCDIR)/lib/lang/base_object.cc 378 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT base_object.o -MD -MP -MF "$(DEPDIR)/base_object.Tpo" -c -o base_object.o `test -f '$(MAINSRCDIR)/lib/lang/base_object.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/lang/base_object.cc; \ 379 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/base_object.Tpo" "$(DEPDIR)/base_object.Po"; else rm -f "$(DEPDIR)/base_object.Tpo"; exit 1; fi 380 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/lang/base_object.cc' object='base_object.o' libtool=no @AMDEPBACKSLASH@ 381 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/base_object.Po' tmpdepfile='$(DEPDIR)/base_object.TPo' @AMDEPBACKSLASH@ 382 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 383 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o base_object.o `test -f '$(MAINSRCDIR)/lib/lang/base_object.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/lang/base_object.cc 384 385 base_object.obj: $(MAINSRCDIR)/lib/lang/base_object.cc 386 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT base_object.obj -MD -MP -MF "$(DEPDIR)/base_object.Tpo" -c -o base_object.obj `if test -f '$(MAINSRCDIR)/lib/lang/base_object.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/lang/base_object.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/lang/base_object.cc'; fi`; \ 387 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/base_object.Tpo" "$(DEPDIR)/base_object.Po"; else rm -f "$(DEPDIR)/base_object.Tpo"; exit 1; fi 388 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/lang/base_object.cc' object='base_object.obj' libtool=no @AMDEPBACKSLASH@ 389 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/base_object.Po' tmpdepfile='$(DEPDIR)/base_object.TPo' @AMDEPBACKSLASH@ 390 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 391 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o base_object.obj `if test -f '$(MAINSRCDIR)/lib/lang/base_object.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/lang/base_object.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/lang/base_object.cc'; fi` 392 393 vector.o: $(MAINSRCDIR)/lib/math/vector.cc 394 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT vector.o -MD -MP -MF "$(DEPDIR)/vector.Tpo" -c -o vector.o `test -f '$(MAINSRCDIR)/lib/math/vector.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/math/vector.cc; \ 395 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/vector.Tpo" "$(DEPDIR)/vector.Po"; else rm -f "$(DEPDIR)/vector.Tpo"; exit 1; fi 396 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/math/vector.cc' object='vector.o' libtool=no @AMDEPBACKSLASH@ 397 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/vector.Po' tmpdepfile='$(DEPDIR)/vector.TPo' @AMDEPBACKSLASH@ 398 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 399 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o vector.o `test -f '$(MAINSRCDIR)/lib/math/vector.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/math/vector.cc 400 401 vector.obj: $(MAINSRCDIR)/lib/math/vector.cc 402 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT vector.obj -MD -MP -MF "$(DEPDIR)/vector.Tpo" -c -o vector.obj `if test -f '$(MAINSRCDIR)/lib/math/vector.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/math/vector.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/math/vector.cc'; fi`; \ 403 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/vector.Tpo" "$(DEPDIR)/vector.Po"; else rm -f "$(DEPDIR)/vector.Tpo"; exit 1; fi 404 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/math/vector.cc' object='vector.obj' libtool=no @AMDEPBACKSLASH@ 405 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/vector.Po' tmpdepfile='$(DEPDIR)/vector.TPo' @AMDEPBACKSLASH@ 406 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 407 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o vector.obj `if test -f '$(MAINSRCDIR)/lib/math/vector.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/math/vector.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/math/vector.cc'; fi` 408 409 resource_manager.o: $(MAINSRCDIR)/util/resource_manager.cc 410 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT resource_manager.o -MD -MP -MF "$(DEPDIR)/resource_manager.Tpo" -c -o resource_manager.o `test -f '$(MAINSRCDIR)/util/resource_manager.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/resource_manager.cc; \ 411 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/resource_manager.Tpo" "$(DEPDIR)/resource_manager.Po"; else rm -f "$(DEPDIR)/resource_manager.Tpo"; exit 1; fi 412 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/util/resource_manager.cc' object='resource_manager.o' libtool=no @AMDEPBACKSLASH@ 413 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/resource_manager.Po' tmpdepfile='$(DEPDIR)/resource_manager.TPo' @AMDEPBACKSLASH@ 414 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 415 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o resource_manager.o `test -f '$(MAINSRCDIR)/util/resource_manager.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/resource_manager.cc 416 417 resource_manager.obj: $(MAINSRCDIR)/util/resource_manager.cc 418 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT resource_manager.obj -MD -MP -MF "$(DEPDIR)/resource_manager.Tpo" -c -o resource_manager.obj `if test -f '$(MAINSRCDIR)/util/resource_manager.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/resource_manager.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/resource_manager.cc'; fi`; \ 419 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/resource_manager.Tpo" "$(DEPDIR)/resource_manager.Po"; else rm -f "$(DEPDIR)/resource_manager.Tpo"; exit 1; fi 420 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/util/resource_manager.cc' object='resource_manager.obj' libtool=no @AMDEPBACKSLASH@ 421 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/resource_manager.Po' tmpdepfile='$(DEPDIR)/resource_manager.TPo' @AMDEPBACKSLASH@ 422 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 423 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o resource_manager.obj `if test -f '$(MAINSRCDIR)/util/resource_manager.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/resource_manager.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/resource_manager.cc'; fi` 424 425 text_engine.o: $(MAINSRCDIR)/lib/graphics/text_engine.cc 426 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT text_engine.o -MD -MP -MF "$(DEPDIR)/text_engine.Tpo" -c -o text_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/text_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/text_engine.cc; \ 427 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/text_engine.Tpo" "$(DEPDIR)/text_engine.Po"; else rm -f "$(DEPDIR)/text_engine.Tpo"; exit 1; fi 428 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/text_engine.cc' object='text_engine.o' libtool=no @AMDEPBACKSLASH@ 429 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/text_engine.Po' tmpdepfile='$(DEPDIR)/text_engine.TPo' @AMDEPBACKSLASH@ 430 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 431 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o text_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/text_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/text_engine.cc 432 433 text_engine.obj: $(MAINSRCDIR)/lib/graphics/text_engine.cc 434 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT text_engine.obj -MD -MP -MF "$(DEPDIR)/text_engine.Tpo" -c -o text_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/text_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/text_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/text_engine.cc'; fi`; \ 435 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/text_engine.Tpo" "$(DEPDIR)/text_engine.Po"; else rm -f "$(DEPDIR)/text_engine.Tpo"; exit 1; fi 436 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/text_engine.cc' object='text_engine.obj' libtool=no @AMDEPBACKSLASH@ 437 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/text_engine.Po' tmpdepfile='$(DEPDIR)/text_engine.TPo' @AMDEPBACKSLASH@ 438 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 439 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o text_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/text_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/text_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/text_engine.cc'; fi` 440 441 p_node.o: $(MAINSRCDIR)/lib/coord/p_node.cc 442 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT p_node.o -MD -MP -MF "$(DEPDIR)/p_node.Tpo" -c -o p_node.o `test -f '$(MAINSRCDIR)/lib/coord/p_node.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/coord/p_node.cc; \ 443 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/p_node.Tpo" "$(DEPDIR)/p_node.Po"; else rm -f "$(DEPDIR)/p_node.Tpo"; exit 1; fi 444 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/coord/p_node.cc' object='p_node.o' libtool=no @AMDEPBACKSLASH@ 445 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/p_node.Po' tmpdepfile='$(DEPDIR)/p_node.TPo' @AMDEPBACKSLASH@ 446 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 447 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o p_node.o `test -f '$(MAINSRCDIR)/lib/coord/p_node.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/coord/p_node.cc 448 449 p_node.obj: $(MAINSRCDIR)/lib/coord/p_node.cc 450 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT p_node.obj -MD -MP -MF "$(DEPDIR)/p_node.Tpo" -c -o p_node.obj `if test -f '$(MAINSRCDIR)/lib/coord/p_node.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/coord/p_node.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/coord/p_node.cc'; fi`; \ 451 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/p_node.Tpo" "$(DEPDIR)/p_node.Po"; else rm -f "$(DEPDIR)/p_node.Tpo"; exit 1; fi 452 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/coord/p_node.cc' object='p_node.obj' libtool=no @AMDEPBACKSLASH@ 453 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/p_node.Po' tmpdepfile='$(DEPDIR)/p_node.TPo' @AMDEPBACKSLASH@ 454 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 455 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o p_node.obj `if test -f '$(MAINSRCDIR)/lib/coord/p_node.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/coord/p_node.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/coord/p_node.cc'; fi` 456 457 null_parent.o: $(MAINSRCDIR)/lib/coord/null_parent.cc 458 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT null_parent.o -MD -MP -MF "$(DEPDIR)/null_parent.Tpo" -c -o null_parent.o `test -f '$(MAINSRCDIR)/lib/coord/null_parent.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/coord/null_parent.cc; \ 459 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/null_parent.Tpo" "$(DEPDIR)/null_parent.Po"; else rm -f "$(DEPDIR)/null_parent.Tpo"; exit 1; fi 460 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/coord/null_parent.cc' object='null_parent.o' libtool=no @AMDEPBACKSLASH@ 461 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/null_parent.Po' tmpdepfile='$(DEPDIR)/null_parent.TPo' @AMDEPBACKSLASH@ 462 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 463 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o null_parent.o `test -f '$(MAINSRCDIR)/lib/coord/null_parent.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/coord/null_parent.cc 464 465 null_parent.obj: $(MAINSRCDIR)/lib/coord/null_parent.cc 466 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT null_parent.obj -MD -MP -MF "$(DEPDIR)/null_parent.Tpo" -c -o null_parent.obj `if test -f '$(MAINSRCDIR)/lib/coord/null_parent.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/coord/null_parent.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/coord/null_parent.cc'; fi`; \ 467 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/null_parent.Tpo" "$(DEPDIR)/null_parent.Po"; else rm -f "$(DEPDIR)/null_parent.Tpo"; exit 1; fi 468 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/coord/null_parent.cc' object='null_parent.obj' libtool=no @AMDEPBACKSLASH@ 469 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/null_parent.Po' tmpdepfile='$(DEPDIR)/null_parent.TPo' @AMDEPBACKSLASH@ 470 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 471 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o null_parent.obj `if test -f '$(MAINSRCDIR)/lib/coord/null_parent.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/coord/null_parent.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/coord/null_parent.cc'; fi` 472 473 array.o: $(MAINSRCDIR)/lib/graphics/importer/array.cc 474 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT array.o -MD -MP -MF "$(DEPDIR)/array.Tpo" -c -o array.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/array.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/array.cc; \ 475 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/array.Tpo" "$(DEPDIR)/array.Po"; else rm -f "$(DEPDIR)/array.Tpo"; exit 1; fi 476 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/importer/array.cc' object='array.o' libtool=no @AMDEPBACKSLASH@ 477 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/array.Po' tmpdepfile='$(DEPDIR)/array.TPo' @AMDEPBACKSLASH@ 478 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 479 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o array.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/array.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/array.cc 480 481 array.obj: $(MAINSRCDIR)/lib/graphics/importer/array.cc 482 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT array.obj -MD -MP -MF "$(DEPDIR)/array.Tpo" -c -o array.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/array.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/array.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/array.cc'; fi`; \ 483 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/array.Tpo" "$(DEPDIR)/array.Po"; else rm -f "$(DEPDIR)/array.Tpo"; exit 1; fi 484 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/importer/array.cc' object='array.obj' libtool=no @AMDEPBACKSLASH@ 485 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/array.Po' tmpdepfile='$(DEPDIR)/array.TPo' @AMDEPBACKSLASH@ 486 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 487 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o array.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/array.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/array.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/array.cc'; fi` 488 489 model.o: $(MAINSRCDIR)/lib/graphics/importer/model.cc 490 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT model.o -MD -MP -MF "$(DEPDIR)/model.Tpo" -c -o model.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/model.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/model.cc; \ 491 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/model.Tpo" "$(DEPDIR)/model.Po"; else rm -f "$(DEPDIR)/model.Tpo"; exit 1; fi 492 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/importer/model.cc' object='model.o' libtool=no @AMDEPBACKSLASH@ 493 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/model.Po' tmpdepfile='$(DEPDIR)/model.TPo' @AMDEPBACKSLASH@ 494 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 495 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o model.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/model.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/model.cc 496 497 model.obj: $(MAINSRCDIR)/lib/graphics/importer/model.cc 498 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT model.obj -MD -MP -MF "$(DEPDIR)/model.Tpo" -c -o model.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/model.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/model.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/model.cc'; fi`; \ 499 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/model.Tpo" "$(DEPDIR)/model.Po"; else rm -f "$(DEPDIR)/model.Tpo"; exit 1; fi 500 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/importer/model.cc' object='model.obj' libtool=no @AMDEPBACKSLASH@ 501 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/model.Po' tmpdepfile='$(DEPDIR)/model.TPo' @AMDEPBACKSLASH@ 502 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 503 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o model.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/model.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/model.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/model.cc'; fi` 504 505 objModel.o: $(MAINSRCDIR)/lib/graphics/importer/objModel.cc 506 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT objModel.o -MD -MP -MF "$(DEPDIR)/objModel.Tpo" -c -o objModel.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/objModel.cc; \ 507 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/objModel.Tpo" "$(DEPDIR)/objModel.Po"; else rm -f "$(DEPDIR)/objModel.Tpo"; exit 1; fi 508 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/importer/objModel.cc' object='objModel.o' libtool=no @AMDEPBACKSLASH@ 509 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/objModel.Po' tmpdepfile='$(DEPDIR)/objModel.TPo' @AMDEPBACKSLASH@ 510 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 511 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o objModel.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/objModel.cc 512 513 objModel.obj: $(MAINSRCDIR)/lib/graphics/importer/objModel.cc 514 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT objModel.obj -MD -MP -MF "$(DEPDIR)/objModel.Tpo" -c -o objModel.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; fi`; \ 515 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/objModel.Tpo" "$(DEPDIR)/objModel.Po"; else rm -f "$(DEPDIR)/objModel.Tpo"; exit 1; fi 516 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/importer/objModel.cc' object='objModel.obj' libtool=no @AMDEPBACKSLASH@ 517 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/objModel.Po' tmpdepfile='$(DEPDIR)/objModel.TPo' @AMDEPBACKSLASH@ 518 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 519 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o objModel.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; fi` 520 521 material.o: $(MAINSRCDIR)/lib/graphics/importer/material.cc 522 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT material.o -MD -MP -MF "$(DEPDIR)/material.Tpo" -c -o material.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/material.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/material.cc; \ 523 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/material.Tpo" "$(DEPDIR)/material.Po"; else rm -f "$(DEPDIR)/material.Tpo"; exit 1; fi 524 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/importer/material.cc' object='material.o' libtool=no @AMDEPBACKSLASH@ 525 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/material.Po' tmpdepfile='$(DEPDIR)/material.TPo' @AMDEPBACKSLASH@ 526 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 527 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o material.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/material.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/material.cc 528 529 material.obj: $(MAINSRCDIR)/lib/graphics/importer/material.cc 530 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT material.obj -MD -MP -MF "$(DEPDIR)/material.Tpo" -c -o material.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/material.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/material.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/material.cc'; fi`; \ 531 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/material.Tpo" "$(DEPDIR)/material.Po"; else rm -f "$(DEPDIR)/material.Tpo"; exit 1; fi 532 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/importer/material.cc' object='material.obj' libtool=no @AMDEPBACKSLASH@ 533 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/material.Po' tmpdepfile='$(DEPDIR)/material.TPo' @AMDEPBACKSLASH@ 534 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 535 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o material.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/material.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/material.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/material.cc'; fi` 536 537 texture.o: $(MAINSRCDIR)/lib/graphics/importer/texture.cc 538 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT texture.o -MD -MP -MF "$(DEPDIR)/texture.Tpo" -c -o texture.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/texture.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/texture.cc; \ 539 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/texture.Tpo" "$(DEPDIR)/texture.Po"; else rm -f "$(DEPDIR)/texture.Tpo"; exit 1; fi 540 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/importer/texture.cc' object='texture.o' libtool=no @AMDEPBACKSLASH@ 541 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/texture.Po' tmpdepfile='$(DEPDIR)/texture.TPo' @AMDEPBACKSLASH@ 542 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 543 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o texture.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/texture.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/texture.cc 544 545 texture.obj: $(MAINSRCDIR)/lib/graphics/importer/texture.cc 546 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT texture.obj -MD -MP -MF "$(DEPDIR)/texture.Tpo" -c -o texture.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; fi`; \ 547 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/texture.Tpo" "$(DEPDIR)/texture.Po"; else rm -f "$(DEPDIR)/texture.Tpo"; exit 1; fi 548 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/importer/texture.cc' object='texture.obj' libtool=no @AMDEPBACKSLASH@ 549 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/texture.Po' tmpdepfile='$(DEPDIR)/texture.TPo' @AMDEPBACKSLASH@ 550 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 551 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o texture.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; fi` 552 553 primitive_model.o: $(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc 554 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT primitive_model.o -MD -MP -MF "$(DEPDIR)/primitive_model.Tpo" -c -o primitive_model.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc; \ 555 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/primitive_model.Tpo" "$(DEPDIR)/primitive_model.Po"; else rm -f "$(DEPDIR)/primitive_model.Tpo"; exit 1; fi 556 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc' object='primitive_model.o' libtool=no @AMDEPBACKSLASH@ 557 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/primitive_model.Po' tmpdepfile='$(DEPDIR)/primitive_model.TPo' @AMDEPBACKSLASH@ 558 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 559 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o primitive_model.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc 560 561 primitive_model.obj: $(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc 562 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT primitive_model.obj -MD -MP -MF "$(DEPDIR)/primitive_model.Tpo" -c -o primitive_model.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; fi`; \ 563 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/primitive_model.Tpo" "$(DEPDIR)/primitive_model.Po"; else rm -f "$(DEPDIR)/primitive_model.Tpo"; exit 1; fi 564 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc' object='primitive_model.obj' libtool=no @AMDEPBACKSLASH@ 565 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/primitive_model.Po' tmpdepfile='$(DEPDIR)/primitive_model.TPo' @AMDEPBACKSLASH@ 566 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 567 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o primitive_model.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; fi` 320 568 uninstall-info-am: 321 569 -
orxonox/branches/physics/src/lib/gui/gui/rc
r3423 r4178 1 # pixmap_path "<dir 1>:<dir 2>:<dir 3>:..." 2 # 3 pixmap_path "/usr/include/X11R6/pixmaps:/home/imain/pixmaps" 4 # 5 # style <name> [= <name>] 6 # { 7 # <option> 8 # } 9 # 10 # widget <widget_set> style <style_name> 11 # widget_class <widget_class_set> style <style_name> 12 13 # Here is a list of all the possible states. Note that some do not apply to 14 # certain widgets. 15 # 16 # NORMAL - The normal state of a widget, without the mouse over top of 17 # it, and not being pressed, etc. 18 # 19 # PRELIGHT - When the mouse is over top of the widget, colors defined 20 # using this state will be in effect. 21 # 22 # ACTIVE - When the widget is pressed or clicked it will be active, and 23 # the attributes assigned by this tag will be in effect. 24 # 25 # INSENSITIVE - When a widget is set insensitive, and cannot be 26 # activated, it will take these attributes. 27 # 28 # SELECTED - When an object is selected, it takes these attributes. 29 # 30 # Given these states, we can set the attributes of the widgets in each of 31 # these states using the following directives. 32 # 33 # fg - Sets the foreground color of a widget. 34 # bg - Sets the background color of a widget. 35 # bg_pixmap - Sets the background of a widget to a tiled pixmap. 36 # font - Sets the font to be used with the given widget. 37 # 38 39 # This sets a style called "button". The name is not really important, as 40 # it is assigned to the actual widgets at the bottom of the file. 41 42 style "window" 43 { 44 #This sets the padding around the window to the pixmap specified. 45 #bg_pixmap[<STATE>] = "<pixmap filename>" 46 #bg_pixmap[NORMAL] = "warning.xpm" 47 bg[NORMAL] = { 0, 0, 0 } 48 fg[NORMAL] = { 0, 1.0, 0 } 49 base[NORMAL] = { 0, 0, 0 } 50 base[INSENSITIVE] = { 0, 0, 0 } 51 } 52 53 style "scale" 54 { 55 #Sets the foreground color (font color) to red when in the "NORMAL" 56 #state. 57 58 fg[NORMAL] = { 0, 1.0, 0 } 59 bg[NORMAL] = { 0, 1.0, 0 } 60 bg[INSENSITIVE] = { 0, 1.0, 0 } 61 bg[PRELIGHT] = { 0, 1.0, 0 } 62 bg[ACTIVE] = {0.2, 0.2, 0.2 } 63 64 #Sets the background pixmap of this widget to that of its parent. 65 bg_pixmap[NORMAL] = "<parent>" 66 } 67 68 style "button" 69 { 70 # This shows all the possible states for a button. The only one that 71 # doesn't apply is the SELECTED state. 72 73 fg[PRELIGHT] = { 0, 0, 0 } 74 bg[PRELIGHT] = { 0, 1.0, 0 } 75 bg[ACTIVE] = { 0, 1.0, 0 } 76 fg[ACTIVE] = { 0, 1.0, 0 } 77 bg[NORMAL] = { 0, 0, 0 } 78 fg[NORMAL] = { 0, 1.0, 0 } 79 bg[INSENSITIVE] = { 1.0, 0, 1.0 } 80 fg[INSENSITIVE] = { 1.0, 0, 1.0 } 81 base[NORMAL] = { 0, 1.0, 0 } 82 base[PRELIGHT] = { 0, 1.0, 0 } 83 } 84 85 # In this example, we inherit the attributes of the "button" style and then 86 # override the font and background color when prelit to create a new 87 # "main_button" style. 88 89 style "main_button" = "button" 90 { 91 font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*" 92 bg[PRELIGHT] = { 0, 0.75, 0 } 93 } 94 95 style "toggle_button" = "button" 96 { 97 fg[NORMAL] = { 0, 1.0, 0 } 98 fg[ACTIVE] = { 0, 1.0, 0 } 99 text[NORMAL] = { 0, 0, 0} 100 # This sets the background pixmap of the toggle_button to that of its 101 # parent widget (as defined in the application). 102 #bg_pixmap[NORMAL] = "<parent>" 103 } 104 105 style "text" 106 { 107 #bg_pixmap[NORMAL] = "marble.xpm" 108 fg[NORMAL] = { 0, 1.0, 0 } 109 } 110 111 style "ruler" 112 { 113 font = "-adobe-helvetica-medium-r-normal--*-20-*-*-*-*-*-*" 114 } 115 116 # pixmap_path "~/.pixmaps" 117 118 # These set the widget types to use the styles defined above. 119 # The widget types are listed in the class hierarchy, but could probably be 120 # just listed in this document for the users reference. 121 122 widget_class "GtkWindow" style "window" 123 widget_class "GtkFrame" style "window" 124 widget_class "Gtk*EventBox" style "window" 125 widget_class "GtkDialog" style "window" 126 widget_class "GtkFileSelection" style "window" 127 widget_class "*Gtk*Scale" style "scale" 128 widget_class "*GtkCheckButton*" style "toggle_button" 129 widget_class "*Gtk*Menu*" style "toggle_button" 130 widget_class "*GtkRadioButton*" style "toggle_button" 131 widget_class "*GtkButton*" style "button" 132 widget_class "*Ruler" style "ruler" 133 widget_class "*GtkText" style "text" 134 widget_class "*GtkLabel" style "text" 1 /* 2 * style <name> [= <name>] 3 * { 4 * <option> 5 * } 6 * 7 * widget <widget_set> style <style_name> 8 * widget_class <widget_class_set> style <style_name> 9 * 10 * Here is a list of all the possible states. Note that some do not apply to 11 * certain widgets. 12 * 13 * NORMAL - The normal state of a widget, without the mouse over top of 14 * it, and not being pressed, etc. 15 * 16 * PRELIGHT - When the mouse is over top of the widget, colors defined 17 * using this state will be in effect. 18 * 19 * ACTIVE - When the widget is pressed or clicked it will be active, and 20 * the attributes assigned by this tag will be in effect. 21 * 22 * INSENSITIVE - When a widget is set insensitive, and cannot be 23 * activated, it will take these attributes. 24 * 25 * SELECTED - When an object is selected, it takes these attributes. 26 * 27 * Given these states, we can set the attributes of the widgets in each of 28 * these states using the following directives. 29 * 30 * fg - Sets the foreground color of a widget. 31 * bg - Sets the background color of a widget. 32 * bg_pixmap - Sets the background of a widget to a tiled pixmap. 33 * base - Sets the base of Widgets 34 * font - Sets the font to be used with the given widget. 35 */ 135 36 136 37 137 # This sets all the buttons that are children of the "main window" to 138 # the main_button style. These must be documented to be taken advantage of. 139 widget "main window.*GtkButton*" style "main_button" 38 39 static const gchar* rc_string = 40 ( 41 "style'orxonox'" 42 "{" 43 "fg[NORMAL] = { 0.0, 1.0, 0.0 }" 44 "fg[PRELIGHT] = { 0.0, 1.0, 0.0 }" 45 "fg[ACTIVE] = { 0.0, 1.0, 0.0 }" 46 "fg[INSENSITIVE] = { 0.0, 0.8, 0.0 }" 47 "fg[SELECTED] = { 0.0, 1.0, 0.0 }" 48 49 "bg[NORMAL] = { 0.0, 0.0, 0.0 }" 50 "bg[PRELIGHT] = { 0.0, 1.0, 0.0 }" 51 "bg[ACTIVE] = { 0.0, 0.3, 0.0 }" 52 "bg[INSENSITIVE] = { 0.0, 0.1, 0.0 }" 53 "bg[SELECTED] = { 0.0, 0.1, 0.0 }" 54 55 "base[NORMAL] = { 0.0, 1.0, 0.0 }" 56 "base[PRELIGHT] = { 0.0, 1.0, 0.0 }" 57 "base[ACTIVE] = { 0.0, 1.0, 0.0 }" 58 "base[INSENSITIVE] = { 0.0, 1.0, 0.0 }" 59 "base[SELECTED] = { 0.0, 1.0, 0.0 }" 60 61 "font = '-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*'" 62 "}" 63 64 "style'window'" 65 "{" 66 "bg[NORMAL] = { 0, 0, 0 }" 67 "fg[NORMAL] = { 0, 1.0, 0 }" 68 "base[NORMAL] = { 0, 0, 0 }" 69 "base[INSENSITIVE] = { 0, 0, 0 }" 70 "}" 71 72 "style'frame'" 73 "{" 74 "bg[NORMAL] = { 0.0, 0.4, 0.0 }" 75 "}" 76 77 "style'scale'" 78 "{" 79 "fg[NORMAL] = { 0, 1.0, 0 }" 80 "bg[NORMAL] = { 0, 1.0, 0 }" 81 "bg[INSENSITIVE] = { 0, 1.0, 0 }" 82 "bg[PRELIGHT] = { 0, 1.0, 0 }" 83 "bg[ACTIVE] = {0.2, 0.2, 0.2 }" 84 "}" 85 86 "style'button'" 87 "{" 88 "fg[PRELIGHT] = { 0, 0, 0 }" 89 "bg[PRELIGHT] = { 0, 1.0, 0 }" 90 "bg[ACTIVE] = { 0, 1.0, 0 }" 91 "fg[ACTIVE] = { 0, 1.0, 0 }" 92 "bg[NORMAL] = { 0, 0, 0 }" 93 "fg[NORMAL] = { 0, 1.0, 0 }" 94 "bg[INSENSITIVE] = { 0.0, 0.2, 0.0 }" 95 "fg[INSENSITIVE] = { 0.0, 0.8, 0.0 }" 96 "base[NORMAL] = { 0, 1.0, 0 }" 97 "base[PRELIGHT] = { 0, 1.0, 0 }" 98 "}" 99 100 "style'main_button' = 'button'" 101 "{" 102 "font = '-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*'" 103 "bg[PRELIGHT] = { 0, 0.75, 0 }" 104 "}" 105 106 "style'toggle_button' = 'button'" 107 "{" 108 "fg[NORMAL] = { 0, 1.0, 0 }" 109 "fg[ACTIVE] = { 0, 1.0, 0 }" 110 "text[NORMAL] = { 0, 0, 0}" 111 "}" 112 113 "style'text'" 114 "{" 115 "fg[NORMAL] = { 0, 1.0, 0 }" 116 "}" 117 118 "style'ruler'" 119 "{" 120 "font = '-adobe-helvetica-medium-r-normal--*-20-*-*-*-*-*-*'" 121 "}" 122 123 "widget'Gtk*' style'orxonox'" 124 "widget'*Gtk*Frame*' style'frame'" 125 "widget'GtkWindow' style'window'" 126 "widget'GtkFileSelection' style'window'" 127 "widget'*Gtk*Scale' style'scale'" 128 "widget'*GtkCheckButton*' style'toggle_button'" 129 "widget'*Gtk*Menu*' style'toggle_button'" 130 "widget'*GtkRadioButton*' style'toggle_button'" 131 "widget'*GtkButton*' style'button'" 132 "widget'*Ruler' style'ruler'" 133 "widget'*GtkText' style'text'" 134 "widget'*GtkLabel' style'text'" 135 136 "widget'main window.*GtkButton*' style 'main_button'" 137 138 139 ); -
orxonox/branches/physics/src/lib/math/vector.cc
r3860 r4178 100 100 */ 101 101 102 Vector *Vector::getNormalized()102 Vector Vector::getNormalized() 103 103 { 104 104 float l = len(); 105 105 if(unlikely(l != 1.0)) 106 106 { 107 return this;107 return *this; 108 108 } 109 109 else if(unlikely(l == 0.0)) 110 110 { 111 return 0;111 return *this; 112 112 } 113 113 114 return new Vector(x / l, y /l, z / l);114 return *this / l; 115 115 } 116 116 … … 172 172 \brief Outputs the values of the Vector 173 173 */ 174 void Vector::debug(void) 174 void Vector::debug(void) const 175 175 { 176 176 PRINT(0)("Vector Debug information\n"); … … 435 435 /** 436 436 \brief performs a smooth move. 437 \param from from where 438 \param to to where 439 \param t the time this transformation should take 440 \param res The approximation-density 441 */ 442 void Quaternion::quatSlerp(const Quaternion* from, const Quaternion* to, float t, Quaternion* res) 437 \param from where 438 \param to where 439 \param t the time this transformation should take value [0..1] 440 441 \returns the Result of the smooth move 442 */ 443 Quaternion quatSlerp(const Quaternion& from, const Quaternion& to, float t) 443 444 { 444 445 float tol[4]; 445 446 double omega, cosom, sinom, scale0, scale1; 446 DELTA = 0.2;447 448 cosom = from ->v.x * to->v.x + from->v.y * to->v.y + from->v.z * to->v.z + from->w * to->w;447 // float DELTA = 0.2; 448 449 cosom = from.v.x * to.v.x + from.v.y * to.v.y + from.v.z * to.v.z + from.w * to.w; 449 450 450 451 if( cosom < 0.0 ) 451 452 { 452 453 cosom = -cosom; 453 tol[0] = -to ->v.x;454 tol[1] = -to ->v.y;455 tol[2] = -to ->v.z;456 tol[3] = -to ->w;454 tol[0] = -to.v.x; 455 tol[1] = -to.v.y; 456 tol[2] = -to.v.z; 457 tol[3] = -to.w; 457 458 } 458 459 else 459 460 { 460 tol[0] = to ->v.x;461 tol[1] = to ->v.y;462 tol[2] = to ->v.z;463 tol[3] = to ->w;461 tol[0] = to.v.x; 462 tol[1] = to.v.y; 463 tol[2] = to.v.z; 464 tol[3] = to.w; 464 465 } 465 466 466 467 //if( (1.0 - cosom) > DELTA ) 467 468 //{ 468 469 470 471 472 473 474 else469 omega = acos(cosom); 470 sinom = sin(omega); 471 scale0 = sin((1.0 - t) * omega) / sinom; 472 scale1 = sin(t * omega) / sinom; 473 //} 474 /* 475 else 475 476 { 476 477 477 scale0 = 1.0 - t; 478 scale1 = t; 478 479 } 479 */ 480 res->v.x = scale0 * from->v.x + scale1 * tol[0]; 481 res->v.y = scale0 * from->v.y + scale1 * tol[1]; 482 res->v.z = scale0 * from->v.z + scale1 * tol[2]; 483 res->w = scale0 * from->w + scale1 * tol[3]; 480 */ 481 482 483 /* 484 Quaternion res; 485 res.v.x = scale0 * from.v.x + scale1 * tol[0]; 486 res.v.y = scale0 * from.v.y + scale1 * tol[1]; 487 res.v.z = scale0 * from.v.z + scale1 * tol[2]; 488 res.w = scale0 * from.w + scale1 * tol[3]; 489 */ 490 return Quaternion(Vector(scale0 * from.v.x + scale1 * tol[0], 491 scale0 * from.v.y + scale1 * tol[1], 492 scale0 * from.v.z + scale1 * tol[2]), 493 scale0 * from.w + scale1 * tol[3]); 484 494 } 485 495 -
orxonox/branches/physics/src/lib/math/vector.h
r3860 r4178 31 31 32 32 inline Vector operator+ (const Vector& v) const { return Vector(x + v.x, y + v.y, z + v.z); } 33 inline const Vector& operator+= (const Vector& v) {this->x += v.x; this->y += v.y; this->z += v.z; return *this;} 33 34 inline Vector operator- (const Vector& v) const { return Vector(x - v.x, y - v.y, z - v.z); } 35 inline const Vector& operator-= (const Vector& v) {this->x -= v.x; this->y -= v.y; this->z -= v.z; return *this;} 34 36 inline float operator* (const Vector& v) const { return x * v.x + y * v.y + z * v.z; } 37 inline const Vector& operator*= (const Vector& v) {this->x *= v.x; this->y *= v.y; this->z *= v.z; return *this;} 35 38 inline Vector operator* (float f) const { return Vector(x * f, y * f, z * f); } 39 inline const Vector& operator*= (float f) {this->x *= f; this->y *= f; this->z *= f; return *this;} 36 40 Vector operator/ (float f) const; 41 inline const Vector& operator/= (float f) {this->x /= f; this->y /= f; this->z /= f; return *this;} 42 inline const Vector& operator= (const Vector& v) {this->x = v.x; this->y = v.y; this->z = v.z; return *this;} 37 43 float dot (const Vector& v) const; 38 inline Vector cross (const Vector& v) const { 44 inline Vector cross (const Vector& v) const { return Vector(y * v.z - z * v.y, z * v.x - x * v.z, x * v.y - y * v.x ); } 39 45 void scale(const Vector& v); 40 46 inline float len() const { return sqrt (x*x+y*y+z*z); } … … 50 56 z = z / l; 51 57 } 52 Vector *getNormalized();58 Vector getNormalized(); 53 59 Vector abs(); 54 60 55 void debug() ;61 void debug() const; 56 62 }; 57 63 … … 70 76 71 77 inline Quaternion () { w = 1; v = Vector(0,0,0); } 72 inline Quaternion (const Vector& b, float a) { w = a; v = b; }78 inline Quaternion (const Vector& v, float f) { this->w = f; this->v = v; } 73 79 Quaternion (float m[4][4]); 74 80 inline Quaternion (float angle, const Vector& axis) { w = cos(angle/2); v = axis * sin(angle/2); } … … 76 82 Quaternion (float roll, float pitch, float yaw); 77 83 Quaternion operator/ (const float& f) const; 84 inline const Quaternion operator/= (const float& f) {*this = *this / f; return *this;} 78 85 Quaternion operator* (const float& f) const; 86 inline const Quaternion operator*= (const float& f) {*this = *this * f; return *this;} 79 87 Quaternion operator* (const Quaternion& q) const; 88 inline const Quaternion operator*= (const Quaternion& q) {*this = *this * q; return *this;} 80 89 inline Quaternion operator+ (const Quaternion& q) const { return Quaternion(q.v + v, q.w + w); } 90 inline const Quaternion& operator+= (const Quaternion& q) {this->v += q.v; this->w += q.w; return *this;} 81 91 inline Quaternion operator- (const Quaternion& q) const { return Quaternion(q.v - v, q.w - w); } 92 inline const Quaternion& operator-= (const Quaternion& q) {this->v -= q.v; this->w -= q.w; return *this;} 93 inline Quaternion operator= (const Quaternion& q) {this->v = q.v; this->w = q.w; return *this;} 82 94 Quaternion conjugate () const { Quaternion r(*this); 83 95 r.v = Vector() - r.v; … … 87 99 float norm () const; 88 100 void matrix (float m[4][4]) const; 89 void quatSlerp(const Quaternion* from, const Quaternion* to, const float t, Quaternion* res);90 101 91 102 void debug(); 92 private: 93 float DELTA; //!< resolution of calculation 103 }; 94 104 95 }; 105 Quaternion quatSlerp(const Quaternion& from, const Quaternion& to, float t); 106 107 96 108 97 109 //! 3D rotation (OBSOLETE) -
orxonox/branches/physics/src/lib/util/ini_parser.cc
r3484 r4178 16 16 17 17 #include "ini_parser.h" 18 #include "resource_manager.h" 18 19 19 20 using namespace std; 20 21 21 22 /** 22 23 23 \brief constructs an IniParser using a file 24 \param filename: the path and name of the file to parse 24 25 */ 25 IniParser::IniParser (c har* filename)26 IniParser::IniParser (const char* filename) 26 27 { 27 28 stream = NULL; 28 29 bInSection = false; 29 openFile(filename);30 this->openFile(filename); 30 31 } 31 32 32 33 /** 33 34 \brief removes the IniParser from memory 34 35 */ 35 36 IniParser::~IniParser () … … 43 44 \return zero on success or -1 if an error occured; 44 45 */ 45 int IniParser::openFile( char* filename)46 int IniParser::openFile(const char* filename) 46 47 { 48 char* tmpName = ResourceManager::homeDirCheck(filename); 47 49 if( filename == NULL) return -1; 48 50 if( stream != NULL) fclose (stream); 49 if( (stream = fopen ( filename, "r")) == NULL)51 if( (stream = fopen (tmpName, "r")) == NULL) 50 52 { 51 printf("IniParser could not open %s\n", filename); 53 PRINTF(1)("IniParser could not open %s\n", filename); 54 delete tmpName; 52 55 return -1; 53 56 } 54 57 bInSection = false; 58 delete tmpName; 55 59 return 0; 56 60 } … … 123 127 return -1; 124 128 } 125 if( (ptr = strchr( linebuffer, '=')) != NULL) 129 sscanf(linebuffer, "%s = %s", name, value); 130 return 0; 131 /* 132 if( (ptr = strchr( tmpBuffer, '=')) != NULL) 126 133 { 127 if( ptr == linebuffer) continue; 128 strcpy (value, &ptr[1]); 129 strncpy (name, linebuffer, strlen (linebuffer) - strlen (value) - 1); 130 return 0; 134 if( ptr == linebuffer) continue; 135 strcpy (value, &ptr[1]); 136 strncpy (name, linebuffer, strlen (linebuffer) - strlen (value) - 1); 137 printf ("%s, %s\n", value, name); 138 return 0; 131 139 } 140 */ 132 141 } 133 142 return -1; … … 144 153 lead to unwanted behaviour. 145 154 */ 146 char* IniParser::getVar( char* name, char* section, char* defvalue = "")155 char* IniParser::getVar(const char* name, char* section, char* defvalue = "") 147 156 { 148 157 strcpy (internbuf, defvalue); -
orxonox/branches/physics/src/lib/util/ini_parser.h
r3484 r4178 26 26 27 27 public: 28 IniParser (c har* filename);28 IniParser (const char* filename); 29 29 ~IniParser (); 30 30 31 char* getVar( char* name, char* section, char* defvalue);32 int openFile(char* name);31 char* getVar(const char* name, char* section, char* defvalue); 32 int openFile(const char* name); 33 33 int getSection( char* section); 34 34 int nextVar( char* name, char* value); -
orxonox/branches/physics/src/orxonox.cc
r3790 r4178 22 22 main-programmer: Patrick Boenzli 23 23 co-programmer: Christian Meyer 24 co-programmer: Benjamin Grauer: injected ResourceManager/GraphicsEngine 24 co-programmer: Benjamin Grauer: injected ResourceManager/GraphicsEngine/GUI 25 25 */ 26 26 27 27 #include "orxonox.h" 28 29 #include "gui.h" 28 30 29 31 #include "world.h" 30 32 #include "data_tank.h" 31 33 #include "command_node.h" 34 #include "ini_parser.h" 32 35 #include "game_loader.h" 33 36 #include "graphics_engine.h" 34 37 #include "resource_manager.h" 35 38 #include "text_engine.h" 39 #include "factory.h" 40 #include "benchmark.h" 36 41 37 42 #include <string.h> 38 int verbose = 3; 43 44 int verbose = 4; 39 45 40 46 using namespace std; … … 42 48 /** 43 49 \brief create a new Orxonox 50 51 In this funcitons only global values are set. The game will not be started here. 44 52 */ 45 53 Orxonox::Orxonox () 46 54 { 47 pause = false; 55 this->pause = false; 56 57 this->world = NULL; 58 this->resources = NULL; 59 this->localinput = NULL; 60 61 this->argc = 0; 62 this->argv = NULL; 48 63 } 49 64 … … 53 68 Orxonox::~Orxonox () 54 69 { 70 int i =0; 55 71 Orxonox::singletonRef = NULL; 56 72 if( world != NULL) delete world; 57 if( localinput != NULL) delete world;73 if( localinput != NULL) delete localinput; 58 74 if( resources != NULL) delete resources; 59 75 delete GraphicsEngine::getInstance(); // deleting the Graphics … … 84 100 void Orxonox::getConfigFile (int argc, char** argv) 85 101 { 86 strcpy (configfilename, " orxonox.conf");102 strcpy (configfilename, "~/.orxonox/orxonox.conf"); 87 103 } 88 104 … … 92 108 int Orxonox::init (int argc, char** argv) 93 109 { 110 this->argc = argc; 111 this->argv = argv; 94 112 // parse command line 95 113 // config file … … 98 116 SDL_Init (SDL_INIT_TIMER); 99 117 // initialize everything 118 printf("> Initializing resources\n"); 119 if( initResources () == -1) return -1; 120 100 121 if( initVideo() == -1) return -1; 101 122 if( initSound() == -1) return -1; … … 104 125 printf("> Initializing networking\n"); 105 126 if( initNetworking () == -1) return -1; 106 printf("> Initializing resources\n");107 if( initResources () == -1) return -1;108 127 //printf("> Initializing world\n"); 109 128 //if( init_world () == -1) return -1; PB: world will be initialized when started … … 120 139 121 140 GraphicsEngine::getInstance(); 122 141 123 142 return 0; 124 143 } … … 143 162 { 144 163 // create localinput 145 localinput = new CommandNode( 164 localinput = new CommandNode(configfilename); 146 165 147 166 return 0; … … 164 183 int Orxonox::initResources() 165 184 { 166 // printf("Not yet implemented\n");167 185 PRINT(3)("initializing ResourceManager\n"); 168 186 resourceManager = ResourceManager::getInstance(); 169 resourceManager->setDataDir("../data/"); 170 return 0; 187 188 // create parser 189 IniParser parser (DEFAULT_CONFIG_FILE); 190 if( parser.getSection (CONFIG_SECTION_DATA) == -1) 191 { 192 PRINTF(1)("Could not find Section %s in %s\n", CONFIG_SECTION_DATA, DEFAULT_CONFIG_FILE); 193 return -1; 194 } 195 char namebuf[256]; 196 char valuebuf[256]; 197 memset (namebuf, 0, 256); 198 memset (valuebuf, 0, 256); 199 200 while( parser.nextVar (namebuf, valuebuf) != -1) 201 { 202 if (!strcmp(namebuf, CONFIG_NAME_DATADIR)) 203 { 204 // printf("Not yet implemented\n"); 205 if (!resourceManager->setDataDir(valuebuf)) 206 { 207 PRINTF(1)("Data Could not be located\n"); 208 exit(-1); 209 } 210 } 211 212 memset (namebuf, 0, 256); 213 memset (valuebuf, 0, 256); 214 } 215 216 if (!resourceManager->checkDataDir(DEFAULT_DATA_DIR_CHECKFILE)) 217 { 218 PRINTF(1)("The DataDirectory %s could not be verified\nPlease Change in File %s Section %s Entry %s to a suitable value\n", 219 resourceManager->getDataDir(), 220 DEFAULT_CONFIG_FILE, 221 CONFIG_SECTION_DATA, 222 CONFIG_NAME_DATADIR); 223 exit(-1); 224 } 225 226 171 227 PRINT(3)("initializing TextEngine\n"); 172 228 TextEngine::getInstance(); 229 230 return 0; 173 231 } 174 232 … … 200 258 201 259 this->gameLoader = GameLoader::getInstance(); 202 this->gameLoader->loadDebugCampaign(DEBUG_CAMPAIGN_0); 260 this->gameLoader->loadCampaign("worlds/DefaultCampaign.oxc"); 261 // this->gameLoader->loadDebugCampaign(DEBUG_CAMPAIGN_0); 203 262 this->gameLoader->init(); 204 263 this->gameLoader->start(); … … 279 338 280 339 340 bool showGui = false; 281 341 282 342 /** … … 286 346 */ 287 347 int main(int argc, char** argv) 288 { 289 290 /* reading arguments 291 292 currently supported arguments are: 293 <no args> :: just starts orxonox 294 --benchmark :: start the benchmark without starting orxonox 295 296 this is a preselection: it matches to one of the start* functions, the 297 finetuning is made in those functions. 298 */ 299 300 348 { 349 350 // here the pre-arguments are loaded, these are needed to go either to orxonx itself, Help, or Benchmark. 301 351 int i; 302 for(i = 0; i < argc; ++i) 303 { 304 if(! strcmp( "--help", argv[i])) return startHelp(); 305 else if(! strcmp( "--benchmark", argv[i])) return startBenchmarks(); 306 } 307 308 PRINTF(2)("Orxonox does not understand the arguments"); 352 for(i = 1; i < argc; ++i) 353 { 354 if(! strcmp( "--help", argv[i]) || !strcmp("-h", argv[i])) return startHelp(argc, argv); 355 else if(!strcmp( "--benchmark", argv[i]) || !strcmp("-b", argv[i])) return startBenchmarks(); 356 else if(!strcmp( "--gui", argv[i]) || !strcmp("-g", argv[i])) showGui = true; 357 // else PRINTF(2)("Orxonox does not understand the arguments %s\n", argv[i]); 358 } 359 309 360 return startOrxonox(argc, argv); 310 361 } … … 312 363 313 364 314 int startHelp() 315 { 316 printf("orxonox: starts the orxonox game - rules\n"); 317 printf("usage: orxonox [arg]\n\n"); 318 printf("valid options:\n"); 319 printf(" --benchmark\tstarts the orxonox benchmark\n"); 320 printf(" --help \tshows this menu\n"); 365 int startHelp(int argc, char** argv) 366 { 367 PRINT(0)("orxonox: starts the orxonox game - rules\n"); 368 PRINT(0)("usage: orxonox [arg [arg...]]\n\n"); 369 PRINT(0)("valid options:\n"); 370 { 371 Gui* gui = new Gui(argc, argv); 372 gui->printHelp(); 373 delete gui; 374 } 375 PRINT(0)(" -b|--benchmark:\t\tstarts the orxonox benchmark\n"); 376 PRINT(0)(" -h|--help:\t\t\tshows this help\n"); 321 377 } 322 378 … … 324 380 int startOrxonox(int argc, char** argv) 325 381 { 326 printf(">>> Starting Orxonox <<<\n"); 382 // checking for existence of the configuration-files 383 if (showGui || 384 !ResourceManager::isFile("~/.orxonox/orxonox.conf") || 385 ResourceManager::isFile("~/.orxonox/orxonox.lock")) 386 { 387 if (ResourceManager::isFile("~/.orxonox/orxonox.lock")) 388 ResourceManager::deleteFile("~/.orxonox/orxonox.lock"); 389 390 // starting the GUI 391 Gui* gui = new Gui(argc, argv); 392 gui->startGui(); 393 394 if (! gui->startOrxonox) 395 return 0; 396 397 delete gui; 398 } 399 400 PRINT(0)(">>> Starting Orxonox <<<\n"); 401 402 ResourceManager::touchFile("~/.orxonox/orxonox.lock"); 403 327 404 Orxonox *orx = Orxonox::getInstance(); 328 405 329 406 if((*orx).init(argc, argv) == -1) 330 407 { 331 printf("! Orxonox initialization failed\n");408 PRINTF(1)("! Orxonox initialization failed\n"); 332 409 return -1; 333 410 } … … 336 413 337 414 delete orx; 338 339 } 340 341 #if defined __linux__ 342 343 #include "list.h" 344 #include "world_entity.h" 345 #include "vector.h" 346 #include "player.h" 347 #include "base_object.h" 348 #include <asm/msr.h> 349 #include <linux/timex.h> 350 351 352 #define LIST_MAX 1000 353 #define VECTOR_MAX 1000000 354 #define ITERATIONS 10000 355 356 357 int startBenchmarks() 358 { 359 360 printf("===========================================================\n"); 361 printf("= BENCHMARKS =\n"); 362 printf("===========================================================\n"); 363 printf(" the author is not paying any attention to cacheing effects\n"); 364 printf(" of the CPU.\n\n"); 365 printf("[title]\t\t\t\t\t [cycles]\t[loops]\n\n"); 366 // printf("------------------------------------------------------------\n\n"); 367 368 // first measure the time overhead: 369 unsigned long ini, end, dt, tmp; 370 rdtscl(ini); rdtscl(end); 371 dt = end - ini; 372 373 int type = -1; 374 /* type -1 == all 375 type 0 == framework 376 type 1 == vector 377 type 2 == quaternion 378 type 3 == lists 379 */ 380 if(type == 0 || type == -1) 381 { 382 /* framework test*/ 383 384 printf("Generating Objects:\t\t\t\t\t%i\n", ITERATIONS); 385 /* ************WorldEntity class test************** */ 386 WorldEntity* w = NULL; 387 int i = 0; 388 unsigned long mittel = 0; 389 390 for(i = 0; i < ITERATIONS; ++i) 391 { 392 rdtscl(ini); 393 394 WorldEntity* w = new WorldEntity(); 395 396 rdtscl(end); 397 delete w; 398 mittel += (end - ini - dt); 399 } 400 float mi = mittel / (float)ITERATIONS; 401 printf(" Generate a WorldEntity object:\t\t%11.2f\n", mi); 402 403 /* 404 mittel = 0; 405 for(i = 0; i < ITERATIONS; ++i) 406 { 407 rdtscl(ini); 408 409 WorldEntity* w = new Primitive(P_SPHERE); 410 411 rdtscl(end); 412 delete w; 413 mittel += (end - ini - dt); 414 } 415 mi = mittel / (float)ITERATIONS; 416 printf(" Generate a Primitive object:\t\t%11.2f\n", mi); 417 */ 418 419 mittel = 0; 420 for(i = 0; i < ITERATIONS; ++i) 421 { 422 rdtscl(ini); 423 424 Vector* v = new Vector(); 425 426 rdtscl(end); 427 delete v; 428 mittel += (end - ini - dt); 429 } 430 mi = mittel / (float)ITERATIONS; 431 printf(" Generate a Vector object:\t\t%11.2f\n", mi); 432 433 434 mittel = 0; 435 for(i = 0; i < ITERATIONS; ++i) 436 { 437 rdtscl(ini); 438 439 Quaternion* q = new Quaternion(); 440 441 rdtscl(end); 442 delete q; 443 mittel += (end - ini - dt); 444 } 445 mi = mittel / (float)ITERATIONS; 446 printf(" Generate a Quaternion object:\t\t%11.2f\n", mi); 447 448 449 450 451 printf("\nCalling function inline &| virtual, \t\t\t%i\n", ITERATIONS); 452 mittel = 0; 453 w = new WorldEntity(); 454 for(i = 0; i < ITERATIONS; ++i) 455 { 456 rdtscl(ini); 457 458 w->tick(0.0f); 459 460 rdtscl(end); 461 mittel += (end - ini - dt); 462 } 463 //delete w; 464 mi = mittel / (float)ITERATIONS; 465 printf(" Virt funct tick() of WE: \t\t%11.2f\n", mi); 466 467 468 mittel = 0; 469 WorldEntity wo; 470 for(i = 0; i < ITERATIONS; ++i) 471 { 472 rdtscl(ini); 473 474 wo.tick(0.0f); 475 476 rdtscl(end); 477 mittel += (end - ini - dt); 478 } 479 //delete w; 480 mi = mittel / (float)ITERATIONS; 481 printf(" Inl virt funct tick() of WE v2: \t%11.2f\n", mi); 482 483 484 mittel = 0; 485 BaseObject* bo = new BaseObject(); 486 for(i = 0; i < ITERATIONS; ++i) 487 { 488 rdtscl(ini); 489 490 bo->isFinalized(); 491 492 rdtscl(end); 493 mittel += (end - ini - dt); 494 } 495 //delete w; 496 mi = mittel / (float)ITERATIONS; 497 printf(" Inl funct BaseObject::isFinazlized(): \t%11.2f\n", mi); 498 499 500 tList<WorldEntity>* list = new tList<WorldEntity>(); 501 502 503 /* ************Primitvie class test************** */ 504 list = new tList<WorldEntity>(); 505 506 507 /* 508 mittel = 0; 509 w = new Primitive(P_SPHERE); 510 for(i = 0; i < ITERATIONS; ++i) 511 { 512 rdtscl(ini); 513 514 w->tick(0.0f); 515 516 rdtscl(end); 517 mittel += (end - ini - dt); 518 } 519 mi = mittel / (float)ITERATIONS; 520 printf(" Call function tick() of Prim:\t\t%11.2f\n", mi); 521 */ 522 523 } 524 525 if(type == 1 || type == -1) 526 { 527 printf("\nDoing some simple vector operations: \t\t\t%i\n", VECTOR_MAX); 528 /* vector test */ 529 Vector* a = new Vector(1.3, 5.3, 4.1); 530 Vector* b = new Vector(0.4, 2.5, 6.2); 531 Vector* c = new Vector(); 532 533 unsigned long mittel, ini, end; 534 float mi; 535 int i = 0; 536 // addition 537 mittel = 0; 538 for(i = 0; i < VECTOR_MAX; ++i) 539 { 540 rdtscl(ini); 541 542 *c = *a + *b; 543 544 rdtscl(end); 545 mittel += (end - ini - dt); 546 } 547 mi = mittel / (float)VECTOR_MAX; 548 printf(" Addition of two vectors:\t\t%11.2f\n", mi); 549 550 // multiplikation 551 552 mittel = 0; 553 for(i = 0; i < VECTOR_MAX; ++i) 554 { 555 rdtscl(ini); 556 557 *c = a->cross( *b); 558 559 rdtscl(end); 560 mittel += (end - ini - dt); 561 } 562 mi = mittel / (float)VECTOR_MAX; 563 printf(" CrossMult of two vectors:\t\t%11.2f\n", mi); 564 565 } 566 if( type == 2 || type == -1) 567 { 568 /* quaternion test */ 569 printf("\nDoing some simple quaternion operations: \t\t%i\n", VECTOR_MAX); 570 /* vector test */ 571 Quaternion* a = new Quaternion(); 572 Quaternion* b = new Quaternion(); 573 Quaternion* c = new Quaternion(); 574 575 unsigned long mittel, ini, end; 576 float mi; 577 int i = 0; 578 // quaternion generieren mit spez konstruktor 579 mittel = 0; 580 Vector* qa = new Vector(4.6, 9.3, 0.4); 581 Vector* qb = new Vector(3.5, 6.1, 4.3); 582 for(i = 0; i < VECTOR_MAX; ++i) 583 { 584 rdtscl(ini); 585 586 Quaternion* qu = new Quaternion(*qa, *qb); 587 588 rdtscl(end); 589 delete qu; 590 mittel += (end - ini - dt); 591 } 592 delete a; 593 delete b; 594 mi = mittel / (float)VECTOR_MAX; 595 printf(" Gen. quatern. betw. two vectors:\t%11.2f\n", mi); 596 597 598 // multiplication 599 mittel = 0; 600 for(i = 0; i < VECTOR_MAX; ++i) 601 { 602 rdtscl(ini); 603 604 *c = *a * *b; 605 606 rdtscl(end); 607 mittel += (end - ini - dt); 608 } 609 mi = mittel / (float)VECTOR_MAX; 610 printf(" Multiplying two quat.(=rot): a * b\t%11.2f\n", mi); 611 612 613 614 // rotating a vector by a quaternion 615 mittel = 0; 616 for(i = 0; i < VECTOR_MAX; ++i) 617 { 618 rdtscl(ini); 619 620 *qa = a->apply(*qb); 621 622 rdtscl(end); 623 mittel += (end - ini - dt); 624 } 625 mi = mittel / (float)VECTOR_MAX; 626 printf(" Rot a vec by a quat: q->apply(v)\t%11.2f\n", mi); 627 628 629 630 // generate rotation matrix 631 mittel = 0; 632 float matrix[4][4]; 633 for(i = 0; i < VECTOR_MAX; ++i) 634 { 635 rdtscl(ini); 636 637 a->matrix(matrix); 638 639 rdtscl(end); 640 mittel += (end - ini - dt); 641 } 642 mi = mittel / (float)VECTOR_MAX; 643 printf(" Generate rot matrix: q->matrix(m)\t%11.2f\n", mi); 644 } 645 if( type == 3 || type == -1) 646 { 647 /* list tests*/ 648 printf("\nList operations tests: \t\t\t\t\t%i\n", LIST_MAX); 649 tList<char>* list = new tList<char>(); 650 char* name; 651 652 printf(" Adding[1..10] elements to list, found:\n"); 653 list->add("1"); 654 list->add("2"); 655 list->add("3"); 656 list->add("4"); 657 list->add("5"); 658 list->add("6"); 659 list->add("7"); 660 list->add("8"); 661 list->add("9"); 662 list->add("10"); 663 664 /*give list out */ 665 tIterator<char>* iterator = list->getIterator(); 666 name = iterator->nextElement(); 667 printf(" List Elements: \t\t"); 668 while( name != NULL) 669 { 670 printf("%s,", name); 671 name = iterator->nextElement(); 672 } 673 delete iterator; 674 printf("\n"); 675 676 677 /*removing some elements from the list*/ 678 printf(" Removing elements [2,3,6,8,10], adding [11] now found:\n"); 679 list->remove("2"); 680 list->remove("3"); 681 list->remove("6"); 682 list->remove("8"); 683 list->remove("10"); 684 list->add("11"); 685 /*give list out */ 686 iterator = list->getIterator(); 687 name = iterator->nextElement(); 688 printf(" List Elements: \t\t"); 689 while( name != NULL) 690 { 691 printf("%s,", name); 692 name = iterator->nextElement(); 693 } 694 delete iterator; 695 printf("\n"); 696 697 delete list; 698 printf("\nChecking list performance:\t\t\t\t%i\n", LIST_MAX); 699 700 tList<int>* plist = new tList<int>(); 701 unsigned long mittel, ini, end; 702 float mi; 703 int i = 0; 704 mittel = 0; 705 for(i = 0; i < LIST_MAX; ++i) 706 { 707 rdtscl(ini); 708 709 plist->add(&i); 710 711 rdtscl(end); 712 mittel += (end - ini - dt); 713 } 714 mi = mittel / (float)LIST_MAX; 715 printf(" Adding reference to list:\t\t%11.2f\n", mi); 716 717 mittel = 0; 718 for(i = 0; i < LIST_MAX; ++i) 719 { 720 rdtscl(ini); 721 722 plist->remove(&i); 723 724 rdtscl(end); 725 mittel += (end - ini - dt); 726 } 727 mi = mittel / (float)LIST_MAX; 728 printf(" Removing 1st reference from list:\t%11.2f\n", mi); 729 730 731 printf("\nList operations tests: \t\t\t\t\t%i\n", LIST_MAX); 732 list = new tList<char>(); 733 printf(" Adding[1..10] elements to list, found:\n"); 734 list->add("1"); 735 list->add("2"); 736 list->add("3"); 737 list->add("4"); 738 list->add("5"); 739 list->add("6"); 740 list->add("7"); 741 list->add("8"); 742 list->add("9"); 743 list->add("10"); 744 745 /*give list out */ 746 iterator = list->getIterator(); 747 name = iterator->nextElement(); 748 printf(" List Elements: \t\t"); 749 while( name != NULL) 750 { 751 printf("%s,", name); 752 name = iterator->nextElement(); 753 } 754 delete iterator; 755 printf("\n"); 756 757 758 int c = 0; 759 printf(" Going trough list with nextElement(el) func: "); 760 name = list->firstElement(); 761 while(c < 20) 762 { 763 printf("%s,", name); 764 name = list->nextElement(name); 765 c++; 766 } 767 printf("\n"); 768 769 770 771 } 772 773 } 774 775 #else 776 777 int startBenchmarks() 778 { 779 PRINTF(1)("Benchmark is not implemented in this system\n"); 780 } 781 782 #endif 415 ResourceManager::deleteFile("~/.orxonox/orxonox.lock"); 416 417 } -
orxonox/branches/physics/src/orxonox.h
r3660 r4178 39 39 Uint32 lastframe; //!< Time of the last Frame 40 40 41 unsigned int argc; //!< Count of Arguments of orxonox 42 char** argv; //!< Values of th Arguments of orxonox. 43 41 44 void getConfigFile (int argc, char** argv); 42 45 43 // main loop functions 44 // void synchronize (); 45 //void handle_input (); 46 //void time_slice (); 47 //void collision (); 48 //void display (); 49 50 // subsystem initialization 46 // subsystem initialization 51 47 int initVideo (); 52 48 int initSound (); … … 75 71 }; 76 72 77 int startHelp( void);73 int startHelp(int argc, char** argv); 78 74 int startOrxonox(int argc, char** argv); 79 int startBenchmarks(void);80 75 81 76 #endif /* _ORXONOX_H */ -
orxonox/branches/physics/src/proto/proto_class.cc
r3655 r4178 1 2 3 1 /* 4 2 orxonox - the future of 3D-vertical-scrollers … … 16 14 */ 17 15 18 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ 19 17 20 18 #include "proto_class.h" 21 22 #include "stdincl.h" // maybe23 19 24 20 using namespace std; … … 43 39 // delete what has to be deleted here 44 40 } 45 46 /**47 \brief nonsense - delete this method48 \param realy nothing to give49 \returns true or false - probably nothing?50 51 this is just to show the doxygen abilities (this for example is an extension for a long comment)52 */53 bool ProtoClass::doNonSense (int nothing) {} -
orxonox/branches/physics/src/proto/proto_class.h
r3655 r4178 1 1 /*! 2 2 \file proto_class.h 3 \brief Definition of the proto class template, used quickly start work 4 \todo Example: this shows how to use simply add a Marker that here has to be done something. 3 \brief Definition of ... 5 4 6 The Protoclass exists, to help you quikly getting the run for how to develop in orxonox.7 It is an example for the CODING-CONVENTION, and a starting-point for every class.8 5 */ 9 6 … … 11 8 #define _PROTO_CLASS_H 12 9 13 #include "what realy has to be included"14 10 #include "base_object.h" 15 11 16 // FORWARD DEFINITION \\ 17 class someClassWeNeed; 12 // FORWARD DEFINITION 18 13 19 14 20 /*class Test;*/ /* forward definition of class Test (without including it here!)*/21 15 22 //! A default class that aids you to start creating a new class 23 /** 24 here can be some longer description of this class 25 */ 16 //! A class for ... 26 17 class ProtoClass : public BaseObject { 27 18 … … 30 21 virtual ~ProtoClass(); 31 22 32 bool doNonSense (int nothing);33 23 34 24 private: 35 int nonSense; //!< doxygen tag here like this for all the variables - delete this variable if you use this36 25 37 26 }; -
orxonox/branches/physics/src/proto/proto_singleton.h
r3655 r4178 1 1 /*! 2 2 \file proto_singleton.h 3 \brief Definition of the proto class template, used quickly start work3 \brief Definition of the ... singleton Class 4 4 5 a simple file to copy and create a singleton-class from6 5 */ 7 6 … … 11 10 #include "base_object.h" 12 11 13 // FORWARD DEFINITION \\12 // FORWARD DEFINITION 14 13 15 14 //! A default singleton class. -
orxonox/branches/physics/src/story_entities/campaign.cc
r3832 r4178 19 19 #include "campaign.h" 20 20 21 #include "game_loader.h" 21 22 #include "story_entity.h" 22 23 … … 34 35 this->isInit = false; 35 36 } 36 37 Campaign::Campaign ( TiXmlElement* root) 38 { 39 TiXmlElement* element; 40 const char* string; 41 int id; 42 43 PRINTF(3)("Loading Campaign...\n"); 44 45 assert( root != NULL); 46 GameLoader* loader = GameLoader::getInstance(); 47 48 this->entities = new tList<StoryEntity>(); 49 this->isInit = false; 50 51 // grab all the necessary parameters 52 string = grabParameter( root, "identifier"); 53 if( string == NULL || sscanf(string, "%d", &id) != 1) 54 { 55 PRINTF(2)("Campaign is missing a proper 'identifier'\n"); 56 this->setStoryID( -1); 57 } 58 else this->setStoryID( id); 59 60 // find WorldList 61 element = root->FirstChildElement( "WorldList"); 62 if( element == NULL) 63 { 64 PRINTF(2)("Campaign is missing a proper 'WorldList'\n"); 65 } 66 else 67 element = element->FirstChildElement(); 68 69 // load Worlds/Subcampaigns/Whatever 70 StoryEntity* lastCreated = NULL; 71 while( element != NULL) 72 { 73 printf("Campaign: Constructor: adding a world\n"); 74 StoryEntity* created = (StoryEntity*) loader->fabricate( element); 75 /* 76 if( lastCreated != NULL) 77 created->setNextStoryID( lastCreated->getStoryID()); 78 else 79 created->setNextStoryID( WORLD_ID_GAMEEND); 80 */ 81 if( created != NULL) 82 { 83 this->addEntity( created); 84 lastCreated = created; 85 } 86 element = element->NextSiblingElement(); 87 } 88 //if( lastCreated != NULL) 89 //lastCreated->setStoryID( WORLD_ID_GAMEEND); 90 } 37 91 38 92 Campaign::~Campaign () {} -
orxonox/branches/physics/src/story_entities/campaign.h
r3608 r4178 14 14 public: 15 15 Campaign (); 16 Campaign ( TiXmlElement* root); 16 17 virtual ~Campaign (); 17 18 -
orxonox/branches/physics/src/story_entities/world.cc
r3953 r4178 1 1 2 2 3 /* … … 39 40 #include "garbage_collector.h" 40 41 #include "animation_player.h" 42 #include "particle_engine.h" 41 43 42 44 #include "command_node.h" 43 45 #include "glmenu_imagescreen.h" 44 46 #include "list.h" 45 46 47 #include "game_loader.h" 48 49 #include "animation3d.h" 50 51 #include "substring.h" 47 52 48 53 using namespace std; 49 50 54 51 55 WorldInterface* WorldInterface::singletonRef = 0; … … 113 117 } 114 118 115 119 CREATE_FACTORY(World); 120 121 World::World( TiXmlElement* root) 122 { 123 this->constuctorInit("", -1); 124 this->path = NULL; 125 const char *string; 126 char *name; 127 int id; 128 129 PRINTF0("Creating a World\n"); 130 131 // identifier 132 string = grabParameter( root, "identifier"); 133 if( string == NULL || sscanf(string, "%d", &id) != 1) 134 { 135 PRINTF0("World is missing a proper 'identifier'\n"); 136 this->setStoryID( -1); 137 } 138 else setStoryID( id); 139 140 // next id 141 string = grabParameter( root, "nextid"); 142 if( string == NULL || sscanf(string, "%d", &id) != 1) 143 { 144 PRINTF0("World is missing a proper 'nextid'\n"); 145 this->setStoryID( -1); 146 } 147 else setNextStoryID( id); 148 149 150 // path 151 string = grabParameter( root, "path"); 152 if( string == NULL) 153 { 154 PRINTF0("World is missing a proper 'path'\n"); 155 this->setPath( NULL); 156 } 157 else 158 { 159 name = new char[strlen(string + 2)]; 160 strcpy( name, string); 161 this->setPath( name); 162 } 163 } 116 164 117 165 /** … … 122 170 World::World (char* name) 123 171 { 124 this->init(name, -1); 172 this->path = NULL; 173 this->constuctorInit(name, -1); 125 174 //NullParent* np = NullParent::getInstance(); 126 175 } … … 132 181 World::World (int worldID) 133 182 { 134 this->init(NULL, worldID); 183 this->path = NULL; 184 this->constuctorInit(NULL, worldID); 135 185 } 136 186 … … 148 198 cn->reset(); 149 199 150 ResourceManager::getInstance()->debug();151 ResourceManager::getInstance()->unloadAllByPriority(RP_LEVEL);152 ResourceManager::getInstance()->debug();153 154 200 delete WorldInterface::getInstance(); 155 201 … … 158 204 delete this->lightMan; 159 205 delete this->trackManager; 206 delete this->particleEngine; 160 207 TextEngine::getInstance()->flush(); 161 208 162 AnimationPlayer::getInstance()->debug();163 209 delete AnimationPlayer::getInstance(); // this should be at the end of the unloading sequence. 164 210 //delete garbagecollecor 165 211 //delete animator 166 212 167 213 ResourceManager::getInstance()->unloadAllByPriority(RP_LEVEL); 168 214 } 169 215 … … 177 223 NO LEVEL LOADING HERE - NEVER! 178 224 */ 179 void World:: init(char* name, int worldID)225 void World::constuctorInit(char* name, int worldID) 180 226 { 181 227 this->setClassName ("World"); 182 228 183 this->worldName = name; 229 //this->worldName = name; 230 //this->worldName = new char[strlen(name)+1]; 231 //strcpy(this->worldName, name); 184 232 this->debugWorldNr = worldID; 185 233 this->entities = new tList<WorldEntity>(); 186 AnimationPlayer::getInstance(); // initializes the animationPlayer187 234 } 188 235 … … 200 247 wi->init(this); 201 248 this->garbageCollector = GarbageCollector::getInstance(); 249 250 this->particleEngine = ParticleEngine::getInstance(); 251 this->trackManager = TrackManager::getInstance(); 252 this->lightMan = LightManager::getInstance(); 253 this->nullParent = NullParent::getInstance (); 254 this->nullParent->setName ("NullParent"); 255 256 AnimationPlayer::getInstance(); // initializes the animationPlayer 257 258 this->localCamera = new Camera(); 259 this->localCamera->setName ("camera"); 202 260 } 203 261 … … 207 265 */ 208 266 ErrorMessage World::load() 209 { 210 // BezierCurve* tmpCurve = new BezierCurve(); 211 if(this->debugWorldNr != -1) 212 { 213 // initializing Font 214 this->glmis->step(); 267 { 268 PRINTF(3)("> Loading world: '%s'\n", getPath()); 269 TiXmlElement* element; 270 GameLoader* loader = GameLoader::getInstance(); 271 272 if( getPath() == NULL) 273 { 274 PRINTF(1)("World has no path specified for loading"); 275 return (ErrorMessage){213,"Path not specified","World::load()"}; 276 } 277 278 TiXmlDocument* XMLDoc = new TiXmlDocument( path); 279 // load the campaign document 280 if( !XMLDoc->LoadFile()) 281 { 282 // report an error 283 PRINTF(1)("loading XML File: %s @ %d:%d\n", XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol()); 284 delete XMLDoc; 285 return (ErrorMessage){213,"XML File parsing error","World::load()"}; 286 } 287 288 // check basic validity 289 TiXmlElement* root = XMLDoc->RootElement(); 290 assert( root != NULL); 291 292 if( root == NULL || root->Value() == NULL || strcmp( root->Value(), "WorldDataFile")) 293 { 294 // report an error 295 PRINTF(1)("Specified XML File is not an orxonox world data file (WorldDataFile element missing)\n"); 296 delete XMLDoc; 297 return (ErrorMessage){213,"Path not a WorldDataFile","World::load()"}; 298 } 299 300 // load the parameters 301 // name 302 char* temp; 303 const char* string = grabParameter( root, "name"); 304 if( string == NULL) 305 { 306 PRINTF(2)("World is missing a proper 'name'\n"); 307 string = "Unknown"; 308 temp = new char[strlen(string + 2)]; 309 strcpy( temp, string); 310 this->worldName = temp; 311 } 312 else 313 { 314 temp = new char[strlen(string + 2)]; 315 strcpy( temp, string); 316 this->worldName = temp; 317 } 318 //////////////// 319 // LOADSCREEN // 320 //////////////// 321 element = root->FirstChildElement("LoadScreen"); 322 if (element == NULL) 323 { 324 PRINTF(2)("no LoadScreen specified, loading default\n"); 325 326 glmis->setBackgroundImage("pictures/load_screen.jpg"); 327 this->glmis->setMaximum(8); 328 this->glmis->draw(); 329 } 330 else 331 { 332 this->glmis->load(element); 333 this->glmis->draw(); 334 } 335 this->glmis->draw(); 336 // find WorldEntities 337 element = root->FirstChildElement("WorldEntities"); 338 339 if( element == NULL) 340 { 341 PRINTF(1)("World is missing 'WorldEntities'\n"); 342 } 343 else 344 { 345 element = element->FirstChildElement(); 346 // load Players/Objects/Whatever 347 PRINTF(4)("Loading WorldEntities\n"); 348 while( element != NULL) 349 { 350 WorldEntity* created = (WorldEntity*) loader->fabricate( element); 351 if( created != NULL) this->spawn( created); 352 // if we load a 'Player' we use it as localPlayer 353 //todo do this more elegant 354 if( element->Value() != NULL && !strcmp( element->Value(), "Player")) localPlayer = (Player*) created; 355 if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox")) sky = (SkyBox*) created; 356 element = element->NextSiblingElement(); 357 glmis->step(); //! \todo temporary 358 } 359 PRINTF(4)("Done loading WorldEntities\n"); 360 } 361 362 // find Track 363 /*element = root->FirstChildElement( "Track"); 364 if( element == NULL) 365 { 366 PRINTF0("============>>>>>>>>>>>>>>>>>World is missing a 'Track'\n"); 367 } 368 else 369 { 370 //load track 371 PRINTF0("============>>>>>>>>>>>>>>>>Loading Track\n"); 372 373 trackManager->loadTrack( element); 374 trackManager->finalize(); 375 PRINTF0("============>>>>>>>>>>>>>>>>Done loading Track\n"); 376 }*/ 377 378 // free the XML data 379 380 delete XMLDoc; 381 /* GENERIC LOADING PROCESS FINISHED */ 382 383 // bind input 384 Orxonox *orx = Orxonox::getInstance (); 385 orx->getLocalInput()->bind (localPlayer); 386 387 // bind camera 388 //this->localCamera->bind (localPlayer); 389 this->localPlayer->addChild (this->localCamera); 390 391 392 // stuff beyond this point remains to be loaded properly 393 215 394 // initializing the TrackManager 216 395 this->trackManager = TrackManager::getInstance(); 217 396 //trackManager->addPoint(Vector(0,0,0)); 218 397 trackManager->addPoint(Vector(150, -35, 5)); … … 272 451 273 452 274 /*monitor progress*/ 275 this->glmis->step(); 276 277 // LIGHT initialisation 278 lightMan = LightManager::getInstance(); 279 lightMan->setAmbientColor(.1,.1,.1); 280 lightMan->addLight(); 281 // lightMan->setAttenuation(1.0, .01, 0.0); 282 // lightMan->setDiffuseColor(1,1,1); 283 // lightMan->addLight(1); 284 // lightMan->setPosition(20, 10, -20); 285 // lightMan->setDiffuseColor(0,0,0); 286 lightMan->debug(); 287 288 switch(this->debugWorldNr) 289 { 290 /* 291 this loads the hard-coded debug world. this only for simplicity and will be 292 removed by a reald world-loader, which interprets a world-file. 293 if you want to add an own debug world, just add a case DEBUG_WORLD_[nr] and 294 make whatever you want... 295 */ 296 case DEBUG_WORLD_0: 297 { 298 lightMan->setPosition(-5.0, 10.0, -40.0); 299 this->nullParent = NullParent::getInstance (); 300 this->nullParent->setName ("NullParent"); 301 302 // !\todo old track-system has to be removed 303 304 //create helper for player 305 //HelperParent* hp = new HelperParent (); 306 /* the player has to be added to this helper */ 307 308 // create a player 309 this->localPlayer = new Player (); 310 this->localPlayer->setName ("player"); 311 this->spawn (this->localPlayer); 312 /*monitor progress*/ 313 //this->glmis->step(); 314 this->glmis->step(); 315 316 // bind input 317 Orxonox *orx = Orxonox::getInstance (); 318 orx->getLocalInput()->bind (this->localPlayer); 453 lightMan->setAmbientColor(.1,.1,.1); 454 lightMan->addLight(); 455 // lightMan->setAttenuation(1.0, .01, 0.0); 456 // lightMan->setDiffuseColor(1,1,1); 457 // lightMan->addLight(1); 458 // lightMan->setPosition(20, 10, -20); 459 // lightMan->setDiffuseColor(0,0,0); 460 lightMan->debug(); 461 lightMan->setPosition(-5.0, 10.0, -40.0); 462 463 // trackManager->setBindSlave(env); 464 PNode* tn = trackManager->getTrackNode(); 465 tn->addChild(this->localPlayer); 466 467 //localCamera->setParent(TrackNode::getInstance()); 468 tn->addChild(this->localCamera); 469 localCamera->lookAt(tn); 470 localCamera->setMode(PNODE_MOVEMENT); 471 this->localPlayer->setMode(PNODE_ALL); 472 Vector* cameraOffset = new Vector (0, 5, -10); 473 trackManager->condition(2, LEFTRIGHT, this->localPlayer); 474 475 this->sky->setParent(this->localCamera); 476 477 // initialize debug coord system 478 objectList = glGenLists(1); 479 glNewList (objectList, GL_COMPILE); 480 481 // trackManager->drawGraph(.01); 482 trackManager->debug(2); 483 glEndList(); 484 485 terrain = new Terrain("worlds/newGround.obj"); 486 terrain->setRelCoor(Vector(0,-10,0)); 487 this->spawn(terrain); 488 489 490 ParticleSystem* system = new ParticleSystem(1000, PARTICLE_SPRITE); 491 system->setLifeSpan(.5); 492 system->setConserve(.99); 493 system->setRadius(2, 0, 2, 0); 494 495 ParticleEmitter* emitter = new ParticleEmitter(Vector(-1, 0, 0), M_PI_4, 100, .05); 496 emitter->setParent(this->localPlayer); 497 498 particleEngine->addConnection(emitter, system); 499 } 500 501 void World::loadDebugWorld(int worldID) 502 { 503 /*monitor progress*/ 504 this->glmis->step(); 505 506 // LIGHT initialisation 507 508 lightMan->setAmbientColor(.1,.1,.1); 509 lightMan->addLight(); 510 // lightMan->setAttenuation(1.0, .01, 0.0); 511 // lightMan->setDiffuseColor(1,1,1); 512 // lightMan->addLight(1); 513 // lightMan->setPosition(20, 10, -20); 514 // lightMan->setDiffuseColor(0,0,0); 515 lightMan->debug(); 516 517 switch(this->debugWorldNr) 518 { 519 /* 520 this loads the hard-coded debug world. this only for simplicity and will be 521 removed by a reald world-loader, which interprets a world-file. 522 if you want to add an own debug world, just add a case DEBUG_WORLD_[nr] and 523 make whatever you want... 524 */ 525 case DEBUG_WORLD_0: 526 { 527 lightMan->setPosition(-5.0, 10.0, -40.0); 528 529 // !\todo old track-system has to be removed 530 531 //create helper for player 532 //HelperParent* hp = new HelperParent (); 533 /* the player has to be added to this helper */ 534 535 // create a player 536 this->localPlayer = new Player (); 537 this->localPlayer->setName ("player"); 538 this->spawn (this->localPlayer); 539 /*monitor progress*/ 540 //this->glmis->step(); 541 this->glmis->step(); 542 543 // bind input 544 Orxonox *orx = Orxonox::getInstance (); 545 orx->getLocalInput()->bind (this->localPlayer); 319 546 320 321 322 547 // bind camera 548 this->localCamera = new Camera(); 549 this->localCamera->setName ("camera"); 323 550 324 /*monitor progress*/ 325 this->glmis->step(); 326 327 // Create SkySphere 328 // this->skySphere = new Skysphere("../data/pictures/sky-replace.jpg"); 329 // this->skySphere->setName("SkySphere"); 330 // this->localCamera->addChild(this->skySphere); 331 // this->spawn(this->skySphere); 332 skyBox = new SkyBox(); 333 skyBox->setTexture("pictures/sky/skybox", "jpg"); 334 skyBox->setParent(localCamera); 335 this->spawn(skyBox); 336 337 /*monitor progress*/ 338 this->glmis->step(); 551 /*monitor progress*/ 552 this->glmis->step(); 553 554 sky = new SkyBox(); 555 // (SkyBox*)(sky)->setTexture("pictures/sky/skybox", "jpg"); 556 sky->setParent(localCamera); 557 this->spawn(sky); 558 559 /*monitor progress*/ 560 this->glmis->step(); 339 561 340 562 341 342 343 563 WorldEntity* env = new Environment(); 564 env->setName ("env"); 565 this->spawn(env); 344 566 345 567 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 568 /* 569 Vector* es = new Vector (10, 5, 0); 570 Quaternion* qs = new Quaternion (); 571 WorldEntity* pr = new Primitive(P_CYLINDER); 572 pr->setName("primitive"); 573 this->spawn(pr, this->localPlayer, es, qs, PNODE_MOVEMENT); 574 */ 575 576 /*monitor progress*/ 577 this->glmis->step(); 578 579 // trackManager->setBindSlave(env); 580 PNode* tn = trackManager->getTrackNode(); 581 tn->addChild(this->localPlayer); 582 this->localCamera->lookAt(tn); 583 584 //localCamera->setParent(TrackNode::getInstance()); 585 tn->addChild(this->localCamera); 586 // localCamera->lookAt(tn); 587 this->localPlayer->setMode(PNODE_ALL); 588 //Vector* cameraOffset = new Vector (0, 5, -10); 589 trackManager->condition(2, LEFTRIGHT, this->localPlayer); 590 this->glmis->step(); 591 break; 592 } 593 case DEBUG_WORLD_1: 594 { 595 lightMan->setPosition(.0, .0, .0); 596 lightMan->setAttenuation(1.0, .01, 0.0); 597 lightMan->setSpecularColor(1,0,0); 598 this->nullParent = NullParent::getInstance (); 599 this->nullParent->setName ("NullParent"); 600 601 // create a player 602 WorldEntity* myPlayer = new Player(); 603 myPlayer->setName ("player"); 604 this->spawn(myPlayer); 605 this->localPlayer = myPlayer; 384 606 385 386 387 607 // bind input 608 Orxonox *orx = Orxonox::getInstance(); 609 orx->getLocalInput()->bind (myPlayer); 388 610 389 390 391 392 393 394 395 396 skySphere = new Skysphere("../data/pictures/sky-replace.jpg");397 this->localPlayer->addChild(this->skySphere);398 this->spawn(this->skySphere);399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 611 // bind camera 612 this->localCamera = new Camera (); 613 this->localCamera->setName ("camera"); 614 this->localCamera->lookAt(LightManager::getInstance()->getLight(0)); 615 this->localCamera->setParent(this->localPlayer); 616 617 // Create SkySphere 618 sky = new Skysphere("pictures/sky-replace.jpg"); 619 this->localPlayer->addChild(this->sky); 620 this->spawn(this->sky); 621 Vector* es = new Vector (20, 0, 0); 622 Quaternion* qs = new Quaternion (); 623 624 lightMan->getLight(0)->setParent(trackManager->getTrackNode()); 625 break; 626 } 627 case DEBUG_WORLD_2: 628 { 629 lightMan->setAmbientColor(.1,.1,.1); 630 lightMan->addLight(); 631 lightMan->setPosition(-5.0, 10.0, -40.0); 632 this->nullParent = NullParent::getInstance (); 633 this->nullParent->setName ("NullParent"); 634 635 // !\todo old track-system has to be removed 636 637 //create helper for player 638 //HelperParent* hp = new HelperParent (); 639 /* the player has to be added to this helper */ 640 641 // create a player 642 this->localPlayer = new Player (); 643 this->localPlayer->setName ("player"); 644 this->spawn (this->localPlayer); 645 /*monitor progress*/ 646 //this->glmis->step(); 647 this->glmis->step(); 648 649 // bind input 650 Orxonox *orx = Orxonox::getInstance (); 651 orx->getLocalInput()->bind (this->localPlayer); 430 652 431 432 433 434 435 653 // bind camera 654 this->localCamera = new Camera(); 655 this->localCamera->setName ("camera"); 656 this->localCamera->lookAt(this->localPlayer); 657 this->localCamera->setParent(this->localPlayer); 436 658 437 438 439 440 441 this->skySphere = new Skysphere("../data/pictures/sky-replace.jpg");442 this->skySphere->setName("SkySphere");443 this->spawn(this->skySphere);444 this->localCamera->addChild(this->skySphere);445 this->skySphere->setMode(PNODE_MOVEMENT);446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 659 /*monitor progress*/ 660 this->glmis->step(); 661 662 // Create SkySphere 663 this->sky = new Skysphere("pictures/sky-replace.jpg"); 664 this->sky->setName("SkySphere"); 665 this->spawn(this->sky); 666 this->localCamera->addChild(this->sky); 667 this->sky->setMode(PNODE_MOVEMENT); 668 /*monitor progress*/ 669 this->glmis->step(); 670 671 672 WorldEntity* baseNode = new Satellite(Vector(1,0,1), 1.2); 673 this->localPlayer->addChild(baseNode); 674 baseNode->setRelCoor(Vector(10.0, 2.0, 1.0)); 675 this->spawn(baseNode); 676 677 WorldEntity* secondNode = new Satellite(Vector(0,0,1), 2.0); 678 baseNode->addChild(secondNode); 679 secondNode->setRelCoor(Vector(0.0, 0.0, 3.0)); 680 this->spawn(secondNode); 681 682 683 WorldEntity* thirdNode = new Satellite(Vector(0,0,1), 1.0); 684 secondNode->addChild(thirdNode); 685 thirdNode->setRelCoor(Vector(2.0, 0.0, 0.0)); 686 this->spawn(thirdNode); 465 687 466 688 689 690 WorldEntity* c = new Environment(); 691 this->localPlayer->addChild(c); 692 c->setRelCoor(Vector(10.0, 2.0, -1.0)); 693 this->spawn(c); 694 695 467 696 468 469 WorldEntity* b = new Environment(); 470 this->localPlayer->addChild(b); 471 b->setRelCoor(Vector(10.0, 1.0, 1.0)); 472 this->spawn(b); 473 474 475 WorldEntity* c = new Environment(); 476 this->localPlayer->addChild(c); 477 c->setRelCoor(Vector(10.0, 2.0, -1.0)); 478 this->spawn(c); 479 480 /* 481 KeyFrame* f1 = new KeyFrame; 482 f1->position = new Vector(-1.1, 0.0, 2.6); 483 f1->direction = new Quaternion(); 484 f1->time = 1.0; 485 f1->mode = NEG_EXP; 697 Animation3D* animation = new Animation3D(c); 698 animation->setInfinity(ANIM_INF_REPLAY); 699 700 701 animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_NEG_EXP, ANIM_LINEAR); 702 animation->addKeyFrame(Vector(0, 2, 0), Quaternion(M_PI, Vector(0,1,0)), 1.0, ANIM_NEG_EXP, ANIM_LINEAR); 703 animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_NEG_EXP, ANIM_LINEAR); 704 705 706 707 708 709 710 /* 711 KeyFrame* f1 = new KeyFrame; 712 f1->position = new Vector(-1.1, 0.0, 2.6); 713 f1->direction = new Quaternion(); 714 f1->time = 1.0; 715 f1->mode = NEG_EXP; 486 716 487 717 488 489 490 491 492 718 KeyFrame* f2 = new KeyFrame; 719 f2->position = new Vector(-2.1, 0.0, 2.6); 720 f2->direction = new Quaternion(); 721 f2->time = 0.1; 722 f2->mode = NEG_EXP; 493 723 494 495 496 497 498 724 KeyFrame* f3 = new KeyFrame; 725 f3->position = new Vector(10.0, 2.0, -1.0); 726 f3->direction = new Quaternion(); 727 f3->time = 0.2; 728 f3->mode = NEG_EXP; 499 729 500 501 502 503 504 730 KeyFrame* f4 = new KeyFrame; 731 f4->position = new Vector(10.0, 5.0, -1.0); 732 f4->direction = new Quaternion(); 733 f4->time = 1.0; 734 f4->mode = NEG_EXP; 505 735 506 736 507 737 508 this->simpleAnimation->animatorBegin(); 509 this->simpleAnimation->selectObject(b); 510 this->simpleAnimation->setAnimationMode(SINGLE); 511 this->simpleAnimation->addKeyFrame(f1); 512 this->simpleAnimation->addKeyFrame(f2); 513 this->simpleAnimation->start(); 514 this->simpleAnimation->selectObject(c); 515 this->simpleAnimation->addKeyFrame(f3); 516 this->simpleAnimation->addKeyFrame(f4); 517 this->simpleAnimation->start(); 518 this->simpleAnimation->animatorEnd(); 519 */ 520 521 /* 522 Vector* es = new Vector (10, 5, 0); 523 Quaternion* qs = new Quaternion (); 524 WorldEntity* pr = new Primitive(P_CYLINDER); 525 pr->setName("primitive"); 526 this->spawn(pr, this->localPlayer, es, qs, PNODE_MOVEMENT); 527 */ 528 529 /*monitor progress*/ 530 this->glmis->step(); 531 532 // trackManager->setBindSlave(env); 533 PNode* tn = trackManager->getTrackNode(); 534 tn->addChild(this->localPlayer); 535 536 //localCamera->setParent(TrackNode::getInstance()); 537 tn->addChild(this->localCamera); 538 // localCamera->lookAt(tn); 539 this->localPlayer->setMode(PNODE_ALL); 540 //Vector* cameraOffset = new Vector (0, 5, -10); 541 trackManager->condition(2, LEFTRIGHT, this->localPlayer); 542 this->glmis->step(); 543 544 break; 545 } 546 default: 547 printf("World::load() - no world with ID %i found", this->debugWorldNr ); 548 } 549 } 550 else if(this->worldName != NULL) 551 { 552 553 } 554 555 // initialize debug coord system 556 objectList = glGenLists(1); 557 glNewList (objectList, GL_COMPILE); 558 559 // trackManager->drawGraph(.01); 560 trackManager->debug(2); 561 glEndList(); 562 563 terrain = new Terrain("../data/worlds/newGround.obj"); 564 terrain->setRelCoor(Vector(0,-10,0)); 565 this->spawn(terrain); 566 567 } 738 this->simpleAnimation->animatorBegin(); 739 this->simpleAnimation->selectObject(b); 740 this->simpleAnimation->setAnimationMode(SINGLE); 741 this->simpleAnimation->addKeyFrame(f1); 742 this->simpleAnimation->addKeyFrame(f2); 743 this->simpleAnimation->start(); 744 this->simpleAnimation->selectObject(c); 745 this->simpleAnimation->addKeyFrame(f3); 746 this->simpleAnimation->addKeyFrame(f4); 747 this->simpleAnimation->start(); 748 this->simpleAnimation->animatorEnd(); 749 */ 750 751 /* 752 Vector* es = new Vector (10, 5, 0); 753 Quaternion* qs = new Quaternion (); 754 WorldEntity* pr = new Primitive(P_CYLINDER); 755 pr->setName("primitive"); 756 this->spawn(pr, this->localPlayer, es, qs, PNODE_MOVEMENT); 757 */ 758 759 /*monitor progress*/ 760 this->glmis->step(); 761 762 // trackManager->setBindSlave(env); 763 PNode* tn = trackManager->getTrackNode(); 764 tn->addChild(this->localPlayer); 765 766 //localCamera->setParent(TrackNode::getInstance()); 767 tn->addChild(this->localCamera); 768 // localCamera->lookAt(tn); 769 this->localPlayer->setMode(PNODE_ALL); 770 //Vector* cameraOffset = new Vector (0, 5, -10); 771 trackManager->condition(2, LEFTRIGHT, this->localPlayer); 772 this->glmis->step(); 773 774 break; 775 } 776 default: 777 printf("World::load() - no world with ID %i found", this->debugWorldNr ); 778 } 779 } 780 568 781 569 782 … … 637 850 638 851 //GLMenuImageScreen* 639 this->glmis = GLMenuImageScreen::getInstance();852 this->glmis = new GLMenuImageScreen(); 640 853 this->glmis->init(); 641 854 this->glmis->setMaximum(8); 642 this->glmis->draw();855 // this->glmis->draw(); 643 856 644 857 PRINTF(3)("World::displayLoadScreen - end\n"); … … 654 867 PRINTF(3)("World::releaseLoadScreen - start\n"); 655 868 this->glmis->setValue(this->glmis->getMaximum()); 656 //SDL_Delay(500);657 869 PRINTF(3)("World::releaseLoadScreen - end\n"); 870 delete this->glmis; 658 871 } 659 872 … … 745 958 746 959 TextEngine::getInstance()->draw(); 960 particleEngine->draw(this->dtS); //!< \todo should be dts like in the Trunk; 961 747 962 lightMan->draw(); // must be at the end of the drawing procedure, otherwise Light cannot be handled as PNodes // 748 963 } … … 840 1055 this->tick (); 841 1056 // Update the state 842 this->update (); 1057 this->update (); 843 1058 // Process collision 844 1059 this->collide (); … … 912 1127 913 1128 /* function to let all entities tick (iterate through list) */ 914 float seconds =this->dt / 1000.0;915 this->gameTime += seconds;1129 this->dtS = (float)this->dt / 1000.0; 1130 this->gameTime += this->dtS; 916 1131 //entity = entities->enumerate(); 917 1132 tIterator<WorldEntity>* iterator = this->entities->getIterator(); … … 919 1134 while( entity != NULL) 920 1135 { 921 entity->tick ( seconds);1136 entity->tick (this->dtS); 922 1137 entity = iterator->nextElement(); 923 1138 } 924 1139 delete iterator; 925 //skySphere->updatePosition(localCamera->absCoordinate); 926 1140 927 1141 /* update tick the rest */ 928 1142 this->trackManager->tick(this->dt); 929 1143 this->localCamera->tick(this->dt); 930 this->garbageCollector->tick(seconds); 931 932 AnimationPlayer::getInstance()->tick(seconds); 1144 this->garbageCollector->tick(this->dtS); 1145 1146 AnimationPlayer::getInstance()->tick(this->dtS); 1147 particleEngine->tick(this->dtS); 933 1148 } 934 1149 this->lastFrame = currentFrame; … … 945 1160 { 946 1161 this->garbageCollector->update(); 947 this->nullParent->update ( dt);1162 this->nullParent->update (this->dtS); 948 1163 } 949 1164 … … 1033 1248 bool World::command(Command* cmd) 1034 1249 { 1035 if( !strcmp( cmd->cmd, "view0")) this->localCamera->setViewMode(VIEW_NORMAL);1036 else if( !strcmp( cmd->cmd, "view1")) this->localCamera->setViewMode(VIEW_BEHIND);1037 else if( !strcmp( cmd->cmd, "view2")) this->localCamera->setViewMode(VIEW_FRONT);1038 else if( !strcmp( cmd->cmd, "view3")) this->localCamera->setViewMode(VIEW_LEFT);1039 else if( !strcmp( cmd->cmd, "view4")) this->localCamera->setViewMode(VIEW_RIGHT);1040 else if( !strcmp( cmd->cmd, "view5")) this->localCamera->setViewMode(VIEW_TOP);1250 if( !strcmp( cmd->cmd, CONFIG_NAME_VIEW0)) this->localCamera->setViewMode(VIEW_NORMAL); 1251 else if( !strcmp( cmd->cmd, CONFIG_NAME_VIEW1)) this->localCamera->setViewMode(VIEW_BEHIND); 1252 else if( !strcmp( cmd->cmd, CONFIG_NAME_VIEW2)) this->localCamera->setViewMode(VIEW_FRONT); 1253 else if( !strcmp( cmd->cmd, CONFIG_NAME_VIEW3)) this->localCamera->setViewMode(VIEW_LEFT); 1254 else if( !strcmp( cmd->cmd, CONFIG_NAME_VIEW4)) this->localCamera->setViewMode(VIEW_RIGHT); 1255 else if( !strcmp( cmd->cmd, CONFIG_NAME_VIEW5)) this->localCamera->setViewMode(VIEW_TOP); 1041 1256 1042 1257 return false; 1043 1258 } 1044 1259 1260 void World::setPath( const char* name) 1261 { 1262 if (this->path) 1263 delete this->path; 1264 if (ResourceManager::isFile(name)) 1265 { 1266 this->path = new char[strlen(name)+1]; 1267 strcpy(this->path, name); 1268 } 1269 else 1270 { 1271 this->path = new char[strlen(ResourceManager::getInstance()->getDataDir()) + strlen(name) +1]; 1272 sprintf(this->path, "%s%s", ResourceManager::getInstance()->getDataDir(), name); 1273 } 1274 } 1275 1276 const char* World::getPath( void) 1277 { 1278 return path; 1279 } -
orxonox/branches/physics/src/story_entities/world.h
r3851 r4178 11 11 #include "story_entity.h" 12 12 #include "p_node.h" 13 13 #include "xmlparser/tinyxml.h" 14 14 15 15 class World; … … 19 19 class PNode; 20 20 class GLMenuImageScreen; 21 class Skysphere;22 class SkyBox;23 21 class LightManager; 22 class ParticleEngine; 24 23 class Terrain; 25 24 class GarbageCollector; … … 57 56 World (char* name); 58 57 World (int worldID); 58 World (TiXmlElement* root); 59 59 virtual ~World (); 60 60 … … 70 70 virtual ErrorMessage resume (); 71 71 virtual ErrorMessage destroy (); 72 73 void loadDebugWorld(int worldID); 72 74 73 75 virtual void displayLoadScreen(); … … 85 87 int parentingMode); 86 88 89 const char* getPath(); 90 void setPath( const char* name); 87 91 88 92 private: 89 void init(char* name, int worldID);93 void constuctorInit(char* name, int worldID); 90 94 91 95 Uint32 lastFrame; //!< last time of frame 92 96 Uint32 dt; //!< time needed to calculate this frame 97 float dtS; //!< The time needed for caluculations in seconds 93 98 double gameTime; //!< this is where the game time is saved 94 99 bool bQuitOrxonox; //!< quit this application … … 100 105 char* worldName; //!< The name of this World 101 106 int debugWorldNr; //!< The Debug Nr. needed, if something goes wrong 107 char* path; //!< The file from which this world is loaded 102 108 103 109 PNode* nullParent; //!< The zero-point, that everything has as its parent. 104 110 TrackManager* trackManager; //!< The reference of the TrackManager that handles the course through the Level. 111 ParticleEngine* particleEngine; //!< The ParticleEngine of the World. 105 112 Camera* localCamera; //!< The current Camera 106 Skysphere* skySphere; //!< The Environmental Heaven of orxonox \todo insert this to environment insted 107 SkyBox* skyBox; 113 WorldEntity* sky; //!< The Environmental Heaven of orxonox \todo insert this to environment insted 108 114 LightManager* lightMan; //!< The Lights of the Level 109 115 Terrain* terrain; //!< The Terrain of the World. -
orxonox/branches/physics/src/subprojects/Makefile.in
r3789 r4178 89 89 EXEEXT = @EXEEXT@ 90 90 GPROF = @GPROF@ 91 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@92 GTHREAD_LIBS = @GTHREAD_LIBS@93 91 GTK2_CFLAGS = @GTK2_CFLAGS@ 94 92 GTK2_LIBS = @GTK2_LIBS@ 95 93 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 96 94 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 97 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@98 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@99 95 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 100 96 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ … … 117 113 PACKAGE_VERSION = @PACKAGE_VERSION@ 118 114 PATH_SEPARATOR = @PATH_SEPARATOR@ 115 PKG_CONFIG = @PKG_CONFIG@ 116 RANLIB = @RANLIB@ 119 117 SET_MAKE = @SET_MAKE@ 120 118 SHELL = @SHELL@ … … 125 123 ac_ct_CC = @ac_ct_CC@ 126 124 ac_ct_CXX = @ac_ct_CXX@ 125 ac_ct_RANLIB = @ac_ct_RANLIB@ 127 126 ac_ct_STRIP = @ac_ct_STRIP@ 128 127 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -
orxonox/branches/physics/src/subprojects/testmain/Makefile.in
r3789 r4178 104 104 EXEEXT = @EXEEXT@ 105 105 GPROF = @GPROF@ 106 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@107 GTHREAD_LIBS = @GTHREAD_LIBS@108 106 GTK2_CFLAGS = @GTK2_CFLAGS@ 109 107 GTK2_LIBS = @GTK2_LIBS@ 110 108 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 111 109 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 112 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@113 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@114 110 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 115 111 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ … … 132 128 PACKAGE_VERSION = @PACKAGE_VERSION@ 133 129 PATH_SEPARATOR = @PATH_SEPARATOR@ 130 PKG_CONFIG = @PKG_CONFIG@ 131 RANLIB = @RANLIB@ 134 132 SET_MAKE = @SET_MAKE@ 135 133 SHELL = @SHELL@ … … 140 138 ac_ct_CC = @ac_ct_CC@ 141 139 ac_ct_CXX = @ac_ct_CXX@ 140 ac_ct_RANLIB = @ac_ct_RANLIB@ 142 141 ac_ct_STRIP = @ac_ct_STRIP@ 143 142 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -
orxonox/branches/physics/src/track_manager.cc
r3953 r4178 312 312 PNode* tmpNode = (PNode*)node; 313 313 314 if (tmpNode->getRelCoor() ->z < 0)314 if (tmpNode->getRelCoor().z < 0) 315 315 return 0; 316 316 else … … 333 333 PNode* tmpNode = (PNode*)node; 334 334 335 Vector nodeRelCoord = *tmpNode->getRelCoor();335 Vector nodeRelCoord = tmpNode->getRelCoor(); 336 336 float minDist = 100000000; 337 337 int childNumber = 0; … … 396 396 this->textAnimation->setInfinity(ANIM_INF_CONSTANT); 397 397 } 398 399 400 /** 401 \brief loads a trackElement from a TiXmlElement 402 \param root the TiXmlElement to load the Data from 403 404 */ 405 bool TrackManager::load( TiXmlElement* root) 406 { 407 408 } 409 410 398 411 399 412 /** -
orxonox/branches/physics/src/track_manager.h
r3847 r4178 153 153 static TrackManager* getInstance(void); 154 154 155 bool load(TiXmlElement* root); 156 155 157 // Methods to change the Path (initialisation) 156 158 void workOn(unsigned int trackID); -
orxonox/branches/physics/src/track_node.cc
r3607 r4178 41 41 42 42 43 TrackNode::TrackNode ( Vector*absCoordinate)43 TrackNode::TrackNode (const Vector& absCoordinate) 44 44 { 45 45 this->parent = NullParent::getInstance(); 46 46 this->trackManager = TrackManager::getInstance(); 47 47 this->setMode(PNODE_ALL); 48 this-> absCoordinate = absCoordinate;48 this->setAbsCoor(absCoordinate); 49 49 } 50 50 -
orxonox/branches/physics/src/track_node.h
r3836 r4178 22 22 public: 23 23 TrackNode (); 24 TrackNode ( Vector*absCoordinate);24 TrackNode (const Vector& absCoordinate); 25 25 26 26 virtual ~TrackNode (); -
orxonox/branches/physics/src/util/animation/animation.cc
r3953 r4178 34 34 35 35 // setting default values 36 this->keyFramesToPlay = -1; 36 37 this->localTime = 0.0; 37 this->bRunning = true;38 this->bRunning = false; 38 39 39 40 AnimationPlayer::getInstance()->addAnimation(this); … … 83 84 break; 84 85 case ANIM_INF_REPLAY: 85 this->replay(); 86 this->rewind(); 87 this->bRunning = true; 86 88 break; 87 89 case ANIM_INF_REWIND: … … 99 101 void Animation::play() 100 102 { 103 this->keyFramesToPlay = -1; 104 this->bRunning = true; 105 } 106 107 /** 108 \brief plays the Next n keyframes 109 \param n the Count of keyFrames to play. 110 */ 111 void Animation::playNextKeyframes(int n) 112 { 113 this->keyFramesToPlay = n-1; 101 114 this->bRunning = true; 102 115 } … … 107 120 void Animation::stop() 108 121 { 122 this->keyFramesToPlay = -1; 109 123 this->rewind(); 110 124 this->bRunning = true; … … 127 141 { 128 142 this->rewind(); 129 this-> bRunning = true;143 this->play(); 130 144 } -
orxonox/branches/physics/src/util/animation/animation.h
r3953 r4178 25 25 ANIM_NEG_EXP: fast, slow 26 26 ANIM_RANDOM: eratic 27 27 28 ANIM_NULL: !!DO NOT USE THIS!! only for internal handling 29 28 30 deprecated QUADRATIC 29 31 */ … … 35 37 ANIM_NEG_EXP, 36 38 ANIM_QUADRATIC, 37 ANIM_RANDOM}; 39 ANIM_RANDOM, 40 ANIM_NULL}; 41 #define ANIM_DEFAULT_FUNCTION ANIM_LINEAR //!< A default function to choose from the above set 38 42 39 43 //! An enumerator describing what the animation should do after the last keyframe. … … 69 73 70 74 void play(); // equals resume(); 75 void playNextKeyframes(int n = 1); 71 76 void stop(); 72 77 void pause(); … … 95 100 BaseObject* baseObject; //!< The same as object in the derived classes, but with reference to BaseObject 96 101 unsigned int keyFrameCount; //!< The Count of KeyFrames. 102 int keyFramesToPlay; //!< How many more Keyframes to play. if negative it will be ignored if 0 stop. 97 103 bool bHandled; //!< If this Animation is handled by the AnimationPlayer. 98 104 bool bRunning; //!< If the animation is running -
orxonox/branches/physics/src/util/animation/animation3d.cc
r3953 r4178 15 15 2005-04-17: Benjamin Grauer 16 16 Rewritte all functions, so it will fit into the Animation-class 17 2005-04-25: Patrick Boenzli 18 Extended the framework to support quatSlerp rotations. Each frame now supports diff mov/rot types. Implemented mov/rot functions 17 19 */ 18 20 … … 42 44 this->nextKeyFrame = tmpKeyFrame; 43 45 44 this->animFunc = &Animation3D::linear; 46 this->animFuncMov = &Animation3D::mLinear; 47 this->animFuncRot = &Animation3D::rLinear; 48 45 49 } 46 50 … … 72 76 this->nextKeyFrame = keyFrameList->nextElement(keyFrameList->firstElement()); 73 77 this->localTime = 0.0; 74 this->setAnimFunc(this->currentKeyFrame->animFunc); 78 this->setAnimFuncMov(this->currentKeyFrame->animFuncMov); 79 this->setAnimFuncRot(this->currentKeyFrame->animFuncRot); 75 80 } 76 81 … … 80 85 \param direction The direction of the new Keyframe. 81 86 \param duration The duration from the new KeyFrame to the next one 82 \param animFunc The function to animate between this keyFrame and the next one 83 */ 84 void Animation3D::addKeyFrame(Vector position, Quaternion direction, float duration, ANIM_FUNCTION animFunc) 87 \param animFuncMov The function to animate position between this keyFrame and the next one 88 \param animFuncMov The function to animate rotation between this keyFrame and the next one 89 */ 90 void Animation3D::addKeyFrame(Vector position, Quaternion direction, float duration, ANIM_FUNCTION animFuncMov, ANIM_FUNCTION animFuncRot) 85 91 { 86 92 // some small check 87 93 if (duration <= 0.0) 88 94 duration = 1.0; 95 // if the Rotation-Animation-function is set ANIM_NULL, animFuncRot will match animFuncRot 96 if (animFuncMov == ANIM_NULL) 97 animFuncMov = ANIM_DEFAULT_FUNCTION; 98 if (animFuncRot == ANIM_NULL) 99 animFuncRot = animFuncMov; 89 100 90 101 KeyFrame3D* tmpKeyFrame; … … 94 105 { 95 106 tmpKeyFrame = this->keyFrameList->firstElement(); 96 this->setAnimFunc(animFunc); 107 //this->setAnimFuncMov(animFuncMov); 108 //this->setAnimFuncRot(animFuncRot); 97 109 } 98 110 else … … 106 118 107 119 tmpKeyFrame->position = position; 120 //tmpKeyFrame->lastPosition = position; 108 121 tmpKeyFrame->direction = direction; 109 122 tmpKeyFrame->duration = duration; 110 tmpKeyFrame->animFunc = animFunc; 123 tmpKeyFrame->animFuncMov = animFuncMov; 124 tmpKeyFrame->animFuncRot = animFuncRot; 111 125 this->keyFrameCount++; 112 126 } 127 128 113 129 114 130 /** … … 123 139 if (localTime >= this->currentKeyFrame->duration) 124 140 { 125 // switching to the next Key-Frame 126 this->localTime -= this->currentKeyFrame->duration; 127 this->currentKeyFrame = this->nextKeyFrame; 128 // checking, if we should still Play the animation 129 if (this->currentKeyFrame == this->keyFrameList->lastElement()) 130 this->handleInfinity(); 131 this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame); 132 this->setAnimFunc(this->currentKeyFrame->animFunc); 133 134 if( this->currentKeyFrame->animFunc == ANIM_NEG_EXP) 141 if (likely(this->keyFramesToPlay != 0)) 135 142 { 136 this->tmpVect = this->nextKeyFrame->position - this->currentKeyFrame->position; 137 this->deltaT = 1/this->currentKeyFrame->duration * logf(1.0 + 600.0/this->tmpVect.len()); 143 if (unlikely(this->keyFramesToPlay > 0)) 144 --this->keyFramesToPlay; 145 // switching to the next Key-Frame 146 this->localTime -= this->currentKeyFrame->duration; 147 this->currentKeyFrame = this->nextKeyFrame; 148 // checking, if we should still Play the animation 149 if (this->currentKeyFrame == this->keyFrameList->lastElement()) 150 this->handleInfinity(); 151 this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame); 152 this->setAnimFuncMov(this->currentKeyFrame->animFuncMov); 153 this->setAnimFuncRot(this->currentKeyFrame->animFuncRot); 138 154 } 139 } 140 155 else 156 this->pause(); 157 } 141 158 /* now animate it */ 142 (this->*animFunc)(this->localTime); 143 /* 144 switch( this->movMode) 145 { 146 case LINEAR: 147 *this->tmpVect = *this->currentFrame->position - *this->lastFrame->position; 148 *this->tmpVect = *this->tmpVect * this->localTime / this->currentFrame->time; 149 this->currentFrame->object->setRelCoor(*this->lastFrame->position + *this->tmpVect); 150 *this->lastPosition = *this->tmpVect; 151 break; 152 case EXP: 153 154 break; 155 case NEG_EXP: 156 *this->tmpVect = *this->currentFrame->position - *this->lastFrame->position; 157 *this->tmpVect = *this->tmpVect * (1 - expf(- this->localTime * this->deltaT)); 158 this->currentFrame->object->setRelCoor(*this->lastFrame->position + *this->tmpVect); 159 *this->lastPosition = *this->tmpVect; 160 break; 161 case SIN: 162 *this->tmpVect = *this->currentFrame->position - *this->lastFrame->position; 163 *this->tmpVect = *this->tmpVect * 0.5*(1 - cos(M_PI * this->localTime / this->currentFrame->time)); 164 this->currentFrame->object->setRelCoor(*this->lastFrame->position + *this->tmpVect); 165 *this->lastPosition = *this->tmpVect; 166 break; 167 case COS: 168 169 break; 170 case QUADRATIC: 171 *this->tmpVect = *this->currentFrame->position - *this->lastFrame->position; 172 *this->tmpVect = *this->tmpVect * 1/3 * ldexpf(this->localTime, 3); 173 break; 174 default: 175 break; 176 } 177 */ 178 } 179 } 180 181 182 /** 183 \brief Sets The kind of Animation between this keyframe and the next one 159 (this->*animFuncMov)(this->localTime); 160 (this->*animFuncRot)(this->localTime); 161 } 162 } 163 164 165 /*==Movement Section==========================================================*/ 166 167 /** 168 \brief Sets The kind of movment Animation between this keyframe and the next one 184 169 \param animFunc The Type of Animation to set 185 170 */ 186 void Animation3D::setAnimFunc (ANIM_FUNCTION animFunc)187 { 188 switch (animFunc )171 void Animation3D::setAnimFuncMov(ANIM_FUNCTION animFuncMov) 172 { 173 switch (animFuncMov) 189 174 { 175 case ANIM_CONSTANT: 176 this->animFuncMov = &Animation3D::mConstant; 177 break; 178 case ANIM_LINEAR: 179 this->animFuncMov = &Animation3D::mLinear; 180 this->object->setRelCoor(this->currentKeyFrame->position); 181 this->currentKeyFrame->lastPosition = Vector(); 182 break; 183 case ANIM_SINE: 184 this->animFuncMov = &Animation3D::mSine; 185 this->object->setRelCoor(this->currentKeyFrame->position); 186 this->currentKeyFrame->lastPosition = Vector(); 187 break; 188 case ANIM_COSINE: 189 this->animFuncMov = &Animation3D::mCosine; 190 this->object->setRelCoor(this->currentKeyFrame->position); 191 this->currentKeyFrame->lastPosition = Vector(); 192 break; 193 case ANIM_EXP: 194 this->object->setRelCoor(this->currentKeyFrame->position); 195 this->animFuncMov = &Animation3D::mExp; 196 break; 197 case ANIM_NEG_EXP: 198 this->animFuncMov = &Animation3D::mNegExp; 199 this->object->setRelCoor(this->currentKeyFrame->position); 200 this->expFactorMov = -1.0 / this->currentKeyFrame->duration * logf(DELTA_X_3D); 201 this->currentKeyFrame->lastPosition = Vector(); 202 break; 203 case ANIM_QUADRATIC: 204 this->object->setRelCoor(this->currentKeyFrame->position); 205 this->animFuncMov = &Animation3D::mQuadratic; 206 break; 207 case ANIM_RANDOM: 208 this->object->setRelCoor(this->currentKeyFrame->position); 209 this->animFuncMov = &Animation3D::mRandom; 210 break; 190 211 default: 191 case ANIM_CONSTANT: 192 this->animFunc = &Animation3D::constant; 193 break; 194 case ANIM_LINEAR: 195 this->animFunc = &Animation3D::linear; 196 break; 197 case ANIM_SINE: 198 this->animFunc = &Animation3D::sine; 199 break; 200 case ANIM_COSINE: 201 this->animFunc = &Animation3D::cosine; 202 break; 203 case ANIM_EXP: 204 this->animFunc = &Animation3D::exp; 205 break; 206 case ANIM_NEG_EXP: 207 this->animFunc = &Animation3D::negExp; 208 break; 209 case ANIM_QUADRATIC: 210 this->animFunc = &Animation3D::quadratic; 211 break; 212 case ANIM_RANDOM: 213 this->animFunc = &Animation3D::random; 214 break; 215 } 216 } 212 break; 213 } 214 } 215 216 217 217 218 218 /** … … 220 220 \param timePassed The time passed since this Keyframe began 221 221 */ 222 void Animation3D:: constant(float timePassed) const223 { 224 this->object->setRelCoor(this->currentKeyFrame->position);222 void Animation3D::mConstant(float timePassed) const 223 { 224 //this->object->setRelCoor(this->currentKeyFrame->position); 225 225 226 226 /* … … 238 238 \todo implement also do this for direction 239 239 */ 240 void Animation3D:: linear(float timePassed) const241 { 242 this->object->setRelCoor(this->currentKeyFrame->position +243 (this->nextKeyFrame->position - this->currentKeyFrame->position) * 244 (timePassed/this->currentKeyFrame->duration));240 void Animation3D::mLinear(float timePassed) const 241 { 242 Vector v = (this->nextKeyFrame->position - this->currentKeyFrame->position) * (timePassed/this->currentKeyFrame->duration); 243 this->object->shiftCoor(v - this->currentKeyFrame->lastPosition); 244 this->currentKeyFrame->lastPosition = v; 245 245 } 246 246 … … 251 251 \todo implement 252 252 */ 253 void Animation3D::sine(float timePassed) const 254 { 255 this->linear(timePassed); 256 } 253 void Animation3D::mSine(float timePassed) const 254 { 255 Vector v; 256 if( timePassed < this->currentKeyFrame->duration/2.0) 257 v = (this->nextKeyFrame->position - this->currentKeyFrame->position) * sin( M_PI * timePassed /this->currentKeyFrame->duration) / 2.0; 258 else 259 v = (this->nextKeyFrame->position - this->currentKeyFrame->position) * (2.0 + sin( M_PI * (- timePassed /this->currentKeyFrame->duration)) )/ 2.0; 260 261 this->object->shiftCoor(v - this->currentKeyFrame->lastPosition); 262 this->currentKeyFrame->lastPosition = v; 263 } 264 257 265 258 266 /** … … 262 270 \todo implement 263 271 */ 264 void Animation3D::cosine(float timePassed) const 265 { 266 this->linear(timePassed); 267 } 272 void Animation3D::mCosine(float timePassed) const 273 { 274 Vector v; 275 v = (this->nextKeyFrame->position - this->currentKeyFrame->position) * (1.0 + cos( M_PI * timePassed / this->currentKeyFrame->duration))/2.0; 276 this->object->shiftCoor(v - this->currentKeyFrame->lastPosition); 277 this->currentKeyFrame->lastPosition = v; 278 279 280 /* 281 this->object->setRelCoor( this->nextKeyFrame->position - 282 (this->nextKeyFrame->position - this->currentKeyFrame->position) * 283 (1.0 + cos( M_PI * timePassed / this->currentKeyFrame->duration))/2.0); 284 */ 285 } 286 287 268 288 269 289 /** … … 271 291 \param timePassed The time passed since this Keyframe began 272 292 */ 273 void Animation3D::exp(float timePassed) const 274 { 275 this->linear(timePassed); 293 void Animation3D::mExp(float timePassed) const 294 { 295 PRINTF(0)("no exp animation3d defined\n"); 296 this->mLinear(timePassed); 276 297 } 277 298 … … 279 300 \brief a negative exponential interpolation between this keyframe and the next one 280 301 \param timePassed The time passed since this Keyframe began 281 282 \todo implement 283 */ 284 void Animation3D::negExp(float timePassed) const 285 { 286 this->linear(timePassed); 287 } 302 */ 303 void Animation3D::mNegExp(float timePassed) const 304 { 305 Vector v; 306 v = (this->nextKeyFrame->position - this->currentKeyFrame->position) * (1.0 - expf(- timePassed * expFactorMov)); 307 this->object->shiftCoor(v - this->currentKeyFrame->lastPosition); 308 this->currentKeyFrame->lastPosition = v; 309 310 /* 311 this->object->setRelCoor( this->currentKeyFrame->position + 312 (this->nextKeyFrame->position - this->currentKeyFrame->position) * 313 (1.0 - expf(- timePassed * expFactorMov)) ); 314 */ 315 } 316 288 317 289 318 /** … … 293 322 \todo implement 294 323 */ 295 void Animation3D::quadratic(float timePassed) const 296 { 297 this->linear(timePassed); 324 void Animation3D::mQuadratic(float timePassed) const 325 { 326 PRINTF(0)("no quadratic animation3d defined\n"); 327 this->mLinear(timePassed); 298 328 } 299 329 … … 302 332 \param timePassed The time passed since this Keyframe began 303 333 */ 304 void Animation3D::random(float timePassed) const 305 { 334 void Animation3D::mRandom(float timePassed) const 335 { 336 /* 306 337 this->object->setRelCoor(this->currentKeyFrame->position + 307 338 (this->nextKeyFrame->position - this->currentKeyFrame->position) * (float)rand()/(float)RAND_MAX); 308 339 this->object->setRelDir(this->currentKeyFrame->direction + 309 340 (this->nextKeyFrame->direction - this->currentKeyFrame->direction)* (float)rand()/(float)RAND_MAX); 310 } 341 */ 342 } 343 344 345 /*==Rotation Section==========================================================*/ 346 347 348 /** 349 \brief Sets The kind of rotation Animation between this keyframe and the next one 350 \param animFunc The Type of Animation to set 351 */ 352 void Animation3D::setAnimFuncRot(ANIM_FUNCTION animFuncRot) 353 { 354 switch (animFuncRot) 355 { 356 default: 357 case ANIM_CONSTANT: 358 this->animFuncRot = &Animation3D::rConstant; 359 break; 360 case ANIM_LINEAR: 361 this->animFuncRot = &Animation3D::rLinear; 362 break; 363 case ANIM_SINE: 364 this->animFuncRot = &Animation3D::rSine; 365 break; 366 case ANIM_COSINE: 367 this->animFuncRot = &Animation3D::rCosine; 368 break; 369 case ANIM_EXP: 370 this->animFuncRot = &Animation3D::rExp; 371 break; 372 case ANIM_NEG_EXP: 373 this->animFuncRot = &Animation3D::rNegExp; 374 this->expFactorRot = -1.0 / this->currentKeyFrame->duration * logf(DELTA_X_3D); 375 break; 376 case ANIM_QUADRATIC: 377 this->animFuncRot = &Animation3D::rQuadratic; 378 break; 379 case ANIM_RANDOM: 380 this->animFuncRot = &Animation3D::rRandom; 381 break; 382 383 } 384 } 385 386 387 /** 388 \brief stays at the value of the currentKeyFrame 389 \param timePassed The time passed since this Keyframe began 390 */ 391 void Animation3D::rConstant(float timePassed) const 392 { 393 this->object->setRelDir(this->currentKeyFrame->direction); 394 } 395 396 /** 397 \brief linear interpolation between this keyframe and the next one 398 \param timePassed The time passed since this Keyframe began 399 400 \todo implement also do this for direction 401 */ 402 void Animation3D::rLinear(float timePassed) const 403 { 404 this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction, 405 this->currentKeyFrame->direction, 406 timePassed/this->currentKeyFrame->duration) ); 407 } 408 409 /** 410 \brief a Sinusodial Interpolation between this keyframe and the next one 411 \param timePassed The time passed since this Keyframe began 412 413 \todo implement 414 */ 415 void Animation3D::rSine(float timePassed) const 416 { 417 float scale; 418 if( timePassed < this->currentKeyFrame->duration / 2.0) 419 scale = sin( M_PI * timePassed / this->currentKeyFrame->duration); 420 else 421 scale = 1.0 - sin( M_PI * timePassed / this->currentKeyFrame->duration); 422 423 this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction, 424 this->currentKeyFrame->direction, 425 scale) ); 426 } 427 428 429 /** 430 \brief a cosine interpolation between this keyframe and the next one 431 \param timePassed The time passed since this Keyframe began 432 433 \todo implement 434 */ 435 void Animation3D::rCosine(float timePassed) const 436 { 437 float scale = cos(M_PI * timePassed / this->currentKeyFrame->duration); 438 this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction, 439 this->currentKeyFrame->direction, 440 scale) ); 441 } 442 443 444 445 /** 446 \brief an exponential interpolation between this keyframe and the next one 447 \param timePassed The time passed since this Keyframe began 448 */ 449 void Animation3D::rExp(float timePassed) const 450 { 451 PRINTF(0)("exp rotation function not implemented\n"); 452 } 453 454 /** 455 \brief a negative exponential interpolation between this keyframe and the next one 456 \param timePassed The time passed since this Keyframe began 457 */ 458 void Animation3D::rNegExp(float timePassed) const 459 { 460 float scale = (1.0 - expf(- timePassed * expFactorRot)); 461 this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction, 462 this->currentKeyFrame->direction, 463 scale) ); 464 } 465 466 467 /** 468 \brief a quadratic interpolation between this keyframe and the next one 469 \param timePassed The time passed since this Keyframe began 470 471 \todo implement 472 */ 473 void Animation3D::rQuadratic(float timePassed) const 474 { 475 PRINTF(0)("quadratic rotation alg not implemented\n"); 476 } 477 478 /** 479 \brief some random animation (fluctuating) 480 \param timePassed The time passed since this Keyframe began 481 */ 482 void Animation3D::rRandom(float timePassed) const 483 { 484 PRINTF(0)("random rotation alg not implemented\n"); 485 } -
orxonox/branches/physics/src/util/animation/animation3d.h
r3953 r4178 9 9 class PNode; 10 10 11 #define DELTA_X_3D 0.05 //!< the percentag of the distance that doesnt have to be done by neg_exp (asymptotical) ~ maschinendelta 12 11 13 //! KeyFrame3D Struct 12 14 /** … … 16 18 float duration; //!< The duration of this KeyFrame 17 19 Vector position; //!< The position of this KeyFrame 20 Vector lastPosition; 18 21 Quaternion direction; //!< The direction of this KeyFrame 19 ANIM_FUNCTION animFunc; //!< with whitch function to iterate to the next KeyFrame3D 22 ANIM_FUNCTION animFuncMov; //!< with whitch function to iterate movement to the next KeyFrame3D 23 ANIM_FUNCTION animFuncRot; //!< with whitch function to iterate rotation to the next KeyFrame3D 20 24 }; 21 25 … … 32 36 virtual void rewind(void); 33 37 34 void addKeyFrame(Vector position, Quaternion direction, float time, ANIM_FUNCTION animFunc = ANIM_LINEAR);38 void addKeyFrame(Vector position, Quaternion direction, float time, ANIM_FUNCTION animFuncMov = ANIM_DEFAULT_FUNCTION, ANIM_FUNCTION animFuncRot = ANIM_NULL); 35 39 // void addKeyFrame(KeyFrame3D* frame); 36 40 37 41 virtual void tick(float dt); 38 42 39 43 private: 40 44 // animation functions 41 void setAnimFunc(ANIM_FUNCTION animFunc); 42 void constant(float timePassed) const; 43 void linear(float timePassed) const; 44 void sine(float timePassed) const; 45 void cosine(float timePassed) const; 46 void exp(float timePassed) const; 47 void negExp(float timePassed) const; 48 void quadratic(float timePassed) const; 49 void random(float timePassed) const; 45 void setAnimFuncMov(ANIM_FUNCTION animFunc); 46 void setAnimFuncRot(ANIM_FUNCTION animFunc); 47 void mConstant(float timePassed) const; 48 void mLinear(float timePassed) const; 49 void mSine(float timePassed) const; 50 void mCosine(float timePassed) const; 51 void mExp(float timePassed) const; 52 void mNegExp(float timePassed) const; 53 void mQuadratic(float timePassed) const; 54 void mRandom(float timePassed) const; 55 void rConstant(float timePassed) const; 56 void rLinear(float timePassed) const; 57 void rSine(float timePassed) const; 58 void rCosine(float timePassed) const; 59 void rExp(float timePassed) const; 60 void rNegExp(float timePassed) const; 61 void rQuadratic(float timePassed) const; 62 void rRandom(float timePassed) const; 50 63 // ANIM_FUNCTION animFunc; 51 void (Animation3D::*animFunc)(float) const; //!< A Function for the AnimationType 64 void (Animation3D::*animFuncMov)(float) const; //!< A Function for the AnimationType 65 void (Animation3D::*animFuncRot)(float) const; //!< A Function for the AnimationType 52 66 53 67 KeyFrame3D* currentKeyFrame; //!< The current KeyFrame … … 60 74 Vector tmpVect; //!< what for?? 61 75 float deltaT; //!< ?? 76 float expFactorMov; 77 float expFactorRot; 62 78 }; -
orxonox/branches/physics/src/util/animation/t_animation.h
r3953 r4178 43 43 void setFuncToAnim(T* object, void (T::*funcToAnim)(float)); 44 44 45 void addKeyFrame(float value, float duration, ANIM_FUNCTION animFunc = ANIM_ LINEAR);45 void addKeyFrame(float value, float duration, ANIM_FUNCTION animFunc = ANIM_DEFAULT_FUNCTION); 46 46 47 47 virtual void rewind(); … … 154 154 if (duration <= 0.0) 155 155 duration = 1.0; 156 if (animFunc == ANIM_NULL) 157 animFunc = ANIM_DEFAULT_FUNCTION; 156 158 157 159 KeyFrameF* tmpKeyFrame; … … 190 192 if (localTime >= this->currentKeyFrame->duration) 191 193 { 192 // switching to the next Key-Frame 193 this->localTime -= this->currentKeyFrame->duration; 194 195 this->currentKeyFrame = this->nextKeyFrame; 196 // checking, if we should still Play the animation 197 if (this->currentKeyFrame == this->keyFrameList->lastElement()) 198 this->handleInfinity(); 199 this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame); 200 201 printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value); 202 this->setAnimFunc(this->currentKeyFrame->animFunc); 194 if (likely(this->keyFramesToPlay != 0)) 195 { 196 if (unlikely(this->keyFramesToPlay > 0)) 197 --this->keyFramesToPlay; 198 // switching to the next Key-Frame 199 this->localTime -= this->currentKeyFrame->duration; 200 201 this->currentKeyFrame = this->nextKeyFrame; 202 // checking, if we should still Play the animation 203 if (this->currentKeyFrame == this->keyFrameList->lastElement()) 204 this->handleInfinity(); 205 this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame); 206 207 printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value); 208 this->setAnimFunc(this->currentKeyFrame->animFunc); 209 } 210 else 211 this->pause(); 203 212 } 204 213 … … 235 244 { 236 245 this->animFunc = &tAnimation<T>::negExp; 237 float d = fabs(this->currentKeyFrame->value - this->nextKeyFrame->value);238 246 expFactor = - 1.0 / this->currentKeyFrame->duration * logf(DELTA_X); 239 247 break; -
orxonox/branches/physics/src/util/resource_manager.cc
r3953 r4178 92 92 this->dataDir = new char[strlen(dataDir)+1]; 93 93 strcpy(this->dataDir, dataDir); 94 return true; 94 95 } 95 96 else 96 97 { 97 98 PRINTF(1)("%s is not a Directory, and can not be the Data Directory, leaving as %s \n", dataDir, this->dataDir); 98 } 99 return false; 100 } 101 } 102 103 /** 104 \brief checks for the DataDirectory, by looking if 105 \param fileInside is inisde?? 106 */ 107 bool ResourceManager::checkDataDir(const char* fileInside) 108 { 109 bool retVal; 110 if (!isDir(this->dataDir)) 111 { 112 PRINTF(1)("%s is not a directory\n", this->dataDir); 113 return false; 114 } 115 116 char* testFile = new char[strlen(this->dataDir)+strlen(fileInside)+1]; 117 sprintf(testFile, "%s%s", this->dataDir, fileInside); 118 retVal = isFile(testFile); 119 delete testFile; 120 return retVal; 99 121 } 100 122 … … 180 202 // searching if the resource was loaded before. 181 203 Resource* tmpResource = this->locateResourceByInfo(fileName, type, param1, param2,param3); 182 if (tmpResource) // if the resource was notloaded before.204 if (tmpResource) // if the resource was loaded before. 183 205 { 184 206 PRINTF(4)("not loading cached resource %s\n", tmpResource->name); … … 199 221 200 222 // creating the full name. (directoryName + FileName) 201 char* fullName = new char[strlen(dataDir)+strlen(fileName)+1]; 202 sprintf(fullName, "%s%s", this->dataDir, fileName); 203 223 char* fullName = new char[strlen(this->getDataDir())+strlen(fileName)+1]; 224 sprintf(fullName, "%s%s", this->getDataDir(), fileName); 204 225 // Checking for the type of resource \see ResourceType 205 226 switch(type) … … 211 232 tmpResource->modelSize = 1.0; 212 233 213 if( isFile(fullName))234 if(ResourceManager::isFile(fullName)) 214 235 tmpResource->pointer = new OBJModel(fullName, tmpResource->modelSize); 215 236 else … … 508 529 } 509 530 510 stat(tmpDirName, &status); 511 if (status.st_mode & (S_IFDIR 531 if(!stat(tmpDirName, &status)) 532 { 533 if (status.st_mode & (S_IFDIR 512 534 #ifndef __WIN32__ 513 | S_IFLNK535 | S_IFLNK 514 536 #endif 515 )) 516 { 517 delete tmpDirName; 518 return true; 519 } 520 else 521 { 522 delete tmpDirName; 523 return false; 524 } 537 )) 538 { 539 delete tmpDirName; 540 return true; 541 } 542 else 543 { 544 delete tmpDirName; 545 return false; 546 } 547 } 548 else 549 return false; 525 550 } 526 551 … … 532 557 bool ResourceManager::isFile(const char* fileName) 533 558 { 559 char* tmpFileName = ResourceManager::homeDirCheck(fileName); 560 // actually checks the File 534 561 struct stat status; 535 stat(fileName, &status); 536 if (status.st_mode & (S_IFREG 562 if (!stat(tmpFileName, &status)) 563 { 564 if (status.st_mode & (S_IFREG 537 565 #ifndef __WIN32__ 538 | S_IFLNK566 | S_IFLNK 539 567 #endif 540 )) 541 return true; 542 else 543 return false; 544 } 568 )) 569 { 570 delete tmpFileName; 571 return true; 572 } 573 else 574 { 575 delete tmpFileName; 576 return false; 577 } 578 } 579 else 580 { 581 delete tmpFileName; 582 return false; 583 } 584 } 585 586 /** 587 \brief touches a File on the disk (thereby creating it) 588 \param fileName The file to touch 589 */ 590 bool ResourceManager::touchFile(const char* fileName) 591 { 592 char* tmpName = ResourceManager::homeDirCheck(fileName); 593 594 FILE* stream; 595 if( (stream = fopen (tmpName, "w")) == NULL) 596 { 597 PRINTF(1)("could not open %s fro writing\n", fileName); 598 return false; 599 } 600 fclose(stream); 601 602 delete tmpName; 603 } 604 605 /** 606 \brief deletes a File from disk 607 \param fileName the File to delete 608 */ 609 bool ResourceManager::deleteFile(const char* fileName) 610 { 611 char* tmpName = ResourceManager::homeDirCheck(fileName); 612 unlink(tmpName); 613 delete tmpName; 614 } 615 616 /** 617 \param fileName the Name of the file to check 618 \returns The name of the file, including the HomeDir 619 IMPORTANT: this has to be deleted from the outside 620 */ 621 char* ResourceManager::homeDirCheck(const char* name) 622 { 623 char* retName; 624 if (!strncmp(name, "~/", 2)) 625 { 626 char tmpFileName[500]; 627 #ifdef __WIN32__ 628 strcpy(tmpFileName, getenv("USERPROFILE")); 629 #else 630 strcpy(tmpFileName, getenv("HOME")); 631 #endif 632 retName = new char[strlen(tmpFileName)+strlen(name)]; 633 sprintf(retName, "%s%s", tmpFileName, name+1); 634 } 635 else 636 { 637 retName = new char[strlen(name)+1]; 638 strcpy(retName, name); 639 } 640 return retName; 641 } 642 643 /** 644 \param fileName the Name of the File to check 645 \returns The full name of the file, including the DataDir, and NULL if the file does not exist 646 IMPORTANT: this has to be deleted from the outside 647 */ 648 char* ResourceManager::getFullName(const char* fileName) 649 { 650 char* retName = new char[strlen(ResourceManager::getInstance()->getDataDir()) + strlen(fileName)+1]; 651 sprintf(retName, "%s%s", ResourceManager::getInstance()->getDataDir(), fileName); 652 if (ResourceManager::isFile(retName)) 653 return retName; 654 else 655 { 656 delete retName; 657 return NULL; 658 } 659 } 660 545 661 546 662 /** -
orxonox/branches/physics/src/util/resource_manager.h
r3953 r4178 18 18 19 19 //! An eumerator for different fileTypes the resourceManager supports \todo WAV, MP3, OGG support 20 enum ResourceType {OBJ, PRIM, WAV, MP3, OGG, TTF, IMAGE}; 20 enum ResourceType {OBJ, 21 PRIM, 22 WAV, 23 MP3, 24 OGG, 25 TTF, 26 IMAGE}; 21 27 //! An enumerator for different UNLOAD-types. 22 28 /** … … 26 32 RP_GAME: will be unloaded at the end of the whole Game (when closing orxonox) 27 33 */ 28 enum ResourcePriority {RP_NO = 0, RP_LEVEL = 1, RP_CAMPAIGN = 2, RP_GAME = 3}; 34 enum ResourcePriority {RP_NO = 0, 35 RP_LEVEL = 1, 36 RP_CAMPAIGN = 2, 37 RP_GAME = 3}; 29 38 30 39 //! A Struct that keeps track about A resource its name its Type, and so on … … 65 74 66 75 bool setDataDir(const char* dataDir); 76 /** \returns the Name of the data directory */ 77 inline const char* getDataDir(void) const {return this->dataDir;} 78 79 bool checkDataDir(const char* fileInside); 67 80 bool addImageDir(char* imageDir); 68 81 void* load(const char* fileName, ResourcePriority prio = RP_NO, … … 73 86 bool unload(Resource* resource, ResourcePriority = RP_NO); 74 87 bool unloadAllByPriority(ResourcePriority prio); 88 75 89 void debug(void); 90 91 // utility functions of this class 92 static bool isDir(const char* directory); 93 static bool isFile(const char* fileName); 94 static bool touchFile(const char* fileName); 95 static bool deleteFile(const char* fileName); 96 static char* homeDirCheck(const char* fileName); 97 static char* getFullName(const char* fileName); 76 98 77 99 private: … … 87 109 Resource* locateResourceByPointer(const void* pointer); 88 110 89 bool isDir(const char* directory);90 bool isFile(const char* directory);91 92 111 }; 93 112 -
orxonox/branches/physics/src/world_entities/camera.cc
r3953 r4178 139 139 if (tmpFovy > .001) 140 140 this->fovy += (this->toFovy - this->fovy) * dt; 141 Vector tmpPos = (this->toRelCoor - *this->getRelCoor()) * dt;141 Vector tmpPos = (this->toRelCoor - this->getRelCoor()) * dt; 142 142 if (tmpPos.len() >= .001) 143 143 { 144 tmpPos = tmpPos + *this->getRelCoor();144 tmpPos = tmpPos + this->getRelCoor(); 145 145 this->setRelCoor(tmpPos); 146 146 } -
orxonox/branches/physics/src/world_entities/environment.cc
r3739 r4178 30 30 { 31 31 this->model = (Model*) ResourceManager::getInstance()->load("cube", RP_LEVEL); 32 // this->model = new OBJModel("../data/models/fighter.obj");33 32 } 34 33 … … 50 49 void Environment::draw () 51 50 { 51 //this->getRelCoor().debug(); 52 52 53 glMatrixMode(GL_MODELVIEW); 53 54 glPushMatrix(); -
orxonox/branches/physics/src/world_entities/player.cc
r3953 r4178 1 2 3 1 /* 4 2 orxonox - the future of 3D-vertical-scrollers … … 31 29 32 30 using namespace std; 31 32 CREATE_FACTORY(Player); 33 33 34 34 /** … … 52 52 //weapons: 53 53 this->weaponMan = new WeaponManager(); 54 Weapon* wpRight = new TestGun(this, Vector(-2.6, 0.1, 3.0), Quaternion(), 0);54 Weapon* wpRight = new TestGun(this, Vector(-2.6, 0.1, 3.0), Quaternion(), 0); 55 55 Weapon* wpLeft = new TestGun(this, Vector(-2.6, 0.1, -3.0), Quaternion(), 1); 56 56 57 this->weaponMan->addWeapon(wpRight, W_CONFIG0 );58 this->weaponMan->addWeapon(wpLeft, W_CONFIG1 );57 this->weaponMan->addWeapon(wpRight, W_CONFIG0, W_SLOT0); 58 this->weaponMan->addWeapon(wpLeft, W_CONFIG1, W_SLOT1); 59 59 this->weaponMan->addWeapon(wpRight, W_CONFIG2); 60 60 this->weaponMan->addWeapon(wpLeft, W_CONFIG2); … … 74 74 } 75 75 76 /** 77 \brief creates a new Player from Xml Data 78 \param root the xml element containing player data 79 80 \todo add more parameters to load 81 */ 82 Player::Player(TiXmlElement* root) : WorldEntity(root) 83 { 84 this->weapons = new tList<Weapon>(); 85 this->activeWeapon = NULL; 86 /* 87 this is the debug player - actualy we would have to make a new 88 class derivated from Player for each player. for now, we just use 89 the player.cc for debug also 90 */ 91 travelSpeed = 15.0; 92 velocity = new Vector(); 93 bUp = bDown = bLeft = bRight = bAscend = bDescend = false; 94 bFire = false; 95 this->bWeaponChange = false; 96 acceleration = 10.0; 97 //weapons: 98 this->weaponMan = new WeaponManager(); 99 Weapon* wpRight = new TestGun(this, Vector(-2.6, 0.1, 3.0), Quaternion(), 0); 100 Weapon* wpLeft = new TestGun(this, Vector(-2.6, 0.1, -3.0), Quaternion(), 1); 101 102 this->weaponMan->addWeapon(wpRight, W_CONFIG0, W_SLOT0); 103 this->weaponMan->addWeapon(wpLeft, W_CONFIG1, W_SLOT1); 104 this->weaponMan->addWeapon(wpRight, W_CONFIG2); 105 this->weaponMan->addWeapon(wpLeft, W_CONFIG2); 106 } 76 107 77 108 /** … … 188 219 //orthDirection = orthDirection.cross (direction); 189 220 190 if( this->bUp && this->getRelCoor() ->x < 20)221 if( this->bUp && this->getRelCoor().x < 20) 191 222 accel = accel+(direction*acceleration); 192 if( this->bDown && this->getRelCoor() ->x > -5)223 if( this->bDown && this->getRelCoor().x > -5) 193 224 accel = accel-(direction*acceleration); 194 if( this->bLeft && TrackManager::getInstance()->getWidth() > -this->getRelCoor() ->z*2)225 if( this->bLeft && TrackManager::getInstance()->getWidth() > -this->getRelCoor().z*2) 195 226 accel = accel - (orthDirection*acceleration); 196 if( this->bRight && TrackManager::getInstance()->getWidth() > this->getRelCoor() ->z*2)227 if( this->bRight && TrackManager::getInstance()->getWidth() > this->getRelCoor().z*2) 197 228 accel = accel + (orthDirection*acceleration); 198 229 if( this->bAscend ) … … 230 261 { 231 262 PRINTF(3)("recieved command [%s]\n", cmd->cmd); 232 if( !strcmp( cmd->cmd, "up")) this->bUp = !cmd->bUp;233 if( !strcmp( cmd->cmd, "down")) this->bDown = !cmd->bUp;234 if( !strcmp( cmd->cmd, "left")) this->bLeft = !cmd->bUp;235 if( !strcmp( cmd->cmd, "right")) this->bRight = !cmd->bUp;236 if( !strcmp( cmd->cmd, "fire")) this->bFire = !cmd->bUp;237 if( !strcmp( cmd->cmd, "mode")) if(cmd->bUp) this->bWeaponChange = !this->bWeaponChange;238 } 263 if( !strcmp( cmd->cmd, CONFIG_NAME_PLAYER_UP)) this->bUp = !cmd->bUp; 264 if( !strcmp( cmd->cmd, CONFIG_NAME_PLAYER_DOWN)) this->bDown = !cmd->bUp; 265 if( !strcmp( cmd->cmd, CONFIG_NAME_PLAYER_LEFT)) this->bLeft = !cmd->bUp; 266 if( !strcmp( cmd->cmd, CONFIG_NAME_PLAYER_RIGHT)) this->bRight = !cmd->bUp; 267 if( !strcmp( cmd->cmd, CONFIG_NAME_PLAYER_FIRE)) this->bFire = !cmd->bUp; 268 if( !strcmp( cmd->cmd, CONFIG_NAME_PLAYER_NEXT_WEAPON)) if(cmd->bUp) this->bWeaponChange = !this->bWeaponChange; 269 } -
orxonox/branches/physics/src/world_entities/player.h
r3953 r4178 22 22 public: 23 23 Player(); 24 Player(TiXmlElement* root); 24 25 virtual ~Player(); 25 26 -
orxonox/branches/physics/src/world_entities/skybox.cc
r3953 r4178 28 28 29 29 #include "skybox.h" 30 30 31 #include "stdincl.h" 32 #include "factory.h" 31 33 32 34 #include "material.h" … … 36 38 //#include "world_entity.h" 37 39 40 CREATE_FACTORY(SkyBox); 38 41 39 42 using namespace std; … … 45 48 SkyBox::SkyBox(char* fileName) 46 49 { 50 this->preInit(); 51 this->postInit(); 52 } 53 54 SkyBox::SkyBox(TiXmlElement* root) : WorldEntity(root) 55 { 56 this->preInit(); 57 58 const char* string; 59 60 // Model Loading 61 string = grabParameter( root, "materialset"); 62 if( string != NULL) 63 this->setTexture(string, "jpg"); 64 else 65 { 66 PRINTF(0)("SkyBox is missing a proper 'MaterialSet'\n"); 67 } 68 if( this->skyModel == NULL) 69 { 70 PRINTF(0)("SkyBox model '%s' could not be loaded\n", string); 71 } 72 this->postInit(); 73 } 74 75 void SkyBox::preInit(void) 76 { 47 77 this->setClassName("SkyBox"); 78 this->skyModel = NULL; 48 79 this->material = new Material*[6]; 49 for (int i = 0; i < 6; i++)80 for (int i = 0; i < 6; i++) 50 81 { 51 82 this->material[i] = new Material(); … … 56 87 } 57 88 this->setMode(PNODE_MOVEMENT); 58 89 } 90 91 void SkyBox::postInit(void) 92 { 59 93 this->setSize(1900.0); 94 this->rebuild(); 60 95 } 61 96 … … 66 101 SkyBox::~SkyBox() 67 102 { 68 PRINTF(5)("Deleting the SkyBox\n"); 69 103 PRINTF(5)("Deleting SkyBox\n"); 70 104 for (int i = 0; i < 6; i++) 71 105 delete this->material[i]; … … 84 118 void SkyBox::setTexture(const char* name, const char* extension) 85 119 { 86 char* top = new char[strlen(name)+strlen(extension)+ 6];87 char* bottom = new char[strlen(name)+strlen(extension)+ 9];88 char* left = new char[strlen(name)+strlen(extension)+ 7];89 char* right = new char[strlen(name)+strlen(extension)+ 8];90 char* front = new char[strlen(name)+strlen(extension)+ 8];91 char* back = new char[strlen(name)+strlen(extension)+ 7];120 char* top = new char[strlen(name)+strlen(extension)+ 10]; 121 char* bottom = new char[strlen(name)+strlen(extension)+ 10]; 122 char* left = new char[strlen(name)+strlen(extension)+ 10]; 123 char* right = new char[strlen(name)+strlen(extension)+ 10]; 124 char* front = new char[strlen(name)+strlen(extension)+ 10]; 125 char* back = new char[strlen(name)+strlen(extension)+ 10]; 92 126 93 127 sprintf(top, "%s_top.%s", name, extension); … … 100 134 this->setTextures(top, bottom, left, right, front, back); 101 135 136 // deleted alocated memory of this function 102 137 delete []top; 103 138 delete []bottom; … … 125 160 this->material[4]->setDiffuseMap(front); 126 161 this->material[5]->setDiffuseMap(back); 127 128 this->rebuild();129 162 } 130 163 … … 135 168 { 136 169 this->size = size; 137 138 this->rebuild();139 170 } 140 171 … … 149 180 glTranslatef(r.x, r.y, r.z); 150 181 151 this-> model->draw();182 this->skyModel->draw(); 152 183 153 184 glPopMatrix(); … … 162 193 void SkyBox::rebuild() 163 194 { 164 if (this-> model)165 delete model;166 model = new Model();167 168 model->addVertex (-0.5*size, -0.5*size, 0.5*size);169 model->addVertex (0.5*size, -0.5*size, 0.5*size);170 model->addVertex (-0.5*size, 0.5*size, 0.5*size);171 model->addVertex (0.5*size, 0.5*size, 0.5*size);172 model->addVertex (-0.5*size, 0.5*size, -0.5*size);173 model->addVertex (0.5*size, 0.5*size, -0.5*size);174 model->addVertex (-0.5*size, -0.5*size, -0.5*size);175 model->addVertex (0.5*size, -0.5*size, -0.5*size);176 177 model->addVertexTexture (0.0, 0.0);178 model->addVertexTexture (1.0, 0.0);179 model->addVertexTexture (1.0, 1.0);180 model->addVertexTexture (0.0, 1.0);181 182 model->addVertexNormal (0.0, 0.0, 1.0);183 model->addVertexNormal (0.0, 1.0, 0.0);184 model->addVertexNormal (0.0, 0.0, -1.0);185 model->addVertexNormal (0.0, -1.0, 0.0);186 model->addVertexNormal (1.0, 0.0, 0.0);187 model->addVertexNormal (-1.0, 0.0, 0.0);188 189 model->setMaterial(material[0]);190 model->addFace (4, VERTEX_TEXCOORD_NORMAL, 3,2,4, 4,3,4, 6,4,4, 5,1,4); // top191 model->setMaterial(material[1]);192 model->addFace (4, VERTEX_TEXCOORD_NORMAL, 7,4,2, 8,1,2, 2,2,2, 1,3,2); // bottom193 model->setMaterial(material[2]);194 model->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,1,3, 2,2,3, 4,3,3, 3,4,3); // left195 model->setMaterial(material[3]);196 model->addFace (4, VERTEX_TEXCOORD_NORMAL, 5,3,1, 6,4,1, 8,1,1, 7,2,1); // right197 model->setMaterial(material[4]);198 model->addFace (4, VERTEX_TEXCOORD_NORMAL, 2,1,6, 8,2,6, 6,3,6, 4,4,6); // front199 model->setMaterial(material[5]);200 model->addFace (4, VERTEX_TEXCOORD_NORMAL, 7,1,5, 1,2,5, 3,3,5, 5,4,5); // back195 if (this->skyModel) 196 delete skyModel; 197 skyModel = new Model(); 198 199 this->skyModel->addVertex (-0.5*size, -0.5*size, 0.5*size); 200 this->skyModel->addVertex (0.5*size, -0.5*size, 0.5*size); 201 this->skyModel->addVertex (-0.5*size, 0.5*size, 0.5*size); 202 this->skyModel->addVertex (0.5*size, 0.5*size, 0.5*size); 203 this->skyModel->addVertex (-0.5*size, 0.5*size, -0.5*size); 204 this->skyModel->addVertex (0.5*size, 0.5*size, -0.5*size); 205 this->skyModel->addVertex (-0.5*size, -0.5*size, -0.5*size); 206 this->skyModel->addVertex (0.5*size, -0.5*size, -0.5*size); 207 208 this->skyModel->addVertexTexture (0.0, 0.0); 209 this->skyModel->addVertexTexture (1.0, 0.0); 210 this->skyModel->addVertexTexture (1.0, 1.0); 211 this->skyModel->addVertexTexture (0.0, 1.0); 212 213 this->skyModel->addVertexNormal (0.0, 0.0, 1.0); 214 this->skyModel->addVertexNormal (0.0, 1.0, 0.0); 215 this->skyModel->addVertexNormal (0.0, 0.0, -1.0); 216 this->skyModel->addVertexNormal (0.0, -1.0, 0.0); 217 this->skyModel->addVertexNormal (1.0, 0.0, 0.0); 218 this->skyModel->addVertexNormal (-1.0, 0.0, 0.0); 219 220 this->skyModel->setMaterial(material[0]); 221 this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 2,1,3, 3,2,3, 5,3,3, 4,0,3); // top 222 this->skyModel->setMaterial(material[1]); 223 this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,3,1, 7,0,1, 1,1,1, 0,2,1); // bottom 224 this->skyModel->setMaterial(material[2]); 225 this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 0,0,2, 1,1,2, 3,2,2, 2,3,2); // left 226 this->skyModel->setMaterial(material[3]); 227 this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 4,2,0, 5,3,0, 7,0,0, 6,1,0); // right 228 this->skyModel->setMaterial(material[4]); 229 this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,0,5, 7,1,5, 5,2,5, 3,3,6); // front 230 this->skyModel->setMaterial(material[5]); 231 this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,0,4, 0,1,4, 2,2,4, 4,3,4); // back 201 232 202 model->finalize();203 } 233 this->skyModel->finalize(); 234 } -
orxonox/branches/physics/src/world_entities/skybox.h
r3807 r4178 22 22 public: 23 23 SkyBox(char* fileName = NULL); 24 SkyBox(TiXmlElement* root); 25 24 26 virtual ~SkyBox(); 27 28 void preInit(void); 29 void postInit(void); 30 25 31 26 32 void setSize(float size); … … 33 39 void rebuild(); 34 40 41 Model* skyModel; //!< A Model for the Sky. This must not be the same as the Model from WorldEntity, because it is not alocated through the ResourceManager. 35 42 Material **material; //!< Materials for the SkyBox. sorted by number (0-5) top, bottom, left, right, front, back 36 43 float size; //!< Size of the SkyBox. This should match the frustum maximum range. -
orxonox/branches/physics/src/world_entities/skysphere.cc
r3763 r4178 44 44 { 45 45 if (fileName == NULL) 46 this->initialize(" ../data/pictures/sky-replace.jpg");46 this->initialize("pictures/sky-replace.jpg"); 47 47 else 48 48 this->initialize(fileName); -
orxonox/branches/physics/src/world_entities/terrain.cc
r3677 r4178 77 77 void Terrain::init(void) 78 78 { 79 80 81 79 this->setClassName ("Terrain"); 80 81 this->objectList = 0; 82 82 } 83 83 … … 98 98 glMultMatrixf((float*)matrix); 99 99 100 if (objectList) 101 glCallList(objectList); 102 else if (model) 103 model->draw(); 104 // this->model->draw(); 100 if (this->objectList) 101 glCallList(this->objectList); 102 else if (this->model) 103 this->model->draw(); 105 104 glPopMatrix(); 106 105 } -
orxonox/branches/physics/src/world_entities/test_gun.cc
r3953 r4178 49 49 this->objectComponent1 = new PNode(); 50 50 this->animation1 = new Animation3D(this->objectComponent1); 51 parent->addChild(this->objectComponent1, PNODE_ALL); 51 this->animation2 = new Animation3D(this); 52 this->animation3 = new Animation3D(this); 53 //parent->addChild(this->objectComponent1, PNODE_ALL); 54 this->addChild(this->objectComponent1, PNODE_ALL); 52 55 53 56 this->animation1->setInfinity(ANIM_INF_CONSTANT); 54 // ANIM_LINEAR was ANIM_NEG_EXP 57 this->animation2->setInfinity(ANIM_INF_CONSTANT); 58 this->animation3->setInfinity(ANIM_INF_CONSTANT); 55 59 if( this->leftRight == W_LEFT) 56 60 { 57 61 this->projectileOffset = Vector(1.0, 0.0, -0.35); 58 62 59 this->animation1->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR); 60 this->animation1->addKeyFrame(Vector(-3.0, 0.1, 3.0), Quaternion(), 0.5, ANIM_LINEAR); 61 this->animation1->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR); 63 this->animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 64 this->animation1->addKeyFrame(Vector(-0.4, 0, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 65 this->animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.0, ANIM_LINEAR, ANIM_CONSTANT); 66 67 this->animation2->addKeyFrame(Vector(-2.6, 0.1, 2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 68 this->animation2->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 69 70 this->animation3->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 71 this->animation3->addKeyFrame(Vector(-2.6, 0.1, 2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 62 72 } 63 73 else if( this->leftRight == W_RIGHT) … … 65 75 this->projectileOffset = Vector(1.0, 0.0, 0.5); 66 76 67 this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_LINEAR); 68 this->animation1->addKeyFrame(Vector(-3.0, 0.1, -2.5), Quaternion(), 0.5, ANIM_LINEAR); 69 this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_LINEAR); 77 this->objectComponent1->setRelCoor(Vector(0,0,0.35)); 78 this->animation1->addKeyFrame(Vector(0, 0, .5), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 79 this->animation1->addKeyFrame(Vector(-0.4, 0, .5), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 80 this->animation1->addKeyFrame(Vector(0, 0, .5), Quaternion(), 0.0, ANIM_LINEAR, ANIM_CONSTANT); 81 82 this->animation2->addKeyFrame(Vector(-2.6, 0.1, -2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 83 this->animation2->addKeyFrame(Vector(-2.6, 0.1, -3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 84 85 this->animation3->addKeyFrame(Vector(-2.6, 0.1, -3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 86 this->animation3->addKeyFrame(Vector(-2.6, 0.1, -2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 70 87 } 88 71 89 } 72 90 … … 89 107 */ 90 108 void TestGun::activate() 91 {} 109 { 110 this->animation2->replay(); 111 } 92 112 93 113 … … 100 120 */ 101 121 void TestGun::deactivate() 102 {} 122 { 123 this->animation3->replay(); 124 } 103 125 104 126 -
orxonox/branches/physics/src/world_entities/weapon.cc
r3953 r4178 110 110 void WeaponManager::nextWeaponConf() 111 111 { 112 PRINTF(4)("Changing weapon configuration: from %i\n", this->currConfID); 113 114 Weapon* w; 115 for(int i = 0; i < W_MAX_SLOTS; ++i) 116 { 117 w = this->configs[this->currConfID].slots[i]; 118 if( w != NULL) w->deactivate(); 119 } 120 int i; 112 PRINTF(4)("Changing weapon configuration: from %i to next\n", this->currConfID); 113 114 int i, lastConfID; 115 lastConfID = this->currConfID; 121 116 for(i = this->currConfID + 1; i < W_MAX_CONFIGS && !this->configs[i].bUsed; ++i); 122 117 if( i == W_MAX_CONFIGS) this->currConfID = W_CONFIG0; 123 118 else this->currConfID = i; 124 PRINTF(4)("\tto %i\n", this->currConfID); 125 126 for(int i = 0; i < W_MAX_SLOTS; ++i) 127 { 128 w = this->configs[this->currConfID].slots[i]; 129 if( w != NULL) w->activate(); 119 120 121 Weapon *w1, *w2; 122 for(int j = 0; j < W_MAX_SLOTS; ++j) 123 { 124 w1 = this->configs[lastConfID].slots[j]; 125 w2 = this->configs[this->currConfID].slots[j]; 126 127 if( w1 == w2) 128 { 129 printf("no need for change\n"); 130 } 131 else 132 { 133 if( w1 != NULL ) 134 { 135 w1->deactivate(); 136 printf("deactivating %i,%i\n", j,lastConfID); 137 } 138 if( w2 != NULL) 139 { 140 w2->activate(); 141 printf("activating %i,%i\n", j, this->currConfID); 142 } 143 } 130 144 } 131 145 } -
orxonox/branches/physics/src/world_entities/world_entity.cc
r3832 r4178 30 30 /** 31 31 \brief standard constructor 32 33 Every derived contructor HAS to call the previous one supplying the isFree parameter. This is necessary to distunguish 34 between free and bound entities. The difference between them is simply the fact that the movement of a free entity is 35 not bound to the track of a world. Use this to implement projectile or effect classes that do not have to travel along the track. 36 To specify an entity to be free or bound set the default parameter in the declaration of the constructor. 37 Theoretically you should never have to call the constructor of an Entity directly, for it is called by the spawn() function of the World 38 class. So if you want to create a new entity at any time, call World::spawn(). It will handle everything that is necessary. 39 */ 40 WorldEntity::WorldEntity (bool isFree) : bFree(isFree) 32 */ 33 WorldEntity::WorldEntity () 41 34 { 42 35 this->setClassName ("WorldEntity"); … … 47 40 48 41 /** 42 \brief Loads the WordEntity-specific Part of any derived Class 43 */ 44 WorldEntity::WorldEntity(TiXmlElement* root) 45 { 46 // Name Setup 47 char* temp; 48 const char* string; 49 string = grabParameter( root, "name"); 50 if( string == NULL) 51 { 52 PRINTF(2)("WorldEntity is missing a proper 'name'\n"); 53 string = "Unknown"; 54 temp = new char[strlen(string + 2)]; 55 strcpy( temp, string); 56 this->setName( temp); 57 } 58 else 59 { 60 temp = new char[strlen(string + 2)]; 61 strcpy( temp, string); 62 this->setName( temp); 63 } 64 // Model Loading 65 this->model = NULL; 66 string = grabParameter( root, "model"); 67 if( string != NULL) 68 this->model = (Model*)ResourceManager::getInstance()->load(string, OBJ, RP_CAMPAIGN); 69 else 70 { 71 PRINTF(2)("WorldEntity is missing a proper 'model'\n"); 72 this->model = NULL; 73 } 74 if( this->model == NULL) 75 { 76 PRINTF(2)("WorldEntity model '%s' could not be loaded\n", string); 77 } 78 this->bDraw = true; 79 } 80 81 /** 49 82 \brief standard destructor 50 83 */ … … 73 106 {} 74 107 75 76 /**77 \brief query whether the WorldEntity in question is free78 \return true if the WorldEntity is free or false if it isn't79 */80 bool WorldEntity::isFree ()81 {82 return bFree;83 }84 108 85 109 /** -
orxonox/branches/physics/src/world_entities/world_entity.h
r3799 r4178 23 23 24 24 public: 25 WorldEntity (bool isFree = false); 25 WorldEntity (void); 26 WorldEntity(TiXmlElement* root); 26 27 virtual ~WorldEntity (); 27 28 … … 32 33 //void removeAbility(Ability* ability); 33 34 void setDrawable (bool bDraw); 34 bool isFree ();35 35 void setCharacterAttributes(CharacterAttributes* charAttr); 36 36 CharacterAttributes* getCharacterAttributes(); … … 52 52 53 53 private: 54 const bool bFree; //!< If the entity is free.55 54 bool bCollide; //!< If it should be considered for the collisiontest. 56 55 bool bDraw; //!< If it should be visible.
Note: See TracChangeset
for help on using the changeset viewer.