Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5652 in orxonox.OLD


Ignore:
Timestamp:
Nov 20, 2005, 6:32:39 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: new LoadParam procedure with all NON-cycling load-options, and it works perfectly (on first sight :))

now going to make the same for cycling LoadOptions

Location:
trunk/src
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/coord/p_node.cc

    r5438 r5652  
    141141  static_cast<BaseObject*>(this)->loadParams(root);
    142142
    143   LoadParam<PNode>(root, "rel-coor", this, &PNode::setRelCoor)
     143  LoadParamNEW(root, "rel-coor", this, PNode, setRelCoor)
    144144      .describe("Sets The relative position of the Node to its parent.");
    145145
    146   LoadParam<PNode>(root, "abs-coor", this, &PNode::setAbsCoor)
     146  LoadParamNEW(root, "abs-coor", this, PNode, setAbsCoor)
    147147      .describe("Sets The absolute Position of the Node.");
    148148
    149   LoadParam<PNode>(root, "rel-dir", this, &PNode::setRelDir)
     149  LoadParamNEW(root, "rel-dir", this, PNode, setRelDir)
    150150      .describe("Sets The relative rotation of the Node to its parent.");
    151151
    152   LoadParam<PNode>(root, "abs-dir", this, &PNode::setAbsDir)
     152  LoadParamNEW(root, "abs-dir", this, PNode, setAbsDir)
    153153      .describe("Sets The absolute rotation of the Node.");
    154154
    155   LoadParam<PNode>(root, "parent", this, &PNode::setParent)
     155  LoadParamNEW(root, "parent", this, PNode, setParent)
    156156      .describe("the Name of the Parent of this PNode");
    157157
    158   LoadParam<PNode>(root, "parent-mode", this, &PNode::setParentMode)
     158  LoadParamNEW(root, "parent-mode", this, PNode, setParentMode)
    159159      .describe("the mode to connect this node to its parent ()");
    160160
  • trunk/src/lib/graphics/light.cc

    r5357 r5652  
    8888  static_cast<PNode*>(this)->loadParams(root);
    8989
    90   LoadParam<Light>(root, "diffuse-color", this, &Light::setDiffuseColor)
     90  LoadParamNEW(root, "diffuse-color", this, Light, setDiffuseColor)
    9191      .describe("sets the diffuse color of the Light (red [0-1], green [0-1], blue [0-1])");
    9292
    93   LoadParam<Light>(root, "specular-color", this, &Light::setSpecularColor)
     93  LoadParamNEW(root, "specular-color", this, Light, setSpecularColor)
    9494      .describe("sets the specular color of the Light (red [0-1], green [0-1], blue [0-1])");
    9595
    96   LoadParam<Light>(root, "attenuation", this, &Light::setAttenuation)
     96  LoadParamNEW(root, "attenuation", this, Light, setAttenuation)
    9797      .describe("sets the Attenuation of the LightSource (constant Factor, linear Factor, quadratic Factor).");
    9898
    99   LoadParam<Light>(root, "spot-direction", this, &Light::setSpotDirection)
     99  LoadParamNEW(root, "spot-direction", this, Light, setSpotDirection)
    100100      .describe("sets the Direction of the Spot");
    101101
    102   LoadParam<Light>(root, "spot-cutoff", this, &Light::setSpotCutoff)
     102  LoadParamNEW(root, "spot-cutoff", this, Light, setSpotCutoff)
    103103      .describe("the cuttoff of the Spotlight");
    104104}
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r5418 r5652  
    130130{
    131131  // ELEMENT2D-native settings.
    132   LoadParam<Element2D>(root, "alignment", this, &Element2D::setAlignment)
     132  LoadParamNEW(root, "alignment", this, Element2D, setAlignment)
    133133      .describe("loads the alignment: (either: center, left, right or screen-center)");
    134134
    135   LoadParam<Element2D>(root, "layer", this, &Element2D::setLayer)
     135  LoadParamNEW(root, "layer", this, Element2D, setLayer)
    136136      .describe("loads the layer onto which to project: (either: top, medium, bottom, below-all)");
    137137
    138   LoadParam<Element2D>(root, "bind-node", this, &Element2D::setBindNode)
     138  LoadParamNEW(root, "bind-node", this, Element2D, setBindNode)
    139139      .describe("sets a node, this 2D-Element should be shown upon (name of the node)");
    140140
    141   LoadParam<Element2D>(root, "visibility", this, &Element2D::setVisibility)
     141  LoadParamNEW(root, "visibility", this, Element2D, setVisibility)
    142142      .describe("if the Element is visible or not");
    143143
    144144
    145145// PNode-style:
    146   LoadParam<Element2D>(root, "rel-coor", this, &Element2D::setRelCoor2D)
     146  LoadParamNEW(root, "rel-coor", this, Element2D, setRelCoor2D)
    147147      .describe("Sets The relative position of the Node to its parent.");
    148148
    149   LoadParam<Element2D>(root, "abs-coor", this, &Element2D::setAbsCoor2D)
     149  LoadParamNEW(root, "abs-coor", this, Element2D, setAbsCoor2D)
    150150      .describe("Sets The absolute Position of the Node.");
    151151
    152   LoadParam<Element2D>(root, "rel-dir", this, &Element2D::setRelDir2D)
     152  LoadParamNEW(root, "rel-dir", this, Element2D, setRelDir2D)
    153153      .describe("Sets The relative rotation of the Node to its parent.");
    154154
    155   LoadParam<Element2D>(root, "abs-dir", this, &Element2D::setAbsDir2D)
     155  LoadParamNEW(root, "abs-dir", this, Element2D, setAbsDir2D)
    156156      .describe("Sets The absolute rotation of the Node.");
    157157
    158   LoadParam<Element2D>(root, "parent", this, &Element2D::setParent2D)
     158  LoadParamNEW(root, "parent", this, Element2D, setParent2D)
    159159      .describe("the Name of the Parent of this Element2D");
    160160
    161   LoadParam<Element2D>(root, "parent-mode", this, &Element2D::setParentMode2D)
     161  LoadParamNEW(root, "parent-mode", this, Element2D, setParentMode2D)
    162162      .describe("the mode to connect this node to its parent ()");
    163163
  • trunk/src/lib/gui/gl_gui/glmenu/glmenu_imagescreen.cc

    r5373 r5652  
    5757void GLMenuImageScreen::loadParams(const TiXmlElement* root)
    5858{
    59   LoadParam<GLMenuImageScreen>(root, "BackgroundImage", this, &GLMenuImageScreen::setBackgroundImage)
     59  LoadParamNEW(root, "BackgroundImage", this, GLMenuImageScreen, setBackgroundImage)
    6060    .describe("sets the image to load onto the loadscreen");
    6161
    62   LoadParam<GLMenuImageScreen>(root, "BackgroundPS", this, &GLMenuImageScreen::setPosScale)
     62  LoadParamNEW(root, "BackgroundPS", this, GLMenuImageScreen, setPosScale)
    6363    .describe("The Position and Scale of the Background Image in %(0-1.0). PosX, PosY, SizeX, SizeY");
    6464
    65   LoadParam<GLMenuImageScreen>(root, "BarImage", this, &GLMenuImageScreen::setBarImage)
     65  LoadParamNEW(root, "BarImage", this, GLMenuImageScreen, setBarImage)
    6666    .describe("sets the image of the LoadingBar");
    6767
    68   LoadParam<GLMenuImageScreen>(root, "BarPS", this, &GLMenuImageScreen::setBarPosScale)
     68  LoadParamNEW(root, "BarPS", this, GLMenuImageScreen, setBarPosScale)
    6969    .describe("The Position and Scale of the Loading Bar in %(0-1.0). PosX, PosY, SizeX, SizeY");
    7070
    71   LoadParam<GLMenuImageScreen>(root, "ElementCount", this, &GLMenuImageScreen::setMaximum)
     71  LoadParamNEW(root, "ElementCount", this, GLMenuImageScreen, setMaximum)
    7272    .describe("The Count of elements to load into the bar (this is only a maximum value)");
    7373}
     
    123123void GLMenuImageScreen::setPosScale(float offsetX, float offsetY, float scaleX, float scaleY)
    124124{
     125  printf("IMG: %f %f %f %f\n", offsetX, offsetY,offsetX, offsetY);
    125126  this->setPosition(offsetX, offsetY);
    126127  this->setScale(scaleX, scaleY);
     
    144145void GLMenuImageScreen::setBarPosScale(float barX, float barY, float barW, float barH)
    145146{
     147  printf("BAR: %f %f %f %f\n", barX, barY, barW, barH);
     148
    146149  this->barX = barX;
    147150  this->barY = barY;
  • trunk/src/lib/lang/base_object.cc

    r5646 r5652  
    6363  // name setup
    6464  LoadParamNEW(root, "name", this, BaseObject, setName)
    65   //LoadParamBase(root, "name", this, ExecutorObjective<BaseObject>(&BaseObject::setName))
    6665      .describe("the Name of the Object.");
    67 //  LoadParam<BaseObject>(root, "name", this, &BaseObject::setName)
    68       //.describe("the name of the Object at hand");
    6966}
    7067
  • trunk/src/lib/particles/particle_emitter.cc

    r5445 r5652  
    2222
    2323#include "load_param.h"
     24#include "factory.h"
    2425#include "debug.h"
    2526#include "stdlibincl.h"
     
    9495  static_cast<PNode*>(this)->loadParams(root);
    9596
    96   LoadParam<ParticleEmitter>(root, "type", this, &ParticleEmitter::setType)
     97  LoadParamNEW(root, "type", this, ParticleEmitter, setType)
    9798    .describe("What type of emitter is this [dot, plane, cube, sphere].");
    9899
    99   LoadParam<ParticleEmitter>(root, "size", this, &ParticleEmitter::setSize)
     100  LoadParamNEW(root, "size", this, ParticleEmitter, setSize)
    100101    .describe("How big the emitter is (no effect on dot-emitters)");
    101102
    102   LoadParam<ParticleEmitter>(root, "rate", this, &ParticleEmitter::setEmissionRate)
     103  LoadParamNEW(root, "rate", this, ParticleEmitter, setEmissionRate)
    103104    .describe("How many particles should be emittet from this emitter");
    104105
    105   LoadParam<ParticleEmitter>(root, "inherit-speed", this, &ParticleEmitter::setInheritSpeed)
     106  LoadParamNEW(root, "inherit-speed", this, ParticleEmitter, setInheritSpeed)
    106107    .describe("the extent, the speed of the emitter has on the particles");
    107108
    108   LoadParam<ParticleEmitter>(root, "emission-velocity", this, &ParticleEmitter::setEmissionVelocity)
     109  LoadParamNEW(root, "emission-velocity", this, ParticleEmitter, setEmissionVelocity)
    109110    .describe("How fast the particles are emittet (their initial speed)");
    110111
    111   LoadParam<ParticleEmitter>(root, "emission-momentum", this, &ParticleEmitter::setEmissionMomentum)
     112  LoadParamNEW(root, "emission-momentum", this, ParticleEmitter, setEmissionMomentum)
    112113      .describe("How fast the particles rotation is at emissiontime (their initial momentum)");
    113114
    114   LoadParam<ParticleEmitter>(root, "spread", this, &ParticleEmitter::setSpread)
     115  LoadParamNEW(root, "spread", this, ParticleEmitter, setSpread)
    115116    .describe("The angle the particles are emitted from (angle, deviation)");
    116117
  • trunk/src/lib/particles/particle_system.cc

    r5511 r5652  
    2525
    2626#include "load_param.h"
    27 #include "compiler.h"
     27#include "factory.h"
    2828#include "material.h"
    2929#include "state.h"
     
    119119  static_cast<PhysicsInterface*>(this)->loadParams(root);
    120120
    121   LoadParam<ParticleSystem>(root, "max-count", this, &ParticleSystem::setMaxCount)
     121  LoadParamNEW(root, "max-count", this, ParticleSystem, setMaxCount)
    122122      .describe("the maximal count of Particles, that can be emitted into this system");
    123123
    124124  //LoadParam<ParticleSystem>(root, "type", this, &ParticleSystem::setType);
    125   LoadParam<ParticleSystem>(root, "life-span", this, &ParticleSystem::setLifeSpan)
     125  LoadParamNEW(root, "life-span", this, ParticleSystem, setLifeSpan)
    126126      .describe("sets the life-span of the Particles.");
    127127
    128   LoadParam<ParticleSystem>(root, "conserve", this, &ParticleSystem::setConserve)
    129       .describe("sets the Conserve facrot of the Particles (1.0: they keep all their energy, 0.0:they keep no energy)");
    130 
    131   LoadParam<ParticleSystem>(root, "type", this, &ParticleSystem::setType)
     128  LoadParamNEW(root, "conserve", this, ParticleSystem, setConserve)
     129      .describe("sets the Conserve factor of the Particles (1.0: they keep all their energy, 0.0:they keep no energy)");
     130
     131  LoadParamNEW(root, "type", this, ParticleSystem, setType)
    132132      .describe("sets the type of the Particles, (dot, spark, sprite or model)");
    133133
  • trunk/src/lib/physics/fields/field.cc

    r5357 r5652  
    6060  static_cast<PNode*>(this)->loadParams(root);
    6161
    62   LoadParam<Field>(root, "magnitude", this, &Field::setMagnitude)
    63       .describe("sets the magnitude of this Field");
     62  LoadParamNEW(root, "magnitude", this, Field, setMagnitude)
     63      .describe("sets the magnitude of this Field")
     64      ->defaultValues(1, 1);
    6465
    65   LoadParam<Field>(root, "attenuation", this, &Field::setAttenuation)
     66  LoadParamNEW(root, "attenuation", this, Field, setAttenuation)
    6667      .describe("sets the attenuation of this Field.");
    6768
  • trunk/src/lib/physics/physics_connection.cc

    r5357 r5652  
    5252  static_cast<BaseObject*>(this)->loadParams(root);
    5353
    54   LoadParam<PhysicsConnection>(root, "subject", this, &PhysicsConnection::setSubject)
     54  LoadParamNEW(root, "subject", this, PhysicsConnection, setSubject)
    5555      .describe("set the subject by a name");
    5656
    57   LoadParam<PhysicsConnection>(root, "field", this, &PhysicsConnection::setField)
     57  LoadParamNEW(root, "field", this, PhysicsConnection, setField)
    5858      .describe("set the field by name");
    5959
  • trunk/src/lib/physics/physics_engine.cc

    r5217 r5652  
    9393void PhysicsEngine::loadParams(const TiXmlElement* root)
    9494{
    95   LoadParam<PhysicsEngine>(root, "Fields", this, &PhysicsEngine::loadFields)
     95  LoadParamXML(root, "Fields", this, PhysicsEngine, loadFields)
    9696      .describe("loads a list of fields");
    9797
    98   LoadParam<PhysicsEngine>(root, "Connections", this, &PhysicsEngine::loadConnections)
     98  LoadParamXML(root, "Connections", this, PhysicsEngine, loadConnections)
    9999      .describe("loads a list of fields");
    100100}
  • trunk/src/lib/shell/shell_command.cc

    r5642 r5652  
    7474
    7575}
    76 
    77 
    78 
    7976
    8077/**
     
    256253          if (!strcmp(enumCMD->getName(), inputSplits.getString(fktPos)))
    257254          {
    258             if (objectPointer == NULL && enumCMD->executor->getType() == Executor_Objective)
     255            if (objectPointer == NULL && enumCMD->executor->getType() & Executor_Objective)
    259256            {
    260257              delete itCMD;
  • trunk/src/lib/util/executor/executor.h

    r5642 r5652  
    2121//! an enumerator for the definition of the Type.
    2222typedef enum {
    23   Executor_Objective   = 1,
    24   Executor_Static      = 2,
     23  Executor_Objective         = 0x00000001,
     24  Executor_Static            = 0x00000002,
     25
     26  Executor_NoLoadString      = 0x00000010,
    2527} Executor_Type;
    2628
     
    4345
    4446    /** @returns the Type of this Function (either static or objective) */
    45     inline Executor_Type getType() const { return this->functorType; };
     47    inline long getType() const { return this->functorType; };
    4648    /** @returns the Count of Parameters this Executor takes */
    4749    inline unsigned int getParamCount() const { return this->paramCount; };
     
    5658
    5759  protected:
    58     Executor_Type                    functorType;      //!< The type of Function we've got (either static or objective).
    59     unsigned int                     paramCount;       //!< the count of parameters.
    60     MultiType*                       defaultValue;     //!< Default Values.
     60    long                        functorType;      //!< The type of Function we've got (either static or objective).
     61    unsigned int                paramCount;       //!< the count of parameters.
     62    MultiType*                  defaultValue;     //!< Default Values.
    6163};
    6264
     
    196198#define ExecutorExecute4(t1,t2,t3,t4) \
    197199   else if (this->paramCount == 4 && this->defaultValue[0].getType() == t1##_PARAM && this->defaultValue[1].getType() == t2##_PARAM && this->defaultValue[2].getType() == t3##_PARAM && this->defaultValue[3].getType() == t4##_PARAM) \
    198     EXECUTOREXECUTER(_4_##t1##_##t2##_##t3##_##t4)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)), t3##_FUNC(sub.getString(2), t3##_DEFGRAB(2)), t4##_FUNC(sub.getString(3), t4##_DEFGRAB(3)))
     200    EXECUTOREXECUTER(_4_##t1##_##t2##_##t3##_##t4)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)), t3##_FUNC(sub.getString(2), t3##_DEFGRAB(2)), t4##_FUNC(sub.getString(3), t4##_DEFGRAB(3))) \
     201
    199202
    200203//! execute-macro for functions with five parameters
     
    258261    virtual void execute (BaseObject* object, const char* parameters)
    259262    {
    260       SubString sub(parameters, true);
     263      SubString sub(parameters, ',');  /// FIXME ///
    261264//! FUNCTOR_LIST is the List of Executive Functions
    262265#define FUNCTOR_LIST(x) ExecutorExecute ## x
  • trunk/src/lib/util/executor/executor_specials.h

    r5651 r5652  
    3838
    3939      this->functionPointer = function;
     40      this->functorType = Executor_Objective | Executor_NoLoadString;
    4041    }
    4142
     
    6667  private:
    6768    /**
    68      * used for the copy-constructor
     69     * used for the copy-(Clone)-constructor
    6970     */
    7071    ExecutorXML() : Executor() { };
  • trunk/src/story_entities/campaign.cc

    r5651 r5652  
    7575  static_cast<BaseObject*>(this)->loadParams(root);
    7676
    77   //LoadParam<Campaign>(root, "identifier", this, &Campaign::setStoryID)
    7877  LoadParamNEW(root, "identifier", this, Campaign, setStoryID)
    7978     .describe("A Unique Identifier for this Campaign");
    8079
    81 //  LoadParam<Campaign>(root, "WorldList", this, &Campaign::loadWorldListParams)
    8280   LoadParamXML(root, "WorldList", this, Campaign, loadWorldListParams)
    8381      .describe("A List of Worlds to be loaded in this Campaign");
  • trunk/src/story_entities/world.cc

    r5556 r5652  
    186186  PRINTF(4)("Creating a World\n");
    187187
    188   LoadParam<World>(root, "identifier", this, &World::setStoryID)
     188  LoadParamNEW(root, "identifier", this, World, setStoryID)
    189189    .describe("Sets the StoryID of this world");
    190190
    191   LoadParam<World>(root, "nextid", this, &World::setNextStoryID)
     191  LoadParamNEW(root, "nextid", this, World, setNextStoryID)
    192192    .describe("Sets the ID of the next world");
    193193
    194   LoadParam<World>(root, "path", this, &World::setPath)
     194  LoadParamNEW(root, "path", this, World, setPath)
    195195    .describe("The Filename of this World (relative from the data-dir)");
    196196}
     
    339339    //////////////////////////////
    340340
    341     LoadParam<LightManager>(root, "LightManager", LightManager::getInstance(), &LightManager::loadParams);
    342 
    343     LoadParam<ParticleEngine>(root, "ParticleEngine", ParticleEngine::getInstance(), &ParticleEngine::loadParams);
    344     LoadParam<PhysicsEngine>(root, "PhysicsEngine", PhysicsEngine::getInstance(), &PhysicsEngine::loadParams);
     341    LoadParamXML(root, "LightManager", LightManager::getInstance(), LightManager, loadParams);
     342
     343    LoadParamXML(root, "ParticleEngine", ParticleEngine::getInstance(), ParticleEngine, loadParams);
     344    LoadParamXML(root, "PhysicsEngine", PhysicsEngine::getInstance(), PhysicsEngine, loadParams);
    345345
    346346  // find Track
  • trunk/src/util/loading/load_param.cc

    r5651 r5652  
    110110{
    111111  this->loadString = grabParameter(root, paramName);
     112  this->paramName = paramName;
    112113  this->object = object;
    113114  if (root != NULL)
     
    127128  if (likely(this->executor != NULL))
    128129  {
    129    if (likely(this->object != NULL))
    130      this->executor->execute(this->object, this->loadString);
    131 
     130    printf("%s: %s", this->paramName, this->loadString);
     131    if (likely(this->object != NULL && this->executor != NULL) &&
     132        ( this->loadString != NULL ||
     133         ((this->executor->getType() & Executor_NoLoadString) == Executor_NoLoadString)))
     134    {
     135      printf(" - exec");
     136      this->executor->execute(this->object, this->loadString);
     137    }
     138    printf ("\n");
    132139    delete this->executor;
    133140  }
    134141
     142}
     143
     144
     145LoadParamBase* LoadParamBase::defaultValues(unsigned int count, ...)
     146{
     147  if (this == NULL)
     148    return NULL;
     149
     150  va_list values;
     151  va_start(values, count);
     152
     153  assert(executor != NULL);
     154  this->executor->defaultValues(count, values);
     155
     156  return this;
    135157}
    136158
  • trunk/src/util/loading/load_param.h

    r5651 r5652  
    2222#define _LOAD_PARAM_H
    2323
    24 #include "functor_list.h"
    25 
    26 #include "debug.h"
    27 
    28 #include "factory.h"
    29 #include "substring.h"
    30 #include "tinyxml.h"
     24#include "base_object.h"
     25
    3126#include "executor/executor.h"
    3227#include "executor/executor_specials.h"
     
    7469
    7570  protected:
     71    bool                     withLoadString;       //!< If we need the loadString to execute this.
    7672    Executor*                executor;
    7773    BaseObject*              object;
     74    const char*              paramName;
    7875
    7976    LoadClassDescription*    classDesc;            //!< The LoadClassDescription of this LoadParameter
  • trunk/src/world_entities/skybox.cc

    r5511 r5652  
    5555  static_cast<WorldEntity*>(this)->loadParams(root);
    5656
    57   LoadParam<SkyBox>(root, "Materialset", this, &SkyBox::setTexture)
     57  LoadParamNEW(root, "Materialset", this, SkyBox, setTexture)
    5858      .describe("Sets the material on the SkyBox. The string must be the path relative to the data-dir, and without a trailing .jpg");
    5959
    60   LoadParam<SkyBox>(root, "Size", this, &SkyBox::setSize)
     60  LoadParamNEW(root, "Size", this, SkyBox, setSize)
    6161      .describe("Sets the Size of the SkyBox (normally this should be 90% of the maximal viewing Distance).");
    6262}
  • trunk/src/world_entities/terrain.cc

    r5511 r5652  
    104104  static_cast<WorldEntity*>(this)->loadParams(root);
    105105
    106   LoadParam<Terrain>(root, "vegetation", this, &Terrain::loadVegetation)
     106  LoadParamNEW(root, "vegetation", this, Terrain, loadVegetation)
    107107      .describe("the fileName of the vegetation, that should be loaded onto this terrain. (must be relative to the data-dir)") ;
    108108
  • trunk/src/world_entities/weapons/aim.cc

    r5557 r5652  
    7070  static_cast<PNode*>(this)->loadParams(root);
    7171
    72   LoadParam<Aim>(root, "texture", this, &Aim::setTexture)
     72  LoadParamNEW(root, "texture", this, Aim, setTexture)
    7373      .describe("the texture-file to load onto the Aim");
    7474
    75   LoadParam<Aim>(root, "size", this, &Aim::setSize)
     75  LoadParamNEW(root, "size", this, Aim, setSize)
    7676      .describe("the size of the Aim in Pixels");
    7777
    78   LoadParam<Aim>(root, "rotation-speed", this, &Aim::setRotationSpeed)
     78  LoadParamNEW(root, "rotation-speed", this, Aim, setRotationSpeed)
    7979      .describe("the Speed with which the Aim should rotate");
    8080}
  • trunk/src/world_entities/weapons/crosshair.cc

    r5398 r5652  
    8484  static_cast<EventListener*>(this)->loadParams(root);
    8585
    86   LoadParam<Crosshair>(root, "texture", this, &Crosshair::setTexture)
     86  LoadParamNEW(root, "texture", this, Crosshair, setTexture)
    8787      .describe("the texture-file to load onto the Crosshair");
    8888
    89   LoadParam<Crosshair>(root, "size", this, &Crosshair::setSize)
     89  LoadParamNEW(root, "size", this, Crosshair, setSize)
    9090      .describe("the size of the Crosshair in Pixels");
    9191
    92   LoadParam<Crosshair>(root, "rotation-speed", this, &Crosshair::setRotationSpeed)
     92  LoadParamNEW(root, "rotation-speed", this, Crosshair, setRotationSpeed)
    9393      .describe("the Speed with which the Crosshair should rotate");
    9494}
  • trunk/src/world_entities/weapons/weapon.cc

    r5500 r5652  
    109109  static_cast<WorldEntity*>(this)->loadParams(root);
    110110
    111   LoadParam<Weapon>(root, "projectile", this, &Weapon::setProjectileType)
     111  LoadParamNEW(root, "projectile", this, Weapon, setProjectileType)
    112112      .describe("Sets the name of the Projectile to load onto the Entity");
    113113
    114   LoadParam<Weapon>(root, "emission-point", this, &Weapon::setEmissionPoint)
     114  LoadParamNEW(root, "emission-point", this, Weapon, setEmissionPoint)
    115115      .describe("Sets the Point of emission of this weapon");
    116116
    117   LoadParam<Weapon>(root, "state-duration", this, &Weapon::setStateDuration)
     117  LoadParamNEW(root, "state-duration", this, Weapon, setStateDuration)
    118118      .describe("Sets the duration of a given state (1: state-Name; 2: duration in seconds)");
    119119
    120   LoadParam<Weapon>(root, "action-sound", this, &Weapon::setActionSound)
     120  LoadParamNEW(root, "action-sound", this, Weapon, setActionSound)
    121121      .describe("Sets a given sound to an action (1: action-Name; 2: name of the sound (relative to the Data-Path))");
    122122}
  • trunk/src/world_entities/weapons/weapon_manager.cc

    r5644 r5652  
    119119  static_cast<BaseObject*>(this)->loadParams(root);
    120120
    121   LoadParam<WeaponManager>(root, "slot-count", this, &WeaponManager::setSlotCount)
     121  LoadParamNEW(root, "slot-count", this, WeaponManager, setSlotCount)
    122122      .describe("how many slots(cannons) the WeaponManager can handle");
    123123
  • trunk/src/world_entities/world_entity.cc

    r5555 r5652  
    7676
    7777  // Model Loading
    78   LoadParam<WorldEntity>(root, "model", this, &WorldEntity::loadModel, false, NULL, 1.0f)
    79       .describe("the fileName of the model, that should be loaded onto this world-entity. (must be relative to the data-dir)") ;
     78  LoadParamNEW(root, "model", this, WorldEntity, loadModel)
     79      .describe("the fileName of the model, that should be loaded onto this world-entity. (must be relative to the data-dir)")
     80      ->defaultValues(2, NULL, 1.0f);
    8081
    8182}
Note: See TracChangeset for help on using the changeset viewer.