- Timestamp:
- Jan 30, 2006, 2:01:00 AM (19 years ago)
- Location:
- trunk/src/story_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/game_world.cc
r6839 r6845 87 87 this->showBV = false; 88 88 89 this->dataXML = NULL; 89 90 this->path = NULL; 90 91 } … … 176 177 /* the whole loading process for the GameWorld */ 177 178 this->dataTank->loadData(root); 179 this->dataXML = (TiXmlElement*)root->Clone(); 178 180 179 181 delete XMLDoc; … … 189 191 delete this->shell; 190 192 PRINTF(3)("GameWorld::~GameWorld() - unloading the current GameWorld\n"); 193 194 if (this->dataXML) 195 delete this->dataXML; 191 196 192 197 this->dataTank->unloadData(); -
trunk/src/story_entities/game_world.h
r6839 r6845 80 80 protected: 81 81 GameWorldData* dataTank; //!< reference to the GameWorld Data Tank 82 TiXmlElement* dataXML; //!< The XML-Element this World has been loaded with. 82 83 char* path; //!< The file from which this world is loaded 83 84 -
trunk/src/story_entities/simple_game_menu.cc
r6843 r6845 122 122 { 123 123 GameWorld::loadData(); 124 125 if (this->dataXML != NULL) 126 { 127 TiXmlElement* element = this->dataXML->FirstChildElement("Elements"); 128 129 if( element == NULL) 130 { 131 PRINTF(1)("SimpleGameMenu is missing 'Elements'\n"); 132 } 133 else 134 { 135 element = element->FirstChildElement(); 136 // load Players/Objects/Whatever 137 PRINTF(4)("Loading Elements\n"); 138 while( element != NULL) 139 { 140 BaseObject* created = Factory::fabricate(element); 141 if( created != NULL ) 142 PRINTF(4)("Created a %s: %s\n", created->getClassName(), created->getName()); 143 144 } 145 PRINTF(4)("Done loading Elements\n"); 146 } 147 } 124 148 125 149 /* get the menu list */
Note: See TracChangeset
for help on using the changeset viewer.