home *** CD-ROM | disk | FTP | other *** search
/ Game.EXE 2002 April / Game.EXE_04_2002.iso / Alawar / PictureFormatManager.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2002-02-25  |  470 b   |  20 lines

  1. #include "PictureFormatManager.h"
  2. #include "BMPPictureFormat.h"
  3. #include "TwinPictureFormat.h"
  4. #include "safe_new.h"
  5.  
  6. PictureFormat * PictureFormatManager::create_format(const String & name)
  7. {
  8.     TwinPictureFormat * twinf = new TwinPictureFormat( name );
  9.     if( twinf->colors() )
  10.         return twinf;
  11.     delete twinf; twinf = 0;
  12.  
  13.     BMPPictureFormat * bmpf = new BMPPictureFormat( name );
  14.     if( bmpf->colors() )
  15.         return bmpf;
  16.     delete bmpf; bmpf = 0;
  17.  
  18.     return 0;
  19. }
  20.