Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4343 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
May 27, 2005, 10:17:18 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: importer is now also run by framework

Location:
orxonox/trunk/src/subprojects
Files:
2 deleted
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/subprojects/Makefile.in

    r4338 r4343  
    186186          esac; \
    187187        done; \
    188         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/Makefile'; \
     188        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/Makefile'; \
    189189        cd $(top_srcdir) && \
    190           $(AUTOMAKE) --foreign  src/subprojects/Makefile
     190          $(AUTOMAKE) --gnu  src/subprojects/Makefile
    191191.PRECIOUS: Makefile
    192192Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/subprojects/framework.cc

    r4338 r4343  
    3434  while(!framework->isFinished)
    3535    {
     36#ifdef GUI_MODULE
    3637      while(gtk_events_pending())
    3738        gtk_main_iteration();
    38 
     39#endif
    3940      // keyhandler returns false if sdl gets quit by some event
    4041      framework->eventHandler();
     
    141142          case SDLK_q:
    142143          case SDLK_ESCAPE:
     144#ifdef GUI_MODULE
    143145            quitGui(NULL, NULL);
     146#else
     147            this->quit();
     148#endif
    144149            break;
    145150          case SDLK_a:
     
    158163      case SDL_QUIT:
    159164        // then we're done and we'll end this program
    160         quitGui(NULL, NULL);
     165#ifdef GUI_MODULE
     166            quitGui(NULL, NULL);
     167#else
     168            this->quit();
     169#endif
    161170        break;
    162171      default:
     
    210219  ResourceManager::getInstance()->setDataDir(DATA_DIRECTORY);
    211220 
    212 
    213   moduleInit();
    214 
    215221  camera = new Camera();
    216222
     
    238244}
    239245
     246#ifdef GUI_MODULE
    240247int quitGui(GtkWidget* widget, void* data)
    241248{
     
    245252#endif /* HAVE_GTK2 */
    246253}
    247 
     254#endif
    248255
    249256int main(int argc, char *argv[])
     
    253260  Framework* framework = Framework::getInstance();
    254261
    255   framework->moduleInitGui();
    256   //  framework->mainloopGui(NULL);
    257 
     262  framework->moduleInit(argc, argv);
     263#ifdef GUI_MODULE
     264  framework->moduleInitGui(argc, argv);
     265#endif
    258266  framework->mainLoop(NULL);
    259267
  • orxonox/trunk/src/subprojects/framework.h

    r4338 r4343  
    55#include "glincl.h"
    66#include "SDL_events.h"
     7#include "debug.h"
    78
     9#ifdef GUI_MODULE
    810#include "gui_gtk.h"
    9 
     11#endif
    1012
    1113#define DATA_DIRECTORY "~/svn/data/"
     
    3739
    3840
    39   void moduleInit();
    40   void moduleInitGui(void);
     41  void moduleInit(int argc, char** argv);
     42#ifdef GUI_MODULE
     43  void moduleInitGui(int argc, char** argv);
     44#endif
    4145  void moduleEventHandler(SDL_Event* event);
    4246  void moduleTick(float dt);
     
    5862};
    5963
     64#ifdef GUI_MODULE
    6065int quitGui(GtkWidget* widget, void* data);
    61 
     66#endif
    6267
    6368#endif /* _FRAMEWORK_H */
  • orxonox/trunk/src/subprojects/gui/Makefile.in

    r4276 r4343  
    229229          esac; \
    230230        done; \
    231         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/gui/Makefile'; \
     231        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/gui/Makefile'; \
    232232        cd $(top_srcdir) && \
    233           $(AUTOMAKE) --foreign  src/subprojects/gui/Makefile
     233          $(AUTOMAKE) --gnu  src/subprojects/gui/Makefile
    234234.PRECIOUS: Makefile
    235235Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/subprojects/importer/Makefile.am

    r4338 r4343  
    3030AM_LDFLAGS=$(MWINDOWS)
    3131
    32 bin_PROGRAMS=importer
     32bin_PROGRAMS = importer
    3333
    3434
    35 importer_SOURCES= framework.cc \
     35importer_SOURCES= ../framework.cc \
     36                  importer.cc \
     37                  $(MAINSRCDIR)/lib/graphics/light.cc \
     38                  $(MAINSRCDIR)/util/state.cc \
     39                  $(MAINSRCDIR)/world_entities/camera.cc \
    3640                  $(MAINSRCDIR)/lib/graphics/importer/model.cc \
    3741                  $(MAINSRCDIR)/lib/graphics/importer/objModel.cc \
     
    4650                  $(MAINSRCDIR)/lib/graphics/text_engine.cc \
    4751                  $(MAINSRCDIR)/lib/coord/p_node.cc \
    48                   $(MAINSRCDIR)/lib/coord/null_parent.cc
    49 
    50 noinst_HEADERS = framework.h
    51 
     52                  $(MAINSRCDIR)/lib/coord/null_parent.cc
  • orxonox/trunk/src/subprojects/importer/Makefile.in

    r4338 r4343  
    1414
    1515@SET_MAKE@
    16 
    1716
    1817SOURCES = $(importer_SOURCES)
     
    4140bin_PROGRAMS = importer$(EXEEXT)
    4241subdir = src/subprojects/importer
    43 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
    44         $(srcdir)/Makefile.in
     42DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
    4543ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    4644am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     
    5351binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
    5452PROGRAMS = $(bin_PROGRAMS)
    55 am_importer_OBJECTS = framework.$(OBJEXT) model.$(OBJEXT) \
    56         objModel.$(OBJEXT) primitive_model.$(OBJEXT) array.$(OBJEXT) \
    57         material.$(OBJEXT) texture.$(OBJEXT) graphics_engine.$(OBJEXT) \
    58         base_object.$(OBJEXT) vector.$(OBJEXT) \
    59         resource_manager.$(OBJEXT) text_engine.$(OBJEXT) \
    60         p_node.$(OBJEXT) null_parent.$(OBJEXT)
     53am_importer_OBJECTS = framework.$(OBJEXT) importer.$(OBJEXT) \
     54        light.$(OBJEXT) state.$(OBJEXT) camera.$(OBJEXT) \
     55        model.$(OBJEXT) objModel.$(OBJEXT) primitive_model.$(OBJEXT) \
     56        array.$(OBJEXT) material.$(OBJEXT) texture.$(OBJEXT) \
     57        graphics_engine.$(OBJEXT) base_object.$(OBJEXT) \
     58        vector.$(OBJEXT) resource_manager.$(OBJEXT) \
     59        text_engine.$(OBJEXT) p_node.$(OBJEXT) null_parent.$(OBJEXT)
    6160importer_OBJECTS = $(am_importer_OBJECTS)
    6261importer_LDADD = $(LDADD)
     
    6564am__depfiles_maybe = depfiles
    6665@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po \
    67 @AMDEP_TRUE@    ./$(DEPDIR)/base_object.Po \
     66@AMDEP_TRUE@    ./$(DEPDIR)/base_object.Po ./$(DEPDIR)/camera.Po \
    6867@AMDEP_TRUE@    ./$(DEPDIR)/framework.Po \
    6968@AMDEP_TRUE@    ./$(DEPDIR)/graphics_engine.Po \
     69@AMDEP_TRUE@    ./$(DEPDIR)/importer.Po ./$(DEPDIR)/light.Po \
    7070@AMDEP_TRUE@    ./$(DEPDIR)/material.Po ./$(DEPDIR)/model.Po \
    7171@AMDEP_TRUE@    ./$(DEPDIR)/null_parent.Po ./$(DEPDIR)/objModel.Po \
     
    7373@AMDEP_TRUE@    ./$(DEPDIR)/primitive_model.Po \
    7474@AMDEP_TRUE@    ./$(DEPDIR)/resource_manager.Po \
    75 @AMDEP_TRUE@    ./$(DEPDIR)/text_engine.Po ./$(DEPDIR)/texture.Po \
    76 @AMDEP_TRUE@    ./$(DEPDIR)/vector.Po
     75@AMDEP_TRUE@    ./$(DEPDIR)/state.Po ./$(DEPDIR)/text_engine.Po \
     76@AMDEP_TRUE@    ./$(DEPDIR)/texture.Po ./$(DEPDIR)/vector.Po
    7777CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    7878        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     
    8282SOURCES = $(importer_SOURCES)
    8383DIST_SOURCES = $(importer_SOURCES)
    84 HEADERS = $(noinst_HEADERS)
    8584ETAGS = etags
    8685CTAGS = ctags
     
    197196AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/graphics/particles -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/gui/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/lib/tinyxml -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common -I$(MAINSRCDIR)/util/loading -I$(MAINSRCDIR)/util/track -I$(MAINSRCDIR)/subprojects
    198197AM_LDFLAGS = $(MWINDOWS)
    199 importer_SOURCES = framework.cc \
     198importer_SOURCES = ../framework.cc \
     199                  importer.cc \
     200                  $(MAINSRCDIR)/lib/graphics/light.cc \
     201                  $(MAINSRCDIR)/util/state.cc \
     202                  $(MAINSRCDIR)/world_entities/camera.cc \
    200203                  $(MAINSRCDIR)/lib/graphics/importer/model.cc \
    201204                  $(MAINSRCDIR)/lib/graphics/importer/objModel.cc \
     
    210213                  $(MAINSRCDIR)/lib/graphics/text_engine.cc \
    211214                  $(MAINSRCDIR)/lib/coord/p_node.cc \
    212                   $(MAINSRCDIR)/lib/coord/null_parent.cc
    213 
    214 noinst_HEADERS = framework.h
     215                  $(MAINSRCDIR)/lib/coord/null_parent.cc
     216
    215217all: all-am
    216218
     
    226228          esac; \
    227229        done; \
    228         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/importer/Makefile'; \
     230        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/importer/Makefile'; \
    229231        cd $(top_srcdir) && \
    230           $(AUTOMAKE) --foreign  src/subprojects/importer/Makefile
     232          $(AUTOMAKE) --gnu  src/subprojects/importer/Makefile
    231233.PRECIOUS: Makefile
    232234Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    281283@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@
    282284@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_object.Po@am__quote@
     285@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camera.Po@am__quote@
    283286@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framework.Po@am__quote@
    284287@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphics_engine.Po@am__quote@
     288@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/importer.Po@am__quote@
     289@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/light.Po@am__quote@
    285290@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@
    286291@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model.Po@am__quote@
     
    290295@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primitive_model.Po@am__quote@
    291296@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource_manager.Po@am__quote@
     297@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Po@am__quote@
    292298@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text_engine.Po@am__quote@
    293299@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@
     
    309315@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    310316@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
     317
     318framework.o: ../framework.cc
     319@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT framework.o -MD -MP -MF "$(DEPDIR)/framework.Tpo" -c -o framework.o `test -f '../framework.cc' || echo '$(srcdir)/'`../framework.cc; \
     320@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/framework.Tpo" "$(DEPDIR)/framework.Po"; else rm -f "$(DEPDIR)/framework.Tpo"; exit 1; fi
     321@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='../framework.cc' object='framework.o' libtool=no @AMDEPBACKSLASH@
     322@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/framework.Po' tmpdepfile='$(DEPDIR)/framework.TPo' @AMDEPBACKSLASH@
     323@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     324@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o framework.o `test -f '../framework.cc' || echo '$(srcdir)/'`../framework.cc
     325
     326framework.obj: ../framework.cc
     327@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT framework.obj -MD -MP -MF "$(DEPDIR)/framework.Tpo" -c -o framework.obj `if test -f '../framework.cc'; then $(CYGPATH_W) '../framework.cc'; else $(CYGPATH_W) '$(srcdir)/../framework.cc'; fi`; \
     328@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/framework.Tpo" "$(DEPDIR)/framework.Po"; else rm -f "$(DEPDIR)/framework.Tpo"; exit 1; fi
     329@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='../framework.cc' object='framework.obj' libtool=no @AMDEPBACKSLASH@
     330@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/framework.Po' tmpdepfile='$(DEPDIR)/framework.TPo' @AMDEPBACKSLASH@
     331@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     332@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o framework.obj `if test -f '../framework.cc'; then $(CYGPATH_W) '../framework.cc'; else $(CYGPATH_W) '$(srcdir)/../framework.cc'; fi`
     333
     334light.o: $(MAINSRCDIR)/lib/graphics/light.cc
     335@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT light.o -MD -MP -MF "$(DEPDIR)/light.Tpo" -c -o light.o `test -f '$(MAINSRCDIR)/lib/graphics/light.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/light.cc; \
     336@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/light.Tpo" "$(DEPDIR)/light.Po"; else rm -f "$(DEPDIR)/light.Tpo"; exit 1; fi
     337@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/light.cc' object='light.o' libtool=no @AMDEPBACKSLASH@
     338@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/light.Po' tmpdepfile='$(DEPDIR)/light.TPo' @AMDEPBACKSLASH@
     339@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     340@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o light.o `test -f '$(MAINSRCDIR)/lib/graphics/light.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/light.cc
     341
     342light.obj: $(MAINSRCDIR)/lib/graphics/light.cc
     343@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT light.obj -MD -MP -MF "$(DEPDIR)/light.Tpo" -c -o light.obj `if test -f '$(MAINSRCDIR)/lib/graphics/light.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/light.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/light.cc'; fi`; \
     344@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/light.Tpo" "$(DEPDIR)/light.Po"; else rm -f "$(DEPDIR)/light.Tpo"; exit 1; fi
     345@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/light.cc' object='light.obj' libtool=no @AMDEPBACKSLASH@
     346@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/light.Po' tmpdepfile='$(DEPDIR)/light.TPo' @AMDEPBACKSLASH@
     347@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     348@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o light.obj `if test -f '$(MAINSRCDIR)/lib/graphics/light.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/light.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/light.cc'; fi`
     349
     350state.o: $(MAINSRCDIR)/util/state.cc
     351@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT state.o -MD -MP -MF "$(DEPDIR)/state.Tpo" -c -o state.o `test -f '$(MAINSRCDIR)/util/state.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/state.cc; \
     352@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/state.Tpo" "$(DEPDIR)/state.Po"; else rm -f "$(DEPDIR)/state.Tpo"; exit 1; fi
     353@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/state.cc' object='state.o' libtool=no @AMDEPBACKSLASH@
     354@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/state.Po' tmpdepfile='$(DEPDIR)/state.TPo' @AMDEPBACKSLASH@
     355@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     356@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o state.o `test -f '$(MAINSRCDIR)/util/state.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/state.cc
     357
     358state.obj: $(MAINSRCDIR)/util/state.cc
     359@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT state.obj -MD -MP -MF "$(DEPDIR)/state.Tpo" -c -o state.obj `if test -f '$(MAINSRCDIR)/util/state.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/state.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/state.cc'; fi`; \
     360@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/state.Tpo" "$(DEPDIR)/state.Po"; else rm -f "$(DEPDIR)/state.Tpo"; exit 1; fi
     361@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/state.cc' object='state.obj' libtool=no @AMDEPBACKSLASH@
     362@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/state.Po' tmpdepfile='$(DEPDIR)/state.TPo' @AMDEPBACKSLASH@
     363@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     364@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o state.obj `if test -f '$(MAINSRCDIR)/util/state.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/state.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/state.cc'; fi`
     365
     366camera.o: $(MAINSRCDIR)/world_entities/camera.cc
     367@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT camera.o -MD -MP -MF "$(DEPDIR)/camera.Tpo" -c -o camera.o `test -f '$(MAINSRCDIR)/world_entities/camera.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/world_entities/camera.cc; \
     368@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/camera.Tpo" "$(DEPDIR)/camera.Po"; else rm -f "$(DEPDIR)/camera.Tpo"; exit 1; fi
     369@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/world_entities/camera.cc' object='camera.o' libtool=no @AMDEPBACKSLASH@
     370@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/camera.Po' tmpdepfile='$(DEPDIR)/camera.TPo' @AMDEPBACKSLASH@
     371@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     372@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o camera.o `test -f '$(MAINSRCDIR)/world_entities/camera.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/world_entities/camera.cc
     373
     374camera.obj: $(MAINSRCDIR)/world_entities/camera.cc
     375@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT camera.obj -MD -MP -MF "$(DEPDIR)/camera.Tpo" -c -o camera.obj `if test -f '$(MAINSRCDIR)/world_entities/camera.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/world_entities/camera.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/world_entities/camera.cc'; fi`; \
     376@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/camera.Tpo" "$(DEPDIR)/camera.Po"; else rm -f "$(DEPDIR)/camera.Tpo"; exit 1; fi
     377@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/world_entities/camera.cc' object='camera.obj' libtool=no @AMDEPBACKSLASH@
     378@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/camera.Po' tmpdepfile='$(DEPDIR)/camera.TPo' @AMDEPBACKSLASH@
     379@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     380@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o camera.obj `if test -f '$(MAINSRCDIR)/world_entities/camera.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/world_entities/camera.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/world_entities/camera.cc'; fi`
    311381
    312382model.o: $(MAINSRCDIR)/lib/graphics/importer/model.cc
     
    596666check-am: all-am
    597667check: check-am
    598 all-am: Makefile $(PROGRAMS) $(HEADERS)
     668all-am: Makefile $(PROGRAMS)
    599669installdirs:
    600670        for dir in "$(DESTDIR)$(bindir)"; do \
  • orxonox/trunk/src/subprojects/importer/importer.cc

    r4342 r4343  
    1818#include "framework.h"
    1919
    20 #include "physics_engine.h"
    21 #include "particle_engine.h"
     20#include "light.h"
     21
     22#include "objModel.h"
     23#include "primitive_model.h"
     24#include <stdlib.h>
    2225
    2326
    24 void Framework::moduleInit()
     27Model* obj;
     28
     29void Framework::moduleInit(int argc, char** argv)
    2530{
    26   // Creating a Test Particle System
    27   ParticleSystem* system = new ParticleSystem(100000, PARTICLE_SPRITE);
    28   system->setRadius(0,0,0,0);
    29   system->setLifeSpan(0);
    30   system->setConserve(1.0);
     31  if (argc>=3)
     32    obj = new OBJModel (argv[1], atof(argv[2]));
     33  else if (argc>=2)
     34    obj = new OBJModel(argv[1]);
     35  else
     36    obj = new PrimitiveModel(CYLINDER);
    3137
    32   // Creating a Test Particle Emitter
    33   ParticleEmitter* emitter = new ParticleEmitter(Vector(0 , 1, 0));
    34   emitter->setEmissionRate(0);
    35   emitter->setEmissionVelocity(0,0);
    36   emitter->setSpread(0,0);
    37   emitter->setType(EMITTER_DOT);
    38   emitter->setSize(0);
    39   // Add the Flow from the Emitter into the System
    40   ParticleEngine::getInstance()->addConnection(emitter, system);
     38  LightManager* lightMan = LightManager::getInstance();
     39  lightMan->setAmbientColor(.1,.1,.1);
     40  lightMan->addLight();
     41  //  lightMan->setAttenuation(1.0, .01, 0.0);
     42  //  lightMan->setDiffuseColor(1,1,1);
     43  //  lightMan->addLight(1);
     44  //  lightMan->setPosition(20, 10, -20);
     45  //  lightMan->setDiffuseColor(0,0,0);
     46  //  lightMan->debug();
     47  lightMan->setPosition(5.0, 10.0, 40.0);
     48  lightMan->addLight();
     49  lightMan->setPosition(-10, -20, -100);
    4150}
    4251
     
    4958        {
    5059        case SDLK_i:
    51           ParticleEngine::getInstance()->debug();
    5260          break;
    5361        }
     
    5765void Framework::moduleTick(float dt)
    5866{
    59   ParticleEngine::getInstance()->tick(dt);
     67 
    6068}
    6169
    6270void Framework::moduleDraw(float dt)
    6371{
    64   ParticleEngine::getInstance()->draw(dt);
     72  obj->draw();
     73
     74  LightManager::getInstance()->draw();
    6575}
    6676
     
    6979{
    7080  PRINT(0)("\n");
    71   PRINT(0)("i - Particle-state Information\n\n");
     81  PRINT(0)("i ");
    7282  PRINT(0)("\n");
    7383
    7484}
    75 
    76 int emitterChange(GtkWidget* nonInterest, void* widget)
    77 {
    78   Option* option = (Option*) widget;
    79   const char* name = option->getTitle();
    80   char* value = option->save();
    81 
    82   ParticleEmitter* tmpEmit = ParticleEngine::getInstance()->getEmitterByNumber(1);
    83   if (tmpEmit)
    84     {
    85       if (!strcmp(name, "EmissionRate"))
    86         {
    87           tmpEmit->setEmissionRate(atof(value));
    88           PRINT(3)("EmissionRate set to %f\n", atof(value));
    89         }
    90       else if (!strcmp(name, "Velocity"))
    91         {
    92           tmpEmit->setEmissionVelocity(atof(value));
    93           PRINT(3)("Velocity set to %f\n", atof(value));
    94         }
    95       else if(!strcmp(name, "SpreadAngle"))
    96         {
    97           tmpEmit->setSpread(atof(value));
    98           PRINT(3)("SpreadAngle set to %f\n", atof(value));
    99         }
    100       else if(!strcmp(name, "EmitterType"))
    101         {
    102           if (!strcmp(value, "EMITTER_DOT"))
    103             tmpEmit->setType(EMITTER_DOT);
    104           else if (!strcmp(value, "EMITTER_PLANE"))
    105             tmpEmit->setType(EMITTER_PLANE);
    106           else if (!strcmp(value, "EMITTER_CUBE"))
    107             tmpEmit->setType(EMITTER_CUBE);
    108           PRINT(3)("EmitterType set to %s\n", value);
    109         }
    110       else if(!strcmp(name, "EmitterSize"))
    111         {
    112           tmpEmit->setSize(atof(value));
    113           PRINT(3)("EmitterSize set to %f\n", atof(value));
    114         }
    115     }
    116   delete value;
    117 }
    118 
    119 
    120 int systemChange(GtkWidget* nonInterest, void* widget)
    121 {
    122   Option* option = (Option*) widget;
    123   const char* name = option->getTitle();
    124   char* value = option->save();
    125   printf("%s\n", value);
    126 
    127   ParticleSystem* tmpSys = ParticleEngine::getInstance()->getSystemByNumber(1);
    128   if (tmpSys)
    129     {
    130       if (!strcmp(name, "StartRadius"))
    131         {
    132           tmpSys->setRadius(atof(value), tmpSys->getEndRadius());
    133           PRINT(3)("ParticleStartRadius set to %f\n", atof(value));
    134         }
    135       else if (!strcmp(name, "EndRadius"))
    136         {
    137           tmpSys->setRadius( tmpSys->getStartRadius(), atof(value));
    138           PRINT(3)("ParticleEndRadius set to %f\n", atof(value));
    139         }
    140 
    141       else if (!strcmp(name, "LifeSpan"))
    142         {
    143           tmpSys->setLifeSpan(atof(value));
    144           PRINT(3)("ParticleLifeSpan set to %f\n", atof(value));
    145         }
    146 
    147       else if (!strcmp(name, "ConserveFactor"))
    148         {
    149           tmpSys->setConserve(atof(value));
    150           PRINT(3)("ParticleConserveFactor set to %f\n", atof(value));
    151         }
    152 
    153       else if (!strcmp(name, "ParticleType"))
    154         {
    155           if (!strcmp(value, "PARTICLE_DOT"))
    156             tmpSys->setType(PARTICLE_DOT);
    157           else if (!strcmp(value, "PARTICLE_SPARK"))
    158             tmpSys->setType(PARTICLE_SPARK);
    159           else if (!strcmp(value, "PARTICLE_SPRITE"))
    160             tmpSys->setType(PARTICLE_SPRITE);
    161 
    162           PRINT(3)("ParticleType set to %s\n", value);
    163         }
    164 
    165       else if (!strcmp(name, "InheritSpeed"))
    166         {
    167           tmpSys->setInheritSpeed(atof(value));
    168           PRINT(3)("ParticleInheritSpeed set to %f\n", atof(value));
    169         }
    170 
    171     }
    172   delete value;
    173 }
    174 
    175 
    176 void Framework::moduleInitGui(void)
    177 {
    178   Window* guiMainWindow = NULL;
    179  
    180   initGUI(0, NULL);
    181  
    182   guiMainWindow = new Window("ParticlesFUN");
    183   {
    184     Box* windowBox = new Box('v');
    185     {
    186       Frame* emitterFrame = new Frame("emitter-settings");
    187       {
    188         Box* emitterBox = new Box('v');
    189         {
    190           emitterBox->fill(new Label("EmissionRate"));
    191           Slider* EmissionRate = new Slider("EmissionRate", 0, 1000);
    192           EmissionRate->connectSignal("value_changed", (void*)EmissionRate, emitterChange );
    193           emitterBox->fill(EmissionRate);
    194          
    195           emitterBox->fill(new Label("Velocity"));
    196           Slider* velocity = new Slider("Velocity", 0, 2);
    197           velocity->setExactness(3);
    198           velocity->connectSignal("value_changed", (void*)velocity, emitterChange );
    199           emitterBox->fill(velocity);
    200          
    201           emitterBox->fill(new Label("SpreadAngle"));
    202           Slider* SpreadAngle = new Slider("SpreadAngle", 0, M_PI);
    203           SpreadAngle->setExactness(3);
    204           SpreadAngle->connectSignal("value_changed", (void*)SpreadAngle, emitterChange );
    205           emitterBox->fill(SpreadAngle);
    206 
    207           emitterBox->fill(new Label("EmitterType"));
    208           Menu* EmitterType = new Menu("EmitterType");
    209           EmitterType->addItem("EMITTER_DOT");
    210           EmitterType->addItem("EMITTER_PLANE");
    211           EmitterType->addItem("EMITTER_CUBE");
    212           EmitterType->load("EMITTER_DOT");
    213           EmitterType->connectSignal("changed", (void*)EmitterType, emitterChange );
    214           emitterBox->fill(EmitterType);
    215 
    216           emitterBox->fill(new Label("EmitterSize"));
    217           Slider* EmitterSize = new Slider("EmitterSize", 0, 100);
    218           EmitterSize->setExactness(1);
    219           EmitterSize->connectSignal("value_changed", (void*)EmitterSize, emitterChange );
    220           emitterBox->fill(EmitterSize);
    221         }
    222         emitterFrame->fill(emitterBox);
    223       }
    224       windowBox->fill(emitterFrame);
    225      
    226       Frame* systemFrame = new Frame("system-settings");
    227       {
    228         Box* systemBox = new Box('v');
    229         {
    230           systemBox->fill(new Label("StartRadius"));
    231           Slider* StartRadius = new Slider("StartRadius", 0, 10);
    232           StartRadius->setExactness(3);
    233           StartRadius->connectSignal("value_changed", (void*)StartRadius, systemChange );
    234           systemBox->fill(StartRadius);
    235 
    236           systemBox->fill(new Label("EndRadius"));
    237           Slider* EndRadius = new Slider("EndRadius", 0, 10);
    238           EndRadius->setExactness(3);
    239           EndRadius->connectSignal("value_changed", (void*)EndRadius, systemChange );
    240           systemBox->fill(EndRadius);
    241 
    242           systemBox->fill(new Label("LifeSpan"));
    243           Slider* LifeSpan = new Slider("LifeSpan", 0, 10);
    244           LifeSpan->setExactness(3);
    245           LifeSpan->connectSignal("value_changed", (void*)LifeSpan, systemChange );
    246           systemBox->fill(LifeSpan);
    247          
    248           systemBox->fill(new Label("ConserveFactor"));
    249           Slider* ConserveFactor = new Slider("ConserveFactor", 0, 1);
    250           ConserveFactor->setExactness(3);
    251           ConserveFactor->load("1.0");
    252           ConserveFactor->connectSignal("value_changed", (void*)ConserveFactor, systemChange );
    253           systemBox->fill(ConserveFactor);
    254 
    255           systemBox->fill(new Label("ParticleType"));
    256           Menu* ParticleType = new Menu("ParticleType");
    257           ParticleType->addItem("PARTICLE_DOT");
    258           ParticleType->addItem("PARTICLE_SPARK");
    259           ParticleType->addItem("PARTICLE_SPRITE");
    260           ParticleType->load("PARTICLE_SPRITE");
    261           ParticleType->connectSignal("changed", (void*)ParticleType, systemChange );     
    262           systemBox->fill(ParticleType);
    263          
    264           systemBox->fill(new Label("InheritSpeed"));
    265           Slider* InheritSpeed = new Slider("InheritSpeed", 0, 1);
    266           InheritSpeed->setExactness(3);
    267           InheritSpeed->connectSignal("value_changed", (void*)InheritSpeed, systemChange );
    268           systemBox->fill(InheritSpeed);
    269 
    270 
    271         }
    272         systemFrame->fill(systemBox);
    273       }
    274       windowBox->fill(systemFrame);
    275      
    276       Button* quitButton = new Button("quit");
    277      
    278       quitButton->connectSignal("clicked", NULL, quitGui);
    279       //  Window::mainWindow->connectSignal("remove", this, GuiExec::quitGui);
    280       Window::mainWindow->connectSignal("destroy", NULL, quitGui);
    281      
    282       windowBox->fill(quitButton);
    283     }
    284     guiMainWindow->fill(windowBox);
    285   }
    286   Window::mainWindow->showall();
    287   Window::mainWindow->setSize(300, 500);
    288 }
  • orxonox/trunk/src/subprojects/particles/Makefile.am

    r4338 r4343  
    3636                  -lpthread
    3737
    38 particles_CPPFLAGS = $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
     38particles_CPPFLAGS =  -DGUI_MODULE \
     39                      $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
    3940
    4041particles_SOURCES= ../framework.cc \
  • orxonox/trunk/src/subprojects/particles/Makefile.in

    r4338 r4343  
    218218                  -lpthread
    219219
    220 particles_CPPFLAGS = $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
     220particles_CPPFLAGS = -DGUI_MODULE \
     221                      $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
     222
    221223particles_SOURCES = ../framework.cc \
    222224                   particle_fun.cc \
     
    255257          esac; \
    256258        done; \
    257         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/particles/Makefile'; \
     259        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/particles/Makefile'; \
    258260        cd $(top_srcdir) && \
    259           $(AUTOMAKE) --foreign  src/subprojects/particles/Makefile
     261          $(AUTOMAKE) --gnu  src/subprojects/particles/Makefile
    260262.PRECIOUS: Makefile
    261263Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/trunk/src/subprojects/particles/particle_fun.cc

    r4342 r4343  
    2222
    2323
    24 void Framework::moduleInit()
     24void Framework::moduleInit(int argc, char** argv)
    2525{
    2626  // Creating a Test Particle System
     
    174174
    175175
    176 void Framework::moduleInitGui(void)
     176void Framework::moduleInitGui(int argc, char** argv)
    177177{
    178178  Window* guiMainWindow = NULL;
  • orxonox/trunk/src/subprojects/testmain/Makefile.in

    r4276 r4343  
    197197          esac; \
    198198        done; \
    199         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/subprojects/testmain/Makefile'; \
     199        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/subprojects/testmain/Makefile'; \
    200200        cd $(top_srcdir) && \
    201           $(AUTOMAKE) --foreign  src/subprojects/testmain/Makefile
     201          $(AUTOMAKE) --gnu  src/subprojects/testmain/Makefile
    202202.PRECIOUS: Makefile
    203203Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Note: See TracChangeset for help on using the changeset viewer.