summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/sonson.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/sonson.c')
-rw-r--r--src/mame/video/sonson.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/mame/video/sonson.c b/src/mame/video/sonson.c
index 52236426d7e..cb528bbb32d 100644
--- a/src/mame/video/sonson.c
+++ b/src/mame/video/sonson.c
@@ -39,13 +39,13 @@
***************************************************************************/
-PALETTE_INIT( sonson )
+void sonson_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++)
@@ -74,7 +74,7 @@ PALETTE_INIT( sonson )
bit3 = (color_prom[i + 0x00] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * 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 */
@@ -84,14 +84,14 @@ PALETTE_INIT( sonson )
for (i = 0; i < 0x100; i++)
{
UINT8 ctabentry = color_prom[i] & 0x0f;
- colortable_entry_set_value(machine.colortable, i, ctabentry);
+ colortable_entry_set_value(machine().colortable, i, ctabentry);
}
/* sprites use colors 0x10-0x1f */
for (i = 0x100; i < 0x200; i++)
{
UINT8 ctabentry = (color_prom[i] & 0x0f) | 0x10;
- colortable_entry_set_value(machine.colortable, i, ctabentry);
+ colortable_entry_set_value(machine().colortable, i, ctabentry);
}
}
@@ -129,12 +129,11 @@ TILE_GET_INFO_MEMBER(sonson_state::get_bg_tile_info)
SET_TILE_INFO_MEMBER(0, code, color, 0);
}
-VIDEO_START( sonson )
+void sonson_state::video_start()
{
- sonson_state *state = machine.driver_data<sonson_state>();
- state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(sonson_state::get_bg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
- state->m_bg_tilemap->set_scroll_rows(32);
+ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(sonson_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
+ m_bg_tilemap->set_scroll_rows(32);
}
static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )