trunk/src/emu/emupal.h
| r30796 | r30797 | |
| 111 | 111 | #define DECLARE_PALETTE_INIT(_Name) void PALETTE_INIT_NAME(_Name)(palette_device &palette) |
| 112 | 112 | #define PALETTE_INIT_MEMBER(_Class, _Name) void _Class::PALETTE_INIT_NAME(_Name)(palette_device &palette) |
| 113 | 113 | |
| 114 | #define PALETTE_DECODER_NAME(_Name) _Name##_decoder |
| 115 | #define DECLARE_PALETTE_DECODER(_Name) static rgb_t PALETTE_DECODER_NAME(_Name)(UINT32 raw) |
| 116 | #define PALETTE_DECODER_MEMBER(_Class, _Name) rgb_t _Class::PALETTE_DECODER_NAME(_Name)(UINT32 raw) |
| 117 | |
| 114 | 118 | // standard 3-3-2 formats |
| 115 | 119 | #define PALETTE_FORMAT_BBGGGRRR raw_to_rgb_converter(1, &raw_to_rgb_converter::standard_rgb_decoder<3,3,2, 0,3,6>) |
| 116 | 120 | #define PALETTE_FORMAT_RRRGGGBB raw_to_rgb_converter(1, &raw_to_rgb_converter::standard_rgb_decoder<3,3,2, 5,2,0>) |
| r30796 | r30797 | |
| 180 | 184 | #define MCFG_PALETTE_FORMAT(_format) \ |
| 181 | 185 | palette_device::static_set_format(*device, PALETTE_FORMAT_##_format); |
| 182 | 186 | |
| 183 | | #define MCFG_PALETTE_FORMAT_CLASS(_bytes_per_entry, _class, _format) \ |
| 184 | | palette_device::static_set_format(*device, raw_to_rgb_converter(_bytes_per_entry, &_class::_format##_decoder)); |
| 187 | #define MCFG_PALETTE_FORMAT_CLASS(_bytes_per_entry, _class, _method) \ |
| 188 | palette_device::static_set_format(*device, raw_to_rgb_converter(_bytes_per_entry, &_class::PALETTE_DECODER_NAME(_method))); |
| 185 | 189 | |
| 186 | 190 | #define MCFG_PALETTE_MEMBITS(_width) \ |
| 187 | 191 | palette_device::static_set_membits(*device, _width); |