- Timestamp:
- Nov 20, 2005, 6:32:39 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/coord/p_node.cc
r5438 r5652 141 141 static_cast<BaseObject*>(this)->loadParams(root); 142 142 143 LoadParam <PNode>(root, "rel-coor", this, &PNode::setRelCoor)143 LoadParamNEW(root, "rel-coor", this, PNode, setRelCoor) 144 144 .describe("Sets The relative position of the Node to its parent."); 145 145 146 LoadParam <PNode>(root, "abs-coor", this, &PNode::setAbsCoor)146 LoadParamNEW(root, "abs-coor", this, PNode, setAbsCoor) 147 147 .describe("Sets The absolute Position of the Node."); 148 148 149 LoadParam <PNode>(root, "rel-dir", this, &PNode::setRelDir)149 LoadParamNEW(root, "rel-dir", this, PNode, setRelDir) 150 150 .describe("Sets The relative rotation of the Node to its parent."); 151 151 152 LoadParam <PNode>(root, "abs-dir", this, &PNode::setAbsDir)152 LoadParamNEW(root, "abs-dir", this, PNode, setAbsDir) 153 153 .describe("Sets The absolute rotation of the Node."); 154 154 155 LoadParam <PNode>(root, "parent", this, &PNode::setParent)155 LoadParamNEW(root, "parent", this, PNode, setParent) 156 156 .describe("the Name of the Parent of this PNode"); 157 157 158 LoadParam <PNode>(root, "parent-mode", this, &PNode::setParentMode)158 LoadParamNEW(root, "parent-mode", this, PNode, setParentMode) 159 159 .describe("the mode to connect this node to its parent ()"); 160 160 -
trunk/src/lib/graphics/light.cc
r5357 r5652 88 88 static_cast<PNode*>(this)->loadParams(root); 89 89 90 LoadParam <Light>(root, "diffuse-color", this, &Light::setDiffuseColor)90 LoadParamNEW(root, "diffuse-color", this, Light, setDiffuseColor) 91 91 .describe("sets the diffuse color of the Light (red [0-1], green [0-1], blue [0-1])"); 92 92 93 LoadParam <Light>(root, "specular-color", this, &Light::setSpecularColor)93 LoadParamNEW(root, "specular-color", this, Light, setSpecularColor) 94 94 .describe("sets the specular color of the Light (red [0-1], green [0-1], blue [0-1])"); 95 95 96 LoadParam <Light>(root, "attenuation", this, &Light::setAttenuation)96 LoadParamNEW(root, "attenuation", this, Light, setAttenuation) 97 97 .describe("sets the Attenuation of the LightSource (constant Factor, linear Factor, quadratic Factor)."); 98 98 99 LoadParam <Light>(root, "spot-direction", this, &Light::setSpotDirection)99 LoadParamNEW(root, "spot-direction", this, Light, setSpotDirection) 100 100 .describe("sets the Direction of the Spot"); 101 101 102 LoadParam <Light>(root, "spot-cutoff", this, &Light::setSpotCutoff)102 LoadParamNEW(root, "spot-cutoff", this, Light, setSpotCutoff) 103 103 .describe("the cuttoff of the Spotlight"); 104 104 } -
trunk/src/lib/graphics/render2D/element_2d.cc
r5418 r5652 130 130 { 131 131 // ELEMENT2D-native settings. 132 LoadParam <Element2D>(root, "alignment", this, &Element2D::setAlignment)132 LoadParamNEW(root, "alignment", this, Element2D, setAlignment) 133 133 .describe("loads the alignment: (either: center, left, right or screen-center)"); 134 134 135 LoadParam <Element2D>(root, "layer", this, &Element2D::setLayer)135 LoadParamNEW(root, "layer", this, Element2D, setLayer) 136 136 .describe("loads the layer onto which to project: (either: top, medium, bottom, below-all)"); 137 137 138 LoadParam <Element2D>(root, "bind-node", this, &Element2D::setBindNode)138 LoadParamNEW(root, "bind-node", this, Element2D, setBindNode) 139 139 .describe("sets a node, this 2D-Element should be shown upon (name of the node)"); 140 140 141 LoadParam <Element2D>(root, "visibility", this, &Element2D::setVisibility)141 LoadParamNEW(root, "visibility", this, Element2D, setVisibility) 142 142 .describe("if the Element is visible or not"); 143 143 144 144 145 145 // PNode-style: 146 LoadParam <Element2D>(root, "rel-coor", this, &Element2D::setRelCoor2D)146 LoadParamNEW(root, "rel-coor", this, Element2D, setRelCoor2D) 147 147 .describe("Sets The relative position of the Node to its parent."); 148 148 149 LoadParam <Element2D>(root, "abs-coor", this, &Element2D::setAbsCoor2D)149 LoadParamNEW(root, "abs-coor", this, Element2D, setAbsCoor2D) 150 150 .describe("Sets The absolute Position of the Node."); 151 151 152 LoadParam <Element2D>(root, "rel-dir", this, &Element2D::setRelDir2D)152 LoadParamNEW(root, "rel-dir", this, Element2D, setRelDir2D) 153 153 .describe("Sets The relative rotation of the Node to its parent."); 154 154 155 LoadParam <Element2D>(root, "abs-dir", this, &Element2D::setAbsDir2D)155 LoadParamNEW(root, "abs-dir", this, Element2D, setAbsDir2D) 156 156 .describe("Sets The absolute rotation of the Node."); 157 157 158 LoadParam <Element2D>(root, "parent", this, &Element2D::setParent2D)158 LoadParamNEW(root, "parent", this, Element2D, setParent2D) 159 159 .describe("the Name of the Parent of this Element2D"); 160 160 161 LoadParam <Element2D>(root, "parent-mode", this, &Element2D::setParentMode2D)161 LoadParamNEW(root, "parent-mode", this, Element2D, setParentMode2D) 162 162 .describe("the mode to connect this node to its parent ()"); 163 163 -
trunk/src/lib/gui/gl_gui/glmenu/glmenu_imagescreen.cc
r5373 r5652 57 57 void GLMenuImageScreen::loadParams(const TiXmlElement* root) 58 58 { 59 LoadParam <GLMenuImageScreen>(root, "BackgroundImage", this, &GLMenuImageScreen::setBackgroundImage)59 LoadParamNEW(root, "BackgroundImage", this, GLMenuImageScreen, setBackgroundImage) 60 60 .describe("sets the image to load onto the loadscreen"); 61 61 62 LoadParam <GLMenuImageScreen>(root, "BackgroundPS", this, &GLMenuImageScreen::setPosScale)62 LoadParamNEW(root, "BackgroundPS", this, GLMenuImageScreen, setPosScale) 63 63 .describe("The Position and Scale of the Background Image in %(0-1.0). PosX, PosY, SizeX, SizeY"); 64 64 65 LoadParam <GLMenuImageScreen>(root, "BarImage", this, &GLMenuImageScreen::setBarImage)65 LoadParamNEW(root, "BarImage", this, GLMenuImageScreen, setBarImage) 66 66 .describe("sets the image of the LoadingBar"); 67 67 68 LoadParam <GLMenuImageScreen>(root, "BarPS", this, &GLMenuImageScreen::setBarPosScale)68 LoadParamNEW(root, "BarPS", this, GLMenuImageScreen, setBarPosScale) 69 69 .describe("The Position and Scale of the Loading Bar in %(0-1.0). PosX, PosY, SizeX, SizeY"); 70 70 71 LoadParam <GLMenuImageScreen>(root, "ElementCount", this, &GLMenuImageScreen::setMaximum)71 LoadParamNEW(root, "ElementCount", this, GLMenuImageScreen, setMaximum) 72 72 .describe("The Count of elements to load into the bar (this is only a maximum value)"); 73 73 } … … 123 123 void GLMenuImageScreen::setPosScale(float offsetX, float offsetY, float scaleX, float scaleY) 124 124 { 125 printf("IMG: %f %f %f %f\n", offsetX, offsetY,offsetX, offsetY); 125 126 this->setPosition(offsetX, offsetY); 126 127 this->setScale(scaleX, scaleY); … … 144 145 void GLMenuImageScreen::setBarPosScale(float barX, float barY, float barW, float barH) 145 146 { 147 printf("BAR: %f %f %f %f\n", barX, barY, barW, barH); 148 146 149 this->barX = barX; 147 150 this->barY = barY; -
trunk/src/lib/lang/base_object.cc
r5646 r5652 63 63 // name setup 64 64 LoadParamNEW(root, "name", this, BaseObject, setName) 65 //LoadParamBase(root, "name", this, ExecutorObjective<BaseObject>(&BaseObject::setName))66 65 .describe("the Name of the Object."); 67 // LoadParam<BaseObject>(root, "name", this, &BaseObject::setName)68 //.describe("the name of the Object at hand");69 66 } 70 67 -
trunk/src/lib/particles/particle_emitter.cc
r5445 r5652 22 22 23 23 #include "load_param.h" 24 #include "factory.h" 24 25 #include "debug.h" 25 26 #include "stdlibincl.h" … … 94 95 static_cast<PNode*>(this)->loadParams(root); 95 96 96 LoadParam <ParticleEmitter>(root, "type", this, &ParticleEmitter::setType)97 LoadParamNEW(root, "type", this, ParticleEmitter, setType) 97 98 .describe("What type of emitter is this [dot, plane, cube, sphere]."); 98 99 99 LoadParam <ParticleEmitter>(root, "size", this, &ParticleEmitter::setSize)100 LoadParamNEW(root, "size", this, ParticleEmitter, setSize) 100 101 .describe("How big the emitter is (no effect on dot-emitters)"); 101 102 102 LoadParam <ParticleEmitter>(root, "rate", this, &ParticleEmitter::setEmissionRate)103 LoadParamNEW(root, "rate", this, ParticleEmitter, setEmissionRate) 103 104 .describe("How many particles should be emittet from this emitter"); 104 105 105 LoadParam <ParticleEmitter>(root, "inherit-speed", this, &ParticleEmitter::setInheritSpeed)106 LoadParamNEW(root, "inherit-speed", this, ParticleEmitter, setInheritSpeed) 106 107 .describe("the extent, the speed of the emitter has on the particles"); 107 108 108 LoadParam <ParticleEmitter>(root, "emission-velocity", this, &ParticleEmitter::setEmissionVelocity)109 LoadParamNEW(root, "emission-velocity", this, ParticleEmitter, setEmissionVelocity) 109 110 .describe("How fast the particles are emittet (their initial speed)"); 110 111 111 LoadParam <ParticleEmitter>(root, "emission-momentum", this, &ParticleEmitter::setEmissionMomentum)112 LoadParamNEW(root, "emission-momentum", this, ParticleEmitter, setEmissionMomentum) 112 113 .describe("How fast the particles rotation is at emissiontime (their initial momentum)"); 113 114 114 LoadParam <ParticleEmitter>(root, "spread", this, &ParticleEmitter::setSpread)115 LoadParamNEW(root, "spread", this, ParticleEmitter, setSpread) 115 116 .describe("The angle the particles are emitted from (angle, deviation)"); 116 117 -
trunk/src/lib/particles/particle_system.cc
r5511 r5652 25 25 26 26 #include "load_param.h" 27 #include " compiler.h"27 #include "factory.h" 28 28 #include "material.h" 29 29 #include "state.h" … … 119 119 static_cast<PhysicsInterface*>(this)->loadParams(root); 120 120 121 LoadParam <ParticleSystem>(root, "max-count", this, &ParticleSystem::setMaxCount)121 LoadParamNEW(root, "max-count", this, ParticleSystem, setMaxCount) 122 122 .describe("the maximal count of Particles, that can be emitted into this system"); 123 123 124 124 //LoadParam<ParticleSystem>(root, "type", this, &ParticleSystem::setType); 125 LoadParam <ParticleSystem>(root, "life-span", this, &ParticleSystem::setLifeSpan)125 LoadParamNEW(root, "life-span", this, ParticleSystem, setLifeSpan) 126 126 .describe("sets the life-span of the Particles."); 127 127 128 LoadParam <ParticleSystem>(root, "conserve", this, &ParticleSystem::setConserve)129 .describe("sets the Conserve fac rotof 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) 132 132 .describe("sets the type of the Particles, (dot, spark, sprite or model)"); 133 133 -
trunk/src/lib/physics/fields/field.cc
r5357 r5652 60 60 static_cast<PNode*>(this)->loadParams(root); 61 61 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); 64 65 65 LoadParam <Field>(root, "attenuation", this, &Field::setAttenuation)66 LoadParamNEW(root, "attenuation", this, Field, setAttenuation) 66 67 .describe("sets the attenuation of this Field."); 67 68 -
trunk/src/lib/physics/physics_connection.cc
r5357 r5652 52 52 static_cast<BaseObject*>(this)->loadParams(root); 53 53 54 LoadParam <PhysicsConnection>(root, "subject", this, &PhysicsConnection::setSubject)54 LoadParamNEW(root, "subject", this, PhysicsConnection, setSubject) 55 55 .describe("set the subject by a name"); 56 56 57 LoadParam <PhysicsConnection>(root, "field", this, &PhysicsConnection::setField)57 LoadParamNEW(root, "field", this, PhysicsConnection, setField) 58 58 .describe("set the field by name"); 59 59 -
trunk/src/lib/physics/physics_engine.cc
r5217 r5652 93 93 void PhysicsEngine::loadParams(const TiXmlElement* root) 94 94 { 95 LoadParam <PhysicsEngine>(root, "Fields", this, &PhysicsEngine::loadFields)95 LoadParamXML(root, "Fields", this, PhysicsEngine, loadFields) 96 96 .describe("loads a list of fields"); 97 97 98 LoadParam <PhysicsEngine>(root, "Connections", this, &PhysicsEngine::loadConnections)98 LoadParamXML(root, "Connections", this, PhysicsEngine, loadConnections) 99 99 .describe("loads a list of fields"); 100 100 } -
trunk/src/lib/shell/shell_command.cc
r5642 r5652 74 74 75 75 } 76 77 78 79 76 80 77 /** … … 256 253 if (!strcmp(enumCMD->getName(), inputSplits.getString(fktPos))) 257 254 { 258 if (objectPointer == NULL && enumCMD->executor->getType() ==Executor_Objective)255 if (objectPointer == NULL && enumCMD->executor->getType() & Executor_Objective) 259 256 { 260 257 delete itCMD; -
trunk/src/lib/util/executor/executor.h
r5642 r5652 21 21 //! an enumerator for the definition of the Type. 22 22 typedef enum { 23 Executor_Objective = 1, 24 Executor_Static = 2, 23 Executor_Objective = 0x00000001, 24 Executor_Static = 0x00000002, 25 26 Executor_NoLoadString = 0x00000010, 25 27 } Executor_Type; 26 28 … … 43 45 44 46 /** @returns the Type of this Function (either static or objective) */ 45 inline Executor_TypegetType() const { return this->functorType; };47 inline long getType() const { return this->functorType; }; 46 48 /** @returns the Count of Parameters this Executor takes */ 47 49 inline unsigned int getParamCount() const { return this->paramCount; }; … … 56 58 57 59 protected: 58 Executor_TypefunctorType; //!< The type of Function we've got (either static or objective).59 unsigned int 60 MultiType* 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. 61 63 }; 62 64 … … 196 198 #define ExecutorExecute4(t1,t2,t3,t4) \ 197 199 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 199 202 200 203 //! execute-macro for functions with five parameters … … 258 261 virtual void execute (BaseObject* object, const char* parameters) 259 262 { 260 SubString sub(parameters, true);263 SubString sub(parameters, ','); /// FIXME /// 261 264 //! FUNCTOR_LIST is the List of Executive Functions 262 265 #define FUNCTOR_LIST(x) ExecutorExecute ## x -
trunk/src/lib/util/executor/executor_specials.h
r5651 r5652 38 38 39 39 this->functionPointer = function; 40 this->functorType = Executor_Objective | Executor_NoLoadString; 40 41 } 41 42 … … 66 67 private: 67 68 /** 68 * used for the copy- constructor69 * used for the copy-(Clone)-constructor 69 70 */ 70 71 ExecutorXML() : Executor() { }; -
trunk/src/story_entities/campaign.cc
r5651 r5652 75 75 static_cast<BaseObject*>(this)->loadParams(root); 76 76 77 //LoadParam<Campaign>(root, "identifier", this, &Campaign::setStoryID)78 77 LoadParamNEW(root, "identifier", this, Campaign, setStoryID) 79 78 .describe("A Unique Identifier for this Campaign"); 80 79 81 // LoadParam<Campaign>(root, "WorldList", this, &Campaign::loadWorldListParams)82 80 LoadParamXML(root, "WorldList", this, Campaign, loadWorldListParams) 83 81 .describe("A List of Worlds to be loaded in this Campaign"); -
trunk/src/story_entities/world.cc
r5556 r5652 186 186 PRINTF(4)("Creating a World\n"); 187 187 188 LoadParam <World>(root, "identifier", this, &World::setStoryID)188 LoadParamNEW(root, "identifier", this, World, setStoryID) 189 189 .describe("Sets the StoryID of this world"); 190 190 191 LoadParam <World>(root, "nextid", this, &World::setNextStoryID)191 LoadParamNEW(root, "nextid", this, World, setNextStoryID) 192 192 .describe("Sets the ID of the next world"); 193 193 194 LoadParam <World>(root, "path", this, &World::setPath)194 LoadParamNEW(root, "path", this, World, setPath) 195 195 .describe("The Filename of this World (relative from the data-dir)"); 196 196 } … … 339 339 ////////////////////////////// 340 340 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); 345 345 346 346 // find Track -
trunk/src/util/loading/load_param.cc
r5651 r5652 110 110 { 111 111 this->loadString = grabParameter(root, paramName); 112 this->paramName = paramName; 112 113 this->object = object; 113 114 if (root != NULL) … … 127 128 if (likely(this->executor != NULL)) 128 129 { 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"); 132 139 delete this->executor; 133 140 } 134 141 142 } 143 144 145 LoadParamBase* 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; 135 157 } 136 158 -
trunk/src/util/loading/load_param.h
r5651 r5652 22 22 #define _LOAD_PARAM_H 23 23 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 31 26 #include "executor/executor.h" 32 27 #include "executor/executor_specials.h" … … 74 69 75 70 protected: 71 bool withLoadString; //!< If we need the loadString to execute this. 76 72 Executor* executor; 77 73 BaseObject* object; 74 const char* paramName; 78 75 79 76 LoadClassDescription* classDesc; //!< The LoadClassDescription of this LoadParameter -
trunk/src/world_entities/skybox.cc
r5511 r5652 55 55 static_cast<WorldEntity*>(this)->loadParams(root); 56 56 57 LoadParam <SkyBox>(root, "Materialset", this, &SkyBox::setTexture)57 LoadParamNEW(root, "Materialset", this, SkyBox, setTexture) 58 58 .describe("Sets the material on the SkyBox. The string must be the path relative to the data-dir, and without a trailing .jpg"); 59 59 60 LoadParam <SkyBox>(root, "Size", this, &SkyBox::setSize)60 LoadParamNEW(root, "Size", this, SkyBox, setSize) 61 61 .describe("Sets the Size of the SkyBox (normally this should be 90% of the maximal viewing Distance)."); 62 62 } -
trunk/src/world_entities/terrain.cc
r5511 r5652 104 104 static_cast<WorldEntity*>(this)->loadParams(root); 105 105 106 LoadParam <Terrain>(root, "vegetation", this, &Terrain::loadVegetation)106 LoadParamNEW(root, "vegetation", this, Terrain, loadVegetation) 107 107 .describe("the fileName of the vegetation, that should be loaded onto this terrain. (must be relative to the data-dir)") ; 108 108 -
trunk/src/world_entities/weapons/aim.cc
r5557 r5652 70 70 static_cast<PNode*>(this)->loadParams(root); 71 71 72 LoadParam <Aim>(root, "texture", this, &Aim::setTexture)72 LoadParamNEW(root, "texture", this, Aim, setTexture) 73 73 .describe("the texture-file to load onto the Aim"); 74 74 75 LoadParam <Aim>(root, "size", this, &Aim::setSize)75 LoadParamNEW(root, "size", this, Aim, setSize) 76 76 .describe("the size of the Aim in Pixels"); 77 77 78 LoadParam <Aim>(root, "rotation-speed", this, &Aim::setRotationSpeed)78 LoadParamNEW(root, "rotation-speed", this, Aim, setRotationSpeed) 79 79 .describe("the Speed with which the Aim should rotate"); 80 80 } -
trunk/src/world_entities/weapons/crosshair.cc
r5398 r5652 84 84 static_cast<EventListener*>(this)->loadParams(root); 85 85 86 LoadParam <Crosshair>(root, "texture", this, &Crosshair::setTexture)86 LoadParamNEW(root, "texture", this, Crosshair, setTexture) 87 87 .describe("the texture-file to load onto the Crosshair"); 88 88 89 LoadParam <Crosshair>(root, "size", this, &Crosshair::setSize)89 LoadParamNEW(root, "size", this, Crosshair, setSize) 90 90 .describe("the size of the Crosshair in Pixels"); 91 91 92 LoadParam <Crosshair>(root, "rotation-speed", this, &Crosshair::setRotationSpeed)92 LoadParamNEW(root, "rotation-speed", this, Crosshair, setRotationSpeed) 93 93 .describe("the Speed with which the Crosshair should rotate"); 94 94 } -
trunk/src/world_entities/weapons/weapon.cc
r5500 r5652 109 109 static_cast<WorldEntity*>(this)->loadParams(root); 110 110 111 LoadParam <Weapon>(root, "projectile", this, &Weapon::setProjectileType)111 LoadParamNEW(root, "projectile", this, Weapon, setProjectileType) 112 112 .describe("Sets the name of the Projectile to load onto the Entity"); 113 113 114 LoadParam <Weapon>(root, "emission-point", this, &Weapon::setEmissionPoint)114 LoadParamNEW(root, "emission-point", this, Weapon, setEmissionPoint) 115 115 .describe("Sets the Point of emission of this weapon"); 116 116 117 LoadParam <Weapon>(root, "state-duration", this, &Weapon::setStateDuration)117 LoadParamNEW(root, "state-duration", this, Weapon, setStateDuration) 118 118 .describe("Sets the duration of a given state (1: state-Name; 2: duration in seconds)"); 119 119 120 LoadParam <Weapon>(root, "action-sound", this, &Weapon::setActionSound)120 LoadParamNEW(root, "action-sound", this, Weapon, setActionSound) 121 121 .describe("Sets a given sound to an action (1: action-Name; 2: name of the sound (relative to the Data-Path))"); 122 122 } -
trunk/src/world_entities/weapons/weapon_manager.cc
r5644 r5652 119 119 static_cast<BaseObject*>(this)->loadParams(root); 120 120 121 LoadParam <WeaponManager>(root, "slot-count", this, &WeaponManager::setSlotCount)121 LoadParamNEW(root, "slot-count", this, WeaponManager, setSlotCount) 122 122 .describe("how many slots(cannons) the WeaponManager can handle"); 123 123 -
trunk/src/world_entities/world_entity.cc
r5555 r5652 76 76 77 77 // 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); 80 81 81 82 }
Note: See TracChangeset
for help on using the changeset viewer.