Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3238 in orxonox.OLD for orxonox/branches/sound


Ignore:
Timestamp:
Dec 20, 2004, 2:42:54 AM (21 years ago)
Author:
bensch
Message:

orxonox/branches: updated branches: buerli, nico, sound. And moved bezierTrack to old.bezierTrack. Conflicts resolved in a usefull order.
Conflics mostly resolved in favor of trunk
merge.

Location:
orxonox/branches/sound
Files:
56 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/sound/CODING-STANDARDS

    r1856 r3238  
     1CODING-STANDARTS FOR ORXONOX
     2-==============--==---+++++-
     3In this file it is described how a orxonox-developer should structure his code.
     4Every developer has to read it and follow the rules, and orxonox will grow.
    15
    2 
     6Contents:
     7---------
     81.Coding Conventions
     92.How to format your Code
     103.Example
    311
    4121.Coding Conventions
    5 2.How to format your Code
    6 
    7 1.Coding Conventions
    8 --------------------
     13====================
    914==> If you are beginning a new code-file: copy the proto_class.{cc,h}
    1015==> and work with these files.
    1116
    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>
     171.1.What has to be there:
     18-------------------------
     19  a) in every code file, there must be a GNU copyright header.
    2020
    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
     261.2.Doxygen Tags:
     27-----------------
     28Doxygen tags in general are comments inside a file, that look just a bit different.
     29most 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.
    2442
    2543
    26442.How to format your Code
    27 -------------------------
     45=========================
    2846We use the GNU conding convention (which is also used in xemacs etc.):
    2947
     
    5169
    5270
     71
     72
     733.Example
     74=========
     753.1.Header
     76----------
     77A standard header has the same name as the Class it handles.
     78
     79someclass.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*/
     102class 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
     1233.2.CC-Files
     124------------
     125CC-files must be named the same as the .h-files they belong to.
     126
     127someclass.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*/
     154SomeClass::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*/
     178int SomeClass::mightyFuncion (char* name, int value)
     179{
     180  this->coolVariable = value;
     181  // and so on.....
     182}
     183
     184// ...
  • orxonox/branches/sound/Makefile.am

    r1956 r3238  
    1 SUBDIRS = src console gui
     1AUTOMAKE_OPTIONS = foreign no-installman no-installinfo
     2
     3SUBDIRS = src
     4
     5EXTRA_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
     17if DOXYGEN
     18DOXYGEN_INPUT = "src src/gui src/importer"
     19
     20## Exclude the application wizard templates, and some file templates
     21DOXYGEN_EXCLUDE =
     22
     23DOXYGEN_EXAMPLE_PATH =
     24
     25## Use Search engine (Versions 1.3.4 and above only!)
     26DOXYGEN_SEARCHENGINE = YES
     27
     28include doc/documentation.am
     29endif
  • orxonox/branches/sound/Makefile.in

    r2964 r3238  
    3434PRE_UNINSTALL = :
    3535POST_UNINSTALL = :
    36 subdir = .
     36host_triplet = @host@
    3737DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
    3838        $(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
     42subdir = .
    4143ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    4244am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     
    8789CXXFLAGS = @CXXFLAGS@
    8890CYGPATH_W = @CYGPATH_W@
     91DEBUG = @DEBUG@
    8992DEFS = @DEFS@
    9093DEPDIR = @DEPDIR@
     94DOXYGEN = @DOXYGEN@
     95DOXYGEN_FALSE = @DOXYGEN_FALSE@
     96DOXYGEN_TRUE = @DOXYGEN_TRUE@
    9197ECHO_C = @ECHO_C@
    9298ECHO_N = @ECHO_N@
     
    94100EGREP = @EGREP@
    95101EXEEXT = @EXEEXT@
     102GTK2_CFLAGS = @GTK2_CFLAGS@
     103GTK2_LIBS = @GTK2_LIBS@
     104HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
     105HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
    96106INSTALL_DATA = @INSTALL_DATA@
    97107INSTALL_PROGRAM = @INSTALL_PROGRAM@
     
    127137am__quote = @am__quote@
    128138bindir = @bindir@
     139build = @build@
    129140build_alias = @build_alias@
     141build_cpu = @build_cpu@
     142build_os = @build_os@
     143build_vendor = @build_vendor@
    130144datadir = @datadir@
    131145exec_prefix = @exec_prefix@
     146host = @host@
    132147host_alias = @host_alias@
     148host_cpu = @host_cpu@
     149host_os = @host_os@
     150host_vendor = @host_vendor@
    133151includedir = @includedir@
    134152infodir = @infodir@
     
    145163sharedstatedir = @sharedstatedir@
    146164sysconfdir = @sysconfdir@
     165target = @target@
    147166target_alias = @target_alias@
    148 SUBDIRS = src console gui
     167target_cpu = @target_cpu@
     168target_os = @target_os@
     169target_vendor = @target_vendor@
     170AUTOMAKE_OPTIONS = foreign no-installman no-installinfo
     171SUBDIRS = src
     172EXTRA_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"
    149189all: config.h
    150190        $(MAKE) $(AM_MAKEFLAGS) all-recursive
     
    153193am--refresh:
    154194        @:
    155 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(am__configure_deps)
     195$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/doc/documentation.am $(am__configure_deps)
    156196        @for dep in $?; do \
    157197          case '$(am__configure_deps)' in \
    158198            *$$dep*) \
    159               echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
    160               cd $(srcdir) && $(AUTOMAKE) --gnu  \
     199              echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
     200              cd $(srcdir) && $(AUTOMAKE) --foreign  \
    161201                && exit 0; \
    162202              exit 1;; \
    163203          esac; \
    164204        done; \
    165         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
     205        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
    166206        cd $(top_srcdir) && \
    167           $(AUTOMAKE) --gnu  Makefile
     207          $(AUTOMAKE) --foreign  Makefile
    168208.PRECIOUS: Makefile
    169209Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    326366        $(am__remove_distdir)
    327367        mkdir $(distdir)
     368        $(mkdir_p) $(distdir)/doc $(distdir)/doc/doxyconf
    328369        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
    329370        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
     
    464505check-am: all-am
    465506check: check-recursive
    466 all-am: Makefile config.h
     507all-am: Makefile config.h all-local
    467508installdirs: installdirs-recursive
    468509installdirs-am:
     
    493534clean: clean-recursive
    494535
    495 clean-am: clean-generic mostlyclean-am
     536clean-am: clean-generic clean-local mostlyclean-am
    496537
    497538distclean: distclean-recursive
    498539        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
    499540        -rm -f Makefile
    500 distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
     541distclean-am: clean-am distclean-generic distclean-hdr distclean-local \
     542        distclean-tags
    501543
    502544dvi: dvi-recursive
     
    538580ps-am:
    539581
    540 uninstall-am: uninstall-info-am
     582uninstall-am:
    541583
    542584uninstall-info: uninstall-info-recursive
    543585
    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:
    559657# Tell versions [3.59,3.63) of GNU make to not export all variables.
    560658# Otherwise a system limit (for SysV at least) may be exceeded.
  • orxonox/branches/sound/NEWS

    r2964 r3238  
     1Date: December 20, 2004
     2Topic: New Webpage under construction
     3Body: 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
     5Date: December 14, 2004
     6Topic: Repository Moved
     7Body: 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
    19Date:   November 16, 2004
    210Topic:  Importer
  • orxonox/branches/sound/config.h.in

    r2854 r3238  
    11/* config.h.in.  Generated from configure.ac by autoheader.  */
     2
     3/* in which debug mode we are */
     4#undef DEBUG
    25
    36/* Define to 1 if you have the `bzero' function. */
     
    1013#undef HAVE_GL_GL_H
    1114
     15/* if we have GTK2 */
     16#undef HAVE_GTK2
     17
    1218/* Define to 1 if you have the <inttypes.h> header file. */
    1319#undef HAVE_INTTYPES_H
    1420
     21/* Define to 1 if you have the <jpeglib.h> header file. */
     22#undef HAVE_JPEGLIB_H
     23
    1524/* Define to 1 if you have the `m' library (-lm). */
    1625#undef HAVE_LIBM
    17 
    18 /* Define to 1 if you have the `OSMesa' library (-lOSMesa). */
    19 #undef HAVE_LIBOSMESA
    20 
    21 /* Define to 1 if you have the `X11' library (-lX11). */
    22 #undef HAVE_LIBX11
    23 
    24 /* Define to 1 if you have the `Xt' library (-lXt). */
    25 #undef HAVE_LIBXT
    2626
    2727/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
     
    3232#undef HAVE_MEMORY_H
    3333
     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
    3443/* Define to 1 if you have the <SDL/SDL.h> header file. */
    3544#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
    3648
    3749/* Define to 1 if you have the <SDL/SDL_mixer.h> header file. */
  • orxonox/branches/sound/configure

    r2964 r3238  
    11#! /bin/sh
    22# 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.
    44#
    55# Report bugs to <orxonox-dev@mail.datacore.ch>.
     
    270270PACKAGE_NAME='orxonox'
    271271PACKAGE_TARNAME='orxonox'
    272 PACKAGE_VERSION='0.1-pre-alpha'
    273 PACKAGE_STRING='orxonox 0.1-pre-alpha'
     272PACKAGE_VERSION='0.2.0_alpha-r1'
     273PACKAGE_STRING='orxonox 0.2.0_alpha-r1'
    274274PACKAGE_BUGREPORT='orxonox-dev@mail.datacore.ch'
    275275
     
    312312#endif"
    313313
    314 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS 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 MSBITFIELDS LIBOBJS LTLIBOBJS'
     314ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP DEBUG DOXYGEN DOXYGEN_TRUE DOXYGEN_FALSE MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_FALSE LIBOBJS LTLIBOBJS'
    315315ac_subst_files=''
    316316
     
    789789  # This message is too long to be a string in the A/UX 3.1 sh.
    790790  cat <<_ACEOF
    791 \`configure' configures orxonox 0.1-pre-alpha to adapt to many kinds of systems.
     791\`configure' configures orxonox 0.2.0_alpha-r1 to adapt to many kinds of systems.
    792792
    793793Usage: $0 [OPTION]... [VAR=VALUE]...
     
    846846  --program-suffix=SUFFIX            append SUFFIX to installed program names
    847847  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
     848
     849System 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]
    848853_ACEOF
    849854fi
     
    851856if test -n "$ac_init_help"; then
    852857  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:";;
    854859   esac
    855860  cat <<\_ACEOF
     
    860865  --disable-dependency-tracking  speeds up one-time build
    861866  --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
     870Optional 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
    862875
    863876Some influential environment variables:
     
    971984if $ac_init_version; then
    972985  cat <<\_ACEOF
    973 orxonox configure 0.1-pre-alpha
     986orxonox configure 0.2.0_alpha-r1
    974987generated by GNU Autoconf 2.59
    975988
     
    985998running configure, to aid debugging if configure makes a mistake.
    986999
    987 It was created by orxonox $as_me 0.1-pre-alpha, which was
     1000It was created by orxonox $as_me 0.2.0_alpha-r1, which was
    9881001generated by GNU Autoconf 2.59.  Invocation command line was
    9891002
     
    13211334
    13221335
    1323 am__api_version="1.8"
     1336
     1337# Detect the canonical host and target build environment.
    13241338ac_aux_dir=
    13251339for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
     
    13471361ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
    13481362
     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
     1366echo "$as_me: error: cannot run $ac_config_sub" >&2;}
     1367   { (exit 1); exit 1; }; }
     1368
     1369echo "$as_me:$LINENO: checking build system type" >&5
     1370echo $ECHO_N "checking build system type... $ECHO_C" >&6
     1371if test "${ac_cv_build+set}" = set; then
     1372  echo $ECHO_N "(cached) $ECHO_C" >&6
     1373else
     1374  ac_cv_build_alias=$build_alias
     1375test -z "$ac_cv_build_alias" &&
     1376  ac_cv_build_alias=`$ac_config_guess`
     1377test -z "$ac_cv_build_alias" &&
     1378  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
     1379echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
     1380   { (exit 1); exit 1; }; }
     1381ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
     1382  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
     1383echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
     1384   { (exit 1); exit 1; }; }
     1385
     1386fi
     1387echo "$as_me:$LINENO: result: $ac_cv_build" >&5
     1388echo "${ECHO_T}$ac_cv_build" >&6
     1389build=$ac_cv_build
     1390build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
     1391build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
     1392build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
     1393
     1394
     1395echo "$as_me:$LINENO: checking host system type" >&5
     1396echo $ECHO_N "checking host system type... $ECHO_C" >&6
     1397if test "${ac_cv_host+set}" = set; then
     1398  echo $ECHO_N "(cached) $ECHO_C" >&6
     1399else
     1400  ac_cv_host_alias=$host_alias
     1401test -z "$ac_cv_host_alias" &&
     1402  ac_cv_host_alias=$ac_cv_build_alias
     1403ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
     1404  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
     1405echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
     1406   { (exit 1); exit 1; }; }
     1407
     1408fi
     1409echo "$as_me:$LINENO: result: $ac_cv_host" >&5
     1410echo "${ECHO_T}$ac_cv_host" >&6
     1411host=$ac_cv_host
     1412host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
     1413host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
     1414host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
     1415
     1416
     1417echo "$as_me:$LINENO: checking target system type" >&5
     1418echo $ECHO_N "checking target system type... $ECHO_C" >&6
     1419if test "${ac_cv_target+set}" = set; then
     1420  echo $ECHO_N "(cached) $ECHO_C" >&6
     1421else
     1422  ac_cv_target_alias=$target_alias
     1423test "x$ac_cv_target_alias" = "x" &&
     1424  ac_cv_target_alias=$ac_cv_host_alias
     1425ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
     1426  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
     1427echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
     1428   { (exit 1); exit 1; }; }
     1429
     1430fi
     1431echo "$as_me:$LINENO: result: $ac_cv_target" >&5
     1432echo "${ECHO_T}$ac_cv_target" >&6
     1433target=$ac_cv_target
     1434target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
     1435target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
     1436target_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.
     1441test -n "$target_alias" &&
     1442  test "$program_prefix$program_suffix$program_transform_name" = \
     1443    NONENONEs,x,x, &&
     1444  program_prefix=${target_alias}-
     1445
     1446
     1447am__api_version="1.8"
    13491448# Find a good install program.  We prefer a C program (faster),
    13501449# so one script is as good as another.  But avoid the broken or
     
    16201719# Define the identity of the package.
    16211720 PACKAGE='orxonox'
    1622  VERSION='0.1-pre-alpha'
     1721 VERSION='0.2.0_alpha-r1'
    16231722
    16241723
     
    33223421
    33233422
    3324 
    3325 
    3326 
    33273423ac_ext=c
    33283424ac_cpp='$CPP $CPPFLAGS'
     
    37423838
    37433839
     3840### CHECKING  OPTIONAT ARGUMENTS
     3841## DEBUG-statement
     3842DEBUG=no
     3843echo "$as_me:$LINENO: checking if DEBUG-mode should be enabled" >&5
     3844echo $ECHO_N "checking if DEBUG-mode should be enabled... $ECHO_C" >&6
     3845# Check whether --enable-debug or --disable-debug was given.
     3846if test "${enable_debug+set}" = set; then
     3847  enableval="$enable_debug"
     3848  DEBUG=$enableval
     3849fi;
     3850
     3851if test "$DEBUG" = "no"; then
     3852        echo "no"
     3853        echo " -> Setting debuglevel to 1. Like this you can still see errors."
     3854        DEBUG=1
     3855elif test "$DEBUG" = yes; then
     3856        echo "yes"
     3857        echo " -> Setting debuglevel to 3. HARD DEBUG MODE!!."
     3858        DEBUG=3
     3859else
     3860        echo "yes set to $DEBUG"
     3861fi
     3862
     3863cat >>confdefs.h <<_ACEOF
     3864#define DEBUG $DEBUG
     3865_ACEOF
     3866
     3867
     3868
     3869
     3870## GTK-disabled
     3871echo "$as_me:$LINENO: checking if gtk should be enabled" >&5
     3872echo $ECHO_N "checking if gtk should be enabled... $ECHO_C" >&6
     3873
     3874# Check whether --with-gtk or --without-gtk was given.
     3875if test "${with_gtk+set}" = set; then
     3876  withval="$with_gtk"
     3877  def_gtk=no
     3878else
     3879  def_gtk=yes
     3880fi;
     3881if test "$def_gtk" = yes; then
     3882  echo "yes"
     3883fi
     3884if test "$def_gtk" = no; then
     3885  echo "no"
     3886fi
     3887### SDL_image-disable
     3888def_sdl_image=yes
     3889echo "$as_me:$LINENO: checking if SDL_image should be enabled" >&5
     3890echo $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.
     3893if test "${with_sdl_image+set}" = set; then
     3894  withval="$with_sdl_image"
     3895  def_sdl_image=no
     3896fi;
     3897if test "$def_sdl_image" = yes; then
     3898  echo "yes"
     3899fi
     3900if test "$def_sdl_image" = no; then
     3901  echo "no"
     3902fi
     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.
     3908set dummy doxygen; ac_word=$2
     3909echo "$as_me:$LINENO: checking for $ac_word" >&5
     3910echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     3911if test "${ac_cv_path_DOXYGEN+set}" = set; then
     3912  echo $ECHO_N "(cached) $ECHO_C" >&6
     3913else
     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
     3920for as_dir in $PATH
     3921do
     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
     3930done
     3931done
     3932
     3933  ;;
     3934esac
     3935fi
     3936DOXYGEN=$ac_cv_path_DOXYGEN
     3937
     3938if test -n "$DOXYGEN"; then
     3939  echo "$as_me:$LINENO: result: $DOXYGEN" >&5
     3940echo "${ECHO_T}$DOXYGEN" >&6
     3941else
     3942  echo "$as_me:$LINENO: result: no" >&5
     3943echo "${ECHO_T}no" >&6
     3944fi
     3945
     3946
     3947
     3948if test $DOXYGEN; then
     3949  DOXYGEN_TRUE=
     3950  DOXYGEN_FALSE='#'
     3951else
     3952  DOXYGEN_TRUE='#'
     3953  DOXYGEN_FALSE=
     3954fi
     3955
     3956
    37443957### CHECKING FOR SYSTEM ###
    37453958
    37463959echo "$as_me:$LINENO: checking for System" >&5
    37473960echo $ECHO_N "checking for System... $ECHO_C" >&6
    3748 case `uname` in
     3961## checking for openGL-environment and other sys-specific parameters
     3962case "$target" in
    37493963### WINDOWS ###
    3750   *MINGW*)
     3964  *-*-mingw32*)
    37513965echo "mingw-WINDOWS detected"
    37523966
     
    42894503    fi
    42904504
    4291 
    42924505# checking for mingw32
    42934506    echo "$as_me:$LINENO: checking for main in -lmingw32" >&5
     
    45764789
    45774790    if test "$FOUND_sdlmain" = "yes" ; then
    4578         LIBS="$LIBS -lsdlmain"
     4791       LIBS="$LIBS -lsdlmain"
    45794792    else
    4580         echo "------------------"
    4581         echo "SDL library not found."
    4582         echo "please install the SDL library, which can be found at http://www.libsdl.org"
    4583         echo "------------------"
    4584         exit 1
     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
    45854798    fi
    45864799    echo "$as_me:$LINENO: checking for main in -lsdl" >&5
     
    46474860
    46484861    if test "$FOUND_sdl" = "yes" ; then
    4649         LIBS="$LIBS -lsdl"
     4862       LIBS="$LIBS -lsdl"
    46504863    else
    4651         echo "------------------"
    4652         echo "SDL library not found."
    4653         echo "please install the SDL library, which can be found at http://www.libsdl.org"
    4654         echo "------------------"
    4655         exit -1
     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
    46564869    fi
    46574870
    4658 # checking for SDL-Mixer-headers
    4659 
    4660 for ac_header in SDL/SDL_mixer.h
     4871    ;;
     4872
     4873### LINUX ###
     4874 *-*-linux*)
     4875echo "Linux detected"
     4876
     4877 Linux="yes"
     4878
     4879CPPFLAGS="-I/usr/X11R6/include"
     4880LDFLAGS="-L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib $LDFLAGS"
     4881# checking gl header
     4882
     4883for ac_header in GL/gl.h
    46614884do
    46624885as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    48045027
    48055028else
    4806   { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
    4807 echo "$as_me: error: cannot find SDL headers" >&2;}
     5029  { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5
     5030echo "$as_me: error: cannot find opengl headers" >&2;}
    48085031   { (exit 1); exit 1; }; }
    48095032fi
     
    48125035
    48135036
    4814 #checking for libSDL_mixer
    4815     echo "$as_me:$LINENO: checking for main in -lSDL_mixer" >&5
    4816 echo $ECHO_N "checking for main in -lSDL_mixer... $ECHO_C" >&6
    4817 if test "${ac_cv_lib_SDL_mixer_main+set}" = set; then
     5037#  checking for Unix GL
     5038   echo "$as_me:$LINENO: checking for main in -lGL" >&5
     5039echo $ECHO_N "checking for main in -lGL... $ECHO_C" >&6
     5040if test "${ac_cv_lib_GL_main+set}" = set; then
    48185041  echo $ECHO_N "(cached) $ECHO_C" >&6
    48195042else
    48205043  ac_check_lib_save_LIBS=$LIBS
    4821 LIBS="-lSDL_mixer  $LIBS"
     5044LIBS="-lGL  $LIBS"
    48225045cat >conftest.$ac_ext <<_ACEOF
    48235046/* confdefs.h.  */
     
    48585081  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    48595082  (exit $ac_status); }; }; then
    4860   ac_cv_lib_SDL_mixer_main=yes
     5083  ac_cv_lib_GL_main=yes
    48615084else
    48625085  echo "$as_me: failed program was:" >&5
    48635086sed 's/^/| /' conftest.$ac_ext >&5
    48645087
    4865 ac_cv_lib_SDL_mixer_main=no
     5088ac_cv_lib_GL_main=no
    48665089fi
    48675090rm -f conftest.err conftest.$ac_objext \
     
    48695092LIBS=$ac_check_lib_save_LIBS
    48705093fi
    4871 echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_mixer_main" >&5
    4872 echo "${ECHO_T}$ac_cv_lib_SDL_mixer_main" >&6
    4873 if test $ac_cv_lib_SDL_mixer_main = yes; then
    4874   FOUND_SDL_mixer=yes
    4875 fi
    4876 
    4877     if test "$FOUND_SDL_mixer" = "yes" ; then
    4878         LIBS="$LIBS -lSDL_mixer"
    4879     else
     5094echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5
     5095echo "${ECHO_T}$ac_cv_lib_GL_main" >&6
     5096if test $ac_cv_lib_GL_main = yes; then
     5097  FOUND_GL=yes
     5098fi
     5099
     5100   if test "$FOUND_GL" = "yes" ; then
     5101     LIBS="$LIBS -lGL"
     5102   else
    48805103         echo "------------------"
    4881          echo "SDL Mixer library not found."
    4882          echo "please install the SDL Mixer library, which can be found at http://www.libsdl.org"
     5104         echo "opengl not found."
     5105         echo "please install the opengl package which can be found at http://www.opengl.org"
    48835106         echo "------------------"
    4884          exit 1
    4885     fi
    4886 
    4887 
    4888     ;;
    4889 
    4890 ### LINUX ###
    4891  *Linux*)
    4892 echo "Linux detected"
    4893 
    4894  Linux="yes"
    4895 
    4896 # checking gl header
    4897 
    4898 for ac_header in GL/gl.h
     5107         exit -1
     5108   fi
     5109
     5110# cheking for GLU-header
     5111
     5112for ac_header in GL/glu.h
    48995113do
    49005114as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    50505264
    50515265
    5052 #  checking for Unix GL
    5053    echo "$as_me:$LINENO: checking for main in -lGL" >&5
    5054 echo $ECHO_N "checking for main in -lGL... $ECHO_C" >&6
    5055 if test "${ac_cv_lib_GL_main+set}" = set; then
     5266    echo "$as_me:$LINENO: checking for gluProject in -lGLU" >&5
     5267echo $ECHO_N "checking for gluProject in -lGLU... $ECHO_C" >&6
     5268if test "${ac_cv_lib_GLU_gluProject+set}" = set; then
    50565269  echo $ECHO_N "(cached) $ECHO_C" >&6
    50575270else
    50585271  ac_check_lib_save_LIBS=$LIBS
    5059 LIBS="-lGL  $LIBS"
     5272LIBS="-lGLU  $LIBS"
    50605273cat >conftest.$ac_ext <<_ACEOF
    50615274/* confdefs.h.  */
     
    50655278/* end confdefs.h.  */
    50665279
    5067 
     5280/* Override any gcc2 internal prototype to avoid an error.  */
     5281#ifdef __cplusplus
     5282extern "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.  */
     5286char gluProject ();
    50685287int
    50695288main ()
    50705289{
    5071 main ();
     5290gluProject ();
    50725291  ;
    50735292  return 0;
     
    50965315  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    50975316  (exit $ac_status); }; }; then
    5098   ac_cv_lib_GL_main=yes
     5317  ac_cv_lib_GLU_gluProject=yes
    50995318else
    51005319  echo "$as_me: failed program was:" >&5
    51015320sed 's/^/| /' conftest.$ac_ext >&5
    51025321
    5103 ac_cv_lib_GL_main=no
     5322ac_cv_lib_GLU_gluProject=no
    51045323fi
    51055324rm -f conftest.err conftest.$ac_objext \
     
    51075326LIBS=$ac_check_lib_save_LIBS
    51085327fi
    5109 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5
    5110 echo "${ECHO_T}$ac_cv_lib_GL_main" >&6
    5111 if test $ac_cv_lib_GL_main = yes; then
    5112   FOUND_GL=yes
    5113 fi
    5114 
    5115    if test "$FOUND_GL" = "yes" ; then
    5116      LIBS="$LIBS -lGL"
    5117    else
     5328echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluProject" >&5
     5329echo "${ECHO_T}$ac_cv_lib_GLU_gluProject" >&6
     5330if test $ac_cv_lib_GLU_gluProject = yes; then
     5331  FOUND_GLU=yes
     5332fi
     5333
     5334    if test "$FOUND_GLU" = "yes" ; then
     5335      LIBS="$LIBS -lGLU"
     5336    else
    51185337         echo "------------------"
    5119          echo "opengl not found."
    5120          echo "please install the opengl package which can be found at http://www.opengl.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"
    51215340         echo "------------------"
    51225341         exit -1
    5123    fi
    5124 
    5125 # cheking for GLU-header
    5126 
    5127 for ac_header in GL/glu.h
     5342    fi
     5343
     5344# checking for SDL-headers
     5345
     5346for ac_header in SDL/SDL.h
    51285347do
    51295348as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    52715490
    52725491else
    5273   { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5
    5274 echo "$as_me: error: cannot find opengl headers" >&2;}
     5492  { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
     5493echo "$as_me: error: cannot find SDL headers" >&2;}
    52755494   { (exit 1); exit 1; }; }
    52765495fi
     
    52795498
    52805499
    5281     echo "$as_me:$LINENO: checking for gluProject in -lGLU" >&5
    5282 echo $ECHO_N "checking for gluProject in -lGLU... $ECHO_C" >&6
    5283 if test "${ac_cv_lib_GLU_gluProject+set}" = set; then
     5500# checking for SDL-lib
     5501    echo "$as_me:$LINENO: checking for main in -lSDL" >&5
     5502echo $ECHO_N "checking for main in -lSDL... $ECHO_C" >&6
     5503if test "${ac_cv_lib_SDL_main+set}" = set; then
    52845504  echo $ECHO_N "(cached) $ECHO_C" >&6
    52855505else
    52865506  ac_check_lib_save_LIBS=$LIBS
    5287 LIBS="-lGLU  $LIBS"
     5507LIBS="-lSDL  $LIBS"
    52885508cat >conftest.$ac_ext <<_ACEOF
    52895509/* confdefs.h.  */
     
    52935513/* end confdefs.h.  */
    52945514
    5295 /* Override any gcc2 internal prototype to avoid an error.  */
    5296 #ifdef __cplusplus
    5297 extern "C"
    5298 #endif
    5299 /* We use char because int might match the return type of a gcc2
    5300    builtin and then its argument prototype would still apply.  */
    5301 char gluProject ();
     5515
    53025516int
    53035517main ()
    53045518{
    5305 gluProject ();
     5519main ();
    53065520  ;
    53075521  return 0;
     
    53305544  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    53315545  (exit $ac_status); }; }; then
    5332   ac_cv_lib_GLU_gluProject=yes
     5546  ac_cv_lib_SDL_main=yes
    53335547else
    53345548  echo "$as_me: failed program was:" >&5
    53355549sed 's/^/| /' conftest.$ac_ext >&5
    53365550
    5337 ac_cv_lib_GLU_gluProject=no
     5551ac_cv_lib_SDL_main=no
    53385552fi
    53395553rm -f conftest.err conftest.$ac_objext \
     
    53415555LIBS=$ac_check_lib_save_LIBS
    53425556fi
    5343 echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluProject" >&5
    5344 echo "${ECHO_T}$ac_cv_lib_GLU_gluProject" >&6
    5345 if test $ac_cv_lib_GLU_gluProject = yes; then
    5346   FOUND_GLU=yes
    5347 fi
    5348 
    5349     if test "$FOUND_GLU" = "yes" ; then
    5350       LIBS="$LIBS -lGLU"
    5351     else
    5352          echo "------------------"
    5353          echo "GLU library not found."
    5354          echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
    5355          echo "------------------"
    5356          exit -1
    5357     fi
    5358 
    5359 # checking for SDL-headers
    5360 
    5361 for ac_header in SDL/SDL.h
     5557echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_main" >&5
     5558echo "${ECHO_T}$ac_cv_lib_SDL_main" >&6
     5559if test $ac_cv_lib_SDL_main = yes; then
     5560  FOUND_SDL=yes
     5561fi
     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*)
     5586echo "OS X detected"
     5587
     5588 osX="yes"
     5589
     5590 CPPFLAGS="-I/sw/include $CPPFLAGS"
     5591# checking gl header
     5592
     5593for ac_header in OpenGL/gl.h
    53625594do
    53635595as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    55055737
    55065738else
    5507   { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
    5508 echo "$as_me: error: cannot find SDL headers" >&2;}
     5739  { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5
     5740echo "$as_me: error: cannot find opengl headers" >&2;}
    55095741   { (exit 1); exit 1; }; }
    55105742fi
     
    55125744done
    55135745
    5514 
    5515     echo "$as_me:$LINENO: checking for main in -lSDL" >&5
    5516 echo $ECHO_N "checking for main in -lSDL... $ECHO_C" >&6
    5517 if test "${ac_cv_lib_SDL_main+set}" = set; then
    5518   echo $ECHO_N "(cached) $ECHO_C" >&6
    5519 else
    5520   ac_check_lib_save_LIBS=$LIBS
    5521 LIBS="-lSDL  $LIBS"
    5522 cat >conftest.$ac_ext <<_ACEOF
    5523 /* confdefs.h.  */
    5524 _ACEOF
    5525 cat confdefs.h >>conftest.$ac_ext
    5526 cat >>conftest.$ac_ext <<_ACEOF
    5527 /* end confdefs.h.  */
    5528 
    5529 
    5530 int
    5531 main ()
    5532 {
    5533 main ();
    5534   ;
    5535   return 0;
    5536 }
    5537 _ACEOF
    5538 rm -f conftest.$ac_objext conftest$ac_exeext
    5539 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    5540   (eval $ac_link) 2>conftest.er1
    5541   ac_status=$?
    5542   grep -v '^ *+' conftest.er1 >conftest.err
    5543   rm -f conftest.er1
    5544   cat conftest.err >&5
    5545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5546   (exit $ac_status); } &&
    5547          { ac_try='test -z "$ac_c_werror_flag"
    5548                          || test ! -s conftest.err'
    5549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    5550   (eval $ac_try) 2>&5
    5551   ac_status=$?
    5552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5553   (exit $ac_status); }; } &&
    5554          { ac_try='test -s conftest$ac_exeext'
    5555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    5556   (eval $ac_try) 2>&5
    5557   ac_status=$?
    5558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5559   (exit $ac_status); }; }; then
    5560   ac_cv_lib_SDL_main=yes
    5561 else
    5562   echo "$as_me: failed program was:" >&5
    5563 sed 's/^/| /' conftest.$ac_ext >&5
    5564 
    5565 ac_cv_lib_SDL_main=no
    5566 fi
    5567 rm -f conftest.err conftest.$ac_objext \
    5568       conftest$ac_exeext conftest.$ac_ext
    5569 LIBS=$ac_check_lib_save_LIBS
    5570 fi
    5571 echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_main" >&5
    5572 echo "${ECHO_T}$ac_cv_lib_SDL_main" >&6
    5573 if test $ac_cv_lib_SDL_main = yes; then
    5574   FOUND_SDL=yes
    5575 fi
    5576 
    5577      if test "$FOUND_SDL" = "yes" ; then
    5578         LIBS="$LIBS -lSDL"
    5579      else
    5580          echo "------------------"
    5581          echo "SDL library not found."
    5582          echo "please install the SDL library, which can be found at http://www.libsdl.org"
    5583          echo "------------------"
    5584          exit -1
    5585      fi
    5586 
    5587 # checking for SDL-Mixer-headers
    5588 
    5589 for ac_header in SDL/SDL_mixer.h
     5746# cheking for GLU-header
     5747
     5748for ac_header in OpenGL/glu.h
    55905749do
    55915750as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    57335892
    57345893else
    5735   { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
    5736 echo "$as_me: error: cannot find SDL headers" >&2;}
     5894  { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5
     5895echo "$as_me: error: cannot find opengl headers" >&2;}
    57375896   { (exit 1); exit 1; }; }
    57385897fi
     
    57415900
    57425901
    5743 
    5744 #checking for libSDL_mixer
    5745     echo "$as_me:$LINENO: checking for main in -lSDL_mixer" >&5
    5746 echo $ECHO_N "checking for main in -lSDL_mixer... $ECHO_C" >&6
    5747 if test "${ac_cv_lib_SDL_mixer_main+set}" = set; then
    5748   echo $ECHO_N "(cached) $ECHO_C" >&6
    5749 else
    5750   ac_check_lib_save_LIBS=$LIBS
    5751 LIBS="-lSDL_mixer  $LIBS"
    5752 cat >conftest.$ac_ext <<_ACEOF
    5753 /* confdefs.h.  */
    5754 _ACEOF
    5755 cat confdefs.h >>conftest.$ac_ext
    5756 cat >>conftest.$ac_ext <<_ACEOF
    5757 /* end confdefs.h.  */
    5758 
    5759 
    5760 int
    5761 main ()
    5762 {
    5763 main ();
    5764   ;
    5765   return 0;
    5766 }
    5767 _ACEOF
    5768 rm -f conftest.$ac_objext conftest$ac_exeext
    5769 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    5770   (eval $ac_link) 2>conftest.er1
    5771   ac_status=$?
    5772   grep -v '^ *+' conftest.er1 >conftest.err
    5773   rm -f conftest.er1
    5774   cat conftest.err >&5
    5775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5776   (exit $ac_status); } &&
    5777          { ac_try='test -z "$ac_c_werror_flag"
    5778                          || test ! -s conftest.err'
    5779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    5780   (eval $ac_try) 2>&5
    5781   ac_status=$?
    5782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5783   (exit $ac_status); }; } &&
    5784          { ac_try='test -s conftest$ac_exeext'
    5785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    5786   (eval $ac_try) 2>&5
    5787   ac_status=$?
    5788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5789   (exit $ac_status); }; }; then
    5790   ac_cv_lib_SDL_mixer_main=yes
    5791 else
    5792   echo "$as_me: failed program was:" >&5
    5793 sed 's/^/| /' conftest.$ac_ext >&5
    5794 
    5795 ac_cv_lib_SDL_mixer_main=no
    5796 fi
    5797 rm -f conftest.err conftest.$ac_objext \
    5798       conftest$ac_exeext conftest.$ac_ext
    5799 LIBS=$ac_check_lib_save_LIBS
    5800 fi
    5801 echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_mixer_main" >&5
    5802 echo "${ECHO_T}$ac_cv_lib_SDL_mixer_main" >&6
    5803 if test $ac_cv_lib_SDL_mixer_main = yes; then
    5804   FOUND_SDL_mixer=yes
    5805 fi
    5806 
    5807     if test "$FOUND_SDL_mixer" = "yes" ; then
    5808         LIBS="$LIBS -lSDL_mixer"
    5809     else
    5810          echo "------------------"
    5811          echo "SDL Mixer library not found."
    5812          echo "please install the SDL Mixer library, which can be found at http://www.libsdl.org"
    5813          echo "------------------"
    5814          exit 1
    5815     fi
     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"
    58165919
    58175920    ;;
     5921
    58185922  *)
    5819     mingw="no"
    58205923    ;;
    58215924esac
    5822 echo "$as_me:$LINENO: result: $mingw" >&5
    5823 echo "${ECHO_T}$mingw" >&6
    5824 
    5825 
    5826 #### Checking for LIBraries.
    5827 
    5828 # FIXME: Replace `main' with a function in `-lOSMesa':
    5829 
    5830 echo "$as_me:$LINENO: checking for main in -lOSMesa" >&5
    5831 echo $ECHO_N "checking for main in -lOSMesa... $ECHO_C" >&6
    5832 if test "${ac_cv_lib_OSMesa_main+set}" = set; then
    5833   echo $ECHO_N "(cached) $ECHO_C" >&6
    5834 else
    5835   ac_check_lib_save_LIBS=$LIBS
    5836 LIBS="-lOSMesa  $LIBS"
    5837 cat >conftest.$ac_ext <<_ACEOF
    5838 /* confdefs.h.  */
    5839 _ACEOF
    5840 cat confdefs.h >>conftest.$ac_ext
    5841 cat >>conftest.$ac_ext <<_ACEOF
    5842 /* end confdefs.h.  */
    5843 
    5844 
    5845 int
    5846 main ()
    5847 {
    5848 main ();
    5849   ;
    5850   return 0;
    5851 }
    5852 _ACEOF
    5853 rm -f conftest.$ac_objext conftest$ac_exeext
    5854 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    5855   (eval $ac_link) 2>conftest.er1
    5856   ac_status=$?
    5857   grep -v '^ *+' conftest.er1 >conftest.err
    5858   rm -f conftest.er1
    5859   cat conftest.err >&5
    5860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5861   (exit $ac_status); } &&
    5862          { ac_try='test -z "$ac_c_werror_flag"
    5863                          || test ! -s conftest.err'
    5864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    5865   (eval $ac_try) 2>&5
    5866   ac_status=$?
    5867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5868   (exit $ac_status); }; } &&
    5869          { ac_try='test -s conftest$ac_exeext'
    5870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    5871   (eval $ac_try) 2>&5
    5872   ac_status=$?
    5873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5874   (exit $ac_status); }; }; then
    5875   ac_cv_lib_OSMesa_main=yes
    5876 else
    5877   echo "$as_me: failed program was:" >&5
    5878 sed 's/^/| /' conftest.$ac_ext >&5
    5879 
    5880 ac_cv_lib_OSMesa_main=no
    5881 fi
    5882 rm -f conftest.err conftest.$ac_objext \
    5883       conftest$ac_exeext conftest.$ac_ext
    5884 LIBS=$ac_check_lib_save_LIBS
    5885 fi
    5886 echo "$as_me:$LINENO: result: $ac_cv_lib_OSMesa_main" >&5
    5887 echo "${ECHO_T}$ac_cv_lib_OSMesa_main" >&6
    5888 if test $ac_cv_lib_OSMesa_main = yes; then
    5889   cat >>confdefs.h <<_ACEOF
    5890 #define HAVE_LIBOSMESA 1
    5891 _ACEOF
    5892 
    5893   LIBS="-lOSMesa $LIBS"
    5894 
    5895 fi
    5896 
    5897 # FIXME: Replace `main' with a function in `-lX11':
    5898 
    5899 echo "$as_me:$LINENO: checking for main in -lX11" >&5
    5900 echo $ECHO_N "checking for main in -lX11... $ECHO_C" >&6
    5901 if test "${ac_cv_lib_X11_main+set}" = set; then
    5902   echo $ECHO_N "(cached) $ECHO_C" >&6
    5903 else
    5904   ac_check_lib_save_LIBS=$LIBS
    5905 LIBS="-lX11  $LIBS"
    5906 cat >conftest.$ac_ext <<_ACEOF
    5907 /* confdefs.h.  */
    5908 _ACEOF
    5909 cat confdefs.h >>conftest.$ac_ext
    5910 cat >>conftest.$ac_ext <<_ACEOF
    5911 /* end confdefs.h.  */
    5912 
    5913 
    5914 int
    5915 main ()
    5916 {
    5917 main ();
    5918   ;
    5919   return 0;
    5920 }
    5921 _ACEOF
    5922 rm -f conftest.$ac_objext conftest$ac_exeext
    5923 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    5924   (eval $ac_link) 2>conftest.er1
    5925   ac_status=$?
    5926   grep -v '^ *+' conftest.er1 >conftest.err
    5927   rm -f conftest.er1
    5928   cat conftest.err >&5
    5929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5930   (exit $ac_status); } &&
    5931          { ac_try='test -z "$ac_c_werror_flag"
    5932                          || test ! -s conftest.err'
    5933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    5934   (eval $ac_try) 2>&5
    5935   ac_status=$?
    5936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5937   (exit $ac_status); }; } &&
    5938          { ac_try='test -s conftest$ac_exeext'
    5939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    5940   (eval $ac_try) 2>&5
    5941   ac_status=$?
    5942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5943   (exit $ac_status); }; }; then
    5944   ac_cv_lib_X11_main=yes
    5945 else
    5946   echo "$as_me: failed program was:" >&5
    5947 sed 's/^/| /' conftest.$ac_ext >&5
    5948 
    5949 ac_cv_lib_X11_main=no
    5950 fi
    5951 rm -f conftest.err conftest.$ac_objext \
    5952       conftest$ac_exeext conftest.$ac_ext
    5953 LIBS=$ac_check_lib_save_LIBS
    5954 fi
    5955 echo "$as_me:$LINENO: result: $ac_cv_lib_X11_main" >&5
    5956 echo "${ECHO_T}$ac_cv_lib_X11_main" >&6
    5957 if test $ac_cv_lib_X11_main = yes; then
    5958   cat >>confdefs.h <<_ACEOF
    5959 #define HAVE_LIBX11 1
    5960 _ACEOF
    5961 
    5962   LIBS="-lX11 $LIBS"
    5963 
    5964 fi
    5965 
    5966 # FIXME: Replace `main' with a function in `-lXt':
    5967 
    5968 echo "$as_me:$LINENO: checking for main in -lXt" >&5
    5969 echo $ECHO_N "checking for main in -lXt... $ECHO_C" >&6
    5970 if test "${ac_cv_lib_Xt_main+set}" = set; then
    5971   echo $ECHO_N "(cached) $ECHO_C" >&6
    5972 else
    5973   ac_check_lib_save_LIBS=$LIBS
    5974 LIBS="-lXt  $LIBS"
    5975 cat >conftest.$ac_ext <<_ACEOF
    5976 /* confdefs.h.  */
    5977 _ACEOF
    5978 cat confdefs.h >>conftest.$ac_ext
    5979 cat >>conftest.$ac_ext <<_ACEOF
    5980 /* end confdefs.h.  */
    5981 
    5982 
    5983 int
    5984 main ()
    5985 {
    5986 main ();
    5987   ;
    5988   return 0;
    5989 }
    5990 _ACEOF
    5991 rm -f conftest.$ac_objext conftest$ac_exeext
    5992 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    5993   (eval $ac_link) 2>conftest.er1
    5994   ac_status=$?
    5995   grep -v '^ *+' conftest.er1 >conftest.err
    5996   rm -f conftest.er1
    5997   cat conftest.err >&5
    5998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5999   (exit $ac_status); } &&
    6000          { ac_try='test -z "$ac_c_werror_flag"
    6001                          || test ! -s conftest.err'
    6002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    6003   (eval $ac_try) 2>&5
    6004   ac_status=$?
    6005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    6006   (exit $ac_status); }; } &&
    6007          { ac_try='test -s conftest$ac_exeext'
    6008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    6009   (eval $ac_try) 2>&5
    6010   ac_status=$?
    6011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    6012   (exit $ac_status); }; }; then
    6013   ac_cv_lib_Xt_main=yes
    6014 else
    6015   echo "$as_me: failed program was:" >&5
    6016 sed 's/^/| /' conftest.$ac_ext >&5
    6017 
    6018 ac_cv_lib_Xt_main=no
    6019 fi
    6020 rm -f conftest.err conftest.$ac_objext \
    6021       conftest$ac_exeext conftest.$ac_ext
    6022 LIBS=$ac_check_lib_save_LIBS
    6023 fi
    6024 echo "$as_me:$LINENO: result: $ac_cv_lib_Xt_main" >&5
    6025 echo "${ECHO_T}$ac_cv_lib_Xt_main" >&6
    6026 if test $ac_cv_lib_Xt_main = yes; then
    6027   cat >>confdefs.h <<_ACEOF
    6028 #define HAVE_LIBXT 1
    6029 _ACEOF
    6030 
    6031   LIBS="-lXt $LIBS"
    6032 
    6033 fi
    6034 
    6035 
    6036 
    6037 #checking for pthread libs
    6038 echo "$as_me:$LINENO: checking for main in -lpthread" >&5
    6039 echo $ECHO_N "checking for main in -lpthread... $ECHO_C" >&6
    6040 if test "${ac_cv_lib_pthread_main+set}" = set; then
    6041   echo $ECHO_N "(cached) $ECHO_C" >&6
    6042 else
    6043   ac_check_lib_save_LIBS=$LIBS
    6044 LIBS="-lpthread  $LIBS"
    6045 cat >conftest.$ac_ext <<_ACEOF
    6046 /* confdefs.h.  */
    6047 _ACEOF
    6048 cat confdefs.h >>conftest.$ac_ext
    6049 cat >>conftest.$ac_ext <<_ACEOF
    6050 /* end confdefs.h.  */
    6051 
    6052 
    6053 int
    6054 main ()
    6055 {
    6056 main ();
    6057   ;
    6058   return 0;
    6059 }
    6060 _ACEOF
    6061 rm -f conftest.$ac_objext conftest$ac_exeext
    6062 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    6063   (eval $ac_link) 2>conftest.er1
    6064   ac_status=$?
    6065   grep -v '^ *+' conftest.er1 >conftest.err
    6066   rm -f conftest.er1
    6067   cat conftest.err >&5
    6068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    6069   (exit $ac_status); } &&
    6070          { ac_try='test -z "$ac_c_werror_flag"
    6071                          || test ! -s conftest.err'
    6072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    6073   (eval $ac_try) 2>&5
    6074   ac_status=$?
    6075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    6076   (exit $ac_status); }; } &&
    6077          { ac_try='test -s conftest$ac_exeext'
    6078   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    6079   (eval $ac_try) 2>&5
    6080   ac_status=$?
    6081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    6082   (exit $ac_status); }; }; then
    6083   ac_cv_lib_pthread_main=yes
    6084 else
    6085   echo "$as_me: failed program was:" >&5
    6086 sed 's/^/| /' conftest.$ac_ext >&5
    6087 
    6088 ac_cv_lib_pthread_main=no
    6089 fi
    6090 rm -f conftest.err conftest.$ac_objext \
    6091       conftest$ac_exeext conftest.$ac_ext
    6092 LIBS=$ac_check_lib_save_LIBS
    6093 fi
    6094 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_main" >&5
    6095 echo "${ECHO_T}$ac_cv_lib_pthread_main" >&6
    6096 if test $ac_cv_lib_pthread_main = yes; then
    6097   FOUND_pthread=yes
    6098 fi
    6099 
    6100 if test "$FOUND_pthread" = "yes" ; then
    6101     LIBS="$LIBS -lpthread"
    6102 fi
    6103 
    6104 
    6105 
    6106 
    6107 # FIXME: Replace `main' with a function in `-lm':
    6108 
    6109 echo "$as_me:$LINENO: checking for main in -lm" >&5
    6110 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
    6111 if test "${ac_cv_lib_m_main+set}" = set; then
    6112   echo $ECHO_N "(cached) $ECHO_C" >&6
    6113 else
    6114   ac_check_lib_save_LIBS=$LIBS
    6115 LIBS="-lm  $LIBS"
    6116 cat >conftest.$ac_ext <<_ACEOF
    6117 /* confdefs.h.  */
    6118 _ACEOF
    6119 cat confdefs.h >>conftest.$ac_ext
    6120 cat >>conftest.$ac_ext <<_ACEOF
    6121 /* end confdefs.h.  */
    6122 
    6123 
    6124 int
    6125 main ()
    6126 {
    6127 main ();
    6128   ;
    6129   return 0;
    6130 }
    6131 _ACEOF
    6132 rm -f conftest.$ac_objext conftest$ac_exeext
    6133 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    6134   (eval $ac_link) 2>conftest.er1
    6135   ac_status=$?
    6136   grep -v '^ *+' conftest.er1 >conftest.err
    6137   rm -f conftest.er1
    6138   cat conftest.err >&5
    6139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    6140   (exit $ac_status); } &&
    6141          { ac_try='test -z "$ac_c_werror_flag"
    6142                          || test ! -s conftest.err'
    6143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    6144   (eval $ac_try) 2>&5
    6145   ac_status=$?
    6146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    6147   (exit $ac_status); }; } &&
    6148          { ac_try='test -s conftest$ac_exeext'
    6149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    6150   (eval $ac_try) 2>&5
    6151   ac_status=$?
    6152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    6153   (exit $ac_status); }; }; then
    6154   ac_cv_lib_m_main=yes
    6155 else
    6156   echo "$as_me: failed program was:" >&5
    6157 sed 's/^/| /' conftest.$ac_ext >&5
    6158 
    6159 ac_cv_lib_m_main=no
    6160 fi
    6161 rm -f conftest.err conftest.$ac_objext \
    6162       conftest$ac_exeext conftest.$ac_ext
    6163 LIBS=$ac_check_lib_save_LIBS
    6164 fi
    6165 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
    6166 echo "${ECHO_T}$ac_cv_lib_m_main" >&6
    6167 if test $ac_cv_lib_m_main = yes; then
    6168   cat >>confdefs.h <<_ACEOF
    6169 #define HAVE_LIBM 1
    6170 _ACEOF
    6171 
    6172   LIBS="-lm $LIBS"
    6173 
    6174 fi
    6175 
    6176 
    6177 LIBS="$LIBS `pkg-config --libs  gtk+-2.0`"
    6178 
    6179 
    6180 # Checks for header files.
    6181 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
    6182 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
    6183 if test "${ac_cv_header_stdc+set}" = set; then
    6184   echo $ECHO_N "(cached) $ECHO_C" >&6
    6185 else
    6186   cat >conftest.$ac_ext <<_ACEOF
    6187 /* confdefs.h.  */
    6188 _ACEOF
    6189 cat confdefs.h >>conftest.$ac_ext
    6190 cat >>conftest.$ac_ext <<_ACEOF
    6191 /* end confdefs.h.  */
    6192 #include <stdlib.h>
    6193 #include <stdarg.h>
    6194 #include <string.h>
    6195 #include <float.h>
    6196 
    6197 int
    6198 main ()
    6199 {
    6200 
    6201   ;
    6202   return 0;
    6203 }
    6204 _ACEOF
    6205 rm -f conftest.$ac_objext
    6206 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    6207   (eval $ac_compile) 2>conftest.er1
    6208   ac_status=$?
    6209   grep -v '^ *+' conftest.er1 >conftest.err
    6210   rm -f conftest.er1
    6211   cat conftest.err >&5
    6212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    6213   (exit $ac_status); } &&
    6214          { ac_try='test -z "$ac_c_werror_flag"
    6215                          || test ! -s conftest.err'
    6216   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    6217   (eval $ac_try) 2>&5
    6218   ac_status=$?
    6219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    6220   (exit $ac_status); }; } &&
    6221          { ac_try='test -s conftest.$ac_objext'
    6222   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    6223   (eval $ac_try) 2>&5
    6224   ac_status=$?
    6225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    6226   (exit $ac_status); }; }; then
    6227   ac_cv_header_stdc=yes
    6228 else
    6229   echo "$as_me: failed program was:" >&5
    6230 sed 's/^/| /' conftest.$ac_ext >&5
    6231 
    6232 ac_cv_header_stdc=no
    6233 fi
    6234 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    6235 
    6236 if test $ac_cv_header_stdc = yes; then
    6237   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    6238   cat >conftest.$ac_ext <<_ACEOF
    6239 /* confdefs.h.  */
    6240 _ACEOF
    6241 cat confdefs.h >>conftest.$ac_ext
    6242 cat >>conftest.$ac_ext <<_ACEOF
    6243 /* end confdefs.h.  */
    6244 #include <string.h>
    6245 
    6246 _ACEOF
    6247 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    6248   $EGREP "memchr" >/dev/null 2>&1; then
    6249   :
    6250 else
    6251   ac_cv_header_stdc=no
    6252 fi
    6253 rm -f conftest*
    6254 
    6255 fi
    6256 
    6257 if test $ac_cv_header_stdc = yes; then
    6258   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    6259   cat >conftest.$ac_ext <<_ACEOF
    6260 /* confdefs.h.  */
    6261 _ACEOF
    6262 cat confdefs.h >>conftest.$ac_ext
    6263 cat >>conftest.$ac_ext <<_ACEOF
    6264 /* end confdefs.h.  */
    6265 #include <stdlib.h>
    6266 
    6267 _ACEOF
    6268 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    6269   $EGREP "free" >/dev/null 2>&1; then
    6270   :
    6271 else
    6272   ac_cv_header_stdc=no
    6273 fi
    6274 rm -f conftest*
    6275 
    6276 fi
    6277 
    6278 if test $ac_cv_header_stdc = yes; then
    6279   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
    6280   if test "$cross_compiling" = yes; then
    6281   :
    6282 else
    6283   cat >conftest.$ac_ext <<_ACEOF
    6284 /* confdefs.h.  */
    6285 _ACEOF
    6286 cat confdefs.h >>conftest.$ac_ext
    6287 cat >>conftest.$ac_ext <<_ACEOF
    6288 /* end confdefs.h.  */
    6289 #include <ctype.h>
    6290 #if ((' ' & 0x0FF) == 0x020)
    6291 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
    6292 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
    6293 #else
    6294 # define ISLOWER(c) \
    6295                    (('a' <= (c) && (c) <= 'i') \
    6296                      || ('j' <= (c) && (c) <= 'r') \
    6297                      || ('s' <= (c) && (c) <= 'z'))
    6298 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
    6299 #endif
    6300 
    6301 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
    6302 int
    6303 main ()
    6304 {
    6305   int i;
    6306   for (i = 0; i < 256; i++)
    6307     if (XOR (islower (i), ISLOWER (i))
    6308         || toupper (i) != TOUPPER (i))
    6309       exit(2);
    6310   exit (0);
    6311 }
    6312 _ACEOF
    6313 rm -f conftest$ac_exeext
    6314 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    6315   (eval $ac_link) 2>&5
    6316   ac_status=$?
    6317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    6318   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    6319   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    6320   (eval $ac_try) 2>&5
    6321   ac_status=$?
    6322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    6323   (exit $ac_status); }; }; then
    6324   :
    6325 else
    6326   echo "$as_me: program exited with status $ac_status" >&5
    6327 echo "$as_me: failed program was:" >&5
    6328 sed 's/^/| /' conftest.$ac_ext >&5
    6329 
    6330 ( exit $ac_status )
    6331 ac_cv_header_stdc=no
    6332 fi
    6333 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
    6334 fi
    6335 fi
    6336 fi
    6337 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
    6338 echo "${ECHO_T}$ac_cv_header_stdc" >&6
    6339 if test $ac_cv_header_stdc = yes; then
    6340 
    6341 cat >>confdefs.h <<\_ACEOF
    6342 #define STDC_HEADERS 1
    6343 _ACEOF
    6344 
    6345 fi
    6346 
    6347 
    6348 
    6349 for ac_header in stdlib.h string.h
     5925
     5926
     5927
     5928
     5929## check for SDL_mixer
     5930# checking for SDL-Mixer-headers
     5931
     5932for ac_header in SDL/SDL_mixer.h
    63505933do
    63515934as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    64926075_ACEOF
    64936076
     6077else
     6078  { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
     6079echo "$as_me: error: cannot find SDL headers" >&2;}
     6080   { (exit 1); exit 1; }; }
    64946081fi
    64956082
     
    64976084
    64986085
    6499 # Checks for typedefs, structures, and compiler characteristics.
    6500 echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
    6501 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
    6502 if test "${ac_cv_header_stdbool_h+set}" = set; then
     6086
     6087#checking for libSDL_mixer
     6088    echo "$as_me:$LINENO: checking for main in -lSDL_mixer" >&5
     6089echo $ECHO_N "checking for main in -lSDL_mixer... $ECHO_C" >&6
     6090if test "${ac_cv_lib_SDL_mixer_main+set}" = set; then
    65036091  echo $ECHO_N "(cached) $ECHO_C" >&6
    65046092else
    6505   cat >conftest.$ac_ext <<_ACEOF
     6093  ac_check_lib_save_LIBS=$LIBS
     6094LIBS="-lSDL_mixer  $LIBS"
     6095cat >conftest.$ac_ext <<_ACEOF
    65066096/* confdefs.h.  */
    65076097_ACEOF
     
    65106100/* end confdefs.h.  */
    65116101
    6512 #include <stdbool.h>
    6513 #ifndef bool
    6514 # error bool is not defined
    6515 #endif
    6516 #ifndef false
    6517 # error false is not defined
    6518 #endif
    6519 #if false
    6520 # error false is not 0
    6521 #endif
    6522 #ifndef true
    6523 # error true is not defined
    6524 #endif
    6525 #if true != 1
    6526 # error true is not 1
    6527 #endif
    6528 #ifndef __bool_true_false_are_defined
    6529 # error __bool_true_false_are_defined is not defined
    6530 #endif
    6531 
    6532         struct s { _Bool s: 1; _Bool t; } s;
    6533 
    6534         char a[true == 1 ? 1 : -1];
    6535         char b[false == 0 ? 1 : -1];
    6536         char c[__bool_true_false_are_defined == 1 ? 1 : -1];
    6537         char d[(bool) -0.5 == true ? 1 : -1];
    6538         bool e = &s;
    6539         char f[(_Bool) -0.0 == false ? 1 : -1];
    6540         char g[true];
    6541         char h[sizeof (_Bool)];
    6542         char i[sizeof s.t];
    65436102
    65446103int
    65456104main ()
    65466105{
    6547  return !a + !b + !c + !d + !e + !f + !g + !h + !i;
     6106main ();
    65486107  ;
    65496108  return 0;
    65506109}
    65516110_ACEOF
    6552 rm -f conftest.$ac_objext
    6553 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    6554   (eval $ac_compile) 2>conftest.er1
     6111rm -f conftest.$ac_objext conftest$ac_exeext
     6112if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     6113  (eval $ac_link) 2>conftest.er1
    65556114  ac_status=$?
    65566115  grep -v '^ *+' conftest.er1 >conftest.err
     
    65666125  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    65676126  (exit $ac_status); }; } &&
    6568          { ac_try='test -s conftest.$ac_objext'
     6127         { ac_try='test -s conftest$ac_exeext'
    65696128  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    65706129  (eval $ac_try) 2>&5
     
    65726131  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    65736132  (exit $ac_status); }; }; then
    6574   ac_cv_header_stdbool_h=yes
     6133  ac_cv_lib_SDL_mixer_main=yes
    65756134else
    65766135  echo "$as_me: failed program was:" >&5
    65776136sed 's/^/| /' conftest.$ac_ext >&5
    65786137
    6579 ac_cv_header_stdbool_h=no
    6580 fi
    6581 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    6582 fi
    6583 echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
    6584 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
    6585 echo "$as_me:$LINENO: checking for _Bool" >&5
    6586 echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
    6587 if test "${ac_cv_type__Bool+set}" = set; then
    6588   echo $ECHO_N "(cached) $ECHO_C" >&6
    6589 else
    6590   cat >conftest.$ac_ext <<_ACEOF
    6591 /* confdefs.h.  */
    6592 _ACEOF
    6593 cat confdefs.h >>conftest.$ac_ext
    6594 cat >>conftest.$ac_ext <<_ACEOF
    6595 /* end confdefs.h.  */
    6596 $ac_includes_default
    6597 int
    6598 main ()
    6599 {
    6600 if ((_Bool *) 0)
    6601   return 0;
    6602 if (sizeof (_Bool))
    6603   return 0;
    6604   ;
    6605   return 0;
    6606 }
    6607 _ACEOF
    6608 rm -f conftest.$ac_objext
    6609 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    6610   (eval $ac_compile) 2>conftest.er1
    6611   ac_status=$?
    6612   grep -v '^ *+' conftest.er1 >conftest.err
    6613   rm -f conftest.er1
    6614   cat conftest.err >&5
    6615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    6616   (exit $ac_status); } &&
    6617          { ac_try='test -z "$ac_c_werror_flag"
    6618                          || test ! -s conftest.err'
    6619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    6620   (eval $ac_try) 2>&5
    6621   ac_status=$?
    6622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    6623   (exit $ac_status); }; } &&
    6624          { ac_try='test -s conftest.$ac_objext'
    6625   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    6626   (eval $ac_try) 2>&5
    6627   ac_status=$?
    6628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    6629   (exit $ac_status); }; }; then
    6630   ac_cv_type__Bool=yes
    6631 else
    6632   echo "$as_me: failed program was:" >&5
    6633 sed 's/^/| /' conftest.$ac_ext >&5
    6634 
    6635 ac_cv_type__Bool=no
    6636 fi
    6637 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    6638 fi
    6639 echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
    6640 echo "${ECHO_T}$ac_cv_type__Bool" >&6
    6641 if test $ac_cv_type__Bool = yes; then
    6642 
    6643 cat >>confdefs.h <<_ACEOF
    6644 #define HAVE__BOOL 1
    6645 _ACEOF
    6646 
    6647 
    6648 fi
    6649 
    6650 if test $ac_cv_header_stdbool_h = yes; then
    6651 
    6652 cat >>confdefs.h <<\_ACEOF
    6653 #define HAVE_STDBOOL_H 1
    6654 _ACEOF
    6655 
    6656 fi
    6657 
    6658 
    6659 # Checks for library functions.
    6660 
    6661 for ac_header in stdlib.h
     6138ac_cv_lib_SDL_mixer_main=no
     6139fi
     6140rm -f conftest.err conftest.$ac_objext \
     6141      conftest$ac_exeext conftest.$ac_ext
     6142LIBS=$ac_check_lib_save_LIBS
     6143fi
     6144echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_mixer_main" >&5
     6145echo "${ECHO_T}$ac_cv_lib_SDL_mixer_main" >&6
     6146if test $ac_cv_lib_SDL_mixer_main = yes; then
     6147  FOUND_SDL_mixer=yes
     6148fi
     6149
     6150    if test "$FOUND_SDL_mixer" = "yes" ; then
     6151       LIBS="$LIBS -lSDL_mixer"
     6152    else
     6153        echo "------------------"
     6154        echo "SDL Mixer library not found."
     6155        echo "please install the SDL Mixer library, which can be found at http://www.libsdl.org"
     6156        echo "------------------"
     6157        exit 1
     6158    fi
     6159
     6160
     6161## check for SDL_Image
     6162if test "$def_sdl_image" = "yes"; then
     6163# checking for SDL_image-headers
     6164
     6165for ac_header in SDL/SDL_image.h
    66626166do
    66636167as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    68046308_ACEOF
    68056309
     6310else
     6311  echo "sdl_image not found. falling back to other options"; def_sdl_image=no
     6312fi
     6313
     6314done
     6315
     6316fi
     6317if test "$def_sdl_image" = "yes"; then
     6318# checking for SDL_image-lib
     6319  echo "$as_me:$LINENO: checking for main in -lSDL_image" >&5
     6320echo $ECHO_N "checking for main in -lSDL_image... $ECHO_C" >&6
     6321if test "${ac_cv_lib_SDL_image_main+set}" = set; then
     6322  echo $ECHO_N "(cached) $ECHO_C" >&6
     6323else
     6324  ac_check_lib_save_LIBS=$LIBS
     6325LIBS="-lSDL_image  $LIBS"
     6326cat >conftest.$ac_ext <<_ACEOF
     6327/* confdefs.h.  */
     6328_ACEOF
     6329cat confdefs.h >>conftest.$ac_ext
     6330cat >>conftest.$ac_ext <<_ACEOF
     6331/* end confdefs.h.  */
     6332
     6333
     6334int
     6335main ()
     6336{
     6337main ();
     6338  ;
     6339  return 0;
     6340}
     6341_ACEOF
     6342rm -f conftest.$ac_objext conftest$ac_exeext
     6343if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     6344  (eval $ac_link) 2>conftest.er1
     6345  ac_status=$?
     6346  grep -v '^ *+' conftest.er1 >conftest.err
     6347  rm -f conftest.er1
     6348  cat conftest.err >&5
     6349  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6350  (exit $ac_status); } &&
     6351         { ac_try='test -z "$ac_c_werror_flag"
     6352                         || test ! -s conftest.err'
     6353  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6354  (eval $ac_try) 2>&5
     6355  ac_status=$?
     6356  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6357  (exit $ac_status); }; } &&
     6358         { ac_try='test -s conftest$ac_exeext'
     6359  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6360  (eval $ac_try) 2>&5
     6361  ac_status=$?
     6362  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6363  (exit $ac_status); }; }; then
     6364  ac_cv_lib_SDL_image_main=yes
     6365else
     6366  echo "$as_me: failed program was:" >&5
     6367sed 's/^/| /' conftest.$ac_ext >&5
     6368
     6369ac_cv_lib_SDL_image_main=no
     6370fi
     6371rm -f conftest.err conftest.$ac_objext \
     6372      conftest$ac_exeext conftest.$ac_ext
     6373LIBS=$ac_check_lib_save_LIBS
     6374fi
     6375echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_image_main" >&5
     6376echo "${ECHO_T}$ac_cv_lib_SDL_image_main" >&6
     6377if test $ac_cv_lib_SDL_image_main = yes; then
     6378  FOUND_SDL_image=yes
     6379fi
     6380
     6381     if test "$FOUND_SDL_image" = "yes" ; then
     6382       LIBS="$LIBS -lSDL_image"
     6383     else
     6384        echo "------------------"
     6385        echo "SDL_image library not found."
     6386        echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"
     6387        echo "------------------"
     6388        exit -1
     6389     fi
     6390fi
     6391
     6392
     6393if test "$def_sdl_image" = "no"; then
     6394 ## checking for libjpeg
     6395
     6396for ac_header in jpeglib.h
     6397do
     6398as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     6399if eval "test \"\${$as_ac_Header+set}\" = set"; then
     6400  echo "$as_me:$LINENO: checking for $ac_header" >&5
     6401echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     6402if eval "test \"\${$as_ac_Header+set}\" = set"; then
     6403  echo $ECHO_N "(cached) $ECHO_C" >&6
     6404fi
     6405echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     6406echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     6407else
     6408  # Is the header compilable?
     6409echo "$as_me:$LINENO: checking $ac_header usability" >&5
     6410echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     6411cat >conftest.$ac_ext <<_ACEOF
     6412/* confdefs.h.  */
     6413_ACEOF
     6414cat confdefs.h >>conftest.$ac_ext
     6415cat >>conftest.$ac_ext <<_ACEOF
     6416/* end confdefs.h.  */
     6417$ac_includes_default
     6418#include <$ac_header>
     6419_ACEOF
     6420rm -f conftest.$ac_objext
     6421if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     6422  (eval $ac_compile) 2>conftest.er1
     6423  ac_status=$?
     6424  grep -v '^ *+' conftest.er1 >conftest.err
     6425  rm -f conftest.er1
     6426  cat conftest.err >&5
     6427  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6428  (exit $ac_status); } &&
     6429         { ac_try='test -z "$ac_c_werror_flag"
     6430                         || test ! -s conftest.err'
     6431  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6432  (eval $ac_try) 2>&5
     6433  ac_status=$?
     6434  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6435  (exit $ac_status); }; } &&
     6436         { ac_try='test -s conftest.$ac_objext'
     6437  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6438  (eval $ac_try) 2>&5
     6439  ac_status=$?
     6440  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6441  (exit $ac_status); }; }; then
     6442  ac_header_compiler=yes
     6443else
     6444  echo "$as_me: failed program was:" >&5
     6445sed 's/^/| /' conftest.$ac_ext >&5
     6446
     6447ac_header_compiler=no
     6448fi
     6449rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     6450echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     6451echo "${ECHO_T}$ac_header_compiler" >&6
     6452
     6453# Is the header present?
     6454echo "$as_me:$LINENO: checking $ac_header presence" >&5
     6455echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     6456cat >conftest.$ac_ext <<_ACEOF
     6457/* confdefs.h.  */
     6458_ACEOF
     6459cat confdefs.h >>conftest.$ac_ext
     6460cat >>conftest.$ac_ext <<_ACEOF
     6461/* end confdefs.h.  */
     6462#include <$ac_header>
     6463_ACEOF
     6464if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     6465  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     6466  ac_status=$?
     6467  grep -v '^ *+' conftest.er1 >conftest.err
     6468  rm -f conftest.er1
     6469  cat conftest.err >&5
     6470  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6471  (exit $ac_status); } >/dev/null; then
     6472  if test -s conftest.err; then
     6473    ac_cpp_err=$ac_c_preproc_warn_flag
     6474    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     6475  else
     6476    ac_cpp_err=
     6477  fi
     6478else
     6479  ac_cpp_err=yes
     6480fi
     6481if test -z "$ac_cpp_err"; then
     6482  ac_header_preproc=yes
     6483else
     6484  echo "$as_me: failed program was:" >&5
     6485sed 's/^/| /' conftest.$ac_ext >&5
     6486
     6487  ac_header_preproc=no
     6488fi
     6489rm -f conftest.err conftest.$ac_ext
     6490echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     6491echo "${ECHO_T}$ac_header_preproc" >&6
     6492
     6493# So?  What about this header?
     6494case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     6495  yes:no: )
     6496    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     6497echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     6498    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     6499echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     6500    ac_header_preproc=yes
     6501    ;;
     6502  no:yes:* )
     6503    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     6504echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     6505    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     6506echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     6507    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     6508echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     6509    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     6510echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     6511    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     6512echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     6513    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     6514echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     6515    (
     6516      cat <<\_ASBOX
     6517## ------------------------------------------- ##
     6518## Report this to orxonox-dev@mail.datacore.ch ##
     6519## ------------------------------------------- ##
     6520_ASBOX
     6521    ) |
     6522      sed "s/^/$as_me: WARNING:     /" >&2
     6523    ;;
     6524esac
     6525echo "$as_me:$LINENO: checking for $ac_header" >&5
     6526echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     6527if eval "test \"\${$as_ac_Header+set}\" = set"; then
     6528  echo $ECHO_N "(cached) $ECHO_C" >&6
     6529else
     6530  eval "$as_ac_Header=\$ac_header_preproc"
     6531fi
     6532echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     6533echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     6534
     6535fi
     6536if test `eval echo '${'$as_ac_Header'}'` = yes; then
     6537  cat >>confdefs.h <<_ACEOF
     6538#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     6539_ACEOF
     6540 jpegHeader="yes"
     6541else
     6542  jpegHeader="no"
     6543fi
     6544
     6545done
     6546
     6547 if test $jpegHeader = "no"; then
     6548        echo " not including jpeg."
     6549 else
     6550  echo "$as_me:$LINENO: checking for main in -ljpeg" >&5
     6551echo $ECHO_N "checking for main in -ljpeg... $ECHO_C" >&6
     6552if test "${ac_cv_lib_jpeg_main+set}" = set; then
     6553  echo $ECHO_N "(cached) $ECHO_C" >&6
     6554else
     6555  ac_check_lib_save_LIBS=$LIBS
     6556LIBS="-ljpeg  $LIBS"
     6557cat >conftest.$ac_ext <<_ACEOF
     6558/* confdefs.h.  */
     6559_ACEOF
     6560cat confdefs.h >>conftest.$ac_ext
     6561cat >>conftest.$ac_ext <<_ACEOF
     6562/* end confdefs.h.  */
     6563
     6564
     6565int
     6566main ()
     6567{
     6568main ();
     6569  ;
     6570  return 0;
     6571}
     6572_ACEOF
     6573rm -f conftest.$ac_objext conftest$ac_exeext
     6574if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     6575  (eval $ac_link) 2>conftest.er1
     6576  ac_status=$?
     6577  grep -v '^ *+' conftest.er1 >conftest.err
     6578  rm -f conftest.er1
     6579  cat conftest.err >&5
     6580  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6581  (exit $ac_status); } &&
     6582         { ac_try='test -z "$ac_c_werror_flag"
     6583                         || test ! -s conftest.err'
     6584  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6585  (eval $ac_try) 2>&5
     6586  ac_status=$?
     6587  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6588  (exit $ac_status); }; } &&
     6589         { ac_try='test -s conftest$ac_exeext'
     6590  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6591  (eval $ac_try) 2>&5
     6592  ac_status=$?
     6593  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6594  (exit $ac_status); }; }; then
     6595  ac_cv_lib_jpeg_main=yes
     6596else
     6597  echo "$as_me: failed program was:" >&5
     6598sed 's/^/| /' conftest.$ac_ext >&5
     6599
     6600ac_cv_lib_jpeg_main=no
     6601fi
     6602rm -f conftest.err conftest.$ac_objext \
     6603      conftest$ac_exeext conftest.$ac_ext
     6604LIBS=$ac_check_lib_save_LIBS
     6605fi
     6606echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_main" >&5
     6607echo "${ECHO_T}$ac_cv_lib_jpeg_main" >&6
     6608if test $ac_cv_lib_jpeg_main = yes; then
     6609  FOUND_jpeg=yes
     6610fi
     6611
     6612    if test "$FOUND_jpeg" = "yes" ; then
     6613      LIBS="$LIBS -ljpeg"
     6614    else
     6615         echo "------------------"
     6616         echo "jpeg library not found."
     6617         echo "please install the jpeg library from the Independent JPEG Group, which can be found at http://www.ijg.org"
     6618         echo "------------------"
     6619         exit -1
     6620    fi
     6621 fi
     6622
     6623 ## checking for libpng
     6624
     6625for ac_header in png.h
     6626do
     6627as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     6628if eval "test \"\${$as_ac_Header+set}\" = set"; then
     6629  echo "$as_me:$LINENO: checking for $ac_header" >&5
     6630echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     6631if eval "test \"\${$as_ac_Header+set}\" = set"; then
     6632  echo $ECHO_N "(cached) $ECHO_C" >&6
     6633fi
     6634echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     6635echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     6636else
     6637  # Is the header compilable?
     6638echo "$as_me:$LINENO: checking $ac_header usability" >&5
     6639echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     6640cat >conftest.$ac_ext <<_ACEOF
     6641/* confdefs.h.  */
     6642_ACEOF
     6643cat confdefs.h >>conftest.$ac_ext
     6644cat >>conftest.$ac_ext <<_ACEOF
     6645/* end confdefs.h.  */
     6646$ac_includes_default
     6647#include <$ac_header>
     6648_ACEOF
     6649rm -f conftest.$ac_objext
     6650if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     6651  (eval $ac_compile) 2>conftest.er1
     6652  ac_status=$?
     6653  grep -v '^ *+' conftest.er1 >conftest.err
     6654  rm -f conftest.er1
     6655  cat conftest.err >&5
     6656  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6657  (exit $ac_status); } &&
     6658         { ac_try='test -z "$ac_c_werror_flag"
     6659                         || test ! -s conftest.err'
     6660  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6661  (eval $ac_try) 2>&5
     6662  ac_status=$?
     6663  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6664  (exit $ac_status); }; } &&
     6665         { ac_try='test -s conftest.$ac_objext'
     6666  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6667  (eval $ac_try) 2>&5
     6668  ac_status=$?
     6669  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6670  (exit $ac_status); }; }; then
     6671  ac_header_compiler=yes
     6672else
     6673  echo "$as_me: failed program was:" >&5
     6674sed 's/^/| /' conftest.$ac_ext >&5
     6675
     6676ac_header_compiler=no
     6677fi
     6678rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     6679echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     6680echo "${ECHO_T}$ac_header_compiler" >&6
     6681
     6682# Is the header present?
     6683echo "$as_me:$LINENO: checking $ac_header presence" >&5
     6684echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     6685cat >conftest.$ac_ext <<_ACEOF
     6686/* confdefs.h.  */
     6687_ACEOF
     6688cat confdefs.h >>conftest.$ac_ext
     6689cat >>conftest.$ac_ext <<_ACEOF
     6690/* end confdefs.h.  */
     6691#include <$ac_header>
     6692_ACEOF
     6693if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     6694  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     6695  ac_status=$?
     6696  grep -v '^ *+' conftest.er1 >conftest.err
     6697  rm -f conftest.er1
     6698  cat conftest.err >&5
     6699  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6700  (exit $ac_status); } >/dev/null; then
     6701  if test -s conftest.err; then
     6702    ac_cpp_err=$ac_c_preproc_warn_flag
     6703    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     6704  else
     6705    ac_cpp_err=
     6706  fi
     6707else
     6708  ac_cpp_err=yes
     6709fi
     6710if test -z "$ac_cpp_err"; then
     6711  ac_header_preproc=yes
     6712else
     6713  echo "$as_me: failed program was:" >&5
     6714sed 's/^/| /' conftest.$ac_ext >&5
     6715
     6716  ac_header_preproc=no
     6717fi
     6718rm -f conftest.err conftest.$ac_ext
     6719echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     6720echo "${ECHO_T}$ac_header_preproc" >&6
     6721
     6722# So?  What about this header?
     6723case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     6724  yes:no: )
     6725    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     6726echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     6727    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     6728echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     6729    ac_header_preproc=yes
     6730    ;;
     6731  no:yes:* )
     6732    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     6733echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     6734    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     6735echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     6736    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     6737echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     6738    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     6739echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     6740    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     6741echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     6742    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     6743echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     6744    (
     6745      cat <<\_ASBOX
     6746## ------------------------------------------- ##
     6747## Report this to orxonox-dev@mail.datacore.ch ##
     6748## ------------------------------------------- ##
     6749_ASBOX
     6750    ) |
     6751      sed "s/^/$as_me: WARNING:     /" >&2
     6752    ;;
     6753esac
     6754echo "$as_me:$LINENO: checking for $ac_header" >&5
     6755echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     6756if eval "test \"\${$as_ac_Header+set}\" = set"; then
     6757  echo $ECHO_N "(cached) $ECHO_C" >&6
     6758else
     6759  eval "$as_ac_Header=\$ac_header_preproc"
     6760fi
     6761echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     6762echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     6763
     6764fi
     6765if test `eval echo '${'$as_ac_Header'}'` = yes; then
     6766  cat >>confdefs.h <<_ACEOF
     6767#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     6768_ACEOF
     6769 pngHeader="yes"
     6770else
     6771  pngHeader="no"
     6772fi
     6773
     6774done
     6775
     6776 if test $pngHeader = "no"; then
     6777        echo " not including png."
     6778 else
     6779  echo "$as_me:$LINENO: checking for main in -lpng" >&5
     6780echo $ECHO_N "checking for main in -lpng... $ECHO_C" >&6
     6781if test "${ac_cv_lib_png_main+set}" = set; then
     6782  echo $ECHO_N "(cached) $ECHO_C" >&6
     6783else
     6784  ac_check_lib_save_LIBS=$LIBS
     6785LIBS="-lpng  $LIBS"
     6786cat >conftest.$ac_ext <<_ACEOF
     6787/* confdefs.h.  */
     6788_ACEOF
     6789cat confdefs.h >>conftest.$ac_ext
     6790cat >>conftest.$ac_ext <<_ACEOF
     6791/* end confdefs.h.  */
     6792
     6793
     6794int
     6795main ()
     6796{
     6797main ();
     6798  ;
     6799  return 0;
     6800}
     6801_ACEOF
     6802rm -f conftest.$ac_objext conftest$ac_exeext
     6803if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     6804  (eval $ac_link) 2>conftest.er1
     6805  ac_status=$?
     6806  grep -v '^ *+' conftest.er1 >conftest.err
     6807  rm -f conftest.er1
     6808  cat conftest.err >&5
     6809  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6810  (exit $ac_status); } &&
     6811         { ac_try='test -z "$ac_c_werror_flag"
     6812                         || test ! -s conftest.err'
     6813  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6814  (eval $ac_try) 2>&5
     6815  ac_status=$?
     6816  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6817  (exit $ac_status); }; } &&
     6818         { ac_try='test -s conftest$ac_exeext'
     6819  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6820  (eval $ac_try) 2>&5
     6821  ac_status=$?
     6822  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6823  (exit $ac_status); }; }; then
     6824  ac_cv_lib_png_main=yes
     6825else
     6826  echo "$as_me: failed program was:" >&5
     6827sed 's/^/| /' conftest.$ac_ext >&5
     6828
     6829ac_cv_lib_png_main=no
     6830fi
     6831rm -f conftest.err conftest.$ac_objext \
     6832      conftest$ac_exeext conftest.$ac_ext
     6833LIBS=$ac_check_lib_save_LIBS
     6834fi
     6835echo "$as_me:$LINENO: result: $ac_cv_lib_png_main" >&5
     6836echo "${ECHO_T}$ac_cv_lib_png_main" >&6
     6837if test $ac_cv_lib_png_main = yes; then
     6838  FOUND_png=yes
     6839fi
     6840
     6841    if test "$FOUND_png" = "yes" ; then
     6842      LIBS="$LIBS -lpng"
     6843    else
     6844         echo "------------------"
     6845         echo "png library not found."
     6846         echo "please install the png library, which can be found at http://libpng.org/pub/png/libpng.html"
     6847         echo "------------------"
     6848         exit -1
     6849    fi
     6850 fi
     6851fi
     6852
     6853## checking for GTK
     6854if test "$def_gtk" = yes; then
     6855
     6856        #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
     6857        echo "$as_me:$LINENO: checking for gtk2.0" >&5
     6858echo $ECHO_N "checking for gtk2.0... $ECHO_C" >&6
     6859        if `pkg-config --exists gtk+-2.0`; then
     6860                echo "yes"
     6861                have_gtk2=yes
     6862                GTK2_LIBS=`pkg-config --libs gtk+-2.0`
     6863                GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0`
     6864
     6865cat >>confdefs.h <<_ACEOF
     6866#define HAVE_GTK2 1
     6867_ACEOF
     6868
     6869        else
     6870                echo "no"
     6871        fi
     6872
     6873fi
     6874
     6875
     6876
     6877
     6878if test x$have_gtk2 = xyes; then
     6879  HAVE_GTK2_TRUE=
     6880  HAVE_GTK2_FALSE='#'
     6881else
     6882  HAVE_GTK2_TRUE='#'
     6883  HAVE_GTK2_FALSE=
     6884fi
     6885
     6886
     6887
     6888
     6889#checking for pthread libs
     6890# AC_CHECK_LIB([pthread], [main], FOUND_pthread=yes)
     6891# if test "$FOUND_pthread" = "yes" ; then
     6892#    LIBS="$LIBS -lpthread"
     6893# fi
     6894
     6895
     6896# FIXME: Replace `main' with a function in `-lm':
     6897
     6898echo "$as_me:$LINENO: checking for main in -lm" >&5
     6899echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
     6900if test "${ac_cv_lib_m_main+set}" = set; then
     6901  echo $ECHO_N "(cached) $ECHO_C" >&6
     6902else
     6903  ac_check_lib_save_LIBS=$LIBS
     6904LIBS="-lm  $LIBS"
     6905cat >conftest.$ac_ext <<_ACEOF
     6906/* confdefs.h.  */
     6907_ACEOF
     6908cat confdefs.h >>conftest.$ac_ext
     6909cat >>conftest.$ac_ext <<_ACEOF
     6910/* end confdefs.h.  */
     6911
     6912
     6913int
     6914main ()
     6915{
     6916main ();
     6917  ;
     6918  return 0;
     6919}
     6920_ACEOF
     6921rm -f conftest.$ac_objext conftest$ac_exeext
     6922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     6923  (eval $ac_link) 2>conftest.er1
     6924  ac_status=$?
     6925  grep -v '^ *+' conftest.er1 >conftest.err
     6926  rm -f conftest.er1
     6927  cat conftest.err >&5
     6928  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6929  (exit $ac_status); } &&
     6930         { ac_try='test -z "$ac_c_werror_flag"
     6931                         || test ! -s conftest.err'
     6932  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6933  (eval $ac_try) 2>&5
     6934  ac_status=$?
     6935  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6936  (exit $ac_status); }; } &&
     6937         { ac_try='test -s conftest$ac_exeext'
     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); }; }; then
     6943  ac_cv_lib_m_main=yes
     6944else
     6945  echo "$as_me: failed program was:" >&5
     6946sed 's/^/| /' conftest.$ac_ext >&5
     6947
     6948ac_cv_lib_m_main=no
     6949fi
     6950rm -f conftest.err conftest.$ac_objext \
     6951      conftest$ac_exeext conftest.$ac_ext
     6952LIBS=$ac_check_lib_save_LIBS
     6953fi
     6954echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
     6955echo "${ECHO_T}$ac_cv_lib_m_main" >&6
     6956if test $ac_cv_lib_m_main = yes; then
     6957  cat >>confdefs.h <<_ACEOF
     6958#define HAVE_LIBM 1
     6959_ACEOF
     6960
     6961  LIBS="-lm $LIBS"
     6962
     6963fi
     6964
     6965
     6966
     6967# Checks for header files.
     6968echo "$as_me:$LINENO: checking for ANSI C header files" >&5
     6969echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
     6970if test "${ac_cv_header_stdc+set}" = set; then
     6971  echo $ECHO_N "(cached) $ECHO_C" >&6
     6972else
     6973  cat >conftest.$ac_ext <<_ACEOF
     6974/* confdefs.h.  */
     6975_ACEOF
     6976cat confdefs.h >>conftest.$ac_ext
     6977cat >>conftest.$ac_ext <<_ACEOF
     6978/* end confdefs.h.  */
     6979#include <stdlib.h>
     6980#include <stdarg.h>
     6981#include <string.h>
     6982#include <float.h>
     6983
     6984int
     6985main ()
     6986{
     6987
     6988  ;
     6989  return 0;
     6990}
     6991_ACEOF
     6992rm -f conftest.$ac_objext
     6993if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     6994  (eval $ac_compile) 2>conftest.er1
     6995  ac_status=$?
     6996  grep -v '^ *+' conftest.er1 >conftest.err
     6997  rm -f conftest.er1
     6998  cat conftest.err >&5
     6999  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7000  (exit $ac_status); } &&
     7001         { ac_try='test -z "$ac_c_werror_flag"
     7002                         || test ! -s conftest.err'
     7003  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7004  (eval $ac_try) 2>&5
     7005  ac_status=$?
     7006  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7007  (exit $ac_status); }; } &&
     7008         { ac_try='test -s conftest.$ac_objext'
     7009  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7010  (eval $ac_try) 2>&5
     7011  ac_status=$?
     7012  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7013  (exit $ac_status); }; }; then
     7014  ac_cv_header_stdc=yes
     7015else
     7016  echo "$as_me: failed program was:" >&5
     7017sed 's/^/| /' conftest.$ac_ext >&5
     7018
     7019ac_cv_header_stdc=no
     7020fi
     7021rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     7022
     7023if test $ac_cv_header_stdc = yes; then
     7024  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
     7025  cat >conftest.$ac_ext <<_ACEOF
     7026/* confdefs.h.  */
     7027_ACEOF
     7028cat confdefs.h >>conftest.$ac_ext
     7029cat >>conftest.$ac_ext <<_ACEOF
     7030/* end confdefs.h.  */
     7031#include <string.h>
     7032
     7033_ACEOF
     7034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     7035  $EGREP "memchr" >/dev/null 2>&1; then
     7036  :
     7037else
     7038  ac_cv_header_stdc=no
     7039fi
     7040rm -f conftest*
     7041
     7042fi
     7043
     7044if test $ac_cv_header_stdc = yes; then
     7045  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
     7046  cat >conftest.$ac_ext <<_ACEOF
     7047/* confdefs.h.  */
     7048_ACEOF
     7049cat confdefs.h >>conftest.$ac_ext
     7050cat >>conftest.$ac_ext <<_ACEOF
     7051/* end confdefs.h.  */
     7052#include <stdlib.h>
     7053
     7054_ACEOF
     7055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     7056  $EGREP "free" >/dev/null 2>&1; then
     7057  :
     7058else
     7059  ac_cv_header_stdc=no
     7060fi
     7061rm -f conftest*
     7062
     7063fi
     7064
     7065if test $ac_cv_header_stdc = yes; then
     7066  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
     7067  if test "$cross_compiling" = yes; then
     7068  :
     7069else
     7070  cat >conftest.$ac_ext <<_ACEOF
     7071/* confdefs.h.  */
     7072_ACEOF
     7073cat confdefs.h >>conftest.$ac_ext
     7074cat >>conftest.$ac_ext <<_ACEOF
     7075/* end confdefs.h.  */
     7076#include <ctype.h>
     7077#if ((' ' & 0x0FF) == 0x020)
     7078# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
     7079# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
     7080#else
     7081# define ISLOWER(c) \
     7082                   (('a' <= (c) && (c) <= 'i') \
     7083                     || ('j' <= (c) && (c) <= 'r') \
     7084                     || ('s' <= (c) && (c) <= 'z'))
     7085# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
     7086#endif
     7087
     7088#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
     7089int
     7090main ()
     7091{
     7092  int i;
     7093  for (i = 0; i < 256; i++)
     7094    if (XOR (islower (i), ISLOWER (i))
     7095        || toupper (i) != TOUPPER (i))
     7096      exit(2);
     7097  exit (0);
     7098}
     7099_ACEOF
     7100rm -f conftest$ac_exeext
     7101if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     7102  (eval $ac_link) 2>&5
     7103  ac_status=$?
     7104  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7105  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
     7106  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7107  (eval $ac_try) 2>&5
     7108  ac_status=$?
     7109  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7110  (exit $ac_status); }; }; then
     7111  :
     7112else
     7113  echo "$as_me: program exited with status $ac_status" >&5
     7114echo "$as_me: failed program was:" >&5
     7115sed 's/^/| /' conftest.$ac_ext >&5
     7116
     7117( exit $ac_status )
     7118ac_cv_header_stdc=no
     7119fi
     7120rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
     7121fi
     7122fi
     7123fi
     7124echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
     7125echo "${ECHO_T}$ac_cv_header_stdc" >&6
     7126if test $ac_cv_header_stdc = yes; then
     7127
     7128cat >>confdefs.h <<\_ACEOF
     7129#define STDC_HEADERS 1
     7130_ACEOF
     7131
     7132fi
     7133
     7134
     7135
     7136for ac_header in stdlib.h string.h
     7137do
     7138as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     7139if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7140  echo "$as_me:$LINENO: checking for $ac_header" >&5
     7141echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     7142if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7143  echo $ECHO_N "(cached) $ECHO_C" >&6
     7144fi
     7145echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     7146echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     7147else
     7148  # Is the header compilable?
     7149echo "$as_me:$LINENO: checking $ac_header usability" >&5
     7150echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     7151cat >conftest.$ac_ext <<_ACEOF
     7152/* confdefs.h.  */
     7153_ACEOF
     7154cat confdefs.h >>conftest.$ac_ext
     7155cat >>conftest.$ac_ext <<_ACEOF
     7156/* end confdefs.h.  */
     7157$ac_includes_default
     7158#include <$ac_header>
     7159_ACEOF
     7160rm -f conftest.$ac_objext
     7161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     7162  (eval $ac_compile) 2>conftest.er1
     7163  ac_status=$?
     7164  grep -v '^ *+' conftest.er1 >conftest.err
     7165  rm -f conftest.er1
     7166  cat conftest.err >&5
     7167  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7168  (exit $ac_status); } &&
     7169         { ac_try='test -z "$ac_c_werror_flag"
     7170                         || test ! -s conftest.err'
     7171  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7172  (eval $ac_try) 2>&5
     7173  ac_status=$?
     7174  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7175  (exit $ac_status); }; } &&
     7176         { ac_try='test -s conftest.$ac_objext'
     7177  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7178  (eval $ac_try) 2>&5
     7179  ac_status=$?
     7180  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7181  (exit $ac_status); }; }; then
     7182  ac_header_compiler=yes
     7183else
     7184  echo "$as_me: failed program was:" >&5
     7185sed 's/^/| /' conftest.$ac_ext >&5
     7186
     7187ac_header_compiler=no
     7188fi
     7189rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     7190echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     7191echo "${ECHO_T}$ac_header_compiler" >&6
     7192
     7193# Is the header present?
     7194echo "$as_me:$LINENO: checking $ac_header presence" >&5
     7195echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     7196cat >conftest.$ac_ext <<_ACEOF
     7197/* confdefs.h.  */
     7198_ACEOF
     7199cat confdefs.h >>conftest.$ac_ext
     7200cat >>conftest.$ac_ext <<_ACEOF
     7201/* end confdefs.h.  */
     7202#include <$ac_header>
     7203_ACEOF
     7204if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     7205  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     7206  ac_status=$?
     7207  grep -v '^ *+' conftest.er1 >conftest.err
     7208  rm -f conftest.er1
     7209  cat conftest.err >&5
     7210  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7211  (exit $ac_status); } >/dev/null; then
     7212  if test -s conftest.err; then
     7213    ac_cpp_err=$ac_c_preproc_warn_flag
     7214    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     7215  else
     7216    ac_cpp_err=
     7217  fi
     7218else
     7219  ac_cpp_err=yes
     7220fi
     7221if test -z "$ac_cpp_err"; then
     7222  ac_header_preproc=yes
     7223else
     7224  echo "$as_me: failed program was:" >&5
     7225sed 's/^/| /' conftest.$ac_ext >&5
     7226
     7227  ac_header_preproc=no
     7228fi
     7229rm -f conftest.err conftest.$ac_ext
     7230echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     7231echo "${ECHO_T}$ac_header_preproc" >&6
     7232
     7233# So?  What about this header?
     7234case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     7235  yes:no: )
     7236    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     7237echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     7238    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     7239echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     7240    ac_header_preproc=yes
     7241    ;;
     7242  no:yes:* )
     7243    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     7244echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     7245    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     7246echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     7247    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     7248echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     7249    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     7250echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     7251    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     7252echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     7253    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     7254echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     7255    (
     7256      cat <<\_ASBOX
     7257## ------------------------------------------- ##
     7258## Report this to orxonox-dev@mail.datacore.ch ##
     7259## ------------------------------------------- ##
     7260_ASBOX
     7261    ) |
     7262      sed "s/^/$as_me: WARNING:     /" >&2
     7263    ;;
     7264esac
     7265echo "$as_me:$LINENO: checking for $ac_header" >&5
     7266echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     7267if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7268  echo $ECHO_N "(cached) $ECHO_C" >&6
     7269else
     7270  eval "$as_ac_Header=\$ac_header_preproc"
     7271fi
     7272echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     7273echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     7274
     7275fi
     7276if test `eval echo '${'$as_ac_Header'}'` = yes; then
     7277  cat >>confdefs.h <<_ACEOF
     7278#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     7279_ACEOF
     7280
     7281fi
     7282
     7283done
     7284
     7285
     7286# Checks for typedefs, structures, and compiler characteristics.
     7287echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
     7288echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
     7289if test "${ac_cv_header_stdbool_h+set}" = set; then
     7290  echo $ECHO_N "(cached) $ECHO_C" >&6
     7291else
     7292  cat >conftest.$ac_ext <<_ACEOF
     7293/* confdefs.h.  */
     7294_ACEOF
     7295cat confdefs.h >>conftest.$ac_ext
     7296cat >>conftest.$ac_ext <<_ACEOF
     7297/* end confdefs.h.  */
     7298
     7299#include <stdbool.h>
     7300#ifndef bool
     7301# error bool is not defined
     7302#endif
     7303#ifndef false
     7304# error false is not defined
     7305#endif
     7306#if false
     7307# error false is not 0
     7308#endif
     7309#ifndef true
     7310# error true is not defined
     7311#endif
     7312#if true != 1
     7313# error true is not 1
     7314#endif
     7315#ifndef __bool_true_false_are_defined
     7316# error __bool_true_false_are_defined is not defined
     7317#endif
     7318
     7319        struct s { _Bool s: 1; _Bool t; } s;
     7320
     7321        char a[true == 1 ? 1 : -1];
     7322        char b[false == 0 ? 1 : -1];
     7323        char c[__bool_true_false_are_defined == 1 ? 1 : -1];
     7324        char d[(bool) -0.5 == true ? 1 : -1];
     7325        bool e = &s;
     7326        char f[(_Bool) -0.0 == false ? 1 : -1];
     7327        char g[true];
     7328        char h[sizeof (_Bool)];
     7329        char i[sizeof s.t];
     7330
     7331int
     7332main ()
     7333{
     7334 return !a + !b + !c + !d + !e + !f + !g + !h + !i;
     7335  ;
     7336  return 0;
     7337}
     7338_ACEOF
     7339rm -f conftest.$ac_objext
     7340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     7341  (eval $ac_compile) 2>conftest.er1
     7342  ac_status=$?
     7343  grep -v '^ *+' conftest.er1 >conftest.err
     7344  rm -f conftest.er1
     7345  cat conftest.err >&5
     7346  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7347  (exit $ac_status); } &&
     7348         { ac_try='test -z "$ac_c_werror_flag"
     7349                         || test ! -s conftest.err'
     7350  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7351  (eval $ac_try) 2>&5
     7352  ac_status=$?
     7353  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7354  (exit $ac_status); }; } &&
     7355         { ac_try='test -s conftest.$ac_objext'
     7356  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7357  (eval $ac_try) 2>&5
     7358  ac_status=$?
     7359  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7360  (exit $ac_status); }; }; then
     7361  ac_cv_header_stdbool_h=yes
     7362else
     7363  echo "$as_me: failed program was:" >&5
     7364sed 's/^/| /' conftest.$ac_ext >&5
     7365
     7366ac_cv_header_stdbool_h=no
     7367fi
     7368rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     7369fi
     7370echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
     7371echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
     7372echo "$as_me:$LINENO: checking for _Bool" >&5
     7373echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
     7374if test "${ac_cv_type__Bool+set}" = set; then
     7375  echo $ECHO_N "(cached) $ECHO_C" >&6
     7376else
     7377  cat >conftest.$ac_ext <<_ACEOF
     7378/* confdefs.h.  */
     7379_ACEOF
     7380cat confdefs.h >>conftest.$ac_ext
     7381cat >>conftest.$ac_ext <<_ACEOF
     7382/* end confdefs.h.  */
     7383$ac_includes_default
     7384int
     7385main ()
     7386{
     7387if ((_Bool *) 0)
     7388  return 0;
     7389if (sizeof (_Bool))
     7390  return 0;
     7391  ;
     7392  return 0;
     7393}
     7394_ACEOF
     7395rm -f conftest.$ac_objext
     7396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     7397  (eval $ac_compile) 2>conftest.er1
     7398  ac_status=$?
     7399  grep -v '^ *+' conftest.er1 >conftest.err
     7400  rm -f conftest.er1
     7401  cat conftest.err >&5
     7402  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7403  (exit $ac_status); } &&
     7404         { ac_try='test -z "$ac_c_werror_flag"
     7405                         || test ! -s conftest.err'
     7406  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7407  (eval $ac_try) 2>&5
     7408  ac_status=$?
     7409  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7410  (exit $ac_status); }; } &&
     7411         { ac_try='test -s conftest.$ac_objext'
     7412  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7413  (eval $ac_try) 2>&5
     7414  ac_status=$?
     7415  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7416  (exit $ac_status); }; }; then
     7417  ac_cv_type__Bool=yes
     7418else
     7419  echo "$as_me: failed program was:" >&5
     7420sed 's/^/| /' conftest.$ac_ext >&5
     7421
     7422ac_cv_type__Bool=no
     7423fi
     7424rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     7425fi
     7426echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
     7427echo "${ECHO_T}$ac_cv_type__Bool" >&6
     7428if test $ac_cv_type__Bool = yes; then
     7429
     7430cat >>confdefs.h <<_ACEOF
     7431#define HAVE__BOOL 1
     7432_ACEOF
     7433
     7434
     7435fi
     7436
     7437if test $ac_cv_header_stdbool_h = yes; then
     7438
     7439cat >>confdefs.h <<\_ACEOF
     7440#define HAVE_STDBOOL_H 1
     7441_ACEOF
     7442
     7443fi
     7444
     7445
     7446# Checks for library functions.
     7447
     7448for ac_header in stdlib.h
     7449do
     7450as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     7451if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7452  echo "$as_me:$LINENO: checking for $ac_header" >&5
     7453echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     7454if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7455  echo $ECHO_N "(cached) $ECHO_C" >&6
     7456fi
     7457echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     7458echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     7459else
     7460  # Is the header compilable?
     7461echo "$as_me:$LINENO: checking $ac_header usability" >&5
     7462echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     7463cat >conftest.$ac_ext <<_ACEOF
     7464/* confdefs.h.  */
     7465_ACEOF
     7466cat confdefs.h >>conftest.$ac_ext
     7467cat >>conftest.$ac_ext <<_ACEOF
     7468/* end confdefs.h.  */
     7469$ac_includes_default
     7470#include <$ac_header>
     7471_ACEOF
     7472rm -f conftest.$ac_objext
     7473if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     7474  (eval $ac_compile) 2>conftest.er1
     7475  ac_status=$?
     7476  grep -v '^ *+' conftest.er1 >conftest.err
     7477  rm -f conftest.er1
     7478  cat conftest.err >&5
     7479  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7480  (exit $ac_status); } &&
     7481         { ac_try='test -z "$ac_c_werror_flag"
     7482                         || test ! -s conftest.err'
     7483  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7484  (eval $ac_try) 2>&5
     7485  ac_status=$?
     7486  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7487  (exit $ac_status); }; } &&
     7488         { ac_try='test -s conftest.$ac_objext'
     7489  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7490  (eval $ac_try) 2>&5
     7491  ac_status=$?
     7492  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7493  (exit $ac_status); }; }; then
     7494  ac_header_compiler=yes
     7495else
     7496  echo "$as_me: failed program was:" >&5
     7497sed 's/^/| /' conftest.$ac_ext >&5
     7498
     7499ac_header_compiler=no
     7500fi
     7501rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     7502echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     7503echo "${ECHO_T}$ac_header_compiler" >&6
     7504
     7505# Is the header present?
     7506echo "$as_me:$LINENO: checking $ac_header presence" >&5
     7507echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     7508cat >conftest.$ac_ext <<_ACEOF
     7509/* confdefs.h.  */
     7510_ACEOF
     7511cat confdefs.h >>conftest.$ac_ext
     7512cat >>conftest.$ac_ext <<_ACEOF
     7513/* end confdefs.h.  */
     7514#include <$ac_header>
     7515_ACEOF
     7516if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     7517  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     7518  ac_status=$?
     7519  grep -v '^ *+' conftest.er1 >conftest.err
     7520  rm -f conftest.er1
     7521  cat conftest.err >&5
     7522  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7523  (exit $ac_status); } >/dev/null; then
     7524  if test -s conftest.err; then
     7525    ac_cpp_err=$ac_c_preproc_warn_flag
     7526    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     7527  else
     7528    ac_cpp_err=
     7529  fi
     7530else
     7531  ac_cpp_err=yes
     7532fi
     7533if test -z "$ac_cpp_err"; then
     7534  ac_header_preproc=yes
     7535else
     7536  echo "$as_me: failed program was:" >&5
     7537sed 's/^/| /' conftest.$ac_ext >&5
     7538
     7539  ac_header_preproc=no
     7540fi
     7541rm -f conftest.err conftest.$ac_ext
     7542echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     7543echo "${ECHO_T}$ac_header_preproc" >&6
     7544
     7545# So?  What about this header?
     7546case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     7547  yes:no: )
     7548    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     7549echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     7550    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     7551echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     7552    ac_header_preproc=yes
     7553    ;;
     7554  no:yes:* )
     7555    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     7556echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     7557    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     7558echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     7559    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     7560echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     7561    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     7562echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     7563    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     7564echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     7565    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     7566echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     7567    (
     7568      cat <<\_ASBOX
     7569## ------------------------------------------- ##
     7570## Report this to orxonox-dev@mail.datacore.ch ##
     7571## ------------------------------------------- ##
     7572_ASBOX
     7573    ) |
     7574      sed "s/^/$as_me: WARNING:     /" >&2
     7575    ;;
     7576esac
     7577echo "$as_me:$LINENO: checking for $ac_header" >&5
     7578echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     7579if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7580  echo $ECHO_N "(cached) $ECHO_C" >&6
     7581else
     7582  eval "$as_ac_Header=\$ac_header_preproc"
     7583fi
     7584echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     7585echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     7586
     7587fi
     7588if test `eval echo '${'$as_ac_Header'}'` = yes; then
     7589  cat >>confdefs.h <<_ACEOF
     7590#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     7591_ACEOF
     7592
    68067593fi
    68077594
     
    69937780
    69947781
    6995                                                   ac_config_files="$ac_config_files Makefile console/Makefile gui/Makefile src/Makefile importer/Makefile"
     7782                                                  ac_config_files="$ac_config_files Makefile src/console/Makefile src/gui/Makefile src/Makefile src/importer/Makefile"
    69967783
    69977784cat >confcache <<\_ACEOF
     
    71047891Usually this means the macro was only invoked conditionally." >&5
    71057892echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
     7893Usually this means the macro was only invoked conditionally." >&2;}
     7894   { (exit 1); exit 1; }; }
     7895fi
     7896if test -z "${DOXYGEN_TRUE}" && test -z "${DOXYGEN_FALSE}"; then
     7897  { { echo "$as_me:$LINENO: error: conditional \"DOXYGEN\" was never defined.
     7898Usually this means the macro was only invoked conditionally." >&5
     7899echo "$as_me: error: conditional \"DOXYGEN\" was never defined.
     7900Usually this means the macro was only invoked conditionally." >&2;}
     7901   { (exit 1); exit 1; }; }
     7902fi
     7903if test -z "${HAVE_GTK2_TRUE}" && test -z "${HAVE_GTK2_FALSE}"; then
     7904  { { echo "$as_me:$LINENO: error: conditional \"HAVE_GTK2\" was never defined.
     7905Usually this means the macro was only invoked conditionally." >&5
     7906echo "$as_me: error: conditional \"HAVE_GTK2\" was never defined.
    71067907Usually this means the macro was only invoked conditionally." >&2;}
    71077908   { (exit 1); exit 1; }; }
     
    73788179cat >&5 <<_CSEOF
    73798180
    7380 This file was extended by orxonox $as_me 0.1-pre-alpha, which was
     8181This file was extended by orxonox $as_me 0.2.0_alpha-r1, which was
    73818182generated by GNU Autoconf 2.59.  Invocation command line was
    73828183
     
    74418242cat >>$CONFIG_STATUS <<_ACEOF
    74428243ac_cs_version="\\
    7443 orxonox config.status 0.1-pre-alpha
     8244orxonox config.status 0.2.0_alpha-r1
    74448245configured by $0, generated by GNU Autoconf 2.59,
    74458246  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
     
    75528353  # Handling of arguments.
    75538354  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
    7554   "console/Makefile" ) CONFIG_FILES="$CONFIG_FILES console/Makefile" ;;
    7555   "gui/Makefile" ) CONFIG_FILES="$CONFIG_FILES gui/Makefile" ;;
     8355  "src/console/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/console/Makefile" ;;
     8356  "src/gui/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/gui/Makefile" ;;
    75568357  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
    7557   "importer/Makefile" ) CONFIG_FILES="$CONFIG_FILES importer/Makefile" ;;
     8358  "src/importer/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/importer/Makefile" ;;
    75588359  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
    75598360  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     
    76438444s,@ECHO_T@,$ECHO_T,;t t
    76448445s,@LIBS@,$LIBS,;t t
     8446s,@build@,$build,;t t
     8447s,@build_cpu@,$build_cpu,;t t
     8448s,@build_vendor@,$build_vendor,;t t
     8449s,@build_os@,$build_os,;t t
     8450s,@host@,$host,;t t
     8451s,@host_cpu@,$host_cpu,;t t
     8452s,@host_vendor@,$host_vendor,;t t
     8453s,@host_os@,$host_os,;t t
     8454s,@target@,$target,;t t
     8455s,@target_cpu@,$target_cpu,;t t
     8456s,@target_vendor@,$target_vendor,;t t
     8457s,@target_os@,$target_os,;t t
    76458458s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
    76468459s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
     
    76878500s,@CPP@,$CPP,;t t
    76888501s,@EGREP@,$EGREP,;t t
     8502s,@DEBUG@,$DEBUG,;t t
     8503s,@DOXYGEN@,$DOXYGEN,;t t
     8504s,@DOXYGEN_TRUE@,$DOXYGEN_TRUE,;t t
     8505s,@DOXYGEN_FALSE@,$DOXYGEN_FALSE,;t t
    76898506s,@MSBITFIELDS@,$MSBITFIELDS,;t t
     8507s,@GTK2_LIBS@,$GTK2_LIBS,;t t
     8508s,@GTK2_CFLAGS@,$GTK2_CFLAGS,;t t
     8509s,@HAVE_GTK2_TRUE@,$HAVE_GTK2_TRUE,;t t
     8510s,@HAVE_GTK2_FALSE@,$HAVE_GTK2_FALSE,;t t
    76908511s,@LIBOBJS@,$LIBOBJS,;t t
    76918512s,@LTLIBOBJS@,$LTLIBOBJS,;t t
  • orxonox/branches/sound/configure.ac

    r2964 r3238  
    33
    44AC_PREREQ(2.56)
    5 AC_INIT(orxonox, 0.1-pre-alpha, orxonox-dev@mail.datacore.ch)
     5AC_INIT(orxonox, 0.2.0_alpha-r1, orxonox-dev@mail.datacore.ch)
     6
     7# Detect the canonical host and target build environment.
     8AC_CANONICAL_BUILD
     9AC_CANONICAL_HOST
     10AC_CANONICAL_TARGET
     11
     12
    613AM_INIT_AUTOMAKE
    714
     
    1219# Checks for programs.
    1320AC_PROG_CXX
    14 AC_PROG_CC
    15 
    16 
    17 
    1821AC_HEADER_STDC
    1922
     23### CHECKING  OPTIONAT ARGUMENTS
     24## DEBUG-statement
     25DEBUG=no
     26AC_MSG_CHECKING([if DEBUG-mode should be enabled])
     27AC_ARG_ENABLE([debug],
     28        AC_HELP_STRING( [--enable-debug], [compiles in debug mode. Lots of debug info about the game.]),
     29         DEBUG=$enableval)
     30
     31if test "$DEBUG" = "no"; then
     32        echo "no"
     33        echo " -> Setting debuglevel to 1. Like this you can still see errors."
     34        DEBUG=1
     35elif test "$DEBUG" = yes; then
     36        echo "yes"
     37        echo " -> Setting debuglevel to 3. HARD DEBUG MODE!!."
     38        DEBUG=3
     39else       
     40        echo "yes set to $DEBUG"
     41fi
     42        AC_DEFINE_UNQUOTED(DEBUG, $DEBUG, [in which debug mode we are])
     43
     44AC_SUBST(DEBUG)
     45
     46## GTK-disabled
     47AC_MSG_CHECKING([if gtk should be enabled])
     48AC_ARG_WITH([gtk],
     49        AC_HELP_STRING( [--without-gtk],
     50        [Prevents GTK from being loaded]), [def_gtk=no], [def_gtk=yes])
     51if test "$def_gtk" = yes; then
     52  echo "yes"
     53fi
     54if test "$def_gtk" = no; then
     55  echo "no"
     56fi
     57### SDL_image-disable
     58def_sdl_image=yes
     59AC_MSG_CHECKING([if SDL_image should be enabled])
     60AC_ARG_WITH([sdl_image],
     61        AC_HELP_STRING( [--without-sdl-image],
     62        [Prevents SDL_image from being loaded]), [def_sdl_image=no])
     63if test "$def_sdl_image" = yes; then
     64  echo "yes"
     65fi
     66if test "$def_sdl_image" = no; then
     67  echo "no"
     68fi
     69
     70
     71## PROGRAMM CHECKING
     72# checking for Doxygen
     73AC_PATH_PROG(DOXYGEN, doxygen)
     74AM_CONDITIONAL(DOXYGEN, test $DOXYGEN)
     75
    2076### CHECKING FOR SYSTEM ###
    2177
    2278AC_MSG_CHECKING([for System])
    23 case `uname` in
     79## checking for openGL-environment and other sys-specific parameters
     80case "$target" in
    2481### WINDOWS ###
    25   *MINGW*)
     82  *-*-mingw32*)
    2683echo "mingw-WINDOWS detected"
    2784
     
    64121    fi
    65122
    66 
    67123# checking for mingw32
    68124    AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
     
    77133    AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes)
    78134    if test "$FOUND_sdlmain" = "yes" ; then
    79         LIBS="$LIBS -lsdlmain"
    80     else
    81         echo "------------------"
    82         echo "SDL library not found."
    83         echo "please install the SDL library, which can be found at http://www.libsdl.org"
    84         echo "------------------"
    85         exit 1
     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
    86142    fi
    87143    AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes)
    88144    if test "$FOUND_sdl" = "yes" ; then
    89         LIBS="$LIBS -lsdl"
    90     else
    91          echo "------------------"
    92          echo "SDL library not found."
    93          echo "please install the SDL library, which can be found at http://www.libsdl.org"
    94          echo "------------------"
    95          exit -1
    96     fi
    97 
    98 # checking for SDL-Mixer-headers
    99     AC_CHECK_HEADERS(SDL/SDL_mixer.h ,,
    100       [AC_MSG_ERROR([cannot find SDL headers]) ])
    101 
    102 #checking for libSDL_mixer
    103     AC_CHECK_LIB([SDL_mixer], [main], FOUND_SDL_mixer=yes)
    104     if test "$FOUND_SDL_mixer" = "yes" ; then
    105         LIBS="$LIBS -lSDL_mixer"
    106     else
    107          echo "------------------"
    108          echo "SDL Mixer library not found."
    109          echo "please install the SDL Mixer library, which can be found at http://www.libsdl.org"
    110          echo "------------------"
    111          exit 1
    112     fi
    113 
     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
     152    fi
    114153
    115154    ;;
    116155
    117156### LINUX ###
    118  *Linux*)
     157 *-*-linux*)
    119158echo "Linux detected"
    120159
    121160 Linux="yes"
    122161
     162CPPFLAGS="-I/usr/X11R6/include"
     163LDFLAGS="-L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib $LDFLAGS"
    123164# checking gl header
    124165   AC_CHECK_HEADERS(GL/gl.h ,,
     
    156197      [AC_MSG_ERROR([cannot find SDL headers]) ])
    157198
     199# checking for SDL-lib
    158200    AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes)
    159201     if test "$FOUND_SDL" = "yes" ; then
    160         LIBS="$LIBS -lSDL"
     202       LIBS="$LIBS -lSDL"
    161203     else
    162         echo "------------------"
    163         echo "SDL library not found."
    164          echo "please install the SDL library, which can be found at http://www.libsdl.org"
    165         echo "------------------"
    166         exit -1
     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
    167209     fi   
    168        
     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"
     220    ;;
     221
     222### OS X ###
     223 *darwin*)
     224echo "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
     256  *)
     257    ;;
     258esac
     259
     260AC_SUBST(MSBITFIELDS)
     261
     262
     263## check for SDL_mixer
    169264# checking for SDL-Mixer-headers
    170265    AC_CHECK_HEADERS(SDL/SDL_mixer.h ,,
    171266      [AC_MSG_ERROR([cannot find SDL headers]) ])
    172 
    173 
     267 
     268 
    174269#checking for libSDL_mixer
    175270    AC_CHECK_LIB([SDL_mixer], [main], FOUND_SDL_mixer=yes)
    176271    if test "$FOUND_SDL_mixer" = "yes" ; then
    177         LIBS="$LIBS -lSDL_mixer"
    178     else
    179          echo "------------------"
    180          echo "SDL Mixer library not found."
    181          echo "please install the SDL Mixer library, which can be found at http://www.libsdl.org"
    182          echo "------------------"
    183          exit 1
    184     fi
    185 
    186     ;;
    187   *)
    188     mingw="no"
    189     ;;
    190 esac
    191 AC_MSG_RESULT([$mingw])
    192 AC_SUBST(MSBITFIELDS)
    193 
    194 #### Checking for LIBraries.
    195 
    196 # FIXME: Replace `main' with a function in `-lOSMesa':
    197 AC_CHECK_LIB([OSMesa], [main])
    198 # FIXME: Replace `main' with a function in `-lX11':
    199 AC_CHECK_LIB([X11], [main])
    200 # FIXME: Replace `main' with a function in `-lXt':
    201 AC_CHECK_LIB([Xt], [main])
     272       LIBS="$LIBS -lSDL_mixer"
     273    else
     274        echo "------------------"
     275        echo "SDL Mixer library not found."
     276        echo "please install the SDL Mixer library, which can be found at http://www.libsdl.org"
     277        echo "------------------"
     278        exit 1
     279    fi
     280
     281
     282## check for SDL_Image
     283if test "$def_sdl_image" = "yes"; then
     284# checking for SDL_image-headers
     285  AC_CHECK_HEADERS(SDL/SDL_image.h ,,
     286      [echo "sdl_image not found. falling back to other options"; def_sdl_image=no ])
     287fi
     288if test "$def_sdl_image" = "yes"; then
     289# checking for SDL_image-lib
     290  AC_CHECK_LIB([SDL_image], [main], FOUND_SDL_image=yes)
     291     if test "$FOUND_SDL_image" = "yes" ; then
     292       LIBS="$LIBS -lSDL_image"
     293     else
     294        echo "------------------"
     295        echo "SDL_image library not found."
     296        echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"
     297        echo "------------------"
     298        exit -1
     299     fi   
     300fi
     301
     302
     303if test "$def_sdl_image" = "no"; then
     304 ## checking for libjpeg
     305 AC_CHECK_HEADERS(jpeglib.h ,jpegHeader="yes",
     306        jpegHeader="no")
     307 if test $jpegHeader = "no"; then
     308        echo " not including jpeg."
     309 else
     310  AC_CHECK_LIB([jpeg], [main], FOUND_jpeg=yes)
     311    if test "$FOUND_jpeg" = "yes" ; then
     312      LIBS="$LIBS -ljpeg"
     313    else
     314         echo "------------------"
     315         echo "jpeg library not found."
     316         echo "please install the jpeg library from the Independent JPEG Group, which can be found at http://www.ijg.org"
     317         echo "------------------"
     318         exit -1
     319    fi   
     320 fi
     321
     322 ## checking for libpng
     323 AC_CHECK_HEADERS(png.h ,pngHeader="yes",
     324        pngHeader="no")
     325 if test $pngHeader = "no"; then
     326        echo " not including png."
     327 else
     328  AC_CHECK_LIB([png], [main], FOUND_png=yes)
     329    if test "$FOUND_png" = "yes" ; then
     330      LIBS="$LIBS -lpng"
     331    else
     332         echo "------------------"
     333         echo "png library not found."
     334         echo "please install the png library, which can be found at http://libpng.org/pub/png/libpng.html"
     335         echo "------------------"
     336         exit -1
     337    fi
     338 fi   
     339fi
     340
     341## checking for GTK
     342if test "$def_gtk" = yes; then
     343
     344        #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
     345        AC_MSG_CHECKING([for gtk2.0])
     346        if `pkg-config --exists gtk+-2.0`; then
     347                echo "yes"
     348                have_gtk2=yes
     349                GTK2_LIBS=`pkg-config --libs gtk+-2.0`
     350                GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0`
     351                AC_DEFINE_UNQUOTED(HAVE_GTK2, 1, [if we have GTK2])
     352        else
     353                echo "no"
     354        fi
     355
     356fi
     357AC_SUBST(GTK2_LIBS)
     358AC_SUBST(GTK2_CFLAGS)
     359AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes)
     360
    202361
    203362
    204363#checking for pthread libs
    205 AC_CHECK_LIB([pthread], [main], FOUND_pthread=yes)
    206 if test "$FOUND_pthread" = "yes" ; then
    207     LIBS="$LIBS -lpthread"
    208 fi
    209 
    210 
     364# AC_CHECK_LIB([pthread], [main], FOUND_pthread=yes)
     365# if test "$FOUND_pthread" = "yes" ; then
     366#    LIBS="$LIBS -lpthread"
     367# fi
    211368
    212369
    213370# FIXME: Replace `main' with a function in `-lm':
    214 AC_CHECK_LIB([m], [main])
    215 
    216 LIBS="$LIBS `pkg-config --libs  gtk+-2.0`"
    217 
    218 
     371 AC_CHECK_LIB([m], [main])
     372
     373 
    219374# Checks for header files.
    220375AC_HEADER_STDC
     
    229384
    230385AC_CONFIG_FILES([Makefile
    231                  console/Makefile
    232                  gui/Makefile
     386                 src/console/Makefile
     387                 src/gui/Makefile
    233388                 src/Makefile
    234                  importer/Makefile])
     389                 src/importer/Makefile])
    235390AC_OUTPUT
  • orxonox/branches/sound/src/Makefile

    r3179 r3238  
    1 # Makefile.in generated by automake 1.8.2 from Makefile.am.
     1# Makefile.in generated by automake 1.8.5 from Makefile.am.
    22# src/Makefile.  Generated from Makefile.in by configure.
    33
     
    3838PRE_UNINSTALL = :
    3939POST_UNINSTALL = :
     40host_triplet = i686-pc-linux-gnu
    4041bin_PROGRAMS = orxonox$(EXEEXT) sound$(EXEEXT)
    4142subdir = src
     
    4950CONFIG_HEADER = $(top_builddir)/config.h
    5051CONFIG_CLEAN_FILES =
    51 am__installdirs = $(DESTDIR)$(bindir)
     52am__installdirs = "$(DESTDIR)$(bindir)"
    5253binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
    5354PROGRAMS = $(bin_PROGRAMS)
    5455am_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) \
    5758        command_node.$(OBJEXT) ini_parser.$(OBJEXT) keynames.$(OBJEXT) \
    5859        track.$(OBJEXT) base_entity.$(OBJEXT) game_loader.$(OBJEXT) \
    59         campaign.$(OBJEXT) story_entity.$(OBJEXT)
     60        campaign.$(OBJEXT) story_entity.$(OBJEXT) \
     61        environment.$(OBJEXT) object.$(OBJEXT) array.$(OBJEXT) \
     62        material.$(OBJEXT) list.$(OBJEXT)
    6063orxonox_OBJECTS = $(am_orxonox_OBJECTS)
    6164orxonox_LDADD = $(LDADD)
     
    6669depcomp = $(SHELL) $(top_srcdir)/depcomp
    6770am__depfiles_maybe = depfiles
    68 DEP_FILES = ./$(DEPDIR)/base_entity.Po \
    69         ./$(DEPDIR)/camera.Po ./$(DEPDIR)/campaign.Po \
    70         ./$(DEPDIR)/collision.Po \
     71DEP_FILES = ./$(DEPDIR)/array.Po \
     72        ./$(DEPDIR)/base_entity.Po ./$(DEPDIR)/camera.Po \
     73        ./$(DEPDIR)/campaign.Po ./$(DEPDIR)/collision.Po \
    7174        ./$(DEPDIR)/command_node.Po \
    7275        ./$(DEPDIR)/data_tank.Po \
     76        ./$(DEPDIR)/environment.Po \
    7377        ./$(DEPDIR)/game_loader.Po \
    7478        ./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \
    75         ./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/player.Po \
    76         ./$(DEPDIR)/sound_control.Po \
     79        ./$(DEPDIR)/list.Po ./$(DEPDIR)/material.Po \
     80        ./$(DEPDIR)/object.Po ./$(DEPDIR)/orxonox.Po \
     81        ./$(DEPDIR)/player.Po ./$(DEPDIR)/sound_control.Po \
    7782        ./$(DEPDIR)/sound_test.Po \
    7883        ./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/track.Po \
     
    8691SOURCES = $(orxonox_SOURCES) $(sound_SOURCES)
    8792DIST_SOURCES = $(orxonox_SOURCES) $(sound_SOURCES)
     93RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
     94        html-recursive info-recursive install-data-recursive \
     95        install-exec-recursive install-info-recursive \
     96        install-recursive installcheck-recursive installdirs-recursive \
     97        pdf-recursive ps-recursive uninstall-info-recursive \
     98        uninstall-recursive
    8899HEADERS = $(noinst_HEADERS)
    89100ETAGS = etags
    90101CTAGS = ctags
     102DIST_SUBDIRS = . importer gui console
    91103DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    92 ACLOCAL = aclocal-1.8
     104ACLOCAL = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run aclocal-1.8
    93105AMDEP_FALSE = #
    94106AMDEP_TRUE =
    95 AMTAR = tar
    96 AUTOCONF = autoconf
    97 AUTOHEADER = autoheader
    98 AUTOMAKE = automake-1.8
     107AMTAR = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run tar
     108AUTOCONF = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run autoconf
     109AUTOHEADER = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run autoheader
     110AUTOMAKE = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run automake-1.8
    99111AWK = gawk
    100112CC = gcc
     
    102114CFLAGS = -g -O2
    103115CPP = gcc -E
    104 CPPFLAGS =
     116CPPFLAGS = -I/usr/X11R6/include
    105117CXX = g++
    106118CXXDEPMODE = depmode=gcc3
    107119CXXFLAGS = -g -O2
    108120CYGPATH_W = echo
     121DEBUG = 1
    109122DEFS = -DHAVE_CONFIG_H
    110123DEPDIR = .deps
     124DOXYGEN = /usr/bin/doxygen
     125DOXYGEN_FALSE = #
     126DOXYGEN_TRUE =
    111127ECHO_C =
    112128ECHO_N = -n
    113129ECHO_T =
    114130EGREP = grep -E
    115 EXEEXT = .exe
     131EXEEXT =
     132GTK2_CFLAGS = -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include 
     133GTK2_LIBS = -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 
     134HAVE_GTK2_FALSE = #
     135HAVE_GTK2_TRUE =
    116136INSTALL_DATA = ${INSTALL} -m 644
    117137INSTALL_PROGRAM = ${INSTALL}
    118138INSTALL_SCRIPT = ${INSTALL}
    119139INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
    120 LDFLAGS =
     140LDFLAGS = -L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib
    121141LIBOBJS =
    122 LIBS = -lm  -lopengl32 -lGLU32 -lmingw32 -lsdlmain -lsdl -lSDL_mixer -Lc:/Prog/Utils/MinGW/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv 
     142LIBS = -lm  -lGL -lGLU -lSDL -lSDL_mixer -lSDL_image
    123143LTLIBOBJS =
    124 MAKEINFO = makeinfo
    125 MSBITFIELDS = -mms-bitfields
     144MAKEINFO = ${SHELL} /home/bensch/svn/orxonox/branches/sound/missing --run makeinfo
     145MSBITFIELDS =
    126146OBJEXT = o
    127147PACKAGE = orxonox
    128148PACKAGE_BUGREPORT = orxonox-dev@mail.datacore.ch
    129149PACKAGE_NAME = orxonox
    130 PACKAGE_STRING = orxonox 0.1-pre-alpha
     150PACKAGE_STRING = orxonox 0.2.0_alpha-r1
    131151PACKAGE_TARNAME = orxonox
    132 PACKAGE_VERSION = 0.1-pre-alpha
     152PACKAGE_VERSION = 0.2.0_alpha-r1
    133153PATH_SEPARATOR = :
    134154SET_MAKE =
    135155SHELL = /bin/sh
    136156STRIP =
    137 VERSION = 0.1-pre-alpha
     157VERSION = 0.2.0_alpha-r1
    138158ac_ct_CC = gcc
    139 ac_ct_CXX = g++
     159ac_ct_CXX =
    140160ac_ct_STRIP =
    141161am__fastdepCC_FALSE = #
     
    147167am__quote =
    148168bindir = ${exec_prefix}/bin
     169build = i686-pc-linux-gnu
    149170build_alias =
     171build_cpu = i686
     172build_os = linux-gnu
     173build_vendor = pc
    150174datadir = ${prefix}/share
    151175exec_prefix = ${prefix}
     176host = i686-pc-linux-gnu
    152177host_alias =
     178host_cpu = i686
     179host_os = linux-gnu
     180host_vendor = pc
    153181includedir = ${prefix}/include
    154182infodir = ${prefix}/info
    155 install_sh = /c/Documents and Settings/bensch/Desktop/svn/orxonox/branches/sound/install-sh
     183install_sh = /home/bensch/svn/orxonox/branches/sound/install-sh
    156184libdir = ${exec_prefix}/lib
    157185libexecdir = ${exec_prefix}/libexec
     
    165193sharedstatedir = ${prefix}/com
    166194sysconfdir = ${prefix}/etc
     195target = i686-pc-linux-gnu
    167196target_alias =
    168 AM_CXXFLAGS = "-I/usr/X11R6/include"
    169 AM_LDFLAGS = "-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11" $(MWINDOWS)
    170 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 game_loader.cc campaign.cc story_entity.cc
     197target_cpu = i686
     198target_os = linux-gnu
     199target_vendor = pc
     200
     201#AM_CXXFLAGS=""
     202AM_LDFLAGS = $(MWINDOWS)
    171203sound_SOURCES = sound_test.cc sound_control.cc
    172 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
    173 all: all-am
     204orxonox_SOURCES = orxonox.cc \
     205                 world.cc \
     206                 player.cc \
     207                 collision.cc \
     208                 data_tank.cc \
     209                 world_entity.cc \
     210                 vector.cc \
     211                 camera.cc \
     212                 command_node.cc \
     213                 ini_parser.cc \
     214                 keynames.cc \
     215                 track.cc \
     216                 base_entity.cc \
     217                 game_loader.cc \
     218                 campaign.cc \
     219                 story_entity.cc \
     220                 environment.cc \
     221                 importer/object.cc \
     222                 importer/array.cc \
     223                 importer/material.cc \
     224                 list.cc
     225
     226noinst_HEADERS = ability.h \
     227                 data_tank.h \
     228                 collision.h \
     229                 npc.h \
     230                 stdincl.h \
     231                 ai.h \
     232                 environment.h \
     233                 orxonox.h \
     234                 synchronisable.h \
     235                 base_entity.h \
     236                 error.h \
     237                 player.h \
     238                 track.h \
     239                 camera.h \
     240                 ini_parser.h \
     241                 power_up.h \
     242                 vector.h \
     243                 keynames.h \
     244                 proto_class.h \
     245                 world.h \
     246                 command_node.h \
     247                 list.h \
     248                 shoot_laser.h \
     249                 world_entity.h \
     250                 coordinates.h \
     251                 message_structures.h \
     252                 shoot_rocket.h \
     253                 list_template.h \
     254                 story_entity.h \
     255                 story_def.h \
     256                 game_loader.h \
     257                 campaign.h
     258
     259EXTRA_DIST = orxonox.conf
     260#GTK_PROGS =
     261
     262### GTK_RELATED
     263GTK_PROGS = console
     264SUBDIRS = . \
     265          importer \
     266          gui \
     267          $(GTK_PROGS)
     268
     269all: all-recursive
    174270
    175271.SUFFIXES:
     
    184280          esac; \
    185281        done; \
    186         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
     282        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
    187283        cd $(top_srcdir) && \
    188           $(AUTOMAKE) --gnu  src/Makefile
     284          $(AUTOMAKE) --foreign  src/Makefile
    189285.PRECIOUS: Makefile
    190286Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    206302install-binPROGRAMS: $(bin_PROGRAMS)
    207303        @$(NORMAL_INSTALL)
    208         $(mkdir_p) $(DESTDIR)$(bindir)
     304        test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
    209305        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    210306          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
     
    212308          ; then \
    213309            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
    214            echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
    215            $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
     310           echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
     311           $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
    216312          else :; fi; \
    217313        done
     
    221317        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    222318          f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
    223           echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
    224           rm -f $(DESTDIR)$(bindir)/$$f; \
     319          echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
     320          rm -f "$(DESTDIR)$(bindir)/$$f"; \
    225321        done
    226322
     
    240336        -rm -f *.tab.c
    241337
     338include ./$(DEPDIR)/array.Po
    242339include ./$(DEPDIR)/base_entity.Po
    243340include ./$(DEPDIR)/camera.Po
     
    246343include ./$(DEPDIR)/command_node.Po
    247344include ./$(DEPDIR)/data_tank.Po
     345include ./$(DEPDIR)/environment.Po
    248346include ./$(DEPDIR)/game_loader.Po
    249347include ./$(DEPDIR)/ini_parser.Po
    250348include ./$(DEPDIR)/keynames.Po
     349include ./$(DEPDIR)/list.Po
     350include ./$(DEPDIR)/material.Po
     351include ./$(DEPDIR)/object.Po
    251352include ./$(DEPDIR)/orxonox.Po
    252353include ./$(DEPDIR)/player.Po
     
    274375#       $(CXXDEPMODE) $(depcomp) \
    275376#       $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
     377
     378object.o: importer/object.cc
     379        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; \
     380        then mv -f "$(DEPDIR)/object.Tpo" "$(DEPDIR)/object.Po"; else rm -f "$(DEPDIR)/object.Tpo"; exit 1; fi
     381#       source='importer/object.cc' object='object.o' libtool=no \
     382#       depfile='$(DEPDIR)/object.Po' tmpdepfile='$(DEPDIR)/object.TPo' \
     383#       $(CXXDEPMODE) $(depcomp) \
     384#       $(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
     385
     386object.obj: importer/object.cc
     387        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`; \
     388        then mv -f "$(DEPDIR)/object.Tpo" "$(DEPDIR)/object.Po"; else rm -f "$(DEPDIR)/object.Tpo"; exit 1; fi
     389#       source='importer/object.cc' object='object.obj' libtool=no \
     390#       depfile='$(DEPDIR)/object.Po' tmpdepfile='$(DEPDIR)/object.TPo' \
     391#       $(CXXDEPMODE) $(depcomp) \
     392#       $(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`
     393
     394array.o: importer/array.cc
     395        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; \
     396        then mv -f "$(DEPDIR)/array.Tpo" "$(DEPDIR)/array.Po"; else rm -f "$(DEPDIR)/array.Tpo"; exit 1; fi
     397#       source='importer/array.cc' object='array.o' libtool=no \
     398#       depfile='$(DEPDIR)/array.Po' tmpdepfile='$(DEPDIR)/array.TPo' \
     399#       $(CXXDEPMODE) $(depcomp) \
     400#       $(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
     401
     402array.obj: importer/array.cc
     403        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`; \
     404        then mv -f "$(DEPDIR)/array.Tpo" "$(DEPDIR)/array.Po"; else rm -f "$(DEPDIR)/array.Tpo"; exit 1; fi
     405#       source='importer/array.cc' object='array.obj' libtool=no \
     406#       depfile='$(DEPDIR)/array.Po' tmpdepfile='$(DEPDIR)/array.TPo' \
     407#       $(CXXDEPMODE) $(depcomp) \
     408#       $(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`
     409
     410material.o: importer/material.cc
     411        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; \
     412        then mv -f "$(DEPDIR)/material.Tpo" "$(DEPDIR)/material.Po"; else rm -f "$(DEPDIR)/material.Tpo"; exit 1; fi
     413#       source='importer/material.cc' object='material.o' libtool=no \
     414#       depfile='$(DEPDIR)/material.Po' tmpdepfile='$(DEPDIR)/material.TPo' \
     415#       $(CXXDEPMODE) $(depcomp) \
     416#       $(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
     417
     418material.obj: importer/material.cc
     419        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`; \
     420        then mv -f "$(DEPDIR)/material.Tpo" "$(DEPDIR)/material.Po"; else rm -f "$(DEPDIR)/material.Tpo"; exit 1; fi
     421#       source='importer/material.cc' object='material.obj' libtool=no \
     422#       depfile='$(DEPDIR)/material.Po' tmpdepfile='$(DEPDIR)/material.TPo' \
     423#       $(CXXDEPMODE) $(depcomp) \
     424#       $(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`
    276425uninstall-info-am:
     426
     427# This directory's subdirectories are mostly independent; you can cd
     428# into them and run `make' without going through this Makefile.
     429# To change the values of `make' variables: instead of editing Makefiles,
     430# (1) if the variable is set in `config.status', edit `config.status'
     431#     (which will cause the Makefiles to be regenerated when you run `make');
     432# (2) otherwise, pass the desired values on the `make' command line.
     433$(RECURSIVE_TARGETS):
     434        @set fnord $$MAKEFLAGS; amf=$$2; \
     435        dot_seen=no; \
     436        target=`echo $@ | sed s/-recursive//`; \
     437        list='$(SUBDIRS)'; for subdir in $$list; do \
     438          echo "Making $$target in $$subdir"; \
     439          if test "$$subdir" = "."; then \
     440            dot_seen=yes; \
     441            local_target="$$target-am"; \
     442          else \
     443            local_target="$$target"; \
     444          fi; \
     445          (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
     446           || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
     447        done; \
     448        if test "$$dot_seen" = "no"; then \
     449          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
     450        fi; test -z "$$fail"
     451
     452mostlyclean-recursive clean-recursive distclean-recursive \
     453maintainer-clean-recursive:
     454        @set fnord $$MAKEFLAGS; amf=$$2; \
     455        dot_seen=no; \
     456        case "$@" in \
     457          distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
     458          *) list='$(SUBDIRS)' ;; \
     459        esac; \
     460        rev=''; for subdir in $$list; do \
     461          if test "$$subdir" = "."; then :; else \
     462            rev="$$subdir $$rev"; \
     463          fi; \
     464        done; \
     465        rev="$$rev ."; \
     466        target=`echo $@ | sed s/-recursive//`; \
     467        for subdir in $$rev; do \
     468          echo "Making $$target in $$subdir"; \
     469          if test "$$subdir" = "."; then \
     470            local_target="$$target-am"; \
     471          else \
     472            local_target="$$target"; \
     473          fi; \
     474          (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
     475           || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
     476        done && test -z "$$fail"
     477tags-recursive:
     478        list='$(SUBDIRS)'; for subdir in $$list; do \
     479          test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
     480        done
     481ctags-recursive:
     482        list='$(SUBDIRS)'; for subdir in $$list; do \
     483          test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
     484        done
    277485
    278486ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
     
    286494tags: TAGS
    287495
    288 TAGS: $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     496TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
    289497                $(TAGS_FILES) $(LISP)
    290498        tags=; \
    291499        here=`pwd`; \
     500        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
     501          include_option=--etags-include; \
     502          empty_fix=.; \
     503        else \
     504          include_option=--include; \
     505          empty_fix=; \
     506        fi; \
     507        list='$(SUBDIRS)'; for subdir in $$list; do \
     508          if test "$$subdir" = .; then :; else \
     509            test ! -f $$subdir/TAGS || \
     510              tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
     511          fi; \
     512        done; \
    292513        list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
    293514        unique=`for i in $$list; do \
     
    296517          $(AWK) '    { files[$$0] = 1; } \
    297518               END { for (i in files) print i; }'`; \
    298         test -z "$(ETAGS_ARGS)$$tags$$unique" \
    299           || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    300              $$tags $$unique
     519        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
     520          test -n "$$unique" || unique=$$empty_fix; \
     521          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     522            $$tags $$unique; \
     523        fi
    301524ctags: CTAGS
    302 CTAGS: $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     525CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
    303526                $(TAGS_FILES) $(LISP)
    304527        tags=; \
     
    349572          fi; \
    350573        done
     574        list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
     575          if test "$$subdir" = .; then :; else \
     576            test -d "$(distdir)/$$subdir" \
     577            || mkdir "$(distdir)/$$subdir" \
     578            || exit 1; \
     579            (cd $$subdir && \
     580              $(MAKE) $(AM_MAKEFLAGS) \
     581                top_distdir="../$(top_distdir)" \
     582                distdir="../$(distdir)/$$subdir" \
     583                distdir) \
     584              || exit 1; \
     585          fi; \
     586        done
    351587check-am: all-am
    352 check: check-am
     588check: check-recursive
    353589all-am: Makefile $(PROGRAMS) $(HEADERS)
    354 installdirs:
    355         $(mkdir_p) $(DESTDIR)$(bindir)
    356 install: install-am
    357 install-exec: install-exec-am
    358 install-data: install-data-am
    359 uninstall: uninstall-am
     590installdirs: installdirs-recursive
     591installdirs-am:
     592        for dir in "$(DESTDIR)$(bindir)"; do \
     593          test -z "$$dir" || $(mkdir_p) "$$dir"; \
     594        done
     595install: install-recursive
     596install-exec: install-exec-recursive
     597install-data: install-data-recursive
     598uninstall: uninstall-recursive
    360599
    361600install-am: all-am
    362601        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
    363602
    364 installcheck: installcheck-am
     603installcheck: installcheck-recursive
    365604install-strip:
    366605        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
     
    378617        @echo "This command is intended for maintainers to use"
    379618        @echo "it deletes files that may require special tools to rebuild."
    380 clean: clean-am
     619clean: clean-recursive
    381620
    382621clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
    383622
    384 distclean: distclean-am
     623distclean: distclean-recursive
    385624        -rm -rf ./$(DEPDIR)
    386625        -rm -f Makefile
     
    388627        distclean-tags
    389628
    390 dvi: dvi-am
     629dvi: dvi-recursive
    391630
    392631dvi-am:
    393632
    394 html: html-am
    395 
    396 info: info-am
     633html: html-recursive
     634
     635info: info-recursive
    397636
    398637info-am:
     
    402641install-exec-am: install-binPROGRAMS
    403642
    404 install-info: install-info-am
     643install-info: install-info-recursive
    405644
    406645install-man:
     
    408647installcheck-am:
    409648
    410 maintainer-clean: maintainer-clean-am
     649maintainer-clean: maintainer-clean-recursive
    411650        -rm -rf ./$(DEPDIR)
    412651        -rm -f Makefile
    413652maintainer-clean-am: distclean-am maintainer-clean-generic
    414653
    415 mostlyclean: mostlyclean-am
     654mostlyclean: mostlyclean-recursive
    416655
    417656mostlyclean-am: mostlyclean-compile mostlyclean-generic
    418657
    419 pdf: pdf-am
     658pdf: pdf-recursive
    420659
    421660pdf-am:
    422661
    423 ps: ps-am
     662ps: ps-recursive
    424663
    425664ps-am:
     
    427666uninstall-am: uninstall-binPROGRAMS uninstall-info-am
    428667
    429 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
    430         clean-generic ctags distclean distclean-compile \
    431         distclean-generic distclean-tags distdir dvi dvi-am html \
     668uninstall-info: uninstall-info-recursive
     669
     670.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
     671        clean clean-binPROGRAMS clean-generic clean-recursive ctags \
     672        ctags-recursive distclean distclean-compile distclean-generic \
     673        distclean-recursive distclean-tags distdir dvi dvi-am html \
    432674        html-am info info-am install install-am install-binPROGRAMS \
    433675        install-data install-data-am install-exec install-exec-am \
    434676        install-info install-info-am install-man install-strip \
    435         installcheck installcheck-am installdirs maintainer-clean \
    436         maintainer-clean-generic mostlyclean mostlyclean-compile \
    437         mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
    438         uninstall-am uninstall-binPROGRAMS uninstall-info-am
    439 
    440 
    441 #  uncomment the following if bencoder requires the math library
     677        installcheck installcheck-am installdirs installdirs-am \
     678        maintainer-clean maintainer-clean-generic \
     679        maintainer-clean-recursive mostlyclean mostlyclean-compile \
     680        mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \
     681        tags tags-recursive uninstall uninstall-am \
     682        uninstall-binPROGRAMS uninstall-info-am
     683
     684
     685#  uncomment the following if orxonox requires the math library
    442686#orxonox_LDADD=-lm
    443687
  • orxonox/branches/sound/src/Makefile.am

    r2854 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=""
     2AM_LDFLAGS= $(MWINDOWS)
    33
    44#"-O3 -pedantic -fPIC -ffast-math -I/usr/X11R6/include"
     
    66
    77bin_PROGRAMS=orxonox sound
    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 game_loader.cc campaign.cc story_entity.cc
    98
    109sound_SOURCES=sound_test.cc sound_control.cc
    1110
    12 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
     11orxonox_SOURCES= orxonox.cc \
     12                 world.cc \
     13                 player.cc \
     14                 collision.cc \
     15                 data_tank.cc \
     16                 world_entity.cc \
     17                 vector.cc \
     18                 camera.cc \
     19                 command_node.cc \
     20                 ini_parser.cc \
     21                 keynames.cc \
     22                 track.cc \
     23                 base_entity.cc \
     24                 game_loader.cc \
     25                 campaign.cc \
     26                 story_entity.cc \
     27                 environment.cc \
     28                 importer/object.cc \
     29                 importer/array.cc \
     30                 importer/material.cc \
     31                 list.cc
    1332
     33noinst_HEADERS = ability.h \
     34                 data_tank.h \
     35                 collision.h \
     36                 npc.h \
     37                 stdincl.h \
     38                 ai.h \
     39                 environment.h \
     40                 orxonox.h \
     41                 synchronisable.h \
     42                 base_entity.h \
     43                 error.h \
     44                 player.h \
     45                 track.h \
     46                 camera.h \
     47                 ini_parser.h \
     48                 power_up.h \
     49                 vector.h \
     50                 keynames.h \
     51                 proto_class.h \
     52                 world.h \
     53                 command_node.h \
     54                 list.h \
     55                 shoot_laser.h \
     56                 world_entity.h \
     57                 coordinates.h \
     58                 message_structures.h \
     59                 shoot_rocket.h \
     60                 list_template.h \
     61                 story_entity.h \
     62                 story_def.h \
     63                 game_loader.h \
     64                 campaign.h
    1465
    15 #  uncomment the following if bencoder requires the math library
     66## orxonox.conf will be used from home-dir instead.
     67EXTRA_DIST = orxonox.conf
     68
     69### GTK_RELATED
     70if HAVE_GTK2
     71  GTK_PROGS =console
     72else
     73  GTK_PROGS =
     74endif
     75
     76SUBDIRS = . \
     77          importer \
     78          gui \
     79          $(GTK_PROGS)
     80
     81#  uncomment the following if orxonox requires the math library
    1682#orxonox_LDADD=-lm
    1783
  • orxonox/branches/sound/src/Makefile.in

    r3179 r3238  
    1 # Makefile.in generated by automake 1.8.2 from Makefile.am.
     1# Makefile.in generated by automake 1.8.5 from Makefile.am.
    22# @configure_input@
    33
     
    3838PRE_UNINSTALL = :
    3939POST_UNINSTALL = :
     40host_triplet = @host@
    4041bin_PROGRAMS = orxonox$(EXEEXT) sound$(EXEEXT)
    4142subdir = src
     
    4950CONFIG_HEADER = $(top_builddir)/config.h
    5051CONFIG_CLEAN_FILES =
    51 am__installdirs = $(DESTDIR)$(bindir)
     52am__installdirs = "$(DESTDIR)$(bindir)"
    5253binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
    5354PROGRAMS = $(bin_PROGRAMS)
    5455am_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) \
    5758        command_node.$(OBJEXT) ini_parser.$(OBJEXT) keynames.$(OBJEXT) \
    5859        track.$(OBJEXT) base_entity.$(OBJEXT) game_loader.$(OBJEXT) \
    59         campaign.$(OBJEXT) story_entity.$(OBJEXT)
     60        campaign.$(OBJEXT) story_entity.$(OBJEXT) \
     61        environment.$(OBJEXT) object.$(OBJEXT) array.$(OBJEXT) \
     62        material.$(OBJEXT) list.$(OBJEXT)
    6063orxonox_OBJECTS = $(am_orxonox_OBJECTS)
    6164orxonox_LDADD = $(LDADD)
     
    6669depcomp = $(SHELL) $(top_srcdir)/depcomp
    6770am__depfiles_maybe = depfiles
    68 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/base_entity.Po \
    69 @AMDEP_TRUE@    ./$(DEPDIR)/camera.Po ./$(DEPDIR)/campaign.Po \
    70 @AMDEP_TRUE@    ./$(DEPDIR)/collision.Po \
     71@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po \
     72@AMDEP_TRUE@    ./$(DEPDIR)/base_entity.Po ./$(DEPDIR)/camera.Po \
     73@AMDEP_TRUE@    ./$(DEPDIR)/campaign.Po ./$(DEPDIR)/collision.Po \
    7174@AMDEP_TRUE@    ./$(DEPDIR)/command_node.Po \
    7275@AMDEP_TRUE@    ./$(DEPDIR)/data_tank.Po \
     76@AMDEP_TRUE@    ./$(DEPDIR)/environment.Po \
    7377@AMDEP_TRUE@    ./$(DEPDIR)/game_loader.Po \
    7478@AMDEP_TRUE@    ./$(DEPDIR)/ini_parser.Po ./$(DEPDIR)/keynames.Po \
    75 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/player.Po \
    76 @AMDEP_TRUE@    ./$(DEPDIR)/sound_control.Po \
     79@AMDEP_TRUE@    ./$(DEPDIR)/list.Po ./$(DEPDIR)/material.Po \
     80@AMDEP_TRUE@    ./$(DEPDIR)/object.Po ./$(DEPDIR)/orxonox.Po \
     81@AMDEP_TRUE@    ./$(DEPDIR)/player.Po ./$(DEPDIR)/sound_control.Po \
    7782@AMDEP_TRUE@    ./$(DEPDIR)/sound_test.Po \
    7883@AMDEP_TRUE@    ./$(DEPDIR)/story_entity.Po ./$(DEPDIR)/track.Po \
     
    8691SOURCES = $(orxonox_SOURCES) $(sound_SOURCES)
    8792DIST_SOURCES = $(orxonox_SOURCES) $(sound_SOURCES)
     93RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
     94        html-recursive info-recursive install-data-recursive \
     95        install-exec-recursive install-info-recursive \
     96        install-recursive installcheck-recursive installdirs-recursive \
     97        pdf-recursive ps-recursive uninstall-info-recursive \
     98        uninstall-recursive
    8899HEADERS = $(noinst_HEADERS)
    89100ETAGS = etags
    90101CTAGS = ctags
     102DIST_SUBDIRS = . importer gui console
    91103DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    92104ACLOCAL = @ACLOCAL@
     
    107119CXXFLAGS = @CXXFLAGS@
    108120CYGPATH_W = @CYGPATH_W@
     121DEBUG = @DEBUG@
    109122DEFS = @DEFS@
    110123DEPDIR = @DEPDIR@
     124DOXYGEN = @DOXYGEN@
     125DOXYGEN_FALSE = @DOXYGEN_FALSE@
     126DOXYGEN_TRUE = @DOXYGEN_TRUE@
    111127ECHO_C = @ECHO_C@
    112128ECHO_N = @ECHO_N@
     
    114130EGREP = @EGREP@
    115131EXEEXT = @EXEEXT@
     132GTK2_CFLAGS = @GTK2_CFLAGS@
     133GTK2_LIBS = @GTK2_LIBS@
     134HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
     135HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
    116136INSTALL_DATA = @INSTALL_DATA@
    117137INSTALL_PROGRAM = @INSTALL_PROGRAM@
     
    147167am__quote = @am__quote@
    148168bindir = @bindir@
     169build = @build@
    149170build_alias = @build_alias@
     171build_cpu = @build_cpu@
     172build_os = @build_os@
     173build_vendor = @build_vendor@
    150174datadir = @datadir@
    151175exec_prefix = @exec_prefix@
     176host = @host@
    152177host_alias = @host_alias@
     178host_cpu = @host_cpu@
     179host_os = @host_os@
     180host_vendor = @host_vendor@
    153181includedir = @includedir@
    154182infodir = @infodir@
     
    165193sharedstatedir = @sharedstatedir@
    166194sysconfdir = @sysconfdir@
     195target = @target@
    167196target_alias = @target_alias@
    168 AM_CXXFLAGS = "-I/usr/X11R6/include"
    169 AM_LDFLAGS = "-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11" $(MWINDOWS)
    170 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 game_loader.cc campaign.cc story_entity.cc
     197target_cpu = @target_cpu@
     198target_os = @target_os@
     199target_vendor = @target_vendor@
     200
     201#AM_CXXFLAGS=""
     202AM_LDFLAGS = $(MWINDOWS)
    171203sound_SOURCES = sound_test.cc sound_control.cc
    172 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
    173 all: all-am
     204orxonox_SOURCES = orxonox.cc \
     205                 world.cc \
     206                 player.cc \
     207                 collision.cc \
     208                 data_tank.cc \
     209                 world_entity.cc \
     210                 vector.cc \
     211                 camera.cc \
     212                 command_node.cc \
     213                 ini_parser.cc \
     214                 keynames.cc \
     215                 track.cc \
     216                 base_entity.cc \
     217                 game_loader.cc \
     218                 campaign.cc \
     219                 story_entity.cc \
     220                 environment.cc \
     221                 importer/object.cc \
     222                 importer/array.cc \
     223                 importer/material.cc \
     224                 list.cc
     225
     226noinst_HEADERS = ability.h \
     227                 data_tank.h \
     228                 collision.h \
     229                 npc.h \
     230                 stdincl.h \
     231                 ai.h \
     232                 environment.h \
     233                 orxonox.h \
     234                 synchronisable.h \
     235                 base_entity.h \
     236                 error.h \
     237                 player.h \
     238                 track.h \
     239                 camera.h \
     240                 ini_parser.h \
     241                 power_up.h \
     242                 vector.h \
     243                 keynames.h \
     244                 proto_class.h \
     245                 world.h \
     246                 command_node.h \
     247                 list.h \
     248                 shoot_laser.h \
     249                 world_entity.h \
     250                 coordinates.h \
     251                 message_structures.h \
     252                 shoot_rocket.h \
     253                 list_template.h \
     254                 story_entity.h \
     255                 story_def.h \
     256                 game_loader.h \
     257                 campaign.h
     258
     259EXTRA_DIST = orxonox.conf
     260@HAVE_GTK2_FALSE@GTK_PROGS =
     261
     262### GTK_RELATED
     263@HAVE_GTK2_TRUE@GTK_PROGS = console
     264SUBDIRS = . \
     265          importer \
     266          gui \
     267          $(GTK_PROGS)
     268
     269all: all-recursive
    174270
    175271.SUFFIXES:
     
    184280          esac; \
    185281        done; \
    186         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
     282        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
    187283        cd $(top_srcdir) && \
    188           $(AUTOMAKE) --gnu  src/Makefile
     284          $(AUTOMAKE) --foreign  src/Makefile
    189285.PRECIOUS: Makefile
    190286Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    206302install-binPROGRAMS: $(bin_PROGRAMS)
    207303        @$(NORMAL_INSTALL)
    208         $(mkdir_p) $(DESTDIR)$(bindir)
     304        test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
    209305        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    210306          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
     
    212308          ; then \
    213309            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
    214            echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
    215            $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
     310           echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
     311           $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
    216312          else :; fi; \
    217313        done
     
    221317        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    222318          f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
    223           echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
    224           rm -f $(DESTDIR)$(bindir)/$$f; \
     319          echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
     320          rm -f "$(DESTDIR)$(bindir)/$$f"; \
    225321        done
    226322
     
    240336        -rm -f *.tab.c
    241337
     338@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@
    242339@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_entity.Po@am__quote@
    243340@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camera.Po@am__quote@
     
    246343@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command_node.Po@am__quote@
    247344@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data_tank.Po@am__quote@
     345@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/environment.Po@am__quote@
    248346@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/game_loader.Po@am__quote@
    249347@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ini_parser.Po@am__quote@
    250348@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keynames.Po@am__quote@
     349@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
     350@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@
     351@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Po@am__quote@
    251352@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox.Po@am__quote@
    252353@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/player.Po@am__quote@
     
    274375@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    275376@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
     377
     378object.o: importer/object.cc
     379@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; \
     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.o' 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.o `test -f 'importer/object.cc' || echo '$(srcdir)/'`importer/object.cc
     385
     386object.obj: importer/object.cc
     387@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`; \
     388@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/object.Tpo" "$(DEPDIR)/object.Po"; else rm -f "$(DEPDIR)/object.Tpo"; exit 1; fi
     389@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='importer/object.cc' object='object.obj' libtool=no @AMDEPBACKSLASH@
     390@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/object.Po' tmpdepfile='$(DEPDIR)/object.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 object.obj `if test -f 'importer/object.cc'; then $(CYGPATH_W) 'importer/object.cc'; else $(CYGPATH_W) '$(srcdir)/importer/object.cc'; fi`
     393
     394array.o: importer/array.cc
     395@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; \
     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.o' 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.o `test -f 'importer/array.cc' || echo '$(srcdir)/'`importer/array.cc
     401
     402array.obj: importer/array.cc
     403@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`; \
     404@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/array.Tpo" "$(DEPDIR)/array.Po"; else rm -f "$(DEPDIR)/array.Tpo"; exit 1; fi
     405@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='importer/array.cc' object='array.obj' libtool=no @AMDEPBACKSLASH@
     406@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/array.Po' tmpdepfile='$(DEPDIR)/array.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 array.obj `if test -f 'importer/array.cc'; then $(CYGPATH_W) 'importer/array.cc'; else $(CYGPATH_W) '$(srcdir)/importer/array.cc'; fi`
     409
     410material.o: importer/material.cc
     411@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; \
     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.o' 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.o `test -f 'importer/material.cc' || echo '$(srcdir)/'`importer/material.cc
     417
     418material.obj: importer/material.cc
     419@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`; \
     420@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/material.Tpo" "$(DEPDIR)/material.Po"; else rm -f "$(DEPDIR)/material.Tpo"; exit 1; fi
     421@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='importer/material.cc' object='material.obj' libtool=no @AMDEPBACKSLASH@
     422@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/material.Po' tmpdepfile='$(DEPDIR)/material.TPo' @AMDEPBACKSLASH@
     423@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     424@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`
    276425uninstall-info-am:
     426
     427# This directory's subdirectories are mostly independent; you can cd
     428# into them and run `make' without going through this Makefile.
     429# To change the values of `make' variables: instead of editing Makefiles,
     430# (1) if the variable is set in `config.status', edit `config.status'
     431#     (which will cause the Makefiles to be regenerated when you run `make');
     432# (2) otherwise, pass the desired values on the `make' command line.
     433$(RECURSIVE_TARGETS):
     434        @set fnord $$MAKEFLAGS; amf=$$2; \
     435        dot_seen=no; \
     436        target=`echo $@ | sed s/-recursive//`; \
     437        list='$(SUBDIRS)'; for subdir in $$list; do \
     438          echo "Making $$target in $$subdir"; \
     439          if test "$$subdir" = "."; then \
     440            dot_seen=yes; \
     441            local_target="$$target-am"; \
     442          else \
     443            local_target="$$target"; \
     444          fi; \
     445          (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
     446           || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
     447        done; \
     448        if test "$$dot_seen" = "no"; then \
     449          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
     450        fi; test -z "$$fail"
     451
     452mostlyclean-recursive clean-recursive distclean-recursive \
     453maintainer-clean-recursive:
     454        @set fnord $$MAKEFLAGS; amf=$$2; \
     455        dot_seen=no; \
     456        case "$@" in \
     457          distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
     458          *) list='$(SUBDIRS)' ;; \
     459        esac; \
     460        rev=''; for subdir in $$list; do \
     461          if test "$$subdir" = "."; then :; else \
     462            rev="$$subdir $$rev"; \
     463          fi; \
     464        done; \
     465        rev="$$rev ."; \
     466        target=`echo $@ | sed s/-recursive//`; \
     467        for subdir in $$rev; do \
     468          echo "Making $$target in $$subdir"; \
     469          if test "$$subdir" = "."; then \
     470            local_target="$$target-am"; \
     471          else \
     472            local_target="$$target"; \
     473          fi; \
     474          (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
     475           || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
     476        done && test -z "$$fail"
     477tags-recursive:
     478        list='$(SUBDIRS)'; for subdir in $$list; do \
     479          test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
     480        done
     481ctags-recursive:
     482        list='$(SUBDIRS)'; for subdir in $$list; do \
     483          test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
     484        done
    277485
    278486ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
     
    286494tags: TAGS
    287495
    288 TAGS: $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     496TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
    289497                $(TAGS_FILES) $(LISP)
    290498        tags=; \
    291499        here=`pwd`; \
     500        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
     501          include_option=--etags-include; \
     502          empty_fix=.; \
     503        else \
     504          include_option=--include; \
     505          empty_fix=; \
     506        fi; \
     507        list='$(SUBDIRS)'; for subdir in $$list; do \
     508          if test "$$subdir" = .; then :; else \
     509            test ! -f $$subdir/TAGS || \
     510              tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
     511          fi; \
     512        done; \
    292513        list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
    293514        unique=`for i in $$list; do \
     
    296517          $(AWK) '    { files[$$0] = 1; } \
    297518               END { for (i in files) print i; }'`; \
    298         test -z "$(ETAGS_ARGS)$$tags$$unique" \
    299           || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    300              $$tags $$unique
     519        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
     520          test -n "$$unique" || unique=$$empty_fix; \
     521          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     522            $$tags $$unique; \
     523        fi
    301524ctags: CTAGS
    302 CTAGS: $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     525CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
    303526                $(TAGS_FILES) $(LISP)
    304527        tags=; \
     
    349572          fi; \
    350573        done
     574        list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
     575          if test "$$subdir" = .; then :; else \
     576            test -d "$(distdir)/$$subdir" \
     577            || mkdir "$(distdir)/$$subdir" \
     578            || exit 1; \
     579            (cd $$subdir && \
     580              $(MAKE) $(AM_MAKEFLAGS) \
     581                top_distdir="../$(top_distdir)" \
     582                distdir="../$(distdir)/$$subdir" \
     583                distdir) \
     584              || exit 1; \
     585          fi; \
     586        done
    351587check-am: all-am
    352 check: check-am
     588check: check-recursive
    353589all-am: Makefile $(PROGRAMS) $(HEADERS)
    354 installdirs:
    355         $(mkdir_p) $(DESTDIR)$(bindir)
    356 install: install-am
    357 install-exec: install-exec-am
    358 install-data: install-data-am
    359 uninstall: uninstall-am
     590installdirs: installdirs-recursive
     591installdirs-am:
     592        for dir in "$(DESTDIR)$(bindir)"; do \
     593          test -z "$$dir" || $(mkdir_p) "$$dir"; \
     594        done
     595install: install-recursive
     596install-exec: install-exec-recursive
     597install-data: install-data-recursive
     598uninstall: uninstall-recursive
    360599
    361600install-am: all-am
    362601        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
    363602
    364 installcheck: installcheck-am
     603installcheck: installcheck-recursive
    365604install-strip:
    366605        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
     
    378617        @echo "This command is intended for maintainers to use"
    379618        @echo "it deletes files that may require special tools to rebuild."
    380 clean: clean-am
     619clean: clean-recursive
    381620
    382621clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
    383622
    384 distclean: distclean-am
     623distclean: distclean-recursive
    385624        -rm -rf ./$(DEPDIR)
    386625        -rm -f Makefile
     
    388627        distclean-tags
    389628
    390 dvi: dvi-am
     629dvi: dvi-recursive
    391630
    392631dvi-am:
    393632
    394 html: html-am
    395 
    396 info: info-am
     633html: html-recursive
     634
     635info: info-recursive
    397636
    398637info-am:
     
    402641install-exec-am: install-binPROGRAMS
    403642
    404 install-info: install-info-am
     643install-info: install-info-recursive
    405644
    406645install-man:
     
    408647installcheck-am:
    409648
    410 maintainer-clean: maintainer-clean-am
     649maintainer-clean: maintainer-clean-recursive
    411650        -rm -rf ./$(DEPDIR)
    412651        -rm -f Makefile
    413652maintainer-clean-am: distclean-am maintainer-clean-generic
    414653
    415 mostlyclean: mostlyclean-am
     654mostlyclean: mostlyclean-recursive
    416655
    417656mostlyclean-am: mostlyclean-compile mostlyclean-generic
    418657
    419 pdf: pdf-am
     658pdf: pdf-recursive
    420659
    421660pdf-am:
    422661
    423 ps: ps-am
     662ps: ps-recursive
    424663
    425664ps-am:
     
    427666uninstall-am: uninstall-binPROGRAMS uninstall-info-am
    428667
    429 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
    430         clean-generic ctags distclean distclean-compile \
    431         distclean-generic distclean-tags distdir dvi dvi-am html \
     668uninstall-info: uninstall-info-recursive
     669
     670.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
     671        clean clean-binPROGRAMS clean-generic clean-recursive ctags \
     672        ctags-recursive distclean distclean-compile distclean-generic \
     673        distclean-recursive distclean-tags distdir dvi dvi-am html \
    432674        html-am info info-am install install-am install-binPROGRAMS \
    433675        install-data install-data-am install-exec install-exec-am \
    434676        install-info install-info-am install-man install-strip \
    435         installcheck installcheck-am installdirs maintainer-clean \
    436         maintainer-clean-generic mostlyclean mostlyclean-compile \
    437         mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
    438         uninstall-am uninstall-binPROGRAMS uninstall-info-am
    439 
    440 
    441 #  uncomment the following if bencoder requires the math library
     677        installcheck installcheck-am installdirs installdirs-am \
     678        maintainer-clean maintainer-clean-generic \
     679        maintainer-clean-recursive mostlyclean mostlyclean-compile \
     680        mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \
     681        tags tags-recursive uninstall uninstall-am \
     682        uninstall-binPROGRAMS uninstall-info-am
     683
     684
     685#  uncomment the following if orxonox requires the math library
    442686#orxonox_LDADD=-lm
    443687
  • orxonox/branches/sound/src/ability.h

    r2043 r3238  
    11
    2 #ifndef ABILITY_H
    3 #define ABILITY_H
     2#ifndef _ABILITY_H
     3#define _ABILITY_H
    44
    55#include "data_tank.h"
     
    1414};
    1515
    16 #endif
     16#endif /* _ABILITY_H */
  • orxonox/branches/sound/src/ai.h

    r1956 r3238  
    11
    2 #ifndef AI_H
    3 #define AI_H
     2#ifndef _AI_H
     3#define _AI_H
    44
    55#include "data_tank.h"
     
    1313};
    1414
    15 #endif
     15#endif /* _AI_H */
  • orxonox/branches/sound/src/base_entity.h

    r2551 r3238  
    11
    2 #ifndef BASE_ENTITY_H
    3 #define BASE_ENTITY_H
     2#ifndef _BASE_ENTITY_H
     3#define _BASE_ENTITY_H
    44
    55#include "stdincl.h"
     
    1414};
    1515
    16 #endif
     16#endif /* _BASE_ENTITY_H */
  • orxonox/branches/sound/src/camera.cc

    r2636 r3238  
    3030{
    3131  this->world = world;
    32   bound = NULL;
     32  this->bound = NULL;
    3333  /* 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;
    4747}
    4848
     
    6161   as smooth camera movement or swaying).
    6262*/
    63 void Camera::time_slice (Uint32 deltaT)
    64 {
    65   if(t <= deltaTime)
    66     {t += deltaT;}
     63void Camera::timeSlice (Uint32 deltaT)
     64{
     65  if( this->t <= deltaTime)
     66    {this->t += deltaT;}
    6767  //printf("time is: t=%f\n", t );
    68   update_desired_place ();
    69   jump (NULL);
     68  updateDesiredPlace();
     69  jump(NULL);
    7070}
    7171
     
    7676   bound entity's position on the track.
    7777*/
    78 void Camera::update_desired_place ()
     78void Camera::updateDesiredPlace ()
    7979{
    8080  switch(cameraMode)
     
    8989        if( bound != NULL)
    9090          {
    91             bound->get_lookat (&lookat);
    92             orx->get_world()->calc_camera_pos (&lookat, &plFocus);
     91            bound->getLookat (&lookat);
     92            orx->getWorld()->calcCameraPos (&lookat, &plFocus);
    9393            Quaternion *fr;
    9494            if(t < 20.0)
     
    101101               
    102102                Vector op(1.0, 0.0, 0.0);
    103                 float angle = angle_deg(op, *start);
     103                float angle = angleDeg(op, *start);
    104104                printf("angle is: %f\n", angle);
    105105
     
    144144
    145145            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);
    149149            //plLastBPlace = *bound->get_placement();
    150150          }
     
    153153    case SMOTH_FOLLOW:
    154154      {
    155         Placement *plBound = bound->get_placement();
     155        Placement *plBound = bound->getPlacement();
    156156        Location lcBound;
    157157        if(bound != null)
    158158          {
    159             bound->get_lookat(&lcBound);
     159            bound->getLookat(&lcBound);
    160160            Vector vDirection(0.0, 0.0, 1.0);
    161161            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);
    163163          }
    164164        break;
     
    169169        if(bound != null)
    170170          {
    171             Placement *plBound = bound->get_placement();
     171            Placement *plBound = bound->getPlacement();
    172172            Vector vDirection(0.0, 0.0, 1.0);
    173173            Vector eclipticOffset(0.0, 0.0, 5.0);
    174174            vDirection = plBound->w.apply(vDirection);
    175             desired_place.r = plBound->r - vDirection*10 + eclipticOffset;
     175            desiredPlace.r = plBound->r - vDirection*10 + eclipticOffset;
    176176          }
    177177        break;
     
    182182      if( bound != NULL && world != NULL )
    183183        {
    184           bound->get_lookat (&lookat);
    185           world->calc_camera_pos (&lookat, &desired_place);
     184          bound->getLookat (&lookat);
     185          world->calcCameraPos (&lookat, &desiredPlace);
    186186        }
    187187      else
    188188        {
    189           desired_place.r = Vector (0,0,0);
    190           desired_place.w = Quaternion ();
     189          desiredPlace.r = Vector (0,0,0);
     190          desiredPlace.w = Quaternion ();
    191191        }
    192192      break;
     
    206206  // view
    207207  // 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 
    209211  //Vector up(0,0,1);
    210212  //Vector dir(1,0,0);
     
    235237  // rotation
    236238  float matrix[4][4];
    237   actual_place.w.conjugate().matrix (matrix);
     239  actualPlace.w.conjugate().matrix (matrix);
    238240  /* orientation and */
    239241  glMultMatrixf ((float*)matrix);
    240242  /*  translation */
    241   glTranslatef (-actual_place.r.x, -actual_place.r.y,- actual_place.r.z);
    242   //Placement *plBound = bound->get_placement();
     243  glTranslatef (-actualPlace.r.x, -actualPlace.r.y,- actualPlace.r.z);
     244//Placement *plBound = bound->get_placement();
    243245
    244246  // ===== second camera control calculation option
    245247  /*
    246     gluLookAt(actual_place.r.x, actual_place.r.y, actual_place.r.z,
     248   gluLookAt(actual_place.r.x, actual_place.r.y, actual_place.r.z,
    247249              plBound->r.x, plBound->r.y, plBound->r.z,
    248250              0.0, 0.0, 1.0);
     
    263265  if( plc == NULL)
    264266    {
    265       actual_place = desired_place;
     267      actualPlace = desiredPlace;
    266268      //printf("Camera|jump: camer@ %f, %f, %f\n\n", actual_place.r.x, actual_place.r.y, actual_place.r.z);
    267269    }
    268270  else
    269271    {
    270       desired_place = *plc;
    271       actual_place = *plc;
     272      desiredPlace = *plc;
     273      actualPlace = *plc;
    272274    }
    273275}
     
    277279  \param entity: The enitity to bind the camera to
    278280       
    279         This sets the focus of the camera to the given entity. This means that it will use the given WorldEntity's
    280         Location and get_lookat() to determine the viewpoint the camera will render from.
    281         Note that you cannot bind a camera to a free entity.
     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.
    282284*/
    283285void Camera::bind (WorldEntity* entity)
     
    285287  if( entity != NULL)
    286288    {
    287       if( entity->isFree ()) printf("Cannot bind camera to free entity");
     289      if( entity->isFree()) printf("Cannot bind camera to free entity");
    288290      else
    289291        {
    290           bound = entity;
     292          this->bound = entity;
    291293        }
    292294    }
     
    298300  this->world = world;
    299301}
     302
     303
     304/**
     305   \brief destroy, reset the camera so that it doesn't perform anything anymore
     306
     307*/
     308void Camera::destroy()
     309{
     310  this->bound = NULL;
     311  this->world = NULL;
     312}
  • orxonox/branches/sound/src/camera.h

    r2636 r3238  
    44*/
    55
    6 #ifndef CAMERA_H
    7 #define CAMERA_H
     6#ifndef _CAMERA_H
     7#define _CAMERA_H
    88
    99#include "stdincl.h"
     
    2626 private:
    2727  WorldEntity* bound;           //!< the WorldEntity the Camera is bound to
    28   Placement actual_place;               //!< the Camera's current position
    29   Placement desired_place;        //!< where the Camera should be according to calculations
     28  Placement actualPlace;                //!< the Camera's current position
     29  Placement desiredPlace;        //!< where the Camera should be according to calculations
    3030  World* world;
    3131 
     
    5454  CAMERA_MODE cameraMode; //!< saves the camera mode: how the camera follows the entity
    5555 
    56   void update_desired_place ();
     56  void updateDesiredPlace ();
    5757 
    5858 public:
     
    6060  ~Camera ();
    6161 
    62   void time_slice (Uint32 deltaT);
     62  void timeSlice (Uint32 deltaT);
    6363  void apply ();
    6464  void bind (WorldEntity* entity);
    6565  void jump (Placement* plc);
     66  void destroy();
    6667
    6768  void setWorld(World* world); 
     
    6970};
    7071
    71 #endif
     72#endif /* _CAMERA_H */
  • orxonox/branches/sound/src/campaign.cc

    r2636 r3238  
    2727Campaign::Campaign ()
    2828{
    29   this->entities = new List<StoryEntity>();
     29  this->entities = new ListTemplate<StoryEntity>();
    3030  this->isInit = false;
    3131}
     
    3434
    3535
    36 Error Campaign::init()
     36ErrorMessage Campaign::init()
    3737{
    3838  this->isInit = true;
     
    4848    want to queue up in the campaign.
    4949*/
    50 void Campaign::addEntity(StoryEntity* se, Uint32 storyID)
     50void Campaign::addEntity(StoryEntity* se, int storyID)
    5151{
    5252  se->setStoryID(storyID);
     
    6060
    6161
    62 void Campaign::removeEntity(Uint32 storyID)
     62void Campaign::removeEntity(int storyID)
    6363{
    6464  this->removeEntity(this->getStoryEntity(storyID));
     
    7373
    7474
    75 Error Campaign::start()
     75ErrorMessage Campaign::start()
    7676{
    7777  this->start(0);
    7878}
    7979
    80 Error Campaign::start(Uint32 storyID = 0)
     80ErrorMessage Campaign::start(int storyID = 0)
    8181{
    8282  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;
    8686  this->running = true;
    8787  StoryEntity* se = this->getStoryEntity(storyID);
    88   while(se != NULL && this->running)
     88  this->currentEntity = se;
     89  while( se != NULL && this->running)
    8990    {
    90       se = this->getStoryEntity(storyID);
    91       this->currentEntity = se;
    92      
    93       se->displayEntityScreen();
     91      se->displayLoadScreen();
    9492      se->load();
    9593      se->init();
    96       se->releaseEntityScreen();
     94      se->releaseLoadScreen();
    9795      se->start();
     96      se->destroy();
     97     
     98      delete se;
    9899
    99100      int nextWorldID = se->getNextStoryID();
    100       if(nextWorldID == WORLD_ID_GAMEEND) return errorCode;
     101      //printf("Campaing::start() - got nextWorldID = %i\n", nextWorldID);
    101102      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     
    104112    }
    105113}
    106114
    107 Error Campaign::stop()
     115ErrorMessage Campaign::stop()
    108116{
    109117  this->running = false;
     
    111119    {
    112120      this->currentEntity->stop();
    113       delete this->currentEntity;
    114       this->currentEntity = NULL;
     121      //delete this->currentEntity;
     122      //this->currentEntity = NULL;
    115123    }
    116124}
    117125
    118 Error Campaign::pause()
     126ErrorMessage Campaign::pause()
    119127{
    120128  if(this->currentEntity != NULL)
     
    123131
    124132
    125 Error Campaign::resume()
     133ErrorMessage Campaign::resume()
    126134{
    127135  if(this->currentEntity != NULL)
     
    130138
    131139
     140void 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*/
    132153void Campaign::nextLevel()
    133154{
    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();
    138160}
    139161
     162/*
     163  \brief change to the previous level - not implemented
     164
     165  this propably useless
     166*/
    140167void Campaign::previousLevel()
    141168{}
    142169
    143170
    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*/
     176StoryEntity* Campaign::getStoryEntity(int storyID)
    145177{
    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(); 
    149184  while( l != NULL)
    150185    {
    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        }
    155195    }
    156196  return NULL;
  • orxonox/branches/sound/src/campaign.h

    r2636 r3238  
    11
    2 #ifndef CAMPAIGN_H
    3 #define CAMPAIGN_H
     2#ifndef _CAMPAIGN_H
     3#define _CAMPAIGN_H
    44
    55#include "stdincl.h"
     
    1717  StoryEntity* currentEntity;
    1818
    19   virtual Error init();
    20   virtual Error start();
    21   virtual Error start(Uint32 storyID);
    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();
    2525
    26   void addEntity(StoryEntity* se, Uint32 storyID);
     26  virtual void destroy();
     27
     28  void addEntity(StoryEntity* se, int storyID);
    2729  void addEntity(StoryEntity* se);
    28   void removeEntity(Uint32 storyID);
     30  void removeEntity(int storyID);
    2931  void removeEntity(StoryEntity* se);
    3032 
     
    3335
    3436 private:
    35   List<StoryEntity>* entities;
     37  ListTemplate<StoryEntity>* entities;
    3638  bool running;
    3739
    38   StoryEntity* getStoryEntity(Uint32 storyID);
     40  StoryEntity* getStoryEntity(int storyID);
    3941};
    4042
    41 #endif
     43#endif /* _CAMPAIGN_H */
  • orxonox/branches/sound/src/collision.cc

    r2190 r3238  
    2828CollisionCluster::CollisionCluster (float rad = 1.0, Vector mid = Vector(0,0,0))
    2929{
    30   root = (CC_Tree*) malloc( sizeof( CC_Tree));
     30  root = (CCTree*) malloc( sizeof( CCTree));
    3131  root->n = 0;
    3232  root->data.ID = 0;
     
    6262  }
    6363 
    64   root = load_CC_Tree (stream);
     64  root = loadCCTree (stream);
    6565  fclose (stream);
    6666}
     
    7171CollisionCluster::~CollisionCluster ()
    7272{
    73   free_CC_Tree( root);
     73  freeCCTree(root);
    7474}
    7575
     
    8585  stream = fopen( filename, "wb");
    8686  if( stream == NULL) return -1;
    87   r = save_CC_Tree (root, stream);
     87  r = saveCCTree(root, stream);
    8888  fclose (stream);
    8989  return r;
     
    9999   \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
    100100*/
    101 bool check_trace (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Line* trace, Vector* impactpoint)
    102 {
    103         CC_Tree* t;
     101bool checkTrace (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Line* trace, Vector* impactpoint)
     102{
     103        CCTree* t;
    104104        if( (t = a->root) == NULL) return false;
    105105       
    106   return cctree_trace( pa, t, ahitflags, trace, impactpoint);
     106  return ccTreeTrace( pa, t, ahitflags, trace, impactpoint);
    107107}
    108108
     
    118118   If true is returned, all flags in ahitflags and bhitflags that symbolize intersecting subspheres in the respective CollisionCluster are set
    119119*/
    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;
     120bool checkCollision (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Placement* pb, const CollisionCluster* b, unsigned long* bhitflags)
     121{
     122  CCTree* ta, *tb;
    123123  if( (ta = a->root) == NULL) return false;
    124124  if( (tb = b->root) == NULL) return false;
    125125 
    126   return cctree_iterate(pa, ta, ahitflags, pb, tb, bhitflags);
     126  return ccTreeIterate(pa, ta, ahitflags, pb, tb, bhitflags);
    127127}
    128128
     
    135135   \return true on intersection, false otherwise
    136136*/
    137 bool sphere_sphere_collision( Vector m1, float r1, Vector m2, float r2)
     137bool sphereSphereCollision( Vector m1, float r1, Vector m2, float r2)
    138138{
    139139  if ((m1-m2).len() < r1+r2) return true;
     
    149149   \return true on intersection, false otherwise. If true is returned, impactpoint is set to the loaction where the intersection occured
    150150*/
    151 bool trace_sphere_collision( Vector m, float r, const Line* l, Vector* impactpoint)
     151bool traceSphereCollision( Vector m, float r, const Line* l, Vector* impactpoint)
    152152{
    153153  float A, B, C, D, t[2];
     
    176176}
    177177
    178 bool cctree_iterate(const Placement* pa, CC_Tree* ta, unsigned long* ahitflags, const Placement* pb, CC_Tree* tb, unsigned long* bhitflags)
     178bool ccTreeIterate(const Placement* pa, CCTree* ta, unsigned long* ahitflags, const Placement* pb, CCTree* tb, unsigned long* bhitflags)
    179179{
    180180  bool r = false;
     
    182182  Vector mra = pa->r + pa->w.apply(ta->m);
    183183  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))
    189189  {
    190190    if( ta->n == 0 && tb->n == 0)
     
    196196    for( ia = 0; ia < ta->n || ta->n == 0; ia++)
    197197    {
    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];
    200200      for( ib = 0; ib < tb->n || ta->n == 0; ib++)
    201201      {
    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];
    204204       
    205         r = r || cctree_iterate( pa, use_a, ahitflags, pb, use_b, bhitflags);
     205        r = r || ccTreeIterate( pa, useA, ahitflags, pb, useB, bhitflags);
    206206       
    207207        if( tb->n == 0) break;
     
    233233
    234234/**
    235    \brief frees the memory allocated in a CC_Tree
    236 */
    237 void free_CC_Tree( CC_Tree* tree)
     235   \brief frees the memory allocated in a CCTree
     236*/
     237void freeCCTree( CCTree* tree)
    238238{
    239239  if (tree == NULL) return;
    240240  for (int i = 0; i < tree->n; i++)
    241241  {
    242     free_CC_Tree( tree->data.b[i]);
     242    freeCCTree(tree->data.b[i]);
    243243  }
    244244  free( tree);
     
    246246
    247247/**
    248    \brief loads a CC_Tree from a stream
    249 */
    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*/
     250CCTree* loadCCTree (FILE* stream)
     251{
     252  CCTree* tree = NULL;
     253  CCTree** branches = NULL;
    254254  float buf[4];
    255255  unsigned long n;
     
    267267  else
    268268  {
    269     branches = (CC_Tree**)malloc( sizeof(CC_Tree*) * n);
     269    branches = (CCTree**)malloc( sizeof(CCTree*) * n);
    270270    for( int i = 0; i < n; i++)
    271271    {
    272       if ((branches[i] = load_CC_Tree (stream)) == NULL)
     272      if ((branches[i] = loadCCTree (stream)) == NULL)
    273273      {
    274274        for( int j = 0; j < i; j++)
    275275        {
    276           free_CC_Tree (branches[j]);
    277           free (branches);
     276          freeCCTree (branches[j]);
     277          free(branches);
    278278          return NULL;
    279279        }
     
    283283 
    284284  // assemble
    285   tree = (CC_Tree*) malloc (sizeof(CC_Tree));
     285  tree = (CCTree*) malloc (sizeof(CCTree));
    286286  tree->m.x = buf[0];
    287287  tree->m.y = buf[1];
     
    297297
    298298/**
    299    \brief saves a CC_Tree to a stream
    300 */
    301 int save_CC_Tree (CC_Tree* tree, FILE* stream)
     299   \brief saves a CCTree to a stream
     300*/
     301int saveCCTree (CCTree* tree, FILE* stream)
    302302{
    303303  float buf[4];
     
    321321    for( int i = 0; i < tree->n; i++)
    322322    {
    323       if ( save_CC_Tree (tree->data.b[i], stream) == -1) return -1;
     323      if ( saveCCTree (tree->data.b[i], stream) == -1) return -1;
    324324    }
    325325  }
     
    329329}
    330330
    331 bool cctree_trace( const Placement* p, CC_Tree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint)
     331bool ccTreeTrace( const Placement* p, CCTree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint)
    332332{
    333333  bool r = false;
    334334  int i;
    335335  Vector mr = p->r + p->w.apply (t->m);
    336   CC_Tree* use_t;
     336  CCTree* useT;
    337337  Vector* ips;
    338338  unsigned long* hfs;
    339339 
    340   if( trace_sphere_collision (mr, t->r, trace, impactpoint))
     340  if( traceSphereCollision (mr, t->r, trace, impactpoint))
    341341  {
    342342        if( t->n == 0)
     
    352352                for (i = 0; i < t->n; i++)
    353353                {
    354                         r = r || cctree_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]));
    355355                }
    356356                if( r)
  • orxonox/branches/sound/src/collision.h

    r2190 r3238  
    44*/
    55
    6 #ifndef COLLISION_H
    7 #define COLLISION_H
     6#ifndef _COLLISION_H
     7#define _COLLISION_H
    88
    99#include "vector.h"
     
    1414
    1515//! Tree structure used by the CollisionCluster
    16 typedef struct CC_Tree
     16typedef struct CCTree
    1717{
    1818  unsigned long n;
    1919  union
    2020  {
    21   struct CC_Tree** b;
     21  struct CCTree** b;
    2222  unsigned long ID;
    2323  } data;
    2424  float r;
    2525  Vector m;
    26 } CC_Tree;
     26} CCTree;
    2727
    2828//! Basic collision detection class
     
    4242class CollisionCluster {
    4343 
    44   CC_Tree* root;
     44  CCTree* root;
    4545 
    4646 
     
    5252  int store (char* filename);
    5353 
    54   friend bool cctree_trace( const Placement* p, CC_Tree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint);
    55   friend bool cctree_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);
    5858};
    5959
    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);
     60bool sphereSphereCollision( Vector m1, float r1, Vector m2, float r2);
     61bool traceSphereCollision( Vector m, float r, const Line* l, Vector* impactpoint);
    6262
    6363void setflag( unsigned long* flags, unsigned long ID);
    6464
    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);
     65void freeCCTree( CCTree* tree);
     66CCTree* loadCCTree (FILE* stream);
     67int saveCCTree (CCTree* tree, FILE* stream);
    6868
    69 #endif
     69#endif /* _COLLISION_H */
  • orxonox/branches/sound/src/command_node.cc

    r2636 r3238  
    1111   ### File Specific:
    1212   main-programmer: Christian Meyer
    13    co-programmer: ...
     13   co-programmer: Patrick Boenzli
    1414*/
    1515
     
    2020#include "world_entity.h"
    2121#include "game_loader.h"
     22#include "world.h"
    2223
    2324#include <stdio.h>
     
    3334CommandNode::CommandNode (int ID)
    3435{
    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;
    3942}
    4043
     
    4548CommandNode::CommandNode (char* filename = DEFAULT_KEYBIND_FILE)
    4649{
    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);
    5257}
    5358
     
    5863{
    5964  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
     78void 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
     86void 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*/
     100void CommandNode::addToWorld(World* world)
     101{
     102  this->world = world;
     103}
     104
    62105
    63106/**
     
    65108   \param filename: The path and name of the file to load the bindings from
    66109*/
    67 void CommandNode::load_bindings (char* filename)
     110void CommandNode::loadBindings (char* filename)
    68111{
    69112  FILE* stream;
     
    82125  // create parser
    83126  IniParser parser (filename);
    84   if( parser.get_section ("Bindings") == -1)
     127  if( parser.getSection ("Bindings") == -1)
    85128    {
    86129      printf("Could not find key bindings in %s\n", filename);
     
    96139  int* index;
    97140 
    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);
    101144      switch( index[0])
    102145        {
    103146        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);
    105148          strcpy (aliases->keys[index[1]], valuebuf);
    106149          break;
    107150        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);
    109152          strcpy (aliases->buttons[index[1]], valuebuf);
    110153          break;
     
    123166void CommandNode::bind (WorldEntity* entity)
    124167{
    125   bound->add (entity, LIST_ADD_NEXT, true);
     168  bound->add (entity);
    126169}
    127170
     
    132175void CommandNode::unbind (WorldEntity* entity)
    133176{
    134   bound->remove (entity, LIST_FIND_FW);
    135 }
    136 
    137 int* CommandNode::name_to_index (char* name)
     177  bound->remove (entity);
     178}
     179
     180int* CommandNode::nameToIndex (char* name)
    138181{
    139182  coord[0] = -1;
    140183  coord[1] = -1;
    141184  int c;
    142   if( (c = keyname_to_SDLK (name)) != -1)
     185  if( (c = keynameToSDLK (name)) != -1)
    143186    {
    144187      coord[1] = c;
    145188      coord[0] = 0;
    146189    }
    147   if( (c = buttonname_to_SDLB (name)) != -1)
     190  if( (c = buttonnameToSDLB (name)) != -1)
    148191    {
    149192      coord[1] = c;
     
    158201void CommandNode::process ()
    159202{
    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
     210void CommandNode::processLocal ()
    165211{
    166212  SDL_Event event;
    167213  Command cmd;
    168  
    169214  while( SDL_PollEvent (&event))
    170215    {
     
    175220          strcpy (cmd.cmd, aliases->keys[event.key.keysym.sym]);
    176221          cmd.bUp = false;
    177           if( strlen (cmd.cmd) > 0) relay (&cmd);
     222          if( strlen (cmd.cmd) > 0) relay(&cmd);
    178223          break;
    179224        case SDL_KEYUP:
    180225          strcpy( cmd.cmd, aliases->keys[event.key.keysym.sym]);
    181226          cmd.bUp = true;
    182           if( strlen (cmd.cmd) > 0) relay (&cmd);
     227          if( strlen (cmd.cmd) > 0) relay(&cmd);
    183228          break;
    184229        case SDL_MOUSEMOTION:
     
    192237          strcpy( cmd.cmd, aliases->buttons[event.button.button]);
    193238          cmd.bUp = true;
    194           if( strlen (cmd.cmd) > 0) relay (&cmd);
     239          if( strlen (cmd.cmd) > 0) relay(&cmd);
    195240          break;
    196241        case SDL_MOUSEBUTTONDOWN:
    197242          strcpy( cmd.cmd, aliases->buttons[event.button.button]);
    198243          cmd.bUp = false;
    199           if( strlen (cmd.cmd) > 0) relay (&cmd);
     244          if( strlen (cmd.cmd) > 0) relay(&cmd);
    200245          break;
    201246        case SDL_JOYAXISMOTION:
     
    207252        default:
    208253          Orxonox *orx = Orxonox::getInstance();
    209           orx->event_handler (&event);
    210          
     254          orx->eventHandler(&event);
    211255          break;
    212256        }
     
    214258}
    215259
    216 void CommandNode::process_network ()
    217 {
    218 
    219 }
     260
     261void CommandNode::processNetwork ()
     262{
     263
     264}
     265
    220266
    221267void CommandNode::relay (Command* cmd)
    222268{
    223   //printf("CommandNode|relay()\n");
    224   List<WorldEntity>* plist = bound;
    225  
     269
    226270  Orxonox *orx = Orxonox::getInstance();
    227   if( orx->system_command (cmd)) return;
     271  if( orx->systemCommand (cmd)) return;
     272
    228273  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
    238288
    239289/**
     
    241291   \param ID: the new ID to use
    242292*/
    243 void CommandNode::set_netID (int ID)
     293void CommandNode::setNetID (int ID)
    244294{
    245295  netID = ID;
    246296}
    247297
    248 void CommandNode::send_over_network (Command* cmd)
    249 {
    250 }
     298void CommandNode::sendOverNetwork (Command* cmd)
     299{
     300}
  • orxonox/branches/sound/src/command_node.h

    r2190 r3238  
    66*/
    77
    8 #ifndef COMMAND_NODE_H
    9 #define COMMAND_NODE_H
     8#ifndef _COMMAND_NODE_H
     9#define _COMMAND_NODE_H
    1010
    1111#include "stdincl.h"
    1212
    1313class WorldEntity;
     14class World;
    1415
    1516#define N_STD_KEYS SDLK_LAST
     
    1920//! Key aliasing structure
    2021/**
    21         This structure contains the key aliasing information, e.g. the command strings that
    22         have been bound to the keys.
     22   This structure contains the key aliasing information, e.g. the command strings that
     23   have been bound to the keys.
    2324*/
    2425typedef struct
    2526{
    26         char keys[N_STD_KEYS][CMD_LENGHT];
    27         char buttons[N_BUTTONS][CMD_LENGHT];
     27  char keys[N_STD_KEYS][CMD_LENGHT];
     28  char buttons[N_BUTTONS][CMD_LENGHT];
    2829} KeyBindings;
    2930
    3031//! Command Node
    3132/**
    32         This class gathers all incoming SDL_Events and processes them. Keyboard, mouse and joystick input is
    33         captured and translated into command messages which are passed down to the bound WorldEntities (via WorldEntity::command()).
    34         Other SDL_Events are passed to Orxonox::event_handler() to deal with them. If the CommandNode has been created
    35         with bLocalInput set to false, it will query the network class for incoming commands that match his netID and pass
    36         them on to it's WorldEntities.
     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.
    3738*/
    3839class CommandNode {
    3940 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 
    5256 public:
    5357  CommandNode (int ID);
    5458  CommandNode (char* filename);
    5559  ~CommandNode ();
    56  
    57   void load_bindings (char* filename);
     60
     61  void reset ();
     62  void enable (bool bEnabled);
     63  void loadBindings (char* filename);
    5864  void bind (WorldEntity* entity);
    5965  void unbind (WorldEntity* entity);
     66  void addToWorld (World* world);
    6067  void process ();
    6168 
    62   void set_netID (int ID);
     69  void setNetID (int ID);
    6370};
    6471
    65 #endif
     72#endif /* _COMMAND_NODE_H */
  • orxonox/branches/sound/src/coordinates.h

    r2551 r3238  
    44*/
    55
    6 #ifndef COORDINATES_H
    7 #define COORDINATES_H
     6#ifndef _COORDINATES_H
     7#define _COORDINATES_H
    88
    99#include "vector.h"
     
    3434} Placement;
    3535
    36 #endif
     36#endif /* _COORDINATS_H */
  • orxonox/branches/sound/src/data_tank.h

    r2190 r3238  
    11
    2 #ifndef DATA_TANK_H
    3 #define DATA_TANK_H
     2#ifndef _DATA_TANK_H
     3#define _DATA_TANK_H
    44
    55
     
    1212};
    1313
    14 #endif
     14#endif /* _DATA_TANK_H */
  • orxonox/branches/sound/src/environment.cc

    r2036 r3238  
    1616*/
    1717
    18 #include <iostream>
    19 #include <GL/glut.h>
    20 #include <stdlib.h>
    21 
    22 #include "data_tank.h"
    2318
    2419#include "environment.h"
     20#include "stdincl.h"
     21#include "world_entity.h"
     22#include "vector.h"
    2523
    2624using namespace std;
     
    3028#define LEVEL_LENGTH 500
    3129
    32 Environment::Environment ()
    33   : WorldEntity()
     30Environment::Environment () : WorldEntity()
    3431{
    3532
     
    6057Environment::~Environment () {}
    6158
     59void Environment::tick (float time) {}
    6260
     61void Environment::hit (WorldEntity* weapon, Vector loc) {}
     62
     63void Environment::destroy () {}
     64
     65void Environment::collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags) {}
     66
     67void 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/*
    6398void Environment::paint()
    6499{
    65   /*
     100 
    66101  glPushMatrix();
    67102  //glScalef(0.5, 0.5, 1.0);
     
    95130 
    96131  glPopMatrix();
    97   */
     132 
    98133}
    99134
     
    103138}
    104139
     140*/
  • orxonox/branches/sound/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
    73
    84#include "world_entity.h"
    95
    10 class Environment : public WorldEntity {
     6
     7class Environment : public WorldEntity
     8{
     9  friend class World;
    1110
    1211 private:
     
    2120  ~Environment ();
    2221
    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 ();
    2728
    2829};
    2930
    30 #endif
     31#endif /* _ENVIRONEMENT_H */
  • orxonox/branches/sound/src/error.h

    r2644 r3238  
    2222*/
    2323
    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
    2732
    2833/*!
     
    5459  char* message;
    5560  char* location;
    56 } Error;
     61} ErrorMessage;
     62
     63#endif /* _ERROR_H */
  • orxonox/branches/sound/src/game_loader.cc

    r2636 r3238  
    4242
    4343
     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*/
    4450GameLoader* GameLoader::getInstance()
    4551{
     
    5056
    5157
    52 Error GameLoader::init()
     58ErrorMessage GameLoader::init()
    5359{
    5460  if(this->currentCampaign != NULL)
     
    5763
    5864
    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*/
     72ErrorMessage GameLoader::loadCampaign(char* name)
     73{
     74  ErrorMessage errorCode;
    6275 
    6376  this->currentCampaign = this->fileToCampaign(name);
    6477}
    6578
    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*/
     85ErrorMessage GameLoader::loadDebugCampaign(Uint32 campaignID)
    6786{
    6887  switch(campaignID)
     
    7291      {
    7392        Campaign* debugCampaign = new Campaign();
     93
    7494        World* world0 = new World(DEBUG_WORLD_0);
    75         world0->setNextStoryID(DEBUG_WORLD_1);
     95        world0->setNextStoryID(WORLD_ID_1);
    7696        debugCampaign->addEntity(world0, WORLD_ID_0);
     97
    7798        World* world1 = new World(DEBUG_WORLD_1);
    7899        world1->setNextStoryID(WORLD_ID_GAMEEND);
     
    85106}
    86107
    87 Error GameLoader::start()
     108ErrorMessage GameLoader::start()
    88109{
    89110  if(this->currentCampaign != NULL)
     
    92113
    93114
    94 Error GameLoader::stop()
     115ErrorMessage GameLoader::stop()
    95116{
    96117  if(this->currentCampaign != NULL)
     
    100121
    101122
    102 Error GameLoader::pause()
     123ErrorMessage GameLoader::pause()
    103124{
    104125  this->isPaused = true;
     
    108129
    109130
    110 Error GameLoader::resume()
     131ErrorMessage GameLoader::resume()
    111132{
    112133  this->isPaused = false;
     
    115136}
    116137
    117 Error GameLoader::free()
     138/**
     139   \brief release the mem
     140 */
     141ErrorMessage GameLoader::destroy()
    118142{}
    119143
    120144
    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*/
    124152Campaign* GameLoader::fileToCampaign(char *name)
    125153{
     
    134162   \brief handle keyboard commands
    135163   \param cmd: the command to handle
    136    \return true if the command was handled by the system
     164   \returns true if the command was handled by the system
    137165*/
    138166bool GameLoader::worldCommand (Command* cmd)
     
    165193      return true;
    166194    }
     195  else if( !strcmp( cmd->cmd, "quit"))
     196    {
     197      if( !cmd->bUp) this->stop();
     198      return true;
     199    }
    167200  return false;
    168201}
    169202
     203
     204/*
     205  \brief this changes to the next level
     206*/
    170207void GameLoader::nextLevel()
    171208{
     
    174211}
    175212
     213
     214/*
     215  \brief change to the previous level - not implemented
     216
     217  this propably useless
     218*/
    176219void GameLoader::previousLevel()
    177220{
  • orxonox/branches/sound/src/game_loader.h

    r2636 r3238  
    1 #ifndef GAME_LOADER_H
    2 #define GAME_LOADER_H
     1#ifndef _GAME_LOADER_H
     2#define _GAME_LOADER_H
    33
    44#include "stdincl.h"
     
    2020  static GameLoader* getInstance();
    2121
    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();
    2929
    3030  void nextLevel();
     
    3232
    3333  bool worldCommand(Command* cmd);
    34   Error loadDebugCampaign(Uint32 campaignID);
     34  ErrorMessage loadDebugCampaign(Uint32 campaignID);
    3535 
    3636 private:
     
    4747};
    4848
    49 #endif
     49#endif /* _GAME_LOADER_H */
  • orxonox/branches/sound/src/ini_parser.cc

    r2551 r3238  
    2525IniParser::IniParser (char* filename)
    2626{
    27         stream = NULL;
    28         bInSection = false;
    29         open_file (filename);
     27  stream = NULL;
     28  bInSection = false;
     29  openFile(filename);
    3030}
    3131
     
    3535IniParser::~IniParser ()
    3636{
    37         if( stream != NULL) fclose (stream);
     37  if( stream != NULL) fclose (stream);
    3838}
    3939
    4040/**
    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;
     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;
    4444*/
    45 int IniParser::open_file( char* filename)
     45int IniParser::openFile( char* filename)
    4646{
    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;
     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;
    5656}
    5757
    5858/**
    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
     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
    6262*/
    63 int IniParser::get_section( char* section)
     63int IniParser::getSection( char* section)
    6464{
    6565  bInSection = false;
     
    9595
    9696/**
    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
     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
    101101*/
    102 int IniParser::next_var( char* name, char* value)
     102int IniParser::nextVar( char* name, char* value)
    103103{
    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] == '[')
    105121        {
    106                 bInSection = false;
    107                 return -1;
     122          bInSection = false;
     123          return -1;
    108124        }
    109         if( !bInSection) return -1;
    110        
    111         char linebuffer[PARSELINELENGHT];
    112         char* ptr;
    113 
    114         while( !feof( stream))
     125      if( (ptr = strchr( linebuffer, '=')) != NULL)
    115126        {
    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;
    132131        }
    133         return -1;     
     132    }
     133  return -1;   
    134134}
    135135
    136136/**
    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.
     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.
    145145*/
    146 char* IniParser::get_var( char* name, char* section, char* defvalue = "")
     146char* IniParser::getVar( char* name, char* section, char* defvalue = "")
    147147{
    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))
    155157        {
    156                 if( !strcmp (name, namebuf))
    157                 {
    158                         strcpy (internbuf, valuebuf);
    159                         return internbuf;
    160                 }
     158          strcpy (internbuf, valuebuf);
     159          return internbuf;
    161160        }
    162         return internbuf;
     161    }
     162  return internbuf;
    163163}
  • orxonox/branches/sound/src/ini_parser.h

    r2190 r3238  
    66*/
    77
    8 #ifndef INI_PARSER_H
    9 #define INI_PARSER_H
     8#ifndef _INI_PARSER_H
     9#define _INI_PARSER_H
    1010
    1111#include <stdio.h>
     
    2929  ~IniParser ();
    3030 
    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);
    3535};
    3636
    37 #endif
     37#endif /* _INI_PARSER_H */
  • orxonox/branches/sound/src/keynames.cc

    r2551 r3238  
    1313   co-programmer: ...
    1414*/
    15 #include <SDL/SDL.h>
    1615
    1716#include "keynames.h"
     
    2120using namespace std;
    2221
    23 int buttonname_to_SDLB( char* name)
     22int buttonnameToSDLB( char* name)
    2423{
    2524        if( !strcmp (name, "BUTTON_LEFT")) return SDL_BUTTON_LEFT;
     
    3130}
    3231
    33 char* SDLB_to_buttonname( int button)
     32char* SDLBToButtonname( int button)
    3433{
    3534        if( button == SDL_BUTTON_LEFT) return "BUTTON_LEFT";
     
    4140}
    4241
    43 int keyname_to_SDLK( char* name)
     42int keynameToSDLK( char* name)
    4443{
    4544        if( !strcmp (name, "BACKSPACE")) return SDLK_BACKSPACE;
     
    179178}
    180179
    181 char* SDLK_to_keyname( int key)
     180char* SDLKToKeyname( int key)
    182181{
    183182        if( key == SDLK_BACKSPACE) return "BACKSPACE";
  • orxonox/branches/sound/src/keynames.h

    r2551 r3238  
    55                Converts strings to SDLK/SDL_BUTTON values and vice versa
    66*/
     7#ifndef _KEYNAMES_H
     8#define _KEYNAMES_H
     9
    710
    811#ifdef __WIN32__
     
    1013#endif
    1114
     15#ifndef __APPLE__
    1216#include <SDL/SDL.h>
     17#else
     18#include <SDL.h>
     19#endif
    1320
    1421/**
     
    1724        \return an int containing the SDL identifier of the mouse button or -1 if the button name is not valid
    1825*/
    19 int buttonname_to_SDLB( char* name);
     26int buttonnameToSDLB( char* name);
    2027
    2128/**
     
    2431        \return a pointer to a string containing the name of the mouse button
    2532*/
    26 char* SDLB_to_buttonname( int button);
     33char* SDLBToButtonname( int button);
    2734
    2835/**
     
    3138        \return the SDLK sym of the named key or -1 if the key name is not valid
    3239*/
    33 int keyname_to_SDLK( char* name);
     40int keynameToSDLK( char* name);
    3441
    3542/**
     
    3845        \return a pointer to a string containig the name of the key
    3946*/
    40 char* SDLK_to_keyname( int key);
     47char* SDLKToKeyname( int key);
    4148
     49
     50#endif /* _KEYNAMES_H */
  • orxonox/branches/sound/src/list.h

    r2636 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"
    296
    307//! 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};
    329//! 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
     14class WorldEntity;
     15
     16class 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
     48class Iterator
     49{
     50
     51 public:
     52  bool hasNext();
     53  WorldEntity* next();
     54
     55 private:
     56
     57};
     58
     59
     60template<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;
    4374 
    4475 public:
    45   List (T* obj, List<T>* n, List<T>* p, bool bRef);
    46   ~List ();
     76  tList ();
     77  ~tList ();
    4778 
    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();
    5785  int getSize();
     86  T* enumerate();
     87  T* nextElement();
     88  T* toArray();
     89  void debug();
    5890};
    5991
    6092
    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)
     93template<class T>
     94tList<T>::tList ()
     95{
     96  this->first = NULL;
     97  this->last = NULL;
     98  this->size = 0;
     99}
     100
     101template<class T>
     102tList<T>::~tList ()
     103{}
     104
     105template<class T>
     106void 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
     121template<class T>
     122void tList<T>::remove(WorldEntity* entity)
     123{
     124  this->currentEl = this->first;
     125  listElement* te;
     126  while( this->currentEl != NULL)
    92127    {
    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;
    94142    }
    95     while( prev != NULL)
     143}
     144
     145
     146template<class T>
     147void tList<T>::destroy()
     148{
     149  this->currentEl = this->first;
     150  while(this->currentEl != NULL)
    96151    {
    97       delete prev;
     152      listElement* le = this->currentEl->next;
     153      delete this->currentEl->curr;
     154      delete this->currentEl;
     155      this->currentEl = le;
    98156    }
    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
     163template<class T>
     164T* tList<T>::firstElement()
     165{
     166  return this->first->curr;
     167}
     168
     169
     170template<class T>
     171bool tList<T>::isEmpty()
     172{
     173  return (this->size==0)?true:false;
     174}
     175
     176
     177template<class T>
     178int tList<T>::getSize()
    295179{
    296180  return this->size;
    297181}
    298182
    299 #endif
    300 
     183
     184template<class T>
     185T* tList<T>::enumerate()
     186{
     187  if(this->size == 0) return NULL;
     188  this->currentEl = this->first;
     189  return this->currentEl->curr;
     190}
     191
     192
     193template<class T>
     194T* 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
     203template<class T>
     204T* tList<T>::toArray()
     205{}
     206
     207#endif /* _LIST_H */
  • orxonox/branches/sound/src/message_structures.h

    r2551 r3238  
    44*/
    55
    6 #ifndef _MESSAGESTRUCTURES_H
    7 #define _MESSAGESTRUCTURES_H
     6#ifndef _MESSAGE_STRUCTURES_H
     7#define _MESSAGE_STRUCTURES_H
    88
    99#define CMD_LENGHT 16
     
    2626} Command;
    2727
    28 #endif
     28#endif /* _MESSAGE_STRUCTURES_H */
  • orxonox/branches/sound/src/npc.h

    r2036 r3238  
    11
    2 #ifndef NPC_H
    3 #define NPC_H
     2#ifndef _NPC_H
     3#define _NPC_H
    44
    55#include "world_entity.h"
     
    4141};
    4242
    43 #endif
     43#endif /* _NPC_H */
  • orxonox/branches/sound/src/orxonox.cc

    r2636 r3238  
    4747Orxonox::~Orxonox ()
    4848{
    49   Orxonox::singleton_ref = NULL;
     49  Orxonox::singletonRef = NULL;
    5050  if( world != NULL) delete world;
    5151  if( localinput != NULL) delete world;
     
    5656
    5757/* this is a singleton class to prevent duplicates */
    58 Orxonox* Orxonox::singleton_ref = 0;
     58Orxonox* Orxonox::singletonRef = 0;
    5959
    6060Orxonox* Orxonox::getInstance (void)
    6161{
    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;
    6565}
    6666
     
    7272   it's path and name into configfilename
    7373*/
    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  
     74void Orxonox::getConfigFile (int argc, char** argv)
     75{
    8776  strcpy (configfilename, "orxonox.conf");
    8877}
     
    9685  // config file
    9786 
    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*/
     107int Orxonox::initVideo()
     108{
     109  printf("> Initializing video\n");
     110  if (SDL_Init(SDL_INIT_VIDEO) == -1)
    103111    {
    104       printf ("Could not SDL_Init(): %s\n", SDL_GetError());
     112      printf ("could not initialize SDL Video\n");
    105113      return -1;
    106114    }
    107  
    108   // initialize everything
    109   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 started
    121  
    122   return 0;
    123 }
    124 
    125 /**
    126    \brief initializes SDL and OpenGL
    127 */
    128 int Orxonox::init_video ()
    129 {
    130115  // Set video mode
    131116  // TO DO: parse arguments for settings
    132   SDL_GL_SetAttribute (SDL_GL_RED_SIZE, 5);
    133   SDL_GL_SetAttribute (SDL_GL_GREEN_SIZE, 5);
    134   SDL_GL_SetAttribute (SDL_GL_BLUE_SIZE, 5);
    135   SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 16);
     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);
    136121 
    137122  int bpp = 16;
     
    140125  Uint32 flags = SDL_HWSURFACE | SDL_OPENGL | SDL_GL_DOUBLEBUFFER;
    141126 
    142   if( (screen = SDL_SetVideoMode (width, height, bpp, flags)) == NULL)
     127  if((screen = SDL_SetVideoMode (width, height, bpp, flags)) == NULL)
    143128  {
    144     printf ("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", width, height, bpp, flags, SDL_GetError());
     129    printf("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", width, height, bpp, flags, SDL_GetError());
    145130    SDL_Quit();
    146131    return -1;
     
    148133 
    149134  // 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);
    152136 
    153137  // TO DO: Create a cool icon and use it here
     
    158142  glClearColor(0.0, 0.0, 0.0, 0.0);
    159143  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);
    162160 
    163161  // 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
    168167
    169168/**
    170169   \brief initializes the sound engine
    171170*/
    172 int Orxonox::init_sound ()
    173 {
     171int Orxonox::initSound()
     172{
     173  printf("> Initializing sound\n");
     174  // SDL_Init(SDL_INIT_AUDIO);
    174175  printf("Not yet implemented\n");
    175176  return 0;
    176177}
    177178
     179
    178180/**
    179181   \brief initializes input functions
    180182*/
    181 int Orxonox::init_input ()
     183int Orxonox::initInput()
    182184{
    183185  // create localinput
     
    187189}
    188190
     191
    189192/**
    190193   \brief initializes network system
    191194*/
    192 int Orxonox::init_networking ()
     195int Orxonox::initNetworking()
    193196{
    194197  printf("Not yet implemented\n");
     
    196199}
    197200
     201
    198202/**
    199203   \brief initializes and loads resource files
    200204*/
    201 int Orxonox::init_resources ()
     205int Orxonox::initResources()
    202206{
    203207  printf("Not yet implemented\n");
     
    205209}
    206210
     211
    207212/**
    208213   \brief initializes the world
    209214*/
    210 int Orxonox::init_world ()
     215int Orxonox::initWorld()
    211216{
    212217  //world = new World();
     
    236241}
    237242
     243
    238244/**
    239245   \brief exits Orxonox
     
    244250}
    245251
    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
    270253
    271254/**
     
    273256   \param event: an event not handled by the CommandNode
    274257*/
    275 void Orxonox::event_handler (SDL_Event* event)
     258void Orxonox::eventHandler(SDL_Event* event)
    276259{
    277260  // Handle special events such as reshape, quit, focus changes
    278261}
    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 
    329263
    330264/**
     
    333267   \return true if the command was handled by the system or false if it may be passed to the WorldEntities
    334268*/
    335 bool Orxonox::system_command (Command* cmd)
    336 {
     269bool Orxonox::systemCommand(Command* cmd)
     270{
     271  /*
    337272  if( !strcmp( cmd->cmd, "quit"))
    338273    {
     
    341276    }
    342277  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
    360282
    361283/**
     
    363285   \return a pointer to localcamera
    364286*/
    365 Camera* Orxonox::get_camera ()
     287Camera* Orxonox::getCamera()
    366288{
    367289  return localcamera;
    368290}
     291
    369292
    370293/**
     
    372295   \return a pointer to localinput
    373296*/
    374 CommandNode* Orxonox::get_localinput ()
     297CommandNode* Orxonox::getLocalInput()
    375298{
    376299  return localinput;
    377300}
     301
    378302
    379303/**
     
    381305   \return a pointer to world
    382306*/
    383 World* Orxonox::get_world ()
     307World* Orxonox::getWorld()
    384308{
    385309  return world;
    386310}
    387311
    388 int main (int argc, char** argv)
     312
     313
     314
     315int main(int argc, char** argv)
    389316
    390317  printf(">>> Starting Orxonox <<<\n");
    391318  Orxonox *orx = Orxonox::getInstance();
    392319 
    393   if( (*orx).init(argc, argv) == -1)
     320  if((*orx).init(argc, argv) == -1)
    394321    {
    395322      printf("! Orxonox initialization failed\n");
     
    397324    }
    398325 
    399   //(*orx).mainLoop();
    400 
    401326  orx->start();
    402327 
  • orxonox/branches/sound/src/orxonox.h

    r2636 r3238  
    44*/
    55
    6 #ifndef ORXONOX_H
    7 #define ORXONOX_H
    8 
    9 #include <SDL/SDL.h>
     6#ifndef _ORXONOX_H
     7#define _ORXONOX_H
    108
    119#include "stdincl.h"
     
    2422
    2523 private:
    26   static Orxonox* singleton_ref;
     24  static Orxonox* singletonRef;
    2725  Orxonox ();
    2826  ~Orxonox ();
     
    4038  Uint32 lastframe;
    4139 
    42   void get_config_file (int argc, char** argv);
     40  void getConfigFile (int argc, char** argv);
    4341 
    4442  // 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 ();
    5048 
    5149        // 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 ();
    5856 
    5957 public:
     
    6260  void quitGame();
    6361
    64   void event_handler (SDL_Event* event);
    65   bool system_command (Command* cmd);
     62  void eventHandler (SDL_Event* event);
     63  bool systemCommand (Command* cmd);
    6664
    6765  int init (int argc, char** argv);
    6866 
    69   CommandNode* get_localinput();
    70   Camera* get_camera();
    71   World* get_world();
     67  CommandNode* getLocalInput();
     68  Camera* getCamera();
     69  World* getWorld();
    7270 
    73   void mainLoop();
     71  //void mainLoop();
    7472};
    7573
    76 #endif
     74#endif /* _ORXONOX_H */
    7775
  • orxonox/branches/sound/src/player.cc

    r2640 r3238  
    2525Player::Player(bool isFree) : WorldEntity(isFree)
    2626{
    27 }
    2827
    29 Player::~Player ()
     28  this->obj = new Object("reaplow.obj");
     29  /*
     30  objectList = glGenLists(1);
     31  glNewList (objectList, GL_COMPILE);
    3032
    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         // movement
    47         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  
    8233  glBegin(GL_TRIANGLES);
    8334  glColor3f(1,1,1);
     
    9950  glEnd();
    10051 
    101   //printf("Player@%f/%f/%f\n", get_placement()->r.x, get_placement()->r.y, get_placement()->r.z);
     52  glEndList ();
     53  */
    10254}
    10355
    104 void Player::get_lookat (Location* locbuf)
     56Player::~Player()
    10557{
    106         *locbuf = *get_location();
    107         //locbuf->dist += 5.0;
     58  delete this->obj;
    10859}
    10960
    110 void Player::left_world ()
     61void 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
     71void Player::tick(float time)
     72{
     73  // movement
     74  move (time);
     75}
     76
     77void Player::hit(WorldEntity* weapon, Vector loc)
    11178{
    11279}
    11380
    114 void Player::move (float time)
     81void Player::destroy()
     82{
     83}
     84
     85void Player::collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags)
     86{
     87}
     88
     89void 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
     99void 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
     118void Player::getLookat(Location* locbuf)
     119{
     120  *locbuf = *getLocation();
     121  //locbuf->dist += 5.0;
     122}
     123
     124void Player::leftWorld()
     125{
     126}
     127
     128void Player::move(float time)
    115129{
    116130  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();
    119133  /* calculate the direction in which the craft is heading  */
    120134  Vector direction(0.0, 0.0, 1.0);
     
    128142  if( bRight ) { accel = accel - (orthDirection*acceleration); }
    129143  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 */
    131145
    132   Location* l = get_location();
     146  Location* l = getLocation();
    133147 
    134148  // r(t) = r(0) + v(0)*t + 1/2*a*t^2
     
    138152
    139153  /* 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;
    141155
    142156  /* this updates the player position on the track - user interaction */
    143157  l->pos = l->pos + accel*time;
    144158}
    145 
    146 
    147 
    148 
    149 
    150 
    151 
    152 
    153 
    154 
    155 
    156 
    157 
    158 
    159 
    160 
    161 
    162 
  • orxonox/branches/sound/src/player.h

    r2551 r3238  
    44*/
    55
    6 #ifndef PLAYER_H
    7 #define PLAYER_H
     6#ifndef _PLAYER_H
     7#define _PLAYER_H
    88
    99#include "world_entity.h"
     10#include "importer/object.h"
    1011
    1112//! Basic controllable WorldEntity
     
    1516 
    1617 public:
    17   Player (bool isFree = false);
    18   ~Player ();
     18  Player(bool isFree = false);
     19  ~Player();
    1920 
    20   virtual void post_spawn ();
    21   virtual void tick (float time);
    22   virtual void hit (WorldEntity* weapon, Vector loc);
    23   virtual void destroy ();
    24   virtual void collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags);
    25   virtual void command (Command* cmd);
     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);
    2627 
    27   virtual void draw ();
    28   virtual void get_lookat (Location* locbuf);
     28  virtual void draw();
     29  virtual void getLookat(Location* locbuf);
    2930 
    30   virtual void left_world ();
     31  virtual void leftWorld();
    3132 
    3233 private:
     
    3435  bool bFire;
    3536  Vector velocity;
    36   float travel_speed;
     37  float travelSpeed;
    3738  float acceleration;
     39  GLuint objectList;
     40  Object* obj;
    3841 
    39   void move (float time);
     42  void move(float time);
    4043 
    4144};
    4245
    43 #endif
     46#endif /* _PLAYER_H */
  • orxonox/branches/sound/src/power_up.h

    r2077 r3238  
    44*/
    55
    6 #ifndef POWER_UP_H
    7 #define POWER_UP_H
     6#ifndef _POWER_UP_H
     7#define _POWER_UP_H
    88
    99#include "data_tank.h"
     
    1919};
    2020
    21 #endif
     21#endif /* _POWER_UP_H */
  • orxonox/branches/sound/src/proto_class.h

    r2036 r3238  
    11
    2 #ifndef PROTO_CLASS_H
    3 #define PROTO_CLASS_H
     2#ifndef _PROTO_CLASS_H
     3#define _PROTO_CLASS_H
    44
    55#include "data_tank.h"
     
    1414};
    1515
    16 #endif
     16#endif /* _PROTO_CLASS_H */
  • orxonox/branches/sound/src/shoot_laser.h

    r2036 r3238  
    11
    2 #ifndef SHOOT_LASER_H
    3 #define SHOOT_LASER_H
     2#ifndef _SHOOT_LASER_H
     3#define _SHOOT_LASER_H
    44
    55
     
    4040};
    4141
    42 #endif
     42#endif /* _SHOOT_LASER_H */
  • orxonox/branches/sound/src/shoot_rocket.h

    r2036 r3238  
    11
    2 #ifndef SHOOT_ROCKET_H
    3 #define SHOOT_ROCKET_H
     2#ifndef _SHOOT_ROCKET_H
     3#define _SHOOT_ROCKET_H
    44
    55
     
    5454};
    5555
    56 #endif
     56#endif /* _SHOOT_ROCKET_H */
  • orxonox/branches/sound/src/stdincl.h

    r2636 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*/
    17
    2 #ifndef STDINCL_H
    3 #define STDINCL_H
     8#ifndef _STDINCL_H
     9#define _STDINCL_H
    410
    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
    617
    718#ifdef __WIN32__
    819#include <windows.h>
    920#endif
     21
     22#ifndef __APPLE__
    1023#include <SDL/SDL.h>
    1124#include <GL/gl.h>
    1225#include <GL/glu.h>
     26#else
     27#include <SDL.h>
     28#include <OpenGL/gl.h>
     29#include <OpenGL/glu.h>
     30#endif
    1331
    1432#include "vector.h"
    1533#include "coordinates.h"
    1634#include "list.h"
     35#include "list_template.h"
    1736#include "error.h"
     37#include "debug.h"
    1838#include "message_structures.h"
    1939#include "orxonox.h"
    2040
    21 #endif
     41#endif /* _STDINCL_H */
  • orxonox/branches/sound/src/story_def.h

    r2636 r3238  
    11
    2 #ifndef STORY_DEF_H
    3 #define STORY_DEF_H
     2#ifndef _STORY_DEF_H
     3#define _STORY_DEF_H
    44
    55
    6 #define DEBUG_CAMPAIGN_0 0
    7 #define DEBUG_CAMPAIGN_1 1
    8 #define DEBUG_CAMPAIGN_2 2
     6#define DEBUG_CAMPAIGN_0 1000
     7#define DEBUG_CAMPAIGN_1 1001
     8#define DEBUG_CAMPAIGN_2 1002
    99
    10 #define DEBUG_WORLD_0 0
    11 #define DEBUG_WORLD_1 1
    12 #define DEBUG_WORLD_2 2
     10#define DEBUG_WORLD_0 100
     11#define DEBUG_WORLD_1 101
     12#define DEBUG_WORLD_2 102
    1313
    1414#define WORLD_ID_0 0
     
    2020#define WORLD_ID_GAMEEND 999
    2121
    22 #define MAX_STORY_ENTITIES 99; //!> maximal StoryEntities in a Campaign
     22#define MAX_STORY_ENTITIES 99 //!> maximal StoryEntities in a Campaign
    2323
    24 #endif
     24#endif /* _STORY_DEF_H */
  • orxonox/branches/sound/src/story_entity.cc

    r2636 r3238  
    3030/**
    3131    \brief initialize the entity before use.
     32    \returns an error code if not able to apply.
    3233
    3334    After execution of this function, the Entity is ready to be played/executed,
    3435    this shifts the initialisation work before the execution - very important...
    35    
    3636*/
    37 Error StoryEntity::init()
     37ErrorMessage StoryEntity::init()
    3838{}
    3939
    4040
    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*/
     47void StoryEntity::setStoryID(int storyID)
    4248{
    4349  this->storyID = storyID;
    4450}
    4551
     52
     53/**
     54    \brief this reads the story id of the current entity
     55    \returns the story entity id
     56*/
    4657int StoryEntity::getStoryID()
    4758{
     
    5061
    5162
    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*/
     70void StoryEntity::setNextStoryID(int nextStoryID)
    5371{
    5472  this->nextStoryID = nextStoryID;
    5573}
    5674
    57 Uint32 StoryEntity::getNextStoryID()
     75/**
     76    \brief gets the story id of the current entity
     77    \returns story id
     78*/
     79int StoryEntity::getNextStoryID()
    5880{
    5981  return this->nextStoryID;
     
    6183
    6284
    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
    6589
    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*/
     95ErrorMessage StoryEntity::start(int storyID)
    7696{}
    7797
    7898
     99/**
     100    \brief starts the current entity
     101    \returns error code if this action has caused a error   
     102*/
     103ErrorMessage 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*/
     117ErrorMessage 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*/
     127ErrorMessage 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*/
     137ErrorMessage 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*/
    79147void StoryEntity::load()
    80148{}
    81149
    82150
    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*/
     157void StoryEntity::destroy()
    84158{}
    85159
    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*/
     167void StoryEntity::displayLoadScreen()
    87168{}
     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*/
     177void StoryEntity::releaseLoadScreen()
     178{}
  • orxonox/branches/sound/src/story_entity.h

    r2636 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*/
    15
    2 #ifndef STORY_ENTITY_H
    3 #define STORY_ENTITY_H
     6
     7#ifndef _STORY_ENTITY_H
     8#define _STORY_ENTITY_H
    49
    510#include "stdincl.h"
    611#include "story_def.h"
    712
     13//! A class that represents something to play in orxonox. it is a container for worlds, movies, mission briefings, etc...
    814class StoryEntity {
    915
    1016 public:
    1117  StoryEntity ();
    12   ~StoryEntity ();
     18  virtual ~StoryEntity ();
    1319
    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
    1622
    17   virtual Error init();
    18   virtual Error start(Uint32 storyID);
    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();
    2329
    2430  virtual void load();
     31  virtual void destroy();
    2532
    26   virtual void displayEntityScreen();
    27   virtual void releaseEntityScreen();
     33  virtual void displayLoadScreen();
     34  virtual void releaseLoadScreen();
    2835
    29   void setStoryID(Uint32 storyID);
     36  void setStoryID(int storyID);
    3037  int getStoryID();
    3138
    32   void setNextStoryID(Uint32 nextStoryID);
    33   Uint32 getNextStoryID();
     39  void setNextStoryID(int nextStoryID);
     40  int getNextStoryID();
    3441
    3542
    3643 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
    3946};
    4047
    41 #endif
     48#endif /* _STORY_ENTITY_H */
  • orxonox/branches/sound/src/synchronisable.h

    r2036 r3238  
    11
    2 #ifndef SYNCHRONISABLE_H
    3 #define SYNCHRONISABLE_H
     2#ifndef _SYNCHRONISABLE_H
     3#define _SYNCHRONISABLE_H
    44
    55#include "data_tank.h"
     
    2222};
    2323
    24 #endif
     24#endif /* _SYNCHRONISABLE_H */
  • orxonox/branches/sound/src/track.cc

    r2636 r3238  
    2121
    2222/**
    23         \brief creates a null Track part
     23   \brief creates a null Track part
    2424*/
    2525Track::Track ()
    2626{
    27         ID = 0;
    28         offset = NULL;
    29         end = NULL;
    30         nextID = 0;
     27  this->ID = 0;
     28  this->offset = NULL;
     29  this->end = NULL;
     30  this->nextID = 0;
    3131}
    3232
    3333/**
    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
     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
    3939*/
    4040Track::Track (Uint32 number, Uint32 next, Vector* start, Vector* finish)
    4141{
    42         ID = number;
    43         offset = start;
    44         end = finish;
    45         nextID = next;
     42  this->ID = number;
     43  this->offset = start;
     44  this->end = finish;
     45  this->nextID = next;
    4646}
    4747
    4848/**
    49         \brief removes the Track part from memory
     49   \brief removes the Track part from memory
    5050*/
    5151Track::~Track ()
     
    6868   at inside camera boundaries.
    6969*/
    70 void Track::map_camera (Location* lookat, Placement* camplc)
     70void Track::mapCamera (Location* lookat, Placement* camplc)
    7171{
    7272  Line trace(*offset, *end - *offset);
     
    103103   when transfering between track parts.
    104104*/
    105 bool Track::map_coords (Location* loc, Placement* plc)
     105bool Track::mapCoords (Location* loc, Placement* plc)
    106106{
    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;
     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;
    127127}
    128128
     129
    129130/**
    130         \brief this is called when a WorldEntity enters a Track part
    131         \param entity: pointer to the WorldEntity in question
    132        
    133         You can do stuff like add or remove effects, do some coordinate finetuning
    134         or whatever in here.
     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.
    135136*/
    136 void Track::post_enter (WorldEntity* entity)
     137void Track::postEnter (WorldEntity* entity)
    137138{
    138139}
    139140
     141
    140142/**
    141         \brief this is called when a WorldEntity leaves a Track part
    142         \param entity: pointer to the WorldEntity in question
    143        
    144         You can do stuff like add or remove effects, do some coordinate finetuning
    145         or whatever in here.
     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.
    146148*/
    147 void Track::post_leave (WorldEntity* entity)
     149void Track::postLeave (WorldEntity* entity)
    148150{
    149151}
    150152
     153
    151154/**
    152         \brief this is called every frame
    153         \param deltaT: amount of time passed since the last frame in seconds
    154        
    155         Do time based or polling scripts here.
     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.
    156159*/
    157160void Track::tick (float deltaT)
  • orxonox/branches/sound/src/track.h

    r2636 r3238  
    44*/
    55
    6 #ifndef TRACK_H
    7 #define TRACK_H
     6#ifndef _TRACK_H
     7#define _TRACK_H
    88
    99#include "stdincl.h"
     
    2525  Uint32 nextID;
    2626 
    27         
     27  
    2828 public:
    2929  Track ();
     
    3232  virtual void init();
    3333 
    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);
    3636  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 boundaries
     37  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
    3939};
    4040
    41 #endif
     41#endif /* _TRACK_H */
  • orxonox/branches/sound/src/vector.cc

    r2551 r3238  
    3333{
    3434  Vector r;
    35  
     35
    3636  r.x = x + v.x;
    3737  r.y = y + v.y;
     
    203203   \return the angle between the vectors in radians
    204204*/
    205 float angle_rad (const Vector& v1, const Vector& v2)
     205float angleRad (const Vector& v1, const Vector& v2)
    206206{
    207207  return acos( v1 * v2 / (v1.len() * v2.len()));
     
    215215   \return the angle between the vectors in degrees
    216216*/
    217 float angle_deg (const Vector& v1, const Vector& v2)
     217float angleDeg (const Vector& v1, const Vector& v2)
    218218{
    219219  float f;
     
    243243
    244244/**
    245    \brief calculates a look_at rotation
     245   \brief calculates a lookAt rotation
    246246   \param dir: the direction you want to look
    247247   \param up: specify what direction up should be
     
    578578  Vector axis = x.cross( v);
    579579  axis.normalize();
    580   float angle = angle_rad( x, v);
     580  float angle = angleRad( x, v);
    581581  float ca = cos(angle);
    582582  float sa = sin(angle);
     
    714714   \return the rotated vector
    715715*/
    716 Vector rotate_vector( const Vector& v, const Rotation& r)
     716Vector rotateVector( const Vector& v, const Rotation& r)
    717717{
    718718  Vector t;
     
    745745   \return the distance between the Line and the point
    746746*/
    747 float Line::distance_point (const Vector& v) const
     747float Line::distancePoint (const Vector& v) const
    748748{
    749749  Vector d = v-r;
     
    761761  Vector* fp = new Vector[2];
    762762  Plane p = Plane (r + a.cross(l.a), r, r + a);
    763   fp[1] = p.intersect_line (l);
     763  fp[1] = p.intersectLine (l);
    764764  p = Plane (fp[1], l.a);
    765   fp[0] = p.intersect_line (*this);
     765  fp[0] = p.intersectLine (*this);
    766766  return fp;
    767767}
     
    783783{
    784784  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),
    787787  a = t - r;
    788788}
     
    815815   \param l: a line
    816816*/
    817 Vector Plane::intersect_line (const Line& l) const
     817Vector Plane::intersectLine (const Line& l) const
    818818{
    819819  if (n.x*l.a.x+n.y*l.a.y+n.z*l.a.z == 0.0) return Vector(0,0,0);
     
    827827   \return the distance between the plane and the point (can be negative)
    828828*/
    829 float Plane::distance_point (const Vector& p) const
     829float Plane::distancePoint (const Vector& p) const
    830830{
    831831  float l = n.len();
     
    839839   \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
    840840*/
    841 float Plane::locate_point (const Vector& p) const
     841float Plane::locatePoint (const Vector& p) const
    842842{
    843843  return (n.dot(p) + k);
    844844}
     845
     846
     847/**
     848   \brief Creates a new BezierCurve
     849*/
     850BezierCurve::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*/
     867BezierCurve::~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*/
     883void 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*/
     904Vector 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
     949Vector 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*/
     962Vector BezierCurve::getPos() const
     963{
     964  return curvePoint;
     965}
  • orxonox/branches/sound/src/vector.h

    r2551 r3238  
    66*/
    77
    8 #ifndef VECTOR_H
    9 #define VECTOR_H
     8#ifndef _VECTOR_H
     9#define _VECTOR_H
    1010
    1111#include <math.h>
     
    4040};
    4141
    42 float angle_deg (const Vector& v1, const Vector& v2);
    43 float angle_rad (const Vector& v1, const Vector& v2);
     42float angleDeg (const Vector& v1, const Vector& v2);
     43float angleRad (const Vector& v1, const Vector& v2);
    4444
    4545//! Quaternion
     
    9898
    9999//!< Apply a rotation to a vector
    100 Vector rotate_vector( const Vector& v, const Rotation& r);
     100Vector rotateVector( const Vector& v, const Rotation& r);
    101101
    102102//! 3D line
     
    118118 
    119119  float distance (const Line& l) const;
    120   float distance_point (const Vector& v) const;
     120  float distancePoint (const Vector& v) const;
    121121  Vector* footpoints (const Line& l) const;
    122122  float len () const;
     
    144144  ~Plane () {}
    145145 
    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;
    149149};
    150150
    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*/
     159class 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/sound/src/world.cc

    r2644 r3238  
    2222#include "command_node.h"
    2323#include "camera.h"
     24#include "environment.h"
    2425
    2526using namespace std;
     
    3536  this->worldName = name;
    3637  this->debugWorldNr = -1;
    37   this->entities = new List<WorldEntity>();
     38  this->entities = new tList<WorldEntity>();
    3839}
    3940
     
    4243  this->debugWorldNr = worldID;
    4344  this->worldName = NULL;
    44   this->entities = new List<WorldEntity>();
     45  this->entities = new tList<WorldEntity>();
    4546}
    4647
     
    5051World::~World ()
    5152{
    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
    5467  delete this->entities;
    5568  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
     74ErrorMessage World::init()
    6375{
    6476  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
     82ErrorMessage World::start()
     83{
     84  printf("World::start() - starting current World: nr %i\n", this->debugWorldNr);
     85  this->bQuitOrxonox = false;
     86  this->bQuitCurrentGame = false;
    6987  this->mainLoop();
    7088}
    7189
    72 Error World::stop()
    73 {
     90ErrorMessage World::stop()
     91{
     92  printf("World::stop() - got stop signal\n");
    7493  this->bQuitCurrentGame = true;
    75   this->localCamera->setWorld(NULL);
    76   this->~World();
    77 }
    78 
    79 Error World::pause()
     94}
     95
     96ErrorMessage World::pause()
    8097{
    8198  this->isPaused = true;
    8299}
    83100
    84 Error World::resume()
     101ErrorMessage World::resume()
    85102{
    86103  this->isPaused = false;
    87104}
    88105
     106void World::destroy()
     107{
     108
     109}
     110
    89111void World::load()
    90112{
     
    93115      switch(this->debugWorldNr)
    94116        {
     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           */
    95123        case DEBUG_WORLD_0:
    96124          {
     
    98126            this->pathnodes = new Vector[6];
    99127            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);
    105133           
    106134            // create the tracks
    107             this->tracklen = 6;
    108             this->track = new Track[6];
     135            this->tracklen = 2;
     136            this->track = new Track[2];
    109137            for( int i = 0; i < this->tracklen; i++)
    110138              {
    111139                this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]);
    112140              }
    113            
     141            // !\todo old track-system has to be removed
     142
    114143            // create a player
    115             //WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>();
    116144            WorldEntity* myPlayer = new Player();
    117145            this->spawn(myPlayer);
     
    120148            // bind input
    121149            Orxonox *orx = Orxonox::getInstance();
    122             orx->get_localinput()->bind (myPlayer);
     150            orx->getLocalInput()->bind (myPlayer);
    123151           
    124152            // bind camera
    125153            this->localCamera = new Camera(this);
    126154            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
    127162            break;
    128163          }
     
    145180                this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]);
    146181              }
    147            
     182
    148183            // create a player
    149             //WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>();
    150184            WorldEntity* myPlayer = new Player();
    151185            this->spawn(myPlayer);
    152             this->localPlayer = myPlayer;
     186            this->localPlayer = myPlayer;           
    153187           
    154188            // bind input
    155189            Orxonox *orx = Orxonox::getInstance();
    156             orx->get_localinput()->bind (myPlayer);
     190            orx->getLocalInput()->bind (myPlayer);
    157191           
    158192            // bind camera
     
    169203
    170204    }
     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();
    171381}
    172382
     
    181391void World::collide ()
    182392{
    183   List<WorldEntity> *a, *b;
     393  /*
     394  List *a, *b;
    184395  WorldEntity *aobj, *bobj;
    185  
    186   a = entities->get_next();
     396   
     397  a = entities;
    187398 
    188399  while( a != NULL)
    189400    {
    190       aobj = a->get_object();
     401      aobj = a->nextElement();
    191402      if( aobj->bCollide && aobj->collisioncluster != NULL)
    192403        {
    193           b = a->get_next();
     404          b = a->nextElement();
    194405          while( b != NULL )
    195406            {
    196               bobj = b->get_object();
     407              bobj = b->nextElement();
    197408              if( bobj->bCollide && bobj->collisioncluster != NULL )
    198409                {
     
    206417                  }
    207418                }
    208               b = b->get_next();
     419              b = b->nextElement();
    209420            }
    210421        }
    211       a = a->get_next();
    212     }
     422      a = a->enumerate();
     423    }
     424  */
    213425}
    214426
     
    221433 
    222434  // draw entities
    223   List<WorldEntity> *l;
    224435  WorldEntity* entity;
    225436 
    226   l = entities->get_next(); 
    227   while( l != NULL )
     437  entity = this->entities->enumerate();
     438  while( entity != NULL )
    228439    {
    229       entity = l->get_object();
    230440      if( entity->bDraw ) entity->draw();
    231       l = l->get_next();
     441      entity = this->entities->nextElement();
    232442    }
    233443 
    234444 
    235445  // 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
    287449}
    288450
     
    297459void World::update ()
    298460{
    299   List<WorldEntity> *l;
     461  //List<WorldEntity> *l;
    300462  WorldEntity* entity;
    301463  Location* loc;
     
    303465  Uint32 t;
    304466 
    305   l = entities->get_next(); 
    306   while( l != NULL )
     467  //  l = entities->enumerate();
     468  entity = this->entities->enumerate();
     469  while( entity != NULL )
    307470    {
    308       entity = l->get_object();
     471
    309472     
    310473      if( !entity->isFree() )
    311474        {
    312           loc = entity->get_location();
    313           plc = entity->get_placement();
     475          loc = entity->getLocation();
     476          plc = entity->getPlacement();
    314477          t = loc->part;
    315478         
     
    318481            {
    319482              printf("An entity is out of the game area\n");
    320               entity->left_world ();
     483              entity->leftWorld ();
    321484            }
    322485          else
    323486            {
    324               while( track[t].map_coords( loc, plc) )
     487              while( track[t].mapCoords( loc, plc) )
    325488                {
    326                   track[t].post_leave (entity);
     489                  track[t].postLeave (entity);
    327490                  if( loc->part >= tracklen )
    328491                    {
    329492                      printf("An entity has left the game area\n");
    330                       entity->left_world ();
     493                      entity->leftWorld ();
    331494                      break;
    332495                    }
    333                   track[loc->part].post_enter (entity);
     496                  track[loc->part].postEnter (entity);
    334497                }
    335498            }
     
    337500      else
    338501        {
    339           /* TO DO: implement check whether this particular free entity
     502          /* \todo: implement check whether this particular free entity
    340503             is out of the game area
    341              TO DO: call function to notify the entity that it left
     504             \todo: call function to notify the entity that it left
    342505             the game area
    343506          */
    344507        }
    345508     
    346       l = l->get_next();
     509      entity = entities->nextElement();
    347510    }
    348511 
     
    353516    \param deltaT: the time passed since the last frame in milliseconds
    354517*/
    355 void World::time_slice (Uint32 deltaT)
    356 {
    357   List<WorldEntity> *l;
     518void World::timeSlice (Uint32 deltaT)
     519{
     520  //List<WorldEntity> *l;
    358521  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)
    365526    {
    366       entity = l->get_object();
    367527      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);
    372532}
    373533
     
    387547   Camera Placement
    388548*/
    389 void World::calc_camera_pos (Location* loc, Placement* plc)
    390 {
    391   track[loc->part].map_camera (loc, plc);
     549void World::calcCameraPos (Location* loc, Placement* plc)
     550{
     551  track[loc->part].mapCamera (loc, plc);
    392552}
    393553
     
    403563}
    404564
     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*/
    405571void World::debug()
    406572{
    407   List<WorldEntity> *l;
     573  //List<WorldEntity> *l;
    408574  WorldEntity* entity;
    409575 
    410576  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 )
    413580    {
    414       entity = l->get_object();
    415581      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*/
    421594void World::mainLoop()
    422595{
    423596  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    {
    431600      // Network
    432601      synchronize();
    433602      // 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        }
    435609      // Process time
    436       time_slice();
     610      timeSlice();
    437611      // Process collision
    438612      collision();
    439613      // Draw
    440614      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");
    443619}
    444620
     
    454630/**
    455631   \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*/
     636void World::handleInput ()
    458637{
    459638  // localinput
    460   Orxonox::getInstance()->get_localinput()->process();
     639  CommandNode* cn = Orxonox::getInstance()->getLocalInput();
     640  cn->process();
    461641  // remoteinput
    462642}
     
    464644/**
    465645   \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*/
     651void World::timeSlice ()
    468652{
    469653  Uint32 currentFrame = SDL_GetTicks();
     
    471655    {
    472656      Uint32 dt = currentFrame - this->lastFrame;
    473       /*
     657     
    474658      if(dt > 0)
    475659        {
     
    479663      else
    480664        {
    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);
    485673      this->update ();
    486       this->localCamera->time_slice (dt);
     674      this->localCamera->timeSlice(dt);
    487675    }
    488676  this->lastFrame = currentFrame;
    489677}
    490678
     679
    491680/**
    492681   \brief compute collision detection
     
    497686}
    498687
    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
    516693*/
    517694void World::display ()
     
    528705}
    529706
     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*/
    530713Camera* World::getCamera()
    531714{
     
    534717
    535718
     719/**
     720   \brief add and spawn a new entity to this world
     721   \param entity to be added
     722*/
    536723void World::spawn(WorldEntity* entity)
    537724{
     
    539726  Location* loc = NULL;
    540727  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;
    551735  entity->init (loc, owner);
    552736  if (entity->bFree)
    553737    {
    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*/
     749void 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 ();
    557768  //return entity;
    558769}
     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*/
     777void 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*/
     798bool World::command(Command* cmd)
     799{
     800  return false;
     801}
  • orxonox/branches/sound/src/world.h

    r2644 r3238  
    44*/
    55
    6 #ifndef WORLD_H
    7 #define WORLD_H
     6#ifndef _WORLD_H
     7#define _WORLD_H
    88
    99#include "stdincl.h"
     
    2222  World (char* name);
    2323  World (int worldID);
    24   ~World ();
     24  virtual ~World ();
    2525
    2626  template<typename T>
    27     T* spawn(Location* loc, WorldEntity* owner);        // template to be able to spawn any derivation of WorldEntity
     27    T* spawn (Location* loc, WorldEntity* owner);       // template to be able to spawn any derivation of WorldEntity
    2828  template<typename T>
    29     T* spawn(Placement* plc, WorldEntity* owner);
     29    T* spawn (Placement* plc, WorldEntity* owner);
    3030 
    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 ();
    3636
    37   virtual void load();
     37  virtual void load ();
     38  virtual void destroy ();
    3839
    39   void time_slice (Uint32 deltaT);
     40  void timeSlice (Uint32 deltaT);
    4041  void collide ();
    4142  void draw ();
    4243  void update ();       // maps Locations to Placements
    43   void calc_camera_pos (Location* loc, Placement* plc);
     44  void calcCameraPos (Location* loc, Placement* plc);
    4445       
    4546  void unload ();
     47  bool command (Command* cmd);
    4648 
    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 ();
    5253
    53   void spawn(WorldEntity* entity);
     54  void spawn (WorldEntity* entity);
     55  void spawn (WorldEntity* entity, Location* loc);
     56  void spawn (WorldEntity* entity, Placement* plc);
    5457
    55   List<WorldEntity>* entities;
     58  tList<WorldEntity>* entities;
    5659 
    5760  // base level data
     
    6972  char* worldName;
    7073  int debugWorldNr;
     74  GLuint objectList;
    7175
    7276  WorldEntity* localPlayer;
    7377 
    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 ();
    8185};
    8286
    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/sound/src/world_entity.cc

    r2190 r3238  
    3636WorldEntity::WorldEntity (bool isFree) : bFree(isFree)
    3737{
    38         collisioncluster = NULL;
    39         owner = NULL;
     38  this->bDraw = true;
     39  collisioncluster = NULL;
     40  owner = NULL;
    4041}
    4142
     
    4546WorldEntity::~WorldEntity ()
    4647{
    47         if( collisioncluster != NULL) delete collisioncluster;
     48  if( collisioncluster != NULL) delete collisioncluster;
    4849}
    4950
    5051/**
    51         \brief get the Location of the WorldEntity
    52         \return a pointer to location
     52   \brief get the Location of the WorldEntity
     53   \return a pointer to location
    5354*/
    54 Location* WorldEntity::get_location ()
     55Location* WorldEntity::getLocation ()
    5556{
    56         return &loc;
     57  return &loc;
    5758}
    5859
    5960/**
    60         \brief get the Placement of the WorldEntity
    61         \return a pointer to placement
     61   \brief get the Placement of the WorldEntity
     62   \return a pointer to placement
    6263*/
    63 Placement* WorldEntity::get_placement ()
     64Placement* WorldEntity::getPlacement ()
    6465{
    65         return &place;
     66  return &place;
    6667}
    6768
    6869/**
    69         \brief query whether the WorldEntity in question is free
    70         \return true if the WorldEntity is free or false if it isn't
     70   \brief query whether the WorldEntity in question is free
     71   \return true if the WorldEntity is free or false if it isn't
    7172*/
    7273bool WorldEntity::isFree ()
     
    7677
    7778/**
    78         \brief set the WorldEntity's collision hull
    79         \param newhull: a pointer to a completely assembled CollisionCluster
    80        
    81         Any previously assigned collision hull will be deleted on reassignment
     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
    8283*/
    83 void WorldEntity::set_collision (CollisionCluster* newhull)
     84void WorldEntity::setCollision (CollisionCluster* newhull)
    8485{
    85         if( newhull == NULL) return;
    86         if( collisioncluster != NULL) delete collisioncluster;
    87         collisioncluster = newhull;
     86  if( newhull == NULL) return;
     87  if( collisioncluster != NULL) delete collisioncluster;
     88  collisioncluster = newhull;
    8889}
    8990
    9091/**
    91         \brief this method is called every frame
    92         \param time: the time in seconds that has passed since the last tick
    93        
    94         Handle all stuff that should update with time inside this method (movement, animation, etc.)
     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.)
    9596*/
    9697void WorldEntity::tick(float time)
     
    100101/**
    101102   \brief the entity is drawn onto the screen with this function
    102 
     103   
    103104   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.
    104105*/
     
    108109
    109110/**
    110         \brief this function is called, when two entities collide
    111         \param other: the world entity with whom it collides
    112         \param ownhitflags: flags to the CollisionCluster subsections that registered an impact
    113         \param otherhitflags: flags to the CollisionCluster subsections of the other entity that registered an impact
     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
    114115
    115         Implement behaviour like damage application or other miscellaneous collision stuff in this function
     116   Implement behaviour like damage application or other miscellaneous collision stuff in this function
    116117*/
    117118void WorldEntity::collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags) {}
     
    135136
    136137/**
    137         \brief basic initialisation for bound Entities
     138   \brief basic initialisation for bound Entities
    138139*/
    139140void WorldEntity::init( Location* spawnloc, WorldEntity* spawnowner)
    140141{
    141         loc = *spawnloc;
    142         owner = spawnowner;
     142  loc = *spawnloc;
     143  owner = spawnowner;
    143144}
    144145
    145146/**
    146         \brief basic initialisation for free Entities
     147   \brief basic initialisation for free Entities
    147148*/
    148149void WorldEntity::init( Placement* spawnplc, WorldEntity* spawnowner)
    149150{
    150         place = *spawnplc;
    151         owner = spawnowner;
     151  place = *spawnplc;
     152  owner = spawnowner;
    152153}
    153154
    154155/**
    155         \brief this is called immediately after the Entity has been constructed and initialized
    156        
    157         Put any initialisation code that requires knowledge of location (placement if the Entity is free) and owner of the entity here.
    158         DO NOT place such code in the constructor, those variables are set AFTER the entity is constucted.
     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.
    159160*/
    160 void WorldEntity::post_spawn ()
     161void WorldEntity::postSpawn ()
    161162{
    162163}
    163164
    164165/**
    165         \brief this handles incoming command messages
    166         \param cmd: a pointer to the incoming Command structure
    167        
    168         Put all code that handles Command messages here, this will mainly be called by the assigned CommandNode but can also be used
    169         to send commands from one WorldEntity to another.
     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.
    170171*/
    171172void WorldEntity::command (Command* cmd)
     
    174175
    175176/**
    176         \brief this is called by the local Camera to determine the point it should look at on the WorldEntity
    177         \param locbuf: a pointer to the buffer to fill with a location to look at
     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
    178179       
    179         You may put any Location you want into locbuf, the Camera will determine via the corresponding Track how
    180         to look at the location you return with this.
     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.
    181182*/
    182 void WorldEntity::get_lookat (Location* locbuf)
     183void WorldEntity::getLookat (Location* locbuf)
    183184{
    184185}
    185186
    186187/**
    187         \brief this method is called by the world if the WorldEntity leaves valid gamespace
    188        
    189         For free entities this means it left the Track boundaries. With bound entities it means its Location adresses a
    190         place that is not in the world anymore. In both cases you might have to take extreme measures (a.k.a. call destroy).
     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).
    191192*/
    192 void WorldEntity::left_world ()
     193void WorldEntity::leftWorld ()
    193194{
    194195}
  • orxonox/branches/sound/src/world_entity.h

    r2551 r3238  
    44*/
    55
    6 #ifndef WORLD_ENTITY_H
    7 #define WORLD_ENTITY_H
     6#ifndef _WORLD_ENTITY_H
     7#define _WORLD_ENTITY_H
    88
    99#include "stdincl.h"
     
    1818 public:
    1919  WorldEntity (bool isFree = false);
    20   ~WorldEntity ();
     20  virtual ~WorldEntity ();
    2121 
    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);
    2525 
    2626  bool isFree ();
     
    2929  //void removeAbility(Ability* ability);
    3030 
    31   virtual void post_spawn ();
     31  virtual void postSpawn ();
    3232  virtual void tick (float time);
    3333  virtual void hit (WorldEntity* weapon, Vector loc);
     
    3737 
    3838  virtual void draw ();
    39   virtual void get_lookat (Location* locbuf);
     39  virtual void getLookat (Location* locbuf);
    4040 
    41   virtual void left_world ();
     41  virtual void leftWorld ();
    4242 
    4343 private:
     
    5555};
    5656
    57 #endif
     57#endif /* _WORLD_ENTITY_H */
Note: See TracChangeset for help on using the changeset viewer.