Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 22, 2006, 2:36:54 PM (18 years ago)
Author:
bensch
Message:

new_class_id: many more classes done

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/graphics/effects/fog_effect.cc

    r9406 r9686  
    2828SHELL_COMMAND(fadeout, FogEffect, fadeOutFog);
    2929
    30 
    31 
    32 CREATE_SCRIPTABLE_CLASS(FogEffect, CL_FOG_EFFECT,
     30#include "class_id.h"
     31
     32CREATE_SCRIPTABLE_CLASS(FogEffect, FogEffect::classID(),
    3333                        addMethod("fadeIn", ExecutorLua0<FogEffect>(&FogEffect::fadeInFog))
    3434                            ->addMethod("fadeOut", ExecutorLua0<FogEffect>(&FogEffect::fadeOutFog))
     
    3838
    3939CREATE_FACTORY(FogEffect, CL_FOG_EFFECT);
     40NewObjectListDefinition(FogEffect);
    4041
    4142/**
     
    4344 */
    4445FogEffect::FogEffect(const TiXmlElement* root) {
    45     this->setClassID(CL_FOG_EFFECT, "FogEffect");
    46 
     46  this->registerObject(this, FogEffect::_objectList);
    4747    // Initialize values
    4848    this->init();
     
    8585  this->fogFadeInActivate = false;
    8686  this->fogFadeOutActivate = false;
    87  
     87
    8888  this->cloudColor = Vector(0.2f, 0.3f, 0.3f);
    8989  this->skyColor = Vector(0.2f, 0.3f, 0.3f);
     
    105105    LoadParam(root, "cloudcolor", this, FogEffect, setCloudColor);
    106106    LoadParam(root, "skycolor", this, FogEffect, setSkyColor);
    107    
     107
    108108    LOAD_PARAM_START_CYCLE(root, element);
    109109    {
     
    131131
    132132    glEnable(GL_FOG);
    133    
     133
    134134    // Store cloud- and sky color before the snow
    135135    this->oldCloudColor = CloudEffect::cloudColor;
    136136    this->oldSkyColor   = CloudEffect::skyColor;
    137    
     137
    138138    // Change the colors
    139139    CloudEffect::changeCloudColor(this->cloudColor, this->fogFadeInDuration);
     
    241241    this->fogFadeInActivate = false;
    242242
    243    
     243
    244244    // If Fog is off, turn it on first
    245245    if (!this->fogActivate)
Note: See TracChangeset for help on using the changeset viewer.