22 #ifndef DRACI_SPRITE_H 23 #define DRACI_SPRITE_H 25 #include "common/scummsys.h" 26 #include "common/rect.h" 37 double extraScaleX, extraScaleY;
47 virtual void draw(
Surface *surface,
bool markDirty,
int relX,
int relY)
const = 0;
48 virtual void drawReScaled(
Surface *surface,
bool markDirty,
const Displacement &displacement)
const = 0;
52 uint getWidth()
const {
return _width; }
53 uint getHeight()
const {
return _height; }
55 uint getScaledWidth()
const {
return _scaledWidth; }
56 uint getScaledHeight()
const {
return _scaledHeight; }
58 void setScaled(uint width, uint height) {
60 _scaledHeight = height;
63 int getX()
const {
return _x; }
64 int getY()
const {
return _y; }
66 void setX(
int x) { _x = x; }
67 void setY(
int y) { _y = y; }
69 void setDelay(
int delay) { _delay = delay; }
70 int getDelay()
const {
return _delay; }
74 virtual DrawableType getType()
const = 0;
105 Sprite(uint16 width, uint16 height, byte *raw_data,
int x,
int y,
bool columnwise);
112 Sprite(
const byte *sprite_data, uint16 length,
int x,
int y,
bool columnwise);
116 void draw(
Surface *surface,
bool markDirty,
int relX,
int relY)
const override;
117 void drawReScaled(
Surface *surface,
bool markDirty,
const Displacement &displacement)
const override;
119 void setMirrorOn() { _mirror =
true; }
120 void setMirrorOff() { _mirror =
false; }
124 const byte *getBuffer()
const {
return _data; }
125 int getPixel(
int x,
int y,
const Displacement &displacement)
const;
127 DrawableType getType()
const override {
return kDrawableSprite; }
139 int x,
int y, uint spacing);
143 void setColor(byte fontColor) { _color = fontColor; }
144 void setSpacing(uint spacing) { _spacing = spacing; }
145 void setFont(
const Font *font);
147 void repeatedlySplitLongLines(uint maxWidth);
149 uint getLength()
const {
return _length; }
151 void draw(
Surface *surface,
bool markDirty,
int relX,
int relY)
const override;
155 void drawReScaled(
Surface *surface,
bool markDirty,
const Displacement &displacement)
const override { draw(surface, markDirty, displacement.relX, displacement.relY); }
158 DrawableType getType()
const override {
return kDrawableText; }
160 void splitLinesLongerThan(uint maxWidth);
171 #endif // DRACI_SPRITE_H
uint _height
Height of the sprite.
Definition: sprite.h:78
uint _scaledWidth
Scaled width of the sprite.
Definition: sprite.h:79
int _y
Sprite coordinates.
Definition: sprite.h:81
uint _width
Width of the sprite.
Definition: sprite.h:77
uint _scaledHeight
Scaled height of the sprite.
Definition: sprite.h:80
int _delay
Definition: sprite.h:86
Definition: animation.h:30