Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 20, 2005, 2:44:10 AM (19 years ago)
Author:
bensch
Message:

orxonox/branches/levelLoader: factory not in stdincl anymore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelLoader/src/world_entities/world_entity.cc

    r4233 r4239  
    2323#include "vector.h"
    2424
    25 #include "load_param.h"
    26 
    2725using namespace std;
    2826
     
    4341WorldEntity::WorldEntity(TiXmlElement* root)
    4442{
     43  this->setClassName ("WorldEntity");
    4544  // Name Setup
    46   char* temp;
    47   const char* string;
    48   string = grabParameter( root, "name");
    49   if( string == NULL)
    50     {
    51       PRINTF(2)("WorldEntity is missing a proper 'name'\n");
    52       this->setName("unknown");
    53     }
    54   else
    55     {
    56       LoadParam<WorldEntity> (string, this, &WorldEntity::setName);
    57     }
     45  LoadParam<WorldEntity>(root, "name", this, &WorldEntity::setName);
    5846  // Model Loading     
    5947  this->model = NULL;
    60   string = grabParameter( root, "model");
    61   if( string != NULL)
    62     LoadParam<WorldEntity>(string, this, &WorldEntity::loadModel);
    63   else
    64     {
    65       PRINTF(2)("WorldEntity is missing a proper 'model'\n");
    66       this->model = NULL;
    67     }
    68   if( this->model == NULL)
    69     {
    70       PRINTF(2)("WorldEntity model '%s' could not be loaded\n", string);
    71     }
     48  LoadParam<WorldEntity>(root, "model", this, &WorldEntity::loadModel);
     49
    7250  this->bDraw = true;
    7351}
Note: See TracChangeset for help on using the changeset viewer.