Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9833 in orxonox.OLD for branches


Ignore:
Timestamp:
Sep 26, 2006, 4:59:49 PM (18 years ago)
Author:
bensch
Message:

orxonox/new_class_id: almost killed off the old ResourceManager

Location:
branches/new_class_id/src
Files:
39 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/graphics/graphics_engine.cc

    r9761 r9833  
    1717
    1818#include "graphics_engine.h"
    19 #include "util/loading/resource_manager.h"
    2019#include "state.h"
    2120
  • branches/new_class_id/src/lib/graphics/importer/bsp_file.cc

    r9406 r9833  
    2222#include "bsp_tree_node.h"
    2323#include <fstream>
    24 #include "util/loading/resource_manager.h"
     24#include "util/loading/new_resource_manager.h"
    2525
    2626#include <sys/stat.h>
     
    466466    PRINTF(4)("BSP FILE: Name %s . \n", fileName);
    467467
    468     absFileName = ResourceManager::getFullName(fileName);
     468    absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    469469
    470470    if(File(absFileName).exists()) {
     
    481481    strncat (fileName, ext, strlen(fileName));
    482482
    483     absFileName = ResourceManager::getFullName(fileName);
     483    absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    484484
    485485    if(File(absFileName).exists()) {
     
    496496    strncat (fileName, ext, strlen(fileName));
    497497
    498     absFileName = ResourceManager::getFullName(fileName);
     498    absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    499499
    500500    if(File(absFileName).exists()) {
     
    511511    strncat (fileName, ext, strlen(fileName));
    512512
    513     absFileName = ResourceManager::getFullName(fileName);
     513    absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    514514
    515515    if(File(absFileName).exists()) {
     
    524524    strcpy(ext, ".TGA");
    525525    strncat (fileName, ext, strlen(fileName));
    526     absFileName = ResourceManager::getFullName(fileName);
     526    absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    527527
    528528    if(File(absFileName).exists()/*stat( absFileName.c_str() , &results) == 0*/) {
     
    537537    strcpy(ext, ".jpg");
    538538    strncat (fileName, ext, strlen(fileName));
    539     absFileName = ResourceManager::getFullName(fileName);
     539    absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    540540    if(File(absFileName).exists()) {
    541541      PRINTF(4)("BSP FILE: gefunden . \n");
     
    551551    strcpy(ext, ".JPG");
    552552    strncat (fileName, ext, strlen(fileName));
    553     absFileName = ResourceManager::getFullName(fileName);
     553    absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    554554    if(File(absFileName).exists()) {
    555555      PRINTF(4)("BSP FILE: gefunden . \n");
     
    566566    strcpy(ext, ".bmp");
    567567    strncat (fileName, ext, strlen(fileName));
    568     absFileName = ResourceManager::getFullName(fileName);
     568    absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    569569
    570570    if(File(absFileName).exists()) {
     
    580580    strcpy(ext, ".BMP");
    581581    strncat (fileName, ext, strlen(fileName));
    582     absFileName = ResourceManager::getFullName(fileName);
     582    absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    583583
    584584    if(File(absFileName).exists()) {
     
    611611  this->testSurf = NULL;
    612612
    613   this->testSurf = IMG_Load(ResourceManager::getFullName(mat).c_str());
     613  this->testSurf = IMG_Load(Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(mat).c_str());
    614614  if(this->testSurf != NULL) {
    615615    if(this->testSurf->format->Amask != 0 ) tmpAMat.alpha = true;
  • branches/new_class_id/src/lib/graphics/importer/bsp_manager.cc

    r9235 r9833  
    3333#include "world_entities/player.h"
    3434#include "world_entities/playable.h"
    35 #include "util/loading/resource_manager.h"
     35
    3636// STL Containers
    3737#include <vector>
     
    4141#include "world_entity.h"
    4242
     43#include "util/loading/new_resource_manager.h"
    4344#include "util/loading/load_param.h"
    4445#include "util/loading/factory.h"
     
    9192  this->bspFile = new BspFile();
    9293  this->bspFile->scale =  scale;
    93   if(this->bspFile->read(ResourceManager::getFullName(fileName).c_str()) == -1)
     94  if(this->bspFile->read(Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName).c_str()) == -1)
    9495    return -1;
    9596
     
    13761377    if( this->outputFraction == 1.0f) // No collision Detected
    13771378    {
    1378       if( this->outputAllSolid ) 
     1379      if( this->outputAllSolid )
    13791380      {
    13801381        this->collPlane = new plane;
  • branches/new_class_id/src/lib/graphics/importer/height_map.cc

    r9715 r9833  
    2222#include "p_node.h"
    2323#include "state.h"
    24 #include "util/loading/resource_manager.h"
    2524#include "debug.h"
    2625
  • branches/new_class_id/src/lib/graphics/importer/material.cc

    r9823 r9833  
    2626
    2727#include "resource_texture.h"
    28 //#include "util/loading/resource_manager.h"
    2928
    3029ObjectListDefinition(Material);
  • branches/new_class_id/src/lib/graphics/importer/media_container.cc

    r9715 r9833  
    2525#include "media_container.h"
    2626
    27 #include "util/loading/resource_manager.h"
    28 
     27#include "util/loading/new_resource_manager.h"
    2928/* header for debug output */
    3029#include "debug.h"
     
    9291    return false;
    9392  // check whether file exists
    94   if(!ResourceManager::isInDataDir(filename))
     93  if(!Resources::NewResourceManager::getInstance()->checkFileInMainPath(filename))
    9594  {
    9695    PRINTF(1)("Could not find %s\n", filename.c_str());
     
    102101
    103102  // Open video file
    104   if (av_open_input_file(&format_context, ResourceManager::getFullName(filename).c_str(), NULL, 0, NULL) !=0 )
    105   {
    106     PRINTF(1)("Could not open %s\n", ResourceManager::getFullName(filename).c_str());
     103  if (av_open_input_file(&format_context, Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str(), NULL, 0, NULL) !=0 )
     104  {
     105    PRINTF(1)("Could not open %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
    107106    return false;
    108107  }
     
    111110  if (av_find_stream_info(format_context) < 0)
    112111  {
    113     PRINTF(1)("Could not find stream information in %s\n", ResourceManager::getFullName(filename).c_str());
     112    PRINTF(1)("Could not find stream information in %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
    114113    return false;
    115114  }
     
    120119  if(video_stream == -1)
    121120  {
    122     PRINTF(1)("Could not find a video stream in %s\n", ResourceManager::getFullName(filename).c_str());
     121    PRINTF(1)("Could not find a video stream in %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
    123122    return false;
    124123  }
  • branches/new_class_id/src/lib/graphics/importer/movie_player.cc

    r9715 r9833  
    2424// include your own header
    2525#include "movie_player.h"
    26 
    27 #include "util/loading/resource_manager.h"
     26#include "util/loading/new_resource_manager.h"
    2827
    2928// header for debug output
     
    9089    return false;
    9190  // check whether file exists
    92   if(!ResourceManager::isInDataDir(filename))
     91  if(!Resources::NewResourceManager::getInstance()->checkFileInMainPath(filename))
    9392  {
    9493    PRINTF(1)("Could not find %s\n", filename.c_str());
     
    10099
    101100  // Open video file
    102   if (av_open_input_file(&format_context, ResourceManager::getFullName(filename).c_str(), NULL, 0, NULL) !=0 )
    103   {
    104     PRINTF(1)("Could not open %s\n", ResourceManager::getFullName(filename).c_str());
     101  if (av_open_input_file(&format_context, Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str(), NULL, 0, NULL) !=0 )
     102  {
     103    PRINTF(1)("Could not open %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
    105104    return false;
    106105  }
     
    109108  if (av_find_stream_info(format_context) < 0)
    110109  {
    111     PRINTF(1)("Could not find stream information in %s\n", ResourceManager::getFullName(filename).c_str());
     110    PRINTF(1)("Could not find stream information in %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
    112111    return false;
    113112  }
     
    118117  if(video_stream == -1)
    119118  {
    120     PRINTF(1)("Could not find a video stream in %s\n", ResourceManager::getFullName(filename).c_str());
     119    PRINTF(1)("Could not find a video stream in %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
    121120    return false;
    122121  }
  • branches/new_class_id/src/lib/graphics/shader.cc

    r9821 r9833  
    2424#include "debug.h"
    2525
    26 #include "util/loading/resource_manager.h"
    2726
    2827
     
    7675  : data(new ShaderData)
    7776{
    78  
     77
    7978}
    8079
  • branches/new_class_id/src/lib/graphics/shader_data.cc

    r9818 r9833  
    2424
    2525#include "debug.h"
    26 
    27 #include "util/loading/resource_manager.h"
    2826
    2927
  • branches/new_class_id/src/lib/graphics/text_engine/text.cc

    r9718 r9833  
    1818#include "text.h"
    1919#include "font.h"
    20 
    21 #include "util/loading/resource_manager.h"
     20#include "loading/resource_manager.h"
    2221#include "debug.h"
    2322
  • branches/new_class_id/src/lib/graphics/text_engine/text_engine.cc

    r9715 r9833  
    3333
    3434#include "graphics_engine.h"
    35 #include "util/loading/resource_manager.h"
    3635
    3736#include "debug.h"
  • branches/new_class_id/src/lib/gui/gl/glgui_handler.cc

    r9715 r9833  
    2323#include "glgui_cursor.h"
    2424
     25#include "loading/new_resource_manager.h"
     26
    2527#include <cassert>
    2628
     
    3032/// TAKE THIS OUT OF HERE.
    3133#include "graphics_engine.h"
    32 #include "loading/resource_manager.h"
    3334
    3435namespace OrxGui
     
    7677    this->_cursor->setMaxBorders(Vector2D(GraphicsEngine::getInstance()->getResolutionX(), GraphicsEngine::getInstance()->getResolutionY()));
    7778
    78     _cursor->loadTextureSequence(ResourceManager::getInstance()->getDataDir() + "/" + "maps/reap_mouse/reap_mouse_##.png", 1, 49);
     79    _cursor->loadTextureSequence(Resources::NewResourceManager::getInstance()->mainGlobalPath().name() + "/" + "maps/reap_mouse/reap_mouse_##.png", 1, 49);
    7980
    8081  }
  • branches/new_class_id/src/lib/gui/gl/glgui_widget.cc

    r9715 r9833  
    2525
    2626#include "loading/load_param.h"
    27 
    28 /// TODO TAKE THIS OUT OF HERE
    29 #include "loading/resource_manager.h"
     27#include "loading/new_resource_manager.h"
    3028
    3129namespace OrxGui
     
    104102
    105103    if(GLGuiWidget::_defaultFont == NULL)
    106       GLGuiWidget::_defaultFont = new Font(ResourceManager::getInstance()->getDataDir() + "/fonts/final_frontier.ttf", 20);
     104      GLGuiWidget::_defaultFont = new Font(Resources::NewResourceManager::getInstance()->mainGlobalPath().name() + "/fonts/final_frontier.ttf", 20);
    107105
    108106    this->_font = *GLGuiWidget::_defaultFont;
  • branches/new_class_id/src/lib/network/monitor/network_stats_widget.cc

    r9715 r9833  
    2020#include "peer_info.h"
    2121
     22#include "loading/new_resource_manager.h"
     23
    2224#include "multi_type.h"
    2325
    2426#include "shell_command.h"
    25 
    26 #include "loading/resource_manager.h"
    2727
    2828// this fcuk does not work!
     
    5656{
    5757  if(_font == NULL)
    58     _font = new Font(ResourceManager::getInstance()->getDataDir() + "/fonts/arial.ttf", 20);
     58    _font = new Font(Resources::NewResourceManager::getInstance()->mainGlobalPath().name() + "/fonts/arial.ttf", 20);
    5959
    6060  //this->_name.setFont(*_font);
  • branches/new_class_id/src/lib/network/network_stream.cc

    r9757 r9833  
    3636#include "zip.h"
    3737
    38 #include "src/lib/util/loading/resource_manager.h"
    39 
    4038#include "network_log.h"
    4139
    4240#include "player_stats.h"
    4341
    44 #include "lib/util/loading/factory.h"
     42#include "loading/factory.h"
     43#include "loading/new_resource_manager.h"
    4544
    4645#include "debug.h"
     
    13001299    length = remainingBytesToWriteToDict;
    13011300
    1302   std::string fileName = ResourceManager::getInstance()->getDataDir();
     1301  std::string fileName = Resources::NewResourceManager::getInstance()->mainGlobalPath().name();
    13031302  fileName += "/dicts/newdict";
    13041303
  • branches/new_class_id/src/lib/network/proxy/network_settings.cc

    r9715 r9833  
    2121#include "shared_network_data.h"
    2222
    23 #include "loading/resource_manager.h"
    2423#include "loading/load_param.h"
    25 
     24#include "loading/new_resource_manager.h"
    2625#include "debug.h"
    2726
     
    6564void NetworkSettings::loadData()
    6665{
    67   std::string fileName = ResourceManager::getInstance()->getDataDir();
     66  std::string fileName = Resources::NewResourceManager::getInstance()->mainGlobalPath().name();
    6867  fileName += "configs/network_settings.conf";
    6968
  • branches/new_class_id/src/lib/network/zip.cc

    r8623 r9833  
    1515
    1616#include "zip.h"
    17 
    18 #include "src/lib/util/loading/resource_manager.h"
     17#include "loading/new_resource_manager.h"
    1918#include "debug.h"
    2019
     
    5150int Zip::loadDictionary( std::string name )
    5251{
    53   std::string fileName = ResourceManager::getInstance()->getDataDir();
     52  std::string fileName = Resources::NewResourceManager::getInstance()->mainGlobalPath().name();
    5453  //PRINTF(0)("datadir: %s\n", fileName.c_str());
    5554  fileName = fileName + "/dicts/" + name;
  • branches/new_class_id/src/lib/script_engine/script.cc

    r9757 r9833  
    1818#include "luaincl.h"
    1919#include "debug.h"
    20 #include "util/loading/resource_manager.h"
    21 
     20
     21#include "loading/new_resource_manager.h"
    2222#include "loading/load_param.h"
    2323#include "parser/tinyxml/tinyxml.h"
     
    100100bool Script::loadFile(const std::string& filename)
    101101 {
    102    std::string filedest(ResourceManager::getInstance()->getDataDir());
     102   std::string filedest(Resources::NewResourceManager::getInstance()->mainGlobalPath().name());
    103103   filedest += "scripts/" + filename;
    104104
  • branches/new_class_id/src/lib/shell/shell_completion_plugin.cc

    r9734 r9833  
    2222
    2323#include "helper_functions.h"
    24 #include "loading/resource_manager.h"
     24#include "loading/new_resource_manager.h"
    2525
    2626#include "filesys/directory.h"
     
    9797    if (completionBegin.empty()) // if we do not yet have the beginning of the line, start with the chosen startDir.
    9898    {
    99       dir.setFileName(ResourceManager::getInstance()->getDataDir() + this->_subDir);
     99      dir.setFileName(Resources::NewResourceManager::getInstance()->mainGlobalPath().name() + this->_subDir);
    100100      dir.open();
    101101      for(unsigned int i = 0; i < dir.fileCount(); i++ )
     
    112112        directoryName = completionBegin.substr(0, pos);
    113113
    114       dir.setFileName(ResourceManager::getInstance()->getDataDir() + directoryName);
     114      dir.setFileName(Resources::NewResourceManager::getInstance()->mainGlobalPath().name() + directoryName);
    115115      dir.open();
    116116
     
    135135          continue;
    136136        }
    137         printf("%s\n", (ResourceManager::getInstance()->getDataDir() + fileName).c_str());
     137        printf("%s\n", (Resources::NewResourceManager::getInstance()->mainGlobalPath().name() + fileName).c_str());
    138138        if (!nocaseCmp(completionBegin, fileName, completionBegin.size()) &&
    139              ResourceManager::isInDataDir(fileName))
     139             Resources::NewResourceManager::getInstance()->checkFileInMainPath(fileName))
    140140        {
    141141          printf("Dir %s\n", fileName.c_str());
  • branches/new_class_id/src/lib/sound/sound_engine.cc

    r9805 r9833  
    2222
    2323#include "p_node.h"
    24 #include "util/loading/resource_manager.h"
    2524#include "debug.h"
    2625#include "util/preferences.h"
  • branches/new_class_id/src/lib/util/loading/game_loader.cc

    r9794 r9833  
    2020#include "game_loader.h"
    2121#include "util/loading/load_param.h"
    22 
     22#include "util/loading/new_resource_manager.h"
    2323#include "debug.h"
    2424#include "campaign.h"
    25 
    26 #include "util/loading/resource_manager.h"
    2725
    2826#include "key_mapper.h"
     
    8583{
    8684  ErrorMessage errorCode;
    87   std::string campaignName = ResourceManager::getFullName(fileName);
     85  std::string campaignName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    8886  if (!campaignName.empty())
    8987  {
     
    105103{
    106104  ErrorMessage errorCode;
    107   std::string campaignName = ResourceManager::getFullName(fileName);
     105  std::string campaignName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    108106  if (!campaignName.empty())
    109107  {
  • branches/new_class_id/src/lib/util/loading/new_resource_manager.cc

    r9802 r9833  
    120120  }
    121121
     122  std::string NewResourceManager::prependAbsoluteMainPath(const std::string& fileName)
     123  {
     124    return (this->_mainGlobalPath + File(fileName)).name();
     125  }
    122126
    123127
  • branches/new_class_id/src/lib/util/loading/new_resource_manager.h

    r9802 r9833  
    4444
    4545    bool checkFileInMainPath(const File& fileInside);
     46    std::string prependAbsoluteMainPath(const std::string& fileName);
    4647
    4748    bool unloadAllByKeepLevel(const Resources::KeepLevel& keepLevel);
  • branches/new_class_id/src/story_entities/game_world.cc

    r9823 r9833  
    2020#include "game_world_data.h"
    2121
    22 #include "util/loading/resource_manager.h"
    2322#include "state.h"
    2423
  • branches/new_class_id/src/story_entities/game_world_data.cc

    r9816 r9833  
    2121#include "game_world_data.h"
    2222
    23 #include "util/loading/resource_manager.h"
    2423#include "state.h"
    2524#include "substring.h"
    2625
    2726#include "util/loading/game_loader.h"
     27#include "util/loading/new_resource_manager.h"
    2828
    2929#include "world_entity.h"
     
    301301
    302302  // unload the resources loaded in this Level !!
    303   ResourceManager::getInstance()->unloadAllByPriority(RP_LEVEL);
     303  /// FIXME TODO HACK!!
     304//  ResourceManager::getInstance()->unloadAllByPriority(RP_LEVEL);
    304305
    305306  if (State::getObjectManager() == this->objectManager)
     
    378379  {
    379380    PRINTF(3)("Setting Sound Track to %s\n", name.c_str());
    380     std::string oggFile = ResourceManager::getFullName(name);
     381    std::string oggFile = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(name);
    381382    this->music = new OrxSound::OggPlayer(oggFile);
    382383    if (this->localPlayer != NULL)
  • branches/new_class_id/src/story_entities/menu/game_menu.cc

    r9716 r9833  
    2525#include "util/loading/load_param.h"
    2626#include "util/loading/factory.h"
    27 #include "util/loading/resource_manager.h"
    2827
    2928#include "graphics_engine.h"
  • branches/new_class_id/src/story_entities/multi_player_world_data.cc

    r9715 r9833  
    1818#include "multi_player_world_data.h"
    1919
    20 #include "util/loading/resource_manager.h"
    2120#include "state.h"
    2221#include "substring.h"
  • branches/new_class_id/src/story_entities/story_entity.cc

    r9729 r9833  
    2222#include "story_entity.h"
    2323
    24 #include "util/loading/load_param.h"
    25 #include "util/loading/resource_manager.h"
     24#include "loading/load_param.h"
     25#include "loading/new_resource_manager.h"
    2626
    2727#include "debug.h"
     
    107107  }
    108108  else
    109     this->loadFile = ResourceManager::getFullName(fileName);
     109    this->loadFile = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    110110
    111111  this->grabWorldInfo();
  • branches/new_class_id/src/world_entities/bsp_entity.cc

    r9727 r9833  
    1515
    1616#include "bsp_entity.h"
    17 #include "util/loading/resource_manager.h"
    18 #include "util/loading/resource_manager.h"
    1917
    2018#include "debug.h"
     19#include "loading/new_resource_manager.h"
    2120
    2221#include "class_id_DEPRECATED.h"
     
    7271
    7372  // Check wether file exists....
    74   if ( File(ResourceManager::getFullName(name)).exists()  ) {
     73  if ( File(Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(name)).exists()  ) {
    7574
    7675    this->bspManager = new BspManager(this);
  • branches/new_class_id/src/world_entities/creatures/md2_creature.cc

    r9716 r9833  
    2222#include "objModel.h"
    2323#include "md2/md2Model.h"
    24 #include "util/loading/resource_manager.h"
    2524#include "state.h"
    2625
  • branches/new_class_id/src/world_entities/environment.cc

    r9716 r9833  
    1919
    2020#include "environment.h"
    21 
    22 #include "util/loading/resource_manager.h"
    2321
    2422#include "objModel.h"
  • branches/new_class_id/src/world_entities/environments/mapped_water.cc

    r9821 r9833  
    1717#include "util/loading/load_param.h"
    1818#include "util/loading/factory.h"
    19 #include "util/loading/resource_manager.h"
    2019#include "state.h"
    2120#include "t_animation.h"
  • branches/new_class_id/src/world_entities/npcs/generic_npc.cc

    r9808 r9833  
    2929#include "resource_sound_buffer.h"
    3030
    31 #include "loading/resource_manager.h"
    3231#include "sound/resource_sound_buffer.h"
    3332
  • branches/new_class_id/src/world_entities/recorder.cc

    r9727 r9833  
    1818#include "util/loading/load_param.h"
    1919#include "util/loading/factory.h"
    20 #include "util/loading/resource_manager.h"
    2120#include "state.h"
    2221#include "debug.h"
  • branches/new_class_id/src/world_entities/satellite.h

    r9715 r9833  
    99#include "world_entity.h"
    1010#include "comincl.h"
    11 #include "util/loading/resource_manager.h"
    12 
    1311
    1412class CharacterAttributes;
  • branches/new_class_id/src/world_entities/skydome.cc

    r9727 r9833  
    2323#include "network_game_manager.h"
    2424#include "converter.h"
    25 #include "util/loading/resource_manager.h"
    2625
    2726#include "debug.h"
  • branches/new_class_id/src/world_entities/terrain.cc

    r9727 r9833  
    1818#include "terrain.h"
    1919
     20#include "util/loading/new_resource_manager.h"
    2021#include "util/loading/load_param.h"
    2122#include "util/loading/factory.h"
    2223#include "spatial_separation.h"
    2324
    24 #include "util/loading/resource_manager.h"
    2525#include "model.h"
    2626#include "network_game_manager.h"
     
    9393  if( this->ssp)
    9494    delete ssp;
    95   if (this->vegetation)
    96   {
    97     ResourceManager::getInstance()->unload(this->vegetation);
    98   }
    9995
    10096  if(this->heightMap)
     
    148144  this->heightMap = NULL;
    149145
    150   std::string hmName = ResourceManager::getFullName(heightMapFile);
    151   std::string hmColorName = ResourceManager::getFullName(colorMap);
     146  std::string hmName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(heightMapFile);
     147  std::string hmColorName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(colorMap);
    152148
    153149
     
    181177  PRINTF(4)("loadVegetation: %s\n", vegetationFile.c_str());
    182178  if (this->vegetation)
    183     ResourceManager::getInstance()->unload(this->vegetation, RP_LEVEL);
     179    this->vegetation = 0;
    184180  if (!vegetationFile.empty())
    185181  {
    186182    PRINTF(4)("fetching %s\n", vegetationFile.c_str());
    187     this->vegetation = dynamic_cast<Model*>(ResourceManager::getInstance()->load(vegetationFile, OBJ, RP_CAMPAIGN));
     183    this->loadModel(vegetationFile, 1.0, 2);
     184    this->vegetation = this->getModel(2);
    188185  }
    189186  else
  • branches/new_class_id/src/world_entities/weather_effects/atmospheric_engine.cc

    r9760 r9833  
    1515
    1616#include "atmospheric_engine.h"
    17 
    18 #include "util/loading/resource_manager.h"
    1917
    2018#include "weather_effects/fog_effect.h"
  • branches/new_class_id/src/world_entities/weather_effects/cloud_effect.cc

    r9821 r9833  
    1919#include "util/loading/load_param.h"
    2020#include "util/loading/factory.h"
    21 #include "util/loading/resource_manager.h"
    2221
    2322#include "material.h"
Note: See TracChangeset for help on using the changeset viewer.