summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/btime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/btime.cpp')
-rw-r--r--src/mame/video/btime.cpp42
1 files changed, 20 insertions, 22 deletions
diff --git a/src/mame/video/btime.cpp b/src/mame/video/btime.cpp
index f0341bb9c6a..663e8362d75 100644
--- a/src/mame/video/btime.cpp
+++ b/src/mame/video/btime.cpp
@@ -30,38 +30,36 @@
***************************************************************************/
-PALETTE_INIT_MEMBER(btime_state,btime)
+void btime_state::btime_palette(palette_device &palette) const
{
- /* Burger Time doesn't have a color PROM, but Hamburge has. */
- /* This function is also used by Eggs. */
- if (m_prom_region == nullptr)
- {
+ // Burger Time doesn't have a color PROM, but Hamburge has.
+ // This function is also used by Eggs.
+ if (!m_prom_region)
return;
- }
- const uint8_t *color_prom = m_prom_region->base();
+ uint8_t const *const color_prom = m_prom_region->base();
for (int i = 0; i < palette.entries(); i++)
{
- /* red component */
+ // red component
int bit0 = (color_prom[i] >> 0) & 0x01;
int bit1 = (color_prom[i] >> 1) & 0x01;
int bit2 = (color_prom[i] >> 2) & 0x01;
- int r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+ int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- /* green component */
+ // green component
bit0 = (color_prom[i] >> 3) & 0x01;
bit1 = (color_prom[i] >> 4) & 0x01;
bit2 = (color_prom[i] >> 5) & 0x01;
- int g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+ int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- /* blue component */
+ // blue component
bit0 = 0;
bit1 = (color_prom[i] >> 6) & 0x01;
bit2 = (color_prom[i] >> 7) & 0x01;
- int b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+ int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette.set_pen_color(i, rgb_t(r,g,b));
+ palette.set_pen_color(i, rgb_t(r, g, b));
}
}
@@ -82,29 +80,29 @@ PALETTE_INIT_MEMBER(btime_state,btime)
***************************************************************************/
-PALETTE_INIT_MEMBER(btime_state,lnc)
+void btime_state::lnc_palette(palette_device &palette) const
{
- const uint8_t *color_prom = memregion("proms")->base();
+ uint8_t const *const color_prom = memregion("proms")->base();
for (int i = 0; i < palette.entries(); i++)
{
- /* red component */
+ // red component
int bit0 = (color_prom[i] >> 7) & 0x01;
int bit1 = (color_prom[i] >> 6) & 0x01;
int bit2 = (color_prom[i] >> 5) & 0x01;
- int r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+ int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- /* green component */
+ // green component
bit0 = (color_prom[i] >> 4) & 0x01;
bit1 = (color_prom[i] >> 3) & 0x01;
bit2 = (color_prom[i] >> 2) & 0x01;
- int g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+ int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- /* blue component */
+ // blue component
bit0 = 0;
bit1 = (color_prom[i] >> 1) & 0x01;
bit2 = (color_prom[i] >> 0) & 0x01;
- int b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
+ int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
palette.set_pen_color(i, rgb_t(r,g,b));
}