Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 29, 2006, 1:37:36 PM (18 years ago)
Author:
hdavid
Message:

branches/mountain_lake

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mountain_lake/src/lib/graphics/effects/cloud_effect.cc

    r8902 r8903  
    7575{
    7676  PRINTF(0)("Initializing CloudEffect\n");
    77  
     77
    7878  this->offsetZ = 0;
    7979  this->animationSpeed = 2;
     
    183183    this->shader->activateShader();
    184184    this->offset->set(0.0f, 0.0f, offsetZ);
    185    
     185
    186186    if(cloudColor != newCloudColor)
    187187    {
    188188      if(fadeCloud)
    189       { 
     189      {
    190190        this->cloudColorFadeX = new tAnimation<CloudEffect>(this, &CloudEffect::setColorCloudX);
    191191        this->cloudColorFadeX->setInfinity(ANIM_INF_CONSTANT);
     
    194194        this->cloudColorFadeZ = new tAnimation<CloudEffect>(this, &CloudEffect::setColorCloudZ);
    195195        this->cloudColorFadeZ->setInfinity(ANIM_INF_CONSTANT);
    196        
     196
    197197        this->cloudColorFadeX->addKeyFrame(cloudColor.x, fadeTime, ANIM_LINEAR);
    198198        this->cloudColorFadeX->addKeyFrame(newCloudColor.x, 0, ANIM_LINEAR);
    199  
     199
    200200        this->cloudColorFadeY->addKeyFrame(cloudColor.y, fadeTime, ANIM_LINEAR);
    201201        this->cloudColorFadeY->addKeyFrame(newCloudColor.y, 0, ANIM_LINEAR);
    202  
     202
    203203        this->cloudColorFadeZ->addKeyFrame(cloudColor.z, fadeTime, ANIM_LINEAR);
    204204        this->cloudColorFadeZ->addKeyFrame(newCloudColor.z, 0, ANIM_LINEAR);
    205        
     205
    206206        fadeCloud = false;
    207        
     207
    208208        this->cloudColorFadeX->replay();
    209209        this->cloudColorFadeY->replay();
    210210        this->cloudColorFadeZ->replay();
    211211      }
    212      
     212
    213213      this->cloudcolor->set(this->cloudColor.x, this->cloudColor.y, this->cloudColor.z);
    214214    }
    215215
    216216    if(skyColor != newSkyColor)
    217     { 
     217    {
    218218      if(fadeSky)
    219       { 
     219      {
    220220        this->skyColorFadeX = new tAnimation<CloudEffect>(this, &CloudEffect::setColorSkyX);
    221221        this->skyColorFadeX->setInfinity(ANIM_INF_CONSTANT);
     
    224224        this->skyColorFadeZ = new tAnimation<CloudEffect>(this, &CloudEffect::setColorSkyZ);
    225225        this->skyColorFadeZ->setInfinity(ANIM_INF_CONSTANT);
    226        
     226
    227227        this->skyColorFadeX->addKeyFrame(skyColor.x, fadeTime, ANIM_LINEAR);
    228228        this->skyColorFadeX->addKeyFrame(newSkyColor.x, 0, ANIM_LINEAR);
    229  
     229
    230230        this->skyColorFadeY->addKeyFrame(skyColor.y, fadeTime, ANIM_LINEAR);
    231231        this->skyColorFadeY->addKeyFrame(newSkyColor.y, 0, ANIM_LINEAR);
    232  
     232
    233233        this->skyColorFadeZ->addKeyFrame(skyColor.z, fadeTime, ANIM_LINEAR);
    234234        this->skyColorFadeZ->addKeyFrame(newSkyColor.z, 0, ANIM_LINEAR);
    235        
     235
    236236        fadeSky = false;
    237        
     237
    238238        this->skyColorFadeX->replay();
    239239        this->skyColorFadeY->replay();
    240240        this->skyColorFadeZ->replay();
    241241      }
    242      
     242
    243243      this->skycolor->set(this->skyColor.x, this->skyColor.y, this->skyColor.z);
    244244    }
    245    
     245
    246246    this->shader->deactivateShader();
    247247  }
Note: See TracChangeset for help on using the changeset viewer.