Changeset 4606 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Jun 12, 2005, 2:58:12 PM (20 years ago)
- Location:
- orxonox/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/orxonox.kdevelop
r4591 r4606 156 156 </groups> 157 157 <tree> 158 <hidepatterns>*.o ,*.a,Makefile.in,Makefile,*~</hidepatterns>158 <hidepatterns>*.o</hidepatterns> 159 159 <hidenonprojectfiles>false</hidenonprojectfiles> 160 160 </tree> -
orxonox/trunk/src/orxonox.cc
r4597 r4606 187 187 int Orxonox::initResources() 188 188 { 189 PRINT(3)("initializing ResourceManager\n");190 resourceManager = ResourceManager::getInstance();189 PRINT(3)("initializing ResourceManager\n"); 190 resourceManager = ResourceManager::getInstance(); 191 191 192 192 // create parser 193 IniParser parser (DEFAULT_CONFIG_FILE);194 if( parser.getSection (CONFIG_SECTION_DATA) == -1)195 196 197 198 199 char namebuf[256];200 char valuebuf[256];201 memset (namebuf, 0, 256);202 memset (valuebuf, 0, 256);203 204 while( parser.nextVar (namebuf, valuebuf) != -1)205 206 207 193 IniParser parser (DEFAULT_CONFIG_FILE); 194 if( parser.getSection (CONFIG_SECTION_DATA) == -1) 195 { 196 PRINTF(1)("Could not find Section %s in %s\n", CONFIG_SECTION_DATA, DEFAULT_CONFIG_FILE); 197 return -1; 198 } 199 char namebuf[256]; 200 char valuebuf[256]; 201 memset (namebuf, 0, 256); 202 memset (valuebuf, 0, 256); 203 204 while( parser.nextVar (namebuf, valuebuf) != -1) 205 { 206 if (!strcmp(namebuf, CONFIG_NAME_DATADIR)) 207 { 208 208 // printf("Not yet implemented\n"); 209 if (!resourceManager->setDataDir(valuebuf)) 210 { 211 PRINTF(1)("Data Could not be located\n"); 212 exit(-1); 213 } 214 } 215 216 memset (namebuf, 0, 256); 217 memset (valuebuf, 0, 256); 218 } 219 220 if (!resourceManager->checkDataDir(DEFAULT_DATA_DIR_CHECKFILE)) 221 { 222 PRINTF(1)("The DataDirectory %s could not be verified\nPlease Change in File %s Section %s Entry %s to a suitable value\n", 223 resourceManager->getDataDir(), 224 DEFAULT_CONFIG_FILE, 225 CONFIG_SECTION_DATA, 226 CONFIG_NAME_DATADIR); 227 exit(-1); 228 } 229 230 231 PRINT(3)("initializing TextEngine\n"); 232 TextEngine::getInstance(); 233 234 PRINT(3)("initializing ObjectManager\n"); 235 this->objectManager = ObjectManager::getInstance(); 209 if (!resourceManager->setDataDir(valuebuf)) 210 { 211 PRINTF(1)("Data Could not be located\n"); 212 exit(-1); 213 } 214 } 215 216 memset (namebuf, 0, 256); 217 memset (valuebuf, 0, 256); 218 } 219 220 if (!resourceManager->checkDataDir(DEFAULT_DATA_DIR_CHECKFILE)) 221 { 222 PRINTF(1)("The DataDirectory %s could not be verified\nPlease Change in File %s Section %s Entry %s to a suitable value\n", 223 resourceManager->getDataDir(), 224 DEFAULT_CONFIG_FILE, 225 CONFIG_SECTION_DATA, 226 CONFIG_NAME_DATADIR); 227 exit(-1); 228 } 229 //! \todo this is a hack and should be loadable 230 resourceManager->addImageDir(ResourceManager::getInstance()->getFullName("maps/")); 231 resourceManager->debug(); 232 233 PRINT(3)("initializing TextEngine\n"); 234 TextEngine::getInstance(); 235 236 PRINT(3)("initializing ObjectManager\n"); 237 this->objectManager = ObjectManager::getInstance(); 236 238 237 239 return 0; -
orxonox/trunk/src/util/resource_manager.cc
r4597 r4606 765 765 \brief outputs debug information about the ResourceManager 766 766 */ 767 void ResourceManager::debug(void) 767 void ResourceManager::debug(void) const 768 768 { 769 769 PRINT(0)("=RM===================================\n"); -
orxonox/trunk/src/util/resource_manager.h
r4597 r4606 116 116 bool unloadAllByPriority(ResourcePriority prio); 117 117 118 void debug(void) ;118 void debug(void) const; 119 119 120 120
Note: See TracChangeset
for help on using the changeset viewer.