summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/brkthru.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/brkthru.c')
-rw-r--r--src/mame/video/brkthru.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mame/video/brkthru.c b/src/mame/video/brkthru.c
index 7f8154ab448..98abd6c722a 100644
--- a/src/mame/video/brkthru.c
+++ b/src/mame/video/brkthru.c
@@ -32,12 +32,12 @@
***************************************************************************/
-void brkthru_state::palette_init()
+PALETTE_INIT_MEMBER(brkthru_state, brkthru)
{
const UINT8 *color_prom = memregion("proms")->base();
int i;
- for (i = 0; i < machine().total_colors(); i++)
+ for (i = 0; i < palette.entries(); i++)
{
int bit0, bit1, bit2, bit3, r, g, b;
@@ -51,13 +51,13 @@ void brkthru_state::palette_init()
bit2 = (color_prom[0] >> 6) & 0x01;
bit3 = (color_prom[0] >> 7) & 0x01;
g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- bit0 = (color_prom[machine().total_colors()] >> 0) & 0x01;
- bit1 = (color_prom[machine().total_colors()] >> 1) & 0x01;
- bit2 = (color_prom[machine().total_colors()] >> 2) & 0x01;
- bit3 = (color_prom[machine().total_colors()] >> 3) & 0x01;
+ bit0 = (color_prom[palette.entries()] >> 0) & 0x01;
+ bit1 = (color_prom[palette.entries()] >> 1) & 0x01;
+ bit2 = (color_prom[palette.entries()] >> 2) & 0x01;
+ bit3 = (color_prom[palette.entries()] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine(), i, rgb_t(r,g,b));
+ palette.set_pen_color(i, rgb_t(r,g,b));
color_prom++;
}
@@ -196,24 +196,24 @@ void brkthru_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprec
if (m_spriteram[offs] & 0x10) /* double height */
{
- m_gfxdecode->gfx(9)->transpen(bitmap,cliprect,
+ m_gfxdecode->gfx(9)->transpen(m_palette,bitmap,cliprect,
code & ~1,
color,
m_flipscreen, m_flipscreen,
sx, m_flipscreen ? sy + 16 : sy - 16,0);
- m_gfxdecode->gfx(9)->transpen(bitmap,cliprect,
+ m_gfxdecode->gfx(9)->transpen(m_palette,bitmap,cliprect,
code | 1,
color,
m_flipscreen, m_flipscreen,
sx,sy,0);
/* redraw with wraparound */
- m_gfxdecode->gfx(9)->transpen(bitmap,cliprect,
+ m_gfxdecode->gfx(9)->transpen(m_palette,bitmap,cliprect,
code & ~1,
color,
m_flipscreen, m_flipscreen,
sx,(m_flipscreen ? sy + 16 : sy - 16) + 256,0);
- m_gfxdecode->gfx(9)->transpen(bitmap,cliprect,
+ m_gfxdecode->gfx(9)->transpen(m_palette,bitmap,cliprect,
code | 1,
color,
m_flipscreen, m_flipscreen,
@@ -222,14 +222,14 @@ void brkthru_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprec
}
else
{
- m_gfxdecode->gfx(9)->transpen(bitmap,cliprect,
+ m_gfxdecode->gfx(9)->transpen(m_palette,bitmap,cliprect,
code,
color,
m_flipscreen, m_flipscreen,
sx,sy,0);
/* redraw with wraparound */
- m_gfxdecode->gfx(9)->transpen(bitmap,cliprect,
+ m_gfxdecode->gfx(9)->transpen(m_palette,bitmap,cliprect,
code,
color,
m_flipscreen, m_flipscreen,