Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4240 in orxonox.OLD for orxonox


Ignore:
Timestamp:
May 20, 2005, 3:12:51 AM (19 years ago)
Author:
bensch
Message:

orxonox/branches/levelLoader: SkyBox loadable in the new Style

Location:
orxonox/branches/levelLoader/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelLoader/src/factory.h

    r4239 r4240  
    1010
    1111#include "tinyxml.h"
     12#include "load_param.h"
    1213#include "debug.h"
    1314
  • orxonox/branches/levelLoader/src/world_entities/skybox.cc

    r4136 r4240  
    5959
    6060  // Model Loading     
    61   string = grabParameter( root, "materialset");
    62   if( string != NULL)
    63     this->setTexture(string, "jpg");
    64   else
    65     {
    66       PRINTF(0)("SkyBox is missing a proper 'MaterialSet'\n");
    67     }
    68   if( this->skyModel == NULL)
    69     {
    70       PRINTF(0)("SkyBox model '%s' could not be loaded\n", string);
    71     }
     61  LoadParam<SkyBox>(root, "Materialset", this, &SkyBox::setTexture);
     62
    7263  this->postInit();
    7364}
  • orxonox/branches/levelLoader/src/world_entities/skybox.h

    r4136 r4240  
    3131
    3232  void setSize(float size);
     33  /** \brief assumes jpg as input-format */
     34  void setTexture(const char* name) { setTexture (name, "jpg");};
    3335  void setTexture(const char* name, const char* extension);
    3436  void setTextures(const char* top, const char* bottom, const char* left, const char* right, const char* front, const char* back);
  • orxonox/branches/levelLoader/src/world_entities/world_entity.cc

    r4239 r4240  
    6767void WorldEntity::loadModel(const char* fileName)
    6868{
     69  if (this->model)
     70    ResourceManager::getInstance()->unload(this->model, RP_LEVEL);
    6971  this->model = (Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN);
    7072}
Note: See TracChangeset for help on using the changeset viewer.