Changeset 3238 in orxonox.OLD for orxonox/branches/buerli
- Timestamp:
- Dec 20, 2004, 2:42:54 AM (20 years ago)
- Location:
- orxonox/branches/buerli
- Files:
-
- 3 deleted
- 55 edited
- 63 copied
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/buerli/CODING-STANDARDS
r1856 r3238 1 CODING-STANDARTS FOR ORXONOX 2 -==============--==---+++++- 3 In this file it is described how a orxonox-developer should structure his code. 4 Every developer has to read it and follow the rules, and orxonox will grow. 1 5 2 6 Contents: 7 --------- 8 1.Coding Conventions 9 2.How to format your Code 10 3.Example 3 11 4 12 1.Coding Conventions 5 2.How to format your Code 6 7 1.Coding Conventions 8 -------------------- 13 ==================== 9 14 ==> If you are beginning a new code-file: copy the proto_class.{cc,h} 10 15 ==> and work with these files. 11 16 12 a) in every code file, there has to be a GNU copyright header 13 b) under the (c) header write your name as main-programmer, if 14 you are just bugfixing or extending write it under co-programmer 15 c) Every function has a header with informations about it: 16 /** 17 \brief <a brief description> 18 \param <parameters the function needs> 19 \param <more parameters> 17 1.1.What has to be there: 18 ------------------------- 19 a) in every code file, there must be a GNU copyright header. 20 20 21 <more description> 22 */ 23 This makes live easier, if we want to add a documentation. 21 b) under the (c) header write your name as main-programmer, if 22 you are just bugfixing or extending write it under co-programmer. 23 24 c) Every element of the must be documented with doxygen-tags. 25 26 1.2.Doxygen Tags: 27 ----------------- 28 Doxygen tags in general are comments inside a file, that look just a bit different. 29 most of the time they extend the /* or // with a second star or a ! 30 31 a) h-files: 32 1) every h-file you want to be documented you have to tag. (tag looks like /*! \file somefile */ ) 33 2) every class has to be Documented. ( //! what it does) 34 3) special variables can be documented. ( //!< wow this member is cool because ) 35 36 b) cc-files: 37 1) all the methods must be documented, and all their parameters and return value must be covered. 38 39 c) look out for this: Doxygen parses preprocessor arguments, 40 so if some comments is excluded by a #ifdef, #endif 41 doxygen will not parse it. And ther will be nothing in the docu. 24 42 25 43 26 44 2.How to format your Code 27 ------------------------- 45 ========================= 28 46 We use the GNU conding convention (which is also used in xemacs etc.): 29 47 … … 51 69 52 70 71 72 73 3.Example 74 ========= 75 3.1.Header 76 ---------- 77 A standard header has the same name as the Class it handles. 78 79 someclass.h 80 ----------- 81 /*! 82 \file someclass.h 83 \brief Some short description of the someclass 84 \todo maybe there remains something to do in this entire file 85 86 Here comes a longer description 87 this can also be longer than one line 88 */ 89 90 #ifndef _SOMECLASS_H 91 #define _SOMECLASS_H 92 93 #include <many_headers> 94 #include "stdincl.h" 95 96 //! short description of the class 97 /** 98 \todo what remains to be done here 99 100 longer description 101 */ 102 class SomeClass 103 { 104 private: 105 int usefull_variable; 106 int cool_variable; //!< this variable is cool, because... 107 108 protected: 109 char* someOtherMember; 110 111 public: 112 SomeClass (void); 113 ~SomeClass (void); 114 115 int mightyFunction (char* name, int value); 116 //.... 117 }; 118 119 #endif /* _SOMECLASS_H */ 120 121 122 123 3.2.CC-Files 124 ------------ 125 CC-files must be named the same as the .h-files they belong to. 126 127 someclass.cc 128 ------------ 129 130 /* 131 orxonox - the future of 3D-vertical-scrollers 132 133 Copyright (C) 2004 orx 134 135 This program is free software; you can redistribute it and/or modify 136 it under the terms of the GNU General Public License as published by 137 the Free Software Foundation; either version 2, or (at your option) 138 any later version. 139 140 ### File Specific: 141 main-programmer: The Name of Myself 142 co-programmer: ... 143 */ 144 145 #include "someclass.h" 146 147 148 /** 149 \brief <a brief description> 150 \todo I think you get it. 151 152 <more description> 153 */ 154 SomeClass::SomeClass (void) 155 { 156 //constructor-stuff 157 } 158 159 /** 160 \brief <a brief description> 161 \todo if something is not destructed it will be here 162 163 <more description> 164 */ 165 ~SomeClass::~SomeClass (void) 166 { 167 //destroy all te allocated space of the Class 168 } 169 170 /** 171 \brief <a brief description> 172 \param name <what is this parameter for> 173 \param valuse <what for...> 174 \returns <what it returns> 175 176 <more description> 177 */ 178 int SomeClass::mightyFuncion (char* name, int value) 179 { 180 this->coolVariable = value; 181 // and so on..... 182 } 183 184 // ... -
orxonox/branches/buerli/Makefile.am
r1956 r3238 1 SUBDIRS = src console gui 1 AUTOMAKE_OPTIONS = foreign no-installman no-installinfo 2 3 SUBDIRS = src 4 5 EXTRA_DIST = CODING-STANDARDS \ 6 IDEAS \ 7 TASKS \ 8 doc/CREDITS \ 9 doc/doxyconf/build \ 10 doc/doxyconf/confopts \ 11 doc/doxyconf/input \ 12 doc/doxyconf/preprocessor \ 13 doc/doxyconf/progress \ 14 doc/doxyconf/project 15 16 ## doxygen stuff 17 if DOXYGEN 18 DOXYGEN_INPUT = "src src/gui src/importer" 19 20 ## Exclude the application wizard templates, and some file templates 21 DOXYGEN_EXCLUDE = 22 23 DOXYGEN_EXAMPLE_PATH = 24 25 ## Use Search engine (Versions 1.3.4 and above only!) 26 DOXYGEN_SEARCHENGINE = YES 27 28 include doc/documentation.am 29 endif -
orxonox/branches/buerli/Makefile.in
r2707 r3238 34 34 PRE_UNINSTALL = : 35 35 POST_UNINSTALL = : 36 subdir = . 36 host_triplet = @host@ 37 37 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ 38 38 $(srcdir)/Makefile.in $(srcdir)/config.h.in \ 39 $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ 40 depcomp install-sh missing mkinstalldirs 39 $(srcdir)/doc/documentation.am $(top_srcdir)/configure AUTHORS \ 40 COPYING ChangeLog INSTALL NEWS config.guess config.sub depcomp \ 41 install-sh missing mkinstalldirs 42 subdir = . 41 43 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 42 44 am__aclocal_m4_deps = $(top_srcdir)/configure.ac … … 87 89 CXXFLAGS = @CXXFLAGS@ 88 90 CYGPATH_W = @CYGPATH_W@ 91 DEBUG = @DEBUG@ 89 92 DEFS = @DEFS@ 90 93 DEPDIR = @DEPDIR@ 94 DOXYGEN = @DOXYGEN@ 95 DOXYGEN_FALSE = @DOXYGEN_FALSE@ 96 DOXYGEN_TRUE = @DOXYGEN_TRUE@ 91 97 ECHO_C = @ECHO_C@ 92 98 ECHO_N = @ECHO_N@ … … 94 100 EGREP = @EGREP@ 95 101 EXEEXT = @EXEEXT@ 102 GTK2_CFLAGS = @GTK2_CFLAGS@ 103 GTK2_LIBS = @GTK2_LIBS@ 104 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 105 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ 96 106 INSTALL_DATA = @INSTALL_DATA@ 97 107 INSTALL_PROGRAM = @INSTALL_PROGRAM@ … … 127 137 am__quote = @am__quote@ 128 138 bindir = @bindir@ 139 build = @build@ 129 140 build_alias = @build_alias@ 141 build_cpu = @build_cpu@ 142 build_os = @build_os@ 143 build_vendor = @build_vendor@ 130 144 datadir = @datadir@ 131 145 exec_prefix = @exec_prefix@ 146 host = @host@ 132 147 host_alias = @host_alias@ 148 host_cpu = @host_cpu@ 149 host_os = @host_os@ 150 host_vendor = @host_vendor@ 133 151 includedir = @includedir@ 134 152 infodir = @infodir@ … … 145 163 sharedstatedir = @sharedstatedir@ 146 164 sysconfdir = @sysconfdir@ 165 target = @target@ 147 166 target_alias = @target_alias@ 148 SUBDIRS = src console gui 167 target_cpu = @target_cpu@ 168 target_os = @target_os@ 169 target_vendor = @target_vendor@ 170 AUTOMAKE_OPTIONS = foreign no-installman no-installinfo 171 SUBDIRS = src 172 EXTRA_DIST = CODING-STANDARDS \ 173 IDEAS \ 174 TASKS \ 175 doc/CREDITS \ 176 doc/doxyconf/build \ 177 doc/doxyconf/confopts \ 178 doc/doxyconf/input \ 179 doc/doxyconf/preprocessor \ 180 doc/doxyconf/progress \ 181 doc/doxyconf/project 182 183 @DOXYGEN_TRUE@DOXYGEN_INPUT = "src src/gui src/importer" 184 @DOXYGEN_TRUE@DOXYGEN_EXCLUDE = 185 @DOXYGEN_TRUE@DOXYGEN_EXAMPLE_PATH = 186 @DOXYGEN_TRUE@DOXYGEN_SEARCHENGINE = YES 187 @DOXYGEN_TRUE@DX_CONFIG_FILE = "$(top_srcdir)/orxodox" 188 @DOXYGEN_TRUE@DX_CONF_DIR = "$(top_srcdir)/doc/doxyconf" 149 189 all: config.h 150 190 $(MAKE) $(AM_MAKEFLAGS) all-recursive … … 153 193 am--refresh: 154 194 @: 155 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)195 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/doc/documentation.am $(am__configure_deps) 156 196 @for dep in $?; do \ 157 197 case '$(am__configure_deps)' in \ 158 198 *$$dep*) \ 159 echo ' cd $(srcdir) && $(AUTOMAKE) -- gnu'; \160 cd $(srcdir) && $(AUTOMAKE) -- gnu\199 echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ 200 cd $(srcdir) && $(AUTOMAKE) --foreign \ 161 201 && exit 0; \ 162 202 exit 1;; \ 163 203 esac; \ 164 204 done; \ 165 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnuMakefile'; \205 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ 166 206 cd $(top_srcdir) && \ 167 $(AUTOMAKE) -- gnuMakefile207 $(AUTOMAKE) --foreign Makefile 168 208 .PRECIOUS: Makefile 169 209 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status … … 326 366 $(am__remove_distdir) 327 367 mkdir $(distdir) 368 $(mkdir_p) $(distdir)/doc $(distdir)/doc/doxyconf 328 369 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ 329 370 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ … … 464 505 check-am: all-am 465 506 check: check-recursive 466 all-am: Makefile config.h 507 all-am: Makefile config.h all-local 467 508 installdirs: installdirs-recursive 468 509 installdirs-am: … … 493 534 clean: clean-recursive 494 535 495 clean-am: clean-generic mostlyclean-am536 clean-am: clean-generic clean-local mostlyclean-am 496 537 497 538 distclean: distclean-recursive 498 539 -rm -f $(am__CONFIG_DISTCLEAN_FILES) 499 540 -rm -f Makefile 500 distclean-am: clean-am distclean-generic distclean-hdr distclean-tags 541 distclean-am: clean-am distclean-generic distclean-hdr distclean-local \ 542 distclean-tags 501 543 502 544 dvi: dvi-recursive … … 538 580 ps-am: 539 581 540 uninstall-am: uninstall-info-am582 uninstall-am: 541 583 542 584 uninstall-info: uninstall-info-recursive 543 585 544 .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ 545 check-am clean clean-generic clean-recursive ctags \ 546 ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ 547 dist-tarZ dist-zip distcheck distclean distclean-generic \ 548 distclean-hdr distclean-recursive distclean-tags \ 549 distcleancheck distdir distuninstallcheck dvi dvi-am html \ 550 html-am info info-am install install-am install-data \ 551 install-data-am install-exec install-exec-am install-info \ 552 install-info-am install-man install-strip installcheck \ 553 installcheck-am installdirs installdirs-am maintainer-clean \ 554 maintainer-clean-generic maintainer-clean-recursive \ 555 mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ 556 pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ 557 uninstall-info-am 558 586 .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am all-local \ 587 am--refresh check check-am clean clean-generic clean-local \ 588 clean-recursive ctags ctags-recursive dist dist-all dist-bzip2 \ 589 dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ 590 distclean-generic distclean-hdr distclean-local \ 591 distclean-recursive distclean-tags distcleancheck distdir \ 592 distuninstallcheck dvi dvi-am html html-am info info-am \ 593 install install-am install-data install-data-am install-exec \ 594 install-exec-am install-info install-info-am install-man \ 595 install-strip installcheck installcheck-am installdirs \ 596 installdirs-am maintainer-clean maintainer-clean-generic \ 597 maintainer-clean-recursive mostlyclean mostlyclean-generic \ 598 mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ 599 uninstall uninstall-am uninstall-info-am 600 601 602 @DOXYGEN_TRUE@doc: 603 @DOXYGEN_TRUE@ if test ! -e $(DX_CONFIG_FILE); then \ 604 @DOXYGEN_TRUE@ make doc-config; \ 605 @DOXYGEN_TRUE@ fi 606 @DOXYGEN_TRUE@ @echo "Generating doxygen Documentation"; \ 607 @DOXYGEN_TRUE@ $(DOXYGEN) $(DX_CONFIG_FILE) 608 609 @DOXYGEN_TRUE@doc-config: 610 @DOXYGEN_TRUE@ @echo "Generationg doxygen configuration File." ; \ 611 @DOXYGEN_TRUE@ if test -e "$(top_srcdir)/orxodox"; then \ 612 @DOXYGEN_TRUE@ echo "deleting existing Configuration File" ; \ 613 @DOXYGEN_TRUE@ rm $(top_srcdir)/orxodox ; \ 614 @DOXYGEN_TRUE@ fi ; \ 615 @DOXYGEN_TRUE@ touch $(DX_CONFIG_FILE) ; \ 616 @DOXYGEN_TRUE@ $(DX_CONF_DIR)/project >> $(DX_CONFIG_FILE); \ 617 @DOXYGEN_TRUE@ echo "PROJECT_NAME = \"$(PACKAGE_NAME)\"" >> $(DX_CONFIG_FILE); \ 618 @DOXYGEN_TRUE@ echo "PROJECT_NUMBER = \"$(PACKAGE_VERSION)\"" >> $(DX_CONFIG_FILE); \ 619 @DOXYGEN_TRUE@ echo "OUTPUT_DIRECTORY = \"$(top_srcdir)/doc/\"" >> $(DX_CONFIG_FILE); \ 620 @DOXYGEN_TRUE@ echo " " >> $(DX_CONFIG_FILE); \ 621 @DOXYGEN_TRUE@\ 622 @DOXYGEN_TRUE@ $(DX_CONF_DIR)/build >> $(DX_CONFIG_FILE); \ 623 @DOXYGEN_TRUE@\ 624 @DOXYGEN_TRUE@ $(DX_CONF_DIR)/progress >> $(DX_CONFIG_FILE); \ 625 @DOXYGEN_TRUE@ if test $(DEBUG) -ge 2 ; then \ 626 @DOXYGEN_TRUE@ echo "QUIET = \"NO\"" >> $(DX_CONFIG_FILE); \ 627 @DOXYGEN_TRUE@ else \ 628 @DOXYGEN_TRUE@ echo "QUIET = \"YES\"" >> $(DX_CONFIG_FILE); \ 629 @DOXYGEN_TRUE@ fi ;\ 630 @DOXYGEN_TRUE@\ 631 @DOXYGEN_TRUE@ $(DX_CONF_DIR)/input >> $(DX_CONFIG_FILE); \ 632 @DOXYGEN_TRUE@ echo "INPUT = $(DOXYGEN_INPUT)" >> $(DX_CONFIG_FILE); \ 633 @DOXYGEN_TRUE@\ 634 @DOXYGEN_TRUE@ $(DX_CONF_DIR)/preprocessor >> $(DX_CONFIG_FILE); \ 635 @DOXYGEN_TRUE@ echo "INCLUDE_PATH = \"$(top_srcdir)\"" >> $(DX_CONFIG_FILE); \ 636 @DOXYGEN_TRUE@ echo "PREDEFINED = \"HAVE_CONFIG_H= \"" >> $(DX_CONFIG_FILE); \ 637 @DOXYGEN_TRUE@ \ 638 @DOXYGEN_TRUE@ $(DX_CONF_DIR)/confopts >> $(DX_CONFIG_FILE) 639 640 @DOXYGEN_TRUE@doc-delete: 641 @DOXYGEN_TRUE@ @echo "Deleting doxygen Documentation" 642 @DOXYGEN_TRUE@ rm -rf $(top_srcdir)/doc/html 643 @DOXYGEN_TRUE@ rm -rf $(top_srcdir)/doc/latex 644 645 @DOXYGEN_TRUE@distclean-local: doc-delete 646 @DOXYGEN_TRUE@ rm -f $(top_srcdir)/orxodox 647 648 @DOXYGEN_TRUE@clean-local: doc-delete 649 650 @DOXYGEN_TRUE@all-local: doc 651 652 @DOXYGEN_TRUE@.PHONY: doc doc-config doc-delete 653 654 # Local Variables: 655 # mode: makefile 656 # End: 559 657 # Tell versions [3.59,3.63) of GNU make to not export all variables. 560 658 # Otherwise a system limit (for SysV at least) may be exceeded. -
orxonox/branches/buerli/NEWS
r2017 r3238 1 Date: December 20, 2004 2 Topic: New Webpage under construction 3 Body: I am proud to announce, that nico is currently developing our new webpage. It has a verry cool new style, and is much more easy to extend, than the old one. <a href="http://www.orxonox.ethz.ch/new">visit it</a>. 4 5 Date: December 14, 2004 6 Topic: Repository Moved 7 Body: Today we moved the repository. The new location of the repository is <A href="http://orxonox.ethz.ch/repos/reporx">http://orxonox.ethz.ch/repos/reporx</A>. 8 9 Date: November 16, 2004 10 Topic: Importer 11 Body: There now exists a possibility to import .obj-files (alias wavefront format) into the Game. You can find some test models here: <A href="/files/models">models</a>. You can also test them with the included importer which is locates in trunk/importer. enjoy. 12 13 1 14 Date: June 22, 2004 2 15 Topic: Develop on Win32 - bg 3 Body: Now the moment you have all been waiting for has arrived. Orxonox can finally be compiled on Windows machines. We know that it is no good idea to do this, but since there are some people interessted in working with Windows, we will give you a chance: read <A href = " http://www.orxonox.ethz.ch/index.php?site=additional.sites/howto.dev.win/howto.dev.win.cc.php" >the manual </A>.16 Body: Now the moment you have all been waiting for has arrived. Orxonox can finally be compiled on Windows machines. We know that it is no good idea to do this, but since there are some people interessted in working with Windows, we will give you a chance: read <A href = "/index.php?site=additional.sites/howto.dev.win/howto.dev.win.cc.php" >the manual </A>. 4 17 5 18 Date: June 04, 2004 6 19 Topic: Orxonox Convention - pb 7 Body: Here you can find all the information you need, to join us at the <A href=" http://www.orxonox.ethz.ch/index.php?site=additional.sites/convention01/convention01.php"> Orxonox Convention </A>, that takes Place at Stuz June 9. 2004.20 Body: Here you can find all the information you need, to join us at the <A href="index.php?site=additional.sites/convention01/convention01.php"> Orxonox Convention </A>, that takes Place at Stuz June 9. 2004. 8 21 9 22 Date: June 04, 2004 10 23 Topic: Manual for Subversion@DataCore.ch 11 Body: A manual for <A href=" http://www.orxonox.ethz.ch/files/subversion/subversion.pdf"> Subversion at DataCore</A> is made. Now we need someone, to correct all the errors. Please someone Checkout the Source of this at http://orxonox.ethz.ch/repos/latex/subversion an do the repairs.24 Body: A manual for <A href="/files/subversion/subversion.pdf"> Subversion at DataCore</A> is made. Now we need someone, to correct all the errors. Please someone Checkout the Source of this at http://orxonox.ethz.ch/repos/latex/subversion an do the repairs. 12 25 13 26 Date: June 02, 2004 … … 17 30 Date: May 26, 2004 18 31 Topic: New ship models - bg 19 Body: Some new space models are now ready for download. You'll find them in the download section or try it <A href=" http://www.orxonox.ethz.ch/files/orx_pictures.tar.bz2">here</A>32 Body: Some new space models are now ready for download. You'll find them in the download section or try it <A href="/files/orx_pictures.tar.bz2">here</A> 20 33 -
orxonox/branches/buerli/config.h.in
r2707 r3238 1 1 /* config.h.in. Generated from configure.ac by autoheader. */ 2 3 /* in which debug mode we are */ 4 #undef DEBUG 2 5 3 6 /* Define to 1 if you have the `bzero' function. */ … … 10 13 #undef HAVE_GL_GL_H 11 14 15 /* if we have GTK2 */ 16 #undef HAVE_GTK2 17 12 18 /* Define to 1 if you have the <inttypes.h> header file. */ 13 19 #undef HAVE_INTTYPES_H 14 20 21 /* Define to 1 if you have the <jpeglib.h> header file. */ 22 #undef HAVE_JPEGLIB_H 23 15 24 /* Define to 1 if you have the `m' library (-lm). */ 16 25 #undef HAVE_LIBM 17 18 /* Define to 1 if you have the `OSMesa' library (-lOSMesa). */19 #undef HAVE_LIBOSMESA20 21 /* Define to 1 if you have the `X11' library (-lX11). */22 #undef HAVE_LIBX1123 24 /* Define to 1 if you have the `Xt' library (-lXt). */25 #undef HAVE_LIBXT26 26 27 27 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and … … 32 32 #undef HAVE_MEMORY_H 33 33 34 /* Define to 1 if you have the <OpenGL/glu.h> header file. */ 35 #undef HAVE_OPENGL_GLU_H 36 37 /* Define to 1 if you have the <OpenGL/gl.h> header file. */ 38 #undef HAVE_OPENGL_GL_H 39 40 /* Define to 1 if you have the <png.h> header file. */ 41 #undef HAVE_PNG_H 42 34 43 /* Define to 1 if you have the <SDL/SDL.h> header file. */ 35 44 #undef HAVE_SDL_SDL_H 45 46 /* Define to 1 if you have the <SDL/SDL_image.h> header file. */ 47 #undef HAVE_SDL_SDL_IMAGE_H 36 48 37 49 /* Define to 1 if you have the `sqrt' function. */ -
orxonox/branches/buerli/configure
r2707 r3238 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. 1-pre-alpha.3 # Generated by GNU Autoconf 2.59 for orxonox 0.2.0_alpha-r1. 4 4 # 5 5 # Report bugs to <orxonox-dev@mail.datacore.ch>. … … 270 270 PACKAGE_NAME='orxonox' 271 271 PACKAGE_TARNAME='orxonox' 272 PACKAGE_VERSION='0. 1-pre-alpha'273 PACKAGE_STRING='orxonox 0. 1-pre-alpha'272 PACKAGE_VERSION='0.2.0_alpha-r1' 273 PACKAGE_STRING='orxonox 0.2.0_alpha-r1' 274 274 PACKAGE_BUGREPORT='orxonox-dev@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 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 MSBITFIELDSLIBOBJS LTLIBOBJS'314 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_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. 1-pre-alphato adapt to many kinds of systems.791 \`configure' configures orxonox 0.2.0_alpha-r1 to adapt to many kinds of systems. 792 792 793 793 Usage: $0 [OPTION]... [VAR=VALUE]... … … 846 846 --program-suffix=SUFFIX append SUFFIX to installed program names 847 847 --program-transform-name=PROGRAM run sed PROGRAM on installed program names 848 849 System types: 850 --build=BUILD configure for building on BUILD [guessed] 851 --host=HOST cross-compile to build programs to run on HOST [BUILD] 852 --target=TARGET configure for building compilers for TARGET [HOST] 848 853 _ACEOF 849 854 fi … … 851 856 if test -n "$ac_init_help"; then 852 857 case $ac_init_help in 853 short | recursive ) echo "Configuration of orxonox 0. 1-pre-alpha:";;858 short | recursive ) echo "Configuration of orxonox 0.2.0_alpha-r1:";; 854 859 esac 855 860 cat <<\_ACEOF … … 860 865 --disable-dependency-tracking speeds up one-time build 861 866 --enable-dependency-tracking do not reject slow dependency extractors 867 --enable-debug compiles in debug mode. Lots of debug info about the 868 game. 869 870 Optional Packages: 871 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 872 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 873 --without-gtk Prevents GTK from being loaded 874 --without-sdl-image Prevents SDL_image from being loaded 862 875 863 876 Some influential environment variables: … … 971 984 if $ac_init_version; then 972 985 cat <<\_ACEOF 973 orxonox configure 0. 1-pre-alpha986 orxonox configure 0.2.0_alpha-r1 974 987 generated by GNU Autoconf 2.59 975 988 … … 985 998 running configure, to aid debugging if configure makes a mistake. 986 999 987 It was created by orxonox $as_me 0. 1-pre-alpha, which was1000 It was created by orxonox $as_me 0.2.0_alpha-r1, which was 988 1001 generated by GNU Autoconf 2.59. Invocation command line was 989 1002 … … 1321 1334 1322 1335 1323 am__api_version="1.8" 1336 1337 # Detect the canonical host and target build environment. 1324 1338 ac_aux_dir= 1325 1339 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do … … 1347 1361 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. 1348 1362 1363 # Make sure we can run config.sub. 1364 $ac_config_sub sun4 >/dev/null 2>&1 || 1365 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 1366 echo "$as_me: error: cannot run $ac_config_sub" >&2;} 1367 { (exit 1); exit 1; }; } 1368 1369 echo "$as_me:$LINENO: checking build system type" >&5 1370 echo $ECHO_N "checking build system type... $ECHO_C" >&6 1371 if test "${ac_cv_build+set}" = set; then 1372 echo $ECHO_N "(cached) $ECHO_C" >&6 1373 else 1374 ac_cv_build_alias=$build_alias 1375 test -z "$ac_cv_build_alias" && 1376 ac_cv_build_alias=`$ac_config_guess` 1377 test -z "$ac_cv_build_alias" && 1378 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 1379 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} 1380 { (exit 1); exit 1; }; } 1381 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || 1382 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 1383 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} 1384 { (exit 1); exit 1; }; } 1385 1386 fi 1387 echo "$as_me:$LINENO: result: $ac_cv_build" >&5 1388 echo "${ECHO_T}$ac_cv_build" >&6 1389 build=$ac_cv_build 1390 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 1391 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 1392 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 1393 1394 1395 echo "$as_me:$LINENO: checking host system type" >&5 1396 echo $ECHO_N "checking host system type... $ECHO_C" >&6 1397 if test "${ac_cv_host+set}" = set; then 1398 echo $ECHO_N "(cached) $ECHO_C" >&6 1399 else 1400 ac_cv_host_alias=$host_alias 1401 test -z "$ac_cv_host_alias" && 1402 ac_cv_host_alias=$ac_cv_build_alias 1403 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || 1404 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 1405 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} 1406 { (exit 1); exit 1; }; } 1407 1408 fi 1409 echo "$as_me:$LINENO: result: $ac_cv_host" >&5 1410 echo "${ECHO_T}$ac_cv_host" >&6 1411 host=$ac_cv_host 1412 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 1413 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 1414 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 1415 1416 1417 echo "$as_me:$LINENO: checking target system type" >&5 1418 echo $ECHO_N "checking target system type... $ECHO_C" >&6 1419 if test "${ac_cv_target+set}" = set; then 1420 echo $ECHO_N "(cached) $ECHO_C" >&6 1421 else 1422 ac_cv_target_alias=$target_alias 1423 test "x$ac_cv_target_alias" = "x" && 1424 ac_cv_target_alias=$ac_cv_host_alias 1425 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || 1426 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 1427 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} 1428 { (exit 1); exit 1; }; } 1429 1430 fi 1431 echo "$as_me:$LINENO: result: $ac_cv_target" >&5 1432 echo "${ECHO_T}$ac_cv_target" >&6 1433 target=$ac_cv_target 1434 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 1435 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 1436 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 1437 1438 1439 # The aliases save the names the user supplied, while $host etc. 1440 # will get canonicalized. 1441 test -n "$target_alias" && 1442 test "$program_prefix$program_suffix$program_transform_name" = \ 1443 NONENONEs,x,x, && 1444 program_prefix=${target_alias}- 1445 1446 1447 am__api_version="1.8" 1349 1448 # Find a good install program. We prefer a C program (faster), 1350 1449 # so one script is as good as another. But avoid the broken or … … 1620 1719 # Define the identity of the package. 1621 1720 PACKAGE='orxonox' 1622 VERSION='0. 1-pre-alpha'1721 VERSION='0.2.0_alpha-r1' 1623 1722 1624 1723 … … 3322 3421 3323 3422 3324 3325 # checking gl header (has to be here because of a Linux error)3326 3327 3423 ac_ext=c 3328 3424 ac_cpp='$CPP $CPPFLAGS' … … 3741 3837 fi 3742 3838 3743 # On IRIX 5.3, sys/types and inttypes.h are conflicting. 3839 3840 ### CHECKING OPTIONAT ARGUMENTS 3841 ## DEBUG-statement 3842 DEBUG=no 3843 echo "$as_me:$LINENO: checking if DEBUG-mode should be enabled" >&5 3844 echo $ECHO_N "checking if DEBUG-mode should be enabled... $ECHO_C" >&6 3845 # Check whether --enable-debug or --disable-debug was given. 3846 if test "${enable_debug+set}" = set; then 3847 enableval="$enable_debug" 3848 DEBUG=$enableval 3849 fi; 3850 3851 if test "$DEBUG" = "no"; then 3852 echo "no" 3853 echo " -> Setting debuglevel to 1. Like this you can still see errors." 3854 DEBUG=1 3855 elif test "$DEBUG" = yes; then 3856 echo "yes" 3857 echo " -> Setting debuglevel to 3. HARD DEBUG MODE!!." 3858 DEBUG=3 3859 else 3860 echo "yes set to $DEBUG" 3861 fi 3862 3863 cat >>confdefs.h <<_ACEOF 3864 #define DEBUG $DEBUG 3865 _ACEOF 3866 3867 3868 3869 3870 ## GTK-disabled 3871 echo "$as_me:$LINENO: checking if gtk should be enabled" >&5 3872 echo $ECHO_N "checking if gtk should be enabled... $ECHO_C" >&6 3873 3874 # Check whether --with-gtk or --without-gtk was given. 3875 if test "${with_gtk+set}" = set; then 3876 withval="$with_gtk" 3877 def_gtk=no 3878 else 3879 def_gtk=yes 3880 fi; 3881 if test "$def_gtk" = yes; then 3882 echo "yes" 3883 fi 3884 if test "$def_gtk" = no; then 3885 echo "no" 3886 fi 3887 ### SDL_image-disable 3888 def_sdl_image=yes 3889 echo "$as_me:$LINENO: checking if SDL_image should be enabled" >&5 3890 echo $ECHO_N "checking if SDL_image should be enabled... $ECHO_C" >&6 3891 3892 # Check whether --with-sdl_image or --without-sdl_image was given. 3893 if test "${with_sdl_image+set}" = set; then 3894 withval="$with_sdl_image" 3895 def_sdl_image=no 3896 fi; 3897 if test "$def_sdl_image" = yes; then 3898 echo "yes" 3899 fi 3900 if test "$def_sdl_image" = no; then 3901 echo "no" 3902 fi 3903 3904 3905 ## PROGRAMM CHECKING 3906 # checking for Doxygen 3907 # Extract the first word of "doxygen", so it can be a program name with args. 3908 set dummy doxygen; ac_word=$2 3909 echo "$as_me:$LINENO: checking for $ac_word" >&5 3910 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 3911 if test "${ac_cv_path_DOXYGEN+set}" = set; then 3912 echo $ECHO_N "(cached) $ECHO_C" >&6 3913 else 3914 case $DOXYGEN in 3915 [\\/]* | ?:[\\/]*) 3916 ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. 3917 ;; 3918 *) 3919 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3920 for as_dir in $PATH 3921 do 3922 IFS=$as_save_IFS 3923 test -z "$as_dir" && as_dir=. 3924 for ac_exec_ext in '' $ac_executable_extensions; do 3925 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 3926 ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" 3927 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 3928 break 2 3929 fi 3930 done 3931 done 3932 3933 ;; 3934 esac 3935 fi 3936 DOXYGEN=$ac_cv_path_DOXYGEN 3937 3938 if test -n "$DOXYGEN"; then 3939 echo "$as_me:$LINENO: result: $DOXYGEN" >&5 3940 echo "${ECHO_T}$DOXYGEN" >&6 3941 else 3942 echo "$as_me:$LINENO: result: no" >&5 3943 echo "${ECHO_T}no" >&6 3944 fi 3945 3946 3947 3948 if test $DOXYGEN; then 3949 DOXYGEN_TRUE= 3950 DOXYGEN_FALSE='#' 3951 else 3952 DOXYGEN_TRUE='#' 3953 DOXYGEN_FALSE= 3954 fi 3955 3956 3957 ### CHECKING FOR SYSTEM ### 3958 3959 echo "$as_me:$LINENO: checking for System" >&5 3960 echo $ECHO_N "checking for System... $ECHO_C" >&6 3961 ## checking for openGL-environment and other sys-specific parameters 3962 case "$target" in 3963 ### WINDOWS ### 3964 *-*-mingw32*) 3965 echo "mingw-WINDOWS detected" 3966 3967 mingw="yes" 3968 MSBITFIELDS="-mms-bitfields" 3969 MWINDOWS="-mwindows" 3970 3971 # checking gl header 3972 #done before loop 3973 3974 # checking gl header 3975 # On IRIX 5.3, sys/types and inttypes.h are conflicting. 3744 3976 3745 3977 … … 3967 4199 done 3968 4200 3969 3970 3971 3972 ### CHECKING FOR SYSTEM ###3973 3974 echo "$as_me:$LINENO: checking for System" >&53975 echo $ECHO_N "checking for System... $ECHO_C" >&63976 case `uname` in3977 ### WINDOWS ###3978 *MINGW*)3979 echo "mingw-WINDOWS detected"3980 3981 mingw="yes"3982 MSBITFIELDS="-mms-bitfields"3983 MWINDOWS="-mwindows"3984 3985 # checking gl header3986 #done before loop3987 3988 4201 # checking for Windows openGl library 3989 4202 echo "$as_me:$LINENO: checking for main in -lopengl32" >&5 … … 4290 4503 fi 4291 4504 4292 4293 4505 # checking for mingw32 4294 4506 echo "$as_me:$LINENO: checking for main in -lmingw32" >&5 … … 4577 4789 4578 4790 if test "$FOUND_sdlmain" = "yes" ; then 4579 4791 LIBS="$LIBS -lsdlmain" 4580 4792 else 4581 4582 4583 4584 4585 4793 echo "------------------" 4794 echo "SDL library not found." 4795 echo "please install the SDL library, which can be found at http://www.libsdl.org" 4796 echo "------------------" 4797 exit 1 4586 4798 fi 4587 4799 echo "$as_me:$LINENO: checking for main in -lsdl" >&5 … … 4648 4860 4649 4861 if test "$FOUND_sdl" = "yes" ; then 4650 4862 LIBS="$LIBS -lsdl" 4651 4863 else 4652 4653 4654 4655 4656 4864 echo "------------------" 4865 echo "SDL library not found." 4866 echo "please install the SDL library, which can be found at http://www.libsdl.org" 4867 echo "------------------" 4868 exit -1 4657 4869 fi 4658 4870 … … 4660 4872 4661 4873 ### LINUX ### 4662 * Linux*)4874 *-*-linux*) 4663 4875 echo "Linux detected" 4664 4876 4665 4877 Linux="yes" 4666 4878 4879 CPPFLAGS="-I/usr/X11R6/include" 4880 LDFLAGS="-L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib $LDFLAGS" 4667 4881 # checking gl header 4668 #has been done befor linux-check 4669 4670 # checking for Unix GL 4671 echo "$as_me:$LINENO: checking for main in -lGL" >&5 4672 echo $ECHO_N "checking for main in -lGL... $ECHO_C" >&6 4673 if test "${ac_cv_lib_GL_main+set}" = set; then 4674 echo $ECHO_N "(cached) $ECHO_C" >&6 4675 else 4676 ac_check_lib_save_LIBS=$LIBS 4677 LIBS="-lGL $LIBS" 4678 cat >conftest.$ac_ext <<_ACEOF 4679 /* confdefs.h. */ 4680 _ACEOF 4681 cat confdefs.h >>conftest.$ac_ext 4682 cat >>conftest.$ac_ext <<_ACEOF 4683 /* end confdefs.h. */ 4684 4685 4686 int 4687 main () 4688 { 4689 main (); 4690 ; 4691 return 0; 4692 } 4693 _ACEOF 4694 rm -f conftest.$ac_objext conftest$ac_exeext 4695 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 4696 (eval $ac_link) 2>conftest.er1 4697 ac_status=$? 4698 grep -v '^ *+' conftest.er1 >conftest.err 4699 rm -f conftest.er1 4700 cat conftest.err >&5 4701 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4702 (exit $ac_status); } && 4703 { ac_try='test -z "$ac_c_werror_flag" 4704 || test ! -s conftest.err' 4705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4706 (eval $ac_try) 2>&5 4707 ac_status=$? 4708 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4709 (exit $ac_status); }; } && 4710 { ac_try='test -s conftest$ac_exeext' 4711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4712 (eval $ac_try) 2>&5 4713 ac_status=$? 4714 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4715 (exit $ac_status); }; }; then 4716 ac_cv_lib_GL_main=yes 4717 else 4718 echo "$as_me: failed program was:" >&5 4719 sed 's/^/| /' conftest.$ac_ext >&5 4720 4721 ac_cv_lib_GL_main=no 4722 fi 4723 rm -f conftest.err conftest.$ac_objext \ 4724 conftest$ac_exeext conftest.$ac_ext 4725 LIBS=$ac_check_lib_save_LIBS 4726 fi 4727 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5 4728 echo "${ECHO_T}$ac_cv_lib_GL_main" >&6 4729 if test $ac_cv_lib_GL_main = yes; then 4730 FOUND_GL=yes 4731 fi 4732 4733 if test "$FOUND_GL" = "yes" ; then 4734 LIBS="$LIBS -lGL" 4735 else 4736 echo "------------------" 4737 echo "opengl not found." 4738 echo "please install the opengl package which can be found at http://www.opengl.org" 4739 echo "------------------" 4740 exit -1 4741 fi 4742 4743 # cheking for GLU-header 4744 4745 for ac_header in GL/glu.h 4882 4883 for ac_header in GL/gl.h 4746 4884 do 4747 4885 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 4897 5035 4898 5036 4899 echo "$as_me:$LINENO: checking for gluProject in -lGLU" >&5 4900 echo $ECHO_N "checking for gluProject in -lGLU... $ECHO_C" >&6 4901 if test "${ac_cv_lib_GLU_gluProject+set}" = set; then 5037 # checking for Unix GL 5038 echo "$as_me:$LINENO: checking for main in -lGL" >&5 5039 echo $ECHO_N "checking for main in -lGL... $ECHO_C" >&6 5040 if test "${ac_cv_lib_GL_main+set}" = set; then 4902 5041 echo $ECHO_N "(cached) $ECHO_C" >&6 4903 5042 else 4904 5043 ac_check_lib_save_LIBS=$LIBS 4905 LIBS="-lGL U$LIBS"5044 LIBS="-lGL $LIBS" 4906 5045 cat >conftest.$ac_ext <<_ACEOF 4907 5046 /* confdefs.h. */ … … 4911 5050 /* end confdefs.h. */ 4912 5051 4913 /* Override any gcc2 internal prototype to avoid an error. */ 4914 #ifdef __cplusplus 4915 extern "C" 4916 #endif 4917 /* We use char because int might match the return type of a gcc2 4918 builtin and then its argument prototype would still apply. */ 4919 char gluProject (); 5052 4920 5053 int 4921 5054 main () 4922 5055 { 4923 gluProject();5056 main (); 4924 5057 ; 4925 5058 return 0; … … 4948 5081 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4949 5082 (exit $ac_status); }; }; then 4950 ac_cv_lib_GL U_gluProject=yes5083 ac_cv_lib_GL_main=yes 4951 5084 else 4952 5085 echo "$as_me: failed program was:" >&5 4953 5086 sed 's/^/| /' conftest.$ac_ext >&5 4954 5087 4955 ac_cv_lib_GL U_gluProject=no5088 ac_cv_lib_GL_main=no 4956 5089 fi 4957 5090 rm -f conftest.err conftest.$ac_objext \ … … 4959 5092 LIBS=$ac_check_lib_save_LIBS 4960 5093 fi 4961 echo "$as_me:$LINENO: result: $ac_cv_lib_GL U_gluProject" >&54962 echo "${ECHO_T}$ac_cv_lib_GL U_gluProject" >&64963 if test $ac_cv_lib_GL U_gluProject= yes; then4964 FOUND_GL U=yes4965 fi 4966 4967 if test "$FOUND_GLU" = "yes" ; then4968 LIBS="$LIBS -lGLU"4969 5094 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5 5095 echo "${ECHO_T}$ac_cv_lib_GL_main" >&6 5096 if test $ac_cv_lib_GL_main = yes; then 5097 FOUND_GL=yes 5098 fi 5099 5100 if test "$FOUND_GL" = "yes" ; then 5101 LIBS="$LIBS -lGL" 5102 else 4970 5103 echo "------------------" 4971 echo " GLU librarynot found."4972 echo "please install the GLU library, that should come with openGL,which can be found at http://www.opengl.org"5104 echo "opengl not found." 5105 echo "please install the opengl package which can be found at http://www.opengl.org" 4973 5106 echo "------------------" 4974 5107 exit -1 4975 4976 4977 # che cking for SDL-headers4978 4979 for ac_header in SDL/SDL.h5108 fi 5109 5110 # cheking for GLU-header 5111 5112 for ac_header in GL/glu.h 4980 5113 do 4981 5114 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 5123 5256 5124 5257 else 5125 { { echo "$as_me:$LINENO: error: cannot find SDLheaders" >&55126 echo "$as_me: error: cannot find SDLheaders" >&2;}5258 { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5 5259 echo "$as_me: error: cannot find opengl headers" >&2;} 5127 5260 { (exit 1); exit 1; }; } 5128 5261 fi … … 5131 5264 5132 5265 5133 echo "$as_me:$LINENO: checking for main in -lSDL" >&55134 echo $ECHO_N "checking for main in -lSDL... $ECHO_C" >&65135 if test "${ac_cv_lib_ SDL_main+set}" = set; then5266 echo "$as_me:$LINENO: checking for gluProject in -lGLU" >&5 5267 echo $ECHO_N "checking for gluProject in -lGLU... $ECHO_C" >&6 5268 if test "${ac_cv_lib_GLU_gluProject+set}" = set; then 5136 5269 echo $ECHO_N "(cached) $ECHO_C" >&6 5137 5270 else 5138 5271 ac_check_lib_save_LIBS=$LIBS 5139 LIBS="-l SDL$LIBS"5272 LIBS="-lGLU $LIBS" 5140 5273 cat >conftest.$ac_ext <<_ACEOF 5141 5274 /* confdefs.h. */ … … 5145 5278 /* end confdefs.h. */ 5146 5279 5147 5280 /* Override any gcc2 internal prototype to avoid an error. */ 5281 #ifdef __cplusplus 5282 extern "C" 5283 #endif 5284 /* We use char because int might match the return type of a gcc2 5285 builtin and then its argument prototype would still apply. */ 5286 char gluProject (); 5148 5287 int 5149 5288 main () 5150 5289 { 5151 main();5290 gluProject (); 5152 5291 ; 5153 5292 return 0; … … 5176 5315 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5177 5316 (exit $ac_status); }; }; then 5178 ac_cv_lib_ SDL_main=yes5317 ac_cv_lib_GLU_gluProject=yes 5179 5318 else 5180 5319 echo "$as_me: failed program was:" >&5 5181 5320 sed 's/^/| /' conftest.$ac_ext >&5 5182 5321 5183 ac_cv_lib_ SDL_main=no5322 ac_cv_lib_GLU_gluProject=no 5184 5323 fi 5185 5324 rm -f conftest.err conftest.$ac_objext \ … … 5187 5326 LIBS=$ac_check_lib_save_LIBS 5188 5327 fi 5189 echo "$as_me:$LINENO: result: $ac_cv_lib_ SDL_main" >&55190 echo "${ECHO_T}$ac_cv_lib_ SDL_main" >&65191 if test $ac_cv_lib_ SDL_main= yes; then5192 FOUND_ SDL=yes5193 fi 5194 5195 if test "$FOUND_SDL" = "yes" ; then5196 LIBS="$LIBS -lSDL"5197 5328 echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluProject" >&5 5329 echo "${ECHO_T}$ac_cv_lib_GLU_gluProject" >&6 5330 if test $ac_cv_lib_GLU_gluProject = yes; then 5331 FOUND_GLU=yes 5332 fi 5333 5334 if test "$FOUND_GLU" = "yes" ; then 5335 LIBS="$LIBS -lGLU" 5336 else 5198 5337 echo "------------------" 5199 echo " SDLlibrary not found."5200 echo "please install the SDL library, which can be found at http://www.libsdl.org"5338 echo "GLU library not found." 5339 echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org" 5201 5340 echo "------------------" 5202 5341 exit -1 5203 fi 5204 5205 ;; 5206 *) 5207 mingw="no" 5208 ;; 5209 esac 5210 echo "$as_me:$LINENO: result: $mingw" >&5 5211 echo "${ECHO_T}$mingw" >&6 5212 5213 5214 #### Checking for LIBraries. 5215 5216 # FIXME: Replace `main' with a function in `-lOSMesa': 5217 5218 echo "$as_me:$LINENO: checking for main in -lOSMesa" >&5 5219 echo $ECHO_N "checking for main in -lOSMesa... $ECHO_C" >&6 5220 if test "${ac_cv_lib_OSMesa_main+set}" = set; then 5221 echo $ECHO_N "(cached) $ECHO_C" >&6 5222 else 5223 ac_check_lib_save_LIBS=$LIBS 5224 LIBS="-lOSMesa $LIBS" 5225 cat >conftest.$ac_ext <<_ACEOF 5226 /* confdefs.h. */ 5227 _ACEOF 5228 cat confdefs.h >>conftest.$ac_ext 5229 cat >>conftest.$ac_ext <<_ACEOF 5230 /* end confdefs.h. */ 5231 5232 5233 int 5234 main () 5235 { 5236 main (); 5237 ; 5238 return 0; 5239 } 5240 _ACEOF 5241 rm -f conftest.$ac_objext conftest$ac_exeext 5242 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 5243 (eval $ac_link) 2>conftest.er1 5244 ac_status=$? 5245 grep -v '^ *+' conftest.er1 >conftest.err 5246 rm -f conftest.er1 5247 cat conftest.err >&5 5248 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5249 (exit $ac_status); } && 5250 { ac_try='test -z "$ac_c_werror_flag" 5251 || test ! -s conftest.err' 5252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5253 (eval $ac_try) 2>&5 5254 ac_status=$? 5255 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5256 (exit $ac_status); }; } && 5257 { ac_try='test -s conftest$ac_exeext' 5258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5259 (eval $ac_try) 2>&5 5260 ac_status=$? 5261 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5262 (exit $ac_status); }; }; then 5263 ac_cv_lib_OSMesa_main=yes 5264 else 5265 echo "$as_me: failed program was:" >&5 5266 sed 's/^/| /' conftest.$ac_ext >&5 5267 5268 ac_cv_lib_OSMesa_main=no 5269 fi 5270 rm -f conftest.err conftest.$ac_objext \ 5271 conftest$ac_exeext conftest.$ac_ext 5272 LIBS=$ac_check_lib_save_LIBS 5273 fi 5274 echo "$as_me:$LINENO: result: $ac_cv_lib_OSMesa_main" >&5 5275 echo "${ECHO_T}$ac_cv_lib_OSMesa_main" >&6 5276 if test $ac_cv_lib_OSMesa_main = yes; then 5277 cat >>confdefs.h <<_ACEOF 5278 #define HAVE_LIBOSMESA 1 5279 _ACEOF 5280 5281 LIBS="-lOSMesa $LIBS" 5282 5283 fi 5284 5285 # FIXME: Replace `main' with a function in `-lX11': 5286 5287 echo "$as_me:$LINENO: checking for main in -lX11" >&5 5288 echo $ECHO_N "checking for main in -lX11... $ECHO_C" >&6 5289 if test "${ac_cv_lib_X11_main+set}" = set; then 5290 echo $ECHO_N "(cached) $ECHO_C" >&6 5291 else 5292 ac_check_lib_save_LIBS=$LIBS 5293 LIBS="-lX11 $LIBS" 5294 cat >conftest.$ac_ext <<_ACEOF 5295 /* confdefs.h. */ 5296 _ACEOF 5297 cat confdefs.h >>conftest.$ac_ext 5298 cat >>conftest.$ac_ext <<_ACEOF 5299 /* end confdefs.h. */ 5300 5301 5302 int 5303 main () 5304 { 5305 main (); 5306 ; 5307 return 0; 5308 } 5309 _ACEOF 5310 rm -f conftest.$ac_objext conftest$ac_exeext 5311 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 5312 (eval $ac_link) 2>conftest.er1 5313 ac_status=$? 5314 grep -v '^ *+' conftest.er1 >conftest.err 5315 rm -f conftest.er1 5316 cat conftest.err >&5 5317 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5318 (exit $ac_status); } && 5319 { ac_try='test -z "$ac_c_werror_flag" 5320 || test ! -s conftest.err' 5321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5322 (eval $ac_try) 2>&5 5323 ac_status=$? 5324 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5325 (exit $ac_status); }; } && 5326 { ac_try='test -s conftest$ac_exeext' 5327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5328 (eval $ac_try) 2>&5 5329 ac_status=$? 5330 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5331 (exit $ac_status); }; }; then 5332 ac_cv_lib_X11_main=yes 5333 else 5334 echo "$as_me: failed program was:" >&5 5335 sed 's/^/| /' conftest.$ac_ext >&5 5336 5337 ac_cv_lib_X11_main=no 5338 fi 5339 rm -f conftest.err conftest.$ac_objext \ 5340 conftest$ac_exeext conftest.$ac_ext 5341 LIBS=$ac_check_lib_save_LIBS 5342 fi 5343 echo "$as_me:$LINENO: result: $ac_cv_lib_X11_main" >&5 5344 echo "${ECHO_T}$ac_cv_lib_X11_main" >&6 5345 if test $ac_cv_lib_X11_main = yes; then 5346 cat >>confdefs.h <<_ACEOF 5347 #define HAVE_LIBX11 1 5348 _ACEOF 5349 5350 LIBS="-lX11 $LIBS" 5351 5352 fi 5353 5354 # FIXME: Replace `main' with a function in `-lXt': 5355 5356 echo "$as_me:$LINENO: checking for main in -lXt" >&5 5357 echo $ECHO_N "checking for main in -lXt... $ECHO_C" >&6 5358 if test "${ac_cv_lib_Xt_main+set}" = set; then 5359 echo $ECHO_N "(cached) $ECHO_C" >&6 5360 else 5361 ac_check_lib_save_LIBS=$LIBS 5362 LIBS="-lXt $LIBS" 5363 cat >conftest.$ac_ext <<_ACEOF 5364 /* confdefs.h. */ 5365 _ACEOF 5366 cat confdefs.h >>conftest.$ac_ext 5367 cat >>conftest.$ac_ext <<_ACEOF 5368 /* end confdefs.h. */ 5369 5370 5371 int 5372 main () 5373 { 5374 main (); 5375 ; 5376 return 0; 5377 } 5378 _ACEOF 5379 rm -f conftest.$ac_objext conftest$ac_exeext 5380 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 5381 (eval $ac_link) 2>conftest.er1 5382 ac_status=$? 5383 grep -v '^ *+' conftest.er1 >conftest.err 5384 rm -f conftest.er1 5385 cat conftest.err >&5 5386 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5387 (exit $ac_status); } && 5388 { ac_try='test -z "$ac_c_werror_flag" 5389 || test ! -s conftest.err' 5390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5391 (eval $ac_try) 2>&5 5392 ac_status=$? 5393 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5394 (exit $ac_status); }; } && 5395 { ac_try='test -s conftest$ac_exeext' 5396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5397 (eval $ac_try) 2>&5 5398 ac_status=$? 5399 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5400 (exit $ac_status); }; }; then 5401 ac_cv_lib_Xt_main=yes 5402 else 5403 echo "$as_me: failed program was:" >&5 5404 sed 's/^/| /' conftest.$ac_ext >&5 5405 5406 ac_cv_lib_Xt_main=no 5407 fi 5408 rm -f conftest.err conftest.$ac_objext \ 5409 conftest$ac_exeext conftest.$ac_ext 5410 LIBS=$ac_check_lib_save_LIBS 5411 fi 5412 echo "$as_me:$LINENO: result: $ac_cv_lib_Xt_main" >&5 5413 echo "${ECHO_T}$ac_cv_lib_Xt_main" >&6 5414 if test $ac_cv_lib_Xt_main = yes; then 5415 cat >>confdefs.h <<_ACEOF 5416 #define HAVE_LIBXT 1 5417 _ACEOF 5418 5419 LIBS="-lXt $LIBS" 5420 5421 fi 5422 5423 5424 5425 #checking for pthread libs 5426 echo "$as_me:$LINENO: checking for main in -lpthread" >&5 5427 echo $ECHO_N "checking for main in -lpthread... $ECHO_C" >&6 5428 if test "${ac_cv_lib_pthread_main+set}" = set; then 5429 echo $ECHO_N "(cached) $ECHO_C" >&6 5430 else 5431 ac_check_lib_save_LIBS=$LIBS 5432 LIBS="-lpthread $LIBS" 5433 cat >conftest.$ac_ext <<_ACEOF 5434 /* confdefs.h. */ 5435 _ACEOF 5436 cat confdefs.h >>conftest.$ac_ext 5437 cat >>conftest.$ac_ext <<_ACEOF 5438 /* end confdefs.h. */ 5439 5440 5441 int 5442 main () 5443 { 5444 main (); 5445 ; 5446 return 0; 5447 } 5448 _ACEOF 5449 rm -f conftest.$ac_objext conftest$ac_exeext 5450 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 5451 (eval $ac_link) 2>conftest.er1 5452 ac_status=$? 5453 grep -v '^ *+' conftest.er1 >conftest.err 5454 rm -f conftest.er1 5455 cat conftest.err >&5 5456 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5457 (exit $ac_status); } && 5458 { ac_try='test -z "$ac_c_werror_flag" 5459 || test ! -s conftest.err' 5460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5461 (eval $ac_try) 2>&5 5462 ac_status=$? 5463 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5464 (exit $ac_status); }; } && 5465 { ac_try='test -s conftest$ac_exeext' 5466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5467 (eval $ac_try) 2>&5 5468 ac_status=$? 5469 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5470 (exit $ac_status); }; }; then 5471 ac_cv_lib_pthread_main=yes 5472 else 5473 echo "$as_me: failed program was:" >&5 5474 sed 's/^/| /' conftest.$ac_ext >&5 5475 5476 ac_cv_lib_pthread_main=no 5477 fi 5478 rm -f conftest.err conftest.$ac_objext \ 5479 conftest$ac_exeext conftest.$ac_ext 5480 LIBS=$ac_check_lib_save_LIBS 5481 fi 5482 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_main" >&5 5483 echo "${ECHO_T}$ac_cv_lib_pthread_main" >&6 5484 if test $ac_cv_lib_pthread_main = yes; then 5485 FOUND_pthread=yes 5486 fi 5487 5488 if test "$FOUND_pthread" = "yes" ; then 5489 LIBS="$LIBS -lpthread" 5490 fi 5491 5492 5493 5494 5495 # FIXME: Replace `main' with a function in `-lm': 5496 5497 echo "$as_me:$LINENO: checking for main in -lm" >&5 5498 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6 5499 if test "${ac_cv_lib_m_main+set}" = set; then 5500 echo $ECHO_N "(cached) $ECHO_C" >&6 5501 else 5502 ac_check_lib_save_LIBS=$LIBS 5503 LIBS="-lm $LIBS" 5504 cat >conftest.$ac_ext <<_ACEOF 5505 /* confdefs.h. */ 5506 _ACEOF 5507 cat confdefs.h >>conftest.$ac_ext 5508 cat >>conftest.$ac_ext <<_ACEOF 5509 /* end confdefs.h. */ 5510 5511 5512 int 5513 main () 5514 { 5515 main (); 5516 ; 5517 return 0; 5518 } 5519 _ACEOF 5520 rm -f conftest.$ac_objext conftest$ac_exeext 5521 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 5522 (eval $ac_link) 2>conftest.er1 5523 ac_status=$? 5524 grep -v '^ *+' conftest.er1 >conftest.err 5525 rm -f conftest.er1 5526 cat conftest.err >&5 5527 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5528 (exit $ac_status); } && 5529 { ac_try='test -z "$ac_c_werror_flag" 5530 || test ! -s conftest.err' 5531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5532 (eval $ac_try) 2>&5 5533 ac_status=$? 5534 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5535 (exit $ac_status); }; } && 5536 { ac_try='test -s conftest$ac_exeext' 5537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5538 (eval $ac_try) 2>&5 5539 ac_status=$? 5540 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5541 (exit $ac_status); }; }; then 5542 ac_cv_lib_m_main=yes 5543 else 5544 echo "$as_me: failed program was:" >&5 5545 sed 's/^/| /' conftest.$ac_ext >&5 5546 5547 ac_cv_lib_m_main=no 5548 fi 5549 rm -f conftest.err conftest.$ac_objext \ 5550 conftest$ac_exeext conftest.$ac_ext 5551 LIBS=$ac_check_lib_save_LIBS 5552 fi 5553 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 5554 echo "${ECHO_T}$ac_cv_lib_m_main" >&6 5555 if test $ac_cv_lib_m_main = yes; then 5556 cat >>confdefs.h <<_ACEOF 5557 #define HAVE_LIBM 1 5558 _ACEOF 5559 5560 LIBS="-lm $LIBS" 5561 5562 fi 5563 5564 5565 LIBS="$LIBS `pkg-config --libs gtk+-2.0`" 5566 5567 5568 # Checks for header files. 5569 echo "$as_me:$LINENO: checking for ANSI C header files" >&5 5570 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 5571 if test "${ac_cv_header_stdc+set}" = set; then 5572 echo $ECHO_N "(cached) $ECHO_C" >&6 5573 else 5574 cat >conftest.$ac_ext <<_ACEOF 5575 /* confdefs.h. */ 5576 _ACEOF 5577 cat confdefs.h >>conftest.$ac_ext 5578 cat >>conftest.$ac_ext <<_ACEOF 5579 /* end confdefs.h. */ 5580 #include <stdlib.h> 5581 #include <stdarg.h> 5582 #include <string.h> 5583 #include <float.h> 5584 5585 int 5586 main () 5587 { 5588 5589 ; 5590 return 0; 5591 } 5592 _ACEOF 5593 rm -f conftest.$ac_objext 5594 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 5595 (eval $ac_compile) 2>conftest.er1 5596 ac_status=$? 5597 grep -v '^ *+' conftest.er1 >conftest.err 5598 rm -f conftest.er1 5599 cat conftest.err >&5 5600 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5601 (exit $ac_status); } && 5602 { ac_try='test -z "$ac_c_werror_flag" 5603 || test ! -s conftest.err' 5604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5605 (eval $ac_try) 2>&5 5606 ac_status=$? 5607 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5608 (exit $ac_status); }; } && 5609 { ac_try='test -s conftest.$ac_objext' 5610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5611 (eval $ac_try) 2>&5 5612 ac_status=$? 5613 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5614 (exit $ac_status); }; }; then 5615 ac_cv_header_stdc=yes 5616 else 5617 echo "$as_me: failed program was:" >&5 5618 sed 's/^/| /' conftest.$ac_ext >&5 5619 5620 ac_cv_header_stdc=no 5621 fi 5622 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 5623 5624 if test $ac_cv_header_stdc = yes; then 5625 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 5626 cat >conftest.$ac_ext <<_ACEOF 5627 /* confdefs.h. */ 5628 _ACEOF 5629 cat confdefs.h >>conftest.$ac_ext 5630 cat >>conftest.$ac_ext <<_ACEOF 5631 /* end confdefs.h. */ 5632 #include <string.h> 5633 5634 _ACEOF 5635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 5636 $EGREP "memchr" >/dev/null 2>&1; then 5637 : 5638 else 5639 ac_cv_header_stdc=no 5640 fi 5641 rm -f conftest* 5642 5643 fi 5644 5645 if test $ac_cv_header_stdc = yes; then 5646 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 5647 cat >conftest.$ac_ext <<_ACEOF 5648 /* confdefs.h. */ 5649 _ACEOF 5650 cat confdefs.h >>conftest.$ac_ext 5651 cat >>conftest.$ac_ext <<_ACEOF 5652 /* end confdefs.h. */ 5653 #include <stdlib.h> 5654 5655 _ACEOF 5656 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 5657 $EGREP "free" >/dev/null 2>&1; then 5658 : 5659 else 5660 ac_cv_header_stdc=no 5661 fi 5662 rm -f conftest* 5663 5664 fi 5665 5666 if test $ac_cv_header_stdc = yes; then 5667 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 5668 if test "$cross_compiling" = yes; then 5669 : 5670 else 5671 cat >conftest.$ac_ext <<_ACEOF 5672 /* confdefs.h. */ 5673 _ACEOF 5674 cat confdefs.h >>conftest.$ac_ext 5675 cat >>conftest.$ac_ext <<_ACEOF 5676 /* end confdefs.h. */ 5677 #include <ctype.h> 5678 #if ((' ' & 0x0FF) == 0x020) 5679 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 5680 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 5681 #else 5682 # define ISLOWER(c) \ 5683 (('a' <= (c) && (c) <= 'i') \ 5684 || ('j' <= (c) && (c) <= 'r') \ 5685 || ('s' <= (c) && (c) <= 'z')) 5686 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) 5687 #endif 5688 5689 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 5690 int 5691 main () 5692 { 5693 int i; 5694 for (i = 0; i < 256; i++) 5695 if (XOR (islower (i), ISLOWER (i)) 5696 || toupper (i) != TOUPPER (i)) 5697 exit(2); 5698 exit (0); 5699 } 5700 _ACEOF 5701 rm -f conftest$ac_exeext 5702 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 5703 (eval $ac_link) 2>&5 5704 ac_status=$? 5705 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5706 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 5707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5708 (eval $ac_try) 2>&5 5709 ac_status=$? 5710 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5711 (exit $ac_status); }; }; then 5712 : 5713 else 5714 echo "$as_me: program exited with status $ac_status" >&5 5715 echo "$as_me: failed program was:" >&5 5716 sed 's/^/| /' conftest.$ac_ext >&5 5717 5718 ( exit $ac_status ) 5719 ac_cv_header_stdc=no 5720 fi 5721 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 5722 fi 5723 fi 5724 fi 5725 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 5726 echo "${ECHO_T}$ac_cv_header_stdc" >&6 5727 if test $ac_cv_header_stdc = yes; then 5728 5729 cat >>confdefs.h <<\_ACEOF 5730 #define STDC_HEADERS 1 5731 _ACEOF 5732 5733 fi 5734 5735 5736 5737 for ac_header in stdlib.h string.h 5342 fi 5343 5344 # checking for SDL-headers 5345 5346 for ac_header in SDL/SDL.h 5738 5347 do 5739 5348 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 5880 5489 _ACEOF 5881 5490 5491 else 5492 { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5 5493 echo "$as_me: error: cannot find SDL headers" >&2;} 5494 { (exit 1); exit 1; }; } 5882 5495 fi 5883 5496 … … 5885 5498 5886 5499 5887 # Checks for typedefs, structures, and compiler characteristics.5888 echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&55889 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&65890 if test "${ac_cv_ header_stdbool_h+set}" = set; then5500 # checking for SDL-lib 5501 echo "$as_me:$LINENO: checking for main in -lSDL" >&5 5502 echo $ECHO_N "checking for main in -lSDL... $ECHO_C" >&6 5503 if test "${ac_cv_lib_SDL_main+set}" = set; then 5891 5504 echo $ECHO_N "(cached) $ECHO_C" >&6 5892 5505 else 5893 cat >conftest.$ac_ext <<_ACEOF 5506 ac_check_lib_save_LIBS=$LIBS 5507 LIBS="-lSDL $LIBS" 5508 cat >conftest.$ac_ext <<_ACEOF 5894 5509 /* confdefs.h. */ 5895 5510 _ACEOF … … 5898 5513 /* end confdefs.h. */ 5899 5514 5900 #include <stdbool.h>5901 #ifndef bool5902 # error bool is not defined5903 #endif5904 #ifndef false5905 # error false is not defined5906 #endif5907 #if false5908 # error false is not 05909 #endif5910 #ifndef true5911 # error true is not defined5912 #endif5913 #if true != 15914 # error true is not 15915 #endif5916 #ifndef __bool_true_false_are_defined5917 # error __bool_true_false_are_defined is not defined5918 #endif5919 5920 struct s { _Bool s: 1; _Bool t; } s;5921 5922 char a[true == 1 ? 1 : -1];5923 char b[false == 0 ? 1 : -1];5924 char c[__bool_true_false_are_defined == 1 ? 1 : -1];5925 char d[(bool) -0.5 == true ? 1 : -1];5926 bool e = &s;5927 char f[(_Bool) -0.0 == false ? 1 : -1];5928 char g[true];5929 char h[sizeof (_Bool)];5930 char i[sizeof s.t];5931 5515 5932 5516 int 5933 5517 main () 5934 5518 { 5935 return !a + !b + !c + !d + !e + !f + !g + !h + !i;5519 main (); 5936 5520 ; 5937 5521 return 0; 5938 5522 } 5939 5523 _ACEOF 5940 rm -f conftest.$ac_objext 5941 if { (eval echo "$as_me:$LINENO: \"$ac_ compile\"") >&55942 (eval $ac_ compile) 2>conftest.er15524 rm -f conftest.$ac_objext conftest$ac_exeext 5525 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 5526 (eval $ac_link) 2>conftest.er1 5943 5527 ac_status=$? 5944 5528 grep -v '^ *+' conftest.er1 >conftest.err … … 5954 5538 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5955 5539 (exit $ac_status); }; } && 5956 { ac_try='test -s conftest .$ac_objext'5540 { ac_try='test -s conftest$ac_exeext' 5957 5541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5958 5542 (eval $ac_try) 2>&5 … … 5960 5544 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5961 5545 (exit $ac_status); }; }; then 5962 ac_cv_ header_stdbool_h=yes5546 ac_cv_lib_SDL_main=yes 5963 5547 else 5964 5548 echo "$as_me: failed program was:" >&5 5965 5549 sed 's/^/| /' conftest.$ac_ext >&5 5966 5550 5967 ac_cv_header_stdbool_h=no 5968 fi 5969 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 5970 fi 5971 echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 5972 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 5973 echo "$as_me:$LINENO: checking for _Bool" >&5 5974 echo $ECHO_N "checking for _Bool... $ECHO_C" >&6 5975 if test "${ac_cv_type__Bool+set}" = set; then 5976 echo $ECHO_N "(cached) $ECHO_C" >&6 5977 else 5978 cat >conftest.$ac_ext <<_ACEOF 5979 /* confdefs.h. */ 5980 _ACEOF 5981 cat confdefs.h >>conftest.$ac_ext 5982 cat >>conftest.$ac_ext <<_ACEOF 5983 /* end confdefs.h. */ 5984 $ac_includes_default 5985 int 5986 main () 5987 { 5988 if ((_Bool *) 0) 5989 return 0; 5990 if (sizeof (_Bool)) 5991 return 0; 5992 ; 5993 return 0; 5994 } 5995 _ACEOF 5996 rm -f conftest.$ac_objext 5997 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 5998 (eval $ac_compile) 2>conftest.er1 5999 ac_status=$? 6000 grep -v '^ *+' conftest.er1 >conftest.err 6001 rm -f conftest.er1 6002 cat conftest.err >&5 6003 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6004 (exit $ac_status); } && 6005 { ac_try='test -z "$ac_c_werror_flag" 6006 || test ! -s conftest.err' 6007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6008 (eval $ac_try) 2>&5 6009 ac_status=$? 6010 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6011 (exit $ac_status); }; } && 6012 { ac_try='test -s conftest.$ac_objext' 6013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6014 (eval $ac_try) 2>&5 6015 ac_status=$? 6016 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6017 (exit $ac_status); }; }; then 6018 ac_cv_type__Bool=yes 6019 else 6020 echo "$as_me: failed program was:" >&5 6021 sed 's/^/| /' conftest.$ac_ext >&5 6022 6023 ac_cv_type__Bool=no 6024 fi 6025 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 6026 fi 6027 echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 6028 echo "${ECHO_T}$ac_cv_type__Bool" >&6 6029 if test $ac_cv_type__Bool = yes; then 6030 6031 cat >>confdefs.h <<_ACEOF 6032 #define HAVE__BOOL 1 6033 _ACEOF 6034 6035 6036 fi 6037 6038 if test $ac_cv_header_stdbool_h = yes; then 6039 6040 cat >>confdefs.h <<\_ACEOF 6041 #define HAVE_STDBOOL_H 1 6042 _ACEOF 6043 6044 fi 6045 6046 6047 # Checks for library functions. 6048 6049 for ac_header in stdlib.h 5551 ac_cv_lib_SDL_main=no 5552 fi 5553 rm -f conftest.err conftest.$ac_objext \ 5554 conftest$ac_exeext conftest.$ac_ext 5555 LIBS=$ac_check_lib_save_LIBS 5556 fi 5557 echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_main" >&5 5558 echo "${ECHO_T}$ac_cv_lib_SDL_main" >&6 5559 if test $ac_cv_lib_SDL_main = yes; then 5560 FOUND_SDL=yes 5561 fi 5562 5563 if test "$FOUND_SDL" = "yes" ; then 5564 LIBS="$LIBS -lSDL" 5565 else 5566 echo "------------------" 5567 echo "SDL library not found." 5568 echo "please install the SDL library, which can be found at http://www.libsdl.org" 5569 echo "------------------" 5570 exit -1 5571 fi 5572 5573 5574 ## checking for SDL 5575 # SDL_VERSION=1.2.7 5576 # AM_PATH_SDL($SDL_VERSION, 5577 # :, 5578 # AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) 5579 # ) 5580 # CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" 5581 # LIBS="$LIBS $SDL_LIBS" 5582 ;; 5583 5584 ### OS X ### 5585 *darwin*) 5586 echo "OS X detected" 5587 5588 osX="yes" 5589 5590 CPPFLAGS="-I/sw/include $CPPFLAGS" 5591 # checking gl header 5592 5593 for ac_header in OpenGL/gl.h 6050 5594 do 6051 5595 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` … … 6192 5736 _ACEOF 6193 5737 5738 else 5739 { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5 5740 echo "$as_me: error: cannot find opengl headers" >&2;} 5741 { (exit 1); exit 1; }; } 5742 fi 5743 5744 done 5745 5746 # cheking for GLU-header 5747 5748 for ac_header in OpenGL/glu.h 5749 do 5750 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 5751 if eval "test \"\${$as_ac_Header+set}\" = set"; then 5752 echo "$as_me:$LINENO: checking for $ac_header" >&5 5753 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 5754 if eval "test \"\${$as_ac_Header+set}\" = set"; then 5755 echo $ECHO_N "(cached) $ECHO_C" >&6 5756 fi 5757 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 5758 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 5759 else 5760 # Is the header compilable? 5761 echo "$as_me:$LINENO: checking $ac_header usability" >&5 5762 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 5763 cat >conftest.$ac_ext <<_ACEOF 5764 /* confdefs.h. */ 5765 _ACEOF 5766 cat confdefs.h >>conftest.$ac_ext 5767 cat >>conftest.$ac_ext <<_ACEOF 5768 /* end confdefs.h. */ 5769 $ac_includes_default 5770 #include <$ac_header> 5771 _ACEOF 5772 rm -f conftest.$ac_objext 5773 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 5774 (eval $ac_compile) 2>conftest.er1 5775 ac_status=$? 5776 grep -v '^ *+' conftest.er1 >conftest.err 5777 rm -f conftest.er1 5778 cat conftest.err >&5 5779 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5780 (exit $ac_status); } && 5781 { ac_try='test -z "$ac_c_werror_flag" 5782 || test ! -s conftest.err' 5783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5784 (eval $ac_try) 2>&5 5785 ac_status=$? 5786 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5787 (exit $ac_status); }; } && 5788 { ac_try='test -s conftest.$ac_objext' 5789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5790 (eval $ac_try) 2>&5 5791 ac_status=$? 5792 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5793 (exit $ac_status); }; }; then 5794 ac_header_compiler=yes 5795 else 5796 echo "$as_me: failed program was:" >&5 5797 sed 's/^/| /' conftest.$ac_ext >&5 5798 5799 ac_header_compiler=no 5800 fi 5801 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 5802 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 5803 echo "${ECHO_T}$ac_header_compiler" >&6 5804 5805 # Is the header present? 5806 echo "$as_me:$LINENO: checking $ac_header presence" >&5 5807 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 5808 cat >conftest.$ac_ext <<_ACEOF 5809 /* confdefs.h. */ 5810 _ACEOF 5811 cat confdefs.h >>conftest.$ac_ext 5812 cat >>conftest.$ac_ext <<_ACEOF 5813 /* end confdefs.h. */ 5814 #include <$ac_header> 5815 _ACEOF 5816 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 5817 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 5818 ac_status=$? 5819 grep -v '^ *+' conftest.er1 >conftest.err 5820 rm -f conftest.er1 5821 cat conftest.err >&5 5822 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5823 (exit $ac_status); } >/dev/null; then 5824 if test -s conftest.err; then 5825 ac_cpp_err=$ac_c_preproc_warn_flag 5826 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 5827 else 5828 ac_cpp_err= 5829 fi 5830 else 5831 ac_cpp_err=yes 5832 fi 5833 if test -z "$ac_cpp_err"; then 5834 ac_header_preproc=yes 5835 else 5836 echo "$as_me: failed program was:" >&5 5837 sed 's/^/| /' conftest.$ac_ext >&5 5838 5839 ac_header_preproc=no 5840 fi 5841 rm -f conftest.err conftest.$ac_ext 5842 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 5843 echo "${ECHO_T}$ac_header_preproc" >&6 5844 5845 # So? What about this header? 5846 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 5847 yes:no: ) 5848 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 5849 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 5850 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 5851 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 5852 ac_header_preproc=yes 5853 ;; 5854 no:yes:* ) 5855 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 5856 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 5857 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 5858 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 5859 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 5860 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 5861 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 5862 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 5863 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 5864 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 5865 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 5866 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 5867 ( 5868 cat <<\_ASBOX 5869 ## ------------------------------------------- ## 5870 ## Report this to orxonox-dev@mail.datacore.ch ## 5871 ## ------------------------------------------- ## 5872 _ASBOX 5873 ) | 5874 sed "s/^/$as_me: WARNING: /" >&2 5875 ;; 5876 esac 5877 echo "$as_me:$LINENO: checking for $ac_header" >&5 5878 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 5879 if eval "test \"\${$as_ac_Header+set}\" = set"; then 5880 echo $ECHO_N "(cached) $ECHO_C" >&6 5881 else 5882 eval "$as_ac_Header=\$ac_header_preproc" 5883 fi 5884 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 5885 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 5886 5887 fi 5888 if test `eval echo '${'$as_ac_Header'}'` = yes; then 5889 cat >>confdefs.h <<_ACEOF 5890 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 5891 _ACEOF 5892 5893 else 5894 { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5 5895 echo "$as_me: error: cannot find opengl headers" >&2;} 5896 { (exit 1); exit 1; }; } 5897 fi 5898 5899 done 5900 5901 5902 LIBS="$LIBS -framework OpenGL" 5903 5904 # checking for SDL-headers 5905 # AC_CHECK_HEADERS(SDL/SDL.h ,, 5906 # [AC_MSG_ERROR([cannot find SDL headers]) ]) 5907 5908 ## checking for SDL 5909 # SDL_VERSION=1.2.7 5910 # AM_PATH_SDL($SDL_VERSION, 5911 # :, 5912 # AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) 5913 # ) 5914 5915 SDL_CFLAGS=`sdl-config --cflags` 5916 SDL_LIBS=`sdl-config --libs` 5917 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" 5918 LIBS="$LIBS $SDL_LIBS" 5919 5920 ;; 5921 5922 *) 5923 ;; 5924 esac 5925 5926 5927 5928 ## check for SDL_Image 5929 if test "$def_sdl_image" = "yes"; then 5930 # checking for SDL_image-headers 5931 5932 for ac_header in SDL/SDL_image.h 5933 do 5934 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 5935 if eval "test \"\${$as_ac_Header+set}\" = set"; then 5936 echo "$as_me:$LINENO: checking for $ac_header" >&5 5937 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 5938 if eval "test \"\${$as_ac_Header+set}\" = set"; then 5939 echo $ECHO_N "(cached) $ECHO_C" >&6 5940 fi 5941 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 5942 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 5943 else 5944 # Is the header compilable? 5945 echo "$as_me:$LINENO: checking $ac_header usability" >&5 5946 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 5947 cat >conftest.$ac_ext <<_ACEOF 5948 /* confdefs.h. */ 5949 _ACEOF 5950 cat confdefs.h >>conftest.$ac_ext 5951 cat >>conftest.$ac_ext <<_ACEOF 5952 /* end confdefs.h. */ 5953 $ac_includes_default 5954 #include <$ac_header> 5955 _ACEOF 5956 rm -f conftest.$ac_objext 5957 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 5958 (eval $ac_compile) 2>conftest.er1 5959 ac_status=$? 5960 grep -v '^ *+' conftest.er1 >conftest.err 5961 rm -f conftest.er1 5962 cat conftest.err >&5 5963 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5964 (exit $ac_status); } && 5965 { ac_try='test -z "$ac_c_werror_flag" 5966 || test ! -s conftest.err' 5967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5968 (eval $ac_try) 2>&5 5969 ac_status=$? 5970 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5971 (exit $ac_status); }; } && 5972 { ac_try='test -s conftest.$ac_objext' 5973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5974 (eval $ac_try) 2>&5 5975 ac_status=$? 5976 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5977 (exit $ac_status); }; }; then 5978 ac_header_compiler=yes 5979 else 5980 echo "$as_me: failed program was:" >&5 5981 sed 's/^/| /' conftest.$ac_ext >&5 5982 5983 ac_header_compiler=no 5984 fi 5985 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 5986 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 5987 echo "${ECHO_T}$ac_header_compiler" >&6 5988 5989 # Is the header present? 5990 echo "$as_me:$LINENO: checking $ac_header presence" >&5 5991 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 5992 cat >conftest.$ac_ext <<_ACEOF 5993 /* confdefs.h. */ 5994 _ACEOF 5995 cat confdefs.h >>conftest.$ac_ext 5996 cat >>conftest.$ac_ext <<_ACEOF 5997 /* end confdefs.h. */ 5998 #include <$ac_header> 5999 _ACEOF 6000 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 6001 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 6002 ac_status=$? 6003 grep -v '^ *+' conftest.er1 >conftest.err 6004 rm -f conftest.er1 6005 cat conftest.err >&5 6006 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6007 (exit $ac_status); } >/dev/null; then 6008 if test -s conftest.err; then 6009 ac_cpp_err=$ac_c_preproc_warn_flag 6010 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 6011 else 6012 ac_cpp_err= 6013 fi 6014 else 6015 ac_cpp_err=yes 6016 fi 6017 if test -z "$ac_cpp_err"; then 6018 ac_header_preproc=yes 6019 else 6020 echo "$as_me: failed program was:" >&5 6021 sed 's/^/| /' conftest.$ac_ext >&5 6022 6023 ac_header_preproc=no 6024 fi 6025 rm -f conftest.err conftest.$ac_ext 6026 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 6027 echo "${ECHO_T}$ac_header_preproc" >&6 6028 6029 # So? What about this header? 6030 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 6031 yes:no: ) 6032 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 6033 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 6034 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 6035 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 6036 ac_header_preproc=yes 6037 ;; 6038 no:yes:* ) 6039 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 6040 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 6041 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 6042 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 6043 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 6044 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 6045 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 6046 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 6047 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 6048 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 6049 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 6050 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 6051 ( 6052 cat <<\_ASBOX 6053 ## ------------------------------------------- ## 6054 ## Report this to orxonox-dev@mail.datacore.ch ## 6055 ## ------------------------------------------- ## 6056 _ASBOX 6057 ) | 6058 sed "s/^/$as_me: WARNING: /" >&2 6059 ;; 6060 esac 6061 echo "$as_me:$LINENO: checking for $ac_header" >&5 6062 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 6063 if eval "test \"\${$as_ac_Header+set}\" = set"; then 6064 echo $ECHO_N "(cached) $ECHO_C" >&6 6065 else 6066 eval "$as_ac_Header=\$ac_header_preproc" 6067 fi 6068 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 6069 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 6070 6071 fi 6072 if test `eval echo '${'$as_ac_Header'}'` = yes; then 6073 cat >>confdefs.h <<_ACEOF 6074 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 6075 _ACEOF 6076 6077 else 6078 echo "sdl_image not found. falling back to other options"; def_sdl_image=no 6079 fi 6080 6081 done 6082 6083 fi 6084 if test "$def_sdl_image" = "yes"; then 6085 # checking for SDL_image-lib 6086 echo "$as_me:$LINENO: checking for main in -lSDL_image" >&5 6087 echo $ECHO_N "checking for main in -lSDL_image... $ECHO_C" >&6 6088 if test "${ac_cv_lib_SDL_image_main+set}" = set; then 6089 echo $ECHO_N "(cached) $ECHO_C" >&6 6090 else 6091 ac_check_lib_save_LIBS=$LIBS 6092 LIBS="-lSDL_image $LIBS" 6093 cat >conftest.$ac_ext <<_ACEOF 6094 /* confdefs.h. */ 6095 _ACEOF 6096 cat confdefs.h >>conftest.$ac_ext 6097 cat >>conftest.$ac_ext <<_ACEOF 6098 /* end confdefs.h. */ 6099 6100 6101 int 6102 main () 6103 { 6104 main (); 6105 ; 6106 return 0; 6107 } 6108 _ACEOF 6109 rm -f conftest.$ac_objext conftest$ac_exeext 6110 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 6111 (eval $ac_link) 2>conftest.er1 6112 ac_status=$? 6113 grep -v '^ *+' conftest.er1 >conftest.err 6114 rm -f conftest.er1 6115 cat conftest.err >&5 6116 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6117 (exit $ac_status); } && 6118 { ac_try='test -z "$ac_c_werror_flag" 6119 || test ! -s conftest.err' 6120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6121 (eval $ac_try) 2>&5 6122 ac_status=$? 6123 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6124 (exit $ac_status); }; } && 6125 { ac_try='test -s conftest$ac_exeext' 6126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6127 (eval $ac_try) 2>&5 6128 ac_status=$? 6129 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6130 (exit $ac_status); }; }; then 6131 ac_cv_lib_SDL_image_main=yes 6132 else 6133 echo "$as_me: failed program was:" >&5 6134 sed 's/^/| /' conftest.$ac_ext >&5 6135 6136 ac_cv_lib_SDL_image_main=no 6137 fi 6138 rm -f conftest.err conftest.$ac_objext \ 6139 conftest$ac_exeext conftest.$ac_ext 6140 LIBS=$ac_check_lib_save_LIBS 6141 fi 6142 echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_image_main" >&5 6143 echo "${ECHO_T}$ac_cv_lib_SDL_image_main" >&6 6144 if test $ac_cv_lib_SDL_image_main = yes; then 6145 FOUND_SDL_image=yes 6146 fi 6147 6148 if test "$FOUND_SDL_image" = "yes" ; then 6149 LIBS="$LIBS -lSDL_image" 6150 else 6151 echo "------------------" 6152 echo "SDL_image library not found." 6153 echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/" 6154 echo "------------------" 6155 exit -1 6156 fi 6157 fi 6158 6159 6160 if test "$def_sdl_image" = "no"; then 6161 ## checking for libjpeg 6162 6163 for ac_header in jpeglib.h 6164 do 6165 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 6166 if eval "test \"\${$as_ac_Header+set}\" = set"; then 6167 echo "$as_me:$LINENO: checking for $ac_header" >&5 6168 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 6169 if eval "test \"\${$as_ac_Header+set}\" = set"; then 6170 echo $ECHO_N "(cached) $ECHO_C" >&6 6171 fi 6172 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 6173 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 6174 else 6175 # Is the header compilable? 6176 echo "$as_me:$LINENO: checking $ac_header usability" >&5 6177 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 6178 cat >conftest.$ac_ext <<_ACEOF 6179 /* confdefs.h. */ 6180 _ACEOF 6181 cat confdefs.h >>conftest.$ac_ext 6182 cat >>conftest.$ac_ext <<_ACEOF 6183 /* end confdefs.h. */ 6184 $ac_includes_default 6185 #include <$ac_header> 6186 _ACEOF 6187 rm -f conftest.$ac_objext 6188 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 6189 (eval $ac_compile) 2>conftest.er1 6190 ac_status=$? 6191 grep -v '^ *+' conftest.er1 >conftest.err 6192 rm -f conftest.er1 6193 cat conftest.err >&5 6194 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6195 (exit $ac_status); } && 6196 { ac_try='test -z "$ac_c_werror_flag" 6197 || test ! -s conftest.err' 6198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6199 (eval $ac_try) 2>&5 6200 ac_status=$? 6201 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6202 (exit $ac_status); }; } && 6203 { ac_try='test -s conftest.$ac_objext' 6204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6205 (eval $ac_try) 2>&5 6206 ac_status=$? 6207 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6208 (exit $ac_status); }; }; then 6209 ac_header_compiler=yes 6210 else 6211 echo "$as_me: failed program was:" >&5 6212 sed 's/^/| /' conftest.$ac_ext >&5 6213 6214 ac_header_compiler=no 6215 fi 6216 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 6217 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 6218 echo "${ECHO_T}$ac_header_compiler" >&6 6219 6220 # Is the header present? 6221 echo "$as_me:$LINENO: checking $ac_header presence" >&5 6222 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 6223 cat >conftest.$ac_ext <<_ACEOF 6224 /* confdefs.h. */ 6225 _ACEOF 6226 cat confdefs.h >>conftest.$ac_ext 6227 cat >>conftest.$ac_ext <<_ACEOF 6228 /* end confdefs.h. */ 6229 #include <$ac_header> 6230 _ACEOF 6231 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 6232 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 6233 ac_status=$? 6234 grep -v '^ *+' conftest.er1 >conftest.err 6235 rm -f conftest.er1 6236 cat conftest.err >&5 6237 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6238 (exit $ac_status); } >/dev/null; then 6239 if test -s conftest.err; then 6240 ac_cpp_err=$ac_c_preproc_warn_flag 6241 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 6242 else 6243 ac_cpp_err= 6244 fi 6245 else 6246 ac_cpp_err=yes 6247 fi 6248 if test -z "$ac_cpp_err"; then 6249 ac_header_preproc=yes 6250 else 6251 echo "$as_me: failed program was:" >&5 6252 sed 's/^/| /' conftest.$ac_ext >&5 6253 6254 ac_header_preproc=no 6255 fi 6256 rm -f conftest.err conftest.$ac_ext 6257 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 6258 echo "${ECHO_T}$ac_header_preproc" >&6 6259 6260 # So? What about this header? 6261 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 6262 yes:no: ) 6263 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 6264 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 6265 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 6266 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 6267 ac_header_preproc=yes 6268 ;; 6269 no:yes:* ) 6270 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 6271 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 6272 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 6273 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 6274 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 6275 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 6276 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 6277 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 6278 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 6279 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 6280 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 6281 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 6282 ( 6283 cat <<\_ASBOX 6284 ## ------------------------------------------- ## 6285 ## Report this to orxonox-dev@mail.datacore.ch ## 6286 ## ------------------------------------------- ## 6287 _ASBOX 6288 ) | 6289 sed "s/^/$as_me: WARNING: /" >&2 6290 ;; 6291 esac 6292 echo "$as_me:$LINENO: checking for $ac_header" >&5 6293 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 6294 if eval "test \"\${$as_ac_Header+set}\" = set"; then 6295 echo $ECHO_N "(cached) $ECHO_C" >&6 6296 else 6297 eval "$as_ac_Header=\$ac_header_preproc" 6298 fi 6299 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 6300 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 6301 6302 fi 6303 if test `eval echo '${'$as_ac_Header'}'` = yes; then 6304 cat >>confdefs.h <<_ACEOF 6305 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 6306 _ACEOF 6307 jpegHeader="yes" 6308 else 6309 jpegHeader="no" 6310 fi 6311 6312 done 6313 6314 if test $jpegHeader = "no"; then 6315 echo " not including jpeg." 6316 else 6317 echo "$as_me:$LINENO: checking for main in -ljpeg" >&5 6318 echo $ECHO_N "checking for main in -ljpeg... $ECHO_C" >&6 6319 if test "${ac_cv_lib_jpeg_main+set}" = set; then 6320 echo $ECHO_N "(cached) $ECHO_C" >&6 6321 else 6322 ac_check_lib_save_LIBS=$LIBS 6323 LIBS="-ljpeg $LIBS" 6324 cat >conftest.$ac_ext <<_ACEOF 6325 /* confdefs.h. */ 6326 _ACEOF 6327 cat confdefs.h >>conftest.$ac_ext 6328 cat >>conftest.$ac_ext <<_ACEOF 6329 /* end confdefs.h. */ 6330 6331 6332 int 6333 main () 6334 { 6335 main (); 6336 ; 6337 return 0; 6338 } 6339 _ACEOF 6340 rm -f conftest.$ac_objext conftest$ac_exeext 6341 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 6342 (eval $ac_link) 2>conftest.er1 6343 ac_status=$? 6344 grep -v '^ *+' conftest.er1 >conftest.err 6345 rm -f conftest.er1 6346 cat conftest.err >&5 6347 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6348 (exit $ac_status); } && 6349 { ac_try='test -z "$ac_c_werror_flag" 6350 || test ! -s conftest.err' 6351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6352 (eval $ac_try) 2>&5 6353 ac_status=$? 6354 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6355 (exit $ac_status); }; } && 6356 { ac_try='test -s conftest$ac_exeext' 6357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6358 (eval $ac_try) 2>&5 6359 ac_status=$? 6360 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6361 (exit $ac_status); }; }; then 6362 ac_cv_lib_jpeg_main=yes 6363 else 6364 echo "$as_me: failed program was:" >&5 6365 sed 's/^/| /' conftest.$ac_ext >&5 6366 6367 ac_cv_lib_jpeg_main=no 6368 fi 6369 rm -f conftest.err conftest.$ac_objext \ 6370 conftest$ac_exeext conftest.$ac_ext 6371 LIBS=$ac_check_lib_save_LIBS 6372 fi 6373 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_main" >&5 6374 echo "${ECHO_T}$ac_cv_lib_jpeg_main" >&6 6375 if test $ac_cv_lib_jpeg_main = yes; then 6376 FOUND_jpeg=yes 6377 fi 6378 6379 if test "$FOUND_jpeg" = "yes" ; then 6380 LIBS="$LIBS -ljpeg" 6381 else 6382 echo "------------------" 6383 echo "jpeg library not found." 6384 echo "please install the jpeg library from the Independent JPEG Group, which can be found at http://www.ijg.org" 6385 echo "------------------" 6386 exit -1 6387 fi 6388 fi 6389 6390 ## checking for libpng 6391 6392 for ac_header in png.h 6393 do 6394 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 6395 if eval "test \"\${$as_ac_Header+set}\" = set"; then 6396 echo "$as_me:$LINENO: checking for $ac_header" >&5 6397 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 6398 if eval "test \"\${$as_ac_Header+set}\" = set"; then 6399 echo $ECHO_N "(cached) $ECHO_C" >&6 6400 fi 6401 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 6402 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 6403 else 6404 # Is the header compilable? 6405 echo "$as_me:$LINENO: checking $ac_header usability" >&5 6406 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 6407 cat >conftest.$ac_ext <<_ACEOF 6408 /* confdefs.h. */ 6409 _ACEOF 6410 cat confdefs.h >>conftest.$ac_ext 6411 cat >>conftest.$ac_ext <<_ACEOF 6412 /* end confdefs.h. */ 6413 $ac_includes_default 6414 #include <$ac_header> 6415 _ACEOF 6416 rm -f conftest.$ac_objext 6417 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 6418 (eval $ac_compile) 2>conftest.er1 6419 ac_status=$? 6420 grep -v '^ *+' conftest.er1 >conftest.err 6421 rm -f conftest.er1 6422 cat conftest.err >&5 6423 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6424 (exit $ac_status); } && 6425 { ac_try='test -z "$ac_c_werror_flag" 6426 || test ! -s conftest.err' 6427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6428 (eval $ac_try) 2>&5 6429 ac_status=$? 6430 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6431 (exit $ac_status); }; } && 6432 { ac_try='test -s conftest.$ac_objext' 6433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6434 (eval $ac_try) 2>&5 6435 ac_status=$? 6436 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6437 (exit $ac_status); }; }; then 6438 ac_header_compiler=yes 6439 else 6440 echo "$as_me: failed program was:" >&5 6441 sed 's/^/| /' conftest.$ac_ext >&5 6442 6443 ac_header_compiler=no 6444 fi 6445 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 6446 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 6447 echo "${ECHO_T}$ac_header_compiler" >&6 6448 6449 # Is the header present? 6450 echo "$as_me:$LINENO: checking $ac_header presence" >&5 6451 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 6452 cat >conftest.$ac_ext <<_ACEOF 6453 /* confdefs.h. */ 6454 _ACEOF 6455 cat confdefs.h >>conftest.$ac_ext 6456 cat >>conftest.$ac_ext <<_ACEOF 6457 /* end confdefs.h. */ 6458 #include <$ac_header> 6459 _ACEOF 6460 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 6461 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 6462 ac_status=$? 6463 grep -v '^ *+' conftest.er1 >conftest.err 6464 rm -f conftest.er1 6465 cat conftest.err >&5 6466 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6467 (exit $ac_status); } >/dev/null; then 6468 if test -s conftest.err; then 6469 ac_cpp_err=$ac_c_preproc_warn_flag 6470 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 6471 else 6472 ac_cpp_err= 6473 fi 6474 else 6475 ac_cpp_err=yes 6476 fi 6477 if test -z "$ac_cpp_err"; then 6478 ac_header_preproc=yes 6479 else 6480 echo "$as_me: failed program was:" >&5 6481 sed 's/^/| /' conftest.$ac_ext >&5 6482 6483 ac_header_preproc=no 6484 fi 6485 rm -f conftest.err conftest.$ac_ext 6486 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 6487 echo "${ECHO_T}$ac_header_preproc" >&6 6488 6489 # So? What about this header? 6490 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 6491 yes:no: ) 6492 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 6493 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 6494 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 6495 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 6496 ac_header_preproc=yes 6497 ;; 6498 no:yes:* ) 6499 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 6500 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 6501 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 6502 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 6503 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 6504 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 6505 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 6506 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 6507 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 6508 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 6509 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 6510 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 6511 ( 6512 cat <<\_ASBOX 6513 ## ------------------------------------------- ## 6514 ## Report this to orxonox-dev@mail.datacore.ch ## 6515 ## ------------------------------------------- ## 6516 _ASBOX 6517 ) | 6518 sed "s/^/$as_me: WARNING: /" >&2 6519 ;; 6520 esac 6521 echo "$as_me:$LINENO: checking for $ac_header" >&5 6522 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 6523 if eval "test \"\${$as_ac_Header+set}\" = set"; then 6524 echo $ECHO_N "(cached) $ECHO_C" >&6 6525 else 6526 eval "$as_ac_Header=\$ac_header_preproc" 6527 fi 6528 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 6529 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 6530 6531 fi 6532 if test `eval echo '${'$as_ac_Header'}'` = yes; then 6533 cat >>confdefs.h <<_ACEOF 6534 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 6535 _ACEOF 6536 pngHeader="yes" 6537 else 6538 pngHeader="no" 6539 fi 6540 6541 done 6542 6543 if test $pngHeader = "no"; then 6544 echo " not including png." 6545 else 6546 echo "$as_me:$LINENO: checking for main in -lpng" >&5 6547 echo $ECHO_N "checking for main in -lpng... $ECHO_C" >&6 6548 if test "${ac_cv_lib_png_main+set}" = set; then 6549 echo $ECHO_N "(cached) $ECHO_C" >&6 6550 else 6551 ac_check_lib_save_LIBS=$LIBS 6552 LIBS="-lpng $LIBS" 6553 cat >conftest.$ac_ext <<_ACEOF 6554 /* confdefs.h. */ 6555 _ACEOF 6556 cat confdefs.h >>conftest.$ac_ext 6557 cat >>conftest.$ac_ext <<_ACEOF 6558 /* end confdefs.h. */ 6559 6560 6561 int 6562 main () 6563 { 6564 main (); 6565 ; 6566 return 0; 6567 } 6568 _ACEOF 6569 rm -f conftest.$ac_objext conftest$ac_exeext 6570 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 6571 (eval $ac_link) 2>conftest.er1 6572 ac_status=$? 6573 grep -v '^ *+' conftest.er1 >conftest.err 6574 rm -f conftest.er1 6575 cat conftest.err >&5 6576 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6577 (exit $ac_status); } && 6578 { ac_try='test -z "$ac_c_werror_flag" 6579 || test ! -s conftest.err' 6580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6581 (eval $ac_try) 2>&5 6582 ac_status=$? 6583 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6584 (exit $ac_status); }; } && 6585 { ac_try='test -s conftest$ac_exeext' 6586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6587 (eval $ac_try) 2>&5 6588 ac_status=$? 6589 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6590 (exit $ac_status); }; }; then 6591 ac_cv_lib_png_main=yes 6592 else 6593 echo "$as_me: failed program was:" >&5 6594 sed 's/^/| /' conftest.$ac_ext >&5 6595 6596 ac_cv_lib_png_main=no 6597 fi 6598 rm -f conftest.err conftest.$ac_objext \ 6599 conftest$ac_exeext conftest.$ac_ext 6600 LIBS=$ac_check_lib_save_LIBS 6601 fi 6602 echo "$as_me:$LINENO: result: $ac_cv_lib_png_main" >&5 6603 echo "${ECHO_T}$ac_cv_lib_png_main" >&6 6604 if test $ac_cv_lib_png_main = yes; then 6605 FOUND_png=yes 6606 fi 6607 6608 if test "$FOUND_png" = "yes" ; then 6609 LIBS="$LIBS -lpng" 6610 else 6611 echo "------------------" 6612 echo "png library not found." 6613 echo "please install the png library, which can be found at http://libpng.org/pub/png/libpng.html" 6614 echo "------------------" 6615 exit -1 6616 fi 6617 fi 6618 fi 6619 6620 ## checking for GTK 6621 if test "$def_gtk" = yes; then 6622 6623 #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no) 6624 echo "$as_me:$LINENO: checking for gtk2.0" >&5 6625 echo $ECHO_N "checking for gtk2.0... $ECHO_C" >&6 6626 if `pkg-config --exists gtk+-2.0`; then 6627 echo "yes" 6628 have_gtk2=yes 6629 GTK2_LIBS=`pkg-config --libs gtk+-2.0` 6630 GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0` 6631 6632 cat >>confdefs.h <<_ACEOF 6633 #define HAVE_GTK2 1 6634 _ACEOF 6635 6636 else 6637 echo "no" 6638 fi 6639 6640 fi 6641 6642 6643 6644 6645 if test x$have_gtk2 = xyes; then 6646 HAVE_GTK2_TRUE= 6647 HAVE_GTK2_FALSE='#' 6648 else 6649 HAVE_GTK2_TRUE='#' 6650 HAVE_GTK2_FALSE= 6651 fi 6652 6653 6654 6655 6656 #checking for pthread libs 6657 # AC_CHECK_LIB([pthread], [main], FOUND_pthread=yes) 6658 # if test "$FOUND_pthread" = "yes" ; then 6659 # LIBS="$LIBS -lpthread" 6660 # fi 6661 6662 6663 # FIXME: Replace `main' with a function in `-lm': 6664 6665 echo "$as_me:$LINENO: checking for main in -lm" >&5 6666 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6 6667 if test "${ac_cv_lib_m_main+set}" = set; then 6668 echo $ECHO_N "(cached) $ECHO_C" >&6 6669 else 6670 ac_check_lib_save_LIBS=$LIBS 6671 LIBS="-lm $LIBS" 6672 cat >conftest.$ac_ext <<_ACEOF 6673 /* confdefs.h. */ 6674 _ACEOF 6675 cat confdefs.h >>conftest.$ac_ext 6676 cat >>conftest.$ac_ext <<_ACEOF 6677 /* end confdefs.h. */ 6678 6679 6680 int 6681 main () 6682 { 6683 main (); 6684 ; 6685 return 0; 6686 } 6687 _ACEOF 6688 rm -f conftest.$ac_objext conftest$ac_exeext 6689 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 6690 (eval $ac_link) 2>conftest.er1 6691 ac_status=$? 6692 grep -v '^ *+' conftest.er1 >conftest.err 6693 rm -f conftest.er1 6694 cat conftest.err >&5 6695 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6696 (exit $ac_status); } && 6697 { ac_try='test -z "$ac_c_werror_flag" 6698 || test ! -s conftest.err' 6699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6700 (eval $ac_try) 2>&5 6701 ac_status=$? 6702 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6703 (exit $ac_status); }; } && 6704 { ac_try='test -s conftest$ac_exeext' 6705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6706 (eval $ac_try) 2>&5 6707 ac_status=$? 6708 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6709 (exit $ac_status); }; }; then 6710 ac_cv_lib_m_main=yes 6711 else 6712 echo "$as_me: failed program was:" >&5 6713 sed 's/^/| /' conftest.$ac_ext >&5 6714 6715 ac_cv_lib_m_main=no 6716 fi 6717 rm -f conftest.err conftest.$ac_objext \ 6718 conftest$ac_exeext conftest.$ac_ext 6719 LIBS=$ac_check_lib_save_LIBS 6720 fi 6721 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 6722 echo "${ECHO_T}$ac_cv_lib_m_main" >&6 6723 if test $ac_cv_lib_m_main = yes; then 6724 cat >>confdefs.h <<_ACEOF 6725 #define HAVE_LIBM 1 6726 _ACEOF 6727 6728 LIBS="-lm $LIBS" 6729 6730 fi 6731 6732 6733 6734 # Checks for header files. 6735 echo "$as_me:$LINENO: checking for ANSI C header files" >&5 6736 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 6737 if test "${ac_cv_header_stdc+set}" = set; then 6738 echo $ECHO_N "(cached) $ECHO_C" >&6 6739 else 6740 cat >conftest.$ac_ext <<_ACEOF 6741 /* confdefs.h. */ 6742 _ACEOF 6743 cat confdefs.h >>conftest.$ac_ext 6744 cat >>conftest.$ac_ext <<_ACEOF 6745 /* end confdefs.h. */ 6746 #include <stdlib.h> 6747 #include <stdarg.h> 6748 #include <string.h> 6749 #include <float.h> 6750 6751 int 6752 main () 6753 { 6754 6755 ; 6756 return 0; 6757 } 6758 _ACEOF 6759 rm -f conftest.$ac_objext 6760 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 6761 (eval $ac_compile) 2>conftest.er1 6762 ac_status=$? 6763 grep -v '^ *+' conftest.er1 >conftest.err 6764 rm -f conftest.er1 6765 cat conftest.err >&5 6766 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6767 (exit $ac_status); } && 6768 { ac_try='test -z "$ac_c_werror_flag" 6769 || test ! -s conftest.err' 6770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6771 (eval $ac_try) 2>&5 6772 ac_status=$? 6773 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6774 (exit $ac_status); }; } && 6775 { ac_try='test -s conftest.$ac_objext' 6776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6777 (eval $ac_try) 2>&5 6778 ac_status=$? 6779 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6780 (exit $ac_status); }; }; then 6781 ac_cv_header_stdc=yes 6782 else 6783 echo "$as_me: failed program was:" >&5 6784 sed 's/^/| /' conftest.$ac_ext >&5 6785 6786 ac_cv_header_stdc=no 6787 fi 6788 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 6789 6790 if test $ac_cv_header_stdc = yes; then 6791 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 6792 cat >conftest.$ac_ext <<_ACEOF 6793 /* confdefs.h. */ 6794 _ACEOF 6795 cat confdefs.h >>conftest.$ac_ext 6796 cat >>conftest.$ac_ext <<_ACEOF 6797 /* end confdefs.h. */ 6798 #include <string.h> 6799 6800 _ACEOF 6801 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 6802 $EGREP "memchr" >/dev/null 2>&1; then 6803 : 6804 else 6805 ac_cv_header_stdc=no 6806 fi 6807 rm -f conftest* 6808 6809 fi 6810 6811 if test $ac_cv_header_stdc = yes; then 6812 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 6813 cat >conftest.$ac_ext <<_ACEOF 6814 /* confdefs.h. */ 6815 _ACEOF 6816 cat confdefs.h >>conftest.$ac_ext 6817 cat >>conftest.$ac_ext <<_ACEOF 6818 /* end confdefs.h. */ 6819 #include <stdlib.h> 6820 6821 _ACEOF 6822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 6823 $EGREP "free" >/dev/null 2>&1; then 6824 : 6825 else 6826 ac_cv_header_stdc=no 6827 fi 6828 rm -f conftest* 6829 6830 fi 6831 6832 if test $ac_cv_header_stdc = yes; then 6833 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 6834 if test "$cross_compiling" = yes; then 6835 : 6836 else 6837 cat >conftest.$ac_ext <<_ACEOF 6838 /* confdefs.h. */ 6839 _ACEOF 6840 cat confdefs.h >>conftest.$ac_ext 6841 cat >>conftest.$ac_ext <<_ACEOF 6842 /* end confdefs.h. */ 6843 #include <ctype.h> 6844 #if ((' ' & 0x0FF) == 0x020) 6845 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 6846 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 6847 #else 6848 # define ISLOWER(c) \ 6849 (('a' <= (c) && (c) <= 'i') \ 6850 || ('j' <= (c) && (c) <= 'r') \ 6851 || ('s' <= (c) && (c) <= 'z')) 6852 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) 6853 #endif 6854 6855 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 6856 int 6857 main () 6858 { 6859 int i; 6860 for (i = 0; i < 256; i++) 6861 if (XOR (islower (i), ISLOWER (i)) 6862 || toupper (i) != TOUPPER (i)) 6863 exit(2); 6864 exit (0); 6865 } 6866 _ACEOF 6867 rm -f conftest$ac_exeext 6868 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 6869 (eval $ac_link) 2>&5 6870 ac_status=$? 6871 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6872 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 6873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6874 (eval $ac_try) 2>&5 6875 ac_status=$? 6876 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6877 (exit $ac_status); }; }; then 6878 : 6879 else 6880 echo "$as_me: program exited with status $ac_status" >&5 6881 echo "$as_me: failed program was:" >&5 6882 sed 's/^/| /' conftest.$ac_ext >&5 6883 6884 ( exit $ac_status ) 6885 ac_cv_header_stdc=no 6886 fi 6887 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 6888 fi 6889 fi 6890 fi 6891 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 6892 echo "${ECHO_T}$ac_cv_header_stdc" >&6 6893 if test $ac_cv_header_stdc = yes; then 6894 6895 cat >>confdefs.h <<\_ACEOF 6896 #define STDC_HEADERS 1 6897 _ACEOF 6898 6899 fi 6900 6901 6902 6903 for ac_header in stdlib.h string.h 6904 do 6905 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 6906 if eval "test \"\${$as_ac_Header+set}\" = set"; then 6907 echo "$as_me:$LINENO: checking for $ac_header" >&5 6908 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 6909 if eval "test \"\${$as_ac_Header+set}\" = set"; then 6910 echo $ECHO_N "(cached) $ECHO_C" >&6 6911 fi 6912 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 6913 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 6914 else 6915 # Is the header compilable? 6916 echo "$as_me:$LINENO: checking $ac_header usability" >&5 6917 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 6918 cat >conftest.$ac_ext <<_ACEOF 6919 /* confdefs.h. */ 6920 _ACEOF 6921 cat confdefs.h >>conftest.$ac_ext 6922 cat >>conftest.$ac_ext <<_ACEOF 6923 /* end confdefs.h. */ 6924 $ac_includes_default 6925 #include <$ac_header> 6926 _ACEOF 6927 rm -f conftest.$ac_objext 6928 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 6929 (eval $ac_compile) 2>conftest.er1 6930 ac_status=$? 6931 grep -v '^ *+' conftest.er1 >conftest.err 6932 rm -f conftest.er1 6933 cat conftest.err >&5 6934 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6935 (exit $ac_status); } && 6936 { ac_try='test -z "$ac_c_werror_flag" 6937 || test ! -s conftest.err' 6938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6939 (eval $ac_try) 2>&5 6940 ac_status=$? 6941 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6942 (exit $ac_status); }; } && 6943 { ac_try='test -s conftest.$ac_objext' 6944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6945 (eval $ac_try) 2>&5 6946 ac_status=$? 6947 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6948 (exit $ac_status); }; }; then 6949 ac_header_compiler=yes 6950 else 6951 echo "$as_me: failed program was:" >&5 6952 sed 's/^/| /' conftest.$ac_ext >&5 6953 6954 ac_header_compiler=no 6955 fi 6956 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 6957 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 6958 echo "${ECHO_T}$ac_header_compiler" >&6 6959 6960 # Is the header present? 6961 echo "$as_me:$LINENO: checking $ac_header presence" >&5 6962 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 6963 cat >conftest.$ac_ext <<_ACEOF 6964 /* confdefs.h. */ 6965 _ACEOF 6966 cat confdefs.h >>conftest.$ac_ext 6967 cat >>conftest.$ac_ext <<_ACEOF 6968 /* end confdefs.h. */ 6969 #include <$ac_header> 6970 _ACEOF 6971 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 6972 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 6973 ac_status=$? 6974 grep -v '^ *+' conftest.er1 >conftest.err 6975 rm -f conftest.er1 6976 cat conftest.err >&5 6977 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6978 (exit $ac_status); } >/dev/null; then 6979 if test -s conftest.err; then 6980 ac_cpp_err=$ac_c_preproc_warn_flag 6981 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 6982 else 6983 ac_cpp_err= 6984 fi 6985 else 6986 ac_cpp_err=yes 6987 fi 6988 if test -z "$ac_cpp_err"; then 6989 ac_header_preproc=yes 6990 else 6991 echo "$as_me: failed program was:" >&5 6992 sed 's/^/| /' conftest.$ac_ext >&5 6993 6994 ac_header_preproc=no 6995 fi 6996 rm -f conftest.err conftest.$ac_ext 6997 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 6998 echo "${ECHO_T}$ac_header_preproc" >&6 6999 7000 # So? What about this header? 7001 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 7002 yes:no: ) 7003 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 7004 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 7005 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 7006 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 7007 ac_header_preproc=yes 7008 ;; 7009 no:yes:* ) 7010 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 7011 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 7012 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 7013 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 7014 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 7015 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 7016 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 7017 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 7018 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 7019 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 7020 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 7021 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 7022 ( 7023 cat <<\_ASBOX 7024 ## ------------------------------------------- ## 7025 ## Report this to orxonox-dev@mail.datacore.ch ## 7026 ## ------------------------------------------- ## 7027 _ASBOX 7028 ) | 7029 sed "s/^/$as_me: WARNING: /" >&2 7030 ;; 7031 esac 7032 echo "$as_me:$LINENO: checking for $ac_header" >&5 7033 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 7034 if eval "test \"\${$as_ac_Header+set}\" = set"; then 7035 echo $ECHO_N "(cached) $ECHO_C" >&6 7036 else 7037 eval "$as_ac_Header=\$ac_header_preproc" 7038 fi 7039 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 7040 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 7041 7042 fi 7043 if test `eval echo '${'$as_ac_Header'}'` = yes; then 7044 cat >>confdefs.h <<_ACEOF 7045 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 7046 _ACEOF 7047 7048 fi 7049 7050 done 7051 7052 7053 # Checks for typedefs, structures, and compiler characteristics. 7054 echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 7055 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6 7056 if test "${ac_cv_header_stdbool_h+set}" = set; then 7057 echo $ECHO_N "(cached) $ECHO_C" >&6 7058 else 7059 cat >conftest.$ac_ext <<_ACEOF 7060 /* confdefs.h. */ 7061 _ACEOF 7062 cat confdefs.h >>conftest.$ac_ext 7063 cat >>conftest.$ac_ext <<_ACEOF 7064 /* end confdefs.h. */ 7065 7066 #include <stdbool.h> 7067 #ifndef bool 7068 # error bool is not defined 7069 #endif 7070 #ifndef false 7071 # error false is not defined 7072 #endif 7073 #if false 7074 # error false is not 0 7075 #endif 7076 #ifndef true 7077 # error true is not defined 7078 #endif 7079 #if true != 1 7080 # error true is not 1 7081 #endif 7082 #ifndef __bool_true_false_are_defined 7083 # error __bool_true_false_are_defined is not defined 7084 #endif 7085 7086 struct s { _Bool s: 1; _Bool t; } s; 7087 7088 char a[true == 1 ? 1 : -1]; 7089 char b[false == 0 ? 1 : -1]; 7090 char c[__bool_true_false_are_defined == 1 ? 1 : -1]; 7091 char d[(bool) -0.5 == true ? 1 : -1]; 7092 bool e = &s; 7093 char f[(_Bool) -0.0 == false ? 1 : -1]; 7094 char g[true]; 7095 char h[sizeof (_Bool)]; 7096 char i[sizeof s.t]; 7097 7098 int 7099 main () 7100 { 7101 return !a + !b + !c + !d + !e + !f + !g + !h + !i; 7102 ; 7103 return 0; 7104 } 7105 _ACEOF 7106 rm -f conftest.$ac_objext 7107 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 7108 (eval $ac_compile) 2>conftest.er1 7109 ac_status=$? 7110 grep -v '^ *+' conftest.er1 >conftest.err 7111 rm -f conftest.er1 7112 cat conftest.err >&5 7113 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7114 (exit $ac_status); } && 7115 { ac_try='test -z "$ac_c_werror_flag" 7116 || test ! -s conftest.err' 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); }; } && 7122 { ac_try='test -s conftest.$ac_objext' 7123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7124 (eval $ac_try) 2>&5 7125 ac_status=$? 7126 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7127 (exit $ac_status); }; }; then 7128 ac_cv_header_stdbool_h=yes 7129 else 7130 echo "$as_me: failed program was:" >&5 7131 sed 's/^/| /' conftest.$ac_ext >&5 7132 7133 ac_cv_header_stdbool_h=no 7134 fi 7135 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7136 fi 7137 echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 7138 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 7139 echo "$as_me:$LINENO: checking for _Bool" >&5 7140 echo $ECHO_N "checking for _Bool... $ECHO_C" >&6 7141 if test "${ac_cv_type__Bool+set}" = set; then 7142 echo $ECHO_N "(cached) $ECHO_C" >&6 7143 else 7144 cat >conftest.$ac_ext <<_ACEOF 7145 /* confdefs.h. */ 7146 _ACEOF 7147 cat confdefs.h >>conftest.$ac_ext 7148 cat >>conftest.$ac_ext <<_ACEOF 7149 /* end confdefs.h. */ 7150 $ac_includes_default 7151 int 7152 main () 7153 { 7154 if ((_Bool *) 0) 7155 return 0; 7156 if (sizeof (_Bool)) 7157 return 0; 7158 ; 7159 return 0; 7160 } 7161 _ACEOF 7162 rm -f conftest.$ac_objext 7163 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 7164 (eval $ac_compile) 2>conftest.er1 7165 ac_status=$? 7166 grep -v '^ *+' conftest.er1 >conftest.err 7167 rm -f conftest.er1 7168 cat conftest.err >&5 7169 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7170 (exit $ac_status); } && 7171 { ac_try='test -z "$ac_c_werror_flag" 7172 || test ! -s conftest.err' 7173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7174 (eval $ac_try) 2>&5 7175 ac_status=$? 7176 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7177 (exit $ac_status); }; } && 7178 { ac_try='test -s conftest.$ac_objext' 7179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7180 (eval $ac_try) 2>&5 7181 ac_status=$? 7182 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7183 (exit $ac_status); }; }; then 7184 ac_cv_type__Bool=yes 7185 else 7186 echo "$as_me: failed program was:" >&5 7187 sed 's/^/| /' conftest.$ac_ext >&5 7188 7189 ac_cv_type__Bool=no 7190 fi 7191 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7192 fi 7193 echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 7194 echo "${ECHO_T}$ac_cv_type__Bool" >&6 7195 if test $ac_cv_type__Bool = yes; then 7196 7197 cat >>confdefs.h <<_ACEOF 7198 #define HAVE__BOOL 1 7199 _ACEOF 7200 7201 7202 fi 7203 7204 if test $ac_cv_header_stdbool_h = yes; then 7205 7206 cat >>confdefs.h <<\_ACEOF 7207 #define HAVE_STDBOOL_H 1 7208 _ACEOF 7209 7210 fi 7211 7212 7213 # Checks for library functions. 7214 7215 for ac_header in stdlib.h 7216 do 7217 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 7218 if eval "test \"\${$as_ac_Header+set}\" = set"; then 7219 echo "$as_me:$LINENO: checking for $ac_header" >&5 7220 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 7221 if eval "test \"\${$as_ac_Header+set}\" = set"; then 7222 echo $ECHO_N "(cached) $ECHO_C" >&6 7223 fi 7224 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 7225 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 7226 else 7227 # Is the header compilable? 7228 echo "$as_me:$LINENO: checking $ac_header usability" >&5 7229 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 7230 cat >conftest.$ac_ext <<_ACEOF 7231 /* confdefs.h. */ 7232 _ACEOF 7233 cat confdefs.h >>conftest.$ac_ext 7234 cat >>conftest.$ac_ext <<_ACEOF 7235 /* end confdefs.h. */ 7236 $ac_includes_default 7237 #include <$ac_header> 7238 _ACEOF 7239 rm -f conftest.$ac_objext 7240 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 7241 (eval $ac_compile) 2>conftest.er1 7242 ac_status=$? 7243 grep -v '^ *+' conftest.er1 >conftest.err 7244 rm -f conftest.er1 7245 cat conftest.err >&5 7246 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7247 (exit $ac_status); } && 7248 { ac_try='test -z "$ac_c_werror_flag" 7249 || test ! -s conftest.err' 7250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7251 (eval $ac_try) 2>&5 7252 ac_status=$? 7253 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7254 (exit $ac_status); }; } && 7255 { ac_try='test -s conftest.$ac_objext' 7256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7257 (eval $ac_try) 2>&5 7258 ac_status=$? 7259 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7260 (exit $ac_status); }; }; then 7261 ac_header_compiler=yes 7262 else 7263 echo "$as_me: failed program was:" >&5 7264 sed 's/^/| /' conftest.$ac_ext >&5 7265 7266 ac_header_compiler=no 7267 fi 7268 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7269 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 7270 echo "${ECHO_T}$ac_header_compiler" >&6 7271 7272 # Is the header present? 7273 echo "$as_me:$LINENO: checking $ac_header presence" >&5 7274 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 7275 cat >conftest.$ac_ext <<_ACEOF 7276 /* confdefs.h. */ 7277 _ACEOF 7278 cat confdefs.h >>conftest.$ac_ext 7279 cat >>conftest.$ac_ext <<_ACEOF 7280 /* end confdefs.h. */ 7281 #include <$ac_header> 7282 _ACEOF 7283 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 7284 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 7285 ac_status=$? 7286 grep -v '^ *+' conftest.er1 >conftest.err 7287 rm -f conftest.er1 7288 cat conftest.err >&5 7289 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7290 (exit $ac_status); } >/dev/null; then 7291 if test -s conftest.err; then 7292 ac_cpp_err=$ac_c_preproc_warn_flag 7293 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 7294 else 7295 ac_cpp_err= 7296 fi 7297 else 7298 ac_cpp_err=yes 7299 fi 7300 if test -z "$ac_cpp_err"; then 7301 ac_header_preproc=yes 7302 else 7303 echo "$as_me: failed program was:" >&5 7304 sed 's/^/| /' conftest.$ac_ext >&5 7305 7306 ac_header_preproc=no 7307 fi 7308 rm -f conftest.err conftest.$ac_ext 7309 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 7310 echo "${ECHO_T}$ac_header_preproc" >&6 7311 7312 # So? What about this header? 7313 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 7314 yes:no: ) 7315 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 7316 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 7317 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 7318 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 7319 ac_header_preproc=yes 7320 ;; 7321 no:yes:* ) 7322 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 7323 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 7324 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 7325 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 7326 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 7327 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 7328 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 7329 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 7330 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 7331 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 7332 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 7333 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 7334 ( 7335 cat <<\_ASBOX 7336 ## ------------------------------------------- ## 7337 ## Report this to orxonox-dev@mail.datacore.ch ## 7338 ## ------------------------------------------- ## 7339 _ASBOX 7340 ) | 7341 sed "s/^/$as_me: WARNING: /" >&2 7342 ;; 7343 esac 7344 echo "$as_me:$LINENO: checking for $ac_header" >&5 7345 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 7346 if eval "test \"\${$as_ac_Header+set}\" = set"; then 7347 echo $ECHO_N "(cached) $ECHO_C" >&6 7348 else 7349 eval "$as_ac_Header=\$ac_header_preproc" 7350 fi 7351 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 7352 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 7353 7354 fi 7355 if test `eval echo '${'$as_ac_Header'}'` = yes; then 7356 cat >>confdefs.h <<_ACEOF 7357 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 7358 _ACEOF 7359 6194 7360 fi 6195 7361 … … 6381 7547 6382 7548 6383 ac_config_files="$ac_config_files Makefile console/Makefile gui/Makefile src/Makefile"7549 ac_config_files="$ac_config_files Makefile src/console/Makefile src/gui/Makefile src/Makefile src/importer/Makefile" 6384 7550 6385 7551 cat >confcache <<\_ACEOF … … 6492 7658 Usually this means the macro was only invoked conditionally." >&5 6493 7659 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. 7660 Usually this means the macro was only invoked conditionally." >&2;} 7661 { (exit 1); exit 1; }; } 7662 fi 7663 if test -z "${DOXYGEN_TRUE}" && test -z "${DOXYGEN_FALSE}"; then 7664 { { echo "$as_me:$LINENO: error: conditional \"DOXYGEN\" was never defined. 7665 Usually this means the macro was only invoked conditionally." >&5 7666 echo "$as_me: error: conditional \"DOXYGEN\" was never defined. 7667 Usually this means the macro was only invoked conditionally." >&2;} 7668 { (exit 1); exit 1; }; } 7669 fi 7670 if test -z "${HAVE_GTK2_TRUE}" && test -z "${HAVE_GTK2_FALSE}"; then 7671 { { echo "$as_me:$LINENO: error: conditional \"HAVE_GTK2\" was never defined. 7672 Usually this means the macro was only invoked conditionally." >&5 7673 echo "$as_me: error: conditional \"HAVE_GTK2\" was never defined. 6494 7674 Usually this means the macro was only invoked conditionally." >&2;} 6495 7675 { (exit 1); exit 1; }; } … … 6766 7946 cat >&5 <<_CSEOF 6767 7947 6768 This file was extended by orxonox $as_me 0. 1-pre-alpha, which was7948 This file was extended by orxonox $as_me 0.2.0_alpha-r1, which was 6769 7949 generated by GNU Autoconf 2.59. Invocation command line was 6770 7950 … … 6829 8009 cat >>$CONFIG_STATUS <<_ACEOF 6830 8010 ac_cs_version="\\ 6831 orxonox config.status 0. 1-pre-alpha8011 orxonox config.status 0.2.0_alpha-r1 6832 8012 configured by $0, generated by GNU Autoconf 2.59, 6833 8013 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" … … 6940 8120 # Handling of arguments. 6941 8121 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; 6942 " console/Makefile" ) CONFIG_FILES="$CONFIG_FILESconsole/Makefile" ;;6943 " gui/Makefile" ) CONFIG_FILES="$CONFIG_FILESgui/Makefile" ;;8122 "src/console/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/console/Makefile" ;; 8123 "src/gui/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/gui/Makefile" ;; 6944 8124 "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; 8125 "src/importer/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/importer/Makefile" ;; 6945 8126 "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; 6946 8127 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; … … 7030 8211 s,@ECHO_T@,$ECHO_T,;t t 7031 8212 s,@LIBS@,$LIBS,;t t 8213 s,@build@,$build,;t t 8214 s,@build_cpu@,$build_cpu,;t t 8215 s,@build_vendor@,$build_vendor,;t t 8216 s,@build_os@,$build_os,;t t 8217 s,@host@,$host,;t t 8218 s,@host_cpu@,$host_cpu,;t t 8219 s,@host_vendor@,$host_vendor,;t t 8220 s,@host_os@,$host_os,;t t 8221 s,@target@,$target,;t t 8222 s,@target_cpu@,$target_cpu,;t t 8223 s,@target_vendor@,$target_vendor,;t t 8224 s,@target_os@,$target_os,;t t 7032 8225 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t 7033 8226 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t … … 7074 8267 s,@CPP@,$CPP,;t t 7075 8268 s,@EGREP@,$EGREP,;t t 8269 s,@DEBUG@,$DEBUG,;t t 8270 s,@DOXYGEN@,$DOXYGEN,;t t 8271 s,@DOXYGEN_TRUE@,$DOXYGEN_TRUE,;t t 8272 s,@DOXYGEN_FALSE@,$DOXYGEN_FALSE,;t t 7076 8273 s,@MSBITFIELDS@,$MSBITFIELDS,;t t 8274 s,@GTK2_LIBS@,$GTK2_LIBS,;t t 8275 s,@GTK2_CFLAGS@,$GTK2_CFLAGS,;t t 8276 s,@HAVE_GTK2_TRUE@,$HAVE_GTK2_TRUE,;t t 8277 s,@HAVE_GTK2_FALSE@,$HAVE_GTK2_FALSE,;t t 7077 8278 s,@LIBOBJS@,$LIBOBJS,;t t 7078 8279 s,@LTLIBOBJS@,$LTLIBOBJS,;t t -
orxonox/branches/buerli/configure.ac
r2707 r3238 3 3 4 4 AC_PREREQ(2.56) 5 AC_INIT(orxonox, 0.1-pre-alpha, orxonox-dev@mail.datacore.ch) 5 AC_INIT(orxonox, 0.2.0_alpha-r1, orxonox-dev@mail.datacore.ch) 6 7 # Detect the canonical host and target build environment. 8 AC_CANONICAL_BUILD 9 AC_CANONICAL_HOST 10 AC_CANONICAL_TARGET 11 12 6 13 AM_INIT_AUTOMAKE 7 14 … … 12 19 # Checks for programs. 13 20 AC_PROG_CXX 14 AC_PROG_CC 15 16 17 # checking gl header (has to be here because of a Linux error) 18 AC_CHECK_HEADERS(GL/gl.h ,, 19 [AC_MSG_ERROR([cannot find opengl headers]) ]) 20 21 21 AC_HEADER_STDC 22 23 ### CHECKING OPTIONAT ARGUMENTS 24 ## DEBUG-statement 25 DEBUG=no 26 AC_MSG_CHECKING([if DEBUG-mode should be enabled]) 27 AC_ARG_ENABLE([debug], 28 AC_HELP_STRING( [--enable-debug], [compiles in debug mode. Lots of debug info about the game.]), 29 DEBUG=$enableval) 30 31 if test "$DEBUG" = "no"; then 32 echo "no" 33 echo " -> Setting debuglevel to 1. Like this you can still see errors." 34 DEBUG=1 35 elif test "$DEBUG" = yes; then 36 echo "yes" 37 echo " -> Setting debuglevel to 3. HARD DEBUG MODE!!." 38 DEBUG=3 39 else 40 echo "yes set to $DEBUG" 41 fi 42 AC_DEFINE_UNQUOTED(DEBUG, $DEBUG, [in which debug mode we are]) 43 44 AC_SUBST(DEBUG) 45 46 ## GTK-disabled 47 AC_MSG_CHECKING([if gtk should be enabled]) 48 AC_ARG_WITH([gtk], 49 AC_HELP_STRING( [--without-gtk], 50 [Prevents GTK from being loaded]), [def_gtk=no], [def_gtk=yes]) 51 if test "$def_gtk" = yes; then 52 echo "yes" 53 fi 54 if test "$def_gtk" = no; then 55 echo "no" 56 fi 57 ### SDL_image-disable 58 def_sdl_image=yes 59 AC_MSG_CHECKING([if SDL_image should be enabled]) 60 AC_ARG_WITH([sdl_image], 61 AC_HELP_STRING( [--without-sdl-image], 62 [Prevents SDL_image from being loaded]), [def_sdl_image=no]) 63 if test "$def_sdl_image" = yes; then 64 echo "yes" 65 fi 66 if test "$def_sdl_image" = no; then 67 echo "no" 68 fi 69 70 71 ## PROGRAMM CHECKING 72 # checking for Doxygen 73 AC_PATH_PROG(DOXYGEN, doxygen) 74 AM_CONDITIONAL(DOXYGEN, test $DOXYGEN) 22 75 23 76 ### CHECKING FOR SYSTEM ### 24 77 25 78 AC_MSG_CHECKING([for System]) 26 case `uname` in 79 ## checking for openGL-environment and other sys-specific parameters 80 case "$target" in 27 81 ### WINDOWS ### 28 * MINGW*)82 *-*-mingw32*) 29 83 echo "mingw-WINDOWS detected" 30 84 … … 36 90 #done before loop 37 91 92 # checking gl header 93 AC_CHECK_HEADERS(GL/gl.h ,, 94 [AC_MSG_ERROR([cannot find opengl headers]) ]) 38 95 # checking for Windows openGl library 39 96 AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h") … … 64 121 fi 65 122 66 67 123 # checking for mingw32 68 124 AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes) … … 77 133 AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes) 78 134 if test "$FOUND_sdlmain" = "yes" ; then 79 80 else 81 82 83 84 85 135 LIBS="$LIBS -lsdlmain" 136 else 137 echo "------------------" 138 echo "SDL library not found." 139 echo "please install the SDL library, which can be found at http://www.libsdl.org" 140 echo "------------------" 141 exit 1 86 142 fi 87 143 AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes) 88 144 if test "$FOUND_sdl" = "yes" ; then 89 90 else 91 92 93 94 95 145 LIBS="$LIBS -lsdl" 146 else 147 echo "------------------" 148 echo "SDL library not found." 149 echo "please install the SDL library, which can be found at http://www.libsdl.org" 150 echo "------------------" 151 exit -1 96 152 fi 97 153 … … 99 155 100 156 ### LINUX ### 101 * Linux*)157 *-*-linux*) 102 158 echo "Linux detected" 103 159 104 160 Linux="yes" 105 161 162 CPPFLAGS="-I/usr/X11R6/include" 163 LDFLAGS="-L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib $LDFLAGS" 106 164 # checking gl header 107 #has been done befor linux-check 165 AC_CHECK_HEADERS(GL/gl.h ,, 166 [AC_MSG_ERROR([cannot find opengl headers]) ]) 108 167 109 168 # checking for Unix GL … … 138 197 [AC_MSG_ERROR([cannot find SDL headers]) ]) 139 198 199 # checking for SDL-lib 140 200 AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes) 141 201 if test "$FOUND_SDL" = "yes" ; then 142 202 LIBS="$LIBS -lSDL" 143 203 else 144 145 146 147 148 204 echo "------------------" 205 echo "SDL library not found." 206 echo "please install the SDL library, which can be found at http://www.libsdl.org" 207 echo "------------------" 208 exit -1 149 209 fi 150 210 211 212 ## checking for SDL 213 # SDL_VERSION=1.2.7 214 # AM_PATH_SDL($SDL_VERSION, 215 # :, 216 # AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) 217 # ) 218 # CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" 219 # LIBS="$LIBS $SDL_LIBS" 151 220 ;; 221 222 ### OS X ### 223 *darwin*) 224 echo "OS X detected" 225 226 osX="yes" 227 228 CPPFLAGS="-I/sw/include $CPPFLAGS" 229 # checking gl header 230 AC_CHECK_HEADERS(OpenGL/gl.h ,, 231 [AC_MSG_ERROR([cannot find opengl headers]) ]) 232 # cheking for GLU-header 233 AC_CHECK_HEADERS(OpenGL/glu.h ,, 234 [AC_MSG_ERROR([cannot find opengl headers]) ]) 235 236 LIBS="$LIBS -framework OpenGL" 237 238 # checking for SDL-headers 239 # AC_CHECK_HEADERS(SDL/SDL.h ,, 240 # [AC_MSG_ERROR([cannot find SDL headers]) ]) 241 242 ## checking for SDL 243 # SDL_VERSION=1.2.7 244 # AM_PATH_SDL($SDL_VERSION, 245 # :, 246 # AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) 247 # ) 248 249 SDL_CFLAGS=`sdl-config --cflags` 250 SDL_LIBS=`sdl-config --libs` 251 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" 252 LIBS="$LIBS $SDL_LIBS" 253 254 ;; 255 152 256 *) 153 mingw="no"154 257 ;; 155 258 esac 156 AC_MSG_RESULT([$mingw]) 259 157 260 AC_SUBST(MSBITFIELDS) 158 261 159 #### Checking for LIBraries. 160 161 # FIXME: Replace `main' with a function in `-lOSMesa': 162 AC_CHECK_LIB([OSMesa], [main]) 163 # FIXME: Replace `main' with a function in `-lX11': 164 AC_CHECK_LIB([X11], [main]) 165 # FIXME: Replace `main' with a function in `-lXt': 166 AC_CHECK_LIB([Xt], [main]) 262 ## check for SDL_Image 263 if test "$def_sdl_image" = "yes"; then 264 # checking for SDL_image-headers 265 AC_CHECK_HEADERS(SDL/SDL_image.h ,, 266 [echo "sdl_image not found. falling back to other options"; def_sdl_image=no ]) 267 fi 268 if test "$def_sdl_image" = "yes"; then 269 # checking for SDL_image-lib 270 AC_CHECK_LIB([SDL_image], [main], FOUND_SDL_image=yes) 271 if test "$FOUND_SDL_image" = "yes" ; then 272 LIBS="$LIBS -lSDL_image" 273 else 274 echo "------------------" 275 echo "SDL_image library not found." 276 echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/" 277 echo "------------------" 278 exit -1 279 fi 280 fi 281 282 283 if test "$def_sdl_image" = "no"; then 284 ## checking for libjpeg 285 AC_CHECK_HEADERS(jpeglib.h ,jpegHeader="yes", 286 jpegHeader="no") 287 if test $jpegHeader = "no"; then 288 echo " not including jpeg." 289 else 290 AC_CHECK_LIB([jpeg], [main], FOUND_jpeg=yes) 291 if test "$FOUND_jpeg" = "yes" ; then 292 LIBS="$LIBS -ljpeg" 293 else 294 echo "------------------" 295 echo "jpeg library not found." 296 echo "please install the jpeg library from the Independent JPEG Group, which can be found at http://www.ijg.org" 297 echo "------------------" 298 exit -1 299 fi 300 fi 301 302 ## checking for libpng 303 AC_CHECK_HEADERS(png.h ,pngHeader="yes", 304 pngHeader="no") 305 if test $pngHeader = "no"; then 306 echo " not including png." 307 else 308 AC_CHECK_LIB([png], [main], FOUND_png=yes) 309 if test "$FOUND_png" = "yes" ; then 310 LIBS="$LIBS -lpng" 311 else 312 echo "------------------" 313 echo "png library not found." 314 echo "please install the png library, which can be found at http://libpng.org/pub/png/libpng.html" 315 echo "------------------" 316 exit -1 317 fi 318 fi 319 fi 320 321 ## checking for GTK 322 if test "$def_gtk" = yes; then 323 324 #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no) 325 AC_MSG_CHECKING([for gtk2.0]) 326 if `pkg-config --exists gtk+-2.0`; then 327 echo "yes" 328 have_gtk2=yes 329 GTK2_LIBS=`pkg-config --libs gtk+-2.0` 330 GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0` 331 AC_DEFINE_UNQUOTED(HAVE_GTK2, 1, [if we have GTK2]) 332 else 333 echo "no" 334 fi 335 336 fi 337 AC_SUBST(GTK2_LIBS) 338 AC_SUBST(GTK2_CFLAGS) 339 AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes) 340 167 341 168 342 169 343 #checking for pthread libs 170 AC_CHECK_LIB([pthread], [main], FOUND_pthread=yes) 171 if test "$FOUND_pthread" = "yes" ; then 172 LIBS="$LIBS -lpthread" 173 fi 174 175 344 # AC_CHECK_LIB([pthread], [main], FOUND_pthread=yes) 345 # if test "$FOUND_pthread" = "yes" ; then 346 # LIBS="$LIBS -lpthread" 347 # fi 176 348 177 349 178 350 # FIXME: Replace `main' with a function in `-lm': 179 AC_CHECK_LIB([m], [main]) 180 181 LIBS="$LIBS `pkg-config --libs gtk+-2.0`" 182 183 351 AC_CHECK_LIB([m], [main]) 352 353 184 354 # Checks for header files. 185 355 AC_HEADER_STDC … … 194 364 195 365 AC_CONFIG_FILES([Makefile 196 console/Makefile 197 gui/Makefile 198 src/Makefile]) 366 src/console/Makefile 367 src/gui/Makefile 368 src/Makefile 369 src/importer/Makefile]) 199 370 AC_OUTPUT -
orxonox/branches/buerli/src/Makefile.am
r2617 r3238 1 AM_CXXFLAGS="-I/usr/X11R6/include"2 AM_LDFLAGS= "-L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib -lXt -lX11"$(MWINDOWS)1 #AM_CXXFLAGS="" 2 AM_LDFLAGS= $(MWINDOWS) 3 3 4 4 #"-O3 -pedantic -fPIC -ffast-math -I/usr/X11R6/include" … … 6 6 7 7 bin_PROGRAMS=orxonox 8 orxonox_SOURCES=orxonox.cc world.cc player.cc data_tank.cc world_entity.cc vector.cc camera.cc collision.cc command_node.cc ini_parser.cc keynames.cc track.cc base_entity.cc IPhys.cc9 8 10 noinst_HEADERS=ability.h data_tank.h npc.h stdincl.h ai.h environment.h orxonox.h synchronisable.h base_entity.h error.h player.h track.h camera.h ini_parser.h power_up.h vector.h collision.h keynames.h proto_class.h world.h command_node.h list.h shoot_laser.h world_entity.h coordinates.h message_structures.h shoot_rocket.h IPhys.h 9 orxonox_SOURCES= orxonox.cc \ 10 world.cc \ 11 player.cc \ 12 collision.cc \ 13 data_tank.cc \ 14 world_entity.cc \ 15 vector.cc \ 16 camera.cc \ 17 command_node.cc \ 18 ini_parser.cc \ 19 keynames.cc \ 20 track.cc \ 21 base_entity.cc \ 22 game_loader.cc \ 23 campaign.cc \ 24 story_entity.cc \ 25 environment.cc \ 26 importer/object.cc \ 27 importer/array.cc \ 28 importer/material.cc \ 29 list.cc \ 30 IPhys.cc 11 31 32 noinst_HEADERS = ability.h \ 33 data_tank.h \ 34 collision.h \ 35 npc.h \ 36 stdincl.h \ 37 ai.h \ 38 environment.h \ 39 orxonox.h \ 40 synchronisable.h \ 41 base_entity.h \ 42 error.h \ 43 player.h \ 44 track.h \ 45 camera.h \ 46 ini_parser.h \ 47 power_up.h \ 48 vector.h \ 49 keynames.h \ 50 proto_class.h \ 51 world.h \ 52 command_node.h \ 53 list.h \ 54 shoot_laser.h \ 55 world_entity.h \ 56 coordinates.h \ 57 message_structures.h \ 58 shoot_rocket.h \ 59 list_template.h \ 60 story_entity.h \ 61 story_def.h \ 62 game_loader.h \ 63 campaign.h \ 64 IPhys.h 12 65 13 # uncomment the following if bencoder requires the math library 66 ## orxonox.conf will be used from home-dir instead. 67 EXTRA_DIST = orxonox.conf 68 69 ### GTK_RELATED 70 if HAVE_GTK2 71 GTK_PROGS =console 72 else 73 GTK_PROGS = 74 endif 75 76 SUBDIRS = . \ 77 importer \ 78 gui \ 79 $(GTK_PROGS) 80 81 # uncomment the following if orxonox requires the math library 14 82 #orxonox_LDADD=-lm 15 83 -
orxonox/branches/buerli/src/Makefile.in
r2707 r3238 38 38 PRE_UNINSTALL = : 39 39 POST_UNINSTALL = : 40 host_triplet = @host@ 40 41 bin_PROGRAMS = orxonox$(EXEEXT) 41 42 subdir = src … … 53 54 PROGRAMS = $(bin_PROGRAMS) 54 55 am_orxonox_OBJECTS = orxonox.$(OBJEXT) world.$(OBJEXT) \ 55 player.$(OBJEXT) data_tank.$(OBJEXT) world_entity.$(OBJEXT) \56 vector.$(OBJEXT) camera.$(OBJEXT) collision.$(OBJEXT) \56 player.$(OBJEXT) collision.$(OBJEXT) data_tank.$(OBJEXT) \ 57 world_entity.$(OBJEXT) vector.$(OBJEXT) camera.$(OBJEXT) \ 57 58 command_node.$(OBJEXT) ini_parser.$(OBJEXT) keynames.$(OBJEXT) \ 58 track.$(OBJEXT) base_entity.$(OBJEXT) IPhys.$(OBJEXT) 59 track.$(OBJEXT) base_entity.$(OBJEXT) game_loader.$(OBJEXT) \ 60 campaign.$(OBJEXT) story_entity.$(OBJEXT) \ 61 environment.$(OBJEXT) object.$(OBJEXT) array.$(OBJEXT) \ 62 material.$(OBJEXT) list.$(OBJEXT) IPhys.$(OBJEXT) 59 63 orxonox_OBJECTS = $(am_orxonox_OBJECTS) 60 64 orxonox_LDADD = $(LDADD) … … 62 66 depcomp = $(SHELL) $(top_srcdir)/depcomp 63 67 am__depfiles_maybe = depfiles 64 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/IPhys.Po \68 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/IPhys.Po ./$(DEPDIR)/array.Po \ 65 69 @AMDEP_TRUE@ ./$(DEPDIR)/base_entity.Po ./$(DEPDIR)/camera.Po \ 66 @AMDEP_TRUE@ ./$(DEPDIR)/c ollision.Po \70 @AMDEP_TRUE@ ./$(DEPDIR)/campaign.Po ./$(DEPDIR)/collision.Po \ 67 71 @AMDEP_TRUE@ ./$(DEPDIR)/command_node.Po \ 68 @AMDEP_TRUE@ ./$(DEPDIR)/data_tank.Po ./$(DEPDIR)/ini_parser.Po \ 69 @AMDEP_TRUE@ ./$(DEPDIR)/keynames.Po ./$(DEPDIR)/orxonox.Po \ 70 @AMDEP_TRUE@ ./$(DEPDIR)/player.Po ./$(DEPDIR)/track.Po \ 71 @AMDEP_TRUE@ ./$(DEPDIR)/vector.Po ./$(DEPDIR)/world.Po \ 72 @AMDEP_TRUE@ ./$(DEPDIR)/world_entity.Po 72 @AMDEP_TRUE@ ./$(DEPDIR)/data_tank.Po \ 73 @AMDEP_TRUE@ ./$(DEPDIR)/environment.Po \ 74 @AMDEP_TRUE@ ./$(DEPDIR)/game_loader.Po \ 75 @AMDEP_TRUE@ ./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \ 76 @AMDEP_TRUE@ ./$(DEPDIR)/list.Po ./$(DEPDIR)/material.Po \ 77 @AMDEP_TRUE@ ./$(DEPDIR)/object.Po ./$(DEPDIR)/orxonox.Po \ 78 @AMDEP_TRUE@ ./$(DEPDIR)/player.Po ./$(DEPDIR)/story_entity.Po \ 79 @AMDEP_TRUE@ ./$(DEPDIR)/track.Po ./$(DEPDIR)/vector.Po \ 80 @AMDEP_TRUE@ ./$(DEPDIR)/world.Po ./$(DEPDIR)/world_entity.Po 73 81 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 74 82 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) … … 78 86 SOURCES = $(orxonox_SOURCES) 79 87 DIST_SOURCES = $(orxonox_SOURCES) 88 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ 89 html-recursive info-recursive install-data-recursive \ 90 install-exec-recursive install-info-recursive \ 91 install-recursive installcheck-recursive installdirs-recursive \ 92 pdf-recursive ps-recursive uninstall-info-recursive \ 93 uninstall-recursive 80 94 HEADERS = $(noinst_HEADERS) 81 95 ETAGS = etags 82 96 CTAGS = ctags 97 DIST_SUBDIRS = . importer gui console 83 98 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 84 99 ACLOCAL = @ACLOCAL@ … … 99 114 CXXFLAGS = @CXXFLAGS@ 100 115 CYGPATH_W = @CYGPATH_W@ 116 DEBUG = @DEBUG@ 101 117 DEFS = @DEFS@ 102 118 DEPDIR = @DEPDIR@ 119 DOXYGEN = @DOXYGEN@ 120 DOXYGEN_FALSE = @DOXYGEN_FALSE@ 121 DOXYGEN_TRUE = @DOXYGEN_TRUE@ 103 122 ECHO_C = @ECHO_C@ 104 123 ECHO_N = @ECHO_N@ … … 106 125 EGREP = @EGREP@ 107 126 EXEEXT = @EXEEXT@ 127 GTK2_CFLAGS = @GTK2_CFLAGS@ 128 GTK2_LIBS = @GTK2_LIBS@ 129 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 130 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ 108 131 INSTALL_DATA = @INSTALL_DATA@ 109 132 INSTALL_PROGRAM = @INSTALL_PROGRAM@ … … 139 162 am__quote = @am__quote@ 140 163 bindir = @bindir@ 164 build = @build@ 141 165 build_alias = @build_alias@ 166 build_cpu = @build_cpu@ 167 build_os = @build_os@ 168 build_vendor = @build_vendor@ 142 169 datadir = @datadir@ 143 170 exec_prefix = @exec_prefix@ 171 host = @host@ 144 172 host_alias = @host_alias@ 173 host_cpu = @host_cpu@ 174 host_os = @host_os@ 175 host_vendor = @host_vendor@ 145 176 includedir = @includedir@ 146 177 infodir = @infodir@ … … 157 188 sharedstatedir = @sharedstatedir@ 158 189 sysconfdir = @sysconfdir@ 190 target = @target@ 159 191 target_alias = @target_alias@ 160 AM_CXXFLAGS = "-I/usr/X11R6/include" 161 AM_LDFLAGS = "-L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib -lXt -lX11" $(MWINDOWS) 162 orxonox_SOURCES = orxonox.cc world.cc player.cc data_tank.cc world_entity.cc vector.cc camera.cc collision.cc command_node.cc ini_parser.cc keynames.cc track.cc base_entity.cc IPhys.cc 163 noinst_HEADERS = ability.h data_tank.h npc.h stdincl.h ai.h environment.h orxonox.h synchronisable.h base_entity.h error.h player.h track.h camera.h ini_parser.h power_up.h vector.h collision.h keynames.h proto_class.h world.h command_node.h list.h shoot_laser.h world_entity.h coordinates.h message_structures.h shoot_rocket.h IPhys.h 164 all: all-am 192 target_cpu = @target_cpu@ 193 target_os = @target_os@ 194 target_vendor = @target_vendor@ 195 196 #AM_CXXFLAGS="" 197 AM_LDFLAGS = $(MWINDOWS) 198 orxonox_SOURCES = orxonox.cc \ 199 world.cc \ 200 player.cc \ 201 collision.cc \ 202 data_tank.cc \ 203 world_entity.cc \ 204 vector.cc \ 205 camera.cc \ 206 command_node.cc \ 207 ini_parser.cc \ 208 keynames.cc \ 209 track.cc \ 210 base_entity.cc \ 211 game_loader.cc \ 212 campaign.cc \ 213 story_entity.cc \ 214 environment.cc \ 215 importer/object.cc \ 216 importer/array.cc \ 217 importer/material.cc \ 218 list.cc \ 219 IPhys.cc 220 221 noinst_HEADERS = ability.h \ 222 data_tank.h \ 223 collision.h \ 224 npc.h \ 225 stdincl.h \ 226 ai.h \ 227 environment.h \ 228 orxonox.h \ 229 synchronisable.h \ 230 base_entity.h \ 231 error.h \ 232 player.h \ 233 track.h \ 234 camera.h \ 235 ini_parser.h \ 236 power_up.h \ 237 vector.h \ 238 keynames.h \ 239 proto_class.h \ 240 world.h \ 241 command_node.h \ 242 list.h \ 243 shoot_laser.h \ 244 world_entity.h \ 245 coordinates.h \ 246 message_structures.h \ 247 shoot_rocket.h \ 248 list_template.h \ 249 story_entity.h \ 250 story_def.h \ 251 game_loader.h \ 252 campaign.h \ 253 IPhys.h 254 255 EXTRA_DIST = orxonox.conf 256 @HAVE_GTK2_FALSE@GTK_PROGS = 257 258 ### GTK_RELATED 259 @HAVE_GTK2_TRUE@GTK_PROGS = console 260 SUBDIRS = . \ 261 importer \ 262 gui \ 263 $(GTK_PROGS) 264 265 all: all-recursive 165 266 166 267 .SUFFIXES: … … 229 330 230 331 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IPhys.Po@am__quote@ 332 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@ 231 333 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_entity.Po@am__quote@ 232 334 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camera.Po@am__quote@ 335 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/campaign.Po@am__quote@ 233 336 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision.Po@am__quote@ 234 337 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command_node.Po@am__quote@ 235 338 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data_tank.Po@am__quote@ 339 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/environment.Po@am__quote@ 340 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/game_loader.Po@am__quote@ 236 341 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ini_parser.Po@am__quote@ 237 342 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keynames.Po@am__quote@ 343 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@ 344 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@ 345 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Po@am__quote@ 238 346 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox.Po@am__quote@ 239 347 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/player.Po@am__quote@ 348 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/story_entity.Po@am__quote@ 240 349 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/track.Po@am__quote@ 241 350 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@ … … 258 367 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 259 368 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 369 370 object.o: importer/object.cc 371 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT object.o -MD -MP -MF "$(DEPDIR)/object.Tpo" -c -o object.o `test -f 'importer/object.cc' || echo '$(srcdir)/'`importer/object.cc; \ 372 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/object.Tpo" "$(DEPDIR)/object.Po"; else rm -f "$(DEPDIR)/object.Tpo"; exit 1; fi 373 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='importer/object.cc' object='object.o' libtool=no @AMDEPBACKSLASH@ 374 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/object.Po' tmpdepfile='$(DEPDIR)/object.TPo' @AMDEPBACKSLASH@ 375 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 376 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o object.o `test -f 'importer/object.cc' || echo '$(srcdir)/'`importer/object.cc 377 378 object.obj: importer/object.cc 379 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT object.obj -MD -MP -MF "$(DEPDIR)/object.Tpo" -c -o object.obj `if test -f 'importer/object.cc'; then $(CYGPATH_W) 'importer/object.cc'; else $(CYGPATH_W) '$(srcdir)/importer/object.cc'; fi`; \ 380 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/object.Tpo" "$(DEPDIR)/object.Po"; else rm -f "$(DEPDIR)/object.Tpo"; exit 1; fi 381 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='importer/object.cc' object='object.obj' libtool=no @AMDEPBACKSLASH@ 382 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/object.Po' tmpdepfile='$(DEPDIR)/object.TPo' @AMDEPBACKSLASH@ 383 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 384 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o object.obj `if test -f 'importer/object.cc'; then $(CYGPATH_W) 'importer/object.cc'; else $(CYGPATH_W) '$(srcdir)/importer/object.cc'; fi` 385 386 array.o: importer/array.cc 387 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT array.o -MD -MP -MF "$(DEPDIR)/array.Tpo" -c -o array.o `test -f 'importer/array.cc' || echo '$(srcdir)/'`importer/array.cc; \ 388 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/array.Tpo" "$(DEPDIR)/array.Po"; else rm -f "$(DEPDIR)/array.Tpo"; exit 1; fi 389 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='importer/array.cc' object='array.o' libtool=no @AMDEPBACKSLASH@ 390 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/array.Po' tmpdepfile='$(DEPDIR)/array.TPo' @AMDEPBACKSLASH@ 391 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 392 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o array.o `test -f 'importer/array.cc' || echo '$(srcdir)/'`importer/array.cc 393 394 array.obj: importer/array.cc 395 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT array.obj -MD -MP -MF "$(DEPDIR)/array.Tpo" -c -o array.obj `if test -f 'importer/array.cc'; then $(CYGPATH_W) 'importer/array.cc'; else $(CYGPATH_W) '$(srcdir)/importer/array.cc'; fi`; \ 396 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/array.Tpo" "$(DEPDIR)/array.Po"; else rm -f "$(DEPDIR)/array.Tpo"; exit 1; fi 397 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='importer/array.cc' object='array.obj' libtool=no @AMDEPBACKSLASH@ 398 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/array.Po' tmpdepfile='$(DEPDIR)/array.TPo' @AMDEPBACKSLASH@ 399 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 400 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o array.obj `if test -f 'importer/array.cc'; then $(CYGPATH_W) 'importer/array.cc'; else $(CYGPATH_W) '$(srcdir)/importer/array.cc'; fi` 401 402 material.o: importer/material.cc 403 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT material.o -MD -MP -MF "$(DEPDIR)/material.Tpo" -c -o material.o `test -f 'importer/material.cc' || echo '$(srcdir)/'`importer/material.cc; \ 404 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/material.Tpo" "$(DEPDIR)/material.Po"; else rm -f "$(DEPDIR)/material.Tpo"; exit 1; fi 405 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='importer/material.cc' object='material.o' libtool=no @AMDEPBACKSLASH@ 406 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/material.Po' tmpdepfile='$(DEPDIR)/material.TPo' @AMDEPBACKSLASH@ 407 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 408 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o material.o `test -f 'importer/material.cc' || echo '$(srcdir)/'`importer/material.cc 409 410 material.obj: importer/material.cc 411 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT material.obj -MD -MP -MF "$(DEPDIR)/material.Tpo" -c -o material.obj `if test -f 'importer/material.cc'; then $(CYGPATH_W) 'importer/material.cc'; else $(CYGPATH_W) '$(srcdir)/importer/material.cc'; fi`; \ 412 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/material.Tpo" "$(DEPDIR)/material.Po"; else rm -f "$(DEPDIR)/material.Tpo"; exit 1; fi 413 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='importer/material.cc' object='material.obj' libtool=no @AMDEPBACKSLASH@ 414 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/material.Po' tmpdepfile='$(DEPDIR)/material.TPo' @AMDEPBACKSLASH@ 415 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 416 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o material.obj `if test -f 'importer/material.cc'; then $(CYGPATH_W) 'importer/material.cc'; else $(CYGPATH_W) '$(srcdir)/importer/material.cc'; fi` 260 417 uninstall-info-am: 418 419 # This directory's subdirectories are mostly independent; you can cd 420 # into them and run `make' without going through this Makefile. 421 # To change the values of `make' variables: instead of editing Makefiles, 422 # (1) if the variable is set in `config.status', edit `config.status' 423 # (which will cause the Makefiles to be regenerated when you run `make'); 424 # (2) otherwise, pass the desired values on the `make' command line. 425 $(RECURSIVE_TARGETS): 426 @set fnord $$MAKEFLAGS; amf=$$2; \ 427 dot_seen=no; \ 428 target=`echo $@ | sed s/-recursive//`; \ 429 list='$(SUBDIRS)'; for subdir in $$list; do \ 430 echo "Making $$target in $$subdir"; \ 431 if test "$$subdir" = "."; then \ 432 dot_seen=yes; \ 433 local_target="$$target-am"; \ 434 else \ 435 local_target="$$target"; \ 436 fi; \ 437 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ 438 || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 439 done; \ 440 if test "$$dot_seen" = "no"; then \ 441 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ 442 fi; test -z "$$fail" 443 444 mostlyclean-recursive clean-recursive distclean-recursive \ 445 maintainer-clean-recursive: 446 @set fnord $$MAKEFLAGS; amf=$$2; \ 447 dot_seen=no; \ 448 case "$@" in \ 449 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ 450 *) list='$(SUBDIRS)' ;; \ 451 esac; \ 452 rev=''; for subdir in $$list; do \ 453 if test "$$subdir" = "."; then :; else \ 454 rev="$$subdir $$rev"; \ 455 fi; \ 456 done; \ 457 rev="$$rev ."; \ 458 target=`echo $@ | sed s/-recursive//`; \ 459 for subdir in $$rev; do \ 460 echo "Making $$target in $$subdir"; \ 461 if test "$$subdir" = "."; then \ 462 local_target="$$target-am"; \ 463 else \ 464 local_target="$$target"; \ 465 fi; \ 466 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ 467 || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ 468 done && test -z "$$fail" 469 tags-recursive: 470 list='$(SUBDIRS)'; for subdir in $$list; do \ 471 test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ 472 done 473 ctags-recursive: 474 list='$(SUBDIRS)'; for subdir in $$list; do \ 475 test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ 476 done 261 477 262 478 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) … … 270 486 tags: TAGS 271 487 272 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \488 TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 273 489 $(TAGS_FILES) $(LISP) 274 490 tags=; \ 275 491 here=`pwd`; \ 492 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ 493 include_option=--etags-include; \ 494 empty_fix=.; \ 495 else \ 496 include_option=--include; \ 497 empty_fix=; \ 498 fi; \ 499 list='$(SUBDIRS)'; for subdir in $$list; do \ 500 if test "$$subdir" = .; then :; else \ 501 test ! -f $$subdir/TAGS || \ 502 tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ 503 fi; \ 504 done; \ 276 505 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ 277 506 unique=`for i in $$list; do \ … … 286 515 fi 287 516 ctags: CTAGS 288 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \517 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 289 518 $(TAGS_FILES) $(LISP) 290 519 tags=; \ … … 335 564 fi; \ 336 565 done 566 list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ 567 if test "$$subdir" = .; then :; else \ 568 test -d "$(distdir)/$$subdir" \ 569 || mkdir "$(distdir)/$$subdir" \ 570 || exit 1; \ 571 (cd $$subdir && \ 572 $(MAKE) $(AM_MAKEFLAGS) \ 573 top_distdir="../$(top_distdir)" \ 574 distdir="../$(distdir)/$$subdir" \ 575 distdir) \ 576 || exit 1; \ 577 fi; \ 578 done 337 579 check-am: all-am 338 check: check- am580 check: check-recursive 339 581 all-am: Makefile $(PROGRAMS) $(HEADERS) 340 installdirs: 582 installdirs: installdirs-recursive 583 installdirs-am: 341 584 for dir in "$(DESTDIR)$(bindir)"; do \ 342 585 test -z "$$dir" || $(mkdir_p) "$$dir"; \ 343 586 done 344 install: install- am345 install-exec: install-exec- am346 install-data: install-data- am347 uninstall: uninstall- am587 install: install-recursive 588 install-exec: install-exec-recursive 589 install-data: install-data-recursive 590 uninstall: uninstall-recursive 348 591 349 592 install-am: all-am 350 593 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 351 594 352 installcheck: installcheck- am595 installcheck: installcheck-recursive 353 596 install-strip: 354 597 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ … … 366 609 @echo "This command is intended for maintainers to use" 367 610 @echo "it deletes files that may require special tools to rebuild." 368 clean: clean- am611 clean: clean-recursive 369 612 370 613 clean-am: clean-binPROGRAMS clean-generic mostlyclean-am 371 614 372 distclean: distclean- am615 distclean: distclean-recursive 373 616 -rm -rf ./$(DEPDIR) 374 617 -rm -f Makefile … … 376 619 distclean-tags 377 620 378 dvi: dvi- am621 dvi: dvi-recursive 379 622 380 623 dvi-am: 381 624 382 html: html- am383 384 info: info- am625 html: html-recursive 626 627 info: info-recursive 385 628 386 629 info-am: … … 390 633 install-exec-am: install-binPROGRAMS 391 634 392 install-info: install-info- am635 install-info: install-info-recursive 393 636 394 637 install-man: … … 396 639 installcheck-am: 397 640 398 maintainer-clean: maintainer-clean- am641 maintainer-clean: maintainer-clean-recursive 399 642 -rm -rf ./$(DEPDIR) 400 643 -rm -f Makefile 401 644 maintainer-clean-am: distclean-am maintainer-clean-generic 402 645 403 mostlyclean: mostlyclean- am646 mostlyclean: mostlyclean-recursive 404 647 405 648 mostlyclean-am: mostlyclean-compile mostlyclean-generic 406 649 407 pdf: pdf- am650 pdf: pdf-recursive 408 651 409 652 pdf-am: 410 653 411 ps: ps- am654 ps: ps-recursive 412 655 413 656 ps-am: … … 415 658 uninstall-am: uninstall-binPROGRAMS uninstall-info-am 416 659 417 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ 418 clean-generic ctags distclean distclean-compile \ 419 distclean-generic distclean-tags distdir dvi dvi-am html \ 660 uninstall-info: uninstall-info-recursive 661 662 .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ 663 clean clean-binPROGRAMS clean-generic clean-recursive ctags \ 664 ctags-recursive distclean distclean-compile distclean-generic \ 665 distclean-recursive distclean-tags distdir dvi dvi-am html \ 420 666 html-am info info-am install install-am install-binPROGRAMS \ 421 667 install-data install-data-am install-exec install-exec-am \ 422 668 install-info install-info-am install-man install-strip \ 423 installcheck installcheck-am installdirs maintainer-clean \ 424 maintainer-clean-generic mostlyclean mostlyclean-compile \ 425 mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ 426 uninstall-am uninstall-binPROGRAMS uninstall-info-am 427 428 429 # uncomment the following if bencoder requires the math library 669 installcheck installcheck-am installdirs installdirs-am \ 670 maintainer-clean maintainer-clean-generic \ 671 maintainer-clean-recursive mostlyclean mostlyclean-compile \ 672 mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \ 673 tags tags-recursive uninstall uninstall-am \ 674 uninstall-binPROGRAMS uninstall-info-am 675 676 677 # uncomment the following if orxonox requires the math library 430 678 #orxonox_LDADD=-lm 431 679 -
orxonox/branches/buerli/src/ability.h
r2043 r3238 1 1 2 #ifndef ABILITY_H3 #define ABILITY_H2 #ifndef _ABILITY_H 3 #define _ABILITY_H 4 4 5 5 #include "data_tank.h" … … 14 14 }; 15 15 16 #endif 16 #endif /* _ABILITY_H */ -
orxonox/branches/buerli/src/ai.h
r1956 r3238 1 1 2 #ifndef AI_H3 #define AI_H2 #ifndef _AI_H 3 #define _AI_H 4 4 5 5 #include "data_tank.h" … … 13 13 }; 14 14 15 #endif 15 #endif /* _AI_H */ -
orxonox/branches/buerli/src/base_entity.h
r2551 r3238 1 1 2 #ifndef BASE_ENTITY_H3 #define BASE_ENTITY_H2 #ifndef _BASE_ENTITY_H 3 #define _BASE_ENTITY_H 4 4 5 5 #include "stdincl.h" … … 14 14 }; 15 15 16 #endif 16 #endif /* _BASE_ENTITY_H */ -
orxonox/branches/buerli/src/camera.cc
r2707 r3238 30 30 { 31 31 this->world = world; 32 bound = NULL;32 this->bound = NULL; 33 33 /* give it some physical live */ 34 m = 10;35 a = new Vector(0.0, 0.0, 0.0);36 v = new Vector(0.0, 0.0, 0.0);37 fs = new Vector(0.0, 0.0, 0.0);38 cameraMode = NORMAL;39 deltaTime = 3000.0;40 cameraOffset = 1.0;41 cameraOffsetZ = 10.0;42 t = 0.0;43 44 actual_place.r.x = 0.0;45 actual_place.r.y = 10.0;46 actual_place.r.z = -5.0;34 this->m = 10; 35 this->a = new Vector(0.0, 0.0, 0.0); 36 this->v = new Vector(0.0, 0.0, 0.0); 37 this->fs = new Vector(0.0, 0.0, 0.0); 38 this->cameraMode = NORMAL; 39 this->deltaTime = 3000.0; 40 this->cameraOffset = 1.0; 41 this->cameraOffsetZ = 10.0; 42 this->t = 0.0; 43 44 this->actualPlace.r.x = 0.0; 45 this->actualPlace.r.y = 10.0; 46 this->actualPlace.r.z = -5.0; 47 47 } 48 48 … … 61 61 as smooth camera movement or swaying). 62 62 */ 63 void Camera::time _slice (Uint32 deltaT)64 { 65 if( t <= deltaTime)66 {t += deltaT;}63 void Camera::timeSlice (Uint32 deltaT) 64 { 65 if( this->t <= deltaTime) 66 {this->t += deltaT;} 67 67 //printf("time is: t=%f\n", t ); 68 update _desired_place();69 jump 68 updateDesiredPlace(); 69 jump(NULL); 70 70 } 71 71 … … 76 76 bound entity's position on the track. 77 77 */ 78 void Camera::update _desired_place ()78 void Camera::updateDesiredPlace () 79 79 { 80 80 switch(cameraMode) … … 89 89 if( bound != NULL) 90 90 { 91 bound->get _lookat (&lookat);92 orx->get _world()->calc_camera_pos (&lookat, &plFocus);91 bound->getLookat (&lookat); 92 orx->getWorld()->calcCameraPos (&lookat, &plFocus); 93 93 Quaternion *fr; 94 94 if(t < 20.0) … … 101 101 102 102 Vector op(1.0, 0.0, 0.0); 103 float angle = angle _deg(op, *start);103 float angle = angleDeg(op, *start); 104 104 printf("angle is: %f\n", angle); 105 105 … … 144 144 145 145 Vector ursp(0.0, 0.0, 0.0); 146 desired _place.r = /*plFocus.r -*/ ursp - res->apply(r);147 148 printf("desired place is: %f, %f, %f\n", desired _place.r.x, desired_place.r.y, desired_place.r.z);146 desiredPlace.r = /*plFocus.r -*/ ursp - res->apply(r); 147 148 printf("desired place is: %f, %f, %f\n", desiredPlace.r.x, desiredPlace.r.y, desiredPlace.r.z); 149 149 //plLastBPlace = *bound->get_placement(); 150 150 } … … 153 153 case SMOTH_FOLLOW: 154 154 { 155 Placement *plBound = bound->get _placement();155 Placement *plBound = bound->getPlacement(); 156 156 Location lcBound; 157 157 if(bound != null) 158 158 { 159 bound->get _lookat(&lcBound);159 bound->getLookat(&lcBound); 160 160 Vector vDirection(0.0, 0.0, 1.0); 161 161 vDirection = plBound->w.apply(vDirection); 162 desired _place.r = (vDirection * ((lcBound.dist-10.0)/* / l*/)) + Vector(0,0,5.0);162 desiredPlace.r = (vDirection * ((lcBound.dist-10.0)/* / l*/)) + Vector(0,0,5.0); 163 163 } 164 164 break; … … 169 169 if(bound != null) 170 170 { 171 Placement *plBound = bound->get _placement();171 Placement *plBound = bound->getPlacement(); 172 172 Vector vDirection(0.0, 0.0, 1.0); 173 173 Vector eclipticOffset(0.0, 0.0, 5.0); 174 174 vDirection = plBound->w.apply(vDirection); 175 desired _place.r = plBound->r - vDirection*10 + eclipticOffset;175 desiredPlace.r = plBound->r - vDirection*10 + eclipticOffset; 176 176 } 177 177 break; … … 182 182 if( bound != NULL && world != NULL ) 183 183 { 184 bound->get _lookat (&lookat);185 world->calc _camera_pos (&lookat, &desired_place);184 bound->getLookat (&lookat); 185 world->calcCameraPos (&lookat, &desiredPlace); 186 186 } 187 187 else 188 188 { 189 desired _place.r = Vector (0,0,0);190 desired _place.w = Quaternion ();189 desiredPlace.r = Vector (0,0,0); 190 desiredPlace.w = Quaternion (); 191 191 } 192 192 break; … … 206 206 // view 207 207 // TO DO: implement options for frustum generation 208 glFrustum(-1.0, 1.0, -1.0, 1.0, 1.5, 250.0); 208 //glFrustum(-1.0, 1.0, -1.0, 1.0, 1.5, 250.0); 209 gluPerspective(60, 1.2f, 0.1, 250); 210 209 211 //Vector up(0,0,1); 210 212 //Vector dir(1,0,0); … … 235 237 // rotation 236 238 float matrix[4][4]; 237 actual _place.w.conjugate().matrix (matrix);239 actualPlace.w.conjugate().matrix (matrix); 238 240 /* orientation and */ 239 241 glMultMatrixf ((float*)matrix); 240 242 /* translation */ 241 glTranslatef (-actual _place.r.x, -actual_place.r.y,- actual_place.r.z);242 243 glTranslatef (-actualPlace.r.x, -actualPlace.r.y,- actualPlace.r.z); 244 //Placement *plBound = bound->get_placement(); 243 245 244 246 // ===== second camera control calculation option 245 247 /* 246 248 gluLookAt(actual_place.r.x, actual_place.r.y, actual_place.r.z, 247 249 plBound->r.x, plBound->r.y, plBound->r.z, 248 250 0.0, 0.0, 1.0); … … 263 265 if( plc == NULL) 264 266 { 265 actual _place = desired_place;267 actualPlace = desiredPlace; 266 268 //printf("Camera|jump: camer@ %f, %f, %f\n\n", actual_place.r.x, actual_place.r.y, actual_place.r.z); 267 269 } 268 270 else 269 271 { 270 desired _place = *plc;271 actual _place = *plc;272 desiredPlace = *plc; 273 actualPlace = *plc; 272 274 } 273 275 } … … 277 279 \param entity: The enitity to bind the camera to 278 280 279 280 281 281 This sets the focus of the camera to the given entity. This means that it will use the given WorldEntity's 282 Location and get_lookat() to determine the viewpoint the camera will render from. 283 Note that you cannot bind a camera to a free entity. 282 284 */ 283 285 void Camera::bind (WorldEntity* entity) … … 285 287 if( entity != NULL) 286 288 { 287 if( entity->isFree 289 if( entity->isFree()) printf("Cannot bind camera to free entity"); 288 290 else 289 291 { 290 bound = entity;292 this->bound = entity; 291 293 } 292 294 } … … 298 300 this->world = world; 299 301 } 302 303 304 /** 305 \brief destroy, reset the camera so that it doesn't perform anything anymore 306 307 */ 308 void Camera::destroy() 309 { 310 this->bound = NULL; 311 this->world = NULL; 312 } -
orxonox/branches/buerli/src/camera.h
r2707 r3238 4 4 */ 5 5 6 #ifndef CAMERA_H7 #define CAMERA_H6 #ifndef _CAMERA_H 7 #define _CAMERA_H 8 8 9 9 #include "stdincl.h" … … 26 26 private: 27 27 WorldEntity* bound; //!< the WorldEntity the Camera is bound to 28 Placement actual _place; //!< the Camera's current position29 Placement desired _place; //!< where the Camera should be according to calculations28 Placement actualPlace; //!< the Camera's current position 29 Placement desiredPlace; //!< where the Camera should be according to calculations 30 30 World* world; 31 31 … … 54 54 CAMERA_MODE cameraMode; //!< saves the camera mode: how the camera follows the entity 55 55 56 void update _desired_place ();56 void updateDesiredPlace (); 57 57 58 58 public: … … 60 60 ~Camera (); 61 61 62 void time _slice (Uint32 deltaT);62 void timeSlice (Uint32 deltaT); 63 63 void apply (); 64 64 void bind (WorldEntity* entity); 65 65 void jump (Placement* plc); 66 void destroy(); 66 67 67 68 void setWorld(World* world); … … 69 70 }; 70 71 71 #endif 72 #endif /* _CAMERA_H */ -
orxonox/branches/buerli/src/campaign.cc
r2707 r3238 27 27 Campaign::Campaign () 28 28 { 29 this->entities = new List <StoryEntity>();29 this->entities = new ListTemplate<StoryEntity>(); 30 30 this->isInit = false; 31 31 } … … 34 34 35 35 36 Error Campaign::init()36 ErrorMessage Campaign::init() 37 37 { 38 38 this->isInit = true; … … 48 48 want to queue up in the campaign. 49 49 */ 50 void Campaign::addEntity(StoryEntity* se, Uint32storyID)50 void Campaign::addEntity(StoryEntity* se, int storyID) 51 51 { 52 52 se->setStoryID(storyID); … … 60 60 61 61 62 void Campaign::removeEntity( Uint32storyID)62 void Campaign::removeEntity(int storyID) 63 63 { 64 64 this->removeEntity(this->getStoryEntity(storyID)); … … 73 73 74 74 75 Error Campaign::start()75 ErrorMessage Campaign::start() 76 76 { 77 77 this->start(0); 78 78 } 79 79 80 Error Campaign::start(Uint32storyID = 0)80 ErrorMessage Campaign::start(int storyID = 0) 81 81 { 82 82 printf("World::start() - starting new StoryEntity Nr:%i\n", storyID); 83 Error errorCode;84 if( !this->isInit) return errorCode;85 if( storyID == WORLD_ID_GAMEEND) return errorCode;83 ErrorMessage errorCode; 84 if( !this->isInit) return errorCode; 85 if( storyID == WORLD_ID_GAMEEND) return errorCode; 86 86 this->running = true; 87 87 StoryEntity* se = this->getStoryEntity(storyID); 88 while(se != NULL && this->running) 88 this->currentEntity = se; 89 while( se != NULL && this->running) 89 90 { 90 se = this->getStoryEntity(storyID); 91 this->currentEntity = se; 92 93 se->displayEntityScreen(); 91 se->displayLoadScreen(); 94 92 se->load(); 95 93 se->init(); 96 se->release EntityScreen();94 se->releaseLoadScreen(); 97 95 se->start(); 96 se->destroy(); 97 98 delete se; 98 99 99 100 int nextWorldID = se->getNextStoryID(); 100 if(nextWorldID == WORLD_ID_GAMEEND) return errorCode;101 //printf("Campaing::start() - got nextWorldID = %i\n", nextWorldID); 101 102 se = this->getStoryEntity(nextWorldID); 102 if(se == NULL) 103 printf("Campaign::start() - ERROR: world it not found, oh oh..."); 103 this->currentEntity = se; 104 if( ( nextWorldID == WORLD_ID_GAMEEND) ||( se == NULL) ) 105 { 106 printf("Campaign::start() - quitting campaing story loop\n"); 107 if(se != NULL) 108 delete se; 109 return errorCode; 110 } 111 104 112 } 105 113 } 106 114 107 Error Campaign::stop()115 ErrorMessage Campaign::stop() 108 116 { 109 117 this->running = false; … … 111 119 { 112 120 this->currentEntity->stop(); 113 delete this->currentEntity;114 this->currentEntity = NULL;121 //delete this->currentEntity; 122 //this->currentEntity = NULL; 115 123 } 116 124 } 117 125 118 Error Campaign::pause()126 ErrorMessage Campaign::pause() 119 127 { 120 128 if(this->currentEntity != NULL) … … 123 131 124 132 125 Error Campaign::resume()133 ErrorMessage Campaign::resume() 126 134 { 127 135 if(this->currentEntity != NULL) … … 130 138 131 139 140 void Campaign::destroy() 141 { 142 if(this->currentEntity != NULL) 143 { 144 this->currentEntity->destroy(); 145 delete this->currentEntity; 146 this->currentEntity = NULL; 147 } 148 } 149 150 /* 151 \brief this changes to the next level 152 */ 132 153 void Campaign::nextLevel() 133 154 { 134 printf("Campaign|nextLevel\n"); 135 int nextID = this->currentEntity->getNextStoryID(); 136 this->stop(); 137 this->start(nextID); 155 printf("Campaign:nextLevel()\n"); 156 //int nextID = this->currentEntity->getNextStoryID(); 157 //this->stop(); 158 //this->start(nextID); 159 this->currentEntity->stop(); 138 160 } 139 161 162 /* 163 \brief change to the previous level - not implemented 164 165 this propably useless 166 */ 140 167 void Campaign::previousLevel() 141 168 {} 142 169 143 170 144 StoryEntity* Campaign::getStoryEntity(Uint32 storyID) 171 /* 172 \brief lookup a entity with a given id 173 \param story id to be lookuped 174 \returns the entity found or NULL if search ended without match 175 */ 176 StoryEntity* Campaign::getStoryEntity(int storyID) 145 177 { 146 List<StoryEntity>* l; 147 StoryEntity* entity; 148 l = this->entities->get_next(); 178 //printf("Campaing::getStoryEntity(%i) - getting next Entity\n", storyID); 179 if( storyID == WORLD_ID_GAMEEND) 180 return NULL; 181 ListTemplate<StoryEntity>* l; 182 StoryEntity* entity = NULL; 183 l = this->entities->getNext(); 149 184 while( l != NULL) 150 185 { 151 entity = l->get_object(); 152 l = l->get_next(); 153 if(entity->getStoryID() == storyID) 154 return entity; 186 entity = l->getObject(); 187 l = l->getNext(); 188 int id = entity->getStoryID(); 189 //printf("Campaing::getStoryEntity() - now looping, found entity nr=%i\n", id); 190 if(id == storyID) 191 { 192 //printf("Campaing::getStoryEntity() - yea, this is what we where looking for: %id\n"); 193 return entity; 194 } 155 195 } 156 196 return NULL; -
orxonox/branches/buerli/src/campaign.h
r2707 r3238 1 1 2 #ifndef CAMPAIGN_H3 #define CAMPAIGN_H2 #ifndef _CAMPAIGN_H 3 #define _CAMPAIGN_H 4 4 5 5 #include "stdincl.h" … … 17 17 StoryEntity* currentEntity; 18 18 19 virtual Error init();20 virtual Error start();21 virtual Error start(Uint32storyID);22 virtual Error stop();23 virtual Error pause();24 virtual Error resume();19 virtual ErrorMessage init(); 20 virtual ErrorMessage start(); 21 virtual ErrorMessage start(int storyID); 22 virtual ErrorMessage stop(); 23 virtual ErrorMessage pause(); 24 virtual ErrorMessage resume(); 25 25 26 void addEntity(StoryEntity* se, Uint32 storyID); 26 virtual void destroy(); 27 28 void addEntity(StoryEntity* se, int storyID); 27 29 void addEntity(StoryEntity* se); 28 void removeEntity( Uint32storyID);30 void removeEntity(int storyID); 29 31 void removeEntity(StoryEntity* se); 30 32 … … 33 35 34 36 private: 35 List <StoryEntity>* entities;37 ListTemplate<StoryEntity>* entities; 36 38 bool running; 37 39 38 StoryEntity* getStoryEntity( Uint32storyID);40 StoryEntity* getStoryEntity(int storyID); 39 41 }; 40 42 41 #endif 43 #endif /* _CAMPAIGN_H */ -
orxonox/branches/buerli/src/collision.cc
r2190 r3238 28 28 CollisionCluster::CollisionCluster (float rad = 1.0, Vector mid = Vector(0,0,0)) 29 29 { 30 root = (CC _Tree*) malloc( sizeof( CC_Tree));30 root = (CCTree*) malloc( sizeof( CCTree)); 31 31 root->n = 0; 32 32 root->data.ID = 0; … … 62 62 } 63 63 64 root = load _CC_Tree (stream);64 root = loadCCTree (stream); 65 65 fclose (stream); 66 66 } … … 71 71 CollisionCluster::~CollisionCluster () 72 72 { 73 free _CC_Tree(root);73 freeCCTree(root); 74 74 } 75 75 … … 85 85 stream = fopen( filename, "wb"); 86 86 if( stream == NULL) return -1; 87 r = save _CC_Tree(root, stream);87 r = saveCCTree(root, stream); 88 88 fclose (stream); 89 89 return r; … … 99 99 \return true on collision, false otherwise. If true is returned, the flag in ahitflags that symbolises the hit subsphere is set, and impactpoint is set to the Location where the intersection occured 100 100 */ 101 bool check _trace (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Line* trace, Vector* impactpoint)102 { 103 CC _Tree* t;101 bool checkTrace (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Line* trace, Vector* impactpoint) 102 { 103 CCTree* t; 104 104 if( (t = a->root) == NULL) return false; 105 105 106 return cc tree_trace( pa, t, ahitflags, trace, impactpoint);106 return ccTreeTrace( pa, t, ahitflags, trace, impactpoint); 107 107 } 108 108 … … 118 118 If true is returned, all flags in ahitflags and bhitflags that symbolize intersecting subspheres in the respective CollisionCluster are set 119 119 */ 120 bool check _collision (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Placement* pb, const CollisionCluster* b, unsigned long* bhitflags)121 { 122 CC _Tree* ta, *tb;120 bool checkCollision (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Placement* pb, const CollisionCluster* b, unsigned long* bhitflags) 121 { 122 CCTree* ta, *tb; 123 123 if( (ta = a->root) == NULL) return false; 124 124 if( (tb = b->root) == NULL) return false; 125 125 126 return cc tree_iterate(pa, ta, ahitflags, pb, tb, bhitflags);126 return ccTreeIterate(pa, ta, ahitflags, pb, tb, bhitflags); 127 127 } 128 128 … … 135 135 \return true on intersection, false otherwise 136 136 */ 137 bool sphere _sphere_collision( Vector m1, float r1, Vector m2, float r2)137 bool sphereSphereCollision( Vector m1, float r1, Vector m2, float r2) 138 138 { 139 139 if ((m1-m2).len() < r1+r2) return true; … … 149 149 \return true on intersection, false otherwise. If true is returned, impactpoint is set to the loaction where the intersection occured 150 150 */ 151 bool trace _sphere_collision( Vector m, float r, const Line* l, Vector* impactpoint)151 bool traceSphereCollision( Vector m, float r, const Line* l, Vector* impactpoint) 152 152 { 153 153 float A, B, C, D, t[2]; … … 176 176 } 177 177 178 bool cc tree_iterate(const Placement* pa, CC_Tree* ta, unsigned long* ahitflags, const Placement* pb, CC_Tree* tb, unsigned long* bhitflags)178 bool ccTreeIterate(const Placement* pa, CCTree* ta, unsigned long* ahitflags, const Placement* pb, CCTree* tb, unsigned long* bhitflags) 179 179 { 180 180 bool r = false; … … 182 182 Vector mra = pa->r + pa->w.apply(ta->m); 183 183 Vector mrb = pb->r + pb->w.apply(tb->m); 184 CC _Tree* use_a, *use_b;185 186 if( use _a == NULL || use_b== NULL) return false;187 188 if( sphere _sphere_collision( mra, ta->r, mrb, tb->r))184 CCTree* useA, *useB; 185 186 if( useA == NULL || useB == NULL) return false; 187 188 if( sphereSphereCollision( mra, ta->r, mrb, tb->r)) 189 189 { 190 190 if( ta->n == 0 && tb->n == 0) … … 196 196 for( ia = 0; ia < ta->n || ta->n == 0; ia++) 197 197 { 198 if( ta->n == 0) use _a= ta;199 else use _a= ta->data.b[ia];198 if( ta->n == 0) useA = ta; 199 else useA = ta->data.b[ia]; 200 200 for( ib = 0; ib < tb->n || ta->n == 0; ib++) 201 201 { 202 if( ta->n == 0) use _b= ta;203 else use _b= ta->data.b[ib];202 if( ta->n == 0) useB = ta; 203 else useB = ta->data.b[ib]; 204 204 205 r = r || cc tree_iterate( pa, use_a, ahitflags, pb, use_b, bhitflags);205 r = r || ccTreeIterate( pa, useA, ahitflags, pb, useB, bhitflags); 206 206 207 207 if( tb->n == 0) break; … … 233 233 234 234 /** 235 \brief frees the memory allocated in a CC _Tree236 */ 237 void free _CC_Tree( CC_Tree* tree)235 \brief frees the memory allocated in a CCTree 236 */ 237 void freeCCTree( CCTree* tree) 238 238 { 239 239 if (tree == NULL) return; 240 240 for (int i = 0; i < tree->n; i++) 241 241 { 242 free _CC_Tree(tree->data.b[i]);242 freeCCTree(tree->data.b[i]); 243 243 } 244 244 free( tree); … … 246 246 247 247 /** 248 \brief loads a CC _Tree from a stream249 */ 250 CC _Tree* load_CC_Tree (FILE* stream)251 { 252 CC _Tree* tree = NULL;253 CC _Tree** branches = NULL;248 \brief loads a CCTree from a stream 249 */ 250 CCTree* loadCCTree (FILE* stream) 251 { 252 CCTree* tree = NULL; 253 CCTree** branches = NULL; 254 254 float buf[4]; 255 255 unsigned long n; … … 267 267 else 268 268 { 269 branches = (CC _Tree**)malloc( sizeof(CC_Tree*) * n);269 branches = (CCTree**)malloc( sizeof(CCTree*) * n); 270 270 for( int i = 0; i < n; i++) 271 271 { 272 if ((branches[i] = load _CC_Tree (stream)) == NULL)272 if ((branches[i] = loadCCTree (stream)) == NULL) 273 273 { 274 274 for( int j = 0; j < i; j++) 275 275 { 276 free _CC_Tree (branches[j]);277 free 276 freeCCTree (branches[j]); 277 free(branches); 278 278 return NULL; 279 279 } … … 283 283 284 284 // assemble 285 tree = (CC _Tree*) malloc (sizeof(CC_Tree));285 tree = (CCTree*) malloc (sizeof(CCTree)); 286 286 tree->m.x = buf[0]; 287 287 tree->m.y = buf[1]; … … 297 297 298 298 /** 299 \brief saves a CC _Tree to a stream300 */ 301 int save _CC_Tree (CC_Tree* tree, FILE* stream)299 \brief saves a CCTree to a stream 300 */ 301 int saveCCTree (CCTree* tree, FILE* stream) 302 302 { 303 303 float buf[4]; … … 321 321 for( int i = 0; i < tree->n; i++) 322 322 { 323 if ( save _CC_Tree (tree->data.b[i], stream) == -1) return -1;323 if ( saveCCTree (tree->data.b[i], stream) == -1) return -1; 324 324 } 325 325 } … … 329 329 } 330 330 331 bool cc tree_trace( const Placement* p, CC_Tree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint)331 bool ccTreeTrace( const Placement* p, CCTree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint) 332 332 { 333 333 bool r = false; 334 334 int i; 335 335 Vector mr = p->r + p->w.apply (t->m); 336 CC _Tree* use_t;336 CCTree* useT; 337 337 Vector* ips; 338 338 unsigned long* hfs; 339 339 340 if( trace _sphere_collision (mr, t->r, trace, impactpoint))340 if( traceSphereCollision (mr, t->r, trace, impactpoint)) 341 341 { 342 342 if( t->n == 0) … … 352 352 for (i = 0; i < t->n; i++) 353 353 { 354 r = r || cc tree_trace (p, t->data.b[i], &(hfs[i]), trace, &(ips[i]));354 r = r || ccTreeTrace (p, t->data.b[i], &(hfs[i]), trace, &(ips[i])); 355 355 } 356 356 if( r) -
orxonox/branches/buerli/src/collision.h
r2190 r3238 4 4 */ 5 5 6 #ifndef COLLISION_H7 #define COLLISION_H6 #ifndef _COLLISION_H 7 #define _COLLISION_H 8 8 9 9 #include "vector.h" … … 14 14 15 15 //! Tree structure used by the CollisionCluster 16 typedef struct CC _Tree16 typedef struct CCTree 17 17 { 18 18 unsigned long n; 19 19 union 20 20 { 21 struct CC _Tree** b;21 struct CCTree** b; 22 22 unsigned long ID; 23 23 } data; 24 24 float r; 25 25 Vector m; 26 } CC _Tree;26 } CCTree; 27 27 28 28 //! Basic collision detection class … … 42 42 class CollisionCluster { 43 43 44 CC _Tree* root;44 CCTree* root; 45 45 46 46 … … 52 52 int store (char* filename); 53 53 54 friend bool cc tree_trace( const Placement* p, CC_Tree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint);55 friend bool cc tree_iterate(const Placement* pa, CC_Tree* ta, unsigned long* ahitflags, const Placement* pb, CC_Tree* tb, unsigned long* bhitflags);56 friend bool check _trace (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Line* trace, Vector* impactpoint);57 friend bool check _collision (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Placement* pb, const CollisionCluster* b, unsigned long* bhitflags);54 friend bool ccTreeTrace( const Placement* p, CCTree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint); 55 friend bool ccTreeIterate(const Placement* pa, CCTree* ta, unsigned long* ahitflags, const Placement* pb, CCTree* tb, unsigned long* bhitflags); 56 friend bool checkTrace (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Line* trace, Vector* impactpoint); 57 friend bool checkCollision (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Placement* pb, const CollisionCluster* b, unsigned long* bhitflags); 58 58 }; 59 59 60 bool sphere _sphere_collision( Vector m1, float r1, Vector m2, float r2);61 bool trace _sphere_collision( Vector m, float r, const Line* l, Vector* impactpoint);60 bool sphereSphereCollision( Vector m1, float r1, Vector m2, float r2); 61 bool traceSphereCollision( Vector m, float r, const Line* l, Vector* impactpoint); 62 62 63 63 void setflag( unsigned long* flags, unsigned long ID); 64 64 65 void free _CC_Tree( CC_Tree* tree);66 CC _Tree* load_CC_Tree (FILE* stream);67 int save _CC_Tree (CC_Tree* tree, FILE* stream);65 void freeCCTree( CCTree* tree); 66 CCTree* loadCCTree (FILE* stream); 67 int saveCCTree (CCTree* tree, FILE* stream); 68 68 69 #endif 69 #endif /* _COLLISION_H */ -
orxonox/branches/buerli/src/command_node.cc
r2707 r3238 11 11 ### File Specific: 12 12 main-programmer: Christian Meyer 13 co-programmer: ...13 co-programmer: Patrick Boenzli 14 14 */ 15 15 … … 20 20 #include "world_entity.h" 21 21 #include "game_loader.h" 22 #include "world.h" 22 23 23 24 #include <stdio.h> … … 33 34 CommandNode::CommandNode (int ID) 34 35 { 35 bound = new List<WorldEntity>(); 36 aliases = NULL; 37 netID = ID; 38 bLocalInput = false; 36 this->bound = new tList<WorldEntity>(); 37 this->aliases = NULL; 38 this->netID = ID; 39 this->bLocalInput = false; 40 this->bEnabled = true; 41 this->world = NULL; 39 42 } 40 43 … … 45 48 CommandNode::CommandNode (char* filename = DEFAULT_KEYBIND_FILE) 46 49 { 47 aliases = NULL; 48 bLocalInput = true; 49 netID = 0; 50 bound = new List<WorldEntity>(); 51 load_bindings (filename); 50 this->aliases = NULL; 51 this->bLocalInput = true; 52 this->netID = 0; 53 this->bound = new tList<WorldEntity>(); 54 this->bEnabled = true; 55 this->world = NULL; 56 this->loadBindings (filename); 52 57 } 53 58 … … 58 63 { 59 64 if( aliases != NULL) free (aliases); 60 if( bound != NULL) delete bound; 61 } 65 if( bound != NULL) delete bound; /* \todo should this delete bound? dangerous FIX */ 66 } 67 68 69 /** 70 \brief this resets the command node 71 72 deleting all data contained in the command node to fill it up again 73 74 \todo coppling to different game-entities 75 \todo reset/destroy has to be redesigned 76 */ 77 78 void CommandNode::reset() 79 { 80 this->bound->destroy(); 81 //this->bound = NULL; /* \todo this produces a NULLpointer error.. FIX */ 82 this->bEnabled = false; 83 this->world = NULL; 84 } 85 86 void CommandNode::enable(bool bEnabled) 87 { 88 this->bEnabled = bEnabled; 89 } 90 91 92 /** 93 \brief adds Node to a GameWorld 94 95 this is usefull, if you want to catch events in a world class. usualy 96 this is done automaticaly via GameLoader. Reset it via 97 CommandNode::reset() 98 99 */ 100 void CommandNode::addToWorld(World* world) 101 { 102 this->world = world; 103 } 104 62 105 63 106 /** … … 65 108 \param filename: The path and name of the file to load the bindings from 66 109 */ 67 void CommandNode::load _bindings (char* filename)110 void CommandNode::loadBindings (char* filename) 68 111 { 69 112 FILE* stream; … … 82 125 // create parser 83 126 IniParser parser (filename); 84 if( parser.get _section ("Bindings") == -1)127 if( parser.getSection ("Bindings") == -1) 85 128 { 86 129 printf("Could not find key bindings in %s\n", filename); … … 96 139 int* index; 97 140 98 while( parser.next _var (namebuf, valuebuf) != -1)99 { 100 index = name _to_index (namebuf);141 while( parser.nextVar (namebuf, valuebuf) != -1) 142 { 143 index = nameToIndex (namebuf); 101 144 switch( index[0]) 102 145 { 103 146 case 0: 104 printf("Key binding %d(%s) set to %s\n", index[1], SDLK _to_keyname( index[1]), valuebuf);147 printf("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), valuebuf); 105 148 strcpy (aliases->keys[index[1]], valuebuf); 106 149 break; 107 150 case 1: 108 printf("Button binding %d(%s) set to %s\n", index[1], SDLB _to_buttonname( index[1]), valuebuf);151 printf("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), valuebuf); 109 152 strcpy (aliases->buttons[index[1]], valuebuf); 110 153 break; … … 123 166 void CommandNode::bind (WorldEntity* entity) 124 167 { 125 bound->add (entity , LIST_ADD_NEXT, true);168 bound->add (entity); 126 169 } 127 170 … … 132 175 void CommandNode::unbind (WorldEntity* entity) 133 176 { 134 bound->remove (entity , LIST_FIND_FW);135 } 136 137 int* CommandNode::name _to_index (char* name)177 bound->remove (entity); 178 } 179 180 int* CommandNode::nameToIndex (char* name) 138 181 { 139 182 coord[0] = -1; 140 183 coord[1] = -1; 141 184 int c; 142 if( (c = keyname _to_SDLK (name)) != -1)185 if( (c = keynameToSDLK (name)) != -1) 143 186 { 144 187 coord[1] = c; 145 188 coord[0] = 0; 146 189 } 147 if( (c = buttonname _to_SDLB (name)) != -1)190 if( (c = buttonnameToSDLB (name)) != -1) 148 191 { 149 192 coord[1] = c; … … 158 201 void CommandNode::process () 159 202 { 160 if( bLocalInput) process_local (); 161 else process_network (); 162 } 163 164 void CommandNode::process_local () 203 if( this->bEnabled) 204 { 205 if( bLocalInput) processLocal (); 206 else processNetwork (); 207 } 208 } 209 210 void CommandNode::processLocal () 165 211 { 166 212 SDL_Event event; 167 213 Command cmd; 168 169 214 while( SDL_PollEvent (&event)) 170 215 { … … 175 220 strcpy (cmd.cmd, aliases->keys[event.key.keysym.sym]); 176 221 cmd.bUp = false; 177 if( strlen (cmd.cmd) > 0) relay 222 if( strlen (cmd.cmd) > 0) relay(&cmd); 178 223 break; 179 224 case SDL_KEYUP: 180 225 strcpy( cmd.cmd, aliases->keys[event.key.keysym.sym]); 181 226 cmd.bUp = true; 182 if( strlen (cmd.cmd) > 0) relay 227 if( strlen (cmd.cmd) > 0) relay(&cmd); 183 228 break; 184 229 case SDL_MOUSEMOTION: … … 192 237 strcpy( cmd.cmd, aliases->buttons[event.button.button]); 193 238 cmd.bUp = true; 194 if( strlen (cmd.cmd) > 0) relay 239 if( strlen (cmd.cmd) > 0) relay(&cmd); 195 240 break; 196 241 case SDL_MOUSEBUTTONDOWN: 197 242 strcpy( cmd.cmd, aliases->buttons[event.button.button]); 198 243 cmd.bUp = false; 199 if( strlen (cmd.cmd) > 0) relay 244 if( strlen (cmd.cmd) > 0) relay(&cmd); 200 245 break; 201 246 case SDL_JOYAXISMOTION: … … 207 252 default: 208 253 Orxonox *orx = Orxonox::getInstance(); 209 orx->event_handler (&event); 210 254 orx->eventHandler(&event); 211 255 break; 212 256 } … … 214 258 } 215 259 216 void CommandNode::process_network () 217 { 218 219 } 260 261 void CommandNode::processNetwork () 262 { 263 264 } 265 220 266 221 267 void CommandNode::relay (Command* cmd) 222 268 { 223 //printf("CommandNode|relay()\n"); 224 List<WorldEntity>* plist = bound; 225 269 226 270 Orxonox *orx = Orxonox::getInstance(); 227 if( orx->system_command (cmd)) return; 271 if( orx->systemCommand (cmd)) return; 272 228 273 GameLoader* gl = GameLoader::getInstance(); 229 if(gl->worldCommand(cmd)) return; 230 231 if( bLocalInput) send_over_network (cmd); 232 233 while( (plist = plist->get_next()) != NULL) 234 { 235 plist->get_object()->command (cmd); 236 } 237 } 274 if( gl->worldCommand(cmd)) return; 275 276 if( bLocalInput) sendOverNetwork (cmd); 277 278 if( this->world->command(cmd)) return; 279 280 WorldEntity* entity = bound->enumerate(); 281 while( entity != NULL) 282 { 283 entity->command (cmd); 284 entity = bound->nextElement(); 285 } 286 } 287 238 288 239 289 /** … … 241 291 \param ID: the new ID to use 242 292 */ 243 void CommandNode::set _netID (int ID)293 void CommandNode::setNetID (int ID) 244 294 { 245 295 netID = ID; 246 296 } 247 297 248 void CommandNode::send _over_network (Command* cmd)249 { 250 } 298 void CommandNode::sendOverNetwork (Command* cmd) 299 { 300 } -
orxonox/branches/buerli/src/command_node.h
r2190 r3238 6 6 */ 7 7 8 #ifndef COMMAND_NODE_H9 #define COMMAND_NODE_H8 #ifndef _COMMAND_NODE_H 9 #define _COMMAND_NODE_H 10 10 11 11 #include "stdincl.h" 12 12 13 13 class WorldEntity; 14 class World; 14 15 15 16 #define N_STD_KEYS SDLK_LAST … … 19 20 //! Key aliasing structure 20 21 /** 21 22 22 This structure contains the key aliasing information, e.g. the command strings that 23 have been bound to the keys. 23 24 */ 24 25 typedef struct 25 26 { 26 27 27 char keys[N_STD_KEYS][CMD_LENGHT]; 28 char buttons[N_BUTTONS][CMD_LENGHT]; 28 29 } KeyBindings; 29 30 30 31 //! Command Node 31 32 /** 32 33 34 35 36 33 This class gathers all incoming SDL_Events and processes them. Keyboard, mouse and joystick input is 34 captured and translated into command messages which are passed down to the bound WorldEntities (via WorldEntity::command()). 35 Other SDL_Events are passed to Orxonox::event_handler() to deal with them. If the CommandNode has been created 36 with bLocalInput set to false, it will query the network class for incoming commands that match his netID and pass 37 them on to it's WorldEntities. 37 38 */ 38 39 class CommandNode { 39 40 private: 40 bool bLocalInput; //!< Identifies the CommandNode that processes local input 41 int netID; //!< Unique identifier that is used to determine between remote CommandNodes 42 KeyBindings* aliases; 43 List<WorldEntity>* bound; //!< List of WorldEntites that recieve commands from this CommandNode 44 Sint32 coord[2]; 45 46 void relay (Command* cmd); 47 int* name_to_index (char* name); 48 void process_local (); 49 void process_network (); 50 void send_over_network (Command* cmd); 51 41 bool bLocalInput; //!< Identifies the CommandNode that processes local input 42 bool bEnabled; 43 int netID; //!< Unique identifier that is used to determine between remote CommandNodes 44 KeyBindings* aliases; 45 tList<WorldEntity>* bound; //!< List of WorldEntites that recieve commands from this CommandNode 46 Sint32 coord[2]; 47 World* world; 48 49 50 void relay (Command* cmd); 51 int* nameToIndex (char* name); 52 void processLocal (); 53 void processNetwork (); 54 void sendOverNetwork (Command* cmd); 55 52 56 public: 53 57 CommandNode (int ID); 54 58 CommandNode (char* filename); 55 59 ~CommandNode (); 56 57 void load_bindings (char* filename); 60 61 void reset (); 62 void enable (bool bEnabled); 63 void loadBindings (char* filename); 58 64 void bind (WorldEntity* entity); 59 65 void unbind (WorldEntity* entity); 66 void addToWorld (World* world); 60 67 void process (); 61 68 62 void set _netID (int ID);69 void setNetID (int ID); 63 70 }; 64 71 65 #endif 72 #endif /* _COMMAND_NODE_H */ -
orxonox/branches/buerli/src/console/Makefile.in
r3237 r3238 193 193 esac; \ 194 194 done; \ 195 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/console/Makefile'; \195 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/console/Makefile'; \ 196 196 cd $(top_srcdir) && \ 197 $(AUTOMAKE) -- foreignsrc/console/Makefile197 $(AUTOMAKE) --gnu src/console/Makefile 198 198 .PRECIOUS: Makefile 199 199 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/buerli/src/coordinates.h
r2551 r3238 4 4 */ 5 5 6 #ifndef COORDINATES_H7 #define COORDINATES_H6 #ifndef _COORDINATES_H 7 #define _COORDINATES_H 8 8 9 9 #include "vector.h" … … 34 34 } Placement; 35 35 36 #endif 36 #endif /* _COORDINATS_H */ -
orxonox/branches/buerli/src/data_tank.h
r2190 r3238 1 1 2 #ifndef DATA_TANK_H3 #define DATA_TANK_H2 #ifndef _DATA_TANK_H 3 #define _DATA_TANK_H 4 4 5 5 … … 12 12 }; 13 13 14 #endif 14 #endif /* _DATA_TANK_H */ -
orxonox/branches/buerli/src/environment.cc
r2036 r3238 16 16 */ 17 17 18 #include <iostream>19 #include <GL/glut.h>20 #include <stdlib.h>21 22 #include "data_tank.h"23 18 24 19 #include "environment.h" 20 #include "stdincl.h" 21 #include "world_entity.h" 22 #include "vector.h" 25 23 26 24 using namespace std; … … 30 28 #define LEVEL_LENGTH 500 31 29 32 Environment::Environment () 33 : WorldEntity() 30 Environment::Environment () : WorldEntity() 34 31 { 35 32 … … 60 57 Environment::~Environment () {} 61 58 59 void Environment::tick (float time) {} 62 60 61 void Environment::hit (WorldEntity* weapon, Vector loc) {} 62 63 void Environment::destroy () {} 64 65 void Environment::collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags) {} 66 67 void Environment::draw () 68 { 69 glMatrixMode(GL_MODELVIEW); 70 glLoadIdentity(); 71 float matrix[4][4]; 72 73 glTranslatef(getPlacement()->r.x,getPlacement()->r.y,getPlacement()->r.z); 74 getPlacement()->w.matrix (matrix); 75 glMultMatrixf ((float*)matrix); 76 77 glBegin(GL_TRIANGLES); 78 glColor3f(1,0,1); 79 glVertex3f(0,0,0.5); 80 glVertex3f(-0.5,0,-1); 81 glVertex3f(0.5,0,-1); 82 83 glVertex3f(0,0,0.5); 84 glVertex3f(0,0.5,-1); 85 glVertex3f(0,-0.5,-1); 86 glEnd(); 87 88 glBegin(GL_QUADS); 89 glColor3f(1,0,1); 90 glVertex3f(0.5,0.5,-1); 91 glVertex3f(0.5,-0.5,-1); 92 glVertex3f(-0.5,-0.5,-1); 93 glVertex3f(-0.5,0.5,-1); 94 glEnd(); 95 } 96 97 /* 63 98 void Environment::paint() 64 99 { 65 /*100 66 101 glPushMatrix(); 67 102 //glScalef(0.5, 0.5, 1.0); … … 95 130 96 131 glPopMatrix(); 97 */132 98 133 } 99 134 … … 103 138 } 104 139 140 */ -
orxonox/branches/buerli/src/environment.h
r2036 r3238 1 2 3 4 #ifndef ENVIRONEMENT_H 5 #define ENVIRONEMENT_H 6 1 #ifndef _ENVIRONEMENT_H 2 #define _ENVIRONEMENT_H 7 3 8 4 #include "world_entity.h" 9 5 10 class Environment : public WorldEntity { 6 7 class Environment : public WorldEntity 8 { 9 friend class World; 11 10 12 11 private: … … 21 20 ~Environment (); 22 21 23 void paint(void); 24 void drawEnvironment(void); 25 void setEnvPosition(void); 26 void getEnvPosition(void); 22 23 virtual void tick (float time); 24 virtual void hit (WorldEntity* weapon, Vector loc); 25 virtual void destroy (); 26 virtual void collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); 27 virtual void draw (); 27 28 28 29 }; 29 30 30 #endif 31 #endif /* _ENVIRONEMENT_H */ -
orxonox/branches/buerli/src/error.h
r2707 r3238 22 22 */ 23 23 24 // this are the two undefined error nr. Don't use them ... 25 #define ERROR -1 26 #define NERROR 0 24 25 #ifndef _ERROR_H 26 #define _ERROR_H 27 28 // these are the two undefined error nr. Don't use them ... 29 #define oERROR -1 30 31 #define oNOERROR 0 27 32 28 33 /*! … … 54 59 char* message; 55 60 char* location; 56 } Error; 61 } ErrorMessage; 62 63 #endif /* _ERROR_H */ -
orxonox/branches/buerli/src/game_loader.cc
r2707 r3238 42 42 43 43 44 /** 45 \brief this class is a singleton class 46 \returns an instance of itself 47 48 if you are unsure about singleton classes, check the theory out on the internet :) 49 */ 44 50 GameLoader* GameLoader::getInstance() 45 51 { … … 50 56 51 57 52 Error GameLoader::init()58 ErrorMessage GameLoader::init() 53 59 { 54 60 if(this->currentCampaign != NULL) … … 57 63 58 64 59 Error GameLoader::loadCampaign(char* name) 60 { 61 Error errorCode; 65 /** 66 \brief reads a campaign definition file into a campaign class 67 \param filename to be loaded 68 \returns the loaded campaign 69 70 this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns 71 */ 72 ErrorMessage GameLoader::loadCampaign(char* name) 73 { 74 ErrorMessage errorCode; 62 75 63 76 this->currentCampaign = this->fileToCampaign(name); 64 77 } 65 78 66 Error GameLoader::loadDebugCampaign(Uint32 campaignID) 79 80 /** 81 \brief loads a debug campaign for test purposes only. 82 \param the identifier of the campaign. 83 \returns error message if not able to do so. 84 */ 85 ErrorMessage GameLoader::loadDebugCampaign(Uint32 campaignID) 67 86 { 68 87 switch(campaignID) … … 72 91 { 73 92 Campaign* debugCampaign = new Campaign(); 93 74 94 World* world0 = new World(DEBUG_WORLD_0); 75 world0->setNextStoryID( DEBUG_WORLD_1);95 world0->setNextStoryID(WORLD_ID_1); 76 96 debugCampaign->addEntity(world0, WORLD_ID_0); 97 77 98 World* world1 = new World(DEBUG_WORLD_1); 78 99 world1->setNextStoryID(WORLD_ID_GAMEEND); … … 85 106 } 86 107 87 Error GameLoader::start()108 ErrorMessage GameLoader::start() 88 109 { 89 110 if(this->currentCampaign != NULL) … … 92 113 93 114 94 Error GameLoader::stop()115 ErrorMessage GameLoader::stop() 95 116 { 96 117 if(this->currentCampaign != NULL) … … 100 121 101 122 102 Error GameLoader::pause()123 ErrorMessage GameLoader::pause() 103 124 { 104 125 this->isPaused = true; … … 108 129 109 130 110 Error GameLoader::resume()131 ErrorMessage GameLoader::resume() 111 132 { 112 133 this->isPaused = false; … … 115 136 } 116 137 117 Error GameLoader::free() 138 /** 139 \brief release the mem 140 */ 141 ErrorMessage GameLoader::destroy() 118 142 {} 119 143 120 144 121 122 123 145 /** 146 \brief reads a campaign definition file into a campaign class 147 \param filename to be loaded 148 \returns the loaded campaign 149 150 this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns 151 */ 124 152 Campaign* GameLoader::fileToCampaign(char *name) 125 153 { … … 134 162 \brief handle keyboard commands 135 163 \param cmd: the command to handle 136 \return true if the command was handled by the system164 \returns true if the command was handled by the system 137 165 */ 138 166 bool GameLoader::worldCommand (Command* cmd) … … 165 193 return true; 166 194 } 195 else if( !strcmp( cmd->cmd, "quit")) 196 { 197 if( !cmd->bUp) this->stop(); 198 return true; 199 } 167 200 return false; 168 201 } 169 202 203 204 /* 205 \brief this changes to the next level 206 */ 170 207 void GameLoader::nextLevel() 171 208 { … … 174 211 } 175 212 213 214 /* 215 \brief change to the previous level - not implemented 216 217 this propably useless 218 */ 176 219 void GameLoader::previousLevel() 177 220 { -
orxonox/branches/buerli/src/game_loader.h
r2707 r3238 1 #ifndef GAME_LOADER_H2 #define GAME_LOADER_H1 #ifndef _GAME_LOADER_H 2 #define _GAME_LOADER_H 3 3 4 4 #include "stdincl.h" … … 20 20 static GameLoader* getInstance(); 21 21 22 Error init();23 Error loadCampaign(char* name);24 Error start();25 Error stop();26 Error pause();27 Error resume();28 Error free();22 ErrorMessage init(); 23 ErrorMessage loadCampaign(char* name); 24 ErrorMessage start(); 25 ErrorMessage stop(); 26 ErrorMessage pause(); 27 ErrorMessage resume(); 28 ErrorMessage destroy(); 29 29 30 30 void nextLevel(); … … 32 32 33 33 bool worldCommand(Command* cmd); 34 Error loadDebugCampaign(Uint32 campaignID);34 ErrorMessage loadDebugCampaign(Uint32 campaignID); 35 35 36 36 private: … … 47 47 }; 48 48 49 #endif 49 #endif /* _GAME_LOADER_H */ -
orxonox/branches/buerli/src/gui/Makefile.in
r3237 r3238 220 220 esac; \ 221 221 done; \ 222 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/gui/Makefile'; \222 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gui/Makefile'; \ 223 223 cd $(top_srcdir) && \ 224 $(AUTOMAKE) -- foreignsrc/gui/Makefile224 $(AUTOMAKE) --gnu src/gui/Makefile 225 225 .PRECIOUS: Makefile 226 226 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/buerli/src/importer/Makefile.in
r3237 r3238 200 200 esac; \ 201 201 done; \ 202 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/importer/Makefile'; \202 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/importer/Makefile'; \ 203 203 cd $(top_srcdir) && \ 204 $(AUTOMAKE) -- foreignsrc/importer/Makefile204 $(AUTOMAKE) --gnu src/importer/Makefile 205 205 .PRECIOUS: Makefile 206 206 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/buerli/src/ini_parser.cc
r2551 r3238 25 25 IniParser::IniParser (char* filename) 26 26 { 27 28 29 open_file(filename);27 stream = NULL; 28 bInSection = false; 29 openFile(filename); 30 30 } 31 31 … … 35 35 IniParser::~IniParser () 36 36 { 37 37 if( stream != NULL) fclose (stream); 38 38 } 39 39 40 40 /** 41 42 43 41 \brief opens another file to parse 42 \param filename: path and name of the new file to parse 43 \return zero on success or -1 if an error occured; 44 44 */ 45 int IniParser::open _file( char* filename)45 int IniParser::openFile( char* filename) 46 46 { 47 48 49 50 51 52 53 54 55 47 if( filename == NULL) return -1; 48 if( stream != NULL) fclose (stream); 49 if( (stream = fopen (filename, "r")) == NULL) 50 { 51 printf("IniParser could not open %s\n", filename); 52 return -1; 53 } 54 bInSection = false; 55 return 0; 56 56 } 57 57 58 58 /** 59 60 61 59 \brief set the parsing cursor to the specified section 60 \param section: the name of the section to set the cursor to 61 \return zero on success or -1 if the section could not be found 62 62 */ 63 int IniParser::get _section( char* section)63 int IniParser::getSection( char* section) 64 64 { 65 65 bInSection = false; … … 95 95 96 96 /** 97 98 99 100 97 \brief gets the next VarName=VarValue pair from the parsing stream 98 \param name: a pointer to a buffer to store the name of the entry 99 \param value: a pointer to a buffer to store the value of the entry 100 \return zero if the buffers have been filled with data or -1 if there are no entries left in the current section 101 101 */ 102 int IniParser::next _var( char* name, char* value)102 int IniParser::nextVar( char* name, char* value) 103 103 { 104 if( stream == NULL) 104 if( stream == NULL) 105 { 106 bInSection = false; 107 return -1; 108 } 109 if( !bInSection) return -1; 110 111 char linebuffer[PARSELINELENGHT]; 112 char* ptr; 113 114 while( !feof( stream)) 115 { 116 // get next line 117 fgets (linebuffer, PARSELINELENGHT, stream); 118 // remove newline char 119 if( (ptr = strchr( linebuffer, '\n')) != NULL) *ptr = 0; 120 if( linebuffer[0] == '[') 105 121 { 106 107 122 bInSection = false; 123 return -1; 108 124 } 109 if( !bInSection) return -1; 110 111 char linebuffer[PARSELINELENGHT]; 112 char* ptr; 113 114 while( !feof( stream)) 125 if( (ptr = strchr( linebuffer, '=')) != NULL) 115 126 { 116 // get next line 117 fgets (linebuffer, PARSELINELENGHT, stream); 118 // remove newline char 119 if( (ptr = strchr( linebuffer, '\n')) != NULL) *ptr = 0; 120 if( linebuffer[0] == '[') 121 { 122 bInSection = false; 123 return -1; 124 } 125 if( (ptr = strchr( linebuffer, '=')) != NULL) 126 { 127 if( ptr == linebuffer) continue; 128 strcpy (value, &ptr[1]); 129 strncpy (name, linebuffer, strlen (linebuffer) - strlen (value) - 1); 130 return 0; 131 } 127 if( ptr == linebuffer) continue; 128 strcpy (value, &ptr[1]); 129 strncpy (name, linebuffer, strlen (linebuffer) - strlen (value) - 1); 130 return 0; 132 131 } 133 return -1; 132 } 133 return -1; 134 134 } 135 135 136 136 /** 137 138 139 140 141 142 143 144 137 \brief directly acesses an entry in a section 138 \param name: the name of the entry to find 139 \param section: the section where the entry is to be found 140 \param defvalue: what should be returned in case the entry cannot be found 141 \return a pointer to a buffer conatining the value of the specified entry. This buffer will contain the data specified in defvalue in case the entry wasn't found 142 143 The returned pointer points to an internal buffer, so do not free it on your own. Do not give a NULL pointer to defvalue, this will certainly 144 lead to unwanted behaviour. 145 145 */ 146 char* IniParser::get _var( char* name, char* section, char* defvalue = "")146 char* IniParser::getVar( char* name, char* section, char* defvalue = "") 147 147 { 148 strcpy (internbuf, defvalue); 149 if( get_section (section) == -1) return internbuf; 150 151 char namebuf[PARSELINELENGHT]; 152 char valuebuf[PARSELINELENGHT]; 153 154 while( next_var (namebuf, valuebuf) != -1) 148 strcpy (internbuf, defvalue); 149 if( getSection (section) == -1) return internbuf; 150 151 char namebuf[PARSELINELENGHT]; 152 char valuebuf[PARSELINELENGHT]; 153 154 while( nextVar (namebuf, valuebuf) != -1) 155 { 156 if( !strcmp (name, namebuf)) 155 157 { 156 if( !strcmp (name, namebuf)) 157 { 158 strcpy (internbuf, valuebuf); 159 return internbuf; 160 } 158 strcpy (internbuf, valuebuf); 159 return internbuf; 161 160 } 162 return internbuf; 161 } 162 return internbuf; 163 163 } -
orxonox/branches/buerli/src/ini_parser.h
r2190 r3238 6 6 */ 7 7 8 #ifndef INI_PARSER_H9 #define INI_PARSER_H8 #ifndef _INI_PARSER_H 9 #define _INI_PARSER_H 10 10 11 11 #include <stdio.h> … … 29 29 ~IniParser (); 30 30 31 char* get _var( char* name, char* section, char* defvalue);32 int open _file( char* name);33 int get _section( char* section);34 int next _var( char* name, char* value);31 char* getVar( char* name, char* section, char* defvalue); 32 int openFile( char* name); 33 int getSection( char* section); 34 int nextVar( char* name, char* value); 35 35 }; 36 36 37 #endif 37 #endif /* _INI_PARSER_H */ -
orxonox/branches/buerli/src/keynames.cc
r2551 r3238 13 13 co-programmer: ... 14 14 */ 15 #include <SDL/SDL.h>16 15 17 16 #include "keynames.h" … … 21 20 using namespace std; 22 21 23 int buttonname _to_SDLB( char* name)22 int buttonnameToSDLB( char* name) 24 23 { 25 24 if( !strcmp (name, "BUTTON_LEFT")) return SDL_BUTTON_LEFT; … … 31 30 } 32 31 33 char* SDLB _to_buttonname( int button)32 char* SDLBToButtonname( int button) 34 33 { 35 34 if( button == SDL_BUTTON_LEFT) return "BUTTON_LEFT"; … … 41 40 } 42 41 43 int keyname _to_SDLK( char* name)42 int keynameToSDLK( char* name) 44 43 { 45 44 if( !strcmp (name, "BACKSPACE")) return SDLK_BACKSPACE; … … 179 178 } 180 179 181 char* SDLK _to_keyname( int key)180 char* SDLKToKeyname( int key) 182 181 { 183 182 if( key == SDLK_BACKSPACE) return "BACKSPACE"; -
orxonox/branches/buerli/src/keynames.h
r2551 r3238 5 5 Converts strings to SDLK/SDL_BUTTON values and vice versa 6 6 */ 7 #ifndef _KEYNAMES_H 8 #define _KEYNAMES_H 9 7 10 8 11 #ifdef __WIN32__ … … 10 13 #endif 11 14 15 #ifndef __APPLE__ 12 16 #include <SDL/SDL.h> 17 #else 18 #include <SDL.h> 19 #endif 13 20 14 21 /** … … 17 24 \return an int containing the SDL identifier of the mouse button or -1 if the button name is not valid 18 25 */ 19 int buttonname _to_SDLB( char* name);26 int buttonnameToSDLB( char* name); 20 27 21 28 /** … … 24 31 \return a pointer to a string containing the name of the mouse button 25 32 */ 26 char* SDLB _to_buttonname( int button);33 char* SDLBToButtonname( int button); 27 34 28 35 /** … … 31 38 \return the SDLK sym of the named key or -1 if the key name is not valid 32 39 */ 33 int keyname _to_SDLK( char* name);40 int keynameToSDLK( char* name); 34 41 35 42 /** … … 38 45 \return a pointer to a string containig the name of the key 39 46 */ 40 char* SDLK _to_keyname( int key);47 char* SDLKToKeyname( int key); 41 48 49 50 #endif /* _KEYNAMES_H */ -
orxonox/branches/buerli/src/list.h
r2707 r3238 1 /* 2 orxonox - the future of 3D-vertical-scrollers 3 4 Copyright (C) 2004 orx 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 ### File Specific: 12 main-programmer: Christian Meyer 13 14 ADDONS/FIXES: 15 16 Patrick Boenzli : Implemented getSize() function 17 */ 18 19 20 /*! 21 \file list.h 22 \brief Contains a template for a doubly linked list 23 */ 24 25 #ifndef LIST_H 26 #define LIST_H 27 28 #include "stdlib.h" 1 2 #ifndef _LIST_H 3 #define _LIST_H 4 5 #include "stdincl.h" 29 6 30 7 //! An enum to list all the modes available when adding an object to a List 31 enum ADDMODE {LIST_ADD_NEXT, LIST_ADD_PREV,LIST_ADD_FIRST, LIST_ADD_LAST};8 //enum ADDMODE {LIST_ADD_FIRST, LIST_ADD_LAST}; 32 9 //! An enum to list the two searching directions available when removing an object from a List 33 enum FINDMODE {LIST_FIND_BW, LIST_FIND_FW}; 34 35 //! A generic doubly linked list 36 template<class T> class List 37 { 38 T* object; 39 List<T>* next; 40 List<T>* prev; 41 bool bReference; 42 int size; 10 //enum FINDMODE {LIST_FIND_BW, LIST_FIND_FW}; 11 12 13 14 class WorldEntity; 15 16 class List { 17 18 public: 19 List (); 20 ~List (); 21 22 void add(WorldEntity* entity); 23 void remove(WorldEntity* entity); 24 void destroy(); 25 WorldEntity* firstElement(); 26 bool isEmpty(); 27 int getSize(); 28 WorldEntity* enumerate(); 29 WorldEntity* nextElement(); 30 WorldEntity* toArray(); 31 void debug(); 32 33 private: 34 struct listElement 35 { 36 listElement* prev; 37 WorldEntity* curr; 38 listElement* next; 39 }; 40 Uint32 size; 41 listElement* first; 42 listElement* last; 43 listElement* currentEl; 44 45 46 }; 47 48 class Iterator 49 { 50 51 public: 52 bool hasNext(); 53 WorldEntity* next(); 54 55 private: 56 57 }; 58 59 60 template<class T> class tList 61 { 62 private: 63 struct listElement 64 { 65 listElement* prev; 66 T* curr; 67 listElement* next; 68 }; 69 70 Uint32 size; 71 listElement* first; 72 listElement* last; 73 listElement* currentEl; 43 74 44 75 public: 45 List (T* obj, List<T>* n, List<T>* p, bool bRef);46 ~ List ();76 tList (); 77 ~tList (); 47 78 48 int add (T* obj, ADDMODE mode, bool bRef); 49 T* get_object(); 50 List<T>* get_next (); 51 List<T>* get_previous (); 52 List<T>* get_last (); 53 List<T>* get_first (); 54 void set_next (List<T>* ptr); 55 void set_prev (List<T>* ptr); 56 int remove (T* obj, FINDMODE mode); 79 80 void add(WorldEntity* entity); 81 void remove(WorldEntity* entity); 82 void destroy(); 83 T* firstElement(); 84 bool isEmpty(); 57 85 int getSize(); 86 T* enumerate(); 87 T* nextElement(); 88 T* toArray(); 89 void debug(); 58 90 }; 59 91 60 92 61 /** 62 \brief Standard constructor 63 64 Call this without any parameters to generate a new List which can be filled with content. 65 DO NOT create a List element that contains an object on your own, you'll lose the data 66 contained in that object and will have trouble removing the list from your memory. 67 */ 68 template<class T> 69 List<T>::List (T* obj = NULL, List<T>* n = NULL, List<T>* p = NULL, bool bRef = false) 70 { 71 object = obj; 72 next = n; 73 prev = p; 74 bReference = bRef; 75 if(obj != NULL) 76 ++size; 77 } 78 79 /** 80 \brief Standard destructor 81 82 Call this on the initially generated base List element to remove the whole List from the memory. 83 You can safely do this to any List element you want without messing up the rest of the List, but keep in mind 84 that the contained object will be deleted as well when bRef had been set to false. 85 */ 86 template<class T> 87 List<T>::~List () 88 { 89 if (object == NULL) // deleted foot node => disband the list 90 { 91 while( next != NULL) 93 template<class T> 94 tList<T>::tList () 95 { 96 this->first = NULL; 97 this->last = NULL; 98 this->size = 0; 99 } 100 101 template<class T> 102 tList<T>::~tList () 103 {} 104 105 template<class T> 106 void tList<T>::add(WorldEntity* entity) 107 { 108 listElement* el = new listElement; 109 el->prev = this->last; 110 el->curr = entity; 111 el->next = NULL; 112 113 this->last = el; 114 115 if(this->size == 0) this->first = el; 116 else el->prev->next = el; 117 this->size++; 118 } 119 120 121 template<class T> 122 void tList<T>::remove(WorldEntity* entity) 123 { 124 this->currentEl = this->first; 125 listElement* te; 126 while( this->currentEl != NULL) 92 127 { 93 delete next; 128 if( this->currentEl->curr == entity) 129 { 130 if( this->currentEl->prev == NULL ) this->first = this->currentEl->next; 131 else this->currentEl->prev->next = this->currentEl->next; 132 133 if( this->currentEl->next == NULL) this->last = this->currentEl->prev; 134 else this->currentEl->next->prev = this->currentEl->prev; 135 136 te = this->currentEl->next; 137 delete this->currentEl; 138 this->currentEl = te; 139 return; 140 } 141 this->currentEl = this->currentEl->next; 94 142 } 95 while( prev != NULL) 143 } 144 145 146 template<class T> 147 void tList<T>::destroy() 148 { 149 this->currentEl = this->first; 150 while(this->currentEl != NULL) 96 151 { 97 delete prev; 152 listElement* le = this->currentEl->next; 153 delete this->currentEl->curr; 154 delete this->currentEl; 155 this->currentEl = le; 98 156 } 99 } 100 else 101 { 102 if (prev != NULL) prev->set_next (next); 103 if (next != NULL) next->set_prev (prev); 104 if (!bReference) delete object; 105 } 106 } 107 108 /** 109 \brief Add an object to the List 110 \param obj: A pointer to an allocated object 111 \param mode: A Value of ADDMODE (default: LIST_ADD_NEXT) 112 \param bRef: Sets whether the element is serving as a storage point or a simple listing (default: false) 113 \return 0 if the operation succeded, -1 if the element could not be added 114 115 This adds a new List element to the chain. The mode parameter can be used to specify 116 the location where the element should be added. LIST_ADD_NEXT will add the new element directly 117 after the base element. LIST_ADD_PREV will add the new element directly before the base element. 118 LIST_ADD_FIRST will add the element at the beginning of the List whereas LIST_ADD_LAST will add 119 it to the end of the chain. If the bRef parameter is set to true, the object pointer will not be deleted 120 when the element containing that object is deleted, thus the List can be used for temporary listings as 121 well as permanent data storage. 122 */ 123 template<class T> 124 int List<T>::add (T* obj, ADDMODE mode = LIST_ADD_NEXT, bool bRef = false) 125 { 126 List<T>* p; 127 if( obj == NULL) return -1; 128 switch (mode) 129 { 130 case LIST_ADD_NEXT: 131 p = new List<T>( obj, next, this, bRef); 132 if( next != NULL) next->set_prev (p); 133 next = p; 134 break; 135 case LIST_ADD_PREV: 136 p = new List<T>( obj, this, prev, bRef); 137 if( prev != NULL) prev->set_next (p); 138 prev = p; 139 break; 140 case LIST_ADD_FIRST: 141 if (prev == NULL) prev = new List<T> (obj, this, NULL, bRef); 142 else return prev->add (obj, mode, bRef); 143 break; 144 case LIST_ADD_LAST: 145 if (next == NULL) next = new List<T> (obj, NULL, this, bRef); 146 else return next->add (obj, mode, bRef); 147 break; 148 default: 149 return -1; 150 break; 151 } 152 ++size; 153 return 0; 154 } 155 156 /** 157 \brief Get the next element of the List 158 \return The List element after the current List element 159 */ 160 template<class T> 161 List<T>* List<T>::get_next () 162 { 163 return next; 164 } 165 166 /** 167 \brief Get the previous element of the List 168 \return The List element before the current List element 169 */ 170 template<class T> 171 List<T>* List<T>::get_previous () 172 { 173 return prev; 174 } 175 176 /** 177 \brief Get the last element of the List 178 \return The last List element 179 */ 180 template<class T> 181 List<T>* List<T>::get_last () 182 { 183 if (next == NULL) return this; 184 else return next->get_last(); 185 } 186 187 /** 188 \brief Get the first element of the List 189 \return The first List element 190 */ 191 template<class T> 192 List<T>* List<T>::get_first () 193 { 194 if (prev == NULL) return this; 195 else return prev->get_first(); 196 } 197 198 /** 199 \brief Removes a certain element from the List 200 \param obj: A pointer to the object that should be removed 201 \param mode: A value of FINDMODE 202 \return 0 if the element was found and removed, -1 if the element was not found 203 204 This searches the part of the List specified with mode for the object in question. 205 When the object is found it is deleted and the List element is removed from the chain. 206 If mode is LIST_FIND_FW all elements AFTER the base element are searched, if mode is 207 LIST_FIND_BW all elements BEFORE the base element are searched. Note that the object 208 contained within the List element is NOT deleted when bRef was set to true. 209 */ 210 template<class T> 211 int List<T>::remove (T* obj, FINDMODE mode = LIST_FIND_FW) 212 { 213 if (obj == NULL) return -1; 214 else 215 { 216 switch (mode) 217 { 218 case LIST_FIND_BW: 219 if (prev == NULL) return -1; 220 else 221 { 222 if( prev->get_object() == obj) 223 { 224 delete prev; 225 } 226 else 227 { 228 return prev->remove( obj, mode); 229 } 230 } 231 break; 232 case LIST_FIND_FW: 233 if (next == NULL) return -1; 234 else 235 { 236 if( next->get_object() == obj) 237 { 238 delete next; 239 } 240 else 241 { 242 return next->remove( obj, mode); 243 } 244 } 245 break; 246 default: 247 return -1; 248 } 249 } 250 --size; 251 return 0; 252 } 253 254 /** 255 \brief Set the next element of a List element 256 \param ptr: A pointer to the new next element 257 258 Sets the next element of a List element... Better not touch this, it can really mess up a List. 259 */ 260 template<class T> 261 void List<T>::set_next (List<T>* ptr) 262 { 263 next = ptr; 264 } 265 266 /** 267 \brief Set the prev element of a List element 268 \param ptr: A pointer to the new previous element 269 270 Sets the previous element of a List element... Better not touch this, it can really mess up a List. 271 */ 272 template<class T> 273 void List<T>::set_prev (List<T>* ptr) 274 { 275 prev = ptr; 276 } 277 278 /** 279 \brief Get the pointer to the object the element is containing 280 \return The contained object (will be NULL if called on the base element). 281 */ 282 template<class T> 283 T* List<T>::get_object() 284 { 285 return object; 286 } 287 288 289 /** 290 \brief Returns the current size of the List 291 \return Size of List 292 */ 293 template<class T> 294 int List<T>::getSize() 157 this->first = NULL; 158 this->last = NULL; 159 this->size = 0; 160 } 161 162 163 template<class T> 164 T* tList<T>::firstElement() 165 { 166 return this->first->curr; 167 } 168 169 170 template<class T> 171 bool tList<T>::isEmpty() 172 { 173 return (this->size==0)?true:false; 174 } 175 176 177 template<class T> 178 int tList<T>::getSize() 295 179 { 296 180 return this->size; 297 181 } 298 182 299 #endif 300 183 184 template<class T> 185 T* tList<T>::enumerate() 186 { 187 if(this->size == 0) return NULL; 188 this->currentEl = this->first; 189 return this->currentEl->curr; 190 } 191 192 193 template<class T> 194 T* tList<T>::nextElement() 195 { 196 if(this->size == 0) return NULL; 197 this->currentEl = this->currentEl->next; 198 if(this->currentEl == NULL) return NULL; 199 return this->currentEl->curr; 200 } 201 202 203 template<class T> 204 T* tList<T>::toArray() 205 {} 206 207 #endif /* _LIST_H */ -
orxonox/branches/buerli/src/message_structures.h
r2551 r3238 4 4 */ 5 5 6 #ifndef _MESSAGE STRUCTURES_H7 #define _MESSAGE STRUCTURES_H6 #ifndef _MESSAGE_STRUCTURES_H 7 #define _MESSAGE_STRUCTURES_H 8 8 9 9 #define CMD_LENGHT 16 … … 26 26 } Command; 27 27 28 #endif 28 #endif /* _MESSAGE_STRUCTURES_H */ -
orxonox/branches/buerli/src/npc.h
r2036 r3238 1 1 2 #ifndef NPC_H3 #define NPC_H2 #ifndef _NPC_H 3 #define _NPC_H 4 4 5 5 #include "world_entity.h" … … 41 41 }; 42 42 43 #endif 43 #endif /* _NPC_H */ -
orxonox/branches/buerli/src/orxonox.cc
r2707 r3238 47 47 Orxonox::~Orxonox () 48 48 { 49 Orxonox::singleton _ref = NULL;49 Orxonox::singletonRef = NULL; 50 50 if( world != NULL) delete world; 51 51 if( localinput != NULL) delete world; … … 56 56 57 57 /* this is a singleton class to prevent duplicates */ 58 Orxonox* Orxonox::singleton _ref = 0;58 Orxonox* Orxonox::singletonRef = 0; 59 59 60 60 Orxonox* Orxonox::getInstance (void) 61 61 { 62 if (singleton _ref == NULL)63 singleton _ref = new Orxonox();64 return singleton _ref;62 if (singletonRef == NULL) 63 singletonRef = new Orxonox(); 64 return singletonRef; 65 65 } 66 66 … … 72 72 it's path and name into configfilename 73 73 */ 74 void Orxonox::get_config_file (int argc, char** argv) 75 { 76 /* char* path; 77 #ifdef __WIN32__ 78 path = getenv(""); 79 #else 80 path = getenv("HOME"); 81 #endif 82 83 if( path != NULL) strcpy (configfilename, path); 84 else strcpy (configfilename, "./"); 85 strcat (configfilename, "/.orxonox.conf");*/ 86 74 void Orxonox::getConfigFile (int argc, char** argv) 75 { 87 76 strcpy (configfilename, "orxonox.conf"); 88 77 } … … 96 85 // config file 97 86 98 get_config_file (argc, argv); 99 100 // initialize SDL 101 printf("> Initializing SDL\n"); 102 if( SDL_Init (SDL_INIT_EVERYTHING) == -1) 87 getConfigFile (argc, argv); 88 SDL_Init (SDL_INIT_TIMER); 89 // initialize everything 90 if( initVideo() == -1) return -1; 91 if( initSound() == -1) return -1; 92 printf("> Initializing input\n"); 93 if( initInput() == -1) return -1; 94 printf("> Initializing networking\n"); 95 if( initNetworking () == -1) return -1; 96 printf("> Initializing resources\n"); 97 if( initResources () == -1) return -1; 98 //printf("> Initializing world\n"); 99 //if( init_world () == -1) return -1; PB: world will be initialized when started 100 101 return 0; 102 } 103 104 /** 105 \brief initializes SDL and OpenGL 106 */ 107 int Orxonox::initVideo() 108 { 109 printf("> Initializing video\n"); 110 if (SDL_Init(SDL_INIT_VIDEO) == -1) 103 111 { 104 printf (" Could not SDL_Init(): %s\n", SDL_GetError());112 printf ("could not initialize SDL Video\n"); 105 113 return -1; 106 114 } 107 108 // initialize everything109 printf("> Initializing video\n");110 if( init_video () == -1) return -1;111 printf("> Initializing sound\n");112 if( init_sound () == -1) return -1;113 printf("> Initializing input\n");114 if( init_input () == -1) return -1;115 printf("> Initializing networking\n");116 if( init_networking () == -1) return -1;117 printf("> Initializing resources\n");118 if( init_resources () == -1) return -1;119 //printf("> Initializing world\n");120 //if( init_world () == -1) return -1; PB: world will be initialized when started121 122 return 0;123 }124 125 /**126 \brief initializes SDL and OpenGL127 */128 int Orxonox::init_video ()129 {130 115 // Set video mode 131 116 // TO DO: parse arguments for settings 132 SDL_GL_SetAttribute 133 SDL_GL_SetAttribute 134 SDL_GL_SetAttribute 135 SDL_GL_SetAttribute 117 SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5); 118 SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5); 119 SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5); 120 SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16); 136 121 137 122 int bpp = 16; … … 140 125 Uint32 flags = SDL_HWSURFACE | SDL_OPENGL | SDL_GL_DOUBLEBUFFER; 141 126 142 if( 127 if((screen = SDL_SetVideoMode (width, height, bpp, flags)) == NULL) 143 128 { 144 printf 129 printf("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", width, height, bpp, flags, SDL_GetError()); 145 130 SDL_Quit(); 146 131 return -1; … … 148 133 149 134 // Set window labeling 150 // TO DO: Add version information to caption 151 SDL_WM_SetCaption( "Orxonox", "Orxonox"); 135 SDL_WM_SetCaption("Orxonox " PACKAGE_VERSION, "Orxonox " PACKAGE_VERSION); 152 136 153 137 // TO DO: Create a cool icon and use it here … … 158 142 glClearColor(0.0, 0.0, 0.0, 0.0); 159 143 glEnable(GL_DEPTH_TEST); 160 glEnable(GL_COLOR); 161 glShadeModel(GL_FLAT); 144 145 // LIGHTING 146 GLfloat lmodelAmbient[] = {.1, .1, .1, 1.0}; 147 GLfloat whiteLight[] = {1.0, 1.0, 1.0,1.0}; 148 GLfloat lightPosition[] = {10.0, 10, 19.0, 0.0}; 149 150 glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight); 151 glLightfv(GL_LIGHT0, GL_SPECULAR, whiteLight); 152 glEnable(GL_LIGHTING); 153 glEnable(GL_LIGHT0); 154 glEnable(GL_DEPTH_TEST); 155 glLightfv(GL_LIGHT0, GL_POSITION, lightPosition); 156 glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight); 157 158 // glEnable(GL_COLOR); 159 // glShadeModel(GL_SMOOTH); 162 160 163 161 // create camera 164 localcamera = new Camera(world); 165 166 return 0; 167 } 162 //localcamera = new Camera(world); /* \todo camera/input node not used anymore*/ 163 164 return 0; 165 } 166 168 167 169 168 /** 170 169 \brief initializes the sound engine 171 170 */ 172 int Orxonox::init_sound () 173 { 171 int Orxonox::initSound() 172 { 173 printf("> Initializing sound\n"); 174 // SDL_Init(SDL_INIT_AUDIO); 174 175 printf("Not yet implemented\n"); 175 176 return 0; 176 177 } 177 178 179 178 180 /** 179 181 \brief initializes input functions 180 182 */ 181 int Orxonox::init _input()183 int Orxonox::initInput() 182 184 { 183 185 // create localinput … … 187 189 } 188 190 191 189 192 /** 190 193 \brief initializes network system 191 194 */ 192 int Orxonox::init _networking()195 int Orxonox::initNetworking() 193 196 { 194 197 printf("Not yet implemented\n"); … … 196 199 } 197 200 201 198 202 /** 199 203 \brief initializes and loads resource files 200 204 */ 201 int Orxonox::init _resources()205 int Orxonox::initResources() 202 206 { 203 207 printf("Not yet implemented\n"); … … 205 209 } 206 210 211 207 212 /** 208 213 \brief initializes the world 209 214 */ 210 int Orxonox::init _world()215 int Orxonox::initWorld() 211 216 { 212 217 //world = new World(); … … 236 241 } 237 242 243 238 244 /** 239 245 \brief exits Orxonox … … 244 250 } 245 251 246 /** 247 \brief this runs all of Orxonox 248 */ 249 void Orxonox::mainLoop() 250 { 251 lastframe = SDL_GetTicks(); 252 bQuitOrxonox = false; 253 // This is where everything is run 254 printf("Orxonox|Entering main loop\n"); 255 while( !bQuitOrxonox) 256 { 257 // Network 258 synchronize(); 259 // Process input 260 handle_input(); 261 // Process time 262 time_slice(); 263 // Process collision 264 collision(); 265 // Draw 266 display(); 267 } 268 printf("Orxonox|Exiting the main loop\n"); 269 } 252 270 253 271 254 /** … … 273 256 \param event: an event not handled by the CommandNode 274 257 */ 275 void Orxonox::event _handler(SDL_Event* event)258 void Orxonox::eventHandler(SDL_Event* event) 276 259 { 277 260 // Handle special events such as reshape, quit, focus changes 278 261 } 279 280 /** 281 \brief synchronize local data with remote data 282 */ 283 void Orxonox::synchronize () 284 { 285 // Get remote input 286 // Update synchronizables 287 } 288 289 /** 290 \brief run all input processing 291 */ 292 void Orxonox::handle_input () 293 { 294 // localinput 295 localinput->process(); 296 // remoteinput 297 } 298 299 /** 300 \brief advance the timeline 301 */ 302 void Orxonox::time_slice () 303 { 304 Uint32 curframe = SDL_GetTicks(); 305 if( !pause) 306 { 307 Uint32 dt = curframe - lastframe; 308 309 if(dt > 0) 310 { 311 float fps = 1000/dt; 312 printf("fps = %f\n", fps); 313 } 314 315 world->time_slice (dt); 316 world->update (); 317 localcamera->time_slice (dt); 318 } 319 lastframe = curframe; 320 } 321 322 /** 323 \brief compute collision detection 324 */ 325 void Orxonox::collision () 326 { 327 world->collide (); 328 } 262 329 263 330 264 /** … … 333 267 \return true if the command was handled by the system or false if it may be passed to the WorldEntities 334 268 */ 335 bool Orxonox::system_command (Command* cmd) 336 { 269 bool Orxonox::systemCommand(Command* cmd) 270 { 271 /* 337 272 if( !strcmp( cmd->cmd, "quit")) 338 273 { … … 341 276 } 342 277 return false; 343 } 344 345 /** 346 \brief render the current frame 347 */ 348 void Orxonox::display () 349 { 350 // clear buffer 351 glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); 352 // set camera 353 localcamera->apply (); 354 // draw world 355 world->draw (); 356 // draw HUD 357 // flip buffers 358 SDL_GL_SwapBuffers(); 359 } 278 */ 279 return false; 280 } 281 360 282 361 283 /** … … 363 285 \return a pointer to localcamera 364 286 */ 365 Camera* Orxonox::get _camera()287 Camera* Orxonox::getCamera() 366 288 { 367 289 return localcamera; 368 290 } 291 369 292 370 293 /** … … 372 295 \return a pointer to localinput 373 296 */ 374 CommandNode* Orxonox::get _localinput()297 CommandNode* Orxonox::getLocalInput() 375 298 { 376 299 return localinput; 377 300 } 301 378 302 379 303 /** … … 381 305 \return a pointer to world 382 306 */ 383 World* Orxonox::get _world()307 World* Orxonox::getWorld() 384 308 { 385 309 return world; 386 310 } 387 311 388 int main (int argc, char** argv) 312 313 314 315 int main(int argc, char** argv) 389 316 { 390 317 printf(">>> Starting Orxonox <<<\n"); 391 318 Orxonox *orx = Orxonox::getInstance(); 392 319 393 if( 320 if((*orx).init(argc, argv) == -1) 394 321 { 395 322 printf("! Orxonox initialization failed\n"); … … 397 324 } 398 325 399 //(*orx).mainLoop();400 401 326 orx->start(); 402 327 -
orxonox/branches/buerli/src/orxonox.h
r2707 r3238 4 4 */ 5 5 6 #ifndef ORXONOX_H 7 #define ORXONOX_H 8 9 #include <SDL/SDL.h> 6 #ifndef _ORXONOX_H 7 #define _ORXONOX_H 10 8 11 9 #include "stdincl.h" … … 24 22 25 23 private: 26 static Orxonox* singleton _ref;24 static Orxonox* singletonRef; 27 25 Orxonox (); 28 26 ~Orxonox (); … … 40 38 Uint32 lastframe; 41 39 42 void get _config_file (int argc, char** argv);40 void getConfigFile (int argc, char** argv); 43 41 44 42 // main loop functions 45 void synchronize ();46 void handle_input ();47 void time_slice ();48 void collision ();49 void display ();43 // void synchronize (); 44 //void handle_input (); 45 //void time_slice (); 46 //void collision (); 47 //void display (); 50 48 51 49 // subsystem initialization 52 int init _video ();53 int init _sound ();54 int init _input ();55 int init _networking ();56 int init _resources ();57 int init _world ();50 int initVideo (); 51 int initSound (); 52 int initInput (); 53 int initNetworking (); 54 int initResources (); 55 int initWorld (); 58 56 59 57 public: … … 62 60 void quitGame(); 63 61 64 void event _handler (SDL_Event* event);65 bool system _command (Command* cmd);62 void eventHandler (SDL_Event* event); 63 bool systemCommand (Command* cmd); 66 64 67 65 int init (int argc, char** argv); 68 66 69 CommandNode* get _localinput();70 Camera* get _camera();71 World* get _world();67 CommandNode* getLocalInput(); 68 Camera* getCamera(); 69 World* getWorld(); 72 70 73 void mainLoop();71 //void mainLoop(); 74 72 }; 75 73 76 #endif 74 #endif /* _ORXONOX_H */ 77 75 -
orxonox/branches/buerli/src/player.cc
r2707 r3238 25 25 Player::Player(bool isFree) : WorldEntity(isFree) 26 26 { 27 }28 27 29 Player::~Player () 28 this->obj = new Object("reaplow.obj"); 29 /* 30 objectList = glGenLists(1); 31 glNewList (objectList, GL_COMPILE); 30 32 31 {32 }33 34 void Player::post_spawn ()35 {36 travel_speed = 15.0;37 velocity = Vector();38 bUp = bDown = bLeft = bRight = bAscend = bDescend = false;39 bFire = false;40 acceleration = 10.0;41 set_collision (new CollisionCluster (1.0, Vector(0,0,0)));42 }43 44 void Player::tick (float time)45 {46 // movement47 move (time);48 }49 50 void Player::hit (WorldEntity* weapon, Vector loc)51 {52 }53 54 void Player::destroy ()55 {56 }57 58 void Player::collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags)59 {60 }61 62 void Player::command (Command* cmd)63 {64 //printf("Player|recieved command [%s]\n", cmd->cmd);65 if( !strcmp( cmd->cmd, "up")) bUp = !cmd->bUp;66 else if( !strcmp( cmd->cmd, "down")) bDown = !cmd->bUp;67 else if( !strcmp( cmd->cmd, "left")) bLeft = !cmd->bUp;68 else if( !strcmp( cmd->cmd, "right")) bRight = !cmd->bUp;69 else if( !strcmp( cmd->cmd, "fire")) bFire = !cmd->bUp;70 }71 72 void Player::draw ()73 {74 glMatrixMode(GL_MODELVIEW);75 glLoadIdentity();76 float matrix[4][4];77 78 glTranslatef(get_placement()->r.x,get_placement()->r.y,get_placement()->r.z);79 get_placement()->w.matrix (matrix);80 glMultMatrixf ((float*)matrix);81 82 33 glBegin(GL_TRIANGLES); 83 34 glColor3f(1,1,1); … … 99 50 glEnd(); 100 51 101 //printf("Player@%f/%f/%f\n", get_placement()->r.x, get_placement()->r.y, get_placement()->r.z); 52 glEndList (); 53 */ 102 54 } 103 55 104 void Player::get_lookat (Location* locbuf)56 Player::~Player() 105 57 { 106 *locbuf = *get_location(); 107 //locbuf->dist += 5.0; 58 delete this->obj; 108 59 } 109 60 110 void Player::left_world () 61 void Player::postSpawn() 62 { 63 travelSpeed = 15.0; 64 velocity = Vector(); 65 bUp = bDown = bLeft = bRight = bAscend = bDescend = false; 66 bFire = false; 67 acceleration = 10.0; 68 setCollision(new CollisionCluster(1.0, Vector(0,0,0))); 69 } 70 71 void Player::tick(float time) 72 { 73 // movement 74 move (time); 75 } 76 77 void Player::hit(WorldEntity* weapon, Vector loc) 111 78 { 112 79 } 113 80 114 void Player::move (float time) 81 void Player::destroy() 82 { 83 } 84 85 void Player::collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags) 86 { 87 } 88 89 void Player::command(Command* cmd) 90 { 91 //printf("Player|recieved command [%s]\n", cmd->cmd); 92 if( !strcmp( cmd->cmd, "up")) bUp = !cmd->bUp; 93 else if( !strcmp( cmd->cmd, "down")) bDown = !cmd->bUp; 94 else if( !strcmp( cmd->cmd, "left")) bLeft = !cmd->bUp; 95 else if( !strcmp( cmd->cmd, "right")) bRight = !cmd->bUp; 96 else if( !strcmp( cmd->cmd, "fire")) bFire = !cmd->bUp; 97 } 98 99 void Player::draw() 100 { 101 glMatrixMode(GL_MODELVIEW); 102 glLoadIdentity(); 103 float matrix[4][4]; 104 105 glTranslatef(getPlacement()->r.x, getPlacement()->r.y, getPlacement()->r.z); 106 getPlacement()->w.matrix (matrix); 107 glMultMatrixf((float*)matrix); 108 109 glMatrixMode(GL_MODELVIEW); 110 glRotatef(-90, 0,1,0); 111 obj->draw(); 112 // glCallList(objectList); 113 114 115 116 } 117 118 void Player::getLookat(Location* locbuf) 119 { 120 *locbuf = *getLocation(); 121 //locbuf->dist += 5.0; 122 } 123 124 void Player::leftWorld() 125 { 126 } 127 128 void Player::move(float time) 115 129 { 116 130 Vector accel(0.0, 0.0, 0.0); 117 /* FIXME: calculating the direction and orthDirection every time _slice is redundant! save it somewhere */118 Placement *pos = get _placement();131 /* FIXME: calculating the direction and orthDirection every timeSlice is redundant! save it somewhere */ 132 Placement *pos = getPlacement(); 119 133 /* calculate the direction in which the craft is heading */ 120 134 Vector direction(0.0, 0.0, 1.0); … … 128 142 if( bRight ) { accel = accel - (orthDirection*acceleration); } 129 143 if( bAscend ) { /* not yet implemented but just: (0,0,1)*acceleration */} 130 if( bDescend) {/* FIXME */} 144 if( bDescend) {/* FIXME */} /* \todo up and down player movement */ 131 145 132 Location* l = get _location();146 Location* l = getLocation(); 133 147 134 148 // r(t) = r(0) + v(0)*t + 1/2*a*t^2 … … 138 152 139 153 /* this the base-speed of the player: determines how fast and how the player follows the track*/ 140 l->dist = l->dist + travel _speed * time;154 l->dist = l->dist + travelSpeed * time; 141 155 142 156 /* this updates the player position on the track - user interaction */ 143 157 l->pos = l->pos + accel*time; 144 158 } 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 -
orxonox/branches/buerli/src/player.h
r2551 r3238 4 4 */ 5 5 6 #ifndef PLAYER_H7 #define PLAYER_H6 #ifndef _PLAYER_H 7 #define _PLAYER_H 8 8 9 9 #include "world_entity.h" 10 #include "importer/object.h" 10 11 11 12 //! Basic controllable WorldEntity … … 15 16 16 17 public: 17 Player 18 ~Player 18 Player(bool isFree = false); 19 ~Player(); 19 20 20 virtual void post _spawn();21 virtual void tick 22 virtual void hit 23 virtual void destroy 24 virtual void collide (WorldEntity* other,Uint32 ownhitflags, Uint32 otherhitflags);25 virtual void command 21 virtual void postSpawn(); 22 virtual void tick(float time); 23 virtual void hit(WorldEntity* weapon, Vector loc); 24 virtual void destroy(); 25 virtual void collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); 26 virtual void command(Command* cmd); 26 27 27 virtual void draw 28 virtual void get _lookat(Location* locbuf);28 virtual void draw(); 29 virtual void getLookat(Location* locbuf); 29 30 30 virtual void left _world();31 virtual void leftWorld(); 31 32 32 33 private: … … 34 35 bool bFire; 35 36 Vector velocity; 36 float travel _speed;37 float travelSpeed; 37 38 float acceleration; 39 GLuint objectList; 40 Object* obj; 38 41 39 void move 42 void move(float time); 40 43 41 44 }; 42 45 43 #endif 46 #endif /* _PLAYER_H */ -
orxonox/branches/buerli/src/power_up.h
r2077 r3238 4 4 */ 5 5 6 #ifndef POWER_UP_H7 #define POWER_UP_H6 #ifndef _POWER_UP_H 7 #define _POWER_UP_H 8 8 9 9 #include "data_tank.h" … … 19 19 }; 20 20 21 #endif 21 #endif /* _POWER_UP_H */ -
orxonox/branches/buerli/src/proto_class.h
r2036 r3238 1 1 2 #ifndef PROTO_CLASS_H3 #define PROTO_CLASS_H2 #ifndef _PROTO_CLASS_H 3 #define _PROTO_CLASS_H 4 4 5 5 #include "data_tank.h" … … 14 14 }; 15 15 16 #endif 16 #endif /* _PROTO_CLASS_H */ -
orxonox/branches/buerli/src/shoot_laser.h
r2036 r3238 1 1 2 #ifndef SHOOT_LASER_H3 #define SHOOT_LASER_H2 #ifndef _SHOOT_LASER_H 3 #define _SHOOT_LASER_H 4 4 5 5 … … 40 40 }; 41 41 42 #endif 42 #endif /* _SHOOT_LASER_H */ -
orxonox/branches/buerli/src/shoot_rocket.h
r2036 r3238 1 1 2 #ifndef SHOOT_ROCKET_H3 #define SHOOT_ROCKET_H2 #ifndef _SHOOT_ROCKET_H 3 #define _SHOOT_ROCKET_H 4 4 5 5 … … 54 54 }; 55 55 56 #endif 56 #endif /* _SHOOT_ROCKET_H */ -
orxonox/branches/buerli/src/stdincl.h
r2707 r3238 1 /*! 2 \file stdincl.h 3 \brief This file includes default headers that nearly every Class needs. 4 5 no Class is defined here, but many headers to classes, and more general Headers like the openGL-header. 6 */ 1 7 2 #ifndef STDINCL_H3 #define STDINCL_H8 #ifndef _STDINCL_H 9 #define _STDINCL_H 4 10 5 #define null 0 11 #define null 0 //!< null 12 13 // this includes the information from configure/makefiles 14 #if HAVE_CONFIG_H 15 #include <config.h> 16 #endif 6 17 7 18 #ifdef __WIN32__ 8 19 #include <windows.h> 9 20 #endif 21 22 #ifndef __APPLE__ 10 23 #include <SDL/SDL.h> 11 24 #include <GL/gl.h> 12 25 #include <GL/glu.h> 26 #else 27 #include <SDL.h> 28 #include <OpenGL/gl.h> 29 #include <OpenGL/glu.h> 30 #endif 13 31 14 32 #include "vector.h" 15 33 #include "coordinates.h" 16 34 #include "list.h" 35 #include "list_template.h" 17 36 #include "error.h" 37 #include "debug.h" 18 38 #include "message_structures.h" 19 39 #include "orxonox.h" 20 40 21 #endif 41 #endif /* _STDINCL_H */ -
orxonox/branches/buerli/src/story_def.h
r2707 r3238 1 1 2 #ifndef STORY_DEF_H3 #define STORY_DEF_H2 #ifndef _STORY_DEF_H 3 #define _STORY_DEF_H 4 4 5 5 6 #define DEBUG_CAMPAIGN_0 07 #define DEBUG_CAMPAIGN_1 1 8 #define DEBUG_CAMPAIGN_2 26 #define DEBUG_CAMPAIGN_0 1000 7 #define DEBUG_CAMPAIGN_1 1001 8 #define DEBUG_CAMPAIGN_2 1002 9 9 10 #define DEBUG_WORLD_0 011 #define DEBUG_WORLD_1 1 12 #define DEBUG_WORLD_2 210 #define DEBUG_WORLD_0 100 11 #define DEBUG_WORLD_1 101 12 #define DEBUG_WORLD_2 102 13 13 14 14 #define WORLD_ID_0 0 … … 20 20 #define WORLD_ID_GAMEEND 999 21 21 22 #define MAX_STORY_ENTITIES 99 ;//!> maximal StoryEntities in a Campaign22 #define MAX_STORY_ENTITIES 99 //!> maximal StoryEntities in a Campaign 23 23 24 #endif 24 #endif /* _STORY_DEF_H */ -
orxonox/branches/buerli/src/story_entity.cc
r2707 r3238 30 30 /** 31 31 \brief initialize the entity before use. 32 \returns an error code if not able to apply. 32 33 33 34 After execution of this function, the Entity is ready to be played/executed, 34 35 this shifts the initialisation work before the execution - very important... 35 36 36 */ 37 Error StoryEntity::init()37 ErrorMessage StoryEntity::init() 38 38 {} 39 39 40 40 41 void StoryEntity::setStoryID(Uint32 storyID) 41 /** 42 \brief sets the story ID 43 44 sets the story id of the current entity, this enables it to be identified in a 45 global context. 46 */ 47 void StoryEntity::setStoryID(int storyID) 42 48 { 43 49 this->storyID = storyID; 44 50 } 45 51 52 53 /** 54 \brief this reads the story id of the current entity 55 \returns the story entity id 56 */ 46 57 int StoryEntity::getStoryID() 47 58 { … … 50 61 51 62 52 void StoryEntity::setNextStoryID(Uint32 nextStoryID) 63 /** 64 \brief sets the id of the next story entity 65 66 StoryEntities can choose their following entity themselfs. the entity id defined here 67 will be startet after this entity ends. this can be convenient if you want to have a 68 non linear story with switches. 69 */ 70 void StoryEntity::setNextStoryID(int nextStoryID) 53 71 { 54 72 this->nextStoryID = nextStoryID; 55 73 } 56 74 57 Uint32 StoryEntity::getNextStoryID() 75 /** 76 \brief gets the story id of the current entity 77 \returns story id 78 */ 79 int StoryEntity::getNextStoryID() 58 80 { 59 81 return this->nextStoryID; … … 61 83 62 84 63 Error StoryEntity::start(Uint32 storyID) 64 {} 85 /** 86 \brief starts the entity with the choosen id. only for entities with lists. 87 \param story id 88 \returns error code if this action has caused a error 65 89 66 Error StoryEntity::start() 67 {} 68 69 Error StoryEntity::stop() 70 {} 71 72 Error StoryEntity::pause() 73 {} 74 75 Error StoryEntity::resume() 90 this simply starts the story with the id storyID. the story with the choosen id has 91 to be part of the current entity else, this doesn't make sense. this is used for 92 campaigns or the GameLoader, they have lists of Campaigns/Worlds with their own 93 storyID. 94 */ 95 ErrorMessage StoryEntity::start(int storyID) 76 96 {} 77 97 78 98 99 /** 100 \brief starts the current entity 101 \returns error code if this action has caused a error 102 */ 103 ErrorMessage StoryEntity::start() 104 {} 105 106 107 /** 108 \brief stops the current entity 109 \returns error code if this action has caused a error 110 111 ATTENTION: this function shouldn't call other functions, or if so, they must return 112 after finishing. If you ignore or forget to do so, the current entity is not able to 113 terminate and it will run in the background or the ressources can't be freed or even 114 worse: are freed and the program will end in a segmentation fault! 115 hehehe, all seen... :) 116 */ 117 ErrorMessage StoryEntity::stop() 118 {} 119 120 121 /** 122 \brief pause the current entity 123 \returns error code if this action has caused a error 124 125 this pauses the current entity or passes this call forth to the running entity. 126 */ 127 ErrorMessage StoryEntity::pause() 128 {} 129 130 131 /** 132 \brief resumes a pause 133 \returns error code if this action has caused a error 134 135 this resumess the current entity or passes this call forth to the running entity. 136 */ 137 ErrorMessage StoryEntity::resume() 138 {} 139 140 141 /** 142 \brief loads the current entity 143 144 this is here to enable you loading maps into the entities. for all other actions you 145 should take the init() function. 146 */ 79 147 void StoryEntity::load() 80 148 {} 81 149 82 150 83 void StoryEntity::displayEntityScreen() 151 /** 152 \brief destroys and cleans up the current entity. 153 154 this cleans up ressources before the deconstructor is called. for terminating 155 the entity please use the stop() function. 156 */ 157 void StoryEntity::destroy() 84 158 {} 85 159 86 void StoryEntity::releaseEntityScreen() 160 161 /** 162 \brief this displays the load screen 163 164 it will need some time to load maps or things like that. to inform the user about 165 progress and to just show him/her something for the eyes, put here this stuff 166 */ 167 void StoryEntity::displayLoadScreen() 87 168 {} 169 170 171 /** 172 \brief undisplay the load screen 173 174 the load process has terminated, you now can release the load screen and start this 175 entity. 176 */ 177 void StoryEntity::releaseLoadScreen() 178 {} -
orxonox/branches/buerli/src/story_entity.h
r2707 r3238 1 /*! 2 \file story_entity.h 3 \brief holds the base class of everything that is playable - that is part of the story 4 */ 1 5 2 #ifndef STORY_ENTITY_H 3 #define STORY_ENTITY_H 6 7 #ifndef _STORY_ENTITY_H 8 #define _STORY_ENTITY_H 4 9 5 10 #include "stdincl.h" 6 11 #include "story_def.h" 7 12 13 //! A class that represents something to play in orxonox. it is a container for worlds, movies, mission briefings, etc... 8 14 class StoryEntity { 9 15 10 16 public: 11 17 StoryEntity (); 12 ~StoryEntity ();18 virtual ~StoryEntity (); 13 19 14 bool isInit; 15 bool isPaused; 20 bool isInit; //! if the entity is initialized, this has to be true 21 bool isPaused; //! is true if the entity is paused 16 22 17 virtual Error init();18 virtual Error start(Uint32storyID);19 virtual Error start();20 virtual Error stop();21 virtual Error pause();22 virtual Error resume();23 virtual ErrorMessage init(); 24 virtual ErrorMessage start(int storyID); 25 virtual ErrorMessage start(); 26 virtual ErrorMessage stop(); 27 virtual ErrorMessage pause(); 28 virtual ErrorMessage resume(); 23 29 24 30 virtual void load(); 31 virtual void destroy(); 25 32 26 virtual void display EntityScreen();27 virtual void release EntityScreen();33 virtual void displayLoadScreen(); 34 virtual void releaseLoadScreen(); 28 35 29 void setStoryID( Uint32storyID);36 void setStoryID(int storyID); 30 37 int getStoryID(); 31 38 32 void setNextStoryID( Uint32nextStoryID);33 Uint32getNextStoryID();39 void setNextStoryID(int nextStoryID); 40 int getNextStoryID(); 34 41 35 42 36 43 private: 37 Uint32 storyID;38 Uint32 nextStoryID;44 int storyID; //! this is the number of this entity, identifying it in a list/tree... 45 int nextStoryID; //! if this entity has finished, this entity shall be called 39 46 }; 40 47 41 #endif 48 #endif /* _STORY_ENTITY_H */ -
orxonox/branches/buerli/src/synchronisable.h
r2036 r3238 1 1 2 #ifndef SYNCHRONISABLE_H3 #define SYNCHRONISABLE_H2 #ifndef _SYNCHRONISABLE_H 3 #define _SYNCHRONISABLE_H 4 4 5 5 #include "data_tank.h" … … 22 22 }; 23 23 24 #endif 24 #endif /* _SYNCHRONISABLE_H */ -
orxonox/branches/buerli/src/track.cc
r2707 r3238 21 21 22 22 /** 23 23 \brief creates a null Track part 24 24 */ 25 25 Track::Track () 26 26 { 27 28 29 30 27 this->ID = 0; 28 this->offset = NULL; 29 this->end = NULL; 30 this->nextID = 0; 31 31 } 32 32 33 33 /** 34 35 36 37 38 34 \brief creates a functional base Track part 35 \param number: the ID if this Track part 36 \param next: the ID of the next Track part 37 \param start: pointer to an anchor point (Vector) representing the offset of this part 38 \param finish: pointer to an anchor point (Vector) representing the end of this part 39 39 */ 40 40 Track::Track (Uint32 number, Uint32 next, Vector* start, Vector* finish) 41 41 { 42 43 44 45 42 this->ID = number; 43 this->offset = start; 44 this->end = finish; 45 this->nextID = next; 46 46 } 47 47 48 48 /** 49 49 \brief removes the Track part from memory 50 50 */ 51 51 Track::~Track () … … 68 68 at inside camera boundaries. 69 69 */ 70 void Track::map _camera (Location* lookat, Placement* camplc)70 void Track::mapCamera (Location* lookat, Placement* camplc) 71 71 { 72 72 Line trace(*offset, *end - *offset); … … 103 103 when transfering between track parts. 104 104 */ 105 bool Track::map _coords (Location* loc, Placement* plc)105 bool Track::mapCoords (Location* loc, Placement* plc) 106 106 { 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 107 Line trace(*offset, *end - *offset); 108 float l = trace.len (); 109 110 /* change to the next track? */ 111 if( loc->dist > l) 112 { 113 loc->dist -= l; 114 loc->part = nextID; 115 //FIXME: loc->track = this; 116 return true; 117 } 118 119 /* this quaternion represents the rotation from start-vector (0,0,1) to the direction of 120 * the track */ 121 Quaternion dir(trace.a, Vector(0,0,1)); 122 123 plc->r = trace.r + (trace.a * ((loc->dist) / l)) + /*dir.apply*/(loc->pos); 124 plc->w = dir * loc->rot; 125 126 return false; 127 127 } 128 128 129 129 130 /** 130 131 132 133 134 131 \brief this is called when a WorldEntity enters a Track part 132 \param entity: pointer to the WorldEntity in question 133 134 You can do stuff like add or remove effects, do some coordinate finetuning 135 or whatever in here. 135 136 */ 136 void Track::post _enter (WorldEntity* entity)137 void Track::postEnter (WorldEntity* entity) 137 138 { 138 139 } 139 140 141 140 142 /** 141 142 143 144 145 143 \brief this is called when a WorldEntity leaves a Track part 144 \param entity: pointer to the WorldEntity in question 145 146 You can do stuff like add or remove effects, do some coordinate finetuning 147 or whatever in here. 146 148 */ 147 void Track::post _leave (WorldEntity* entity)149 void Track::postLeave (WorldEntity* entity) 148 150 { 149 151 } 150 152 153 151 154 /** 152 153 154 155 155 \brief this is called every frame 156 \param deltaT: amount of time passed since the last frame in seconds 157 158 Do time based or polling scripts here. 156 159 */ 157 160 void Track::tick (float deltaT) -
orxonox/branches/buerli/src/track.h
r2707 r3238 4 4 */ 5 5 6 #ifndef TRACK_H7 #define TRACK_H6 #ifndef _TRACK_H 7 #define _TRACK_H 8 8 9 9 #include "stdincl.h" … … 25 25 Uint32 nextID; 26 26 27 27 28 28 public: 29 29 Track (); … … 32 32 virtual void init(); 33 33 34 virtual void post _enter (WorldEntity* entity); // handle coordinate transition in here !!! (when dist < 0 or dist > lasttracklenght)35 virtual void post _leave (WorldEntity* entity);34 virtual void postEnter (WorldEntity* entity); // handle coordinate transition in here !!! (when dist < 0 or dist > lasttracklenght) 35 virtual void postLeave (WorldEntity* entity); 36 36 virtual void tick (float deltaT); 37 virtual void map _camera (Location* lookat, Placement* camplc);38 virtual bool map _coords (Location* loc, Placement* plc); // this should return true if the entity left track boundaries37 virtual void mapCamera (Location* lookat, Placement* camplc); 38 virtual bool mapCoords (Location* loc, Placement* plc); // this should return true if the entity left track boundaries 39 39 }; 40 40 41 #endif 41 #endif /* _TRACK_H */ -
orxonox/branches/buerli/src/vector.cc
r2551 r3238 33 33 { 34 34 Vector r; 35 35 36 36 r.x = x + v.x; 37 37 r.y = y + v.y; … … 203 203 \return the angle between the vectors in radians 204 204 */ 205 float angle _rad (const Vector& v1, const Vector& v2)205 float angleRad (const Vector& v1, const Vector& v2) 206 206 { 207 207 return acos( v1 * v2 / (v1.len() * v2.len())); … … 215 215 \return the angle between the vectors in degrees 216 216 */ 217 float angle _deg (const Vector& v1, const Vector& v2)217 float angleDeg (const Vector& v1, const Vector& v2) 218 218 { 219 219 float f; … … 243 243 244 244 /** 245 \brief calculates a look _at rotation245 \brief calculates a lookAt rotation 246 246 \param dir: the direction you want to look 247 247 \param up: specify what direction up should be … … 578 578 Vector axis = x.cross( v); 579 579 axis.normalize(); 580 float angle = angle _rad( x, v);580 float angle = angleRad( x, v); 581 581 float ca = cos(angle); 582 582 float sa = sin(angle); … … 714 714 \return the rotated vector 715 715 */ 716 Vector rotate _vector( const Vector& v, const Rotation& r)716 Vector rotateVector( const Vector& v, const Rotation& r) 717 717 { 718 718 Vector t; … … 745 745 \return the distance between the Line and the point 746 746 */ 747 float Line::distance _point (const Vector& v) const747 float Line::distancePoint (const Vector& v) const 748 748 { 749 749 Vector d = v-r; … … 761 761 Vector* fp = new Vector[2]; 762 762 Plane p = Plane (r + a.cross(l.a), r, r + a); 763 fp[1] = p.intersect _line (l);763 fp[1] = p.intersectLine (l); 764 764 p = Plane (fp[1], l.a); 765 fp[0] = p.intersect _line (*this);765 fp[0] = p.intersectLine (*this); 766 766 return fp; 767 767 } … … 783 783 { 784 784 Vector t = a + r; 785 t = rotate _vector( t, rot);786 r = rotate _vector( r, rot),785 t = rotateVector( t, rot); 786 r = rotateVector( r, rot), 787 787 a = t - r; 788 788 } … … 815 815 \param l: a line 816 816 */ 817 Vector Plane::intersect _line (const Line& l) const817 Vector Plane::intersectLine (const Line& l) const 818 818 { 819 819 if (n.x*l.a.x+n.y*l.a.y+n.z*l.a.z == 0.0) return Vector(0,0,0); … … 827 827 \return the distance between the plane and the point (can be negative) 828 828 */ 829 float Plane::distance _point (const Vector& p) const829 float Plane::distancePoint (const Vector& p) const 830 830 { 831 831 float l = n.len(); … … 839 839 \return 0 if the point is contained within the Plane, positive(negative) if the point is in the positive(negative) semi-space of the Plane 840 840 */ 841 float Plane::locate _point (const Vector& p) const841 float Plane::locatePoint (const Vector& p) const 842 842 { 843 843 return (n.dot(p) + k); 844 844 } 845 846 847 /** 848 \brief Creates a new BezierCurve 849 */ 850 BezierCurve::BezierCurve (void) 851 { 852 nodeCount = 0; 853 firstNode = new PathNode; 854 currentNode = firstNode; 855 856 firstNode->position = Vector (.0, .0, .0); 857 firstNode->number = 0; 858 firstNode->next = 0; // not sure if this really points to NULL!! 859 860 return; 861 } 862 863 /** 864 \brief Deletes a BezierCurve. 865 It does this by freeing all the space taken over from the nodes 866 */ 867 BezierCurve::~BezierCurve (void) 868 { 869 PathNode* tmpNode; 870 currentNode = firstNode; 871 while (tmpNode != 0) 872 { 873 tmpNode = currentNode; 874 currentNode = currentNode->next; 875 delete tmpNode; 876 } 877 } 878 879 /** 880 \brief adds a new Node to the bezier Curve 881 \param newNode a Vector to the position of the new node 882 */ 883 void BezierCurve::addNode(const Vector& newNode) 884 { 885 PathNode* tmpNode; 886 if (nodeCount == 0 ) 887 tmpNode = firstNode; 888 else 889 { 890 tmpNode = new PathNode; 891 currentNode = currentNode->next = tmpNode; 892 } 893 tmpNode->position = newNode; 894 tmpNode->next = 0; // not sure if this really points to NULL!! 895 tmpNode->number = (++nodeCount); 896 return; 897 } 898 899 /** 900 \brief calculates the Position on the curve 901 \param t The position on the Curve (0<=t<=1) 902 \return the Position on the Path 903 */ 904 Vector BezierCurve::calcPos(float t) 905 { 906 if (nodeCount <=4) 907 { 908 // if (verbose >= 1) 909 // printf ("Please define at least 4 nodes, until now you have only defined %i.\n", nodeCount); 910 curvePoint = Vector(0,0,0); 911 } 912 PathNode* tmpNode = firstNode; 913 914 int k,kn,nn,nkn; 915 double blend,muk,munk; 916 Vector b = Vector(0.0,0.0,0.0); 917 918 muk = 1; 919 munk = pow(1-t,(double)nodeCount); 920 921 for (k=0; k<=nodeCount; k++) { 922 nn = nodeCount; 923 kn = k; 924 nkn = nodeCount - k; 925 blend = muk * munk; 926 muk *= t; 927 munk /= (1-t); 928 while (nn >= 1) { 929 blend *= nn; 930 nn--; 931 if (kn > 1) { 932 blend /= (double)kn; 933 kn--; 934 } 935 if (nkn > 1) { 936 blend /= (double)nkn; 937 nkn--; 938 } 939 } 940 b.x += tmpNode->position.x * blend; 941 b.y += tmpNode->position.y * blend; 942 b.z += tmpNode->position.z * blend; 943 944 tmpNode = tmpNode->next; 945 } 946 return b; 947 } 948 949 Vector BezierCurve::calcDirection (float t) 950 { 951 double diff = .00000000001; 952 953 Vector diffV = ((calcPos(t+diff) - calcPos(t))/diff); 954 diffV.normalize(); 955 return diffV; 956 } 957 958 /** 959 \brief returns the Position of the point calculated on the Curve 960 \return a Vector to the calculated position 961 */ 962 Vector BezierCurve::getPos() const 963 { 964 return curvePoint; 965 } -
orxonox/branches/buerli/src/vector.h
r2551 r3238 6 6 */ 7 7 8 #ifndef VECTOR_H9 #define VECTOR_H8 #ifndef _VECTOR_H 9 #define _VECTOR_H 10 10 11 11 #include <math.h> … … 40 40 }; 41 41 42 float angle _deg (const Vector& v1, const Vector& v2);43 float angle _rad (const Vector& v1, const Vector& v2);42 float angleDeg (const Vector& v1, const Vector& v2); 43 float angleRad (const Vector& v1, const Vector& v2); 44 44 45 45 //! Quaternion … … 98 98 99 99 //!< Apply a rotation to a vector 100 Vector rotate _vector( const Vector& v, const Rotation& r);100 Vector rotateVector( const Vector& v, const Rotation& r); 101 101 102 102 //! 3D line … … 118 118 119 119 float distance (const Line& l) const; 120 float distance _point (const Vector& v) const;120 float distancePoint (const Vector& v) const; 121 121 Vector* footpoints (const Line& l) const; 122 122 float len () const; … … 144 144 ~Plane () {} 145 145 146 Vector intersect _line (const Line& l) const;147 float distance _point (const Vector& p) const;148 float locate _point (const Vector& p) const;146 Vector intersectLine (const Line& l) const; 147 float distancePoint (const Vector& p) const; 148 float locatePoint (const Vector& p) const; 149 149 }; 150 150 151 #endif 151 152 153 //! Bezier Curve 154 /** 155 Class to handle bezier curves in 3-dimesnsional space 156 157 needed for the Tracking system in OrxOnoX. 158 */ 159 class BezierCurve 160 { 161 private: 162 int nodeCount; 163 Vector curvePoint; 164 165 struct PathNode 166 { 167 int number; 168 Vector position; 169 PathNode* next; 170 }; 171 172 PathNode* firstNode; 173 PathNode* currentNode; 174 175 public: 176 BezierCurve (void); 177 ~BezierCurve (void); 178 void addNode (const Vector& newNode); 179 Vector calcPos (float t); 180 Vector calcDirection (float t); 181 182 Vector getPos () const; 183 }; 184 185 186 187 #endif /* _VECTOR_H */ -
orxonox/branches/buerli/src/world.cc
r2707 r3238 22 22 #include "command_node.h" 23 23 #include "camera.h" 24 #include "environment.h" 24 25 25 26 using namespace std; … … 35 36 this->worldName = name; 36 37 this->debugWorldNr = -1; 37 this->entities = new List<WorldEntity>();38 this->entities = new tList<WorldEntity>(); 38 39 } 39 40 … … 42 43 this->debugWorldNr = worldID; 43 44 this->worldName = NULL; 44 this->entities = new List<WorldEntity>();45 this->entities = new tList<WorldEntity>(); 45 46 } 46 47 … … 50 51 World::~World () 51 52 { 52 Orxonox *orx = Orxonox::getInstance(); 53 orx->get_localinput()->unbind (this->localPlayer); 53 printf("World::~World() - deleting current world\n"); 54 CommandNode* cn = Orxonox::getInstance()->getLocalInput(); 55 cn->unbind(this->localPlayer); 56 cn->reset(); 57 this->localCamera->destroy(); 58 59 WorldEntity* entity = entities->enumerate(); 60 while( entity != NULL ) 61 { 62 entity->destroy(); 63 entity = entities->nextElement(); 64 } 65 this->entities->destroy(); 66 54 67 delete this->entities; 55 68 delete this->localCamera; 56 } 57 58 59 /** 60 \brief initialize the world before use. 61 */ 62 Error World::init() 69 /* this->localPlayer hasn't to be deleted explicitly, it is 70 contained in entities*/ 71 } 72 73 74 ErrorMessage World::init() 63 75 { 64 76 this->bPause = false; 65 } 66 67 Error World::start() 68 { 77 CommandNode* cn = Orxonox::getInstance()->getLocalInput(); 78 cn->addToWorld(this); 79 cn->enable(true); 80 } 81 82 ErrorMessage World::start() 83 { 84 printf("World::start() - starting current World: nr %i\n", this->debugWorldNr); 85 this->bQuitOrxonox = false; 86 this->bQuitCurrentGame = false; 69 87 this->mainLoop(); 70 88 } 71 89 72 Error World::stop() 73 { 90 ErrorMessage World::stop() 91 { 92 printf("World::stop() - got stop signal\n"); 74 93 this->bQuitCurrentGame = true; 75 this->localCamera->setWorld(NULL); 76 this->~World(); 77 } 78 79 Error World::pause() 94 } 95 96 ErrorMessage World::pause() 80 97 { 81 98 this->isPaused = true; 82 99 } 83 100 84 Error World::resume()101 ErrorMessage World::resume() 85 102 { 86 103 this->isPaused = false; 87 104 } 88 105 106 void World::destroy() 107 { 108 109 } 110 89 111 void World::load() 90 112 { … … 93 115 switch(this->debugWorldNr) 94 116 { 117 /* 118 this loads the hard-coded debug world. this only for simplicity and will be 119 removed by a reald world-loader, which interprets a world-file. 120 if you want to add an own debug world, just add a case DEBUG_WORLD_[nr] and 121 make whatever you want... 122 */ 95 123 case DEBUG_WORLD_0: 96 124 { … … 98 126 this->pathnodes = new Vector[6]; 99 127 this->pathnodes[0] = Vector(0, 0, 0); 100 this->pathnodes[1] = Vector( -100, 40, 0);101 this->pathnodes[2] = Vector(-100, 140, 0);102 this->pathnodes[3] = Vector(0, 180, 0);103 this->pathnodes[4] = Vector(100, 140, 0);104 this->pathnodes[5] = Vector(100, 40, 0);128 this->pathnodes[1] = Vector(1000, 0, 0); 129 // this->pathnodes[2] = Vector(-100, 140, 0); 130 // this->pathnodes[3] = Vector(0, 180, 0); 131 // this->pathnodes[4] = Vector(100, 140, 0); 132 // this->pathnodes[5] = Vector(100, 40, 0); 105 133 106 134 // create the tracks 107 this->tracklen = 6;108 this->track = new Track[ 6];135 this->tracklen = 2; 136 this->track = new Track[2]; 109 137 for( int i = 0; i < this->tracklen; i++) 110 138 { 111 139 this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]); 112 140 } 113 141 // !\todo old track-system has to be removed 142 114 143 // create a player 115 //WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>();116 144 WorldEntity* myPlayer = new Player(); 117 145 this->spawn(myPlayer); … … 120 148 // bind input 121 149 Orxonox *orx = Orxonox::getInstance(); 122 orx->get _localinput()->bind (myPlayer);150 orx->getLocalInput()->bind (myPlayer); 123 151 124 152 // bind camera 125 153 this->localCamera = new Camera(this); 126 154 this->getCamera()->bind (myPlayer); 155 156 Placement* plc = new Placement; 157 plc->r = Vector(100, 10, 10); 158 plc->w = Quaternion(); 159 WorldEntity* env = new Environment(); 160 this->spawn(env, plc); 161 127 162 break; 128 163 } … … 145 180 this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]); 146 181 } 147 182 148 183 // create a player 149 //WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>();150 184 WorldEntity* myPlayer = new Player(); 151 185 this->spawn(myPlayer); 152 this->localPlayer = myPlayer; 186 this->localPlayer = myPlayer; 153 187 154 188 // bind input 155 189 Orxonox *orx = Orxonox::getInstance(); 156 orx->get _localinput()->bind (myPlayer);190 orx->getLocalInput()->bind (myPlayer); 157 191 158 192 // bind camera … … 169 203 170 204 } 205 206 // initialize debug coord system 207 objectList = glGenLists(1); 208 glNewList (objectList, GL_COMPILE); 209 glLoadIdentity(); 210 glColor3f(1.0,0,0); 211 glBegin(GL_QUADS); 212 213 int sizeX = 100; 214 int sizeY = 80; 215 float length = 1000; 216 float width = 200; 217 float widthX = float (length /sizeX); 218 float widthY = float (width /sizeY); 219 220 float height [sizeX][sizeY]; 221 Vector normal_vectors[sizeX][sizeY]; 222 223 224 for ( int i = 0; i<sizeX-1; i+=1) 225 for (int j = 0; j<sizeY-1;j+=1) 226 //height[i][j] = rand()/20046 + (j-25)*(j-25)/30; 227 #ifdef __WIN32__ 228 height[i][j]=(sin((float)j/3)*rand()*i/182400)*.5; 229 #else 230 height[i][j]=(sin((float)j/3)*rand()*(long)i/6282450500.0)*.5; 231 #endif 232 233 //Die Hügel ein wenig glätten 234 for (int h=1; h<2;h++) 235 for (int i=1;i<sizeX-2 ;i+=1 ) 236 for(int j=1;j<sizeY-2;j+=1) 237 height[i][j]=(height[i+1][j]+height[i][j+1]+height[i-1][j]+height[i][j-1])/4; 238 239 //Berechnung von normalen Vektoren 240 241 for(int i=1;i<sizeX-2;i+=1) 242 for(int j=1;j<sizeY-2 ;j+=1) 243 { 244 Vector v1 = Vector (widthX*(1), widthY*(j) , height[i][j]); 245 Vector v2 = Vector (widthX*(i-1), widthY*(j) , height[i-1][j]); 246 Vector v3 = Vector (widthX*(i), widthY*(j+1), height[i][j+1]); 247 Vector v4 = Vector (widthX*(i+1), widthY*(j), height[i+1][j]); 248 Vector v5 = Vector (widthX*(i), widthY*(j-1), height[i][j-1]); 249 250 Vector c1 = v2 - v1; 251 Vector c2 = v3 - v1; 252 Vector c3= v4 - v1; 253 Vector c4 = v5 - v1; 254 Vector zero = Vector (0,0,0); 255 normal_vectors[i][j]=c1.cross(v4-v2)+c2.cross(v1-v3)+c3.cross(v2-v4)+c4.cross(v3-v1); 256 normal_vectors[i][j].normalize(); 257 } 258 259 int snowheight=3; 260 for ( int i = 0; i<sizeX; i+=1) 261 for (int j = 0; j<sizeY;j+=1) 262 { 263 Vector v1 = Vector (widthX*(i), widthY*(j) -width/2, height[i][j]-20 ); 264 Vector v2 = Vector (widthX*(i+1), widthY*(j) -width/2, height[i+1][j]-20); 265 Vector v3 = Vector (widthX*(i+1), widthY*(j+1)-width/2, height[i+1][j+1]-20); 266 Vector v4 = Vector (widthX*(i), widthY*(j+1)-width/2, height[i][j+1]-20); 267 float a[3]; 268 if(height[i][j]<snowheight){ 269 a[0]=0; 270 a[1]=1.0-height[i][j]/10-.3; 271 a[2]=0; 272 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 273 } 274 else{ 275 a[0]=1.0; 276 a[1]=1.0; 277 a[2]=1.0; 278 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 279 280 } 281 glNormal3f(normal_vectors[i][j].x, normal_vectors[i][j].y, normal_vectors[i][j].z); 282 glVertex3f(v1.x, v1.y, v1.z); 283 if(height[i+1][j]<snowheight){ 284 a[0]=0; 285 a[1] =1.0-height[i+1][j]/10-.3; 286 a[2]=0; 287 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 288 } 289 else{ 290 a[0]=1.0; 291 a[1]=1.0; 292 a[2]=1.0; 293 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 294 295 } 296 glNormal3f(normal_vectors[i+1][j].x, normal_vectors[i+1][j].y, normal_vectors[i+1][j].z); 297 glVertex3f(v2.x, v2.y, v2.z); 298 if(height[i+1][j+1]<snowheight){ 299 a[0]=0; 300 a[1] =1.0-height[i+1][j+1]/10-.3; 301 a[2]=0; 302 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 303 } 304 else{ 305 a[0]=1.0; 306 a[1]=1.0; 307 a[2]=1.0; 308 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 309 310 311 } 312 glNormal3f(normal_vectors[i+1][j+1].x, normal_vectors[i+1][j+1].y, normal_vectors[i+1][j+1].z); 313 glVertex3f(v3.x, v3.y, v3.z); 314 if(height[i][j+1]<snowheight){ 315 a[0]=0; 316 a[1] =1.0-height[i+1][j+1]/10-.3; 317 a[2]=0; 318 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 319 } 320 else{ 321 a[0]=1.0; 322 a[1]=1.0; 323 a[2]=1.0; 324 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 325 } 326 glNormal3f(normal_vectors[i][j+1].x, normal_vectors[i][j+1].y, normal_vectors[i][j+1].z); 327 glVertex3f(v4.x, v4.y, v4.z); 328 329 } 330 glEnd(); 331 /* 332 glBegin(GL_LINES); 333 for( float x = -128.0; x < 128.0; x += 25.0) 334 { 335 for( float y = -128.0; y < 128.0; y += 25.0) 336 { 337 glColor3f(1,0,0); 338 glVertex3f(x,y,-128.0); 339 glVertex3f(x,y,0.0); 340 glColor3f(0.5,0,0); 341 glVertex3f(x,y,0.0); 342 glVertex3f(x,y,128.0); 343 } 344 } 345 for( float y = -128.0; y < 128.0; y += 25.0) 346 { 347 for( float z = -128.0; z < 128.0; z += 25.0) 348 { 349 glColor3f(0,1,0); 350 glVertex3f(-128.0,y,z); 351 glVertex3f(0.0,y,z); 352 glColor3f(0,0.5,0); 353 glVertex3f(0.0,y,z); 354 glVertex3f(128.0,y,z); 355 } 356 } 357 for( float x = -128.0; x < 128.0; x += 25.0) 358 { 359 for( float z = -128.0; z < 128.0; z += 25.0) 360 { 361 glColor3f(0,0,1); 362 glVertex3f(x,-128.0,z); 363 glVertex3f(x,0.0,z); 364 glColor3f(0,0,0.5); 365 glVertex3f(x,0.0,z); 366 glVertex3f(x,128.0,z); 367 } 368 369 } 370 */ 371 //draw track 372 glBegin(GL_LINES); 373 glColor3f(0,1,1); 374 for( int i = 0; i < tracklen; i++) 375 { 376 glVertex3f(pathnodes[i].x,pathnodes[i].y,pathnodes[i].z); 377 glVertex3f(pathnodes[(i+1)%tracklen].x,pathnodes[(i+1)%tracklen].y,pathnodes[(i+1)%tracklen].z); 378 } 379 glEnd(); 380 glEndList(); 171 381 } 172 382 … … 181 391 void World::collide () 182 392 { 183 List<WorldEntity> *a, *b; 393 /* 394 List *a, *b; 184 395 WorldEntity *aobj, *bobj; 185 186 a = entities ->get_next();396 397 a = entities; 187 398 188 399 while( a != NULL) 189 400 { 190 aobj = a-> get_object();401 aobj = a->nextElement(); 191 402 if( aobj->bCollide && aobj->collisioncluster != NULL) 192 403 { 193 b = a-> get_next();404 b = a->nextElement(); 194 405 while( b != NULL ) 195 406 { 196 bobj = b-> get_object();407 bobj = b->nextElement(); 197 408 if( bobj->bCollide && bobj->collisioncluster != NULL ) 198 409 { … … 206 417 } 207 418 } 208 b = b-> get_next();419 b = b->nextElement(); 209 420 } 210 421 } 211 a = a->get_next(); 212 } 422 a = a->enumerate(); 423 } 424 */ 213 425 } 214 426 … … 221 433 222 434 // draw entities 223 List<WorldEntity> *l;224 435 WorldEntity* entity; 225 436 226 l = entities->get_next();227 while( l!= NULL )437 entity = this->entities->enumerate(); 438 while( entity != NULL ) 228 439 { 229 entity = l->get_object();230 440 if( entity->bDraw ) entity->draw(); 231 l = l->get_next();441 entity = this->entities->nextElement(); 232 442 } 233 443 234 444 235 445 // draw debug coord system 236 glLoadIdentity(); 237 238 239 glBegin(GL_LINES); 240 241 for( float x = -128.0; x < 128.0; x += 25.0) 242 { 243 for( float y = -128.0; y < 128.0; y += 25.0) 244 { 245 glColor3f(1,0,0); 246 glVertex3f(x,y,-128.0); 247 glVertex3f(x,y,0.0); 248 glColor3f(0.5,0,0); 249 glVertex3f(x,y,0.0); 250 glVertex3f(x,y,128.0); 251 } 252 } 253 for( float y = -128.0; y < 128.0; y += 25.0) 254 { 255 for( float z = -128.0; z < 128.0; z += 25.0) 256 { 257 glColor3f(0,1,0); 258 glVertex3f(-128.0,y,z); 259 glVertex3f(0.0,y,z); 260 glColor3f(0,0.5,0); 261 glVertex3f(0.0,y,z); 262 glVertex3f(128.0,y,z); 263 } 264 } 265 for( float x = -128.0; x < 128.0; x += 25.0) 266 { 267 for( float z = -128.0; z < 128.0; z += 25.0) 268 { 269 glColor3f(0,0,1); 270 glVertex3f(x,-128.0,z); 271 glVertex3f(x,0.0,z); 272 glColor3f(0,0,0.5); 273 glVertex3f(x,0.0,z); 274 glVertex3f(x,128.0,z); 275 } 276 277 } 278 279 //draw track 280 glColor3f(0,1,1); 281 for( int i = 0; i < tracklen; i++) 282 { 283 glVertex3f(pathnodes[i].x,pathnodes[i].y,pathnodes[i].z); 284 glVertex3f(pathnodes[(i+1)%tracklen].x,pathnodes[(i+1)%tracklen].y,pathnodes[(i+1)%tracklen].z); 285 } 286 glEnd(); 446 glCallList (objectList); 447 448 287 449 } 288 450 … … 297 459 void World::update () 298 460 { 299 List<WorldEntity> *l;461 //List<WorldEntity> *l; 300 462 WorldEntity* entity; 301 463 Location* loc; … … 303 465 Uint32 t; 304 466 305 l = entities->get_next(); 306 while( l != NULL ) 467 // l = entities->enumerate(); 468 entity = this->entities->enumerate(); 469 while( entity != NULL ) 307 470 { 308 entity = l->get_object(); 471 309 472 310 473 if( !entity->isFree() ) 311 474 { 312 loc = entity->get _location();313 plc = entity->get _placement();475 loc = entity->getLocation(); 476 plc = entity->getPlacement(); 314 477 t = loc->part; 315 478 … … 318 481 { 319 482 printf("An entity is out of the game area\n"); 320 entity->left _world ();483 entity->leftWorld (); 321 484 } 322 485 else 323 486 { 324 while( track[t].map _coords( loc, plc) )487 while( track[t].mapCoords( loc, plc) ) 325 488 { 326 track[t].post _leave (entity);489 track[t].postLeave (entity); 327 490 if( loc->part >= tracklen ) 328 491 { 329 492 printf("An entity has left the game area\n"); 330 entity->left _world ();493 entity->leftWorld (); 331 494 break; 332 495 } 333 track[loc->part].post _enter (entity);496 track[loc->part].postEnter (entity); 334 497 } 335 498 } … … 337 500 else 338 501 { 339 /* TO DO: implement check whether this particular free entity502 /* \todo: implement check whether this particular free entity 340 503 is out of the game area 341 TO DO: call function to notify the entity that it left504 \todo: call function to notify the entity that it left 342 505 the game area 343 506 */ 344 507 } 345 508 346 l = l->get_next();509 entity = entities->nextElement(); 347 510 } 348 511 … … 353 516 \param deltaT: the time passed since the last frame in milliseconds 354 517 */ 355 void World::time _slice (Uint32 deltaT)356 { 357 List<WorldEntity> *l;518 void World::timeSlice (Uint32 deltaT) 519 { 520 //List<WorldEntity> *l; 358 521 WorldEntity* entity; 359 float seconds = deltaT; 360 361 seconds /= 1000; 362 363 l = entities->get_next(); 364 while( l != NULL) 522 float seconds = deltaT / 1000.0; 523 524 entity = entities->enumerate(); 525 while( entity != NULL) 365 526 { 366 entity = l->get_object();367 527 entity->tick (seconds); 368 l = l->get_next();369 } 370 371 for( int i = 0; i < tracklen; i++) track[i].tick (seconds);528 entity = entities->nextElement(); 529 } 530 531 //for( int i = 0; i < tracklen; i++) track[i].tick (seconds); 372 532 } 373 533 … … 387 547 Camera Placement 388 548 */ 389 void World::calc _camera_pos (Location* loc, Placement* plc)390 { 391 track[loc->part].map _camera (loc, plc);549 void World::calcCameraPos (Location* loc, Placement* plc) 550 { 551 track[loc->part].mapCamera (loc, plc); 392 552 } 393 553 … … 403 563 } 404 564 565 566 567 /** 568 \brief function to put your own debug stuff into it. it can display informations about 569 the current class/procedure 570 */ 405 571 void World::debug() 406 572 { 407 List<WorldEntity> *l;573 //List<WorldEntity> *l; 408 574 WorldEntity* entity; 409 575 410 576 printf("counting all entities\n"); 411 l = entities->get_next(); 412 while( l != NULL ) 577 printf("World::debug() - enumerate()\n"); 578 entity = entities->enumerate(); 579 while( entity != NULL ) 413 580 { 414 entity = l->get_object();415 581 if( entity->bDraw ) printf("got an entity\n"); 416 l = l->get_next(); 417 } 418 } 419 420 582 entity = entities->nextElement(); 583 } 584 } 585 586 587 /* 588 \brief main loop of the world: executing all world relevant function 589 590 in this loop we synchronize (if networked), handle input events, give the heart-beat to 591 all other member-entities of the world (tick to player, enemies etc.), checking for 592 collisions drawing everything to the screen. 593 */ 421 594 void World::mainLoop() 422 595 { 423 596 this->lastFrame = SDL_GetTicks(); 424 this->bQuitOrxonox = false; 425 this->bQuitCurrentGame = false; 426 printf("World|Entering main loop\n"); 427 while(!this->bQuitOrxonox && !this->bQuitCurrentGame) /* pause pause pause ?!?!?*/ 428 { 429 //debug routine 430 //debug(); 597 printf("World::mainLoop() - Entering main loop\n"); 598 while( !this->bQuitOrxonox && !this->bQuitCurrentGame) /* \todo implement pause */ 599 { 431 600 // Network 432 601 synchronize(); 433 602 // Process input 434 handle_input(); 603 handleInput(); 604 if( this->bQuitCurrentGame || this->bQuitOrxonox) 605 { 606 printf("World::mainLoop() - leaving loop earlier...\n"); 607 break; 608 } 435 609 // Process time 436 time _slice();610 timeSlice(); 437 611 // Process collision 438 612 collision(); 439 613 // Draw 440 614 display(); 441 } 442 printf("World|Exiting the main loop\n"); 615 616 for(int i = 0; i < 10000000; i++) {} 617 } 618 printf("World::mainLoop() - Exiting the main loop\n"); 443 619 } 444 620 … … 454 630 /** 455 631 \brief run all input processing 456 */ 457 void World::handle_input () 632 633 the command node is the central input event dispatcher. the node uses the even-queue from 634 sdl and has its own event-passing-queue. 635 */ 636 void World::handleInput () 458 637 { 459 638 // localinput 460 Orxonox::getInstance()->get_localinput()->process(); 639 CommandNode* cn = Orxonox::getInstance()->getLocalInput(); 640 cn->process(); 461 641 // remoteinput 462 642 } … … 464 644 /** 465 645 \brief advance the timeline 466 */ 467 void World::time_slice () 646 647 this calculates the time used to process one frame (with all input handling, drawing, etc) 648 the time is mesured in ms and passed to all world-entities and other classes that need 649 a heart-beat. 650 */ 651 void World::timeSlice () 468 652 { 469 653 Uint32 currentFrame = SDL_GetTicks(); … … 471 655 { 472 656 Uint32 dt = currentFrame - this->lastFrame; 473 /*657 474 658 if(dt > 0) 475 659 { … … 479 663 else 480 664 { 481 printf("fps = 1000\n"); 482 } 483 */ 484 this->time_slice (dt); 665 /* the frame-rate is limited to 100 frames per second, all other things are for 666 nothing. 667 */ 668 printf("fps = 1000 - frame rate is adjusted\n"); 669 SDL_Delay(10); 670 dt = 10; 671 } 672 this->timeSlice (dt); 485 673 this->update (); 486 this->localCamera->time _slice(dt);674 this->localCamera->timeSlice(dt); 487 675 } 488 676 this->lastFrame = currentFrame; 489 677 } 490 678 679 491 680 /** 492 681 \brief compute collision detection … … 497 686 } 498 687 499 /** 500 \brief handle keyboard commands that are not meant for WorldEntities 501 \param cmd: the command to handle 502 \return true if the command was handled by the system or false if it may be passed to the WorldEntities 503 */ 504 bool World::system_command (Command* cmd) 505 { 506 if( !strcmp( cmd->cmd, "quit")) 507 { 508 if( !cmd->bUp) this->bQuitOrxonox = true; 509 return true; 510 } 511 return false; 512 } 513 514 /** 515 \brief render the current frame 688 689 /** 690 \brief render the current frame 691 692 clear all buffers and draw the world 516 693 */ 517 694 void World::display () … … 528 705 } 529 706 707 /** 708 \brief give back active camera 709 710 this passes back the actualy active camera 711 \todo ability to define more than one camera or camera-places 712 */ 530 713 Camera* World::getCamera() 531 714 { … … 534 717 535 718 719 /** 720 \brief add and spawn a new entity to this world 721 \param entity to be added 722 */ 536 723 void World::spawn(WorldEntity* entity) 537 724 { … … 539 726 Location* loc = NULL; 540 727 WorldEntity* owner; 541 //T* entity = new T(); 542 entities->add (entity, LIST_ADD_NEXT); 543 //if( loc == NULL) 544 //{ 545 zeroloc.dist = 0; 546 zeroloc.part = 0; 547 zeroloc.pos = Vector(); 548 zeroloc.rot = Quaternion(); 549 loc = &zeroloc; 550 //} 728 729 entities->add (entity); 730 zeroloc.dist = 0; 731 zeroloc.part = 0; 732 zeroloc.pos = Vector(); 733 zeroloc.rot = Quaternion(); 734 loc = &zeroloc; 551 735 entity->init (loc, owner); 552 736 if (entity->bFree) 553 737 { 554 this->track[loc->part].map_coords( loc, entity->get_placement()); 555 } 556 entity->post_spawn (); 738 this->track[loc->part].mapCoords( loc, entity->getPlacement()); 739 } 740 entity->postSpawn (); 741 } 742 743 744 /** 745 \brief add and spawn a new entity to this world 746 \param entity to be added 747 \param location where to add 748 */ 749 void World::spawn(WorldEntity* entity, Location* loc) 750 { 751 Location zeroLoc; 752 WorldEntity* owner; 753 this->entities->add (entity); 754 if( loc == NULL) 755 { 756 zeroLoc.dist = 0; 757 zeroLoc.part = 0; 758 zeroLoc.pos = Vector(); 759 zeroLoc.rot = Quaternion(); 760 loc = &zeroLoc; 761 } 762 entity->init (loc, owner); 763 if (entity->bFree) 764 { 765 this->track[loc->part].mapCoords( loc, entity->getPlacement()); 766 } 767 entity->postSpawn (); 557 768 //return entity; 558 769 } 770 771 772 /** 773 \brief add and spawn a new entity to this world 774 \param entity to be added 775 \param place where to be added 776 */ 777 void World::spawn(WorldEntity* entity, Placement* plc) 778 { 779 Placement zeroPlc; 780 WorldEntity* owner; 781 if( plc == NULL) 782 { 783 zeroPlc.r = Vector(); 784 zeroPlc.w = Quaternion(); 785 plc = &zeroPlc; 786 } 787 this->entities->add (entity); 788 entity->init (plc, owner); 789 entity->postSpawn (); 790 //return entity; 791 } 792 793 794 /* 795 \brief commands that the world must catch 796 \returns false if not used by the world 797 */ 798 bool World::command(Command* cmd) 799 { 800 return false; 801 } -
orxonox/branches/buerli/src/world.h
r2707 r3238 4 4 */ 5 5 6 #ifndef WORLD_H7 #define WORLD_H6 #ifndef _WORLD_H 7 #define _WORLD_H 8 8 9 9 #include "stdincl.h" … … 22 22 World (char* name); 23 23 World (int worldID); 24 ~World ();24 virtual ~World (); 25 25 26 26 template<typename T> 27 T* spawn (Location* loc, WorldEntity* owner); // template to be able to spawn any derivation of WorldEntity27 T* spawn (Location* loc, WorldEntity* owner); // template to be able to spawn any derivation of WorldEntity 28 28 template<typename T> 29 T* spawn (Placement* plc, WorldEntity* owner);29 T* spawn (Placement* plc, WorldEntity* owner); 30 30 31 virtual Error init();32 virtual Error start();33 virtual Error stop();34 virtual Error pause();35 virtual Error resume();31 virtual ErrorMessage init (); 32 virtual ErrorMessage start (); 33 virtual ErrorMessage stop (); 34 virtual ErrorMessage pause (); 35 virtual ErrorMessage resume (); 36 36 37 virtual void load(); 37 virtual void load (); 38 virtual void destroy (); 38 39 39 void time _slice (Uint32 deltaT);40 void timeSlice (Uint32 deltaT); 40 41 void collide (); 41 42 void draw (); 42 43 void update (); // maps Locations to Placements 43 void calc _camera_pos (Location* loc, Placement* plc);44 void calcCameraPos (Location* loc, Placement* plc); 44 45 45 46 void unload (); 47 bool command (Command* cmd); 46 48 47 void setTrackLen(Uint32 tracklen); 48 int getTrackLen(); 49 bool system_command (Command* cmd); 50 Camera* getCamera(); 51 //private: 49 void setTrackLen (Uint32 tracklen); 50 int getTrackLen (); 51 //bool system_command (Command* cmd); 52 Camera* getCamera (); 52 53 53 void spawn(WorldEntity* entity); 54 void spawn (WorldEntity* entity); 55 void spawn (WorldEntity* entity, Location* loc); 56 void spawn (WorldEntity* entity, Placement* plc); 54 57 55 List<WorldEntity>* entities;58 tList<WorldEntity>* entities; 56 59 57 60 // base level data … … 69 72 char* worldName; 70 73 int debugWorldNr; 74 GLuint objectList; 71 75 72 76 WorldEntity* localPlayer; 73 77 74 void mainLoop ();75 void synchronize ();76 void handle _input();77 void time _slice();78 void collision ();79 void display ();80 void debug ();78 void mainLoop (); 79 void synchronize (); 80 void handleInput (); 81 void timeSlice (); 82 void collision (); 83 void display (); 84 void debug (); 81 85 }; 82 86 83 /** 84 \brief spawn a new WorldEntity at a Location 85 \param loc: the Location where the Entity should be spawned 86 \param owner: a pointer to the parent of the Entity 87 \return a pointer to the new WorldEntity or NULL if there was an error 88 89 You can use this function to spawn any derivation of WorldEntity you want, just specify the desired 90 class within the template specification brackets. Do not attempt to spawn any classes that have NOT been 91 derived from WorldEntity, you won't even be able to compile the code. Note that this version of spawn() 92 works with both free and bound WorldEntities. 93 */ 94 template<typename T> T* World::spawn(Location* loc = NULL, WorldEntity* owner = NULL) 95 { 96 Location zeroloc; 97 T* entity = new T(); 98 entities->add ((WorldEntity*)entity, LIST_ADD_NEXT); 99 if( loc == NULL) 100 { 101 zeroloc.dist = 0; 102 zeroloc.part = 0; 103 zeroloc.pos = Vector(); 104 zeroloc.rot = Quaternion(); 105 loc = &zeroloc; 106 } 107 entity->init (loc, owner); 108 if (entity->bFree) 109 { 110 track[loc->part].map_coords( loc, entity->get_placement()); 111 } 112 entity->post_spawn (); 113 return entity; 114 } 115 116 /** 117 \brief spawn a new WorldEntity at a Placement 118 \param lplc: the placement where the Entity should be spawned 119 \param owner: a pointer to the parent of the Entity 120 \return a pointer to the new WorldEntity or NULL if there was an error 121 122 You can use this function to spawn any FREE derivation of WorldEntity you want, just specify the desired 123 class within the template specification brackets. Do not attempt to spawn any classes that have NOT been 124 derived from WorldEntity, you won't even be able to compile the code. Note that this version of spawn() 125 works with free WorldEntities only, you will provoke an error message if you try to spawn a bound Entity with 126 a Placement. 127 */ 128 template<typename T> T* World::spawn(Placement* plc, WorldEntity* owner = NULL) 129 { 130 T* entity = new T(); 131 entities->add ((WorldEntity*)entity, LIST_ADD_NEXT); 132 entity->init (plc, owner); 133 if (!entity->bFree) 134 { 135 printf("Can't spawn unfree entity with placement\n"); 136 entities->remove( (WorldEntity*)entity, LIST_FIND_FW); 137 return NULL; 138 } 139 entity->post_spawn (); 140 return entity; 141 } 142 143 #endif 87 #endif /* _WORLD_H */ -
orxonox/branches/buerli/src/world_entity.cc
r2190 r3238 36 36 WorldEntity::WorldEntity (bool isFree) : bFree(isFree) 37 37 { 38 collisioncluster = NULL; 39 owner = NULL; 38 this->bDraw = true; 39 collisioncluster = NULL; 40 owner = NULL; 40 41 } 41 42 … … 45 46 WorldEntity::~WorldEntity () 46 47 { 47 48 if( collisioncluster != NULL) delete collisioncluster; 48 49 } 49 50 50 51 /** 51 52 52 \brief get the Location of the WorldEntity 53 \return a pointer to location 53 54 */ 54 Location* WorldEntity::get _location ()55 Location* WorldEntity::getLocation () 55 56 { 56 57 return &loc; 57 58 } 58 59 59 60 /** 60 61 61 \brief get the Placement of the WorldEntity 62 \return a pointer to placement 62 63 */ 63 Placement* WorldEntity::get _placement ()64 Placement* WorldEntity::getPlacement () 64 65 { 65 66 return &place; 66 67 } 67 68 68 69 /** 69 70 70 \brief query whether the WorldEntity in question is free 71 \return true if the WorldEntity is free or false if it isn't 71 72 */ 72 73 bool WorldEntity::isFree () … … 76 77 77 78 /** 78 79 80 81 79 \brief set the WorldEntity's collision hull 80 \param newhull: a pointer to a completely assembled CollisionCluster 81 82 Any previously assigned collision hull will be deleted on reassignment 82 83 */ 83 void WorldEntity::set _collision (CollisionCluster* newhull)84 void WorldEntity::setCollision (CollisionCluster* newhull) 84 85 { 85 86 87 86 if( newhull == NULL) return; 87 if( collisioncluster != NULL) delete collisioncluster; 88 collisioncluster = newhull; 88 89 } 89 90 90 91 /** 91 92 93 94 92 \brief this method is called every frame 93 \param time: the time in seconds that has passed since the last tick 94 95 Handle all stuff that should update with time inside this method (movement, animation, etc.) 95 96 */ 96 97 void WorldEntity::tick(float time) … … 100 101 /** 101 102 \brief the entity is drawn onto the screen with this function 102 103 103 104 This is a central function of an entity: call it to let the entity painted to the screen. Just override this function with whatever you want to be drawn. 104 105 */ … … 108 109 109 110 /** 110 111 112 113 111 \brief this function is called, when two entities collide 112 \param other: the world entity with whom it collides 113 \param ownhitflags: flags to the CollisionCluster subsections that registered an impact 114 \param otherhitflags: flags to the CollisionCluster subsections of the other entity that registered an impact 114 115 115 116 Implement behaviour like damage application or other miscellaneous collision stuff in this function 116 117 */ 117 118 void WorldEntity::collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags) {} … … 135 136 136 137 /** 137 138 \brief basic initialisation for bound Entities 138 139 */ 139 140 void WorldEntity::init( Location* spawnloc, WorldEntity* spawnowner) 140 141 { 141 142 142 loc = *spawnloc; 143 owner = spawnowner; 143 144 } 144 145 145 146 /** 146 147 \brief basic initialisation for free Entities 147 148 */ 148 149 void WorldEntity::init( Placement* spawnplc, WorldEntity* spawnowner) 149 150 { 150 151 151 place = *spawnplc; 152 owner = spawnowner; 152 153 } 153 154 154 155 /** 155 156 157 158 156 \brief this is called immediately after the Entity has been constructed and initialized 157 158 Put any initialisation code that requires knowledge of location (placement if the Entity is free) and owner of the entity here. 159 DO NOT place such code in the constructor, those variables are set AFTER the entity is constucted. 159 160 */ 160 void WorldEntity::post _spawn ()161 void WorldEntity::postSpawn () 161 162 { 162 163 } 163 164 164 165 /** 165 166 167 168 169 166 \brief this handles incoming command messages 167 \param cmd: a pointer to the incoming Command structure 168 169 Put all code that handles Command messages here, this will mainly be called by the assigned CommandNode but can also be used 170 to send commands from one WorldEntity to another. 170 171 */ 171 172 void WorldEntity::command (Command* cmd) … … 174 175 175 176 /** 176 177 177 \brief this is called by the local Camera to determine the point it should look at on the WorldEntity 178 \param locbuf: a pointer to the buffer to fill with a location to look at 178 179 179 180 180 You may put any Location you want into locbuf, the Camera will determine via the corresponding Track how 181 to look at the location you return with this. 181 182 */ 182 void WorldEntity::get _lookat (Location* locbuf)183 void WorldEntity::getLookat (Location* locbuf) 183 184 { 184 185 } 185 186 186 187 /** 187 188 189 190 188 \brief this method is called by the world if the WorldEntity leaves valid gamespace 189 190 For free entities this means it left the Track boundaries. With bound entities it means its Location adresses a 191 place that is not in the world anymore. In both cases you might have to take extreme measures (a.k.a. call destroy). 191 192 */ 192 void WorldEntity::left _world ()193 void WorldEntity::leftWorld () 193 194 { 194 195 } -
orxonox/branches/buerli/src/world_entity.h
r2551 r3238 4 4 */ 5 5 6 #ifndef WORLD_ENTITY_H7 #define WORLD_ENTITY_H6 #ifndef _WORLD_ENTITY_H 7 #define _WORLD_ENTITY_H 8 8 9 9 #include "stdincl.h" … … 18 18 public: 19 19 WorldEntity (bool isFree = false); 20 ~WorldEntity ();20 virtual ~WorldEntity (); 21 21 22 Location* get _location ();23 Placement* get _placement ();24 void set _collision (CollisionCluster* newhull);22 Location* getLocation (); 23 Placement* getPlacement (); 24 void setCollision (CollisionCluster* newhull); 25 25 26 26 bool isFree (); … … 29 29 //void removeAbility(Ability* ability); 30 30 31 virtual void post _spawn ();31 virtual void postSpawn (); 32 32 virtual void tick (float time); 33 33 virtual void hit (WorldEntity* weapon, Vector loc); … … 37 37 38 38 virtual void draw (); 39 virtual void get _lookat (Location* locbuf);39 virtual void getLookat (Location* locbuf); 40 40 41 virtual void left _world ();41 virtual void leftWorld (); 42 42 43 43 private: … … 55 55 }; 56 56 57 #endif 57 #endif /* _WORLD_ENTITY_H */
Note: See TracChangeset
for help on using the changeset viewer.