ScummVM API documentation
Sci::HunkPalette Class Reference

#include <palette32.h>

Public Member Functions

 HunkPalette (const SciSpan< const byte > &rawPalette)
 
uint32 getVersion () const
 
void setVersion (const uint32 version) const
 
const Palette toPalette () const
 

Static Public Member Functions

static void write (SciSpan< byte > &out, const Palette &palette)
 
static uint32 calculateHunkPaletteSize (const uint16 numIndexes=256, const bool sharedUsed=true)
 

Detailed Description

HunkPalette represents a raw palette resource read from disk. The data structure of a HunkPalette allows palettes to be smaller than 256 colors. It also allows multiple palettes to be stored in one HunkPalette, though in SCI32 games there seems to only ever be one palette per HunkPalette.

Member Function Documentation

◆ getVersion()

uint32 Sci::HunkPalette::getVersion ( ) const
inline

Gets the version of the palette. Used to avoid resubmitting a HunkPalette which has already been submitted for the next frame.

◆ setVersion()

void Sci::HunkPalette::setVersion ( const uint32  version) const

Sets the version of the palette.

◆ toPalette()

const Palette Sci::HunkPalette::toPalette ( ) const

Converts the hunk palette to a standard Palette.


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