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

Public Member Functions

 CBofPalette ()
 
 CBofPalette (const char *pszFileName)
 
 CBofPalette (const HPALETTE &hPalette)
 
ErrorCode loadPalette (const char *pszFileName, uint16 nFlags=0x0000)
 
ErrorCode createDefault (uint16 nFlags=0x0000)
 
byte getNearestIndex (RGBCOLOR cColor)
 
RGBCOLOR getColor (byte nIndex)
 
void setPalette (const HPALETTE &hPalette)
 
const HPALETTEgetPalette () 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 ()
 

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

HPALETTE _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::CBofPalette::CBofPalette ( )

Default constructor

◆ CBofPalette() [2/3]

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

Constructor that loads a palette from a file

Parameters
pszFileNamefilename

◆ CBofPalette() [3/3]

Bagel::CBofPalette::CBofPalette ( const HPALETTE hPalette)

Constructor that takes in an existing palette

Member Function Documentation

◆ ReleasePalette()

void Bagel::CBofPalette::ReleasePalette ( )
protected

Deletes internal palette info

◆ loadPalette()

ErrorCode Bagel::CBofPalette::loadPalette ( const char *  pszFileName,
uint16  nFlags = 0x0000 
)

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::CBofPalette::setPalette ( const HPALETTE hPalette)

Assigns specified palette to this CBofPalette

Parameters
hPaletteHandle to windows palette

◆ copyPalette()

CBofPalette* Bagel::CBofPalette::copyPalette ( )

Create a new palette based on current palette

◆ initialize()

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

initialize static class fields

◆ setSharedPalette()

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

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

Parameters
pszFileNamePalette filename

◆ getSharedPalette()

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

Returns the current shared palette

Returns
Pointer to shared palette

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