Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 6, 2009, 9:18:40 AM (15 years ago)
Author:
rgrieder
Message:

Removed hard coded sound in Level, Engine and PongBall and replaced SoundMainMenu with a simple SoundBase.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/items/Engine.cc

    r5801 r5892  
    3737#include "pickup/ModifierType.h"
    3838#include "tools/Shader.h"
    39 #include "sound/SoundBase.h"
    4039
    4140namespace orxonox
     
    6867        this->setConfigValues();
    6968        this->registerVariables();
    70 
    71         this->sound_ = NULL;
    7269    }
    7370
     
    8077            if (this->boostBlur_)
    8178                this->boostBlur_->destroy();
    82 
    83             if(this->sound_ != NULL)
    84                 delete this->sound_;
    8579        }
    8680    }
     
    10296        XMLPortParam(Engine, "accelerationleftright", setAccelerationLeftRight, setAccelerationLeftRight, xmlelement, mode);
    10397        XMLPortParam(Engine, "accelerationupdown",    setAccelerationUpDown,    setAccelerationUpDown,    xmlelement, mode);
    104 
    105         XMLPortParamLoadOnly(Engine, "sound", loadSound, xmlelement, mode);
    10698    }
    10799
     
    240232                this->boostBlur_ = 0;
    241233            }
    242 
    243             if(this->sound_ != NULL)
    244                 this->sound_->attachToEntity(ship);
    245234        }
    246235    }
     
    253242            return Vector3::ZERO;
    254243    }
    255 
    256     void Engine::loadSound(const std::string filename)
    257     {
    258         if(filename == "") return;
    259         else
    260         {
    261             if(this->sound_ == NULL)
    262             {
    263                 this->sound_ = new SoundBase(this->ship_);
    264             }
    265 
    266             this->sound_->loadFile(filename);
    267             this->sound_->play(true);
    268         }
    269     }
    270244}
Note: See TracChangeset for help on using the changeset viewer.