Changeset 3501 in orxonox.OLD for orxonox/branches/levelloader/src/story_entities
- Timestamp:
- Mar 11, 2005, 5:28:38 PM (20 years ago)
- Location:
- orxonox/branches/levelloader/src/story_entities
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/levelloader/src/story_entities/campaign.cc
r3499 r3501 33 33 Campaign::~Campaign () {} 34 34 35 Campaign::Campaign ( TiXMLElement* root) 36 { 37 TiXMLElement* element; 38 39 assert( root != NULL); 40 GameLoader* loader = GameLoader::getInstance(); 41 42 this->entities = new ListTemplate<StoryEntity>(); 43 this->isInit = false; 44 45 // grab all the necessary parameters 46 47 // find WorldList 48 element = root->FirstChildElement( "WorldList"); 49 50 // load Worlds 51 while( element != NULL) 52 { 53 StoryEntity created = loader->fabricate( element); 54 if( created != NULL) addEntity( created); 55 element = element->nextSiblingElement(); 56 } 57 } 35 58 36 59 ErrorMessage Campaign::init() -
orxonox/branches/levelloader/src/story_entities/campaign.h
r3499 r3501 1 1 2 #ifndef _CAMPAIGN_H 2 #ifndef _CAMPAIGN_HCREATE_FACTORY 3 3 #define _CAMPAIGN_H 4 4 … … 13 13 public: 14 14 Campaign (); 15 Campaign ( TiXMLElement* root); 15 16 ~Campaign (); 16 17 … … 40 41 }; 41 42 43 CREATE_FACTORY(Campaign); 44 42 45 #endif /* _CAMPAIGN_H */ -
orxonox/branches/levelloader/src/story_entities/story_entity.h
r3499 r3501 16 16 public: 17 17 StoryEntity (); 18 StoryEntity ( TiXMLElement* root) {}; 18 19 virtual ~StoryEntity (); 19 20 -
orxonox/branches/levelloader/src/story_entities/world.cc
r3499 r3501 32 32 using namespace std; 33 33 34 35 World::World( TiXMLElement* root) 36 { 37 TiXMLElement* element; 38 // load parameters 39 // identifier 40 element = FirstChildrenElement("identifier"); 41 if( element == NULL) 42 { 43 PRINTF(ERR)("World created with missing identifier\n"); 44 setStoryID( -1); 45 } 46 // file 47 } 34 48 35 49 /** -
orxonox/branches/levelloader/src/story_entities/world.h
r3499 r3501 28 28 29 29 public: 30 World (TiXMLElement* root), 30 31 World (char* name); 31 32 World (int worldID); … … 88 89 }; 89 90 91 CREATE_FACTORY(World); 92 90 93 #endif /* _WORLD_H */
Note: See TracChangeset
for help on using the changeset viewer.