diff options
Diffstat (limited to 'src/mame/video/sbasketb.c')
-rw-r--r-- | src/mame/video/sbasketb.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/mame/video/sbasketb.c b/src/mame/video/sbasketb.c index 8f229fe2ee0..97f3c9fe130 100644 --- a/src/mame/video/sbasketb.c +++ b/src/mame/video/sbasketb.c @@ -26,9 +26,9 @@ ***************************************************************************/ -PALETTE_INIT( sbasketb ) +void sbasketb_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] = { 2000, 1000, 470, 220 }; double rweights[4], gweights[4], bweights[4]; int i; @@ -40,7 +40,7 @@ PALETTE_INIT( sbasketb ) 4, resistances, bweights, 1000, 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( sbasketb ) 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,*/ @@ -79,7 +79,7 @@ PALETTE_INIT( sbasketb ) for (i = 0; i < 0x100; i++) { UINT8 ctabentry = (color_prom[i] & 0x0f) | 0xf0; - colortable_entry_set_value(machine.colortable, i, ctabentry); + colortable_entry_set_value(machine().colortable, i, ctabentry); } /* sprites use colors 0-256 (?) in 16 banks */ @@ -90,7 +90,7 @@ PALETTE_INIT( sbasketb ) for (j = 0; j < 0x10; j++) { UINT8 ctabentry = (j << 4) | (color_prom[i + 0x100] & 0x0f); - colortable_entry_set_value(machine.colortable, 0x100 + ((j << 8) | i), ctabentry); + colortable_entry_set_value(machine().colortable, 0x100 + ((j << 8) | i), ctabentry); } } } @@ -125,12 +125,11 @@ TILE_GET_INFO_MEMBER(sbasketb_state::get_bg_tile_info) SET_TILE_INFO_MEMBER(0, code, color, flags); } -VIDEO_START( sbasketb ) +void sbasketb_state::video_start() { - sbasketb_state *state = machine.driver_data<sbasketb_state>(); - state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(sbasketb_state::get_bg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); - state->m_bg_tilemap->set_scroll_cols(32); + m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(sbasketb_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_bg_tilemap->set_scroll_cols(32); } static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect ) |