Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6827 in orxonox.OLD for trunk/src/story_entities


Ignore:
Timestamp:
Jan 29, 2006, 2:10:48 PM (18 years ago)
Author:
bensch
Message:

trunk: Music should be loadable

Location:
trunk/src/story_entities
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/game_world.cc

    r6780 r6827  
    366366  PNode::getNullParent()->updateNode (this->dtS);
    367367  SoundEngine::getInstance()->update();
    368   //music->update();
     368
     369  if (this->dataTank->music != NULL)
     370    this->dataTank->music->update();
    369371}
    370372
     
    435437
    436438  engine->draw();
    437 
    438   /* final draw command */
    439439}
    440440
  • trunk/src/story_entities/game_world_data.cc

    r6815 r6827  
    280280  LoadParamXML(root, "GraphicsEngine", GraphicsEngine::getInstance(), GraphicsEngine, loadParams);
    281281
     282  LoadParam(root, "Music", this, GameWorldData, setSoundTrack);
     283
    282284//  LoadParamXML(root, "ParticleEngine", ParticleEngine::getInstance(), ParticleEngine, loadParams);
    283285  //LoadParamXML(root, "PhysicsEngine", PhysicsEngine::getInstance(), PhysicsEngine, loadParams);
     
    311313void GameWorldData::setSoundTrack(const char* name)
    312314{
     315  if (this->music != NULL)
     316    delete this->music;
     317
    313318  PRINTF(3)("Setting Sound Track to %s\n", name);
    314319  this->music = (OggPlayer*)ResourceManager::getInstance()->load(name, OGG, RP_LEVEL);
  • trunk/src/story_entities/game_world_data.h

    r6634 r6827  
    5252    virtual ErrorMessage unloadScene();
    5353
    54 
    5554  public:
    5655    GLMenuImageScreen*  glmis;                       //!< The Level-Loader Display
Note: See TracChangeset for help on using the changeset viewer.