ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <pict.h>

Inheritance diagram for Image::PICTDecoder:
Collaboration diagram for Image::PICTDecoder:

List of all members.

Classes

struct  PICTOpcode
struct  PixMap

Public Member Functions

 PICTDecoder ()
 ~PICTDecoder ()
bool loadStream (Common::SeekableReadStream &stream)
 Load an image from the specified stream.
void destroy ()
 Destroy this decoder's surface and palette.
const Graphics::SurfacegetSurface () const
 Get the decoded surface.
const bytegetPalette () const
 Get the decoded palette.
uint16 getPaletteColorCount () const
 Return the number of colors in the palette.

Static Public Member Functions

static PixMap readPixMap (Common::SeekableReadStream &stream, bool hasBaseAddr=true)

Private Types

typedef void(PICTDecoder::* OpcodeProcPICT )(Common::SeekableReadStream &stream)

Private Member Functions

void unpackBitsRect (Common::SeekableReadStream &stream, bool withPalette)
void unpackBitsLine (byte *out, uint32 length, Common::SeekableReadStream *stream, byte bitsPerPixel, byte bytesPerPixel)
void skipBitsRect (Common::SeekableReadStream &stream, bool withPalette)
void decodeCompressedQuickTime (Common::SeekableReadStream &stream)
void outputPixelBuffer (byte *&out, byte value, byte bitsPerPixel)
void setupOpcodesCommon ()
 DECLARE_OPCODE (o_nop)
 DECLARE_OPCODE (o_clip)
 DECLARE_OPCODE (o_txFont)
 DECLARE_OPCODE (o_txFace)
 DECLARE_OPCODE (o_pnSize)
 DECLARE_OPCODE (o_txSize)
 DECLARE_OPCODE (o_txRatio)
 DECLARE_OPCODE (o_versionOp)
 DECLARE_OPCODE (o_longText)
 DECLARE_OPCODE (o_longComment)
 DECLARE_OPCODE (o_opEndPic)
 DECLARE_OPCODE (o_headerOp)
void setupOpcodesNormal ()
 DECLARE_OPCODE (on_bitsRect)
 DECLARE_OPCODE (on_packBitsRect)
 DECLARE_OPCODE (on_directBitsRect)
 DECLARE_OPCODE (on_compressedQuickTime)
void setupOpcodesQuickTime ()
 DECLARE_OPCODE (oq_packBitsRect)
 DECLARE_OPCODE (oq_directBitsRect)
 DECLARE_OPCODE (oq_compressedQuickTime)

Private Attributes

Common::Rect _imageRect
byte _palette [256 *3]
uint16 _paletteColorCount
Graphics::Surface_outputSurface
bool _continueParsing
Common::Array< PICTOpcode_opcodes

Detailed Description

Definition at line 52 of file pict.h.


Member Typedef Documentation

typedef void(PICTDecoder::* Image::PICTDecoder::OpcodeProcPICT)(Common::SeekableReadStream &stream) [private]

Definition at line 99 of file pict.h.


Constructor & Destructor Documentation

Image::PICTDecoder::PICTDecoder (  ) 

Definition at line 39 of file pict.cpp.

Image::PICTDecoder::~PICTDecoder (  ) 

Definition at line 44 of file pict.cpp.


Member Function Documentation

Image::PICTDecoder::DECLARE_OPCODE ( o_nop   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( o_txFace   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( o_pnSize   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( oq_directBitsRect   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( oq_compressedQuickTime   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( on_compressedQuickTime   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( o_txSize   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( on_packBitsRect   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( o_txRatio   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( o_versionOp   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( o_longText   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( o_longComment   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( o_opEndPic   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( o_clip   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( o_headerOp   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( on_bitsRect   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( o_txFont   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( on_directBitsRect   )  [private]
Image::PICTDecoder::DECLARE_OPCODE ( oq_packBitsRect   )  [private]
void Image::PICTDecoder::decodeCompressedQuickTime ( Common::SeekableReadStream stream  )  [private]

Definition at line 543 of file pict.cpp.

void Image::PICTDecoder::destroy (  )  [virtual]

Destroy this decoder's surface and palette.

This should be called by a loadStream() implementation as well as the destructor.

Implements Image::ImageDecoder.

Definition at line 48 of file pict.cpp.

const byte* Image::PICTDecoder::getPalette (  )  const [inline, virtual]

Get the decoded palette.

This palette is owned by this ImageDecoder and will remain valid until destroy() or loadStream() is called, or until this ImageDecoder's destructor is called.

The palette's format is the same as PaletteManager's palette (interleaved RGB values).

Returns:
the decoded palette, or undefined if no palette is present

Reimplemented from Image::ImageDecoder.

Definition at line 61 of file pict.h.

uint16 Image::PICTDecoder::getPaletteColorCount (  )  const [inline, virtual]

Return the number of colors in the palette.

Reimplemented from Image::ImageDecoder.

Definition at line 62 of file pict.h.

const Graphics::Surface* Image::PICTDecoder::getSurface (  )  const [inline, virtual]

Get the decoded surface.

This surface is owned by this ImageDecoder and will remain valid until destroy() or loadStream() is called, or until this ImageDecoder's destructor is called.

Returns:
the decoded surface, or 0 if no surface is present

Implements Image::ImageDecoder.

Definition at line 60 of file pict.h.

bool Image::PICTDecoder::loadStream ( Common::SeekableReadStream stream  )  [virtual]

Load an image from the specified stream.

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

Parameters:
stream the input stream
Returns:
whether loading the file succeeded
See also:
getSurface
getPalette

Implements Image::ImageDecoder.

Definition at line 212 of file pict.cpp.

void Image::PICTDecoder::outputPixelBuffer ( byte *&  out,
byte  value,
byte  bitsPerPixel 
) [private]

Definition at line 476 of file pict.cpp.

PICTDecoder::PixMap Image::PICTDecoder::readPixMap ( Common::SeekableReadStream stream,
bool  hasBaseAddr = true 
) [static]

Definition at line 274 of file pict.cpp.

void Image::PICTDecoder::setupOpcodesCommon (  )  [private]

Definition at line 60 of file pict.cpp.

void Image::PICTDecoder::setupOpcodesNormal (  )  [private]

Definition at line 76 of file pict.cpp.

void Image::PICTDecoder::setupOpcodesQuickTime (  )  [private]

Definition at line 84 of file pict.cpp.

void Image::PICTDecoder::skipBitsRect ( Common::SeekableReadStream stream,
bool  withPalette 
) [private]

Definition at line 495 of file pict.cpp.

void Image::PICTDecoder::unpackBitsLine ( byte out,
uint32  length,
Common::SeekableReadStream stream,
byte  bitsPerPixel,
byte  bytesPerPixel 
) [private]

Definition at line 429 of file pict.cpp.

void Image::PICTDecoder::unpackBitsRect ( Common::SeekableReadStream stream,
bool  withPalette 
) [private]

Definition at line 304 of file pict.cpp.


Member Data Documentation

Definition at line 89 of file pict.h.

Definition at line 85 of file pict.h.

Definition at line 107 of file pict.h.

Definition at line 88 of file pict.h.

Definition at line 86 of file pict.h.

Definition at line 87 of file pict.h.


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


Generated on Sat Sep 21 2019 05:04:04 for ResidualVM by doxygen 1.7.1
curved edge   curved edge