#include <imageloader.h>
Public Member Functions | |
U4ImageDecoder (int width, int height, int bpp) | |
void | destroy () override |
const Graphics::Surface * | getSurface () const override |
const Graphics::Palette & | getPalette () const override |
![]() | |
virtual bool | loadStream (Common::SeekableReadStream &stream)=0 |
virtual bool | hasPalette () const |
virtual bool | hasTransparentColor () const |
virtual uint32 | getTransparentColor () const |
virtual const Graphics::Surface * | getMask () const |
virtual bool | hasMask () const |
Protected Member Functions | |
void | setFromRawData (const byte *rawData) |
Graphics::PixelFormat | getPixelFormatForBpp () const |
Protected Attributes | |
Graphics::Surface * | _surface |
Graphics::Palette | _palette |
int | _width |
int | _height |
int | _bpp |
A common base for all Ultima 4 image loaders.
|
overridevirtual |
Destroy this decoder's surface and palette.
This should be called by a loadStream() implementation as well as by the destructor.
Implements Image::ImageDecoder.
|
inlineoverridevirtual |
Get the decoded surface.
This surface is owned by this ImageDecoder and remains valid until destroy() or loadStream() is called, or until the destructor of this ImageDecoder is called.
Implements Image::ImageDecoder.
|
inlineoverridevirtual |
Get the decoded palette.
This palette is owned by this ImageDecoder and remains valid until destroy() or loadStream() is called, or until the destructor of this ImageDecoder is called.
Implements Image::ImageDecoder.
|
protected |
Fill in the image pixel data from an uncompressed string of bytes.
|
protected |
Get the expected pixel format based on the value of _bpp.