diff options
Diffstat (limited to 'src/mame/video/kchamp.c')
-rw-r--r-- | src/mame/video/kchamp.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mame/video/kchamp.c b/src/mame/video/kchamp.c index bb54b1239e1..2f3a73b8793 100644 --- a/src/mame/video/kchamp.c +++ b/src/mame/video/kchamp.c @@ -10,18 +10,18 @@ #include "includes/kchamp.h" -PALETTE_INIT( kchamp ) +void kchamp_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, red, green, blue; - for (i = 0; i < machine.total_colors(); i++) + for (i = 0; i < machine().total_colors(); i++) { red = color_prom[i]; - green = color_prom[machine.total_colors() + i]; - blue = color_prom[2 * machine.total_colors() + i]; + green = color_prom[machine().total_colors() + i]; + blue = color_prom[2 * machine().total_colors() + i]; - palette_set_color_rgb(machine, i, pal4bit(red), pal4bit(green), pal4bit(blue)); + palette_set_color_rgb(machine(), i, pal4bit(red), pal4bit(green), pal4bit(blue)); } } @@ -50,10 +50,9 @@ TILE_GET_INFO_MEMBER(kchamp_state::get_bg_tile_info) SET_TILE_INFO_MEMBER(0, code, color, 0); } -VIDEO_START( kchamp ) +void kchamp_state::video_start() { - kchamp_state *state = machine.driver_data<kchamp_state>(); - state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(kchamp_state::get_bg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(kchamp_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); } /* |