45 ret |= sprite->reset();
57 ret |= sprite->play(action);
114 ret |= sprite->setDirection(direction);
169 if (sprite && sprite->getDuration() >
duration)
176static void updateValues(
int &dimension,
int &pos,
int imgDimUL,
int imgDimRD,
int imgOffset)
179 int temp = -(pos + imgOffset - imgDimUL);
187 temp = pos + imgOffset + imgDimRD;
188 if (temp > dimension)
197 mWidth = baseSprite ? baseSprite->getWidth() : 0;
198 mHeight = baseSprite ? baseSprite->getHeight() : 0;
206 if (Image::getLoadAsOpenGL())
228 sprite->getWidth() / 2,
229 sprite->getWidth() / 2,
230 sprite->getOffsetX());
235 sprite->getOffsetY());
247#if SDL_BYTEORDER == SDL_BIG_ENDIAN
248 int rmask = 0xff000000;
249 int gmask = 0x00ff0000;
250 int bmask = 0x0000ff00;
251 int amask = 0x000000ff;
253 int rmask = 0x000000ff;
254 int gmask = 0x0000ff00;
255 int bmask = 0x00ff0000;
256 int amask = 0xff000000;
266 graphics->setBlitMode(Graphics::BLIT_GFX);
277 posY - sprite->getHeight());
std::vector< Sprite * > mSprites
bool draw(Graphics *graphics, int posX, int posY) const
int getNumberOfLayers() const
bool play(const std::string &action)
void ensureSize(size_t layerCount)
void set(int layer, Sprite *sprite)
bool setDirection(SpriteDirection direction)
int getMaxDuration() const
A central point of control for graphics.
bool drawImage(const Image *image, int x, int y)
Blits an image onto the screen.
void _beginDraw() override
int getWidth() const
Returns the logical width of the screen.
static Resource * load(SDL_RWops *rw)
Loads an image from an SDL_RWops structure.
void setAlpha(float alpha)
Sets the alpha value of this image.
Animates a sprite by adding playback state.
void delete_all(Container &c)