Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4010 in orxonox.OLD for orxonox/trunk/src/world_entities/skybox.cc


Ignore:
Timestamp:
May 2, 2005, 3:14:57 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the levelloader from lltrunktemp to the trunk. Big thanks to fuzzy to make this so easy for us, and for implementing it in the first place.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/skybox.cc

    r3913 r4010  
    2828
    2929#include "skybox.h"
     30
    3031#include "stdincl.h"
     32#include "factory.h"
    3133
    3234#include "material.h"
     
    3638//#include "world_entity.h"
    3739
     40CREATE_FACTORY(SkyBox);
    3841
    3942using namespace std;
     
    4447*/
    4548SkyBox::SkyBox(char* fileName)
     49{
     50  this->init();
     51}
     52
     53SkyBox::SkyBox(TiXmlElement* root) : WorldEntity(root)
     54{
     55  this->init();
     56
     57  // Name Setup
     58  char* temp;
     59  const char* string;
     60
     61  // Model Loading     
     62  this->model = NULL;
     63  string = grabParameter( root, "materialset");
     64  if( string != NULL)
     65    this->setTexture(string, "jpg");
     66  else
     67    {
     68      PRINTF(0)("SkyBox is missing a proper 'MaterialSet'\n");
     69      this->model = (Model*)ResourceManager::getInstance()->load("cube", OBJ, RP_CAMPAIGN);
     70    }
     71  if( this->model == NULL)
     72    {
     73      PRINTF(0)("SkyBox model '%s' could not be loaded\n", string);
     74    }
     75}
     76
     77void SkyBox::init(void)
    4678{
    4779  this->setClassName("SkyBox");
Note: See TracChangeset for help on using the changeset viewer.