Changeset 9833 in orxonox.OLD for branches/new_class_id/src/lib/graphics/importer
- Timestamp:
- Sep 26, 2006, 4:59:49 PM (18 years ago)
- Location:
- branches/new_class_id/src/lib/graphics/importer
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/graphics/importer/bsp_file.cc
r9406 r9833 22 22 #include "bsp_tree_node.h" 23 23 #include <fstream> 24 #include "util/loading/ resource_manager.h"24 #include "util/loading/new_resource_manager.h" 25 25 26 26 #include <sys/stat.h> … … 466 466 PRINTF(4)("BSP FILE: Name %s . \n", fileName); 467 467 468 absFileName = Resource Manager::getFullName(fileName);468 absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName); 469 469 470 470 if(File(absFileName).exists()) { … … 481 481 strncat (fileName, ext, strlen(fileName)); 482 482 483 absFileName = Resource Manager::getFullName(fileName);483 absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName); 484 484 485 485 if(File(absFileName).exists()) { … … 496 496 strncat (fileName, ext, strlen(fileName)); 497 497 498 absFileName = Resource Manager::getFullName(fileName);498 absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName); 499 499 500 500 if(File(absFileName).exists()) { … … 511 511 strncat (fileName, ext, strlen(fileName)); 512 512 513 absFileName = Resource Manager::getFullName(fileName);513 absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName); 514 514 515 515 if(File(absFileName).exists()) { … … 524 524 strcpy(ext, ".TGA"); 525 525 strncat (fileName, ext, strlen(fileName)); 526 absFileName = Resource Manager::getFullName(fileName);526 absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName); 527 527 528 528 if(File(absFileName).exists()/*stat( absFileName.c_str() , &results) == 0*/) { … … 537 537 strcpy(ext, ".jpg"); 538 538 strncat (fileName, ext, strlen(fileName)); 539 absFileName = Resource Manager::getFullName(fileName);539 absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName); 540 540 if(File(absFileName).exists()) { 541 541 PRINTF(4)("BSP FILE: gefunden . \n"); … … 551 551 strcpy(ext, ".JPG"); 552 552 strncat (fileName, ext, strlen(fileName)); 553 absFileName = Resource Manager::getFullName(fileName);553 absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName); 554 554 if(File(absFileName).exists()) { 555 555 PRINTF(4)("BSP FILE: gefunden . \n"); … … 566 566 strcpy(ext, ".bmp"); 567 567 strncat (fileName, ext, strlen(fileName)); 568 absFileName = Resource Manager::getFullName(fileName);568 absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName); 569 569 570 570 if(File(absFileName).exists()) { … … 580 580 strcpy(ext, ".BMP"); 581 581 strncat (fileName, ext, strlen(fileName)); 582 absFileName = Resource Manager::getFullName(fileName);582 absFileName = Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName); 583 583 584 584 if(File(absFileName).exists()) { … … 611 611 this->testSurf = NULL; 612 612 613 this->testSurf = IMG_Load(Resource Manager::getFullName(mat).c_str());613 this->testSurf = IMG_Load(Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(mat).c_str()); 614 614 if(this->testSurf != NULL) { 615 615 if(this->testSurf->format->Amask != 0 ) tmpAMat.alpha = true; -
branches/new_class_id/src/lib/graphics/importer/bsp_manager.cc
r9235 r9833 33 33 #include "world_entities/player.h" 34 34 #include "world_entities/playable.h" 35 #include "util/loading/resource_manager.h" 35 36 36 // STL Containers 37 37 #include <vector> … … 41 41 #include "world_entity.h" 42 42 43 #include "util/loading/new_resource_manager.h" 43 44 #include "util/loading/load_param.h" 44 45 #include "util/loading/factory.h" … … 91 92 this->bspFile = new BspFile(); 92 93 this->bspFile->scale = scale; 93 if(this->bspFile->read(Resource Manager::getFullName(fileName).c_str()) == -1)94 if(this->bspFile->read(Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName).c_str()) == -1) 94 95 return -1; 95 96 … … 1376 1377 if( this->outputFraction == 1.0f) // No collision Detected 1377 1378 { 1378 if( this->outputAllSolid ) 1379 if( this->outputAllSolid ) 1379 1380 { 1380 1381 this->collPlane = new plane; -
branches/new_class_id/src/lib/graphics/importer/height_map.cc
r9715 r9833 22 22 #include "p_node.h" 23 23 #include "state.h" 24 #include "util/loading/resource_manager.h"25 24 #include "debug.h" 26 25 -
branches/new_class_id/src/lib/graphics/importer/material.cc
r9823 r9833 26 26 27 27 #include "resource_texture.h" 28 //#include "util/loading/resource_manager.h"29 28 30 29 ObjectListDefinition(Material); -
branches/new_class_id/src/lib/graphics/importer/media_container.cc
r9715 r9833 25 25 #include "media_container.h" 26 26 27 #include "util/loading/resource_manager.h" 28 27 #include "util/loading/new_resource_manager.h" 29 28 /* header for debug output */ 30 29 #include "debug.h" … … 92 91 return false; 93 92 // check whether file exists 94 if(!Resource Manager::isInDataDir(filename))93 if(!Resources::NewResourceManager::getInstance()->checkFileInMainPath(filename)) 95 94 { 96 95 PRINTF(1)("Could not find %s\n", filename.c_str()); … … 102 101 103 102 // Open video file 104 if (av_open_input_file(&format_context, Resource Manager::getFullName(filename).c_str(), NULL, 0, NULL) !=0 )105 { 106 PRINTF(1)("Could not open %s\n", Resource Manager::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()); 107 106 return false; 108 107 } … … 111 110 if (av_find_stream_info(format_context) < 0) 112 111 { 113 PRINTF(1)("Could not find stream information in %s\n", Resource Manager::getFullName(filename).c_str());112 PRINTF(1)("Could not find stream information in %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str()); 114 113 return false; 115 114 } … … 120 119 if(video_stream == -1) 121 120 { 122 PRINTF(1)("Could not find a video stream in %s\n", Resource Manager::getFullName(filename).c_str());121 PRINTF(1)("Could not find a video stream in %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str()); 123 122 return false; 124 123 } -
branches/new_class_id/src/lib/graphics/importer/movie_player.cc
r9715 r9833 24 24 // include your own header 25 25 #include "movie_player.h" 26 27 #include "util/loading/resource_manager.h" 26 #include "util/loading/new_resource_manager.h" 28 27 29 28 // header for debug output … … 90 89 return false; 91 90 // check whether file exists 92 if(!Resource Manager::isInDataDir(filename))91 if(!Resources::NewResourceManager::getInstance()->checkFileInMainPath(filename)) 93 92 { 94 93 PRINTF(1)("Could not find %s\n", filename.c_str()); … … 100 99 101 100 // Open video file 102 if (av_open_input_file(&format_context, Resource Manager::getFullName(filename).c_str(), NULL, 0, NULL) !=0 )103 { 104 PRINTF(1)("Could not open %s\n", Resource Manager::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()); 105 104 return false; 106 105 } … … 109 108 if (av_find_stream_info(format_context) < 0) 110 109 { 111 PRINTF(1)("Could not find stream information in %s\n", Resource Manager::getFullName(filename).c_str());110 PRINTF(1)("Could not find stream information in %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str()); 112 111 return false; 113 112 } … … 118 117 if(video_stream == -1) 119 118 { 120 PRINTF(1)("Could not find a video stream in %s\n", Resource Manager::getFullName(filename).c_str());119 PRINTF(1)("Could not find a video stream in %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str()); 121 120 return false; 122 121 }
Note: See TracChangeset
for help on using the changeset viewer.