#include <graphics.h>
Protected Member Functions | |
| AnimationBase (Common::String fileName, AnimationFolder folder=AnimationFolder::Animations) | |
| void | load () |
| void | loadMissingAnimation () |
| void | freeImages () |
| Graphics::ManagedSurface * | readImage (Common::SeekableReadStream &stream) const |
| Common::Point | imageSize (int32 imageI) const |
| bool | isLoaded () const |
Static Protected Member Functions | |
| static void | fullBlend (const Graphics::ManagedSurface &source, Graphics::ManagedSurface &destination, int offsetX, int offsetY) |
Protected Attributes | |
| Common::String | _fileName |
| AnimationFolder | _folder |
| bool | _isLoaded = false |
| uint32 | _totalDuration = 0 |
| int32 | _spriteIndexMapping [kMaxSpriteIDs] = { 0 } |
| Common::Array< uint32 > | _spriteOffsets |
| index offset per sprite and animation frame | |
| Common::Array< uint32 > | _spriteBases |
| base index per sprite | |
| Common::Array< AnimationFrame > | _frames |
| Common::Array< Graphics::ManagedSurface * > | _images |
| will contain nullptr for fake images | |
| Common::Array< Common::Point > | _imageOffsets |
Static Protected Attributes | |
| static constexpr const uint | kMaxSpriteIDs = 256 |
An animation contains one or more sprites which change their position and image during playback.
Internally there is a single list of images. Every sprite ID is mapped to an index (via _spriteIndexMapping) which points to:
As fonts are handled very differently they are split into a second class