Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.