#include <sprite.h>
Public Member Functions | |
| Sprite (uint16 width, uint16 height, byte *raw_data, int x, int y, bool columnwise) | |
| Sprite (const byte *sprite_data, uint16 length, int x, int y, bool columnwise) | |
| void | draw (Surface *surface, bool markDirty, int relX, int relY) const override |
| void | drawReScaled (Surface *surface, bool markDirty, const Displacement &displacement) const override |
| void | setMirrorOn () |
| void | setMirrorOff () |
| Common::Rect | getRect (const Displacement &displacement) const override |
| const byte * | getBuffer () const |
| int | getPixel (int x, int y, const Displacement &displacement) const |
| DrawableType | getType () const override |
Public Member Functions inherited from Draci::Drawable | |
| uint | getWidth () const |
| uint | getHeight () const |
| uint | getScaledWidth () const |
| uint | getScaledHeight () const |
| void | setScaled (uint width, uint height) |
| int | getX () const |
| int | getY () const |
| void | setX (int x) |
| void | setY (int y) |
| void | setDelay (int delay) |
| int | getDelay () const |
Additional Inherited Members | |
Protected Attributes inherited from Draci::Drawable | |
| uint | _width |
| Width of the sprite. | |
| uint | _height |
| Height of the sprite. | |
| uint | _scaledWidth |
| Scaled width of the sprite. | |
| uint | _scaledHeight |
| Scaled height of the sprite. | |
| int | _x |
| int | _y |
| Sprite coordinates. | |
| int | _delay |
Represents a Draci Historie sprite. Supplies two constructors; one for loading a sprite from a raw data buffer and one for loading a sprite in the Draci sprite format. Supports loading the sprite from a column-wise format (transforming them to row-wise) since that is the way the sprites are stored in the original game files.
Sprite format: [uint16LE] sprite width [uint16LE] sprite height [height * width bytes] image pixels stored column-wise, one byte per pixel