Changeset 7287 in orxonox.OLD for trunk/src/story_entities/game_world_data.cc
- Timestamp:
- Apr 13, 2006, 10:41:48 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/game_world_data.cc
r7286 r7287 28 28 #include "util/loading/game_loader.h" 29 29 30 #include "p_node.h" 30 31 #include "world_entity.h" 31 32 #include "player.h" 32 33 #include "camera.h" 33 34 #include "environment.h" 35 #include "terrain.h" 36 #include "test_entity.h" 37 #include "terrain.h" 34 38 #include "skybox.h" 35 #include "terrain.h" 39 #include "md2Model.h" 40 #include "world_entities/projectiles/projectile.h" 41 #include "npcs/npc_test1.h" 36 42 #include "playable.h" 37 43 … … 119 125 * @param root reference to the xml root element 120 126 */ 121 ErrorMessage GameWorldData::loadData( constTiXmlElement* root)127 ErrorMessage GameWorldData::loadData(TiXmlElement* root) 122 128 { 123 129 // load the parameters … … 153 159 * @param root reference to the xml root element 154 160 */ 155 ErrorMessage GameWorldData::loadGUI( constTiXmlElement* root)156 { 157 constTiXmlElement* element = root->FirstChildElement("LoadScreen");161 ErrorMessage GameWorldData::loadGUI(TiXmlElement* root) 162 { 163 TiXmlElement* element = root->FirstChildElement("LoadScreen"); 158 164 if( element == NULL) 159 165 { … … 186 192 * @param root reference to the xml root parameter 187 193 */ 188 ErrorMessage GameWorldData::loadWorldEntities( constTiXmlElement* root)189 { 190 constTiXmlElement* element = root->FirstChildElement("WorldEntities");194 ErrorMessage GameWorldData::loadWorldEntities(TiXmlElement* root) 195 { 196 TiXmlElement* element = root->FirstChildElement("WorldEntities"); 191 197 192 198 if( element == NULL) … … 204 210 if( created != NULL ) 205 211 PRINTF(4)("Created a %s: %s\n", created->getClassName(), created->getName()); 206 else207 {208 PRINTF(2)("Unable to create a %s\n", element->Value());209 element = element->NextSiblingElement();210 continue;211 }212 212 213 213 //todo do this more elegant … … 310 310 * @param root reference to the xml root element 311 311 */ 312 ErrorMessage GameWorldData::loadScene( constTiXmlElement* root)312 ErrorMessage GameWorldData::loadScene(TiXmlElement* root) 313 313 { 314 314 LoadParamXML(root, "LightManager", LightManager::getInstance(), LightManager, loadParams); … … 342 342 delete PhysicsEngine::getInstance(); 343 343 344 this->setSoundTrack(""); 345 344 if (this->music != NULL) 345 this->setSoundTrack(""); 346 this->music = NULL; 346 347 /* stop the sound eninge */ 347 348 SoundEngine::getInstance()->flushAllBuffers(); … … 356 357 { 357 358 if (this->music != NULL) 358 { 359 OggPlayer* oldMusic = this->music; 360 this->music = NULL; 361 delete oldMusic; 362 } 363 364 365 PRINTF(0)("Setting Sound Track to %s\n", name.c_str()); 359 delete this->music; 360 this->music = NULL; 366 361 367 362 if (!name.empty()) … … 369 364 PRINTF(3)("Setting Sound Track to %s\n", name.c_str()); 370 365 std::string oggFile = ResourceManager::getFullName(name); 371 OggPlayer* newMusic = new OggPlayer(oggFile); 372 this->music = newMusic; 366 this->music = new OggPlayer(oggFile); 373 367 374 368 //(OggPlayer*)ResourceManager::getInstance()->load(name, OGG, RP_LEVEL);
Note: See TracChangeset
for help on using the changeset viewer.