summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/sbasketb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/sbasketb.c')
-rw-r--r--src/mame/video/sbasketb.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/mame/video/sbasketb.c b/src/mame/video/sbasketb.c
index 125aa9001c5..bd17fc634be 100644
--- a/src/mame/video/sbasketb.c
+++ b/src/mame/video/sbasketb.c
@@ -39,7 +39,7 @@ PALETTE_INIT( sbasketb )
4, resistances, bweights, 1000, 0);
/* 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++)
@@ -68,7 +68,7 @@ PALETTE_INIT( sbasketb )
bit3 = (color_prom[i + 0x200] >> 3) & 0x01;
b = combine_4_weights(bweights, bit0, bit1, bit2, 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,*/
@@ -78,7 +78,7 @@ PALETTE_INIT( sbasketb )
for (i = 0; i < 0x100; i++)
{
UINT8 ctabentry = (color_prom[i] & 0x0f) | 0xf0;
- colortable_entry_set_value(machine->colortable, i, ctabentry);
+ colortable_entry_set_value(machine.colortable, i, ctabentry);
}
/* sprites use colors 0-256 (?) in 16 banks */
@@ -89,37 +89,37 @@ PALETTE_INIT( sbasketb )
for (j = 0; j < 0x10; j++)
{
UINT8 ctabentry = (j << 4) | (color_prom[i + 0x100] & 0x0f);
- colortable_entry_set_value(machine->colortable, 0x100 + ((j << 8) | i), ctabentry);
+ colortable_entry_set_value(machine.colortable, 0x100 + ((j << 8) | i), ctabentry);
}
}
}
WRITE8_HANDLER( sbasketb_videoram_w )
{
- sbasketb_state *state = space->machine->driver_data<sbasketb_state>();
+ sbasketb_state *state = space->machine().driver_data<sbasketb_state>();
state->videoram[offset] = data;
tilemap_mark_tile_dirty(state->bg_tilemap, offset);
}
WRITE8_HANDLER( sbasketb_colorram_w )
{
- sbasketb_state *state = space->machine->driver_data<sbasketb_state>();
+ sbasketb_state *state = space->machine().driver_data<sbasketb_state>();
state->colorram[offset] = data;
tilemap_mark_tile_dirty(state->bg_tilemap, offset);
}
WRITE8_HANDLER( sbasketb_flipscreen_w )
{
- if (flip_screen_get(space->machine) != data)
+ if (flip_screen_get(space->machine()) != data)
{
- flip_screen_set(space->machine, data);
- tilemap_mark_all_tiles_dirty_all(space->machine);
+ flip_screen_set(space->machine(), data);
+ tilemap_mark_all_tiles_dirty_all(space->machine());
}
}
static TILE_GET_INFO( get_bg_tile_info )
{
- sbasketb_state *state = machine->driver_data<sbasketb_state>();
+ sbasketb_state *state = machine.driver_data<sbasketb_state>();
int code = state->videoram[tile_index] + ((state->colorram[tile_index] & 0x20) << 3);
int color = state->colorram[tile_index] & 0x0f;
int flags = ((state->colorram[tile_index] & 0x40) ? TILE_FLIPX : 0) | ((state->colorram[tile_index] & 0x80) ? TILE_FLIPY : 0);
@@ -129,15 +129,15 @@ static TILE_GET_INFO( get_bg_tile_info )
VIDEO_START( sbasketb )
{
- sbasketb_state *state = machine->driver_data<sbasketb_state>();
+ sbasketb_state *state = machine.driver_data<sbasketb_state>();
state->bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
tilemap_set_scroll_cols(state->bg_tilemap, 32);
}
-static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect )
+static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect )
{
- sbasketb_state *state = machine->driver_data<sbasketb_state>();
+ sbasketb_state *state = machine.driver_data<sbasketb_state>();
UINT8 *spriteram = state->spriteram;
int offs = (*state->spriteram_select & 0x01) * 0x100;
int i;
@@ -163,7 +163,7 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rect
}
drawgfx_transpen(bitmap,cliprect,
- machine->gfx[1],
+ machine.gfx[1],
code, color,
flipx, flipy,
sx, sy, 0);
@@ -173,13 +173,13 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rect
SCREEN_UPDATE( sbasketb )
{
- sbasketb_state *state = screen->machine->driver_data<sbasketb_state>();
+ sbasketb_state *state = screen->machine().driver_data<sbasketb_state>();
int col;
for (col = 6; col < 32; col++)
tilemap_set_scrolly(state->bg_tilemap, col, *state->scroll);
tilemap_draw(bitmap, cliprect, state->bg_tilemap, 0, 0);
- draw_sprites(screen->machine, bitmap, cliprect);
+ draw_sprites(screen->machine(), bitmap, cliprect);
return 0;
}