Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7221 in orxonox.OLD for trunk/src/story_entities/game_world_data.cc


Ignore:
Timestamp:
Mar 15, 2006, 3:10:45 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the std-branche back, it runs on windows and Linux

svn merge https://svn.orxonox.net/orxonox/branches/std . -r7202:HEAD

File:
1 edited

Legend:

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

    r7193 r7221  
    129129  // load the parameters
    130130  // name
    131   const char* string = grabParameter( root, "name");
    132   if( string == NULL)
     131  std::string string = grabParameter( root, "name");
     132  if( string.empty() )
    133133  {
    134134    PRINTF(2)("GameWorld is missing a proper 'name'\n");
     
    136136  }
    137137  else
    138     this->setName(string);
     138    this->setName(string.c_str());
    139139
    140140  this->loadGUI(root);
     
    343343
    344344  if (this->music != NULL)
    345     this->setSoundTrack(NULL);
     345    this->setSoundTrack("");
    346346  this->music = NULL;
    347347  /* stop the sound eninge */
     
    354354
    355355
    356 void GameWorldData::setSoundTrack(const char* name)
     356void GameWorldData::setSoundTrack(const std::string& name)
    357357{
    358358  if (this->music != NULL)
     
    360360  this->music = NULL;
    361361
    362   if (name != NULL)
    363   {
    364     PRINTF(3)("Setting Sound Track to %s\n", name);
    365     char* oggFile = ResourceManager::getFullName(name); /// FIXME
     362  if (!name.empty())
     363  {
     364    PRINTF(3)("Setting Sound Track to %s\n", name.c_str());
     365    std::string oggFile = ResourceManager::getFullName(name);
    366366    this->music = new OggPlayer(oggFile);
    367     delete[] oggFile;
    368367
    369368    //(OggPlayer*)ResourceManager::getInstance()->load(name, OGG, RP_LEVEL);
Note: See TracChangeset for help on using the changeset viewer.