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