diff options
Diffstat (limited to 'src/mame/video/dday.cpp')
-rw-r--r-- | src/mame/video/dday.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/mame/video/dday.cpp b/src/mame/video/dday.cpp index 43fa2cc6811..bf90fd389e9 100644 --- a/src/mame/video/dday.cpp +++ b/src/mame/video/dday.cpp @@ -47,28 +47,26 @@ void dday_state::start_countdown_timer() ***************************************************************************/ -PALETTE_INIT_MEMBER(dday_state, dday) +void dday_state::dday_palette(palette_device &palette) const { - const uint8_t *color_prom = memregion("proms")->base(); - int i; + uint8_t const *const color_prom = memregion("proms")->base(); palette.set_shadow_factor(1.0 / 8); - /* create a lookup table for the palette */ - for (i = 0; i < 0x100; i++) + // create a lookup table for the palette + for (int i = 0; i < 0x100; i++) { - int r = pal4bit(color_prom[i + 0x000]); - int g = pal4bit(color_prom[i + 0x100]); - int b = pal4bit(color_prom[i + 0x200]); + int const r = pal4bit(color_prom[i + 0x000]); + int const g = pal4bit(color_prom[i + 0x100]); + int const b = pal4bit(color_prom[i + 0x200]); palette.set_indirect_color(i, rgb_t(r, g, b)); } - for (i = 0; i < 0x100; i++) + for (int i = 0; i < 0x100; i++) palette.set_pen_indirect(i, i); - /* HACK!!! This table is handgenerated, but it matches the screenshot. - I have no clue how it really works */ + // HACK!!! This table is handgenerated, but it matches the screenshot. I have no clue how it really works palette.set_pen_indirect(0*8+0+0, 0x00); palette.set_pen_indirect(0*8+0+1, 0x01); palette.set_pen_indirect(0*8+0+2, 0x15); |