xoreos  0.0.5
Static Public Member Functions | Static Private Member Functions | List of all members
Graphics::NCLR Class Reference

Simple utility class to load NCLR palette files. More...

#include <nclr.h>

Inheritance diagram for Graphics::NCLR:
Inheritance graph
[legend]
Collaboration diagram for Graphics::NCLR:
Collaboration graph
[legend]

Static Public Member Functions

static const byteload (Common::SeekableReadStream &nclr)
 

Static Private Member Functions

static const byteloadNCLR (Common::SeekableSubReadStreamEndian &nclr)
 
static void readHeader (Common::SeekableSubReadStreamEndian &nclr)
 
static const bytereadPalette (Common::SeekableSubReadStreamEndian &nclr)
 

Additional Inherited Members

- Static Protected Member Functions inherited from Aurora::NitroFile
static Common::SeekableSubReadStreamEndianopen (Common::SeekableReadStream &stream)
 Treat this stream as a Nitro file and return an endian'd stream according to its BOM. More...
 
static Common::SeekableSubReadStreamEndianopen (Common::SeekableReadStream *stream)
 Treat this stream as a Nitro file, take it over and return an endian'd stream according to its BOM. More...
 

Detailed Description

Simple utility class to load NCLR palette files.

Both 4-bit and 8-bit palettes are supported, but both return a palette with 256 BGR entries.

Definition at line 39 of file nclr.h.

Member Function Documentation

◆ load()

const byte * Graphics::NCLR::load ( Common::SeekableReadStream nclr)
static

Definition at line 65 of file nclr.cpp.

References Common::StackException::add(), loadNCLR(), Aurora::NitroFile::open(), Common::ScopedPtrBase< T, Deallocator >::release(), and Common::ScopedPtrBase< T, Deallocator >::reset().

Referenced by Graphics::NCGR::load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadNCLR()

const byte * Graphics::NCLR::loadNCLR ( Common::SeekableSubReadStreamEndian nclr)
staticprivate

Definition at line 81 of file nclr.cpp.

References readHeader(), and readPalette().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readHeader()

void Graphics::NCLR::readHeader ( Common::SeekableSubReadStreamEndian nclr)
staticprivate

Definition at line 87 of file nclr.cpp.

References Common::debugTag(), kNCLRID, Common::ReadStream::readByte(), Common::SeekableSubReadStreamEndian::readUint16(), Common::SeekableSubReadStreamEndian::readUint32(), and Common::SeekableSubReadStream::size().

Referenced by loadNCLR().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readPalette()

const byte * Graphics::NCLR::readPalette ( Common::SeekableSubReadStreamEndian nclr)
staticprivate

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