Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3898 in orxonox.OLD for orxonox/branches/sound_engine/src


Ignore:
Timestamp:
Apr 19, 2005, 8:31:01 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/sound_engine: sound works sloppy, test it

Location:
orxonox/branches/sound_engine/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/sound_engine/src/story_entities/world.cc

    r3870 r3898  
    3535#include "light.h"
    3636#include "text_engine.h"
     37#include "sound_engine.h"
    3738
    3839#include "track_manager.h"
     
    147148  cn->unbind(this->localPlayer);
    148149  cn->reset();
     150
     151  ResourceManager::getInstance()->unload(this->music);
    149152
    150153  ResourceManager::getInstance()->debug();
     
    271274      trackManager->finalize();
    272275
    273      
     276      this->music = (Sound*)ResourceManager::getInstance()->load("sound/orx.mp3", RESOURCE_SOUND_MUSIC, RP_LEVEL);
     277      this->music->play();
    274278      /*monitor progress*/
    275279      this->glmis->step();
  • orxonox/branches/sound_engine/src/story_entities/world.h

    r3851 r3898  
    2424class Terrain;
    2525class GarbageCollector;
    26 class Text;
     26class Sound;
    2727
    2828//! The game world Interface
     
    108108  LightManager* lightMan;             //!< The Lights of the Level
    109109  Terrain* terrain;                   //!< The Terrain of the World.
     110  Sound* music;                       //!< The Music to Play in the Level
    110111
    111112  GLuint objectList;                  //!< temporary: \todo this will be ereased soon
  • orxonox/branches/sound_engine/src/world_entities/test_gun.cc

    r3881 r3898  
    3232#include "animation3d.h"
    3333
     34#include "resource_manager.h"
     35#include "sound_engine.h"
     36
    3437using namespace std;
    3538
     
    7275      this->animation->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_LINEAR);
    7376    }
     77
     78  this->shootSound = (Sound*)ResourceManager::getInstance()->load("sound/explo.wav", RESOURCE_SOUND_EFFECT, RP_LEVEL);
    7479  /*
    7580  if( this->leftRight == 0)
     
    127132void TestGun::fire()
    128133{
     134  if (likely(this->shootSound != NULL))
     135    this->shootSound->play();
     136
    129137  if( !this->hasWeaponIdleTimeElapsed())
    130138    {
     
    144152 
    145153  this->animation->replay();
     154
    146155}
    147156
  • orxonox/branches/sound_engine/src/world_entities/weapon.cc

    r3881 r3898  
    207207  WorldInterface* wi = WorldInterface::getInstance();
    208208  this->worldEntities = wi->getEntityList();
     209
     210  this->shootSound = NULL;
    209211}
    210212
  • orxonox/branches/sound_engine/src/world_entities/weapon.h

    r3881 r3898  
    3838class Projectile;
    3939class Weapon;
     40class Sound;
    4041
    4142typedef enum {
     
    158159  float idleTime;
    159160  float slowDownFactor;
     161  Sound* shootSound;
    160162
    161163 private:
Note: See TracChangeset for help on using the changeset viewer.