summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/strnskil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/strnskil.c')
-rw-r--r--src/mame/video/strnskil.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mame/video/strnskil.c b/src/mame/video/strnskil.c
index f46fc149cf0..4d1fe13bd11 100644
--- a/src/mame/video/strnskil.c
+++ b/src/mame/video/strnskil.c
@@ -12,13 +12,13 @@ Video hardware driver by Uki
#include "includes/strnskil.h"
-PALETTE_INIT( strnskil )
+void strnskil_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, 0x100);
+ machine().colortable = colortable_alloc(machine(), 0x100);
/* create a lookup table for the palette */
for (i = 0; i < 0x100; i++)
@@ -27,7 +27,7 @@ PALETTE_INIT( strnskil )
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- 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 */
@@ -37,7 +37,7 @@ PALETTE_INIT( strnskil )
for (i = 0; i < 0x400; i++)
{
UINT8 ctabentry = color_prom[i];
- colortable_entry_set_value(machine.colortable, i, ctabentry);
+ colortable_entry_set_value(machine().colortable, i, ctabentry);
}
}
@@ -70,13 +70,12 @@ TILE_GET_INFO_MEMBER(strnskil_state::get_bg_tile_info)
SET_TILE_INFO_MEMBER(0, code, color, 0);
}
-VIDEO_START( strnskil )
+void strnskil_state::video_start()
{
- strnskil_state *state = machine.driver_data<strnskil_state>();
- state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(strnskil_state::get_bg_tile_info),state), TILEMAP_SCAN_COLS,
+ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(strnskil_state::get_bg_tile_info),this), TILEMAP_SCAN_COLS,
8, 8, 32, 32);
- state->m_bg_tilemap->set_scroll_rows(32);
+ m_bg_tilemap->set_scroll_rows(32);
}
static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect)