Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7460 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
May 1, 2006, 12:30:34 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: Namespaces for sound

Location:
trunk/src/world_entities
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/effects/lightning_bolt.cc

    r7193 r7460  
    6161  if (this->thunderBuffer != NULL)
    6262    ResourceManager::getInstance()->unload(this->thunderBuffer);
    63   this->thunderBuffer = (SoundBuffer*)ResourceManager::getInstance()->load("sound/thunder.wav", WAV);
     63  this->thunderBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/thunder.wav", WAV);
    6464}
    6565
  • trunk/src/world_entities/effects/lightning_bolt.h

    r7113 r7460  
    5050    float seedTime;
    5151
    52     SoundSource    soundSource;
    53     SoundBuffer*   thunderBuffer;
     52    OrxSound::SoundSource    soundSource;
     53    OrxSound::SoundBuffer*   thunderBuffer;
    5454};
    5555
  • trunk/src/world_entities/power_ups/power_up.cc

    r7221 r7460  
    8282  else if (!pickupSound.empty())
    8383  {
    84     this->pickupBuffer = (SoundBuffer*)ResourceManager::getInstance()->load(pickupSound, WAV);
     84    this->pickupBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load(pickupSound, WAV);
    8585    if (this->pickupBuffer != NULL)
    8686    {
     
    103103  else if (!respawnSound.empty())
    104104  {
    105     this->respawnBuffer = (SoundBuffer*)ResourceManager::getInstance()->load(respawnSound, WAV);
     105    this->respawnBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load(respawnSound, WAV);
    106106    if (this->respawnBuffer != NULL)
    107107    {
  • trunk/src/world_entities/power_ups/power_up.h

    r7221 r7460  
    4545
    4646private:
    47   SoundSource         soundSource;
    48   SoundBuffer*        pickupBuffer;
    49   SoundBuffer*        respawnBuffer;
    50   Material*           sphereMaterial;
    51   PowerUpRespawn      respawnType;
    52   float               respawnTime;
    53   float               respawnStart;
    54   static const char*  respawnTypes[];
     47  OrxSound::SoundSource  soundSource;
     48  OrxSound::SoundBuffer* pickupBuffer;
     49  OrxSound::SoundBuffer* respawnBuffer;
     50  Material*              sphereMaterial;
     51  PowerUpRespawn         respawnType;
     52  float                  respawnTime;
     53  float                  respawnStart;
     54  static const char*     respawnTypes[];
    5555
    56   WorldEntity*        collider;
     56  WorldEntity*           collider;
    5757};
    5858
  • trunk/src/world_entities/projectiles/projectile.cc

    r7221 r7460  
    6868  else if (!explosionSound.empty())
    6969  {
    70     this->explosionBuffer = (SoundBuffer*)ResourceManager::getInstance()->load(explosionSound, WAV);
     70    this->explosionBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load(explosionSound, WAV);
    7171    if (this->explosionBuffer != NULL)
    7272    {
     
    9090  else if (!engineSound.empty())
    9191  {
    92     this->engineBuffer = (SoundBuffer*)ResourceManager::getInstance()->load(engineSound, WAV);
     92    this->engineBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load(engineSound, WAV);
    9393    if (this->engineBuffer != NULL)
    9494    {
  • trunk/src/world_entities/projectiles/projectile.h

    r7221 r7460  
    5252  protected:
    5353    // energy
    54     float                 energyMin;                 //!< The minimal Energy a Projectile needs to be emitted.
    55     bool                  bChargeable;               //!< if the Projectile is Charegeable
     54    float                  energyMin;                 //!< The minimal Energy a Projectile needs to be emitted.
     55    bool                   bChargeable;               //!< if the Projectile is Charegeable
    5656
    57     float                 lifeCycle;                 //!< The percentage of the Lifetime done [0-1]
    58     float                 lifeSpan;                  //!< The entire lifespan of the Shoot. in seconds
     57    float                  lifeCycle;                 //!< The percentage of the Lifetime done [0-1]
     58    float                  lifeSpan;                  //!< The entire lifespan of the Shoot. in seconds
    5959
    60     Vector                flightDirection;           //!< DOF direction in which the shoot flighs
     60    Vector                 flightDirection;           //!< DOF direction in which the shoot flighs
    6161
    62     Vector                velocity;                  //!< velocity of the projectile.
     62    Vector                 velocity;                  //!< velocity of the projectile.
    6363
    64     PNode*                target;                    //!< A target for guided Weapons.
     64    PNode*                 target;                    //!< A target for guided Weapons.
    6565
    66     SoundSource          soundSource;
     66    OrxSound::SoundSource  soundSource;
    6767  private:
    68     SoundBuffer*          explosionBuffer;
    69     SoundBuffer*          engineBuffer;
     68    OrxSound::SoundBuffer* explosionBuffer;
     69    OrxSound::SoundBuffer* engineBuffer;
    7070};
    7171
  • trunk/src/world_entities/weapons/weapon.cc

    r7350 r7460  
    107107    this->soundBuffers[i] = NULL;                  //< No Sounds
    108108
    109   this->soundSource = new SoundSource(this);       //< Every Weapon has exacty one SoundSource.
     109  this->soundSource = new OrxSound::SoundSource(this);       //< Every Weapon has exacty one SoundSource.
    110110  this->emissionPoint.setParent(this);             //< One EmissionPoint, that is a PNode connected to the weapon. You can set this to the exitting point of the Projectiles
    111111  this->emissionPoint.setName("EmissionPoint");
     
    263263  else if (!soundFile.empty())
    264264  {
    265     this->soundBuffers[action] = (SoundBuffer*)ResourceManager::getInstance()->load(soundFile, WAV);
     265    this->soundBuffers[action] = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load(soundFile, WAV);
    266266    if (this->soundBuffers[action] != NULL)
    267267    {
  • trunk/src/world_entities/weapons/weapon.h

    r7350 r7460  
    218218    // PHASES //
    219219    ////////////
    220     SoundSource*        soundSource;                      //!< A SoundSource to play sound from (this is connected to the PNode of the Weapon)
    221 
    222     WeaponState          currentState;                     //!< The State the weapon is in.
    223     WeaponAction         requestedAction;                  //!< An action to try to Engage after the currentState ends.
    224     float                stateDuration;                    //!< how long the state has taken until now.
    225     float                times[WS_STATE_COUNT];            //!< Times to stay in the different States @see WeaponState.
    226     Animation3D*         animation[WS_STATE_COUNT];        //!< Animations for all the States (you can say yourself on what part of the gun this animation acts).
    227     SoundBuffer*        soundBuffers[WA_ACTION_COUNT];    //!< SoundBuffers for all actions @see WeaponAction.
    228 
    229     PNode                emissionPoint;                   //!< The point, where the projectiles are emitted. (this is coppled with the Weapon by default)
    230 
    231     bool                 hideInactive;                    //!< Hides the Weapon if it is inactive
    232     bool                 chargeable;                      //!< if the Weapon is charcheable (if true, the weapon will charge before it fires.)
    233 
    234     ClassID              projectile;                      //!< the projectile used for this weapon (since they should be generated via macro and the FastFactory, only the ClassID must be known.)
    235     FastFactory*         projectileFactory;               //!< A factory, that produces and handles the projectiles.
     220    OrxSound::SoundSource* soundSource;                      //!< A SoundSource to play sound from (this is connected to the PNode of the Weapon)
     221
     222    WeaponState            currentState;                     //!< The State the weapon is in.
     223    WeaponAction           requestedAction;                  //!< An action to try to Engage after the currentState ends.
     224    float                  stateDuration;                    //!< how long the state has taken until now.
     225    float                  times[WS_STATE_COUNT];            //!< Times to stay in the different States @see WeaponState.
     226    Animation3D*           animation[WS_STATE_COUNT];        //!< Animations for all the States (you can say yourself on what part of the gun this animation acts).
     227    OrxSound::SoundBuffer* soundBuffers[WA_ACTION_COUNT];    //!< SoundBuffers for all actions @see WeaponAction.
     228
     229    PNode                  emissionPoint;                   //!< The point, where the projectiles are emitted. (this is coppled with the Weapon by default)
     230
     231    bool                   hideInactive;                    //!< Hides the Weapon if it is inactive
     232    bool                   chargeable;                      //!< if the Weapon is charcheable (if true, the weapon will charge before it fires.)
     233
     234    ClassID                projectile;                      //!< the projectile used for this weapon (since they should be generated via macro and the FastFactory, only the ClassID must be known.)
     235    FastFactory*           projectileFactory;               //!< A factory, that produces and handles the projectiles.
    236236  };
    237237
  • trunk/src/world_entities/world_entity.h

    r7370 r7460  
    1616
    1717// FORWARD DECLARATION
    18 class SoundBuffer;
    19 class SoundSource;
     18namespace OrxSound { class SoundBuffer; class SoundSource; }
    2019class BVTree;
    2120class Model;
Note: See TracChangeset for help on using the changeset viewer.