Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7208 in orxonox.OLD for branches/std/src/lib/graphics


Ignore:
Timestamp:
Mar 10, 2006, 1:56:40 AM (19 years ago)
Author:
bensch
Message:

orxonox/std: less evil

Location:
branches/std/src/lib/graphics/importer
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/std/src/lib/graphics/importer/md2Model.cc

    r7207 r7208  
    513513    }
    514514
    515   this->skinFileName =fileName;
     515  this->skinFileName = fileName;
    516516
    517517  this->material.setName("md2ModelMaterial");
  • branches/std/src/lib/graphics/importer/media_container.cc

    r7203 r7208  
    3434 * Default constructor
    3535 */
    36 MediaContainer::MediaContainer(const char* filename)
     36MediaContainer::MediaContainer(const std::string& filename)
    3737{
    3838  // set the class id for the base object
     
    4141  fps = 0;
    4242  mediaLoaded = false;
    43 
    44   this->loadMedia(filename);
     43  if (!filename.empty())
     44    this->loadMedia(filename);
    4545}
    4646
     
    8484}
    8585
    86 bool MediaContainer::loadMedia(const char* filename)
     86bool MediaContainer::loadMedia(const std::string& filename)
    8787{
    8888  this->unloadMedia();
    8989
    90   if(filename == NULL)
     90  if(filename.empty())
    9191    return false;
    9292  // check whether file exists
    9393  if(!ResourceManager::isInDataDir(filename))
    9494  {
    95     PRINTF(1)("Could not find %s\n", filename);
     95    PRINTF(1)("Could not find %s\n", filename.c_str());
    9696    return false;
    9797  }
  • branches/std/src/lib/graphics/importer/media_container.h

    r6981 r7208  
    4444public:
    4545
    46   MediaContainer(const char* filename = NULL);
     46  MediaContainer(const std::string& filename = NULL);
    4747  virtual ~MediaContainer();
    4848
    49   bool loadMedia(const char* filename);
     49  bool loadMedia(const std::string& filename);
    5050  void loadFrames();
    5151
  • branches/std/src/lib/graphics/importer/movie_player.cc

    r7203 r7208  
    4242  mediaLoaded = false;
    4343
    44   this->loadMovie(filename);
    45 
     44  if (!filename.empty())
     45    this->loadMovie(filename);
    4646}
    4747
Note: See TracChangeset for help on using the changeset viewer.