ScummVM API documentation
Bagel::SpaceBar::CBofPalette Class Reference
Inheritance diagram for Bagel::SpaceBar::CBofPalette:
Bagel::CBofError Bagel::CBofObject

Public Member Functions

 CBofPalette ()
 
 CBofPalette (const char *pszFileName)
 
 CBofPalette (const PaletteData &paletteData)
 
ErrorCode loadPalette (const char *pszFileName, uint16 nFlags=PAL_DEFAULT)
 
ErrorCode createDefault (uint16 nFlags=PAL_DEFAULT)
 
byte getNearestIndex (COLORREF cColor)
 
COLORREF getColor (byte nIndex)
 
void setPalette (const PaletteData &PaletteData)
 
const PaletteDatagetPalette () const
 
const byte * getData () const
 
void setData (const byte *colors)
 
CBofPalettecopyPalette ()
 
- Public Member Functions inherited from Bagel::CBofError
void reportError (ErrorCode errCode, const char *format,...)
 
bool errorOccurred () const
 
ErrorCode getErrorCode () const
 
void clearError ()
 
- Public Member Functions inherited from Bagel::CBofObject
virtual void DeleteObject ()
 

Static Public Member Functions

static void initialize ()
 
static ErrorCode setSharedPalette (const char *pszFileName)
 
static CBofPalettegetSharedPalette ()
 
- Static Public Member Functions inherited from Bagel::CBofError
static void fatalError (ErrorCode errCode, const char *format,...)
 
static void initialize ()
 
static int getErrorCount ()
 
- Static Public Member Functions inherited from Bagel::CBofObject
static bool isValidObject (const CBofObject *pObject)
 

Protected Member Functions

void ReleasePalette ()
 
- Protected Member Functions inherited from Bagel::CBofError
virtual void bofMessageBox (const Common::String &content, const Common::String &title)
 

Protected Attributes

PaletteData _palette
 
- Protected Attributes inherited from Bagel::CBofError
ErrorCode _errCode
 

Static Protected Attributes

static CBofPalette_pSharedPalette
 
static char _szSharedPalFile [MAX_FNAME]
 
- Static Protected Attributes inherited from Bagel::CBofError
static int _count
 

Constructor & Destructor Documentation

◆ CBofPalette() [1/3]

Bagel::SpaceBar::CBofPalette::CBofPalette ( )

Default constructor

◆ CBofPalette() [2/3]

Bagel::SpaceBar::CBofPalette::CBofPalette ( const char *  pszFileName)

Constructor that loads a palette from a file

Parameters
pszFileNamefilename

◆ CBofPalette() [3/3]

Bagel::SpaceBar::CBofPalette::CBofPalette ( const PaletteData paletteData)

Constructor that takes in an existing palette

Member Function Documentation

◆ ReleasePalette()

void Bagel::SpaceBar::CBofPalette::ReleasePalette ( )
protected

Deletes internal palette info

◆ loadPalette()

ErrorCode Bagel::SpaceBar::CBofPalette::loadPalette ( const char *  pszFileName,
uint16  nFlags = PAL_DEFAULT 
)

Loads palette from specified bitmap-file

Parameters
pszFileNameName of file to load palette from
nFlagsFlags for animation, etc...
Returns
Error return Code

◆ setPalette()

void Bagel::SpaceBar::CBofPalette::setPalette ( const PaletteData PaletteData)

Assigns specified palette to this CBofPalette

Parameters
PaletteDataHandle to windows palette

◆ copyPalette()

CBofPalette* Bagel::SpaceBar::CBofPalette::copyPalette ( )

Create a new palette based on current palette

◆ initialize()

static void Bagel::SpaceBar::CBofPalette::initialize ( )
static

initialize static class fields

◆ setSharedPalette()

static ErrorCode Bagel::SpaceBar::CBofPalette::setSharedPalette ( const char *  pszFileName)
static

Called only in response to "SHAREDPAL=filename" in a script file

Parameters
pszFileNamePalette filename

◆ getSharedPalette()

static CBofPalette* Bagel::SpaceBar::CBofPalette::getSharedPalette ( )
static

Returns the current shared palette

Returns
Pointer to shared palette

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