Changeset 4216 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- May 18, 2005, 11:17:25 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/game_loader.cc
r4114 r4216 74 74 this will interprete the map/campaign files and recursivly load a tree of worlds/campaigns 75 75 */ 76 ErrorMessage GameLoader::loadCampaign(c har* name)76 ErrorMessage GameLoader::loadCampaign(const char* name) 77 77 { 78 78 ErrorMessage errorCode; 79 char* campaignName; 80 if (ResourceManager::isFile(name)) 81 { 82 this->currentCampaign = this->fileToCampaign(name); 83 } 84 else 85 { 86 campaignName = new char[strlen(ResourceManager::getInstance()->getDataDir())+strlen(name)]; 87 sprintf(campaignName, "%s%s", ResourceManager::getInstance()->getDataDir(), name); 79 char* campaignName = ResourceManager::getFullName(name); 80 if (campaignName) 81 { 88 82 this->currentCampaign = this->fileToCampaign(campaignName); 89 83 delete campaignName; -
orxonox/trunk/src/game_loader.h
r4113 r4216 39 39 40 40 ErrorMessage init(); 41 ErrorMessage loadCampaign(c har* name);41 ErrorMessage loadCampaign(const char* name); 42 42 ErrorMessage start(); 43 43 ErrorMessage stop(); -
orxonox/trunk/src/util/resource_manager.cc
r4167 r4216 648 648 char* ResourceManager::getFullName(const char* fileName) 649 649 { 650 char* retName = new char[strlen(ResourceManager::getInstance()->getDataDir()) + strlen(fileName)+1]; 650 char* retName = new char[strlen(ResourceManager::getInstance()->getDataDir()) 651 + strlen(fileName) + 1]; 651 652 sprintf(retName, "%s%s", ResourceManager::getInstance()->getDataDir(), fileName); 652 653 if (ResourceManager::isFile(retName))
Note: See TracChangeset
for help on using the changeset viewer.