Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4233 in orxonox.OLD


Ignore:
Timestamp:
May 20, 2005, 1:37:47 AM (19 years ago)
Author:
bensch
Message:

orxonox/branches/levelLoader: loading through Functors.
This should make our lives much more simple, if they are implemented real good.
This will take some time, and i would like you to comment on this.

Location:
orxonox/branches/levelLoader/src
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelLoader/src/Makefile.am

    r4231 r4233  
    2222AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/animation
    2323AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/common
     24AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/loading
    2425AM_CXXFLAGS+=-I$(MAINSRCDIR)/subprojects
    2526
     
    151152                 util/common/list_template.h \
    152153                 util/resource_manager.h \
     154                 util/loading/load_param.h \
    153155                 lib/util/ini_parser.h \
    154156                 lib/util/substring.h \
     
    189191
    190192## orxonox.conf will be used from home-dir instead.
    191 EXTRA_DIST = orxonox.conf \
    192              proto/proto_class.h \
     193EXTRA_DIST = proto/proto_class.h \
    193194             proto/proto_class.cc \
    194195             proto/proto_singleton.h \
  • orxonox/branches/levelLoader/src/Makefile.in

    r4231 r4233  
    280280target_vendor = @target_vendor@
    281281MAINSRCDIR = .
    282 AM_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)/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)/subprojects
     282AM_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)/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)/subprojects
    283283noinst_LIBRARIES = libORXgui.a \
    284284                   libtinyxml.a
     
    403403                 util/common/list_template.h \
    404404                 util/resource_manager.h \
     405                 util/loading/load_param.h \
    405406                 lib/util/ini_parser.h \
    406407                 lib/util/substring.h \
     
    437438                       lib/xmlparser/tinyxmlparser.cc
    438439
    439 EXTRA_DIST = orxonox.conf \
    440              proto/proto_class.h \
     440EXTRA_DIST = proto/proto_class.h \
    441441             proto/proto_class.cc \
    442442             proto/proto_singleton.h \
     
    16941694
    16951695distdir: $(DISTFILES)
    1696         $(mkdir_p) $(distdir)/ai $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/data $(distdir)/lib/graphics $(distdir)/lib/graphics/particles $(distdir)/lib/gui/gui $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/network $(distdir)/proto $(distdir)/story_entities $(distdir)/subprojects $(distdir)/util $(distdir)/util/animation $(distdir)/util/common $(distdir)/world_entities
     1696        $(mkdir_p) $(distdir)/ai $(distdir)/defs $(distdir)/glmenu $(distdir)/lib/coord $(distdir)/lib/data $(distdir)/lib/graphics $(distdir)/lib/graphics/particles $(distdir)/lib/gui/gui $(distdir)/lib/lang $(distdir)/lib/math $(distdir)/lib/util $(distdir)/network $(distdir)/proto $(distdir)/story_entities $(distdir)/subprojects $(distdir)/util $(distdir)/util/animation $(distdir)/util/common $(distdir)/util/loading $(distdir)/world_entities
    16971697        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
    16981698        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
  • orxonox/branches/levelLoader/src/world_entities/world_entity.cc

    r4115 r4233  
    2323#include "vector.h"
    2424
    25 //#include "stdincl.h"
    26 //#include "collision.h"
     25#include "load_param.h"
    2726
    2827using namespace std;
     
    5150    {
    5251      PRINTF(2)("WorldEntity is missing a proper 'name'\n");
    53       string = "Unknown";
    54       temp = new char[strlen(string + 2)];
    55       strcpy( temp, string);
    56       this->setName( temp);
     52      this->setName("unknown");
    5753    }
    5854  else
    5955    {
    60       temp = new char[strlen(string + 2)];
    61       strcpy( temp, string);
    62       this->setName( temp);
     56      LoadParam<WorldEntity> (string, this, &WorldEntity::setName);
    6357    }
    6458  // Model Loading     
     
    6660  string = grabParameter( root, "model");
    6761  if( string != NULL)
    68     this->model = (Model*)ResourceManager::getInstance()->load(string, OBJ, RP_CAMPAIGN);
     62    LoadParam<WorldEntity>(string, this, &WorldEntity::loadModel);
    6963  else
    7064    {
     
    8781  if (this->model)
    8882    ResourceManager::getInstance()->unload(this->model);
     83}
     84
     85/**
     86   \brief loads a Model onto a WorldEntity
     87   \param fileName the name of the model to load
     88*/
     89void WorldEntity::loadModel(const char* fileName)
     90{
     91  this->model = (Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN);
    8992}
    9093
  • orxonox/branches/levelLoader/src/world_entities/world_entity.h

    r4010 r4233  
    2727  virtual ~WorldEntity ();
    2828
     29  void loadModel(const char* fileName);
    2930
    3031  //void setCollision (CollisionCluster* newhull);
Note: See TracChangeset for help on using the changeset viewer.