Changeset 5014 in orxonox.OLD for orxonox/trunk/src/orxonox.cc
- Timestamp:
- Aug 14, 2005, 4:29:29 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/orxonox.cc
r4985 r5014 219 219 PRINT(3)("initializing ResourceManager\n"); 220 220 221 // create parser222 if ( this->iniParser->getSection (CONFIG_SECTION_DATA) == -1)221 const char* dataPath; 222 if ((dataPath = this->iniParser->getVar(CONFIG_NAME_DATADIR, CONFIG_SECTION_DATA))!= NULL) 223 223 { 224 PRINTF(1)("Could not find Section %s in %s\n", CONFIG_SECTION_DATA, DEFAULT_CONFIG_FILE); 225 return -1; 226 } 227 char namebuf[256]; 228 char valuebuf[256]; 229 memset (namebuf, 0, 256); 230 memset (valuebuf, 0, 256); 231 232 while( this->iniParser->nextVar (namebuf, valuebuf) != -1) 233 { 234 if (!strcmp(namebuf, CONFIG_NAME_DATADIR)) 224 if (!ResourceManager::getInstance()->setDataDir(dataPath)) 235 225 { 236 // printf("Not yet implemented\n"); 237 if (!ResourceManager::getInstance()->setDataDir(valuebuf)) 238 { 239 PRINTF(1)("Data Could not be located\n"); 240 exit(-1); 241 } 226 PRINTF(1)("Data Could not be located\n"); 227 exit(-1); 242 228 } 243 244 memset (namebuf, 0, 256);245 memset (valuebuf, 0, 256);246 229 } 247 230
Note: See TracChangeset
for help on using the changeset viewer.