Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2058 in orxonox.OLD for orxonox/branches


Ignore:
Timestamp:
Jul 2, 2004, 11:36:56 AM (20 years ago)
Author:
chris
Message:

orxonox/branches/chris: Trunk remerged into my branch started on SDL reconfiguration

Location:
orxonox/branches/chris
Files:
6 deleted
31 edited
14 copied

Legend:

Unmodified
Added
Removed
  • orxonox/branches/chris/Makefile.in

    r1982 r2058  
    6969LTLIBOBJS = @LTLIBOBJS@
    7070MAKEINFO = @MAKEINFO@
     71MSBITFIELDS = @MSBITFIELDS@
    7172OBJEXT = @OBJEXT@
    7273PACKAGE = @PACKAGE@
  • orxonox/branches/chris/configure

    r1982 r2058  
    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 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 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 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 AWK SET_MAKE am__leading_dot MSBITFIELDS 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 LIBOBJS LTLIBOBJS'
    315315ac_subst_files=''
    316316
     
    17261726
    17271727
     1728echo "$as_me:$LINENO: checking for mingw" >&5
     1729echo $ECHO_N "checking for mingw... $ECHO_C" >&6
     1730case `uname` in
     1731  *MINGW*)
     1732    mingw=yes
     1733    MSBITFIELDS="-mms-bitfields"
     1734    ;;
     1735  *)
     1736    mingw=no
     1737    ;;
     1738esac
     1739echo "$as_me:$LINENO: result: $mingw" >&5
     1740echo "${ECHO_T}$mingw" >&6
     1741
     1742
     1743
    17281744# Checks for programs.
    17291745ac_ext=cc
     
    49534969
    49544970fi
     4971
     4972
     4973LIBS="$LIBS `pkg-config --libs  gtk+-2.0`"
    49554974
    49564975
     
    64386457s,@SET_MAKE@,$SET_MAKE,;t t
    64396458s,@am__leading_dot@,$am__leading_dot,;t t
     6459s,@MSBITFIELDS@,$MSBITFIELDS,;t t
    64406460s,@CXX@,$CXX,;t t
    64416461s,@CXXFLAGS@,$CXXFLAGS,;t t
  • orxonox/branches/chris/configure.ac

    r1982 r2058  
    77AC_CONFIG_SRCDIR([.])
    88AC_CONFIG_HEADER([config.h])
     9
     10AC_MSG_CHECKING([for mingw])
     11case `uname` in
     12  *MINGW*)
     13    mingw=yes
     14    MSBITFIELDS="-mms-bitfields"
     15    ;;
     16  *)
     17    mingw=no
     18    ;;
     19esac
     20AC_MSG_RESULT([$mingw])
     21AC_SUBST(MSBITFIELDS)
     22
    923
    1024# Checks for programs.
     
    92106AC_CHECK_LIB([m], [main])
    93107
     108LIBS="$LIBS `pkg-config --libs  gtk+-2.0`"
     109
     110
    94111# Checks for header files.
    95112AC_HEADER_STDC
  • orxonox/branches/chris/console/Makefile.am

    r1982 r2058  
    1 AM_CXXFLAGS=`pkg-config --cflags gtk+-2.0`
    2 AM_LDFLAGS=`pkg-config --libs  gtk+-2.0`
     1AM_CXXFLAGS=`pkg-config --cflags gtk+-2.0` $(MSBITFIELDS)
     2#AM_LDFLAGS=`pkg-config --libs  gtk+-2.0`
    33
    44bin_PROGRAMS=console
    5 console_SOURCES=orxonox_console.cc orxonox_console_entry.cc orxonox_console_log.cc
     5console_SOURCES=orxonox_console.cc orxonox_console.h \
     6                orxonox_console_entry.cc orxonox_console_entry.h \
     7                orxonox_console_log.cc orxonox_console_log.h
    68
    79#  uncomment the following if bencoder requires the math library
  • orxonox/branches/chris/console/Makefile.in

    r1982 r2058  
    6969LTLIBOBJS = @LTLIBOBJS@
    7070MAKEINFO = @MAKEINFO@
     71MSBITFIELDS = @MSBITFIELDS@
    7172OBJEXT = @OBJEXT@
    7273PACKAGE = @PACKAGE@
     
    110111sysconfdir = @sysconfdir@
    111112target_alias = @target_alias@
    112 AM_CXXFLAGS = `pkg-config --cflags gtk+-2.0`
    113 AM_LDFLAGS = `pkg-config --libs  gtk+-2.0`
    114 
     113AM_CXXFLAGS = `pkg-config --cflags gtk+-2.0` $(MSBITFIELDS)
     114
     115#AM_LDFLAGS=`pkg-config --libs  gtk+-2.0`
    115116bin_PROGRAMS = console
    116 console_SOURCES = orxonox_console.cc orxonox_console_entry.cc orxonox_console_log.cc
     117console_SOURCES = orxonox_console.cc orxonox_console.h \
     118                orxonox_console_entry.cc orxonox_console_entry.h \
     119                orxonox_console_log.cc orxonox_console_log.h
     120
    117121subdir = console
    118122ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     
    141145CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
    142146        -o $@
     147COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
     148        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
     149CCLD = $(CC)
     150LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
    143151DIST_SOURCES = $(console_SOURCES)
    144152DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
  • orxonox/branches/chris/console/orxonox_console_entry.cc

    r1907 r2058  
    2929
    3030
    31 OrxonoxConsoleEntry::OrxonoxConsoleEntry()
     31OrxonoxConsoleEntry::OrxonoxConsoleEntry(void)
    3232{}
    3333
  • orxonox/branches/chris/gui/Makefile.am

    r1982 r2058  
    1 AM_CFLAGS=`pkg-config --cflags gtk+-2.0`
    2 AM_LDFLAGS=`pkg-config --libs  gtk+-2.0`
     1AM_CXXFLAGS=`pkg-config --cflags gtk+-2.0` $(MSBITFIELDS)
     2#AM_LDFLAGS=`pkg-config --libs  gtk+-2.0`
    33
    44bin_PROGRAMS=gui
    5 gui_SOURCES=orxonox_gui.c orxonox_gui_audio.c orxonox_gui_exec.c orxonox_gui_file.c orxonox_gui_video.c
     5gui_SOURCES=orxonox_gui.cc orxonox_gui.h \
     6        orxonox_gui_video.cc orxonox_gui_video.h \
     7        orxonox_gui_audio.cc orxonox_gui_audio.h \
     8        orxonox_gui_exec.cc orxonox_gui_exec.h \
     9        orxonox_gui_flags.cc orxonox_gui_flags.h
     10#orxonox_gui_file.cc
    611
    712#  uncomment the following if bencoder requires the math library
     
    1318#  following and add `chk' to the EXTRA_DIST list
    1419#TESTS=chk
     20EXTRA_DIST = rc banner.xpm
    1521
    1622#  build and install the .info pages
  • orxonox/branches/chris/gui/Makefile.in

    r1982 r2058  
    6969LTLIBOBJS = @LTLIBOBJS@
    7070MAKEINFO = @MAKEINFO@
     71MSBITFIELDS = @MSBITFIELDS@
    7172OBJEXT = @OBJEXT@
    7273PACKAGE = @PACKAGE@
     
    110111sysconfdir = @sysconfdir@
    111112target_alias = @target_alias@
    112 AM_CFLAGS = `pkg-config --cflags gtk+-2.0`
    113 AM_LDFLAGS = `pkg-config --libs  gtk+-2.0`
    114 
     113AM_CXXFLAGS = `pkg-config --cflags gtk+-2.0` $(MSBITFIELDS)
     114
     115#AM_LDFLAGS=`pkg-config --libs  gtk+-2.0`
    115116bin_PROGRAMS = gui
    116 gui_SOURCES = orxonox_gui.c orxonox_gui_audio.c orxonox_gui_exec.c orxonox_gui_file.c orxonox_gui_video.c
     117gui_SOURCES = orxonox_gui.cc orxonox_gui.h \
     118        orxonox_gui_video.cc orxonox_gui_video.h \
     119        orxonox_gui_audio.cc orxonox_gui_audio.h \
     120        orxonox_gui_exec.cc orxonox_gui_exec.h \
     121        orxonox_gui_flags.cc orxonox_gui_flags.h
     122
     123#orxonox_gui_file.cc
     124
     125#  uncomment the following if bencoder requires the math library
     126#gui_LDADD=-lm
     127
     128#EXTRA_DIST=orxonox.lsm.in orxonox.spec.in orxonox.texinfo
     129
     130#  if you write a self-test script named `chk', uncomment the
     131#  following and add `chk' to the EXTRA_DIST list
     132#TESTS=chk
     133EXTRA_DIST = rc banner.xpm
    117134subdir = gui
    118135ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     
    123140PROGRAMS = $(bin_PROGRAMS)
    124141
    125 am_gui_OBJECTS = orxonox_gui.$(OBJEXT) orxonox_gui_audio.$(OBJEXT) \
    126         orxonox_gui_exec.$(OBJEXT) orxonox_gui_file.$(OBJEXT) \
    127         orxonox_gui_video.$(OBJEXT)
     142am_gui_OBJECTS = orxonox_gui.$(OBJEXT) orxonox_gui_video.$(OBJEXT) \
     143        orxonox_gui_audio.$(OBJEXT) orxonox_gui_exec.$(OBJEXT) \
     144        orxonox_gui_flags.$(OBJEXT)
    128145gui_OBJECTS = $(am_gui_OBJECTS)
    129146gui_LDADD = $(LDADD)
     
    137154@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_audio.Po \
    138155@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_exec.Po \
    139 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_file.Po \
     156@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_flags.Po \
    140157@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_video.Po
     158CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
     159        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     160CXXLD = $(CXX)
     161CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
     162        -o $@
    141163COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
    142164        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
     
    150172
    151173.SUFFIXES:
    152 .SUFFIXES: .c .o .obj
     174.SUFFIXES: .cc .o .obj
    153175$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
    154176        cd $(top_srcdir) && \
     
    182204gui$(EXEEXT): $(gui_OBJECTS) $(gui_DEPENDENCIES)
    183205        @rm -f gui$(EXEEXT)
    184         $(LINK) $(gui_LDFLAGS) $(gui_OBJECTS) $(gui_LDADD) $(LIBS)
     206        $(CXXLINK) $(gui_LDFLAGS) $(gui_OBJECTS) $(gui_LDADD) $(LIBS)
    185207
    186208mostlyclean-compile:
     
    193215@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_audio.Po@am__quote@
    194216@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_exec.Po@am__quote@
    195 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_file.Po@am__quote@
     217@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_flags.Po@am__quote@
    196218@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_video.Po@am__quote@
    197219
    198 .c.o:
    199 @am__fastdepCC_TRUE@    if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
    200 @am__fastdepCC_TRUE@      -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
    201 @am__fastdepCC_TRUE@    then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
    202 @am__fastdepCC_TRUE@    else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
    203 @am__fastdepCC_TRUE@    fi
    204 @AMDEP_TRUE@@am__fastdepCC_FALSE@       source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    205 @AMDEP_TRUE@@am__fastdepCC_FALSE@       depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
    206 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    207 @am__fastdepCC_FALSE@   $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
    208 
    209 .c.obj:
    210 @am__fastdepCC_TRUE@    if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
    211 @am__fastdepCC_TRUE@      -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
    212 @am__fastdepCC_TRUE@    then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
    213 @am__fastdepCC_TRUE@    else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
    214 @am__fastdepCC_TRUE@    fi
    215 @AMDEP_TRUE@@am__fastdepCC_FALSE@       source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    216 @AMDEP_TRUE@@am__fastdepCC_FALSE@       depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
    217 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    218 @am__fastdepCC_FALSE@   $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
     220.cc.o:
     221@am__fastdepCXX_TRUE@   if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
     222@am__fastdepCXX_TRUE@     -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
     223@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
     224@am__fastdepCXX_TRUE@   else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
     225@am__fastdepCXX_TRUE@   fi
     226@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
     227@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
     228@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     229@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
     230
     231.cc.obj:
     232@am__fastdepCXX_TRUE@   if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
     233@am__fastdepCXX_TRUE@     -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
     234@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
     235@am__fastdepCXX_TRUE@   else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
     236@am__fastdepCXX_TRUE@   fi
     237@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
     238@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
     239@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     240@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
    219241uninstall-info-am:
    220242
     
    393415
    394416
    395 #  uncomment the following if bencoder requires the math library
    396 #gui_LDADD=-lm
    397 
    398 #EXTRA_DIST=orxonox.lsm.in orxonox.spec.in orxonox.texinfo
    399 
    400 #  if you write a self-test script named `chk', uncomment the
    401 #  following and add `chk' to the EXTRA_DIST list
    402 #TESTS=chk
    403 
    404417#  build and install the .info pages
    405418#info_TEXINFOS = orxonox.texinfo
  • orxonox/branches/chris/gui/orxonox_gui.h

    r1864 r2058  
    1 
    21#ifndef _ORXONOX_GUI_H
    32#define _ORXONOX_GUI_H
    43
    5 #include <stdio.h>
    64#include <stdlib.h>
    75#include <string.h>
    8 #include <gtk/gtk.h>
    9 #include "orxonox_gui_exec.h"
     6#include <gtk/gtkmain.h>
     7#include <gtk/gtkwindow.h>
     8#include <gtk/gtkframe.h>
     9#include <gtk/gtkhbox.h>
     10#include <gtk/gtkvbox.h>
     11#include <gtk/gtkbutton.h>
     12#include <gtk/gtkcheckbutton.h>
     13#include <gtk/gtkhscale.h>
     14#include <gtk/gtkoptionmenu.h>
     15#include <gtk/gtkmenu.h>
     16#include <gtk/gtkmenuitem.h>
     17#include <gtk/gtklabel.h>
     18#include <gtk/gtkimage.h>
    1019
    11 struct settings
     20class OrxonoxGui
    1221{
    13   int video_fullscreen;
    14   int video_wireframe;
     22 public:
     23  OrxonoxGui (int argc, char *argv[]);
     24  ~OrxonoxGui ();
     25
     26};
     27
     28class Widget
     29{
     30 public:
     31  Widget* next;
     32  GtkWidget* widget;
     33  int is_option;
     34
     35  //virtual void create ();
     36  //  void addWidget ();
     37  void connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *));
     38  void connectSignal (char* event, gint (*signal)(GtkWidget*, Widget *));
     39  void show ();
     40  void listOptions ();
     41  void setOptions ();
     42
     43};
     44
     45
     46
     47class Container : public Widget
     48{
     49 private:
     50  int borderwidth;
     51  int policy;
     52  char* label;
    1553 
    16   int audio_enable_sound;
    17   int audio_music_volume;
    18   int audio_effects_volume;
     54 public:
     55  Widget* down;
     56  void setBorderWidth (int borderwidth);
     57  virtual void setTitle (char* title) = 0;
     58  void fill (Widget *lowerWidget);
     59};
     60
     61class Window : public Container
     62{
     63 public:
     64  Window (char* windowName);
     65  Window (void);
     66  ~Window ();
    1967 
    20   int exec_save_settings;
    21   int exec_show_menu;
     68  void setTitle (char* title);
     69  void showall ();
     70  static gint orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data);
    2271};
    23 extern verbose;
     72
     73class Frame :public Container
     74{
     75 public:
     76  Frame (char* frameName);
     77  Frame (void);
     78  ~Frame ();
     79 
     80  void setTitle (char* title);
     81};
     82
     83class Box : public Widget
     84{
     85 public:
     86  Box (void);
     87  Box (char boxtype);
     88  ~Box (void);
     89
     90  Widget* down;
     91  void fill (Widget* lowerWidget);
     92
     93};
     94
     95class Image : public Widget
     96{
     97 public:
     98  Image (char* imgaename);
     99  ~Image ();
     100};
     101
     102class Option : public Widget
     103{
     104 public:
     105  //virtual gint OptionChange (GtkWidget *widget, GdkEvent *event, gpointer data);
     106 
     107  int value;
     108  char* option_name;
     109  char* flag_name;
     110  char* flag_name_short;
     111  int default_value;
     112
     113  void setFlagName (char* flagname, int defaultvalue);
     114  void setFlagName (char* flagname, char* flagnameshort, int defaultvalue);
     115  virtual void redraw () = 0;
     116};
     117
     118class Button : public Option
     119{
     120 public:
     121  Button (char* buttonname);
     122  ~Button (void);
     123 
     124  void redraw();
     125};
     126
     127class CheckButton : public Option
     128{
     129 public:
     130  CheckButton (char* buttonname);
     131  ~CheckButton (void);
     132  static gint OptionChange (GtkWidget* widget, Widget* checkbutton);
     133  void redraw ();
     134};
     135
     136class Slider : public Option
     137{
     138 public:
     139  Slider (char* slidername,int start, int end);
     140  ~Slider ();
     141  static gint OptionChange (GtkWidget* widget, Widget* slider);
     142  void redraw();
     143};
     144
     145class Menu : public Option
     146{
     147 public:
     148  Menu (char* menuname, ...);
     149  ~Menu ();
     150
     151  static gint OptionChange (GtkWidget* widget, Widget* menu);
     152  void redraw();
     153};
     154
     155class Label : public Widget
     156{
     157 public:
     158  Label ();
     159  Label (char* text);
     160  ~Label ();
     161 
     162  void setText (char * text);
     163  char* getText ();
     164};
     165
     166//gint orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data);
    24167
    25168#endif /* _ORXONOX_GUI_H */
  • orxonox/branches/chris/gui/orxonox_gui_audio.h

    r1864 r2058  
    22#define _ORXONOX_GUI_AUDIO_H
    33
     4#include "orxonox_gui.h"
    45
    5 void audio_check_button_change(GtkWidget *widget, int* data);
    6 GtkWidget *orxonox_gui_audio_frame (struct settings *orxonox_settings);
    7 
     6class OrxonoxGuiAudio
     7{
     8 private:
     9  Frame* audioFrame;
     10  Box* audioBox;
     11  CheckButton* enableSound;
     12  Slider* musicVolume;
     13  Slider* effectsVolume;
     14 public:
     15  OrxonoxGuiAudio ();
     16  ~OrxonoxGuiAudio ();
     17 
     18  Frame* getFrame ();
     19};
    820#endif /* _ORXONOX_GUI_AUDIO_H */
  • orxonox/branches/chris/gui/orxonox_gui_exec.h

    r1864 r2058  
    11#ifndef _ORXONOX_GUI_EXEC_H
    22#define _ORXONOX_GUI_EXEC_H
     3
    34#include "orxonox_gui.h"
     5#include <stdio.h>
     6using namespace std;
    47
    5 gint orxonox_gui_quit ( GtkWidget *widget, GdkEvent *event, gpointer data);
     8class OrxonoxGuiExec
     9{
     10 private:
     11  Frame* execFrame;
     12  Box* execBox;
     13  Button* start;
     14  CheckButton* saveSettings;
     15  Menu* verboseMode;
     16  CheckButton* alwaysShow;
     17  Button* quit;
     18  char* configFile;
     19  FILE* CONFIG_FILE;
     20 public:
     21  OrxonoxGuiExec (Window* orxonoxGUI);
     22  ~OrxonoxGuiExec ();
     23 
     24  Frame* getFrame ();
     25 
     26  void setFilename (char* filename);
     27  int shouldsave ();
     28  void writeToFile (Widget* widget);
     29  void writeFileText (Widget* widget);
     30  void readFromFile (Widget* widget);
     31  void readFileText (Widget* widget, char* variableName, int variableValue);
    632
    7 void exec_check_button_change(GtkWidget *widget, int* data);
    8 GtkWidget *orxonox_gui_exec_frame (struct settings *orxonox_settings);
    9 char * orxonox_flags_text (struct settings *orxonox_settings, char *exec_flags_text);
    10 void orxonox_flags_update (void);
     33};
     34  gint startOrxonox (GtkWidget *widget, Widget* data);
    1135
    1236#endif /* _ORXONOX_GUI_EXEC_H */
  • orxonox/branches/chris/gui/orxonox_gui_video.h

    r1864 r2058  
    44#include "orxonox_gui.h"
    55
    6 void video_option_change(GtkWidget *widget, int * data);
    7 GtkWidget *orxonox_gui_video_frame (struct settings *orxonox_settings);
    8 
     6class OrxonoxGuiVideo
     7{
     8 private:
     9  Frame* videoFrame;
     10  Box* videoBox;
     11  CheckButton* fullscreen;
     12  CheckButton* wireframe;
     13 public:
     14  OrxonoxGuiVideo ();
     15  ~OrxonoxGuiVideo ();
     16 
     17  Frame* getFrame ();
     18};
    919#endif /* _ORXONOX_GUI_VIDEO_H */
  • orxonox/branches/chris/src/Makefile.am

    r1982 r2058  
    66
    77bin_PROGRAMS=orxonox
    8 orxonox_SOURCES=orxonox.cc world.cc environment.cc player.cc npc.cc input_output.cc data_tank.cc ai.cc shoot_laser.cc shoot_rocket.cc
     8orxonox_SOURCES=orxonox.cc world.cc environment.cc player.cc npc.cc input_output.cc data_tank.cc ai.cc shoot_laser.cc shoot_rocket.cc world_entity.cc synchronisable.cc list.cc vector.cc ability.cc
    99
    1010#  uncomment the following if bencoder requires the math library
  • orxonox/branches/chris/src/Makefile.in

    r1982 r2058  
    6969LTLIBOBJS = @LTLIBOBJS@
    7070MAKEINFO = @MAKEINFO@
     71MSBITFIELDS = @MSBITFIELDS@
    7172OBJEXT = @OBJEXT@
    7273PACKAGE = @PACKAGE@
     
    116117#"-O3 -pedantic -fPIC -ffast-math -I/usr/X11R6/include"
    117118bin_PROGRAMS = orxonox
    118 orxonox_SOURCES = orxonox.cc world.cc environment.cc player.cc npc.cc input_output.cc data_tank.cc ai.cc shoot_laser.cc shoot_rocket.cc
     119orxonox_SOURCES = orxonox.cc world.cc environment.cc player.cc npc.cc input_output.cc data_tank.cc ai.cc shoot_laser.cc shoot_rocket.cc world_entity.cc synchronisable.cc list.cc vector.cc ability.cc
    119120subdir = src
    120121ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     
    128129        environment.$(OBJEXT) player.$(OBJEXT) npc.$(OBJEXT) \
    129130        input_output.$(OBJEXT) data_tank.$(OBJEXT) ai.$(OBJEXT) \
    130         shoot_laser.$(OBJEXT) shoot_rocket.$(OBJEXT)
     131        shoot_laser.$(OBJEXT) shoot_rocket.$(OBJEXT) \
     132        world_entity.$(OBJEXT) synchronisable.$(OBJEXT) list.$(OBJEXT) \
     133        vector.$(OBJEXT) ability.$(OBJEXT)
    131134orxonox_OBJECTS = $(am_orxonox_OBJECTS)
    132135orxonox_LDADD = $(LDADD)
     
    137140depcomp = $(SHELL) $(top_srcdir)/depcomp
    138141am__depfiles_maybe = depfiles
    139 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ai.Po ./$(DEPDIR)/data_tank.Po \
    140 @AMDEP_TRUE@    ./$(DEPDIR)/environment.Po \
    141 @AMDEP_TRUE@    ./$(DEPDIR)/input_output.Po ./$(DEPDIR)/npc.Po \
    142 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/player.Po \
    143 @AMDEP_TRUE@    ./$(DEPDIR)/shoot_laser.Po \
    144 @AMDEP_TRUE@    ./$(DEPDIR)/shoot_rocket.Po ./$(DEPDIR)/world.Po
     142@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ability.Po ./$(DEPDIR)/ai.Po \
     143@AMDEP_TRUE@    ./$(DEPDIR)/data_tank.Po ./$(DEPDIR)/environment.Po \
     144@AMDEP_TRUE@    ./$(DEPDIR)/input_output.Po ./$(DEPDIR)/list.Po \
     145@AMDEP_TRUE@    ./$(DEPDIR)/npc.Po ./$(DEPDIR)/orxonox.Po \
     146@AMDEP_TRUE@    ./$(DEPDIR)/player.Po ./$(DEPDIR)/shoot_laser.Po \
     147@AMDEP_TRUE@    ./$(DEPDIR)/shoot_rocket.Po \
     148@AMDEP_TRUE@    ./$(DEPDIR)/synchronisable.Po ./$(DEPDIR)/vector.Po \
     149@AMDEP_TRUE@    ./$(DEPDIR)/world.Po ./$(DEPDIR)/world_entity.Po
    145150CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    146151        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     
    195200        -rm -f *.tab.c
    196201
     202@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ability.Po@am__quote@
    197203@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ai.Po@am__quote@
    198204@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data_tank.Po@am__quote@
    199205@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/environment.Po@am__quote@
    200206@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input_output.Po@am__quote@
     207@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
    201208@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/npc.Po@am__quote@
    202209@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox.Po@am__quote@
     
    204211@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shoot_laser.Po@am__quote@
    205212@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shoot_rocket.Po@am__quote@
     213@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synchronisable.Po@am__quote@
     214@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
    206215@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/world.Po@am__quote@
     216@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/world_entity.Po@am__quote@
    207217
    208218.cc.o:
  • orxonox/branches/chris/src/environment.cc

    r1982 r2058  
    1111   any later version.
    1212
    13    ### File Specific:
    14    main-programmer: ...
    15    co-programmer: ...
     13   ### File Specific
     14   main-programmer: Patrick Boenzli
     15   co-programmer:
    1616*/
    1717
     18#include <iostream>
     19#include <GL/glut.h>
     20#include <stdlib.h>
     21
     22#include "data_tank.h"
    1823
    1924#include "environment.h"
    20 #include <iostream>
    21 
    2225
    2326using namespace std;
    2427
    2528
     29//Sorry Bensch
     30#define LEVEL_LENGTH 500
    2631
    2732Environment::Environment ()
     33  : WorldEntity()
    2834{
    2935
    30 
    31   for (int x = 0; x < 10; x++)
     36  /*
     37  //Sorry Bensch: x,y = 10
     38  for (int x = 0; x < 50; x++)
    3239    {
    33       for (int y = 0; y < 10; y++)
     40      for (int y = 0; y < 50; y++)
    3441        {
    35           mountainTest[x][y] = 0;
     42          mountainTest[x][y] =0;
    3643                                                 
    3744        }
    3845    }
    39 
    40   for (int x = 1; x < 9; x++)
     46  //Sorry Bensch: x,y = 9
     47  for (int x = 1; x < LEVEL_LENGTH; x++)
    4148    {
    42       for (int y = 1; y < 9; y++)
     49      for (int y = 1; y < LEVEL_LENGTH; y++)
    4350        {
    44           mountainTest[x][y] = (float)rand() / 900000000;
    45                                                  
     51          //mountainTest[x][y] = (float)random() / 900000000;
     52          mountainTest[x][y] = (float)(random() % 4);                                       
    4653        }
    4754    }
     55  */
    4856}
    4957
     
    5361
    5462
    55 
    56 void Environment::drawEnvironment()
     63void Environment::paint()
    5764{
     65  /*
    5866  glPushMatrix();
    5967  //glScalef(0.5, 0.5, 1.0);
     
    6472 
    6573  glBegin(GL_LINES);
    66   for (int x = 0; x < 9; x += 1)
     74  for (int x = 0; x < LEVEL_LENGTH; x += 1)
    6775    {
    68       for (int y = 0; y < 9; y += 1)
     76      for (int y = 0; y < 190; y += 1)
    6977        {
    7078          glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]);
     
    7684 
    7785  glBegin(GL_LINES);
    78   for (int y = 0; y < 9; y += 1)
     86  for (int y = 0; y < LEVEL_LENGTH; y += 1)
    7987    {
    80       for (int x = 0; x < 9; x += 1)
     88      for (int x = 0; x < 90; x += 1)
    8189        {
    8290          glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]);
     
    8795 
    8896  glPopMatrix();
     97  */
    8998}
    9099
     100void Environment::drawEnvironment()
     101{
     102
     103}
     104
  • orxonox/branches/chris/src/environment.h

    r1982 r2058  
    11
    2 #include <GL/glut.h>
    3 #include <stdlib.h>
     2
    43
    54#ifndef ENVIRONEMENT_H
    65#define ENVIRONEMENT_H
    76
    8 #include "data_tank.h"
    97
    10 class Environment {
     8#include "world_entity.h"
     9
     10class Environment : public WorldEntity {
    1111
    1212 private:
     
    2121  ~Environment ();
    2222
     23  void paint(void);
    2324  void drawEnvironment(void);
    2425  void setEnvPosition(void);
  • orxonox/branches/chris/src/input_output.cc

    r1982 r2058  
    1616*/
    1717
     18#include <iostream>
     19
     20#include "world.h"
     21#include "input_output.h"
     22#include "player.h"
    1823
    1924#include "input_output.h"
    20 #include <iostream>
    2125
    2226using namespace std;
  • orxonox/branches/chris/src/input_output.h

    r1982 r2058  
    55#define INPUT_OUTPUT_H
    66
    7 #include "world.h"
    8 #include "input_output.h"
    9 #include "player.h"
     7
    108
    119#include "data_tank.h"
     10
     11class World;
     12class Player;
    1213
    1314class InputOutput {
  • orxonox/branches/chris/src/npc.cc

    r1982 r2058  
    1616*/
    1717
     18#include <iostream>
     19#include <GL/glut.h>
     20
     21#include "ai.h"
     22#include "data_tank.h"
    1823
    1924#include "npc.h"
    20 
    21 #include <iostream>
    22 
    2325
    2426using namespace std;
    2527
    2628
    27 NPC::NPC ()
     29NPC::NPC()
     30  : WorldEntity()
    2831{
    2932  hasDied = 0;
     
    5760
    5861void NPC::addAI(AI* ai)
     62{}
     63
     64void NPC::paint()
    5965{
    60 
    61 }
    62 
    63 void NPC::drawNPC(void)
    64 {
     66  //cout << "WorldEntity::WorldEntity();" << endl; 
    6567  /* fix: died flag approach is very stupid, just to show @ convention */
    6668  if( hasDied == 0 ) {
     
    7375}
    7476
     77void NPC::drawNPC()
     78{
     79
     80}
     81
    7582
    7683/* define the reaction, if the ship is been hit */
     
    8188}
    8289
     90
    8391void NPC::die()
    8492{
  • orxonox/branches/chris/src/npc.h

    r1982 r2058  
    33#define NPC_H
    44
    5 /* openGL Headers */
    6 #include <GL/glut.h>
     5#include "world_entity.h"
    76
    8 #include "ai.h"
    9 #include "data_tank.h"
     7class AI;
    108
    11 class NPC {
     9class NPC : public WorldEntity {
    1210
    1311 public:
     
    2321
    2422  void drawNPC(void);
     23  void paint(void);
    2524  void setPosition(float x, float y, float z);
    2625  void getPosition(float* x, float* y, float* z);
  • orxonox/branches/chris/src/orxonox.cc

    r1982 r2058  
    2424*/
    2525
    26 /* class definition header */
     26#include <iostream>
     27#include <cstdio>
     28#include <GL/glut.h>
     29#include <SDL/SDL.h>
     30
     31#include "environment.h"
     32#include "world.h"
     33#include "input_output.h"
     34#include "data_tank.h"
     35#include "stdincl.h"
     36#include "player.h"
     37#include "npc.h"
     38#include "shoot_laser.h"
     39
    2740#include "orxonox.h"
    2841
    29 
    3042using namespace std;
    3143
    3244
    33 
    3445Orxonox::Orxonox ()
    3546{
     
    4051
    4152Orxonox::~Orxonox ()
    42 {
    43   glutSetKeyRepeat(GLUT_KEY_REPEAT_ON);
    44 }
     53{}
    4554
    4655
     
    6372//int Orxonox::offsetY = 0;
    6473
     74
    6575Orxonox* Orxonox::getInstance (void)
    6676{
     
    7383int Orxonox::globalInit (int argc, char** argv)
    7484{
    75   glutInit(&argc, argv);
    76   glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
     85  if( SDL_Init (SDL_INIT_EVERYTHING) == -1)
     86  {
     87    printf ("Could not SDL_Init(): %s\n", SDL_GetError());
     88    return -1;
     89  }
     90 
     91  // Set video mode
     92  // TO DO: parse arguments for settings
     93  SDL_GL_SetAttribute (SDL_GL_RED_SIZE, 5);
     94  SDL_GL_SetAttribute (SDL_GL_GREEN_SIZE, 5);
     95  SDL_GL_SetAttribute (SDL_GL_BLUE_SIZE, 5);
     96  SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 16);
     97 
     98  int bpp = 16;
     99  int width = 640;
     100  int height = 480;
     101  Uint32 flags = SDL_OPENGL | SDL_GL_DOUBLEBUFFER;
     102 
     103  if( (screen = SDL_SetVideoMode (width, height, bpp, flags)) == NULL)
     104  {
     105    printf ("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", width, height, bpp, flags, SDL_GetError());
     106    SDL_Quit();
     107    return -1;
     108  }
     109 
     110  // Set window labeling
     111  // TO DO: Add version information to caption
     112  SDL_WM_SetCaption( "Orxonox", "Orxonox");
     113 
     114  // TO DO: Create a cool icon and use it here
     115  // SDL_WM_SetIcon(SDL_Surface *icon, Uint8 *mask); 
     116
     117  // OpenGL stuff
     118  // (Is this all we initialize globally???)
    77119  glEnable(GL_DEPTH_TEST);
    78   glutInitWindowSize(500, 500);
    79   //glutFullScreen();
    80   glutInitWindowPosition(100, 100);
    81   glutCreateWindow("orxOnox");
    82120  glShadeModel(GL_FLAT);
    83   /* window event dispatchers */
    84   glutDisplayFunc(display);
    85   glutReshapeFunc(reshape);
    86   glutKeyboardFunc(keyboard);
    87   glutKeyboardUpFunc(upKeyboard);
    88 
    89   glutTimerFunc(1000, timeSlice, 0);
    90   cout << "measuring performance...";
     121 
     122//  glutInit(&argc, argv);
     123//  glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
     124//  glutInitWindowSize(500, 500);
     125//  //glutFullScreen();
     126//  glutInitWindowPosition(100, 100);
     127//  glutCreateWindow("OrxonoX");
     128//  /* window event dispatchers */
     129//  glutDisplayFunc(display);
     130//  glutReshapeFunc(reshape);
     131//  glutKeyboardFunc(keyboard);
     132//  glutKeyboardUpFunc(upKeyboard);
     133//
     134//  glutTimerFunc(1000, timeSlice, 0);
     135//  cout << "measuring performance...";
     136
    91137}
    92138
     
    138184  io->setPlayerStep(19.2/fps); /* set player to propper speed */
    139185  localPlayer->shootLaser->setShootStep(20.0/fps); /* set shoot speed */
    140   localPlayer->shootRocket->setShootStep(20.0/fps); /* set shoot speed */
    141186  world->setWorldStep(7.0/fps); /* set the speed of the terrain moving away */
    142187  fps = 0;
     
    261306  (*world).drawWorld();
    262307
    263   glutSwapBuffers();
    264 } 
     308  SDL_Flip( screen);
     309}
    265310
    266311
     
    320365}
    321366
     367void Orxonox::mainLoop()
     368{
     369  // This is where everything is run
     370  while( !bQuitOrxonox)
     371  {
     372    // Process input
     373    // Process time
     374    // Process collision
     375    // Draw
     376    display();
     377  }
     378}
    322379
    323380int main (int argc, char** argv)
    324381
    325382  Orxonox *orx = Orxonox::getInstance();
    326   (*orx).globalInit(argc, argv);
     383  if( (*orx).globalInit(argc, argv) == -1)
     384  {
     385    printf("! Global initialization failed\n");
     386    return -1;
     387  }
     388 
    327389  //(*orx).menuInit(); pb: directly jump to the game, no menu
    328   (*orx).gameInit();
    329 
    330   glutMainLoop(); 
     390 
     391  if( (*orx).gameInit() == -1)
     392  {
     393    printf("! Game initialization failed\n");
     394    return -1;
     395  }
     396
     397  (*orx).mainLoop();
     398 
    331399  return 0;
    332400}
     401
  • orxonox/branches/chris/src/orxonox.h

    r1982 r2058  
    1 
    2 
    31
    42#ifndef ORXONOX_H
    53#define ORXONOX_H
    64
    7 /* standard headers */
    8 #include <iostream>
    9 #include <cstdio>
     5#include <SDL/SDL.h>
    106
    11 /* openGL Headers */
    12 #include <GL/glut.h>
    13 
    14 
    15 #include "environment.h"
    16 #include "world.h"
    17 #include "input_output.h"
    18 #include "data_tank.h"
    19 #include "stdincl.h"
    20 #include "player.h"
     7class World;
     8class InputOutput;
     9class Player;
    2110
    2211
     
    3019  static InputOutput* io;
    3120  static Player* localPlayer;
     21  static bool bQuitOrxonox;
    3222  static bool pause;
    3323  static bool inputEnabled;
     
    4636  static void timeSlice(int value);
    4737
     38  static SDL_Surface* screen;
     39 
    4840 public:
    49 
    5041  static Orxonox* getInstance (void);
    5142
     
    5344  int menuInit (void);
    5445  int gameInit (void);
     46 
     47  void mainLoop();
     48
    5549  void testTheShit(void);
    5650  static void display (void);
  • orxonox/branches/chris/src/player.cc

    r1982 r2058  
    1616*/
    1717
     18#include <iostream>
     19#include <stdlib.h>
     20#include <GL/glut.h>
     21
     22#include "shoot_laser.h"
     23#include "shoot_rocket.h"
     24#include "data_tank.h"
    1825
    1926#include "player.h"
    20 #include <iostream>
    21 #include <stdlib.h>
    22 
    2327
    2428using namespace std;
    2529
    2630
    27 Player::Player () {
    28   // cout << "Player::Player" << endl;
     31Player::Player()
     32   : WorldEntity() {
     33  //cout << "Player::Player" << endl;
    2934  xCor = yCor = zCor = 0;
    3035  shootLaser = new ShootLaser;
     
    5863void Player::goX(float x)
    5964{
    60   //cout << "Player::goX" << endl;
    6165  xCor += x;
    6266}
     
    7377}
    7478
     79
     80
    7581void Player::shoot(int n)
    7682{
     83
    7784  //  if (shootLaser->inhibitor++ <= 100)
    78     shootLaser->addShoot(xCor, yCor, zCor);
    79     // else if (shootLaser->inhibitor++ <= 200)
    80     shootLaser->addShootExt(xCor, yCor, zCor, .1, .4, .0);
    81     //  else if (shootLaser->inhibitor++ <= 300)
    82     shootLaser->addShootExt(xCor, yCor, zCor, -0.1, .4, .0);
    83     //  else
    84     shootLaser->inhibitor =0;
     85  shootLaser->addShoot(xCor, yCor, zCor);
     86  // else if (shootLaser->inhibitor++ <= 200)
     87  shootLaser->addShootExt(xCor, yCor, zCor, .1, .4, .0);
     88  //  else if (shootLaser->inhibitor++ <= 300)
     89  shootLaser->addShootExt(xCor, yCor, zCor, -0.1, .4, .0);
     90  //  else
     91  shootLaser->inhibitor =0;
    8592 
    86     //  if (shootRocket->inhibitor++ >=80)
    87     {
    88       shootRocket->addBackParable(xCor, yCor, zCor);
    89       shootRocket->addSideAcc(xCor, yCor, zCor, RIGHT);
    90       shootRocket->addSideAcc(xCor, yCor, zCor, LEFT);
    91       shootRocket->addRotater(xCor, yCor, zCor);
    92       //  if (shootRocket->inhibitor >=90)
    93       //        shootRocket->inhibitor =0;
    94     }
     93  //  if (shootRocket->inhibitor++ >=80)
     94  {
     95    shootRocket->addBackParable(xCor, yCor, zCor);
     96    shootRocket->addSideAcc(xCor, yCor, zCor, RIGHT);
     97    shootRocket->addSideAcc(xCor, yCor, zCor, LEFT);
     98    shootRocket->addRotater(xCor, yCor, zCor);
     99    //  if (shootRocket->inhibitor >=90)
     100    //        shootRocket->inhibitor =0;
     101  }
    95102  //cout << "Player::shoot" << endl;
     103 
     104  /*
     105  shootLaser->addShoot(xCor, yCor, zCor);
     106  shootLaser->addShootExt(xCor, yCor, zCor, .1, .4, .0);
     107  shootLaser->addShootExt(xCor, yCor, zCor, -0.1, .4, .0);
     108  //shootRocket->addShoot(xCor, yCor, zCor);
     109  //cout << "Player::shoot" << endl;
     110  */
    96111}
    97112
     
    100115
    101116
    102 void Player::drawPlayer(void)
     117void Player::paint()
    103118{
     119  //cout << "Player::drawPlayer" << endl;
    104120  glPushMatrix();
    105121  glTranslatef(xCor, yCor, 3.0);
     
    110126  shootLaser->drawShoot();
    111127  shootRocket->drawShoot();
    112   //cout << "Player::drawPlayer" << endl;
     128  //cout << "Player::drawPlayer, end" << endl;
    113129}
    114130
  • orxonox/branches/chris/src/player.h

    r1982 r2058  
    33#define PLAYER_H
    44
    5 /* openGL Headers */
    6 #include <GL/glut.h>
     5#include "world_entity.h"
    76
    8 #include "shoot_laser.h"
    9 #include "shoot_rocket.h"
    10 #include "data_tank.h"
     7class ShootLaser;
     8class ShootRocket;
    119
    12 class Player {
     10
     11class Player : public WorldEntity
     12{
    1313
    1414 public:
     
    2323  float collisionRadius;
    2424
     25
    2526  /* this player wanna shoot? so include a ref to ShootLaser */
    2627  ShootLaser* shootLaser;
     
    3031  void getPosition(float* x, float* y, float* z);
    3132  void setCollisionRadius(float radius);
     33  void paint();
    3234  void goX(float x);
    3335  void goY(float y);
  • orxonox/branches/chris/src/proto_class.h

    r1982 r2058  
    44
    55#include "data_tank.h"
     6
    67
    78class ProtoClass {
  • orxonox/branches/chris/src/shoot_laser.cc

    r1982 r2058  
    1717
    1818
    19 #include "shoot_laser.h"
    2019
     20
     21#include <GL/glut.h>
    2122#include <iostream>
    2223
     24#include "stdincl.h"
     25#include "data_tank.h"
     26
     27#include "shoot_laser.h"
    2328
    2429using namespace std;
     
    134139  cout << "ShootLaser::setShootStep to " << step << endl;
    135140  this->step = step;
     141  cout << "ShootLaser::setShootStep end " << step << endl;
    136142}
    137143
  • orxonox/branches/chris/src/shoot_laser.h

    r1982 r2058  
    33#define SHOOT_LASER_H
    44
    5 /* openGL Headers */
    6 #include <GL/glut.h>
    7 
    8 #include "stdincl.h"
    9 #include "data_tank.h"
    105
    116class ShootLaser {
    12 
    137
    148 public:
  • orxonox/branches/chris/src/shoot_rocket.cc

    r1982 r2058  
    1717
    1818
     19#include <iostream>
     20#include <math.h>
     21#include <GL/glut.h>
     22
     23#include "stdincl.h"
     24#include "data_tank.h"
     25#include "npc.h"
     26
    1927#include "shoot_rocket.h"
    20 
    21 #include <iostream>
    22 
    2328
    2429using namespace std;
  • orxonox/branches/chris/src/shoot_rocket.h

    r1982 r2058  
    33#define SHOOT_ROCKET_H
    44
    5 /* openGL Headers */
    6 #include <GL/glut.h>
    7 #include <math.h>
    85
    9 #include "stdincl.h"
    10 #include "data_tank.h"
    11 #include "npc.h"
    126
    137enum RocketType { HOMING, SIDEACC, BACKPARABLE, ROTATER};
    148enum RocketDirection {LEFT, RIGHT, UP, DOWN};
    159
     10
    1611class ShootRocket {
    17 
    1812
    1913 public:
  • orxonox/branches/chris/src/world.cc

    r1982 r2058  
    1515*/
    1616
     17#include <iostream>
     18#include <stdlib.h>
     19#include <cmath>
     20#include <GL/glut.h>
     21
     22#include "npc.h"
     23#include "player.h"
     24#include "environment.h"
     25#include "shoot_laser.h"
     26#include "shoot_rocket.h"
     27#include "stdincl.h"
     28#include "data_tank.h"
    1729
    1830#include "world.h"
    1931
    20 #include <iostream>
    2132
    2233using namespace std;
     
    174185void World::drawWorld(void)
    175186{
     187
    176188  glLoadIdentity();
    177189  gluLookAt(0.0, -14.0 + DataTank::yOffset, 15.0, 0.0, 0.0 + DataTank::yOffset, 0.0, 0.0, 1.0, 0.0);
     
    181193  while( tmpPlayer != null )
    182194    {
    183       (*tmpPlayer->player).drawPlayer();
     195      tmpPlayer->player->paint();
    184196      tmpPlayer = tmpPlayer->next;
    185197    }
     
    188200  while( tmpNPC != null )
    189201    {
    190       (*tmpNPC->npc).drawNPC();
     202      (*tmpNPC->npc).paint();
    191203      tmpNPC = tmpNPC->next;
    192204    }
     
    235247    }
    236248
    237  
     249
    238250}
    239251
     
    254266void World::setWorldStep(float step)
    255267{
     268  //cout << "World::setWorldStep(" << step << ");" << endl;
    256269  this->step = step;
    257   cout << "setting speed to " << step << endl;
     270  //cout << "setting speed to " << step << endl;
    258271}
    259272
  • orxonox/branches/chris/src/world.h

    r1982 r2058  
    1 
    2 
    31
    42#ifndef WORLD_H
    53#define WORLD_H
    64
    7 #include <stdlib.h>
    8 #include <cmath>
     5class Player;
     6class NPC;
     7class Environment;
    98
    10 #include "npc.h"
    11 #include "player.h"
    12 #include "environment.h"
    13 #include "shoot_laser.h"
    14 #include "shoot_rocket.h"
    15 #include "stdincl.h"
    16 #include "data_tank.h"
    179
    1810class World {
Note: See TracChangeset for help on using the changeset viewer.