diff options
Diffstat (limited to 'src/mame/video/mikie.c')
-rw-r--r-- | src/mame/video/mikie.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mame/video/mikie.c b/src/mame/video/mikie.c index 660c537a46a..f46e6fbac34 100644 --- a/src/mame/video/mikie.c +++ b/src/mame/video/mikie.c @@ -26,9 +26,9 @@ ***************************************************************************/ -PALETTE_INIT( mikie ) +void mikie_state::palette_init() { - const UINT8 *color_prom = machine.root_device().memregion("proms")->base(); + const UINT8 *color_prom = machine().root_device().memregion("proms")->base(); static const int resistances[4] = { 2200, 1000, 470, 220 }; double rweights[4], gweights[4], bweights[4]; int i; @@ -40,7 +40,7 @@ PALETTE_INIT( mikie ) 4, resistances, bweights, 470, 0); /* allocate the colortable */ - machine.colortable = colortable_alloc(machine, 0x100); + machine().colortable = colortable_alloc(machine(), 0x100); /* create a lookup table for the palette */ for (i = 0; i < 0x100; i++) @@ -69,7 +69,7 @@ PALETTE_INIT( mikie ) bit3 = (color_prom[i + 0x200] >> 3) & 0x01; b = combine_4_weights(bweights, bit0, bit1, bit2, bit3); - colortable_palette_set_color(machine.colortable, i, MAKE_RGB(r, g, b)); + colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b)); } /* color_prom now points to the beginning of the lookup table,*/ @@ -83,7 +83,7 @@ PALETTE_INIT( mikie ) for (j = 0; j < 8; j++) { UINT8 ctabentry = (j << 5) | ((~i & 0x100) >> 4) | (color_prom[i] & 0x0f); - colortable_entry_set_value(machine.colortable, ((i & 0x100) << 3) | (j << 8) | (i & 0xff), ctabentry); + colortable_entry_set_value(machine().colortable, ((i & 0x100) << 3) | (j << 8) | (i & 0xff), ctabentry); } } } @@ -136,10 +136,9 @@ TILE_GET_INFO_MEMBER(mikie_state::get_bg_tile_info) } -VIDEO_START( mikie ) +void mikie_state::video_start() { - mikie_state *state = machine.driver_data<mikie_state>(); - state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(mikie_state::get_bg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(mikie_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); } static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect) |