Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9833 in orxonox.OLD for branches/new_class_id/src/lib/graphics


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/lib/graphics
Files:
11 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"
Note: See TracChangeset for help on using the changeset viewer.