Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 26, 2006, 2:29:33 PM (18 years ago)
Author:
hdavid
Message:

branches/atmospheric_engine: activating rain effect changes the cloud- & skycolor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc

    r8771 r8787  
    2626#include "shell_command.h"
    2727#include "light.h"
     28#include "cloud_effect.h"
    2829
    2930#include "parser/tinyxml/tinyxml.h"
     
    101102  this->rainFadeInDuration = 0;
    102103  this->rainFadeOutDuration = 0;
     104 
     105  this->cloudColor = Vector(0.8f, 0.8f, 0.8f);
     106  this->skyColor = Vector(0.0f, 0.0f, 0.0f);
    103107
    104108  this->rainMaxParticles = this->rainRate * this->rainLife;
     
    127131  LoadParam(root, "fadeinduration", this, RainEffect, setRainFadeIn);
    128132  LoadParam(root, "fadeoutduration", this, RainEffect, setRainFadeOut);
     133  LoadParam(root, "cloudcolor", this, RainEffect, setCloudColor);
     134  LoadParam(root, "skycolor", this, RainEffect, setSkyColor);
    129135
    130136  LOAD_PARAM_START_CYCLE(root, element);
     
    177183  if (this->rainFadeInDuration == 0)
    178184    lightMan->setAmbientColor(.1,.1,.1);
     185 
     186  // Change the cloudcolor,skycolor
     187  this->oldCloudColor = CloudEffect::cloudColor;
     188  this->oldSkyColor = CloudEffect::skyColor;
     189  CloudEffect::changeCloudColor(this->cloudColor);
     190  CloudEffect::changeSkyColor(this->skyColor);
    179191}
    180192
     
    194206  // Restore Light Ambient
    195207  lightMan->setAmbientColor(this->rainAmbient, this->rainAmbient, this->rainAmbient);
     208 
     209  CloudEffect::changeCloudColor(this->oldCloudColor);
     210  CloudEffect::changeSkyColor(this->oldSkyColor);
    196211}
    197212
Note: See TracChangeset for help on using the changeset viewer.