Changeset 4091 in orxonox.OLD for orxonox/trunk/src/orxonox.cc
- Timestamp:
- May 6, 2005, 8:02:26 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/orxonox.cc
r4084 r4091 32 32 #include "data_tank.h" 33 33 #include "command_node.h" 34 #include "ini_parser.h" 34 35 #include "game_loader.h" 35 36 #include "graphics_engine.h" … … 173 174 int Orxonox::initResources() 174 175 { 175 // printf("Not yet implemented\n");176 176 PRINT(3)("initializing ResourceManager\n"); 177 177 resourceManager = ResourceManager::getInstance(); 178 if (!resourceManager->setDataDir("../data/")) 179 { 180 PRINTF(1)("Data Could not be located\n"); 178 179 // create parser 180 IniParser parser (DEFAULT_CONFIG_FILE); 181 if( parser.getSection (CONFIG_SECTION_DATA) == -1) 182 { 183 PRINTF(1)("Could not find Section %s in %s\n", CONFIG_SECTION_DATA, DEFAULT_CONFIG_FILE); 184 return -1; 185 } 186 char namebuf[256]; 187 char valuebuf[256]; 188 memset (namebuf, 0, 256); 189 memset (valuebuf, 0, 256); 190 191 while( parser.nextVar (namebuf, valuebuf) != -1) 192 { 193 if (!strcmp(namebuf, CONFIG_NAME_DATADIR)) 194 { 195 // printf("Not yet implemented\n"); 196 if (!resourceManager->setDataDir(valuebuf)) 197 { 198 PRINTF(1)("Data Could not be located\n"); 199 exit(-1); 200 } 201 } 202 203 memset (namebuf, 0, 256); 204 memset (valuebuf, 0, 256); 205 } 206 207 if (!resourceManager->checkDataDir(DEFAULT_DATA_DIR_CHECKFILE)) 208 { 209 PRINTF(1)("The DataDirectory %s could not be verified\nPlease Change in File %s Section %s Entry %s to a suitable value\n", 210 resourceManager->getDataDir(), 211 DEFAULT_CONFIG_FILE, 212 CONFIG_SECTION_DATA, 213 CONFIG_NAME_DATADIR); 181 214 exit(-1); 182 215 } 216 183 217 184 218 PRINT(3)("initializing TextEngine\n");
Note: See TracChangeset
for help on using the changeset viewer.