summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/gsword.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/gsword.c')
-rw-r--r--src/mame/video/gsword.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/mame/video/gsword.c b/src/mame/video/gsword.c
index 9bd81d96e0b..5ca803b24e4 100644
--- a/src/mame/video/gsword.c
+++ b/src/mame/video/gsword.c
@@ -9,13 +9,13 @@
#include "includes/gsword.h"
-PALETTE_INIT( josvolly )
+PALETTE_INIT_MEMBER(gsword_state,josvolly)
{
- 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++)
@@ -24,7 +24,7 @@ PALETTE_INIT( josvolly )
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 */
@@ -32,24 +32,24 @@ PALETTE_INIT( josvolly )
/* characters */
for (i = 0; i < 0x100; i++)
- colortable_entry_set_value(machine.colortable, i, i);
+ colortable_entry_set_value(machine().colortable, i, i);
/* sprites */
for (i = 0x100; i < 0x200; i++)
{
UINT8 ctabentry = (BITSWAP8(color_prom[i - 0x100],7,6,5,4,0,1,2,3) & 0x0f) | 0x80;
- colortable_entry_set_value(machine.colortable, i, ctabentry);
+ colortable_entry_set_value(machine().colortable, i, ctabentry);
}
}
-PALETTE_INIT( gsword )
+PALETTE_INIT_MEMBER(gsword_state,gsword)
{
- 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++)
@@ -75,7 +75,7 @@ PALETTE_INIT( gsword )
bit2 = (color_prom[i + 0x000] >> 3) & 1;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- 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 */
@@ -83,13 +83,13 @@ PALETTE_INIT( gsword )
/* characters */
for (i = 0; i < 0x100; i++)
- colortable_entry_set_value(machine.colortable, i, i);
+ colortable_entry_set_value(machine().colortable, i, i);
/* sprites */
for (i = 0x100; i < 0x200; i++)
{
UINT8 ctabentry = (BITSWAP8(color_prom[i - 0x100],7,6,5,4,0,1,2,3) & 0x0f) | 0x80;
- colortable_entry_set_value(machine.colortable, i, ctabentry);
+ colortable_entry_set_value(machine().colortable, i, ctabentry);
}
}
@@ -152,10 +152,9 @@ TILE_GET_INFO_MEMBER(gsword_state::get_bg_tile_info)
SET_TILE_INFO_MEMBER(0, code, color, flags);
}
-VIDEO_START( gsword )
+void gsword_state::video_start()
{
- gsword_state *state = machine.driver_data<gsword_state>();
- state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(gsword_state::get_bg_tile_info),state), TILEMAP_SCAN_ROWS,
+ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(gsword_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS,
8, 8, 32, 64);
}