Changeset 9686 in orxonox.OLD for branches/new_class_id/src/lib/graphics/effects/fog_effect.cc
- Timestamp:
- Aug 22, 2006, 2:36:54 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/graphics/effects/fog_effect.cc
r9406 r9686 28 28 SHELL_COMMAND(fadeout, FogEffect, fadeOutFog); 29 29 30 31 32 CREATE_SCRIPTABLE_CLASS(FogEffect, CL_FOG_EFFECT,30 #include "class_id.h" 31 32 CREATE_SCRIPTABLE_CLASS(FogEffect, FogEffect::classID(), 33 33 addMethod("fadeIn", ExecutorLua0<FogEffect>(&FogEffect::fadeInFog)) 34 34 ->addMethod("fadeOut", ExecutorLua0<FogEffect>(&FogEffect::fadeOutFog)) … … 38 38 39 39 CREATE_FACTORY(FogEffect, CL_FOG_EFFECT); 40 NewObjectListDefinition(FogEffect); 40 41 41 42 /** … … 43 44 */ 44 45 FogEffect::FogEffect(const TiXmlElement* root) { 45 this->setClassID(CL_FOG_EFFECT, "FogEffect"); 46 46 this->registerObject(this, FogEffect::_objectList); 47 47 // Initialize values 48 48 this->init(); … … 85 85 this->fogFadeInActivate = false; 86 86 this->fogFadeOutActivate = false; 87 87 88 88 this->cloudColor = Vector(0.2f, 0.3f, 0.3f); 89 89 this->skyColor = Vector(0.2f, 0.3f, 0.3f); … … 105 105 LoadParam(root, "cloudcolor", this, FogEffect, setCloudColor); 106 106 LoadParam(root, "skycolor", this, FogEffect, setSkyColor); 107 107 108 108 LOAD_PARAM_START_CYCLE(root, element); 109 109 { … … 131 131 132 132 glEnable(GL_FOG); 133 133 134 134 // Store cloud- and sky color before the snow 135 135 this->oldCloudColor = CloudEffect::cloudColor; 136 136 this->oldSkyColor = CloudEffect::skyColor; 137 137 138 138 // Change the colors 139 139 CloudEffect::changeCloudColor(this->cloudColor, this->fogFadeInDuration); … … 241 241 this->fogFadeInActivate = false; 242 242 243 243 244 244 // If Fog is off, turn it on first 245 245 if (!this->fogActivate)
Note: See TracChangeset
for help on using the changeset viewer.