Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9836 in orxonox.OLD for branches/new_class_id/src/orxonox.cc


Ignore:
Timestamp:
Sep 26, 2006, 5:16:10 PM (18 years ago)
Author:
bensch
Message:

orxonox/new_class_id: Taken out the old ResourceManager.
On the way, i had to desintegrate the old MD3-model loading process (via ResourceManager) MD3 is untouched, but also not loaded anymore neither from ResourceMangers nor from the WorldEntity

@patrick: MD3-ModelLoading class must be implemented… this should be quite easy, with the way MD3 is, and the new Resource-paradigm
cheers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/orxonox.cc

    r9817 r9836  
    4141#include "sound_engine.h"
    4242#include "util/loading/resource_manager.h"
    43 #include "util/loading/new_resource_manager.h"
     43#include "util/loading/old_resource_manager.h"
    4444
    4545#include "cd_engine.h"
     
    129129
    130130  // handlers
    131   Resources::NewResourceManager::deleteInstance(); // deletes the Resource Manager
     131  Resources::ResourceManager::deleteInstance(); // deletes the Resource Manager
    132132
    133133  // engines
     
    257257  GraphicsEngine::getInstance()->initFromPreferences();
    258258
    259   std::string iconName = ResourceManager::getFullName("pictures/fighter-top-32x32.bmp");
     259  std::string iconName = Resources::ResourceManager::getInstance()->prependAbsoluteMainPath("pictures/fighter-top-32x32.bmp");
    260260  if (!iconName.empty())
    261261  {
     
    341341  if ((dataPath = Preferences::getInstance()->getString(CONFIG_SECTION_GENERAL, CONFIG_NAME_DATADIR, ""))!= "")
    342342  {
    343     Resources::NewResourceManager::getInstance()->setMainGlobalPath(dataPath) ;
    344     if(!Resources::NewResourceManager::getInstance()->checkFileInMainPath(File(DEFAULT_DATA_DIR_CHECKFILE)))
     343    Resources::ResourceManager::getInstance()->setMainGlobalPath(dataPath) ;
     344    if(!Resources::ResourceManager::getInstance()->checkFileInMainPath(File(DEFAULT_DATA_DIR_CHECKFILE)))
    345345    {
    346346      PRINTF(1)("Data Could not be located in %s\n", dataPath.c_str());
    347347    }
    348348  }
    349   while (!Resources::NewResourceManager::getInstance()->checkFileInMainPath(File(DEFAULT_DATA_DIR_CHECKFILE)))
     349  while (!Resources::ResourceManager::getInstance()->checkFileInMainPath(File(DEFAULT_DATA_DIR_CHECKFILE)))
    350350  {
    351351
    352352    PRINTF(1)("The DataDirectory %s could not be verified\n\nh" \
    353353              "!!!  Please Change in File %s Section %s Entry %s to a suitable value !!!\n",
    354               Resources::NewResourceManager::getInstance()->mainGlobalPath().name().c_str(),
     354              Resources::ResourceManager::getInstance()->mainGlobalPath().name().c_str(),
    355355              this->configFileName.c_str(),
    356356              CONFIG_SECTION_GENERAL,
     
    361361      return(-1);
    362362    delete gui;
    363     Resources::NewResourceManager::getInstance()->setMainGlobalPath(Preferences::getInstance()->getString(CONFIG_SECTION_GENERAL, CONFIG_NAME_DATADIR, ""));
     363    Resources::ResourceManager::getInstance()->setMainGlobalPath(Preferences::getInstance()->getString(CONFIG_SECTION_GENERAL, CONFIG_NAME_DATADIR, ""));
    364364  }
    365365
     
    367367
    368368  //! @todo this is a hack and should be loadable
    369   Resources::NewResourceManager::getInstance()->addResourceSubPath("Texture", "maps");
    370   Resources::NewResourceManager::getInstance()->addResourceSubPath("Texture", "pictures");
    371 
    372   Resources::NewResourceManager::getInstance()->addResourceSubPath("SoundBuffer", "sound");
    373   Resources::NewResourceManager::getInstance()->addResourceSubPath("SoundBuffer", "music");
    374 
    375   Resources::NewResourceManager::getInstance()->addKeepLevelName("Imediately");
    376   Resources::NewResourceManager::getInstance()->addKeepLevelName("LevelEnd");
    377   Resources::NewResourceManager::getInstance()->addKeepLevelName("CampaignEnd");
    378   Resources::NewResourceManager::getInstance()->addKeepLevelName("GameEnd");
    379 
    380 
    381   Resources::NewResourceManager::getInstance()->debug();
     369  Resources::ResourceManager::getInstance()->addResourceSubPath("Texture", "maps");
     370  Resources::ResourceManager::getInstance()->addResourceSubPath("Texture", "pictures");
     371
     372  Resources::ResourceManager::getInstance()->addResourceSubPath("SoundBuffer", "sound");
     373  Resources::ResourceManager::getInstance()->addResourceSubPath("SoundBuffer", "music");
     374
     375  Resources::ResourceManager::getInstance()->addKeepLevelName("Imediately");
     376  Resources::ResourceManager::getInstance()->addKeepLevelName("LevelEnd");
     377  Resources::ResourceManager::getInstance()->addKeepLevelName("CampaignEnd");
     378  Resources::ResourceManager::getInstance()->addKeepLevelName("GameEnd");
     379
     380
     381  Resources::ResourceManager::getInstance()->debug();
    382382  //  DynamicLoader::loadDyLib("libtest.so");
    383383  return 0;
Note: See TracChangeset for help on using the changeset viewer.