22 #ifndef XEEN_SPRITES_H 23 #define XEEN_SPRITES_H 25 #include "common/scummsys.h" 26 #include "common/array.h" 27 #include "common/file.h" 28 #include "graphics/surface.h" 29 #include "xeen/files.h" 30 #include "xeen/xsurface.h" 38 SCALE_MASK = 0x7FFF, SCALE_ENLARGE = 0x8000
42 SPRFLAG_MODE_MASK = 0xF00, SPRFLAG_DRAWER1 = 0x100, SPRFLAG_DRAWER2 = 0x200,
43 SPRFLAG_DRAWER3 = 0x300, SPRFLAG_DRAWER4 = 0x400, SPRFLAG_DRAWER5 = 0x500, SPRFLAG_DRAWER6 = 0x600,
44 SPRFLAG_DRAWER7 = 0x700, SPRFLAG_800 = 0x800, SPRFLAG_SCENE_CLIPPED = 0x2000,
45 SPRFLAG_BOTTOM_CLIPPED = 0x4000, SPRFLAG_HORIZ_FLIPPED = 0x8000, SPRFLAG_RESIZE = 0x10000
51 uint16 _offset1, _offset2;
57 static int _clippedBottom;
73 void draw(
int windowNum,
int frame,
const Common::Point &destPos,
118 uint flags = 0,
int scale = 0);
130 uint flags = 0,
int scale = 0);
141 void draw(
int windowIndex,
int frame,
const Common::Point &destPos,
142 uint flags = 0,
int scale = 0);
149 void draw(
XSurface &dest,
int frame);
156 void draw(
int windowIndex,
int frame);
188 byte *_destTop, *_destBottom;
189 byte *_destLeft, *_destRight;
195 static uint getScaledVal(
int xy, uint16 &scaleMask);
200 void rcr(uint16 &val,
bool &cf);
205 virtual void drawPixel(byte *dest, byte pixel);
210 SpriteDrawer(byte *data,
size_t filesize) : _data(data), _filesize(filesize) {}
231 void drawPixel(byte *dest, byte pixel)
override;
245 uint16 _mask1, _mask2;
246 uint16 _random1, _random2;
251 void drawPixel(byte *dest, byte pixel)
override;
264 uint16 _offset, _mask;
265 byte _palette[256 * 3];
271 void drawPixel(byte *dest, byte pixel)
override;
286 void drawPixel(byte *dest, byte pixel)
override;
299 uint16 _threshold, _random1, _random2;
304 void drawPixel(byte *dest, byte pixel)
override;
319 void drawPixel(byte *dest, byte pixel)
override;
Definition: sprites.h:279
Definition: sprites.h:243
Definition: xsurface.h:43
virtual ~SpriteDrawer()
Definition: sprites.h:215
Definition: sprites.h:262
Definition: sprites.h:224
bool empty() const
Definition: sprites.h:171
Graphics::Surface * scale(const Graphics::Surface &srcImage, int xSize, int ySize)
Definition: sprites.h:312
static void setClippedBottom(int y)
Definition: sprites.h:177
Common::Point getFrameSize(int frame) const
size_type size() const
Definition: array.h:272
Definition: sprites.h:297
Definition: sprites.h:183
size_t size() const
Definition: sprites.h:166
SpriteResource & operator=(const SpriteResource &src)
Definition: character.h:33
SpriteDrawer(byte *data, size_t filesize)
Definition: sprites.h:210