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

  1. #ifndef PICTUREFORMAT_H
  2. #define PICTUREFORMAT_H
  3.  
  4. class Color;
  5.  
  6. class PictureFormat
  7. {
  8.     PictureFormat(const PictureFormat &);
  9.     const PictureFormat & operator=(const PictureFormat &);
  10. public:
  11.     PictureFormat()
  12.     {}
  13.     virtual ~PictureFormat()
  14.     {}
  15.     virtual unsigned width()const =0;
  16.     virtual unsigned height()const =0;
  17.     virtual const Color * colors()const =0;
  18.     
  19.     unsigned get_shift(unsigned x, unsigned y )const
  20.     {
  21.         return x + y * width();
  22.     }
  23. };
  24.  
  25. #endif //PICTUREFORMAT_H