Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8905 in orxonox.OLD


Ignore:
Timestamp:
Jun 29, 2006, 1:42:48 PM (18 years ago)
Author:
amaechler
Message:

branches/atmospheric_engine: rain fading fixed - tadaaa

Location:
branches/mountain_lake/src/lib/graphics/effects
Files:
7 edited

Legend:

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

    r8793 r8905  
    103103 */
    104104void FogEffect::activate() {
    105     PRINTF(0)( "Activating FogEffect\n");
     105    PRINTF(3)( "Activating FogEffect\n");
    106106
    107107    // init fogGL
     
    123123 */
    124124void FogEffect::deactivate() {
    125     PRINTF(0)("Deactivating FogEffect\n");
     125    PRINTF(3)("Deactivating FogEffect\n");
    126126
    127127    this->fogFadeInActivate = false;
  • branches/mountain_lake/src/lib/graphics/effects/lense_flare.cc

    r8619 r8905  
    6464
    6565    this->lightSource = (LightManager::getInstance())->getLight(0);
    66     PRINTF(0)("light is: %p\n", this->lightSource);
     66    PRINTF(4)("light is: %p\n", this->lightSource);
    6767
    6868    if (root != NULL) {
  • branches/mountain_lake/src/lib/graphics/effects/lightning_effect.cc

    r8835 r8905  
    158158
    159159void LightningEffect::activate() {
    160     PRINTF(0)( "Activating LightningEffect\n" );
     160    PRINTF(3)( "Activating LightningEffect\n" );
    161161    this->lightningActivate = true;
    162162
     
    166166
    167167void LightningEffect::deactivate() {
    168     PRINTF(0)("Deactivating LightningEffect\n");
     168    PRINTF(3)("Deactivating LightningEffect\n");
    169169    this->lightningActivate = false;
    170170
  • branches/mountain_lake/src/lib/graphics/effects/rain_effect.cc

    r8837 r8905  
    11/*
    22  orxonox - the future of 3D-vertical-scrollers
    3  
     3
    44  Copyright (C) 2004 orx
    5  
     5
    66  This program is free software; you can redistribute it and/or modify
    77  it under the terms of the GNU General Public License as published by
    88  the Free Software Foundation; either version 2, or (at your option)
    99  any later version.
    10  
     10
    1111### File Specific:
    1212  main-programmer: hdavid, amaechler
    1313*/
     14
     15#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GRAPHICS
    1416
    1517#include "rain_effect.h"
     
    4345 * @brief standard constructor
    4446 */
    45 RainEffect::RainEffect(const TiXmlElement* root)
    46 {
    47   this->setClassID(CL_RAIN_EFFECT, "RainEffect");
    48 
    49   this->init();
    50 
    51   if (root != NULL)
    52     this->loadParams(root);
    53 
    54   //load rain sound
    55   if (this->rainBuffer != NULL)
    56     ResourceManager::getInstance()->unload(this->rainBuffer);
    57   this->rainBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/rain.wav", WAV);
    58 
    59   //load wind sound
    60   if (this->rainWindForce != 0)
    61   {
     47RainEffect::RainEffect(const TiXmlElement* root) {
     48    this->setClassID(CL_RAIN_EFFECT, "RainEffect");
     49
     50    this->init();
     51
     52    if (root != NULL)
     53        this->loadParams(root);
     54
     55    //load rain sound
     56    if (this->rainBuffer != NULL)
     57        ResourceManager::getInstance()->unload(this->rainBuffer);
     58    this->rainBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/rain.wav", WAV);
     59
     60    //load wind sound
     61    if (this->rainWindForce != 0) {
     62        if (this->windBuffer != NULL)
     63            ResourceManager::getInstance()->unload(this->windBuffer);
     64        this->windBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/wind.wav", WAV);
     65    }
     66
     67    if(rainActivate) {
     68        this->activate();
     69        RainEffect::rainParticles->precache((int)this->rainLife * 2);
     70    }
     71}
     72
     73/**
     74 * @brief standard deconstructor
     75 */
     76RainEffect::~RainEffect() {
     77    this->deactivate();
     78
     79    if (this->rainBuffer != NULL)
     80        ResourceManager::getInstance()->unload(this->rainBuffer);
     81
    6282    if (this->windBuffer != NULL)
    63       ResourceManager::getInstance()->unload(this->windBuffer);
    64     this->windBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/wind.wav", WAV);
    65   }
    66 
    67   if(rainActivate)
    68   {
    69     this->activate();
    70     RainEffect::rainParticles->precache((int)this->rainLife * 2);
    71   }
    72 }
    73 
    74 /**
    75  * @brief standard deconstructor
    76  */
    77 RainEffect::~RainEffect()
    78 {
    79   this->deactivate();
    80 
    81   if (this->rainBuffer != NULL)
    82     ResourceManager::getInstance()->unload(this->rainBuffer);
    83 
    84   if (this->windBuffer != NULL)
    85     ResourceManager::getInstance()->unload(this->windBuffer);
     83        ResourceManager::getInstance()->unload(this->windBuffer);
    8684}
    8785
     
    8987 * @brief initalizes the rain effect with default values
    9088 */
    91 void RainEffect::init()
    92 {
    93   //Default values
    94   this->rainActivate = false;
    95   this->rainMove = false;
    96   this->rainCoord = Vector(500, 500, 500);
    97   this->rainSize = Vector2D(1000, 1000);
    98   this->rainRate = 4000;
    99   this->rainVelocity = -300;
    100   this->rainLife = 4;
    101   this->rainWindForce  = 0;
    102   this->rainFadeInDuration = 0;
    103   this->rainFadeOutDuration = 0;
    104  
    105   this->cloudColor = Vector(0.6f, 0.6f, 0.6f);
    106   this->skyColor = Vector(0.0f, 0.0f, 0.0f);
    107 
    108   this->rainMaxParticles = this->rainRate * this->rainLife;
    109   this->localTimer = 0;
    110   this->soundRainVolume = 0.3f;
    111   this->emitter = new PlaneEmitter(this->rainSize);
    112 
    113   lightMan = LightManager::getInstance();
    114   this->rainAmbient = lightMan->getAmbientColor();
     89void RainEffect::init() {
     90    //Default values
     91    this->rainActivate = false;
     92    this->rainFadeInActivate = false;
     93    this->rainFadeOutActivate = false;
     94
     95    this->rainMove = false;
     96    this->rainCoord = Vector(500, 500, 500);
     97    this->rainSize = Vector2D(1000, 1000);
     98    this->rainRate = 4000;
     99    this->rainVelocity = -300;
     100    this->rainLife = 4;
     101    this->rainWindForce = 0;
     102    this->rainFadeInDuration = 10;
     103    this->rainFadeOutDuration = 10;
     104
     105    this->cloudColor = Vector(0.6f, 0.6f, 0.6f);
     106    this->skyColor = Vector(0.0f, 0.0f, 0.0f);
     107
     108    this->rainMaxParticles = this->rainRate * this->rainLife;
     109    this->localTimer = 0;
     110    this->soundRainVolume = 0.3f;
     111    this->emitter = new PlaneEmitter(this->rainSize);
     112
    115113}
    116114
     
    119117 * @param root: the XML-Element to load the data from
    120118 */
    121 void RainEffect::loadParams(const TiXmlElement* root)
    122 {
    123   WeatherEffect::loadParams(root);
    124 
    125   LoadParam(root, "coord", this, RainEffect, setRainCoord);
    126   LoadParam(root, "size", this, RainEffect, setRainSize);
    127   LoadParam(root, "rate", this, RainEffect, setRainRate);
    128   LoadParam(root, "velocity", this, RainEffect, setRainVelocity);
    129   LoadParam(root, "life", this, RainEffect, setRainLife);
    130   LoadParam(root, "wind", this, RainEffect, setRainWind);
    131   LoadParam(root, "fadeinduration", this, RainEffect, setRainFadeIn);
    132   LoadParam(root, "fadeoutduration", this, RainEffect, setRainFadeOut);
    133   LoadParam(root, "cloudcolor", this, RainEffect, setCloudColor);
    134   LoadParam(root, "skycolor", this, RainEffect, setSkyColor);
    135 
    136   LOAD_PARAM_START_CYCLE(root, element);
    137   {
    138     LoadParam_CYCLE(element, "option", this, RainEffect, setRainOption);
    139   }
    140   LOAD_PARAM_END_CYCLE(element);
     119void RainEffect::loadParams(const TiXmlElement* root) {
     120    WeatherEffect::loadParams(root);
     121
     122    LoadParam(root, "coord", this, RainEffect, setRainCoord);
     123    LoadParam(root, "size", this, RainEffect, setRainSize);
     124    LoadParam(root, "rate", this, RainEffect, setRainRate);
     125    LoadParam(root, "velocity", this, RainEffect, setRainVelocity);
     126    LoadParam(root, "life", this, RainEffect, setRainLife);
     127    LoadParam(root, "wind", this, RainEffect, setRainWind);
     128    LoadParam(root, "fadeinduration", this, RainEffect, setRainFadeIn);
     129    LoadParam(root, "fadeoutduration", this, RainEffect, setRainFadeOut);
     130    LoadParam(root, "cloudcolor", this, RainEffect, setCloudColor);
     131    LoadParam(root, "skycolor", this, RainEffect, setSkyColor);
     132
     133    LOAD_PARAM_START_CYCLE(root, element);
     134    {
     135        LoadParam_CYCLE(element, "option", this, RainEffect, setRainOption);
     136    }
     137    LOAD_PARAM_END_CYCLE(element);
    141138}
    142139
     
    146143 * @brief activates the rain effect
    147144 */
    148 void RainEffect::activate()
    149 {
    150   PRINTF(0)( "Activating RainEffect, coord: %f, %f, %f, size: %f, %f, rate: %f, velocity: %f, moveRain: %s\n", this->rainCoord.x, this->rainCoord.y, this->rainCoord.z, this->rainSize.x, this-> rainSize.y, this->rainRate, this->rainVelocity, this->rainMove ? "true" : "false" );
    151 
    152   this->rainActivate = true;
    153 
    154   if (unlikely(RainEffect::rainParticles == NULL))
    155   {
    156     RainEffect::rainParticles = new SparkParticles((int) this->rainMaxParticles);
    157     RainEffect::rainParticles->setName("RainParticles");
    158     RainEffect::rainParticles->setLifeSpan(this->rainLife, 2);
    159     RainEffect::rainParticles->setRadius(0, 0.03);
    160     RainEffect::rainParticles->setRadius(0.2, 0.02);
    161     RainEffect::rainParticles->setRadius(1, 0.01);
    162     RainEffect::rainParticles->setColor(0, 0.3, 0.3, 0.5, 0.2); // grey blue 1
    163     RainEffect::rainParticles->setColor(0.5, 0.4, 0.4, 0.5, 0.2); // grey blue 2
    164     RainEffect::rainParticles->setColor(1, 0.7, 0.7, 0.7, 0.2); // light grey
    165   }
    166 
    167   this->emitter->setSystem(RainEffect::rainParticles);
    168 
    169   this->emitter->setRelCoor(this->rainCoord);
    170 
    171   this->emitter->setEmissionRate(this->rainRate);
    172   this->emitter->setEmissionVelocity(this->rainVelocity);
    173 
    174   this->emitter->setSpread(this->rainWindForce / 50, 0.2);
    175 
    176   // plays the rain sound and loops it
    177   this->soundSource.play(this->rainBuffer, this->soundRainVolume, true);
    178 
    179   // if there is wind, play the wind sound
    180   if (this->rainWindForce != 0)
    181     this->soundSource.play(this->windBuffer, 0.1f * this->rainWindForce, true);
    182  
    183   // Change the cloudcolor,skycolor
    184   this->oldCloudColor = CloudEffect::cloudColor;
    185   this->oldSkyColor = CloudEffect::skyColor;
    186   CloudEffect::changeCloudColor(this->cloudColor, this->rainFadeInDuration);
    187   CloudEffect::changeSkyColor(this->skyColor, this->rainFadeInDuration);
     145void RainEffect::activate() {
     146    PRINTF(3)( "Activating RainEffect, coord: %f, %f, %f, size: %f, %f, rate: %f, velocity: %f, moveRain: %s\n", this->rainCoord.x, this->rainCoord.y, this->rainCoord.z, this->rainSize.x, this-> rainSize.y, this->rainRate, this->rainVelocity, this->rainMove ? "true" : "false" );
     147
     148    this->rainActivate = true;
     149
     150    if (unlikely(RainEffect::rainParticles == NULL)) {
     151        RainEffect::rainParticles = new SparkParticles((int) this->rainMaxParticles);
     152        RainEffect::rainParticles->setName("RainParticles");
     153        RainEffect::rainParticles->setLifeSpan(this->rainLife, 2);
     154        RainEffect::rainParticles->setRadius(0, 0.03);
     155        RainEffect::rainParticles->setRadius(0.2, 0.02);
     156        RainEffect::rainParticles->setRadius(1, 0.01);
     157        RainEffect::rainParticles->setColor(0, 0.3, 0.3, 0.5, 0.2);   // grey blue 1
     158        RainEffect::rainParticles->setColor(0.5, 0.4, 0.4, 0.5, 0.2); // grey blue 2
     159        RainEffect::rainParticles->setColor(1, 0.7, 0.7, 0.7, 0.2);   // light grey
     160    }
     161
     162    this->emitter->setSystem(RainEffect::rainParticles);
     163    this->emitter->setRelCoor(this->rainCoord);
     164    this->emitter->setEmissionRate(this->rainRate);
     165    this->emitter->setEmissionVelocity(this->rainVelocity);
     166    this->emitter->setSpread(this->rainWindForce / 50, 0.2);
     167
     168    // play rain sound and loop it
     169    this->soundSource.play(this->rainBuffer, this->soundRainVolume, true);
     170
     171    // if there's wind, play wind sound
     172    if (this->rainWindForce > 0)
     173        this->soundSource.play(this->windBuffer, 0.1f * this->rainWindForce, true);
     174
     175    // Store cloud- and sky color before the rain;
     176    this->oldCloudColor = CloudEffect::cloudColor;
     177    this->oldSkyColor   = CloudEffect::skyColor;
     178
     179    // If we're not fading, change color immediately
     180    if (!this->rainFadeInActivate || !this->rainFadeOutActivate) {
     181        CloudEffect::changeCloudColor(this->cloudColor, 0);
     182        CloudEffect::changeSkyColor(this->skyColor, 0);
     183    }
    188184}
    189185
     
    191187 * @brief deactivates the rain effect
    192188 */
    193 void RainEffect::deactivate()
    194 {
    195   PRINTF(0)("Deactivating RainEffect\n");
    196 
    197   this->rainActivate = false;
    198   this->emitter->setSystem(NULL);
    199 
    200   // Stop Sound
    201   this->soundSource.stop();
    202 
    203   // Restore Light Ambient
    204   lightMan->setAmbientColor(this->rainAmbient, this->rainAmbient, this->rainAmbient);
    205  
    206   CloudEffect::changeCloudColor(this->oldCloudColor, this->rainFadeOutDuration);
    207   CloudEffect::changeSkyColor(this->oldSkyColor, this->rainFadeOutDuration);
     189void RainEffect::deactivate() {
     190    PRINTF(3)("Deactivating RainEffect\n");
     191
     192    this->rainActivate = false;
     193    this->rainFadeInActivate = false;
     194    this->rainFadeOutActivate = false;
     195
     196    this->emitter->setSystem(NULL);
     197
     198    // Stop Sound
     199    this->soundSource.stop();
     200
     201    // Restore the old cloud- and sky color
     202    CloudEffect::changeCloudColor(this->oldCloudColor, 0);
     203    CloudEffect::changeSkyColor(this->oldSkyColor, 0);
    208204}
    209205
     
    212208 * @param dt: tick float
    213209 */
    214 void RainEffect::tick (float dt)
    215 {
    216   if (!this->rainActivate)
    217     return;
    218 
    219   if (this->rainMove)
    220   {
    221     this->rainCoord = State::getCameraNode()->getAbsCoor();
    222     this->emitter->setRelCoor(this->rainCoord.x , this->rainCoord.y+800, this->rainCoord.z);
    223   }
    224 
    225   if (this->rainFadeInDuration != 0 && this->localTimer < this->rainFadeInDuration)
    226   {
    227     this->localTimer += dt;
    228     float progress = this->localTimer / this->rainFadeInDuration;
    229 
    230     // Dim Light
    231     lightMan->setAmbientColor(1 - progress * 0.9, 1 - progress * 0.9, 1 - progress * 0.9);
    232 
    233     // use alpha in color to fade in
    234     RainEffect::rainParticles->setColor(0,   0.3, 0.3, 0.5, 0.2 * progress); // grey blue 1
    235     RainEffect::rainParticles->setColor(0.5, 0.4, 0.4, 0.5, 0.2 * progress); // grey blue 2
    236     RainEffect::rainParticles->setColor(1,   0.7, 0.7, 0.7, 0.2 * progress); // light grey
    237 
    238     // increase radius for more "heavy" rain
    239     RainEffect::rainParticles->setRadius(0, 0.03 * progress);
    240     RainEffect::rainParticles->setRadius(0.2, 0.02 * progress);
    241     RainEffect::rainParticles->setRadius(1, 0.01 * progress);
    242 
    243     // increase sound volume
    244     if (!this->soundSource.isPlaying())
    245       this->soundSource.play(this->rainBuffer, this->soundRainVolume, true);
    246 
    247     this->soundSource.gain(this->rainBuffer, this->soundRainVolume * progress);
    248   }
    249   else if ( this->rainFadeOutDuration != 0 )
    250   {
    251     if ( this->localTimer < this->rainFadeOutDuration )
    252     {
    253       this->localTimer += dt;
    254       float progress = 1 - (this->localTimer / this->rainFadeOutDuration);
    255 
    256       // Fade In Light
    257       lightMan->setAmbientColor(1 - progress * 0.9, 1 - progress * 0.9, 1 - progress * 0.9);
    258 
    259       // use alpha in color to fade out
    260       RainEffect::rainParticles->setColor(0,   0.3, 0.3, 0.5, 0.2 * progress); // grey blue 1
    261       RainEffect::rainParticles->setColor(0.5, 0.4, 0.4, 0.5, 0.2 * progress); // grey blue 2
    262       RainEffect::rainParticles->setColor(1,   0.7, 0.7, 0.7, 0.2 * progress); // light grey
    263 
    264       // decrease radius
    265       RainEffect::rainParticles->setRadius(0, 0.03 * progress);
    266       RainEffect::rainParticles->setRadius(0.2, 0.02 * progress);
    267       RainEffect::rainParticles->setRadius(1, 0.01 * progress);
    268 
    269       // decrease sound volume
    270       if (!this->soundSource.isPlaying())
    271         this->soundSource.play(this->rainBuffer, this->soundRainVolume, true);
    272 
    273       this->soundSource.gain(this->rainBuffer, this->soundRainVolume * progress);
    274     }
    275     else
    276       this->deactivate();
    277   }
     210void RainEffect::tick (float dt) {
     211    if (!this->rainActivate)
     212        return;
     213
     214    if (this->rainMove) {
     215        this->rainCoord = State::getCameraNode()->getAbsCoor();
     216        this->emitter->setRelCoor(this->rainCoord.x , this->rainCoord.y+800, this->rainCoord.z);
     217    }
     218
     219    if (this->rainFadeInActivate) {
     220        PRINTF(4)("tick fading IN RainEffect\n");
     221
     222        this->localTimer += dt;
     223        float progress = this->localTimer / this->rainFadeInDuration;
     224
     225        // use alpha in color to fade in rain
     226        RainEffect::rainParticles->setColor(0,   0.3, 0.3, 0.5, 0.2 * progress); // grey blue 1
     227        RainEffect::rainParticles->setColor(0.5, 0.4, 0.4, 0.5, 0.2 * progress); // grey blue 2
     228        RainEffect::rainParticles->setColor(1,   0.7, 0.7, 0.7, 0.2 * progress); // light grey
     229
     230        // increase radius for more "heavy" rain
     231        RainEffect::rainParticles->setRadius(0, 0.03 * progress);
     232        RainEffect::rainParticles->setRadius(0.2, 0.02 * progress);
     233        RainEffect::rainParticles->setRadius(1, 0.01 * progress);
     234
     235        // increase sound volume
     236        if (!this->soundSource.isPlaying())
     237            this->soundSource.play(this->rainBuffer, this->soundRainVolume, true);
     238        this->soundSource.gain(this->rainBuffer, this->soundRainVolume * progress);
     239
     240        if (progress >= 1)
     241            this->rainFadeInActivate = false;
     242    }
     243
     244    if (this->rainFadeOutActivate) {
     245        PRINTF(4)("tick fading OUT RainEffect\n");
     246
     247        this->localTimer += dt;
     248        float progress = 1 - (this->localTimer / this->rainFadeOutDuration);
     249
     250        // use alpha in color to fade out
     251        RainEffect::rainParticles->setColor(0,   0.3, 0.3, 0.5, 0.2 * progress); // grey blue 1
     252        RainEffect::rainParticles->setColor(0.5, 0.4, 0.4, 0.5, 0.2 * progress); // grey blue 2
     253        RainEffect::rainParticles->setColor(1,   0.7, 0.7, 0.7, 0.2 * progress); // light grey
     254
     255        // decrease radius
     256        RainEffect::rainParticles->setRadius(0, 0.03 * progress);
     257        RainEffect::rainParticles->setRadius(0.2, 0.02 * progress);
     258        RainEffect::rainParticles->setRadius(1, 0.01 * progress);
     259
     260        // decrease sound volume
     261        if (!this->soundSource.isPlaying())
     262            this->soundSource.play(this->rainBuffer, this->soundRainVolume, true);
     263        this->soundSource.gain(this->rainBuffer, this->soundRainVolume * progress);
     264
     265        if (progress <= 0) {
     266            PRINTF(4)("tick fading OUT RainEffect COMPLETED! Deactivating...\n");
     267            this->rainFadeOutActivate = false;
     268            this->deactivate();
     269        }
     270    }
    278271}
    279272
     
    281274 * @brief starts raining slowly
    282275*/
    283 void RainEffect::startRaining()
    284 {
    285 
    286   if (this->rainActivate)
    287     this->deactivate();
    288 
    289   if (!this->rainFadeInDuration > 0)
    290     this->rainFadeInDuration = 10;
    291 
    292   this->localTimer = 0;
    293 
    294   this->activate();
     276void RainEffect::startRaining() {
     277    PRINTF(4)("startRaining function;\n");
     278
     279    // If it is already raining, do nothing
     280    if (this->rainActivate)
     281        return;
     282
     283    this->localTimer = 0;
     284    this->rainFadeInActivate = true;
     285
     286    PRINTF(4)("startRaining function complete; fadedur: %f\n", this->rainFadeInDuration);
     287    this->activate();
     288
     289    CloudEffect::changeCloudColor(this->cloudColor, this->rainFadeInDuration);
     290    CloudEffect::changeSkyColor(this->skyColor, this->rainFadeInDuration);
    295291}
    296292
     
    298294 * @brief stops raining slowly
    299295 */
    300 void RainEffect::stopRaining()
    301 {
    302 
    303   if (!this->rainActivate)
    304     this->activate();
    305 
    306   if (!this->rainFadeOutDuration > 0)
    307     this->rainFadeOutDuration = 10;
    308 
    309   this->localTimer = 0;
     296void RainEffect::stopRaining() {
     297    PRINTF(4)("stopRaining function;\n");
     298
     299    // If it is not raining, do nothing
     300    if (!this->rainActivate)
     301        return;
     302
     303    this->localTimer = 0;
     304    this->rainFadeOutActivate = true;
     305
     306    PRINTF(4)("stopRaining function completed; fadedur: %f\n", this->rainFadeOutDuration);
     307
     308    CloudEffect::changeCloudColor(this->oldCloudColor, this->rainFadeOutDuration);
     309    CloudEffect::changeSkyColor(this->oldSkyColor, this->rainFadeOutDuration);
    310310}
    311311
     
    313313 * @brief hides the rain
    314314 */
    315 void RainEffect::hideRain()
    316 {
    317   RainEffect::rainParticles->setColor(0, 0,0,0, 0);
    318   RainEffect::rainParticles->setColor(0, 0,0,0, 0);
    319 }
     315void RainEffect::hideRain() {
     316    RainEffect::rainParticles->setColor(0, 0,0,0, 0);
     317    RainEffect::rainParticles->setColor(0, 0,0,0, 0);
     318}
  • branches/mountain_lake/src/lib/graphics/effects/rain_effect.h

    r8793 r8905  
    8686    this->rainFadeOutDuration = fadeout;
    8787  }
    88  
     88
    8989  inline void setCloudColor(float colorX, float colorY, float colorZ)
    9090  {
     
    113113  GLfloat                     rainFadeInDuration;
    114114  GLfloat                     rainFadeOutDuration;
     115  bool                        rainFadeInActivate;
     116  bool                        rainFadeOutActivate;
    115117
    116118  Vector                      rainCoord;
     
    130132  float                       soundRainVolume;
    131133
    132   LightManager*               lightMan;
    133   GLfloat                     rainAmbient;
    134  
    135134  Vector oldSkyColor;
    136135  Vector oldCloudColor;
  • branches/mountain_lake/src/lib/graphics/effects/snow_effect.cc

    r8793 r8905  
    117117void SnowEffect::activate()
    118118{
    119         PRINTF(0)("Activating SnowEffect\n");
     119        PRINTF(3)("Activating SnowEffect\n");
    120120
    121121        this->snowActivate = true;
     
    149149void SnowEffect::deactivate()
    150150{
    151         PRINTF(0)("Deactivating SnowEffect\n");
     151        PRINTF(3)("Deactivating SnowEffect\n");
    152152
    153153        this->snowActivate = false;
  • branches/mountain_lake/src/lib/graphics/effects/volfog_effect.cc

    r8523 r8905  
    7474
    7575void VolFogEffect::init() {
    76     PRINTF(0)("Initalize VolFogEffect\n");
     76    PRINTF(3)("Initalize VolFogEffect\n");
    7777
    7878    // set fog mode
     
    108108
    109109    if (glewInit() == GLEW_OK)
    110         PRINTF(0)("glewInit OK\n");
     110        PRINTF(4)("glewInit OK\n");
    111111    else
    112         PRINTF(0)("glewInit failed\n");
     112        PRINTF(4)("glewInit failed\n");
    113113
    114114    if (glewGetExtension("GL_EXT_fog_coord"))
    115         PRINTF(0)("GL_EXT_fog_coord extension found\n");
     115        PRINTF(4)("GL_EXT_fog_coord extension found\n");
    116116}
    117117
    118118
    119119void VolFogEffect::activate() {
    120     PRINTF(0)("Activating VolFogEffect\n");
     120    PRINTF(3)("Activating VolFogEffect\n");
    121121}
    122122
    123123void VolFogEffect::deactivate() {
    124     PRINTF(0)("Deactivating VolFogEffect\n");
     124    PRINTF(3)("Deactivating VolFogEffect\n");
    125125
    126126    glDisable(GL_FOG);
Note: See TracChangeset for help on using the changeset viewer.