22 #ifndef LURE_PALETTE_H 23 #define LURE_PALETTE_H 25 #include "lure/luredefs.h" 26 #include "lure/disk.h" 27 #include "lure/memory.h" 31 enum PaletteSource {DEFAULT, RGB, RGB64, EGA};
38 void convertRgb64Palette(
const byte *srcPalette, uint16 srcNumEntries);
39 void convertEGAPalette(
const byte *srcPalette);
42 Palette(uint16 srcNumEntries,
const byte *srcData, PaletteSource paletteSource);
44 Palette(uint16 resourceId, PaletteSource paletteSource = DEFAULT);
47 uint8 *data() {
return _palette->data(); }
49 uint16 numEntries() {
return _palette->size() / 4; }
50 void setEntry(uint8 index, uint32 value);
51 uint32 getEntry(uint8 index);
63 uint8 numPalettes() {
return _numPalettes; }
64 Palette &getPalette(uint8 paletteNum);