diff options
Diffstat (limited to 'src/mame/video/circusc.c')
-rw-r--r-- | src/mame/video/circusc.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/mame/video/circusc.c b/src/mame/video/circusc.c index c4cecd9bae2..5f166a25118 100644 --- a/src/mame/video/circusc.c +++ b/src/mame/video/circusc.c @@ -30,9 +30,9 @@ ***************************************************************************/ -PALETTE_INIT( circusc ) +void circusc_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]; @@ -45,7 +45,7 @@ PALETTE_INIT( circusc ) 2, &resistances_b[0], bweights, 0, 0); /* allocate the colortable */ - machine.colortable = colortable_alloc(machine, 32); + machine().colortable = colortable_alloc(machine(), 32); /* create a lookup table for the palette */ for (i = 0; i < 0x20; i++) @@ -70,7 +70,7 @@ PALETTE_INIT( circusc ) 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 */ @@ -80,14 +80,14 @@ PALETTE_INIT( circusc ) for (i = 0; i < 0x100; i++) { UINT8 ctabentry = color_prom[i] & 0x0f; - colortable_entry_set_value(machine.colortable, i, ctabentry + 0x10); + colortable_entry_set_value(machine().colortable, i, ctabentry + 0x10); } /* sprites map to the lower 16 palette entries */ for (i = 0x100; 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); } } @@ -118,12 +118,11 @@ TILE_GET_INFO_MEMBER(circusc_state::get_tile_info) ***************************************************************************/ -VIDEO_START( circusc ) +void circusc_state::video_start() { - circusc_state *state = machine.driver_data<circusc_state>(); - state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(circusc_state::get_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(circusc_state::get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); - state->m_bg_tilemap->set_scroll_cols(32); + m_bg_tilemap->set_scroll_cols(32); } |