Changeset 7221 in orxonox.OLD for trunk/src/story_entities/game_world_data.cc
- Timestamp:
- Mar 15, 2006, 3:10:45 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/game_world_data.cc
r7193 r7221 129 129 // load the parameters 130 130 // name 131 const char*string = grabParameter( root, "name");132 if( string == NULL)131 std::string string = grabParameter( root, "name"); 132 if( string.empty() ) 133 133 { 134 134 PRINTF(2)("GameWorld is missing a proper 'name'\n"); … … 136 136 } 137 137 else 138 this->setName(string );138 this->setName(string.c_str()); 139 139 140 140 this->loadGUI(root); … … 343 343 344 344 if (this->music != NULL) 345 this->setSoundTrack( NULL);345 this->setSoundTrack(""); 346 346 this->music = NULL; 347 347 /* stop the sound eninge */ … … 354 354 355 355 356 void GameWorldData::setSoundTrack(const char*name)356 void GameWorldData::setSoundTrack(const std::string& name) 357 357 { 358 358 if (this->music != NULL) … … 360 360 this->music = NULL; 361 361 362 if ( name != NULL)363 { 364 PRINTF(3)("Setting Sound Track to %s\n", name );365 char* oggFile = ResourceManager::getFullName(name); /// FIXME362 if (!name.empty()) 363 { 364 PRINTF(3)("Setting Sound Track to %s\n", name.c_str()); 365 std::string oggFile = ResourceManager::getFullName(name); 366 366 this->music = new OggPlayer(oggFile); 367 delete[] oggFile;368 367 369 368 //(OggPlayer*)ResourceManager::getInstance()->load(name, OGG, RP_LEVEL);
Note: See TracChangeset
for help on using the changeset viewer.