Nestopia Core API: Nes::Api::Video::Palette

Overview | Project | Class | Tree | Deprecated | Index
| Nestopia Core API
FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## api
Class Nes::Api::Video::Palette

class Nes::Api::Video::Palette

Palette interface.

Inner Classes, Typedefs, and Enums
`typedef` | `Nes::Api::Video::Palette::Colors` RGB colors.
`enum` | `Nes::Api::Video::Palette::CustomType` Custom palette types.
`enum` | `Nes::Api::Video::Palette::Mode` Palette modes

Constructor Summary
`Palette( Core::Machine& instance )` Interface constructor

Method Summary
`Nes::Api::Video::Palette::Colors` | `GetColors() const` Return the current palette colors.
`uint` | `GetCustom( uchar ( * colors )[ 3], Nes::Api::Video::Palette::CustomType type ) const` Returns the custom palette.
`Nes::Api::Video::Palette::CustomType` | `GetCustomType() const` Returns the custom palette type.
`Nes::Api::Video::Palette::Mode` | `GetDefaultMode() const` Returns the default palette mode.
`Nes::Api::Video::Palette::Mode` | `GetMode() const` Returns the current palette mode.
`void` | `ResetCustom()` Resets the custom palette.
`Result` | `SetCustom( Nes::Api::Video::Palette::Colors colors, Nes::Api::Video::Palette::CustomType type = STD_PALETTE )` Sets the custom palette.
`Result` | `SetMode( Nes::Api::Video::Palette::Mode mode )` Sets the palette mode.

Constructor Detail

### Palette

    public Palette( Core::Machine& instance );

  Interface constructor

Parameters:
  `instance` - emulator instance

Method Detail

### GetColors

    public Nes::Api::Video::Palette::Colors GetColors() const throw();

  Return the current palette colors.

Returns:
  palette colors

### GetCustom

    public uint GetCustom( uchar ( * colors )[ 3], Nes::Api::Video::Palette::CustomType type ) const throw();

  Returns the custom palette.

Parameters:
  `colors` - RGB colors to be filled
  `type` - custom palette type
Returns:
  number of colors written

### GetCustomType

    public Nes::Api::Video::Palette::CustomType GetCustomType() const throw();

  Returns the custom palette type.

Returns:
  custom palette type

### GetDefaultMode

    public Nes::Api::Video::Palette::Mode GetDefaultMode() const throw();

  Returns the default palette mode.

Returns:
  default palette mode

### GetMode

    public Nes::Api::Video::Palette::Mode GetMode() const throw();

  Returns the current palette mode.

Returns:
  current mode

### ResetCustom

    public void ResetCustom() throw();

  Resets the custom palette.

### SetCustom

    public Result SetCustom( Nes::Api::Video::Palette::Colors colors, Nes::Api::Video::Palette::CustomType type = STD_PALETTE ) throw();

  Sets the custom palette.

Parameters:
  `colors` - RGB color data
  `type` - custom palette type

### SetMode

    public Result SetMode( Nes::Api::Video::Palette::Mode mode ) throw();

  Sets the palette mode.

Parameters:
  `mode` - palette mode
Returns:
  result code

Overview | Project | Class | Tree | Deprecated | Index
| Nestopia Core API
FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD