Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 24, 2006, 3:21:12 PM (18 years ago)
Author:
bensch
Message:

orxonox/new_class_id: SoundSource completely added as a Resource

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/world_entities/weather_effects/rain_effect.cc

    r9760 r9805  
    1919#include "util/loading/load_param.h"
    2020#include "util/loading/factory.h"
    21 #include "util/loading/resource_manager.h"
     21#include "sound/resource_sound_buffer.h"
    2222
    2323#include "glincl.h"
     
    6464
    6565    //load rain sound
    66     if (this->rainBuffer != NULL)
    67         ResourceManager::getInstance()->unload(this->rainBuffer);
    68     this->rainBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/rain.wav", WAV);
     66    this->rainBuffer = OrxSound::ResourceSoundBuffer("sound/atmosphere/rain.wav");
    6967
    7068    //load wind sound
    7169    if (this->rainWindForce != 0) {
    72         if (this->windBuffer != NULL)
    73             ResourceManager::getInstance()->unload(this->windBuffer);
    74         this->windBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/wind.wav", WAV);
     70      this->windBuffer = OrxSound::ResourceSoundBuffer("sound/atmosphere/wind.wav");
    7571    }
    7672
     
    8682RainEffect::~RainEffect() {
    8783    this->deactivate();
    88 
    89     if (this->rainBuffer != NULL)
    90         ResourceManager::getInstance()->unload(this->rainBuffer);
    91 
    92     if (this->windBuffer != NULL)
    93         ResourceManager::getInstance()->unload(this->windBuffer);
    9484}
    9585
     
    10191    this->rainParticles = NULL;
    10292    this->emitter = NULL;
    103     this->rainBuffer = NULL;
    104     this->windBuffer = NULL;
    10593    this->lightMan = NULL;
    10694
Note: See TracChangeset for help on using the changeset viewer.