summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/gotya.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/gotya.c')
-rw-r--r--src/mame/video/gotya.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mame/video/gotya.c b/src/mame/video/gotya.c
index 2cb82948268..f330dc2e17f 100644
--- a/src/mame/video/gotya.c
+++ b/src/mame/video/gotya.c
@@ -9,9 +9,9 @@
***************************************************************************/
-PALETTE_INIT( gotya )
+void gotya_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];
@@ -24,7 +24,7 @@ PALETTE_INIT( gotya )
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++)
@@ -49,7 +49,7 @@ PALETTE_INIT( gotya )
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 */
@@ -58,7 +58,7 @@ PALETTE_INIT( gotya )
for (i = 0; i < 0x40; i++)
{
UINT8 ctabentry = color_prom[i] & 0x07;
- colortable_entry_set_value(machine.colortable, i, ctabentry);
+ colortable_entry_set_value(machine().colortable, i, ctabentry);
}
}
@@ -106,10 +106,9 @@ TILEMAP_MAPPER_MEMBER(gotya_state::tilemap_scan_rows_thehand)
return ((row) * (num_cols >> 1)) + (col & 31) + ((col >> 5) * 0x400);
}
-VIDEO_START( gotya )
+void gotya_state::video_start()
{
- gotya_state *state = machine.driver_data<gotya_state>();
- state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(gotya_state::get_bg_tile_info),state), tilemap_mapper_delegate(FUNC(gotya_state::tilemap_scan_rows_thehand),state), 8, 8, 64, 32);
+ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(gotya_state::get_bg_tile_info),this), tilemap_mapper_delegate(FUNC(gotya_state::tilemap_scan_rows_thehand),this), 8, 8, 64, 32);
}
static void draw_status_row( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int sx, int col )