1 #ifndef KMJTS_HH 2 #define KMJTS_HH 3 #include <lcdfgif/gif.h> 4 #include <lcdfgif/gifx.h> 5 #include "tileset.hh" 6 7 class KyodaiTileset: public Tileset { 8 9 enum ImageError { 10 ieNone = 0, 11 ieBadGif, 12 ieBadSize, 13 }; 14 15 Gif_Stream *_gfs; 16 Gif_XContext *_gifx; 17 Gif_Colormap *_colormap; 18 Gif_Colormap *_hi_colormap; 19 Gif_Colormap *_background_colormap; 20 int _image_error; 21 22 Vector<Pixmap> _images; 23 Pixmap _background; 24 Pixmap _background_mask; 25 26 void initialize_images(); 27 void check_images(); 28 bool check() const; 29 void initialize(); 30 31 void draw(SwDrawable *, short, short, short); 32 33 public: 34 35 KyodaiTileset(Gif_Stream *, Gif_XContext *); 36 ~KyodaiTileset(); 37 ok() const38 bool ok() const { return _gfs; } 39 40 void draw_normal(const Tile *, SwDrawable *, short x, short y); 41 void draw_lit(const Tile *, SwDrawable *, short x, short y); 42 void draw_obscured(const Tile *, SwDrawable *, short x, short y); 43 44 }; 45 46 #endif 47