- Timestamp:
- May 2, 2005, 3:14:57 PM (20 years ago)
- Location:
- orxonox/trunk
- Files:
-
- 18 edited
- 11 copied
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/aclocal.m4
r3099 r4010 1 # generated automatically by aclocal 1.8. 5-*- Autoconf -*-1 # generated automatically by aclocal 1.8.2 -*- Autoconf -*- 2 2 3 3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 … … 41 41 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 42 42 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 43 [AM_AUTOMAKE_VERSION([1.8. 5])])43 [AM_AUTOMAKE_VERSION([1.8.2])]) 44 44 45 45 # AM_AUX_DIR_EXPAND … … 150 150 fi])]) 151 151 152 # serial 7-*- Autoconf -*-152 # serial 6 -*- Autoconf -*- 153 153 154 154 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 … … 237 237 for i in 1 2 3 4 5 6; do 238 238 echo '#include "conftst'$i'.h"' >> sub/conftest.c 239 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 240 # Solaris 8's {/usr,}/bin/sh. 241 touch sub/conftst$i.h 239 : > sub/conftst$i.h 242 240 done 243 241 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf … … 267 265 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 268 266 # icc doesn't choke on unknown options, it will just issue warnings 269 # or remarks (even with -Werror). So we grep stderr for any message 270 # that says an option was ignored or not supported. 271 # When given -MP, icc 7.0 and 7.1 complain thusly: 272 # icc: Command line warning: ignoring option '-M'; no argument required 273 # The diagnosis changed in icc 8.0: 274 # icc: Command line remark: option '-MP' not supported 275 if (grep 'ignoring option' conftest.err || 276 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 267 # (even with -Werror). So we grep stderr for any message 268 # that says an option was ignored. 269 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else 277 270 am_cv_$1_dependencies_compiler_type=$depmode 278 271 break … … 320 313 # Generate code to set up dependency tracking. -*- Autoconf -*- 321 314 322 # Copyright (C) 1999, 2000, 2001, 2002, 2003 , 2004Free Software Foundation, Inc.315 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 323 316 324 317 # This program is free software; you can redistribute it and/or modify … … 359 352 # Extract the definition of DEP_FILES from the Makefile without 360 353 # running `make'. 361 DEPDIR=`sed -n 's/^DEPDIR =//p' < "$mf"`354 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` 362 355 test -z "$DEPDIR" && continue 363 356 # When using ansi2knr, U may be empty or an underscore; expand it 364 U=`sed -n 's/^U =//p' < "$mf"`357 U=`sed -n -e '/^U = / s///p' < "$mf"` 365 358 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 366 359 # We invoke sed twice because it is the simplest approach to 367 360 # changing $(DEPDIR) to its actual value in the expansion. 368 for file in `sed -n '361 for file in `sed -n -e ' 369 362 /^DEP_FILES = .*\\\\$/ { 370 363 s/^DEP_FILES = // … … 725 718 # Do not use -m 0755 and let people choose whatever they expect by 726 719 # setting umask. 727 #728 # We cannot accept any implementation of `mkdir' that recognizes `-p'.729 # Some implementations (such as Solaris 8's) are not thread-safe: if a730 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'731 # concurrently, both version can detect that a/ is missing, but only732 # one can create it and the other will error out. Consequently we733 # restrict ourselves to GNU make (using the --version option ensures734 # this.)735 720 AC_DEFUN([AM_PROG_MKDIR_P], 736 [if mkdir -p -- version . >/dev/null 2>&1 && test ! -d ./--version; then721 [if mkdir -p -- . 2>/dev/null; then 737 722 # Keeping the `.' argument allows $(mkdir_p) to be used without 738 723 # argument. Indeed, we sometimes output rules like … … 747 732 # directories to create, and then abort because `.' already 748 733 # exists. 749 for d in ./-p ./-- version;734 for d in ./-p ./--; 750 735 do 751 736 test -d $d && rmdir $d -
orxonox/trunk/configure
r3995 r4010 1604 1604 fi 1605 1605 1606 if mkdir -p -- version . >/dev/null 2>&1 && test ! -d ./--version; then1606 if mkdir -p -- . 2>/dev/null; then 1607 1607 # Keeping the `.' argument allows $(mkdir_p) to be used without 1608 1608 # argument. Indeed, we sometimes output rules like … … 1617 1617 # directories to create, and then abort because `.' already 1618 1618 # exists. 1619 for d in ./-p ./-- version;1619 for d in ./-p ./--; 1620 1620 do 1621 1621 test -d $d && rmdir $d … … 2523 2523 for i in 1 2 3 4 5 6; do 2524 2524 echo '#include "conftst'$i'.h"' >> sub/conftest.c 2525 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 2526 # Solaris 8's {/usr,}/bin/sh. 2527 touch sub/conftst$i.h 2525 : > sub/conftst$i.h 2528 2526 done 2529 2527 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf … … 2553 2551 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2554 2552 # icc doesn't choke on unknown options, it will just issue warnings 2555 # or remarks (even with -Werror). So we grep stderr for any message 2556 # that says an option was ignored or not supported. 2557 # When given -MP, icc 7.0 and 7.1 complain thusly: 2558 # icc: Command line warning: ignoring option '-M'; no argument required 2559 # The diagnosis changed in icc 8.0: 2560 # icc: Command line remark: option '-MP' not supported 2561 if (grep 'ignoring option' conftest.err || 2562 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2553 # (even with -Werror). So we grep stderr for any message 2554 # that says an option was ignored. 2555 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else 2563 2556 am_cv_CXX_dependencies_compiler_type=$depmode 2564 2557 break … … 3361 3354 for i in 1 2 3 4 5 6; do 3362 3355 echo '#include "conftst'$i'.h"' >> sub/conftest.c 3363 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 3364 # Solaris 8's {/usr,}/bin/sh. 3365 touch sub/conftst$i.h 3356 : > sub/conftst$i.h 3366 3357 done 3367 3358 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf … … 3391 3382 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 3392 3383 # icc doesn't choke on unknown options, it will just issue warnings 3393 # or remarks (even with -Werror). So we grep stderr for any message 3394 # that says an option was ignored or not supported. 3395 # When given -MP, icc 7.0 and 7.1 complain thusly: 3396 # icc: Command line warning: ignoring option '-M'; no argument required 3397 # The diagnosis changed in icc 8.0: 3398 # icc: Command line remark: option '-MP' not supported 3399 if (grep 'ignoring option' conftest.err || 3400 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 3384 # (even with -Werror). So we grep stderr for any message 3385 # that says an option was ignored. 3386 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else 3401 3387 am_cv_CC_dependencies_compiler_type=$depmode 3402 3388 break … … 9539 9525 # Extract the definition of DEP_FILES from the Makefile without 9540 9526 # running `make'. 9541 DEPDIR=`sed -n 's/^DEPDIR =//p' < "$mf"`9527 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` 9542 9528 test -z "$DEPDIR" && continue 9543 9529 # When using ansi2knr, U may be empty or an underscore; expand it 9544 U=`sed -n 's/^U =//p' < "$mf"`9530 U=`sed -n -e '/^U = / s///p' < "$mf"` 9545 9531 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 9546 9532 # We invoke sed twice because it is the simplest approach to 9547 9533 # changing $(DEPDIR) to its actual value in the expansion. 9548 for file in `sed -n '9534 for file in `sed -n -e ' 9549 9535 /^DEP_FILES = .*\\\\$/ { 9550 9536 s/^DEP_FILES = // -
orxonox/trunk/src/Makefile.am
r3966 r4010 37 37 track_manager.cc \ 38 38 track_node.cc \ 39 factory.cc \ 39 40 util/animation/animation.cc \ 40 41 util/animation/animation3d.cc \ … … 80 81 lib/math/vector.cc \ 81 82 lib/math/curve.cc \ 82 glmenu/glmenu_imagescreen.cc 83 glmenu/glmenu_imagescreen.cc \ 84 lib/xmlparser/tinyxml.cc \ 85 lib/xmlparser/tinystr.cc \ 86 lib/xmlparser/tinyxmlerror.cc \ 87 lib/xmlparser/tinyxmlparser.cc 88 83 89 84 90 noinst_HEADERS = orxonox.h \ -
orxonox/trunk/src/Makefile.in
r3966 r4010 55 55 am_orxonox_OBJECTS = orxonox.$(OBJEXT) game_loader.$(OBJEXT) \ 56 56 command_node.$(OBJEXT) keynames.$(OBJEXT) camera.$(OBJEXT) \ 57 track_manager.$(OBJEXT) track_node.$(OBJEXT) \57 track_manager.$(OBJEXT) track_node.$(OBJEXT) factory.$(OBJEXT) \ 58 58 animation.$(OBJEXT) animation3d.$(OBJEXT) \ 59 59 animation_player.$(OBJEXT) garbage_collector.$(OBJEXT) \ … … 72 72 base_entity.$(OBJEXT) base_object.$(OBJEXT) \ 73 73 ini_parser.$(OBJEXT) list.$(OBJEXT) resource_manager.$(OBJEXT) \ 74 vector.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT) 74 vector.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT) \ 75 tinyxml.$(OBJEXT) tinystr.$(OBJEXT) tinyxmlerror.$(OBJEXT) \ 76 tinyxmlparser.$(OBJEXT) 75 77 orxonox_OBJECTS = $(am_orxonox_OBJECTS) 76 78 orxonox_LDADD = $(LDADD) … … 87 89 @AMDEP_TRUE@ ./$(DEPDIR)/command_node.Po ./$(DEPDIR)/curve.Po \ 88 90 @AMDEP_TRUE@ ./$(DEPDIR)/data_tank.Po \ 89 @AMDEP_TRUE@ ./$(DEPDIR)/environment.Po \91 @AMDEP_TRUE@ ./$(DEPDIR)/environment.Po ./$(DEPDIR)/factory.Po \ 90 92 @AMDEP_TRUE@ ./$(DEPDIR)/game_loader.Po \ 91 93 @AMDEP_TRUE@ ./$(DEPDIR)/garbage_collector.Po \ … … 110 112 @AMDEP_TRUE@ ./$(DEPDIR)/test_bullet.Po ./$(DEPDIR)/test_gun.Po \ 111 113 @AMDEP_TRUE@ ./$(DEPDIR)/text_engine.Po ./$(DEPDIR)/texture.Po \ 114 @AMDEP_TRUE@ ./$(DEPDIR)/tinystr.Po ./$(DEPDIR)/tinyxml.Po \ 115 @AMDEP_TRUE@ ./$(DEPDIR)/tinyxmlerror.Po \ 116 @AMDEP_TRUE@ ./$(DEPDIR)/tinyxmlparser.Po \ 112 117 @AMDEP_TRUE@ ./$(DEPDIR)/track_manager.Po \ 113 118 @AMDEP_TRUE@ ./$(DEPDIR)/track_node.Po ./$(DEPDIR)/vector.Po \ … … 251 256 track_manager.cc \ 252 257 track_node.cc \ 258 factory.cc \ 253 259 util/animation/animation.cc \ 254 260 util/animation/animation3d.cc \ … … 294 300 lib/math/vector.cc \ 295 301 lib/math/curve.cc \ 296 glmenu/glmenu_imagescreen.cc 302 glmenu/glmenu_imagescreen.cc \ 303 lib/xmlparser/tinyxml.cc \ 304 lib/xmlparser/tinystr.cc \ 305 lib/xmlparser/tinyxmlerror.cc \ 306 lib/xmlparser/tinyxmlparser.cc 297 307 298 308 noinst_HEADERS = orxonox.h \ … … 450 460 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data_tank.Po@am__quote@ 451 461 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/environment.Po@am__quote@ 462 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/factory.Po@am__quote@ 452 463 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/game_loader.Po@am__quote@ 453 464 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/garbage_collector.Po@am__quote@ … … 481 492 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text_engine.Po@am__quote@ 482 493 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@ 494 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinystr.Po@am__quote@ 495 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinyxml.Po@am__quote@ 496 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinyxmlerror.Po@am__quote@ 497 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tinyxmlparser.Po@am__quote@ 483 498 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track_manager.Po@am__quote@ 484 499 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track_node.Po@am__quote@ … … 1207 1222 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1208 1223 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o glmenu_imagescreen.obj `if test -f 'glmenu/glmenu_imagescreen.cc'; then $(CYGPATH_W) 'glmenu/glmenu_imagescreen.cc'; else $(CYGPATH_W) '$(srcdir)/glmenu/glmenu_imagescreen.cc'; fi` 1224 1225 tinyxml.o: lib/xmlparser/tinyxml.cc 1226 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tinyxml.o -MD -MP -MF "$(DEPDIR)/tinyxml.Tpo" -c -o tinyxml.o `test -f 'lib/xmlparser/tinyxml.cc' || echo '$(srcdir)/'`lib/xmlparser/tinyxml.cc; \ 1227 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/tinyxml.Tpo" "$(DEPDIR)/tinyxml.Po"; else rm -f "$(DEPDIR)/tinyxml.Tpo"; exit 1; fi 1228 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lib/xmlparser/tinyxml.cc' object='tinyxml.o' libtool=no @AMDEPBACKSLASH@ 1229 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/tinyxml.Po' tmpdepfile='$(DEPDIR)/tinyxml.TPo' @AMDEPBACKSLASH@ 1230 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1231 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tinyxml.o `test -f 'lib/xmlparser/tinyxml.cc' || echo '$(srcdir)/'`lib/xmlparser/tinyxml.cc 1232 1233 tinyxml.obj: lib/xmlparser/tinyxml.cc 1234 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tinyxml.obj -MD -MP -MF "$(DEPDIR)/tinyxml.Tpo" -c -o tinyxml.obj `if test -f 'lib/xmlparser/tinyxml.cc'; then $(CYGPATH_W) 'lib/xmlparser/tinyxml.cc'; else $(CYGPATH_W) '$(srcdir)/lib/xmlparser/tinyxml.cc'; fi`; \ 1235 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/tinyxml.Tpo" "$(DEPDIR)/tinyxml.Po"; else rm -f "$(DEPDIR)/tinyxml.Tpo"; exit 1; fi 1236 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lib/xmlparser/tinyxml.cc' object='tinyxml.obj' libtool=no @AMDEPBACKSLASH@ 1237 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/tinyxml.Po' tmpdepfile='$(DEPDIR)/tinyxml.TPo' @AMDEPBACKSLASH@ 1238 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1239 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tinyxml.obj `if test -f 'lib/xmlparser/tinyxml.cc'; then $(CYGPATH_W) 'lib/xmlparser/tinyxml.cc'; else $(CYGPATH_W) '$(srcdir)/lib/xmlparser/tinyxml.cc'; fi` 1240 1241 tinystr.o: lib/xmlparser/tinystr.cc 1242 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tinystr.o -MD -MP -MF "$(DEPDIR)/tinystr.Tpo" -c -o tinystr.o `test -f 'lib/xmlparser/tinystr.cc' || echo '$(srcdir)/'`lib/xmlparser/tinystr.cc; \ 1243 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/tinystr.Tpo" "$(DEPDIR)/tinystr.Po"; else rm -f "$(DEPDIR)/tinystr.Tpo"; exit 1; fi 1244 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lib/xmlparser/tinystr.cc' object='tinystr.o' libtool=no @AMDEPBACKSLASH@ 1245 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/tinystr.Po' tmpdepfile='$(DEPDIR)/tinystr.TPo' @AMDEPBACKSLASH@ 1246 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1247 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tinystr.o `test -f 'lib/xmlparser/tinystr.cc' || echo '$(srcdir)/'`lib/xmlparser/tinystr.cc 1248 1249 tinystr.obj: lib/xmlparser/tinystr.cc 1250 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tinystr.obj -MD -MP -MF "$(DEPDIR)/tinystr.Tpo" -c -o tinystr.obj `if test -f 'lib/xmlparser/tinystr.cc'; then $(CYGPATH_W) 'lib/xmlparser/tinystr.cc'; else $(CYGPATH_W) '$(srcdir)/lib/xmlparser/tinystr.cc'; fi`; \ 1251 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/tinystr.Tpo" "$(DEPDIR)/tinystr.Po"; else rm -f "$(DEPDIR)/tinystr.Tpo"; exit 1; fi 1252 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lib/xmlparser/tinystr.cc' object='tinystr.obj' libtool=no @AMDEPBACKSLASH@ 1253 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/tinystr.Po' tmpdepfile='$(DEPDIR)/tinystr.TPo' @AMDEPBACKSLASH@ 1254 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1255 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tinystr.obj `if test -f 'lib/xmlparser/tinystr.cc'; then $(CYGPATH_W) 'lib/xmlparser/tinystr.cc'; else $(CYGPATH_W) '$(srcdir)/lib/xmlparser/tinystr.cc'; fi` 1256 1257 tinyxmlerror.o: lib/xmlparser/tinyxmlerror.cc 1258 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tinyxmlerror.o -MD -MP -MF "$(DEPDIR)/tinyxmlerror.Tpo" -c -o tinyxmlerror.o `test -f 'lib/xmlparser/tinyxmlerror.cc' || echo '$(srcdir)/'`lib/xmlparser/tinyxmlerror.cc; \ 1259 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/tinyxmlerror.Tpo" "$(DEPDIR)/tinyxmlerror.Po"; else rm -f "$(DEPDIR)/tinyxmlerror.Tpo"; exit 1; fi 1260 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lib/xmlparser/tinyxmlerror.cc' object='tinyxmlerror.o' libtool=no @AMDEPBACKSLASH@ 1261 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/tinyxmlerror.Po' tmpdepfile='$(DEPDIR)/tinyxmlerror.TPo' @AMDEPBACKSLASH@ 1262 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1263 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tinyxmlerror.o `test -f 'lib/xmlparser/tinyxmlerror.cc' || echo '$(srcdir)/'`lib/xmlparser/tinyxmlerror.cc 1264 1265 tinyxmlerror.obj: lib/xmlparser/tinyxmlerror.cc 1266 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tinyxmlerror.obj -MD -MP -MF "$(DEPDIR)/tinyxmlerror.Tpo" -c -o tinyxmlerror.obj `if test -f 'lib/xmlparser/tinyxmlerror.cc'; then $(CYGPATH_W) 'lib/xmlparser/tinyxmlerror.cc'; else $(CYGPATH_W) '$(srcdir)/lib/xmlparser/tinyxmlerror.cc'; fi`; \ 1267 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/tinyxmlerror.Tpo" "$(DEPDIR)/tinyxmlerror.Po"; else rm -f "$(DEPDIR)/tinyxmlerror.Tpo"; exit 1; fi 1268 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lib/xmlparser/tinyxmlerror.cc' object='tinyxmlerror.obj' libtool=no @AMDEPBACKSLASH@ 1269 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/tinyxmlerror.Po' tmpdepfile='$(DEPDIR)/tinyxmlerror.TPo' @AMDEPBACKSLASH@ 1270 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1271 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tinyxmlerror.obj `if test -f 'lib/xmlparser/tinyxmlerror.cc'; then $(CYGPATH_W) 'lib/xmlparser/tinyxmlerror.cc'; else $(CYGPATH_W) '$(srcdir)/lib/xmlparser/tinyxmlerror.cc'; fi` 1272 1273 tinyxmlparser.o: lib/xmlparser/tinyxmlparser.cc 1274 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tinyxmlparser.o -MD -MP -MF "$(DEPDIR)/tinyxmlparser.Tpo" -c -o tinyxmlparser.o `test -f 'lib/xmlparser/tinyxmlparser.cc' || echo '$(srcdir)/'`lib/xmlparser/tinyxmlparser.cc; \ 1275 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/tinyxmlparser.Tpo" "$(DEPDIR)/tinyxmlparser.Po"; else rm -f "$(DEPDIR)/tinyxmlparser.Tpo"; exit 1; fi 1276 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lib/xmlparser/tinyxmlparser.cc' object='tinyxmlparser.o' libtool=no @AMDEPBACKSLASH@ 1277 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/tinyxmlparser.Po' tmpdepfile='$(DEPDIR)/tinyxmlparser.TPo' @AMDEPBACKSLASH@ 1278 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1279 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tinyxmlparser.o `test -f 'lib/xmlparser/tinyxmlparser.cc' || echo '$(srcdir)/'`lib/xmlparser/tinyxmlparser.cc 1280 1281 tinyxmlparser.obj: lib/xmlparser/tinyxmlparser.cc 1282 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tinyxmlparser.obj -MD -MP -MF "$(DEPDIR)/tinyxmlparser.Tpo" -c -o tinyxmlparser.obj `if test -f 'lib/xmlparser/tinyxmlparser.cc'; then $(CYGPATH_W) 'lib/xmlparser/tinyxmlparser.cc'; else $(CYGPATH_W) '$(srcdir)/lib/xmlparser/tinyxmlparser.cc'; fi`; \ 1283 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/tinyxmlparser.Tpo" "$(DEPDIR)/tinyxmlparser.Po"; else rm -f "$(DEPDIR)/tinyxmlparser.Tpo"; exit 1; fi 1284 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lib/xmlparser/tinyxmlparser.cc' object='tinyxmlparser.obj' libtool=no @AMDEPBACKSLASH@ 1285 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/tinyxmlparser.Po' tmpdepfile='$(DEPDIR)/tinyxmlparser.TPo' @AMDEPBACKSLASH@ 1286 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1287 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tinyxmlparser.obj `if test -f 'lib/xmlparser/tinyxmlparser.cc'; then $(CYGPATH_W) 'lib/xmlparser/tinyxmlparser.cc'; else $(CYGPATH_W) '$(srcdir)/lib/xmlparser/tinyxmlparser.cc'; fi` 1209 1288 uninstall-info-am: 1210 1289 -
orxonox/trunk/src/defs/stdincl.h
r3863 r4010 27 27 28 28 #include "compiler.h" 29 #include "xmlparser/tinyxml.h" 30 #include "factory.h" 29 31 30 32 #endif /* _STDINCL_H */ -
orxonox/trunk/src/game_loader.cc
r3727 r4010 25 25 #include "command_node.h" 26 26 #include "vector.h" 27 #include "factory.h" 27 28 28 29 #include <string.h> … … 164 165 can load everything it needs into memory then. 165 166 */ 167 168 if( name == NULL) 169 { 170 PRINTF0("No filename specified for loading"); 171 return NULL; 172 } 173 174 TiXmlDocument* XMLDoc = new TiXmlDocument( name); 175 // load the campaign document 176 if( !XMLDoc->LoadFile()) 177 { 178 // report an error 179 PRINTF0("Error loading XML File: %s @ %d:%d\n", XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol()); 180 delete XMLDoc; 181 return NULL; 182 } 183 184 // check basic validity 185 TiXmlElement* root = XMLDoc->RootElement(); 186 assert( root != NULL); 187 188 if( strcmp( root->Value(), "Campaign")) 189 { 190 // report an error 191 PRINTF(0)("Specified XML File is not an orxonox campaign file (Campaign element missing)\n"); 192 delete XMLDoc; 193 return NULL; 194 } 195 196 // construct campaign 197 Campaign* c = new Campaign( root); 198 199 // free the XML data 200 delete XMLDoc; 201 202 return c; 166 203 } 167 204 … … 230 267 this->currentCampaign->previousLevel(); 231 268 } 269 270 /** 271 \brief add a Factory to the Factory Q 272 \param factory a Factory to be registered 273 */ 274 void GameLoader::registerFactory( Factory* factory) 275 { 276 assert( factory != NULL); 277 278 PRINTF0("Registered factory for '%s'\n", factory->getClassname()); 279 280 if( first == NULL) first = factory; 281 else first->registerFactory( factory); 282 } 283 284 /** 285 \brief load a StoryEntity 286 \param element a XMLElement containing all the needed info 287 */ 288 BaseObject* GameLoader::fabricate( TiXmlElement* element) 289 { 290 assert( element != NULL); 291 292 if( first == NULL) 293 { 294 PRINTF0("GameLoader does not know any factories, fabricate() failed\n"); 295 return NULL; 296 } 297 298 if( element->Value() != NULL) 299 { 300 PRINTF0("Attempting fabrication of a '%s'\n", element->Value()); 301 BaseObject* b = first->fabricate( element); 302 if( b == NULL) PRINTF0("Failed to fabricate a '%s'\n", element->Value()); 303 else PRINTF0("Successfully fabricated a '%s'\n", element->Value()); 304 return b; 305 } 306 307 PRINTF0("Fabricate failed, TiXmlElement did not contain a value\n"); 308 309 return NULL; 310 } -
orxonox/trunk/src/game_loader.h
r3629 r4010 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 (); … … 62 66 Campaign* fileToCampaign(char* name); 63 67 68 Factory* first; 64 69 }; 65 70 -
orxonox/trunk/src/orxonox.cc
r4009 r4010 34 34 #include "resource_manager.h" 35 35 #include "text_engine.h" 36 #include "factory.h" 36 37 37 38 #include <string.h> … … 200 201 201 202 this->gameLoader = GameLoader::getInstance(); 202 this->gameLoader->loadDebugCampaign(DEBUG_CAMPAIGN_0); 203 this->gameLoader->loadCampaign("../data/worlds/DefaultCampaign.oxc"); 204 // this->gameLoader->loadDebugCampaign(DEBUG_CAMPAIGN_0); 203 205 this->gameLoader->init(); 204 206 this->gameLoader->start(); … … 346 348 #include "player.h" 347 349 #include "base_object.h" 350 348 351 #include <asm/msr.h> 349 352 #include <linux/timex.h> -
orxonox/trunk/src/story_entities/campaign.cc
r3832 r4010 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 PRINTF0("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 PRINTF0("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 PRINTF0("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/trunk/src/story_entities/campaign.h
r3608 r4010 14 14 public: 15 15 Campaign (); 16 Campaign ( TiXmlElement* root); 16 17 virtual ~Campaign (); 17 18 -
orxonox/trunk/src/story_entities/world.cc
r3993 r4010 1 1 2 2 3 /* … … 43 44 #include "glmenu_imagescreen.h" 44 45 #include "list.h" 46 #include "game_loader.h" 45 47 46 48 #include "animation3d.h" 47 49 50 #include "substring.h" 48 51 49 52 using namespace std; 50 51 53 52 54 WorldInterface* WorldInterface::singletonRef = 0; … … 114 116 } 115 117 116 118 CREATE_FACTORY(World); 119 120 World::World( TiXmlElement* root) 121 { 122 this->constuctorInit("", -1); 123 124 const char *string; 125 char *name; 126 int id; 127 128 PRINTF0("Creating a World\n"); 129 130 // identifier 131 string = grabParameter( root, "identifier"); 132 if( string == NULL || sscanf(string, "%d", &id) != 1) 133 { 134 PRINTF0("World is missing a proper 'identifier'\n"); 135 this->setStoryID( -1); 136 } 137 else setStoryID( id); 138 139 // next id 140 string = grabParameter( root, "nextid"); 141 if( string == NULL || sscanf(string, "%d", &id) != 1) 142 { 143 PRINTF0("World is missing a proper 'nextid'\n"); 144 this->setStoryID( -1); 145 } 146 else setNextStoryID( id); 147 148 149 // path 150 string = grabParameter( root, "path"); 151 if( string == NULL) 152 { 153 PRINTF0("World is missing a proper 'path'\n"); 154 this->setPath( NULL); 155 } 156 else 157 { 158 name = new char[strlen(string + 2)]; 159 strcpy( name, string); 160 this->setPath( name); 161 } 162 } 117 163 118 164 /** … … 123 169 World::World (char* name) 124 170 { 125 this-> init(name, -1);171 this->constuctorInit(name, -1); 126 172 //NullParent* np = NullParent::getInstance(); 127 173 } … … 133 179 World::World (int worldID) 134 180 { 135 this-> init(NULL, worldID);181 this->constuctorInit(NULL, worldID); 136 182 } 137 183 … … 178 224 NO LEVEL LOADING HERE - NEVER! 179 225 */ 180 void World:: init(char* name, int worldID)226 void World::constuctorInit(char* name, int worldID) 181 227 { 182 228 this->setClassName ("World"); 183 229 184 this->worldName = name; 230 //this->worldName = name; 231 //this->worldName = new char[strlen(name)+1]; 232 //strcpy(this->worldName, name); 185 233 this->debugWorldNr = worldID; 186 234 this->entities = new tList<WorldEntity>(); 187 AnimationPlayer::getInstance(); // initializes the animationPlayer188 235 } 189 236 … … 201 248 wi->init(this); 202 249 this->garbageCollector = GarbageCollector::getInstance(); 250 203 251 this->trackManager = TrackManager::getInstance(); 204 252 this->lightMan = LightManager::getInstance(); … … 206 254 this->nullParent->setName ("NullParent"); 207 255 256 AnimationPlayer::getInstance(); // initializes the animationPlayer 257 208 258 } 209 259 … … 213 263 */ 214 264 ErrorMessage World::load() 215 { 216 // BezierCurve* tmpCurve = new BezierCurve(); 217 if(this->debugWorldNr != -1) 218 { 219 // initializing Font 220 this->glmis->step(); 265 { 266 PRINTF0("> Loading world: '%s'\n", getPath()); 267 268 GameLoader* loader = GameLoader::getInstance(); 269 270 if( getPath() == NULL) 271 { 272 PRINTF0("World has no path specified for loading"); 273 return (ErrorMessage){213,"Path not specified","World::load()"}; 274 } 275 276 TiXmlDocument* XMLDoc = new TiXmlDocument( path); 277 // load the campaign document 278 if( !XMLDoc->LoadFile()) 279 //this->glmis->step(); 280 281 { 282 // report an error 283 PRINTF0("Error 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 PRINTF0("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 PRINTF0("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 320 // find WorldEntities 321 TiXmlElement* element = root->FirstChildElement( "WorldEntities"); 322 323 if( element == NULL) 324 { 325 PRINTF0("World is missing 'WorldEntities'\n"); 326 } 327 else 328 { 329 element = element->FirstChildElement(); 330 // load Players/Objects/Whatever 331 PRINTF0("Loading WorldEntities\n"); 332 while( element != NULL) 333 { 334 WorldEntity* created = (WorldEntity*) loader->fabricate( element); 335 if( created != NULL) this->spawn( created); 336 // if we load a 'Player' we use it as localPlayer 337 //todo do this more elegant 338 if( element->Value() != NULL && !strcmp( element->Value(), "Player")) localPlayer = (Player*) created; 339 if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox")) skyBox = (SkyBox*) created; 340 element = element->NextSiblingElement(); 341 } 342 PRINTF0("Done loading WorldEntities\n"); 343 } 344 345 // find Track 346 /*element = root->FirstChildElement( "Track"); 347 if( element == NULL) 348 { 349 PRINTF0("============>>>>>>>>>>>>>>>>>World is missing a 'Track'\n"); 350 } 351 else 352 { 353 //load track 354 PRINTF0("============>>>>>>>>>>>>>>>>Loading Track\n"); 355 356 trackManager->loadTrack( element); 357 trackManager->finalize(); 358 PRINTF0("============>>>>>>>>>>>>>>>>Done loading Track\n"); 359 }*/ 360 361 // free the XML data 362 delete XMLDoc; 363 364 // finalize world 365 // initialize Font 366 // testFont = new FontSet(); 367 // testFont->buildFont("../data/pictures/font.tga"); 368 369 // create null parent 370 this->nullParent = NullParent::getInstance (); 371 this->nullParent->setName ("NullParent"); 372 373 // finalize myPlayer 374 if( localPlayer == NULL) 375 { 376 PRINTF0("No Player specified in World '%s'\n", this->worldName); 377 return (ErrorMessage){213,"No Player defined","World::load()"}; 378 } 379 380 // bind input 381 Orxonox *orx = Orxonox::getInstance (); 382 orx->getLocalInput()->bind (localPlayer); 383 384 // bind camera 385 this->localCamera = new Camera(); 386 this->localCamera->setName ("camera"); 387 //this->localCamera->bind (localPlayer); 388 this->localPlayer->addChild (this->localCamera); 389 390 391 // stuff beyond this point remains to be loaded properly 392 221 393 // initializing the TrackManager 222 394 this->trackManager = TrackManager::getInstance(); 223 395 //trackManager->addPoint(Vector(0,0,0)); 224 396 trackManager->addPoint(Vector(150, -35, 5)); … … 278 450 279 451 280 /*monitor progress*/ 281 this->glmis->step(); 282 283 // LIGHT initialisation 284 285 lightMan->setAmbientColor(.1,.1,.1); 286 lightMan->addLight(); 287 // lightMan->setAttenuation(1.0, .01, 0.0); 288 // lightMan->setDiffuseColor(1,1,1); 289 // lightMan->addLight(1); 290 // lightMan->setPosition(20, 10, -20); 291 // lightMan->setDiffuseColor(0,0,0); 292 lightMan->debug(); 293 294 switch(this->debugWorldNr) 295 { 296 /* 297 this loads the hard-coded debug world. this only for simplicity and will be 298 removed by a reald world-loader, which interprets a world-file. 299 if you want to add an own debug world, just add a case DEBUG_WORLD_[nr] and 300 make whatever you want... 301 */ 302 case DEBUG_WORLD_0: 303 { 304 lightMan->setPosition(-5.0, 10.0, -40.0); 305 306 // !\todo old track-system has to be removed 307 308 //create helper for player 309 //HelperParent* hp = new HelperParent (); 310 /* the player has to be added to this helper */ 311 312 // create a player 313 this->localPlayer = new Player (); 314 this->localPlayer->setName ("player"); 315 this->spawn (this->localPlayer); 316 /*monitor progress*/ 317 //this->glmis->step(); 318 this->glmis->step(); 319 320 // bind input 321 Orxonox *orx = Orxonox::getInstance (); 322 orx->getLocalInput()->bind (this->localPlayer); 452 // LIGHT initialisation 453 lightMan = LightManager::getInstance(); 454 lightMan->setAmbientColor(.1,.1,.1); 455 lightMan->addLight(); 456 // lightMan->setAttenuation(1.0, .01, 0.0); 457 // lightMan->setDiffuseColor(1,1,1); 458 // lightMan->addLight(1); 459 // lightMan->setPosition(20, 10, -20); 460 // lightMan->setDiffuseColor(0,0,0); 461 lightMan->debug(); 462 lightMan->setPosition(-5.0, 10.0, -40.0); 463 464 // trackManager->setBindSlave(env); 465 PNode* tn = trackManager->getTrackNode(); 466 tn->addChild(this->localPlayer); 467 468 //localCamera->setParent(TrackNode::getInstance()); 469 tn->addChild(this->localCamera); 470 localCamera->lookAt(tn); 471 this->localPlayer->setMode(PNODE_ALL); 472 Vector* cameraOffset = new Vector (0, 5, -10); 473 trackManager->condition(2, LEFTRIGHT, this->localPlayer); 474 475 476 // initialize debug coord system 477 objectList = glGenLists(1); 478 glNewList (objectList, GL_COMPILE); 479 480 // trackManager->drawGraph(.01); 481 trackManager->debug(2); 482 glEndList(); 483 484 terrain = new Terrain("../data/worlds/newGround.obj"); 485 terrain->setRelCoor(Vector(0,-10,0)); 486 this->spawn(terrain); 487 488 } 489 490 void World::loadDebugWorld(int worldID) 491 { 492 /*monitor progress*/ 493 this->glmis->step(); 494 495 // LIGHT initialisation 496 497 lightMan->setAmbientColor(.1,.1,.1); 498 lightMan->addLight(); 499 // lightMan->setAttenuation(1.0, .01, 0.0); 500 // lightMan->setDiffuseColor(1,1,1); 501 // lightMan->addLight(1); 502 // lightMan->setPosition(20, 10, -20); 503 // lightMan->setDiffuseColor(0,0,0); 504 lightMan->debug(); 505 506 switch(this->debugWorldNr) 507 { 508 /* 509 this loads the hard-coded debug world. this only for simplicity and will be 510 removed by a reald world-loader, which interprets a world-file. 511 if you want to add an own debug world, just add a case DEBUG_WORLD_[nr] and 512 make whatever you want... 513 */ 514 case DEBUG_WORLD_0: 515 { 516 lightMan->setPosition(-5.0, 10.0, -40.0); 517 518 // !\todo old track-system has to be removed 519 520 //create helper for player 521 //HelperParent* hp = new HelperParent (); 522 /* the player has to be added to this helper */ 523 524 // create a player 525 this->localPlayer = new Player (); 526 this->localPlayer->setName ("player"); 527 this->spawn (this->localPlayer); 528 /*monitor progress*/ 529 //this->glmis->step(); 530 this->glmis->step(); 531 532 // bind input 533 Orxonox *orx = Orxonox::getInstance (); 534 orx->getLocalInput()->bind (this->localPlayer); 323 535 324 325 326 536 // bind camera 537 this->localCamera = new Camera(); 538 this->localCamera->setName ("camera"); 327 539 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 540 /*monitor progress*/ 541 this->glmis->step(); 542 543 // Create SkySphere 544 // this->skySphere = new Skysphere("../data/pictures/sky-replace.jpg"); 545 // this->skySphere->setName("SkySphere"); 546 // this->localCamera->addChild(this->skySphere); 547 // this->spawn(this->skySphere); 548 skyBox = new SkyBox(); 549 skyBox->setTexture("pictures/sky/skybox", "jpg"); 550 skyBox->setParent(localCamera); 551 this->spawn(skyBox); 552 553 /*monitor progress*/ 554 this->glmis->step(); 343 555 344 556 345 346 347 557 WorldEntity* env = new Environment(); 558 env->setName ("env"); 559 this->spawn(env); 348 560 349 561 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 384 385 386 387 562 /* 563 Vector* es = new Vector (10, 5, 0); 564 Quaternion* qs = new Quaternion (); 565 WorldEntity* pr = new Primitive(P_CYLINDER); 566 pr->setName("primitive"); 567 this->spawn(pr, this->localPlayer, es, qs, PNODE_MOVEMENT); 568 */ 569 570 /*monitor progress*/ 571 this->glmis->step(); 572 573 // trackManager->setBindSlave(env); 574 PNode* tn = trackManager->getTrackNode(); 575 tn->addChild(this->localPlayer); 576 this->localCamera->lookAt(tn); 577 578 //localCamera->setParent(TrackNode::getInstance()); 579 tn->addChild(this->localCamera); 580 // localCamera->lookAt(tn); 581 this->localPlayer->setMode(PNODE_ALL); 582 //Vector* cameraOffset = new Vector (0, 5, -10); 583 trackManager->condition(2, LEFTRIGHT, this->localPlayer); 584 this->glmis->step(); 585 break; 586 } 587 case DEBUG_WORLD_1: 588 { 589 lightMan->setPosition(.0, .0, .0); 590 lightMan->setAttenuation(1.0, .01, 0.0); 591 lightMan->setSpecularColor(1,0,0); 592 this->nullParent = NullParent::getInstance (); 593 this->nullParent->setName ("NullParent"); 594 595 // create a player 596 WorldEntity* myPlayer = new Player(); 597 myPlayer->setName ("player"); 598 this->spawn(myPlayer); 599 this->localPlayer = myPlayer; 388 600 389 390 391 601 // bind input 602 Orxonox *orx = Orxonox::getInstance(); 603 orx->getLocalInput()->bind (myPlayer); 392 604 393 394 395 396 397 398 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 430 431 432 433 605 // bind camera 606 this->localCamera = new Camera (); 607 this->localCamera->setName ("camera"); 608 this->localCamera->lookAt(LightManager::getInstance()->getLight(0)); 609 this->localCamera->setParent(this->localPlayer); 610 611 // Create SkySphere 612 skySphere = new Skysphere("../data/pictures/sky-replace.jpg"); 613 this->localPlayer->addChild(this->skySphere); 614 this->spawn(this->skySphere); 615 Vector* es = new Vector (20, 0, 0); 616 Quaternion* qs = new Quaternion (); 617 618 lightMan->getLight(0)->setParent(trackManager->getTrackNode()); 619 break; 620 } 621 case DEBUG_WORLD_2: 622 { 623 lightMan->setAmbientColor(.1,.1,.1); 624 lightMan->addLight(); 625 lightMan->setPosition(-5.0, 10.0, -40.0); 626 this->nullParent = NullParent::getInstance (); 627 this->nullParent->setName ("NullParent"); 628 629 // !\todo old track-system has to be removed 630 631 //create helper for player 632 //HelperParent* hp = new HelperParent (); 633 /* the player has to be added to this helper */ 634 635 // create a player 636 this->localPlayer = new Player (); 637 this->localPlayer->setName ("player"); 638 this->spawn (this->localPlayer); 639 /*monitor progress*/ 640 //this->glmis->step(); 641 this->glmis->step(); 642 643 // bind input 644 Orxonox *orx = Orxonox::getInstance (); 645 orx->getLocalInput()->bind (this->localPlayer); 434 646 435 436 437 438 439 647 // bind camera 648 this->localCamera = new Camera(); 649 this->localCamera->setName ("camera"); 650 this->localCamera->lookAt(this->localPlayer); 651 this->localCamera->setParent(this->localPlayer); 440 652 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 653 /*monitor progress*/ 654 this->glmis->step(); 655 656 // Create SkySphere 657 this->skySphere = new Skysphere("../data/pictures/sky-replace.jpg"); 658 this->skySphere->setName("SkySphere"); 659 this->spawn(this->skySphere); 660 this->localCamera->addChild(this->skySphere); 661 this->skySphere->setMode(PNODE_MOVEMENT); 662 /*monitor progress*/ 663 this->glmis->step(); 664 665 666 WorldEntity* baseNode = new Satellite(Vector(1,0,1), 1.2); 667 this->localPlayer->addChild(baseNode); 668 baseNode->setRelCoor(Vector(10.0, 2.0, 1.0)); 669 this->spawn(baseNode); 670 671 WorldEntity* secondNode = new Satellite(Vector(0,0,1), 2.0); 672 baseNode->addChild(secondNode); 673 secondNode->setRelCoor(Vector(0.0, 0.0, 3.0)); 674 this->spawn(secondNode); 675 676 677 WorldEntity* thirdNode = new Satellite(Vector(0,0,1), 1.0); 678 secondNode->addChild(thirdNode); 679 thirdNode->setRelCoor(Vector(2.0, 0.0, 0.0)); 680 this->spawn(thirdNode); 469 681 470 682 471 683 472 473 474 475 684 WorldEntity* c = new Environment(); 685 this->localPlayer->addChild(c); 686 c->setRelCoor(Vector(10.0, 2.0, -1.0)); 687 this->spawn(c); 476 688 477 689 478 690 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 691 Animation3D* animation = new Animation3D(c); 692 animation->setInfinity(ANIM_INF_REPLAY); 693 694 695 animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_NEG_EXP, ANIM_LINEAR); 696 animation->addKeyFrame(Vector(0, 2, 0), Quaternion(M_PI, Vector(0,1,0)), 1.0, ANIM_NEG_EXP, ANIM_LINEAR); 697 animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_NEG_EXP, ANIM_LINEAR); 698 699 700 701 702 703 704 /* 705 KeyFrame* f1 = new KeyFrame; 706 f1->position = new Vector(-1.1, 0.0, 2.6); 707 f1->direction = new Quaternion(); 708 f1->time = 1.0; 709 f1->mode = NEG_EXP; 498 710 499 711 500 501 502 503 504 712 KeyFrame* f2 = new KeyFrame; 713 f2->position = new Vector(-2.1, 0.0, 2.6); 714 f2->direction = new Quaternion(); 715 f2->time = 0.1; 716 f2->mode = NEG_EXP; 505 717 506 507 508 509 510 718 KeyFrame* f3 = new KeyFrame; 719 f3->position = new Vector(10.0, 2.0, -1.0); 720 f3->direction = new Quaternion(); 721 f3->time = 0.2; 722 f3->mode = NEG_EXP; 511 723 512 513 514 515 516 724 KeyFrame* f4 = new KeyFrame; 725 f4->position = new Vector(10.0, 5.0, -1.0); 726 f4->direction = new Quaternion(); 727 f4->time = 1.0; 728 f4->mode = NEG_EXP; 517 729 518 730 519 731 520 this->simpleAnimation->animatorBegin(); 521 this->simpleAnimation->selectObject(b); 522 this->simpleAnimation->setAnimationMode(SINGLE); 523 this->simpleAnimation->addKeyFrame(f1); 524 this->simpleAnimation->addKeyFrame(f2); 525 this->simpleAnimation->start(); 526 this->simpleAnimation->selectObject(c); 527 this->simpleAnimation->addKeyFrame(f3); 528 this->simpleAnimation->addKeyFrame(f4); 529 this->simpleAnimation->start(); 530 this->simpleAnimation->animatorEnd(); 531 */ 532 533 /* 534 Vector* es = new Vector (10, 5, 0); 535 Quaternion* qs = new Quaternion (); 536 WorldEntity* pr = new Primitive(P_CYLINDER); 537 pr->setName("primitive"); 538 this->spawn(pr, this->localPlayer, es, qs, PNODE_MOVEMENT); 539 */ 540 541 /*monitor progress*/ 542 this->glmis->step(); 543 544 // trackManager->setBindSlave(env); 545 PNode* tn = trackManager->getTrackNode(); 546 tn->addChild(this->localPlayer); 547 548 //localCamera->setParent(TrackNode::getInstance()); 549 tn->addChild(this->localCamera); 550 // localCamera->lookAt(tn); 551 this->localPlayer->setMode(PNODE_ALL); 552 //Vector* cameraOffset = new Vector (0, 5, -10); 553 trackManager->condition(2, LEFTRIGHT, this->localPlayer); 554 this->glmis->step(); 555 556 break; 557 } 558 default: 559 printf("World::load() - no world with ID %i found", this->debugWorldNr ); 560 } 561 } 562 else if(this->worldName != NULL) 563 { 564 565 } 566 567 // initialize debug coord system 568 objectList = glGenLists(1); 569 glNewList (objectList, GL_COMPILE); 570 571 // trackManager->drawGraph(.01); 572 trackManager->debug(2); 573 glEndList(); 574 575 terrain = new Terrain("../data/worlds/newGround.obj"); 576 terrain->setRelCoor(Vector(0,-10,0)); 577 this->spawn(terrain); 578 579 } 732 this->simpleAnimation->animatorBegin(); 733 this->simpleAnimation->selectObject(b); 734 this->simpleAnimation->setAnimationMode(SINGLE); 735 this->simpleAnimation->addKeyFrame(f1); 736 this->simpleAnimation->addKeyFrame(f2); 737 this->simpleAnimation->start(); 738 this->simpleAnimation->selectObject(c); 739 this->simpleAnimation->addKeyFrame(f3); 740 this->simpleAnimation->addKeyFrame(f4); 741 this->simpleAnimation->start(); 742 this->simpleAnimation->animatorEnd(); 743 */ 744 745 /* 746 Vector* es = new Vector (10, 5, 0); 747 Quaternion* qs = new Quaternion (); 748 WorldEntity* pr = new Primitive(P_CYLINDER); 749 pr->setName("primitive"); 750 this->spawn(pr, this->localPlayer, es, qs, PNODE_MOVEMENT); 751 */ 752 753 /*monitor progress*/ 754 this->glmis->step(); 755 756 // trackManager->setBindSlave(env); 757 PNode* tn = trackManager->getTrackNode(); 758 tn->addChild(this->localPlayer); 759 760 //localCamera->setParent(TrackNode::getInstance()); 761 tn->addChild(this->localCamera); 762 // localCamera->lookAt(tn); 763 this->localPlayer->setMode(PNODE_ALL); 764 //Vector* cameraOffset = new Vector (0, 5, -10); 765 trackManager->condition(2, LEFTRIGHT, this->localPlayer); 766 this->glmis->step(); 767 768 break; 769 } 770 default: 771 printf("World::load() - no world with ID %i found", this->debugWorldNr ); 772 } 773 } 774 580 775 581 776 … … 852 1047 this->tick (); 853 1048 // Update the state 854 this->update (); 1049 this->update (); 855 1050 // Process collision 856 1051 this->collide (); … … 935 1130 } 936 1131 delete iterator; 937 //skySphere->updatePosition(localCamera->absCoordinate); 938 1132 939 1133 /* update tick the rest */ 940 1134 this->trackManager->tick(this->dt); … … 1055 1249 } 1056 1250 1251 void World::setPath( const char* name) 1252 { 1253 this->path = new char[strlen(name)+1]; 1254 strcpy(this->path, name); 1255 } 1256 1257 const char* World::getPath( void) 1258 { 1259 return path; 1260 } -
orxonox/trunk/src/story_entities/world.h
r3851 r4010 11 11 #include "story_entity.h" 12 12 #include "p_node.h" 13 13 #include "xmlparser/tinyxml.h" 14 14 15 15 class World; … … 57 57 World (char* name); 58 58 World (int worldID); 59 World (TiXmlElement* root); 59 60 virtual ~World (); 60 61 … … 70 71 virtual ErrorMessage resume (); 71 72 virtual ErrorMessage destroy (); 73 74 void loadDebugWorld(int worldID); 72 75 73 76 virtual void displayLoadScreen(); … … 85 88 int parentingMode); 86 89 90 const char* getPath(); 91 void setPath( const char* name); 87 92 88 93 private: 89 void init(char* name, int worldID);94 void constuctorInit(char* name, int worldID); 90 95 91 96 Uint32 lastFrame; //!< last time of frame … … 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. -
orxonox/trunk/src/world_entities/player.cc
r4000 r4010 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 /** … … 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 /* 85 char* temp; 86 const char* string; 87 string = grabParameter( root, "name"); 88 if( string == NULL) 89 { 90 PRINTF0("Player is missing a proper 'name'\n"); 91 string = "Unknown"; 92 temp = new char[strlen(string + 2)]; 93 strcpy( temp, string); 94 this->setName( temp); 95 } 96 else 97 { 98 temp = new char[strlen(string + 2)]; 99 strcpy( temp, string); 100 this->setName( temp); 101 } 102 103 this->model = NULL; 104 string = grabParameter( root, "model"); 105 if( string != NULL) 106 this->model = (Model*)ResourceManager::getInstance()->load(string, OBJ, RP_CAMPAIGN); 107 else 108 { 109 PRINTF0("Player is missing a proper 'model'\n"); 110 this->model = (Model*)ResourceManager::getInstance()->load("models/reaplow.obj", OBJ, RP_CAMPAIGN); 111 } 112 if( this->model == NULL) 113 { 114 PRINTF0("Player model '%s' could not be loaded\n", string); 115 } 116 */ 117 this->weapons = new tList<Weapon>(); 118 this->activeWeapon = NULL; 119 /* 120 this is the debug player - actualy we would have to make a new 121 class derivated from Player for each player. for now, we just use 122 the player.cc for debug also 123 */ 124 travelSpeed = 15.0; 125 velocity = new Vector(); 126 bUp = bDown = bLeft = bRight = bAscend = bDescend = false; 127 bFire = false; 128 this->bWeaponChange = false; 129 acceleration = 10.0; 130 //weapons: 131 this->weaponMan = new WeaponManager(); 132 Weapon* wpRight = new TestGun(this, Vector(-2.6, 0.1, 3.0), Quaternion(), 0); 133 Weapon* wpLeft = new TestGun(this, Vector(-2.6, 0.1, -3.0), Quaternion(), 1); 134 135 this->weaponMan->addWeapon(wpRight, W_CONFIG0, W_SLOT0); 136 this->weaponMan->addWeapon(wpLeft, W_CONFIG1, W_SLOT1); 137 this->weaponMan->addWeapon(wpRight, W_CONFIG2); 138 this->weaponMan->addWeapon(wpLeft, W_CONFIG2); 139 } 76 140 77 141 /** -
orxonox/trunk/src/world_entities/player.h
r3873 r4010 22 22 public: 23 23 Player(); 24 Player(TiXmlElement* root); 24 25 virtual ~Player(); 25 26 -
orxonox/trunk/src/world_entities/skybox.cc
r3913 r4010 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; … … 44 47 */ 45 48 SkyBox::SkyBox(char* fileName) 49 { 50 this->init(); 51 } 52 53 SkyBox::SkyBox(TiXmlElement* root) : WorldEntity(root) 54 { 55 this->init(); 56 57 // Name Setup 58 char* temp; 59 const char* string; 60 61 // Model Loading 62 this->model = NULL; 63 string = grabParameter( root, "materialset"); 64 if( string != NULL) 65 this->setTexture(string, "jpg"); 66 else 67 { 68 PRINTF(0)("SkyBox is missing a proper 'MaterialSet'\n"); 69 this->model = (Model*)ResourceManager::getInstance()->load("cube", OBJ, RP_CAMPAIGN); 70 } 71 if( this->model == NULL) 72 { 73 PRINTF(0)("SkyBox model '%s' could not be loaded\n", string); 74 } 75 } 76 77 void SkyBox::init(void) 46 78 { 47 79 this->setClassName("SkyBox"); -
orxonox/trunk/src/world_entities/skybox.h
r3807 r4010 22 22 public: 23 23 SkyBox(char* fileName = NULL); 24 SkyBox(TiXmlElement* root); 25 24 26 virtual ~SkyBox(); 27 28 void init(void); 25 29 26 30 void setSize(float size); -
orxonox/trunk/src/world_entities/world_entity.cc
r3832 r4010 38 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 39 */ 40 WorldEntity::WorldEntity ( bool isFree) : bFree(isFree)40 WorldEntity::WorldEntity () 41 41 { 42 42 this->setClassName ("WorldEntity"); … … 46 46 } 47 47 48 WorldEntity::WorldEntity(TiXmlElement* root) 49 { 50 // Name Setup 51 char* temp; 52 const char* string; 53 string = grabParameter( root, "name"); 54 if( string == NULL) 55 { 56 PRINTF(0)("WorldEntity is missing a proper 'name'\n"); 57 string = "Unknown"; 58 temp = new char[strlen(string + 2)]; 59 strcpy( temp, string); 60 this->setName( temp); 61 } 62 else 63 { 64 temp = new char[strlen(string + 2)]; 65 strcpy( temp, string); 66 this->setName( temp); 67 } 68 // Model Loading 69 this->model = NULL; 70 string = grabParameter( root, "model"); 71 if( string != NULL) 72 this->model = (Model*)ResourceManager::getInstance()->load(string, OBJ, RP_CAMPAIGN); 73 else 74 { 75 PRINTF(0)("WorldEntity is missing a proper 'model'\n"); 76 this->model = (Model*)ResourceManager::getInstance()->load("models/reaplow.obj", OBJ, RP_CAMPAIGN); 77 } 78 if( this->model == NULL) 79 { 80 PRINTF(0)("WorldEntity model '%s' could not be loaded\n", string); 81 } 82 83 this->bDraw = true; 84 } 85 48 86 /** 49 87 \brief standard destructor … … 73 111 {} 74 112 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 113 85 114 /** -
orxonox/trunk/src/world_entities/world_entity.h
r3799 r4010 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.