diff options
Diffstat (limited to 'src/mame/video/finalizr.c')
-rw-r--r-- | src/mame/video/finalizr.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/mame/video/finalizr.c b/src/mame/video/finalizr.c index 705347f0cfc..9fb81139940 100644 --- a/src/mame/video/finalizr.c +++ b/src/mame/video/finalizr.c @@ -10,13 +10,13 @@ #include "includes/finalizr.h" -PALETTE_INIT( finalizr ) +void finalizr_state::palette_init() { - const UINT8 *color_prom = machine.root_device().memregion("proms")->base(); + const UINT8 *color_prom = machine().root_device().memregion("proms")->base(); int i; /* 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++) @@ -25,7 +25,7 @@ PALETTE_INIT( finalizr ) int g = pal4bit(color_prom[i + 0x00] >> 4); int b = pal4bit(color_prom[i + 0x20] >> 0); - 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 */ @@ -34,13 +34,13 @@ PALETTE_INIT( finalizr ) for (i = 0; i < 0x100; i++) { UINT8 ctabentry = (color_prom[i] & 0x0f) | 0x10; - colortable_entry_set_value(machine.colortable, i, ctabentry); + colortable_entry_set_value(machine().colortable, i, ctabentry); } 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); } } @@ -64,12 +64,11 @@ TILE_GET_INFO_MEMBER(finalizr_state::get_fg_tile_info) SET_TILE_INFO_MEMBER(0, code, color, flags); } -VIDEO_START( finalizr ) +void finalizr_state::video_start() { - finalizr_state *state = machine.driver_data<finalizr_state>(); - state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(finalizr_state::get_bg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); - state->m_fg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(finalizr_state::get_fg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(finalizr_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_fg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(finalizr_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); } |