Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4250 in orxonox.OLD


Ignore:
Timestamp:
May 21, 2005, 10:31:55 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/levelLoader: some minor changes

Location:
orxonox/branches/levelLoader/src
Files:
7 edited

Legend:

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

    r4249 r4250  
    9191                 util/resource_manager.cc \
    9292                 util/loading/factory.cc \
     93                 util/loading/load_param.cc \
    9394                 lib/math/vector.cc \
    9495                 lib/math/curve.cc \
  • orxonox/branches/levelLoader/src/Makefile.in

    r4249 r4250  
    9393        base_entity.$(OBJEXT) base_object.$(OBJEXT) \
    9494        ini_parser.$(OBJEXT) substring.$(OBJEXT) list.$(OBJEXT) \
    95         resource_manager.$(OBJEXT) factory.$(OBJEXT) vector.$(OBJEXT) \
    96         curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT) \
    97         benchmark.$(OBJEXT)
     95        resource_manager.$(OBJEXT) factory.$(OBJEXT) \
     96        load_param.$(OBJEXT) vector.$(OBJEXT) curve.$(OBJEXT) \
     97        glmenu_imagescreen.$(OBJEXT) benchmark.$(OBJEXT)
    9898orxonox_OBJECTS = $(am_orxonox_OBJECTS)
    9999am__DEPENDENCIES_1 =
     
    129129@AMDEP_TRUE@    ./$(DEPDIR)/libORXgui_a-gui_video.Po \
    130130@AMDEP_TRUE@    ./$(DEPDIR)/light.Po ./$(DEPDIR)/list.Po \
    131 @AMDEP_TRUE@    ./$(DEPDIR)/material.Po ./$(DEPDIR)/model.Po \
    132 @AMDEP_TRUE@    ./$(DEPDIR)/null_parent.Po ./$(DEPDIR)/objModel.Po \
    133 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox.Po ./$(DEPDIR)/p_node.Po \
     131@AMDEP_TRUE@    ./$(DEPDIR)/load_param.Po ./$(DEPDIR)/material.Po \
     132@AMDEP_TRUE@    ./$(DEPDIR)/model.Po ./$(DEPDIR)/null_parent.Po \
     133@AMDEP_TRUE@    ./$(DEPDIR)/objModel.Po ./$(DEPDIR)/orxonox.Po \
     134@AMDEP_TRUE@    ./$(DEPDIR)/p_node.Po \
    134135@AMDEP_TRUE@    ./$(DEPDIR)/particle_emitter.Po \
    135136@AMDEP_TRUE@    ./$(DEPDIR)/particle_engine.Po \
     
    342343                 util/resource_manager.cc \
    343344                 util/loading/factory.cc \
     345                 util/loading/load_param.cc \
    344346                 lib/math/vector.cc \
    345347                 lib/math/curve.cc \
     
    564566@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/light.Po@am__quote@
    565567@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
     568@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/load_param.Po@am__quote@
    566569@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@
    567570@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model.Po@am__quote@
     
    15251528@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    15261529@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o factory.obj `if test -f 'util/loading/factory.cc'; then $(CYGPATH_W) 'util/loading/factory.cc'; else $(CYGPATH_W) '$(srcdir)/util/loading/factory.cc'; fi`
     1530
     1531load_param.o: util/loading/load_param.cc
     1532@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT load_param.o -MD -MP -MF "$(DEPDIR)/load_param.Tpo" -c -o load_param.o `test -f 'util/loading/load_param.cc' || echo '$(srcdir)/'`util/loading/load_param.cc; \
     1533@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/load_param.Tpo" "$(DEPDIR)/load_param.Po"; else rm -f "$(DEPDIR)/load_param.Tpo"; exit 1; fi
     1534@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='util/loading/load_param.cc' object='load_param.o' libtool=no @AMDEPBACKSLASH@
     1535@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/load_param.Po' tmpdepfile='$(DEPDIR)/load_param.TPo' @AMDEPBACKSLASH@
     1536@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1537@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o load_param.o `test -f 'util/loading/load_param.cc' || echo '$(srcdir)/'`util/loading/load_param.cc
     1538
     1539load_param.obj: util/loading/load_param.cc
     1540@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT load_param.obj -MD -MP -MF "$(DEPDIR)/load_param.Tpo" -c -o load_param.obj `if test -f 'util/loading/load_param.cc'; then $(CYGPATH_W) 'util/loading/load_param.cc'; else $(CYGPATH_W) '$(srcdir)/util/loading/load_param.cc'; fi`; \
     1541@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/load_param.Tpo" "$(DEPDIR)/load_param.Po"; else rm -f "$(DEPDIR)/load_param.Tpo"; exit 1; fi
     1542@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='util/loading/load_param.cc' object='load_param.obj' libtool=no @AMDEPBACKSLASH@
     1543@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/load_param.Po' tmpdepfile='$(DEPDIR)/load_param.TPo' @AMDEPBACKSLASH@
     1544@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1545@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o load_param.obj `if test -f 'util/loading/load_param.cc'; then $(CYGPATH_W) 'util/loading/load_param.cc'; else $(CYGPATH_W) '$(srcdir)/util/loading/load_param.cc'; fi`
    15271546
    15281547vector.o: lib/math/vector.cc
  • orxonox/branches/levelLoader/src/util/loading/factory.cc

    r4249 r4250  
    1111   ### File Specific:
    1212   main-programmer: Christian Meyer
    13    co-programmer: ...
     13   co-programmer: Benjamin Grauer
    1414*/
    1515
  • orxonox/branches/levelLoader/src/util/loading/factory.h

    r4249 r4250  
     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   co-programmer: Benjamin Grauer
     14*/
     15
    116/*!
    2     \file factory.h
    3     \brief philosophy stuff
     17  \file factory.h
     18  \brief philosophy stuff
    419*/
     20
    521
    622#ifndef _FACTORY_H
  • orxonox/branches/levelLoader/src/util/loading/load_param.cc

    r4233 r4250  
     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   co-programmer: ...
     14*/
     15
     16#include "load_param.h"
     17
     18//void BaseLoadParam::description(const char* paramDescription)
     19//{
     20
     21//}
     22
     23
  • orxonox/branches/levelLoader/src/util/loading/load_param.h

    r4249 r4250  
     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: Benjamin Grauer
     13   co-programmer: ...
     14*/
     15
     16/*!
     17    \file load_param.h
     18    \brief A Class and macro-functions, that makes our lives easy to load-in parameters
     19*/
    120
    221#ifndef _LOAD_PARAM_H
     
    4867
    4968// 2. TYPES
    50 #define LoadParam2(type1, type2)\
     69#define LoadParam2(type1, type2) \
    5170 LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE)) \
    5271    { \
     
    6786
    6887// 3. TYPES
    69 #define LoadParam3(type1, type2, type3)\
     88#define LoadParam3(type1, type2, type3) \
    7089 LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE)) \
    7190    { \
     
    86105
    87106// 4. TYPES
    88 #define LoadParam4(type1, type2, type3, type4)\
     107#define LoadParam4(type1, type2, type3, type4) \
    89108 LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE)) \
    90109    { \
     
    103122    };
    104123
    105 // abstract base class
    106 class baseLoadParam
     124
     125// 5. TYPES
     126#define LoadParam5(type1, type2, type3, type4, type5) \
     127 LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE, type5##_TYPE)) \
     128    { \
     129      const char* loadString = grabParameter(root, paramName); \
     130      if (loadString != NULL) \
     131        { \
     132          SubString subLoads(loadString); \
     133          if (subLoads.getCount() == 5) \
     134            (*pt2Object.*function)(type1##_FUNC(subLoads.getString(0)), type2##_FUNC(subLoads.getString(1)), type3##_FUNC(subLoads.getString(2)), type4##_FUNC(subLoads.getString(3)), type5##_FUNC(subLoads.getString(4))); \
     135          else \
     136            PRINTF(2)("Not loaded Parameter %s of %s, because wrong count of arguments.\n -> Should have %d but have %d\n", \
     137                      paramName, pt2Object->getClassName(), 5, subLoads.getCount()); \
     138        } \
     139      else \
     140        PRINTF(2)("Not loaded parameter %s of %s\n", paramName, pt2Object->getClassName()); \
     141    };
     142
     143
     144class LoadParamDescription
     145{
     146 private:
     147  int paramCount;
     148  char** types;
     149};
     150
     151// abstract Base class
     152class BaseLoadParam
    107153{
    108154 public:
    109   void description(const char* description);
    110155};
    111156
    112157
    113158// derived template class
    114 template<class T> class LoadParam : public baseLoadParam
     159template<class T> class LoadParam : public BaseLoadParam
    115160{
    116161 public:
     
    129174  LoadParam3(l_FLOAT, l_FLOAT, l_FLOAT);
    130175  LoadParam4(l_FLOAT, l_FLOAT, l_FLOAT, l_FLOAT);
    131 
    132 
    133176};
    134177
  • orxonox/branches/levelLoader/src/world_entities/skybox.cc

    r4249 r4250  
    1111
    1212   ### File Specific:
    13    main-programmer: David Gruetter
    14    co-programmer: Benjamin Grauer
    15    
    16    Created by Dave: this file is actually quite similar to player.cc and so is
    17    skybox.h similar to player.h
    18    With that said, things should be clear:)
    19    
    20    Edited:
    21    Bensch: more constructors, changeability, comments...
    22    Patrick: giving it the common orxonox style, not much to do... good work Dave!
    23 
     13   main-programmer: Benjamin Grauer
     14   co-programmer: ...
    2415*/
    2516
Note: See TracChangeset for help on using the changeset viewer.