ScummVM API documentation
Sludge::HSIDecoder Class Reference
Inheritance diagram for Sludge::HSIDecoder:
Image::ImageDecoder

Public Member Functions

void destroy () override
 
bool loadStream (Common::SeekableReadStream &stream) override
 
Graphics::SurfacegetSurface () const override
 
void setReserve (bool reserve)
 
- Public Member Functions inherited from Image::ImageDecoder
virtual const byte * getPalette () const
 
virtual bool hasPalette () const
 
virtual uint16 getPaletteColorCount () const
 
virtual bool hasTransparentColor () const
 
virtual uint32 getTransparentColor () const
 

Member Function Documentation

◆ destroy()

void Sludge::HSIDecoder::destroy ( )
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.

◆ loadStream()

bool Sludge::HSIDecoder::loadStream ( Common::SeekableReadStream stream)
overridevirtual

Load an image from the specified stream.

loadStream() should implicitly call destroy() to free the memory of the last loadStream() call.

Parameters
streamInput stream.
Returns
Whether loading the file succeeded.
See also
getSurface
getPalette

Implements Image::ImageDecoder.

◆ getSurface()

Graphics::Surface* Sludge::HSIDecoder::getSurface ( ) const
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.

Returns
The decoded surface, or 0 if no surface is present.

Implements Image::ImageDecoder.


The documentation for this class was generated from the following file: