Changeset 4005 in orxonox.OLD for orxonox/branches/ll2trunktemp
- Timestamp:
- Apr 28, 2005, 8:24:43 PM (20 years ago)
- Location:
- orxonox/branches/ll2trunktemp/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/ll2trunktemp/src/factory.h
r4004 r4005 15 15 this should be used at the beginning of all the Classes that should be loadable (in the cc-file) 16 16 */ 17 #define CREATE_FACTORY(x) tFactory<x>* global_ ## x ## Factory = new tFactory<x>(#x) ;17 #define CREATE_FACTORY(x) tFactory<x>* global_ ## x ## Factory = new tFactory<x>(#x) 18 18 19 19 -
orxonox/branches/ll2trunktemp/src/story_entities/world.cc
r4004 r4005 158 158 this->setPath( name); 159 159 } 160 161 this->localPlayer = NULL;162 163 160 } 164 161 … … 333 330 //todo do this more elegant 334 331 if( element->Value() != NULL && !strcmp( element->Value(), "Player")) localPlayer = (Player*) created; 332 if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox")) skyBox = (SkyBox*) created; 335 333 element = element->NextSiblingElement(); 336 334 } … … 456 454 lightMan->debug(); 457 455 lightMan->setPosition(-5.0, 10.0, -40.0); 458 459 460 // Create SkySphere461 this->skySphere = new Skysphere("../data/pictures/sky-replace.jpg");462 this->skySphere->setName("SkySphere");463 this->localCamera->addChild(this->skySphere);464 spawn(skySphere);465 466 456 467 457 // trackManager->setBindSlave(env); -
orxonox/branches/ll2trunktemp/src/world_entities/skybox.cc
r3913 r4005 28 28 29 29 #include "skybox.h" 30 30 31 #include "stdincl.h" 32 #include "factory.h" 31 33 32 34 #include "material.h" … … 36 38 //#include "world_entity.h" 37 39 40 CREATE_FACTORY(SkyBox); 38 41 39 42 using namespace std; … … 44 47 */ 45 48 SkyBox::SkyBox(char* fileName) 49 { 50 this->init(); 51 } 52 53 SkyBox::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 77 void SkyBox::init(void) 46 78 { 47 79 this->setClassName("SkyBox"); -
orxonox/branches/ll2trunktemp/src/world_entities/skybox.h
r3807 r4005 22 22 public: 23 23 SkyBox(char* fileName = NULL); 24 SkyBox(TiXmlElement* root); 25 24 26 virtual ~SkyBox(); 27 28 void init(void); 25 29 26 30 void setSize(float size);
Note: See TracChangeset
for help on using the changeset viewer.