Changeset 4487 in orxonox.OLD for orxonox/trunk/src/util/loading/game_loader.cc
- Timestamp:
- Jun 3, 2005, 12:56:57 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/loading/game_loader.cc
r4445 r4487 37 37 38 38 /** 39 \brief simple constructor40 39 \brief simple constructor 40 */ 41 41 GameLoader::GameLoader () 42 42 { … … 46 46 47 47 /** 48 \brief simple deconstructor49 48 \brief simple deconstructor 49 */ 50 50 GameLoader::~GameLoader () {} 51 51 … … 64 64 } 65 65 66 66 /** 67 \brief initializes the GameLoader 68 */ 67 69 ErrorMessage GameLoader::init() 68 70 { … … 80 82 /** 81 83 \brief reads a campaign definition file into a campaign class 82 \param file name to be loaded84 \param fileName to be loaded 83 85 \returns the loaded campaign 84 86 85 87 this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns 86 88 */ 87 ErrorMessage GameLoader::loadCampaign(const char* name)89 ErrorMessage GameLoader::loadCampaign(const char* fileName) 88 90 { 89 91 ErrorMessage errorCode; 90 char* campaignName = ResourceManager::getFullName( name);92 char* campaignName = ResourceManager::getFullName(fileName); 91 93 if (campaignName) 92 94 { … … 101 103 /** 102 104 \brief loads a debug campaign for test purposes only. 103 \param the identifier of the campaign.105 \param campaignID the identifier of the campaign. 104 106 \returns error message if not able to do so. 105 107 */ … … 198 200 */ 199 201 ErrorMessage GameLoader::destroy() 200 {} 202 { 203 204 } 201 205 202 206 203 207 /** 204 208 \brief reads a campaign definition file into a campaign class 205 \param file name to be loaded209 \param fileName to be loaded 206 210 \returns the loaded campaign 207 211 208 212 this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns 209 213 */ 210 Campaign* GameLoader::fileToCampaign(const char *name)214 Campaign* GameLoader::fileToCampaign(const char* fileName) 211 215 { 212 216 /* do not entirely load the campaign. just the current world … … 215 219 */ 216 220 217 if( name == NULL)221 if( fileName == NULL) 218 222 { 219 223 PRINTF(2)("No filename specified for loading"); … … 221 225 } 222 226 223 TiXmlDocument* XMLDoc = new TiXmlDocument( name);227 TiXmlDocument* XMLDoc = new TiXmlDocument( fileName); 224 228 // load the campaign document 225 229 if( !XMLDoc->LoadFile()) 226 230 { 227 231 // report an error 228 PRINTF(1)("Could not load XML File %s: %s @ %d:%d\n", name, XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol());232 PRINTF(1)("Could not load XML File %s: %s @ %d:%d\n", fileName, XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol()); 229 233 delete XMLDoc; 230 234 return NULL; … … 255 259 /** 256 260 \brief handle keyboard commands 257 \param the event to handle261 \param event the event to handle 258 262 */ 259 263 void GameLoader::process(const Event& event) … … 290 294 291 295 292 /* 296 /** 293 297 \brief this changes to the next level 294 298 */ … … 300 304 301 305 302 /* 306 /** 303 307 \brief change to the previous level - not implemented 304 308
Note: See TracChangeset
for help on using the changeset viewer.