Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Location:
branches/new_class_id/src/lib/graphics/importer
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/graphics/importer/Makefile.am

    r9831 r9836  
    3535                \
    3636                md2/md2Model.cc \
    37                 md2/resource_md2.cc \
    38                 \
     37                md2/resource_md2.cc
     38#               \
    3939                md3/md3_model.cc \
    4040                md3/md3_animation.cc \
  • branches/new_class_id/src/lib/graphics/importer/bsp_file.cc

    r9833 r9836  
    2222#include "bsp_tree_node.h"
    2323#include <fstream>
    24 #include "util/loading/new_resource_manager.h"
     24#include "util/loading/resource_manager.h"
    2525
    2626#include <sys/stat.h>
     
    466466    PRINTF(4)("BSP FILE: Name %s . \n", fileName);
    467467
    468     absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
     468    absFileName = Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    469469
    470470    if(File(absFileName).exists()) {
     
    481481    strncat (fileName, ext, strlen(fileName));
    482482
    483     absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
     483    absFileName = Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    484484
    485485    if(File(absFileName).exists()) {
     
    496496    strncat (fileName, ext, strlen(fileName));
    497497
    498     absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
     498    absFileName = Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    499499
    500500    if(File(absFileName).exists()) {
     
    511511    strncat (fileName, ext, strlen(fileName));
    512512
    513     absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
     513    absFileName = Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    514514
    515515    if(File(absFileName).exists()) {
     
    524524    strcpy(ext, ".TGA");
    525525    strncat (fileName, ext, strlen(fileName));
    526     absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
     526    absFileName = Resources::ResourceManager::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 = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
     539    absFileName = Resources::ResourceManager::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 = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
     553    absFileName = Resources::ResourceManager::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 = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
     568    absFileName = Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    569569
    570570    if(File(absFileName).exists()) {
     
    580580    strcpy(ext, ".BMP");
    581581    strncat (fileName, ext, strlen(fileName));
    582     absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
     582    absFileName = Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(fileName);
    583583
    584584    if(File(absFileName).exists()) {
     
    611611  this->testSurf = NULL;
    612612
    613   this->testSurf = IMG_Load(Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(mat).c_str());
     613  this->testSurf = IMG_Load(Resources::ResourceManager::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

    r9833 r9836  
    4141#include "world_entity.h"
    4242
    43 #include "util/loading/new_resource_manager.h"
     43#include "util/loading/resource_manager.h"
    4444#include "util/loading/load_param.h"
    4545#include "util/loading/factory.h"
     
    9292  this->bspFile = new BspFile();
    9393  this->bspFile->scale =  scale;
    94   if(this->bspFile->read(Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName).c_str()) == -1)
     94  if(this->bspFile->read(Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(fileName).c_str()) == -1)
    9595    return -1;
    9696
  • branches/new_class_id/src/lib/graphics/importer/media_container.cc

    r9833 r9836  
    2525#include "media_container.h"
    2626
    27 #include "util/loading/new_resource_manager.h"
     27#include "util/loading/resource_manager.h"
    2828/* header for debug output */
    2929#include "debug.h"
     
    9191    return false;
    9292  // check whether file exists
    93   if(!Resources::NewResourceManager::getInstance()->checkFileInMainPath(filename))
     93  if(!Resources::ResourceManager::getInstance()->checkFileInMainPath(filename))
    9494  {
    9595    PRINTF(1)("Could not find %s\n", filename.c_str());
     
    101101
    102102  // Open video file
    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());
     103  if (av_open_input_file(&format_context, Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str(), NULL, 0, NULL) !=0 )
     104  {
     105    PRINTF(1)("Could not open %s\n", Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
    106106    return false;
    107107  }
     
    110110  if (av_find_stream_info(format_context) < 0)
    111111  {
    112     PRINTF(1)("Could not find stream information in %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
     112    PRINTF(1)("Could not find stream information in %s\n", Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
    113113    return false;
    114114  }
     
    119119  if(video_stream == -1)
    120120  {
    121     PRINTF(1)("Could not find a video stream in %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
     121    PRINTF(1)("Could not find a video stream in %s\n", Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
    122122    return false;
    123123  }
  • branches/new_class_id/src/lib/graphics/importer/movie_player.cc

    r9833 r9836  
    2424// include your own header
    2525#include "movie_player.h"
    26 #include "util/loading/new_resource_manager.h"
     26#include "util/loading/resource_manager.h"
    2727
    2828// header for debug output
     
    8989    return false;
    9090  // check whether file exists
    91   if(!Resources::NewResourceManager::getInstance()->checkFileInMainPath(filename))
     91  if(!Resources::ResourceManager::getInstance()->checkFileInMainPath(filename))
    9292  {
    9393    PRINTF(1)("Could not find %s\n", filename.c_str());
     
    9999
    100100  // Open video file
    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());
     101  if (av_open_input_file(&format_context, Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str(), NULL, 0, NULL) !=0 )
     102  {
     103    PRINTF(1)("Could not open %s\n", Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
    104104    return false;
    105105  }
     
    108108  if (av_find_stream_info(format_context) < 0)
    109109  {
    110     PRINTF(1)("Could not find stream information in %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
     110    PRINTF(1)("Could not find stream information in %s\n", Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
    111111    return false;
    112112  }
     
    117117  if(video_stream == -1)
    118118  {
    119     PRINTF(1)("Could not find a video stream in %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
     119    PRINTF(1)("Could not find a video stream in %s\n", Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
    120120    return false;
    121121  }
Note: See TracChangeset for help on using the changeset viewer.