Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4015 in orxonox.OLD


Ignore:
Timestamp:
May 2, 2005, 9:23:13 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: cleanup of world (moved some stuff into the preload sequence. still there is a lot to do there

Location:
orxonox/trunk/src/story_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.cc

    r4010 r4015  
    256256  AnimationPlayer::getInstance(); // initializes the animationPlayer
    257257
     258  this->localCamera = new Camera();
     259  this->localCamera->setName ("camera");
    258260}
    259261
     
    337339          //todo do this more elegant
    338340          if( element->Value() != NULL && !strcmp( element->Value(), "Player")) localPlayer = (Player*) created;
    339           if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox")) skyBox = (SkyBox*) created;
     341          if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox")) sky = (SkyBox*) created;
    340342          element = element->NextSiblingElement();
    341343        }
     
    360362 
    361363  // free the XML data
     364
    362365  delete XMLDoc;
    363  
    364   // finalize world
    365   // initialize Font
    366 //  testFont = new FontSet();
    367 //  testFont->buildFont("../data/pictures/font.tga");
    368  
    369   // create null parent
    370   this->nullParent = NullParent::getInstance ();
    371   this->nullParent->setName ("NullParent");
    372  
    373   // finalize myPlayer
    374   if( localPlayer == NULL)
    375     {
    376       PRINTF0("No Player specified in World '%s'\n", this->worldName);
    377       return (ErrorMessage){213,"No Player defined","World::load()"};
    378     }
     366  /* GENERIC LOADING PROCESS FINISHED */
    379367 
    380368  // bind input
     
    383371 
    384372  // bind camera
    385   this->localCamera = new Camera();
    386   this->localCamera->setName ("camera");
    387373  //this->localCamera->bind (localPlayer);
    388374  this->localPlayer->addChild (this->localCamera);
     
    450436
    451437     
    452   // LIGHT initialisation
    453   lightMan = LightManager::getInstance();
    454438  lightMan->setAmbientColor(.1,.1,.1);
    455439  lightMan->addLight();
     
    473457  trackManager->condition(2, LEFTRIGHT, this->localPlayer);
    474458 
     459  this->sky->setParent(this->localCamera);
    475460
    476461  // initialize debug coord system
     
    541526        this->glmis->step();
    542527
    543         // Create SkySphere
    544         //          this->skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
    545         //          this->skySphere->setName("SkySphere");
    546         //          this->localCamera->addChild(this->skySphere);
    547         //          this->spawn(this->skySphere);
    548         skyBox = new SkyBox();
    549         skyBox->setTexture("pictures/sky/skybox", "jpg");
    550         skyBox->setParent(localCamera);
    551         this->spawn(skyBox);
     528        sky = new SkyBox();
     529        //      (SkyBox*)(sky)->setTexture("pictures/sky/skybox", "jpg");
     530        sky->setParent(localCamera);
     531        this->spawn(sky);
    552532
    553533        /*monitor progress*/
     
    610590
    611591        // Create SkySphere
    612         skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
    613         this->localPlayer->addChild(this->skySphere);
    614         this->spawn(this->skySphere);
     592        sky = new Skysphere("../data/pictures/sky-replace.jpg");
     593        this->localPlayer->addChild(this->sky);
     594        this->spawn(this->sky);
    615595        Vector* es = new Vector (20, 0, 0);
    616596        Quaternion* qs = new Quaternion ();
     
    655635
    656636        // Create SkySphere
    657         this->skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
    658         this->skySphere->setName("SkySphere");
    659         this->spawn(this->skySphere);
    660         this->localCamera->addChild(this->skySphere);
    661         this->skySphere->setMode(PNODE_MOVEMENT);
     637        this->sky = new Skysphere("../data/pictures/sky-replace.jpg");
     638        this->sky->setName("SkySphere");
     639        this->spawn(this->sky);
     640        this->localCamera->addChild(this->sky);
     641        this->sky->setMode(PNODE_MOVEMENT);
    662642        /*monitor progress*/
    663643        this->glmis->step();
  • orxonox/trunk/src/story_entities/world.h

    r4010 r4015  
    1919class PNode;
    2020class GLMenuImageScreen;
    21 class Skysphere;
    22 class SkyBox;
    2321class LightManager;
    2422class Terrain;
     
    110108  TrackManager* trackManager;         //!< The reference of the TrackManager that handles the course through the Level.
    111109  Camera* localCamera;                //!< The current Camera
    112   Skysphere* skySphere;               //!< The Environmental Heaven of orxonox \todo insert this to environment insted
    113   SkyBox* skyBox;
     110  WorldEntity* sky;                   //!< The Environmental Heaven of orxonox \todo insert this to environment insted
    114111  LightManager* lightMan;             //!< The Lights of the Level
    115112  Terrain* terrain;                   //!< The Terrain of the World.
Note: See TracChangeset for help on using the changeset viewer.