Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4606 in orxonox.OLD


Ignore:
Timestamp:
Jun 12, 2005, 2:58:12 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: minor

Location:
orxonox/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/orxonox.kdevelop

    r4591 r4606  
    156156    </groups>
    157157    <tree>
    158       <hidepatterns>*.o,*.a,Makefile.in,Makefile,*~</hidepatterns>
     158      <hidepatterns>*.o</hidepatterns>
    159159      <hidenonprojectfiles>false</hidenonprojectfiles>
    160160    </tree>
  • orxonox/trunk/src/orxonox.cc

    r4597 r4606  
    187187int Orxonox::initResources()
    188188{
    189   PRINT(3)("initializing ResourceManager\n");
    190   resourceManager = ResourceManager::getInstance();
     189   PRINT(3)("initializing ResourceManager\n");
     190   resourceManager = ResourceManager::getInstance();
    191191
    192192  // create parser
    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         {
     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     {
    208208          //  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();
    236238
    237239  return 0;
  • orxonox/trunk/src/util/resource_manager.cc

    r4597 r4606  
    765765   \brief outputs debug information about the ResourceManager
    766766*/
    767 void ResourceManager::debug(void)
     767void ResourceManager::debug(void) const
    768768{
    769769  PRINT(0)("=RM===================================\n");
  • orxonox/trunk/src/util/resource_manager.h

    r4597 r4606  
    116116  bool unloadAllByPriority(ResourcePriority prio);
    117117
    118   void debug(void);
     118  void debug(void) const;
    119119
    120120
Note: See TracChangeset for help on using the changeset viewer.