diff options
Diffstat (limited to 'src/mame/video/rocnrope.c')
-rw-r--r-- | src/mame/video/rocnrope.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mame/video/rocnrope.c b/src/mame/video/rocnrope.c index 2d9bc96c55f..6f4e6a84726 100644 --- a/src/mame/video/rocnrope.c +++ b/src/mame/video/rocnrope.c @@ -29,9 +29,9 @@ ***************************************************************************/ -PALETTE_INIT( rocnrope ) +void rocnrope_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_rg[3] = { 1000, 470, 220 }; static const int resistances_b [2] = { 470, 220 }; double rweights[3], gweights[3], bweights[2]; @@ -44,7 +44,7 @@ PALETTE_INIT( rocnrope ) 2, &resistances_b[0], bweights, 1000, 0); /* allocate the colortable */ - machine.colortable = colortable_alloc(machine, 0x20); + machine().colortable = colortable_alloc(machine(), 0x20); /* create a lookup table for the palette */ for (i = 0; i < 0x20; i++) @@ -69,7 +69,7 @@ PALETTE_INIT( rocnrope ) bit1 = (color_prom[i] >> 7) & 0x01; b = combine_2_weights(bweights, bit0, bit1); - 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 */ @@ -79,7 +79,7 @@ PALETTE_INIT( rocnrope ) for (i = 0; i < 0x200; i++) { UINT8 ctabentry = color_prom[i] & 0x0f; - colortable_entry_set_value(machine.colortable, i, ctabentry); + colortable_entry_set_value(machine().colortable, i, ctabentry); } } @@ -114,10 +114,9 @@ TILE_GET_INFO_MEMBER(rocnrope_state::get_bg_tile_info) SET_TILE_INFO_MEMBER(1, code, color, flags); } -VIDEO_START( rocnrope ) +void rocnrope_state::video_start() { - rocnrope_state *state = machine.driver_data<rocnrope_state>(); - state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(rocnrope_state::get_bg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(rocnrope_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 ) |