ScummVM API documentation
BRC decoder

Description

Decoder for BRC images.

Classes

class  Image::BRCDecoder
 

Functions

void Image::BRCDecoder::destroy () override
 
bool Image::BRCDecoder::loadStream (Common::SeekableReadStream &stream) override
 
const Graphics::SurfaceImage::BRCDecoder::getSurface () const override
 
const Graphics::PaletteImage::BRCDecoder::getPalette () const override
 

Function Documentation

◆ destroy()

void Image::BRCDecoder::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 Image::BRCDecoder::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()

const Graphics::Surface* Image::BRCDecoder::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.

◆ getPalette()

const Graphics::Palette& Image::BRCDecoder::getPalette ( ) const
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.

Returns
The decoded palette, or empty if no palette is present.

Implements Image::ImageDecoder.