Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Apr 13, 2006, 10:41:48 PM (19 years ago)
Author:
bensch
Message:

merged back with:
svn merge . . -rHEAD:PREV

File:
1 edited

Legend:

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

    r7286 r7287  
    2828#include "util/loading/game_loader.h"
    2929
     30#include "p_node.h"
    3031#include "world_entity.h"
    3132#include "player.h"
    3233#include "camera.h"
    3334#include "environment.h"
     35#include "terrain.h"
     36#include "test_entity.h"
     37#include "terrain.h"
    3438#include "skybox.h"
    35 #include "terrain.h"
     39#include "md2Model.h"
     40#include "world_entities/projectiles/projectile.h"
     41#include "npcs/npc_test1.h"
    3642#include "playable.h"
    3743
     
    119125 * @param root reference to the xml root element
    120126 */
    121 ErrorMessage GameWorldData::loadData(const TiXmlElement* root)
     127ErrorMessage GameWorldData::loadData(TiXmlElement* root)
    122128{
    123129  // load the parameters
     
    153159 * @param root reference to the xml root element
    154160 */
    155 ErrorMessage GameWorldData::loadGUI(const TiXmlElement* root)
    156 {
    157   const TiXmlElement* element = root->FirstChildElement("LoadScreen");
     161ErrorMessage GameWorldData::loadGUI(TiXmlElement* root)
     162{
     163  TiXmlElement* element = root->FirstChildElement("LoadScreen");
    158164  if( element == NULL)
    159165  {
     
    186192 * @param root reference to the xml root parameter
    187193 */
    188 ErrorMessage GameWorldData::loadWorldEntities(const TiXmlElement* root)
    189 {
    190   const TiXmlElement* element = root->FirstChildElement("WorldEntities");
     194ErrorMessage GameWorldData::loadWorldEntities(TiXmlElement* root)
     195{
     196  TiXmlElement* element = root->FirstChildElement("WorldEntities");
    191197
    192198  if( element == NULL)
     
    204210      if( created != NULL )
    205211        PRINTF(4)("Created a %s: %s\n", created->getClassName(), created->getName());
    206       else
    207       {
    208         PRINTF(2)("Unable to create a %s\n", element->Value());
    209         element = element->NextSiblingElement();
    210         continue;
    211       }
    212212
    213213      //todo do this more elegant
     
    310310 * @param root reference to the xml root element
    311311 */
    312 ErrorMessage GameWorldData::loadScene(const TiXmlElement* root)
     312ErrorMessage GameWorldData::loadScene(TiXmlElement* root)
    313313{
    314314  LoadParamXML(root, "LightManager", LightManager::getInstance(), LightManager, loadParams);
     
    342342  delete PhysicsEngine::getInstance();
    343343
    344   this->setSoundTrack("");
    345 
     344  if (this->music != NULL)
     345    this->setSoundTrack("");
     346  this->music = NULL;
    346347  /* stop the sound eninge */
    347348  SoundEngine::getInstance()->flushAllBuffers();
     
    356357{
    357358  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;
    366361
    367362  if (!name.empty())
     
    369364    PRINTF(3)("Setting Sound Track to %s\n", name.c_str());
    370365    std::string oggFile = ResourceManager::getFullName(name);
    371     OggPlayer* newMusic = new OggPlayer(oggFile);
    372     this->music = newMusic;
     366    this->music = new OggPlayer(oggFile);
    373367
    374368    //(OggPlayer*)ResourceManager::getInstance()->load(name, OGG, RP_LEVEL);
Note: See TracChangeset for help on using the changeset viewer.