summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/pooyan.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/pooyan.c')
-rw-r--r--src/mame/video/pooyan.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mame/video/pooyan.c b/src/mame/video/pooyan.c
index 4caba227343..722575ec839 100644
--- a/src/mame/video/pooyan.c
+++ b/src/mame/video/pooyan.c
@@ -27,9 +27,9 @@
***************************************************************************/
-PALETTE_INIT( pooyan )
+void pooyan_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];
@@ -42,7 +42,7 @@ PALETTE_INIT( pooyan )
2, resistances_b, bweights, 1000, 0);
/* 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++)
@@ -67,7 +67,7 @@ PALETTE_INIT( pooyan )
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 */
@@ -77,14 +77,14 @@ PALETTE_INIT( pooyan )
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);
}
/* sprites */
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);
}
}
@@ -114,10 +114,9 @@ TILE_GET_INFO_MEMBER(pooyan_state::get_bg_tile_info)
*
*************************************/
-VIDEO_START( pooyan )
+void pooyan_state::video_start()
{
- pooyan_state *state = machine.driver_data<pooyan_state>();
- state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(pooyan_state::get_bg_tile_info),state), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
+ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(pooyan_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
}