Changeset 9836 in orxonox.OLD for branches/new_class_id/src/lib/graphics/importer
- Timestamp:
- Sep 26, 2006, 5:16:10 PM (18 years ago)
- 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 35 35 \ 36 36 md2/md2Model.cc \ 37 md2/resource_md2.cc \38 \37 md2/resource_md2.cc 38 # \ 39 39 md3/md3_model.cc \ 40 40 md3/md3_animation.cc \ -
branches/new_class_id/src/lib/graphics/importer/bsp_file.cc
r9833 r9836 22 22 #include "bsp_tree_node.h" 23 23 #include <fstream> 24 #include "util/loading/ new_resource_manager.h"24 #include "util/loading/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 = Resources:: NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);468 absFileName = Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(fileName); 469 469 470 470 if(File(absFileName).exists()) { … … 481 481 strncat (fileName, ext, strlen(fileName)); 482 482 483 absFileName = Resources:: NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);483 absFileName = Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(fileName); 484 484 485 485 if(File(absFileName).exists()) { … … 496 496 strncat (fileName, ext, strlen(fileName)); 497 497 498 absFileName = Resources:: NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);498 absFileName = Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(fileName); 499 499 500 500 if(File(absFileName).exists()) { … … 511 511 strncat (fileName, ext, strlen(fileName)); 512 512 513 absFileName = Resources:: NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);513 absFileName = Resources::ResourceManager::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 = Resources:: NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);526 absFileName = Resources::ResourceManager::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 = Resources:: NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);539 absFileName = Resources::ResourceManager::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 = Resources:: NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);553 absFileName = Resources::ResourceManager::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 = Resources:: NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);568 absFileName = Resources::ResourceManager::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 = Resources:: NewResourceManager::getInstance()->prependAbsoluteMainPath(fileName);582 absFileName = Resources::ResourceManager::getInstance()->prependAbsoluteMainPath(fileName); 583 583 584 584 if(File(absFileName).exists()) { … … 611 611 this->testSurf = NULL; 612 612 613 this->testSurf = IMG_Load(Resources:: NewResourceManager::getInstance()->prependAbsoluteMainPath(mat).c_str());613 this->testSurf = IMG_Load(Resources::ResourceManager::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
r9833 r9836 41 41 #include "world_entity.h" 42 42 43 #include "util/loading/ new_resource_manager.h"43 #include "util/loading/resource_manager.h" 44 44 #include "util/loading/load_param.h" 45 45 #include "util/loading/factory.h" … … 92 92 this->bspFile = new BspFile(); 93 93 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) 95 95 return -1; 96 96 -
branches/new_class_id/src/lib/graphics/importer/media_container.cc
r9833 r9836 25 25 #include "media_container.h" 26 26 27 #include "util/loading/ new_resource_manager.h"27 #include "util/loading/resource_manager.h" 28 28 /* header for debug output */ 29 29 #include "debug.h" … … 91 91 return false; 92 92 // check whether file exists 93 if(!Resources:: NewResourceManager::getInstance()->checkFileInMainPath(filename))93 if(!Resources::ResourceManager::getInstance()->checkFileInMainPath(filename)) 94 94 { 95 95 PRINTF(1)("Could not find %s\n", filename.c_str()); … … 101 101 102 102 // 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()); 106 106 return false; 107 107 } … … 110 110 if (av_find_stream_info(format_context) < 0) 111 111 { 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()); 113 113 return false; 114 114 } … … 119 119 if(video_stream == -1) 120 120 { 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()); 122 122 return false; 123 123 } -
branches/new_class_id/src/lib/graphics/importer/movie_player.cc
r9833 r9836 24 24 // include your own header 25 25 #include "movie_player.h" 26 #include "util/loading/ new_resource_manager.h"26 #include "util/loading/resource_manager.h" 27 27 28 28 // header for debug output … … 89 89 return false; 90 90 // check whether file exists 91 if(!Resources:: NewResourceManager::getInstance()->checkFileInMainPath(filename))91 if(!Resources::ResourceManager::getInstance()->checkFileInMainPath(filename)) 92 92 { 93 93 PRINTF(1)("Could not find %s\n", filename.c_str()); … … 99 99 100 100 // 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()); 104 104 return false; 105 105 } … … 108 108 if (av_find_stream_info(format_context) < 0) 109 109 { 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()); 111 111 return false; 112 112 } … … 117 117 if(video_stream == -1) 118 118 { 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()); 120 120 return false; 121 121 }
Note: See TracChangeset
for help on using the changeset viewer.