diff options
author | Aaron Giles <aaron@aarongiles.com> | 2011-12-31 07:52:26 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2011-12-31 07:52:26 +0000 |
commit | 9cae38e0d82a71a20619c5ba49dce4eaa0bb0cc2 (patch) | |
tree | 56135caff0d5610acb3b1fc34b640853fe27b104 /src/mame/drivers | |
parent | 384b14a64b7e2a732b9b3429fc6d7aa443486c6c (diff) |
Converted bitmap_t and rectangle into proper classes. Replaced BITMAP_ADDR*
macros with bitmap->pix* functions, and moved bitmap_fill() to bitmap->fill()
among other similar changes. Bitmap fields now only available via accessors.
Replaced sect_rect with &= and union_rect with |= operators for rectangle
classes. Some general cleanup as a result of these changes. [Aaron Giles]
Diffstat (limited to 'src/mame/drivers')
213 files changed, 594 insertions, 617 deletions
diff --git a/src/mame/drivers/39in1.c b/src/mame/drivers/39in1.c index f2158318583..d588a2b9b5a 100644 --- a/src/mame/drivers/39in1.c +++ b/src/mame/drivers/39in1.c @@ -1520,7 +1520,7 @@ static SCREEN_UPDATE( 39in1 ) for(y = 0; y <= (state->m_lcd_regs.lccr2 & PXA255_LCCR2_LPP); y++) { - UINT32 *d = BITMAP_ADDR32(bitmap, y, 0); + UINT32 *d = &bitmap->pix32(y); for(x = 0; x <= (state->m_lcd_regs.lccr1 & PXA255_LCCR1_PPL); x++) { d[x] = state->m_pxa255_lcd_palette[state->m_pxa255_lcd_framebuffer[y*((state->m_lcd_regs.lccr1 & PXA255_LCCR1_PPL) + 1) + x]]; diff --git a/src/mame/drivers/ace.c b/src/mame/drivers/ace.c index 3fc4f2e98d5..2a8473c6730 100644 --- a/src/mame/drivers/ace.c +++ b/src/mame/drivers/ace.c @@ -88,7 +88,7 @@ static SCREEN_UPDATE( ace ) int offs; /* first of all, fill the screen with the background color */ - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[1], 0, diff --git a/src/mame/drivers/acefruit.c b/src/mame/drivers/acefruit.c index b153ec1ab04..10e0be2f42b 100644 --- a/src/mame/drivers/acefruit.c +++ b/src/mame/drivers/acefruit.c @@ -115,7 +115,7 @@ static SCREEN_UPDATE( acefruit ) for( y = 0; y < 8; y++ ) { - UINT16 *dst = BITMAP_ADDR16( bitmap, y + ( row * 8 ), x + ( col * 16 ) ); + UINT16 *dst = &bitmap->pix16(y + ( row * 8 ), x + ( col * 16 ) ); *( dst ) = *( gfxdata + ( ( spriterow + y ) * gfx->line_modulo ) + ( ( spriteindex % 64 ) >> 1 ) ); } @@ -131,7 +131,7 @@ static SCREEN_UPDATE( acefruit ) { for( y = 0; y < 8; y++ ) { - UINT16 *dst = BITMAP_ADDR16( bitmap, y + ( row * 8 ), x + ( col * 16 ) ); + UINT16 *dst = &bitmap->pix16(y + ( row * 8 ), x + ( col * 16 ) ); *( dst ) = 0; } } diff --git a/src/mame/drivers/acommand.c b/src/mame/drivers/acommand.c index 449f4f71fb9..e8efaeefe31 100644 --- a/src/mame/drivers/acommand.c +++ b/src/mame/drivers/acommand.c @@ -205,36 +205,36 @@ static const UINT8 led_fill[0x10] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x static void draw_led(bitmap_t *bitmap, int x, int y,UINT8 value) { - plot_box(bitmap, x, y, 6, 10, 0x00000000); + bitmap->plot_box(x, y, 6, 10, 0x00000000); /*a*/ - *BITMAP_ADDR16(bitmap, y+0, x+1) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+0, x+2) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+0, x+3) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF); + bitmap->pix16(y+0, x+1) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF); + bitmap->pix16(y+0, x+2) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF); + bitmap->pix16(y+0, x+3) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF); /*b*/ - *BITMAP_ADDR16(bitmap, y+1, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+2, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+3, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF); + bitmap->pix16(y+1, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF); + bitmap->pix16(y+2, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF); + bitmap->pix16(y+3, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF); /*c*/ - *BITMAP_ADDR16(bitmap, y+5, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+6, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+7, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF); + bitmap->pix16(y+5, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF); + bitmap->pix16(y+6, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF); + bitmap->pix16(y+7, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF); /*d*/ - *BITMAP_ADDR16(bitmap, y+8, x+1) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+8, x+2) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+8, x+3) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF); + bitmap->pix16(y+8, x+1) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF); + bitmap->pix16(y+8, x+2) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF); + bitmap->pix16(y+8, x+3) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF); /*e*/ - *BITMAP_ADDR16(bitmap, y+5, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+6, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+7, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF); + bitmap->pix16(y+5, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF); + bitmap->pix16(y+6, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF); + bitmap->pix16(y+7, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF); /*f*/ - *BITMAP_ADDR16(bitmap, y+1, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+2, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+3, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF); + bitmap->pix16(y+1, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF); + bitmap->pix16(y+2, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF); + bitmap->pix16(y+3, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF); /*g*/ - *BITMAP_ADDR16(bitmap, y+4, x+1) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+4, x+2) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+4, x+3) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF); + bitmap->pix16(y+4, x+1) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF); + bitmap->pix16(y+4, x+2) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF); + bitmap->pix16(y+4, x+3) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF); } diff --git a/src/mame/drivers/adp.c b/src/mame/drivers/adp.c index 6ad7e317661..dfd6980d3b9 100644 --- a/src/mame/drivers/adp.c +++ b/src/mame/drivers/adp.c @@ -183,12 +183,12 @@ void adp_state::video_start() static H63484_DISPLAY_PIXELS( acrtc_display_pixels ) { - *BITMAP_ADDR16(bitmap, y, x) = data & 0xf; + bitmap->pix16(y, x) = data & 0xf; } bool adp_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect) { - bitmap_fill(&bitmap, &cliprect, 0); + bitmap.fill(0, cliprect); /* graphics */ m_h63484->update_screen(&bitmap, &cliprect); @@ -216,10 +216,10 @@ static SCREEN_UPDATE( adp ) { b &= (HD63484_RAM_SIZE - 1); src = hd63484_ram_r(state->m_hd63484, b, 0xffff); - *BITMAP_ADDR16(bitmap, y, x ) = ((src & 0x000f) >> 0) << 0; - *BITMAP_ADDR16(bitmap, y, x + 1) = ((src & 0x00f0) >> 4) << 0; - *BITMAP_ADDR16(bitmap, y, x + 2) = ((src & 0x0f00) >> 8) << 0; - *BITMAP_ADDR16(bitmap, y, x + 3) = ((src & 0xf000) >> 12) << 0; + bitmap->pix16(y, x ) = ((src & 0x000f) >> 0) << 0; + bitmap->pix16(y, x + 1) = ((src & 0x00f0) >> 4) << 0; + bitmap->pix16(y, x + 2) = ((src & 0x0f00) >> 8) << 0; + bitmap->pix16(y, x + 3) = ((src & 0xf000) >> 12) << 0; b++; } } @@ -243,10 +243,10 @@ if (!screen.machine().input().code_pressed(KEYCODE_O)) // debug: toggle window if (x <= w && x + sx >= 0 && x + sx < (hd63484_regs_r(state->m_hd63484, 0xca/2, 0xffff) & 0x0fff) * 4) { - *BITMAP_ADDR16(bitmap, y, x + sx ) = ((src & 0x000f) >> 0) << 0; - *BITMAP_ADDR16(bitmap, y, x + sx + 1) = ((src & 0x00f0) >> 4) << 0; - *BITMAP_ADDR16(bitmap, y, x + sx + 2) = ((src & 0x0f00) >> 8) << 0; - *BITMAP_ADDR16(bitmap, y, x + sx + 3) = ((src & 0xf000) >> 12) << 0; + bitmap->pix16(y, x + sx ) = ((src & 0x000f) >> 0) << 0; + bitmap->pix16(y, x + sx + 1) = ((src & 0x00f0) >> 4) << 0; + bitmap->pix16(y, x + sx + 2) = ((src & 0x0f00) >> 8) << 0; + bitmap->pix16(y, x + sx + 3) = ((src & 0xf000) >> 12) << 0; } b++; } diff --git a/src/mame/drivers/albazc.c b/src/mame/drivers/albazc.c index dba97cd99da..ed074712944 100644 --- a/src/mame/drivers/albazc.c +++ b/src/mame/drivers/albazc.c @@ -79,7 +79,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect static SCREEN_UPDATE(hanaroku) { - bitmap_fill(bitmap, cliprect, 0x1f0); // ??? + bitmap->fill(0x1f0, *cliprect); // ??? draw_sprites(screen.machine(), bitmap, cliprect); return 0; } diff --git a/src/mame/drivers/aristmk6.c b/src/mame/drivers/aristmk6.c index 47676185877..8f766880999 100644 --- a/src/mame/drivers/aristmk6.c +++ b/src/mame/drivers/aristmk6.c @@ -63,7 +63,7 @@ SCREEN_UPDATE(aristmk6) popmessage("%d %d %04x %d",state->m_test_x,state->m_test_y,state->m_start_offs,state->m_type); - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); count = (state->m_start_offs); @@ -87,7 +87,7 @@ SCREEN_UPDATE(aristmk6) b = (b << 3) | (b & 0x7); if((x)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, x) = r | g<<8 | b<<16; + bitmap->pix32(y, x) = r | g<<8 | b<<16; count+=2; } @@ -98,7 +98,7 @@ SCREEN_UPDATE(aristmk6) color = blit_ram[count]; if((x)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, x) = screen.machine().pens[color]; + bitmap->pix32(y, x) = screen.machine().pens[color]; count++; } diff --git a/src/mame/drivers/astinvad.c b/src/mame/drivers/astinvad.c index 4d6d859e0cc..d9868c660cb 100644 --- a/src/mame/drivers/astinvad.c +++ b/src/mame/drivers/astinvad.c @@ -140,14 +140,14 @@ static void plot_byte( running_machine &machine, bitmap_t *bitmap, UINT8 y, UINT pen_t fore_pen = MAKE_RGB(pal1bit(color >> 0), pal1bit(color >> 2), pal1bit(color >> 1)); UINT8 flip_xor = state->m_screen_flip & 7; - *BITMAP_ADDR32(bitmap, y, x + (0 ^ flip_xor)) = (data & 0x01) ? fore_pen : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x + (1 ^ flip_xor)) = (data & 0x02) ? fore_pen : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x + (2 ^ flip_xor)) = (data & 0x04) ? fore_pen : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x + (3 ^ flip_xor)) = (data & 0x08) ? fore_pen : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x + (4 ^ flip_xor)) = (data & 0x10) ? fore_pen : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x + (5 ^ flip_xor)) = (data & 0x20) ? fore_pen : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x + (6 ^ flip_xor)) = (data & 0x40) ? fore_pen : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x + (7 ^ flip_xor)) = (data & 0x80) ? fore_pen : RGB_BLACK; + bitmap->pix32(y, x + (0 ^ flip_xor)) = (data & 0x01) ? fore_pen : RGB_BLACK; + bitmap->pix32(y, x + (1 ^ flip_xor)) = (data & 0x02) ? fore_pen : RGB_BLACK; + bitmap->pix32(y, x + (2 ^ flip_xor)) = (data & 0x04) ? fore_pen : RGB_BLACK; + bitmap->pix32(y, x + (3 ^ flip_xor)) = (data & 0x08) ? fore_pen : RGB_BLACK; + bitmap->pix32(y, x + (4 ^ flip_xor)) = (data & 0x10) ? fore_pen : RGB_BLACK; + bitmap->pix32(y, x + (5 ^ flip_xor)) = (data & 0x20) ? fore_pen : RGB_BLACK; + bitmap->pix32(y, x + (6 ^ flip_xor)) = (data & 0x40) ? fore_pen : RGB_BLACK; + bitmap->pix32(y, x + (7 ^ flip_xor)) = (data & 0x80) ? fore_pen : RGB_BLACK; } diff --git a/src/mame/drivers/astrocorp.c b/src/mame/drivers/astrocorp.c index 874b685d9c2..c2a27890659 100644 --- a/src/mame/drivers/astrocorp.c +++ b/src/mame/drivers/astrocorp.c @@ -145,7 +145,7 @@ static SCREEN_UPDATE(astrocorp) if (state->m_screen_enable & 1) copybitmap(bitmap, state->m_bitmap, 0,0,0,0, cliprect); else - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); return 0; } diff --git a/src/mame/drivers/astrof.c b/src/mame/drivers/astrof.c index b947501f234..1f93daac141 100644 --- a/src/mame/drivers/astrof.c +++ b/src/mame/drivers/astrof.c @@ -410,9 +410,9 @@ static void video_update_common( running_machine &machine, bitmap_t *bitmap, con pen_t pen = (data & 0x01) ? fore_pen : back_pen; if (state->m_flipscreen) - *BITMAP_ADDR32(bitmap, y, 255 - x) = pen; + bitmap->pix32(y, 255 - x) = pen; else - *BITMAP_ADDR32(bitmap, y, x) = pen; + bitmap->pix32(y, x) = pen; x = x + 1; data = data >> 1; diff --git a/src/mame/drivers/atarisy4.c b/src/mame/drivers/atarisy4.c index feeeef85181..9436d9a3d99 100644 --- a/src/mame/drivers/atarisy4.c +++ b/src/mame/drivers/atarisy4.c @@ -154,7 +154,7 @@ static SCREEN_UPDATE( atarisy4 ) for (y = cliprect->min_y; y <= cliprect->max_y; ++y) { UINT16 *src = &state->m_screen_ram[(offset + (4096 * y)) / 2]; - UINT32 *dest = BITMAP_ADDR32(bitmap, y, cliprect->min_x); + UINT32 *dest = &bitmap->pix32(y, cliprect->min_x); int x; for (x = cliprect->min_x; x < cliprect->max_x; x += 2) diff --git a/src/mame/drivers/avalnche.c b/src/mame/drivers/avalnche.c index 4f534a90764..f28414ecd1d 100644 --- a/src/mame/drivers/avalnche.c +++ b/src/mame/drivers/avalnche.c @@ -66,7 +66,7 @@ static SCREEN_UPDATE( avalnche ) else pen = (data & 0x80) ? RGB_BLACK : RGB_WHITE; - *BITMAP_ADDR32(bitmap, y, x) = pen; + bitmap->pix32(y, x) = pen; data = data << 1; x = x + 1; diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c index 8d9f3f8f511..274ec638e8f 100644 --- a/src/mame/drivers/backfire.c +++ b/src/mame/drivers/backfire.c @@ -94,8 +94,8 @@ static SCREEN_UPDATE( backfire_left ) deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll); deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll); - bitmap_fill(screen.machine().priority_bitmap, NULL, 0); - bitmap_fill(bitmap, cliprect, 0x100); + screen.machine().priority_bitmap->fill(0); + bitmap->fill(0x100, *cliprect); if (state->m_left_priority[0] == 0) { @@ -127,8 +127,8 @@ static SCREEN_UPDATE( backfire_right ) deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll); deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll); - bitmap_fill(screen.machine().priority_bitmap, NULL, 0); - bitmap_fill(bitmap, cliprect, 0x500); + screen.machine().priority_bitmap->fill(0); + bitmap->fill(0x500, *cliprect); if (state->m_right_priority[0] == 0) { diff --git a/src/mame/drivers/beaminv.c b/src/mame/drivers/beaminv.c index 2b9c0d9f3d2..2d0e04e8d47 100644 --- a/src/mame/drivers/beaminv.c +++ b/src/mame/drivers/beaminv.c @@ -180,7 +180,7 @@ static SCREEN_UPDATE( beaminv ) for (i = 0; i < 8; i++) { pen_t pen = (data & 0x01) ? RGB_WHITE : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x) = pen; + bitmap->pix32(y, x) = pen; data = data >> 1; x = x + 1; diff --git a/src/mame/drivers/berzerk.c b/src/mame/drivers/berzerk.c index 0b793c3e64e..119dd8553d1 100644 --- a/src/mame/drivers/berzerk.c +++ b/src/mame/drivers/berzerk.c @@ -465,7 +465,7 @@ static SCREEN_UPDATE( berzerk ) for (i = 0; i < 4; i++) { pen_t pen = (data & 0x80) ? pens[color >> 4] : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x) = pen; + bitmap->pix32(y, x) = pen; x = x + 1; data = data << 1; @@ -474,7 +474,7 @@ static SCREEN_UPDATE( berzerk ) for (; i < 8; i++) { pen_t pen = (data & 0x80) ? pens[color & 0x0f] : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x) = pen; + bitmap->pix32(y, x) = pen; x = x + 1; data = data << 1; diff --git a/src/mame/drivers/bfcobra.c b/src/mame/drivers/bfcobra.c index 400ed8975f5..76c797a3e42 100644 --- a/src/mame/drivers/bfcobra.c +++ b/src/mame/drivers/bfcobra.c @@ -376,7 +376,7 @@ static SCREEN_UPDATE( bfcobra ) { UINT16 y_offset = (y + state->m_v_scroll) * 256; src = &state->m_video_ram[offset + y_offset]; - dest = BITMAP_ADDR32(bitmap, y, 0); + dest = &bitmap->pix32(y); for (x = cliprect->min_x; x <= cliprect->max_x / 2; ++x) { diff --git a/src/mame/drivers/bingor.c b/src/mame/drivers/bingor.c index c6c6e3351e4..3a1719b4311 100644 --- a/src/mame/drivers/bingor.c +++ b/src/mame/drivers/bingor.c @@ -462,7 +462,7 @@ static SCREEN_UPDATE(bingor) bingor_state *state = screen.machine().driver_data<bingor_state>(); int x,y,count; - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); count = (0x2000/2); @@ -475,22 +475,22 @@ static SCREEN_UPDATE(bingor) color = (state->m_blit_ram[count] & 0xf000)>>12; if((x+3)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, x+3) = screen.machine().pens[color]; + bitmap->pix32(y, x+3) = screen.machine().pens[color]; color = (state->m_blit_ram[count] & 0x0f00)>>8; if((x+2)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, x+2) = screen.machine().pens[color]; + bitmap->pix32(y, x+2) = screen.machine().pens[color]; color = (state->m_blit_ram[count] & 0x00f0)>>4; if((x+1)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, x+1) = screen.machine().pens[color]; + bitmap->pix32(y, x+1) = screen.machine().pens[color]; color = (state->m_blit_ram[count] & 0x000f)>>0; if((x+0)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, x+0) = screen.machine().pens[color]; + bitmap->pix32(y, x+0) = screen.machine().pens[color]; count++; } diff --git a/src/mame/drivers/blackt96.c b/src/mame/drivers/blackt96.c index 9a616172dd1..3d969d3ce50 100644 --- a/src/mame/drivers/blackt96.c +++ b/src/mame/drivers/blackt96.c @@ -135,7 +135,7 @@ static SCREEN_UPDATE( blackt96 ) int x,y; const gfx_element *gfx = screen.machine().gfx[2]; - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); draw_main(screen.machine(),bitmap,cliprect,1); draw_main(screen.machine(),bitmap,cliprect,0); diff --git a/src/mame/drivers/blitz68k.c b/src/mame/drivers/blitz68k.c index 17b9eee82c4..d43a9f52fc1 100644 --- a/src/mame/drivers/blitz68k.c +++ b/src/mame/drivers/blitz68k.c @@ -101,7 +101,7 @@ static SCREEN_UPDATE(blitz68k) { for(x = 0; x < 512; x++) { - *BITMAP_ADDR32(bitmap, y, x) = screen.machine().pens[*src++]; + bitmap->pix32(y, x) = screen.machine().pens[*src++]; } } @@ -123,10 +123,10 @@ static SCREEN_UPDATE(blitz68k_noblit) for(x = 0; x < 512; ) { UINT16 pen = *src++; - *BITMAP_ADDR32(bitmap, y, x++) = screen.machine().pens[(pen >> 8) & 0xf]; - *BITMAP_ADDR32(bitmap, y, x++) = screen.machine().pens[(pen >> 12) & 0xf]; - *BITMAP_ADDR32(bitmap, y, x++) = screen.machine().pens[(pen >> 0) & 0xf]; - *BITMAP_ADDR32(bitmap, y, x++) = screen.machine().pens[(pen >> 4) & 0xf]; + bitmap->pix32(y, x++) = screen.machine().pens[(pen >> 8) & 0xf]; + bitmap->pix32(y, x++) = screen.machine().pens[(pen >> 12) & 0xf]; + bitmap->pix32(y, x++) = screen.machine().pens[(pen >> 0) & 0xf]; + bitmap->pix32(y, x++) = screen.machine().pens[(pen >> 4) & 0xf]; } } diff --git a/src/mame/drivers/bmcbowl.c b/src/mame/drivers/bmcbowl.c index 146e45dadc8..4ae877d3395 100644 --- a/src/mame/drivers/bmcbowl.c +++ b/src/mame/drivers/bmcbowl.c @@ -140,7 +140,7 @@ static SCREEN_UPDATE( bmcbowl ) */ int x,y,z,pixdat; - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); z=0; for (y=0;y<230;y++) @@ -150,30 +150,30 @@ static SCREEN_UPDATE( bmcbowl ) pixdat = state->m_vid2[0x8000+z]; if(pixdat&0xff) - *BITMAP_ADDR16(bitmap, y, x+1) = (pixdat&0xff); + bitmap->pix16(y, x+1) = (pixdat&0xff); if(pixdat>>8) - *BITMAP_ADDR16(bitmap, y, x) = (pixdat>>8); + bitmap->pix16(y, x) = (pixdat>>8); pixdat = state->m_vid2[z]; if(pixdat&0xff) - *BITMAP_ADDR16(bitmap, y, x+1) = (pixdat&0xff); + bitmap->pix16(y, x+1) = (pixdat&0xff); if(pixdat>>8) - *BITMAP_ADDR16(bitmap, y, x) = (pixdat>>8); + bitmap->pix16(y, x) = (pixdat>>8); pixdat = state->m_vid1[0x8000+z]; if(pixdat&0xff) - *BITMAP_ADDR16(bitmap, y, x+1) = (pixdat&0xff); + bitmap->pix16(y, x+1) = (pixdat&0xff); if(pixdat>>8) - *BITMAP_ADDR16(bitmap, y, x) = (pixdat>>8); + bitmap->pix16(y, x) = (pixdat>>8); pixdat = state->m_vid1[z]; if(pixdat&0xff) - *BITMAP_ADDR16(bitmap, y, x+1) = (pixdat&0xff); + bitmap->pix16(y, x+1) = (pixdat&0xff); if(pixdat>>8) - *BITMAP_ADDR16(bitmap, y, x) = (pixdat>>8); + bitmap->pix16(y, x) = (pixdat>>8); z++; } diff --git a/src/mame/drivers/bnstars.c b/src/mame/drivers/bnstars.c index 373dd7f2621..37827116190 100644 --- a/src/mame/drivers/bnstars.c +++ b/src/mame/drivers/bnstars.c @@ -515,9 +515,9 @@ static SCREEN_UPDATE(bnstars_left) { bnstars_state *state = screen.machine().driver_data<bnstars_state>(); - bitmap_fill(screen.machine().priority_bitmap,cliprect,0); + screen.machine().priority_bitmap->fill(0, *cliprect); - bitmap_fill(bitmap,cliprect,0); /* bg color */ + bitmap->fill(0, *cliprect); /* bg color */ tilemap_set_scrollx(state->m_ms32_bg_tilemap[0], 0, state->m_ms32_bg0_scroll[0x00/4] + state->m_ms32_bg0_scroll[0x08/4] + 0x10 ); @@ -540,9 +540,9 @@ static SCREEN_UPDATE(bnstars_right) { bnstars_state *state = screen.machine().driver_data<bnstars_state>(); - bitmap_fill(screen.machine().priority_bitmap,cliprect,0); + screen.machine().priority_bitmap->fill(0, *cliprect); - bitmap_fill(bitmap,cliprect,0x8000+0); /* bg color */ + bitmap->fill(0x8000+0, *cliprect); /* bg color */ tilemap_set_scrollx(state->m_ms32_bg_tilemap[1], 0, state->m_ms32_bg1_scroll[0x00/4] + state->m_ms32_bg1_scroll[0x08/4] + 0x10 ); diff --git a/src/mame/drivers/boxer.c b/src/mame/drivers/boxer.c index 775fe70faaa..e27b7893ed5 100644 --- a/src/mame/drivers/boxer.c +++ b/src/mame/drivers/boxer.c @@ -162,7 +162,7 @@ static SCREEN_UPDATE( boxer ) boxer_state *state = screen.machine().driver_data<boxer_state>(); int i, j; - bitmap_fill(bitmap, cliprect, 1); + bitmap->fill(1, *cliprect); for (i = 0; i < 16; i++) { diff --git a/src/mame/drivers/cabaret.c b/src/mame/drivers/cabaret.c index 23db8577f19..9e9017f2b1d 100644 --- a/src/mame/drivers/cabaret.c +++ b/src/mame/drivers/cabaret.c @@ -107,7 +107,7 @@ static VIDEO_START(cabaret) static SCREEN_UPDATE(cabaret) { cabaret_state *state = screen.machine().driver_data<cabaret_state>(); - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0); diff --git a/src/mame/drivers/cardline.c b/src/mame/drivers/cardline.c index be41b83c3c1..6c089781a38 100644 --- a/src/mame/drivers/cardline.c +++ b/src/mame/drivers/cardline.c @@ -48,7 +48,7 @@ static SCREEN_UPDATE( cardline ) { cardline_state *state = screen.machine().driver_data<cardline_state>(); int x,y; - bitmap_fill(bitmap,cliprect,0); + bitmap->fill(0, *cliprect); for(y=0;y<32;y++) { for(x=0;x<64;x++) diff --git a/src/mame/drivers/cb2001.c b/src/mame/drivers/cb2001.c index 61cd9a6b2be..c9b7f1f79a8 100644 --- a/src/mame/drivers/cb2001.c +++ b/src/mame/drivers/cb2001.c @@ -321,16 +321,11 @@ e3 -> c6 */ -// these areas are wrong -static const rectangle visible1 = { 0*8, (14+48)*8-1, 3*8, (3+7)*8-1 }; -static const rectangle visible2 = { 0*8, (14+48)*8-1, 10*8, (10+7)*8-1 }; -static const rectangle visible3 = { 0*8, (14+48)*8-1, 17*8, (17+7)*8-1 }; - static SCREEN_UPDATE(cb2001) { cb2001_state *state = screen.machine().driver_data<cb2001_state>(); int count,x,y; - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); count = 0x0000; @@ -388,6 +383,11 @@ static SCREEN_UPDATE(cb2001) } + // these areas are wrong + const rectangle visible1(0*8, (14+48)*8-1, 3*8, (3+7)*8-1); + const rectangle visible2(0*8, (14+48)*8-1, 10*8, (10+7)*8-1); + const rectangle visible3(0*8, (14+48)*8-1, 17*8, (17+7)*8-1); + tilemap_draw(bitmap, &visible1, state->m_reel1_tilemap, 0, 0); tilemap_draw(bitmap, &visible2, state->m_reel2_tilemap, 0, 0); tilemap_draw(bitmap, &visible3, state->m_reel3_tilemap, 0, 0); diff --git a/src/mame/drivers/cesclass.c b/src/mame/drivers/cesclass.c index cace3843612..66823fa7c6d 100644 --- a/src/mame/drivers/cesclass.c +++ b/src/mame/drivers/cesclass.c @@ -64,7 +64,7 @@ bool cesclassic_state::screen_update(screen_device &screen, bitmap_t &bitmap, co { int x,y,xi; - bitmap_fill(&bitmap,&cliprect,get_black_pen(machine())); + bitmap.fill(get_black_pen(machine()), cliprect); { for(y=0;y<64;y++) @@ -79,7 +79,7 @@ bool cesclassic_state::screen_update(screen_device &screen, bitmap_t &bitmap, co color |= (((m_vram[x+y*16])>>(15-xi)) & 1)<<1; if((x*16+xi)<256 && ((y)+0)<256) - *BITMAP_ADDR32(&bitmap, y, x*16+xi) = machine().pens[color]; + bitmap.pix32(y, x*16+xi) = machine().pens[color]; } } } diff --git a/src/mame/drivers/champbwl.c b/src/mame/drivers/champbwl.c index c740c12a38f..8f9c1eb8969 100644 --- a/src/mame/drivers/champbwl.c +++ b/src/mame/drivers/champbwl.c @@ -451,7 +451,7 @@ static MACHINE_RESET( champbwl ) SCREEN_UPDATE( champbwl ) { - bitmap_fill(bitmap, cliprect, 0x1f0); + bitmap->fill(0x1f0, *cliprect); screen.machine().device<seta001_device>("spritegen")->set_fg_yoffsets( -0x12, 0x0e ); screen.machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x1, -0x1 ); @@ -509,7 +509,7 @@ MACHINE_CONFIG_END static SCREEN_UPDATE( doraemon ) { - bitmap_fill(bitmap, cliprect, 0x1f0); + bitmap->fill(0x1f0, *cliprect); screen.machine().device<seta001_device>("spritegen")->set_bg_yoffsets( 0x00, 0x01 ); screen.machine().device<seta001_device>("spritegen")->set_fg_yoffsets( 0x00, 0x10 ); diff --git a/src/mame/drivers/clayshoo.c b/src/mame/drivers/clayshoo.c index 1c38906fefa..79a46e90169 100644 --- a/src/mame/drivers/clayshoo.c +++ b/src/mame/drivers/clayshoo.c @@ -198,7 +198,7 @@ static SCREEN_UPDATE( clayshoo ) for (i = 0; i < 8; i++) { pen_t pen = (data & 0x80) ? RGB_WHITE : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x) = pen; + bitmap->pix32(y, x) = pen; data = data << 1; x = x + 1; diff --git a/src/mame/drivers/cntsteer.c b/src/mame/drivers/cntsteer.c index 57f1e5490af..7a264b8fc3e 100644 --- a/src/mame/drivers/cntsteer.c +++ b/src/mame/drivers/cntsteer.c @@ -258,7 +258,7 @@ static SCREEN_UPDATE( zerotrgt ) cntsteer_state *state = screen.machine().driver_data<cntsteer_state>(); if (state->m_disable_roz) - bitmap_fill(bitmap, cliprect, screen.machine().pens[8 * state->m_bg_color_bank]); + bitmap->fill(screen.machine().pens[8 * state->m_bg_color_bank], *cliprect); else { int p1, p2, p3, p4; @@ -309,7 +309,7 @@ static SCREEN_UPDATE( cntsteer ) cntsteer_state *state = screen.machine().driver_data<cntsteer_state>(); if (state->m_disable_roz) - bitmap_fill(bitmap, cliprect, screen.machine().pens[8 * state->m_bg_color_bank]); + bitmap->fill(screen.machine().pens[8 * state->m_bg_color_bank], *cliprect); else { int p1, p2, p3, p4; diff --git a/src/mame/drivers/cobra.c b/src/mame/drivers/cobra.c index ee7f8a69c8f..3ab9a09bcd9 100644 --- a/src/mame/drivers/cobra.c +++ b/src/mame/drivers/cobra.c @@ -75,7 +75,7 @@ public: static void render_scan(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid) { bitmap_t *destmap = (bitmap_t *)dest; - UINT32 *fb = BITMAP_ADDR32(destmap, scanline, 0); + UINT32 *fb = &destmap->pix32(scanline); int x; for (x = extent->startx; x < extent->stopx; x++) @@ -92,7 +92,7 @@ static void render_texture_scan(void *dest, INT32 scanline, const poly_extent *e float v = extent->param[1].start; float du = extent->param[0].dpdx; float dv = extent->param[1].dpdx; - UINT32 *fb = BITMAP_ADDR32(destmap, scanline, 0); + UINT32 *fb = &destmap->pix32(scanline); int x; for (x = extent->startx; x < extent->stopx; x++) diff --git a/src/mame/drivers/coolpool.c b/src/mame/drivers/coolpool.c index 43c067c854b..7acfb852664 100644 --- a/src/mame/drivers/coolpool.c +++ b/src/mame/drivers/coolpool.c @@ -59,7 +59,7 @@ static void amerdart_scanline(screen_device &screen, bitmap_t *bitmap, int scanl coolpool_state *state = screen.machine().driver_data<coolpool_state>(); UINT16 *vram = &state->m_vram_base[(params->rowaddr << 8) & 0xff00]; - UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0); + UINT32 *dest = &bitmap->pix32(scanline); rgb_t pens[16]; int coladdr = params->coladdr; int x; @@ -88,7 +88,7 @@ static void coolpool_scanline(screen_device &screen, bitmap_t *bitmap, int scanl coolpool_state *state = screen.machine().driver_data<coolpool_state>(); UINT16 *vram = &state->m_vram_base[(params->rowaddr << 8) & 0x1ff00]; - UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0); + UINT32 *dest = &bitmap->pix32(scanline); const rgb_t *pens = tlc34076_get_pens(screen.machine().device("tlc34076")); int coladdr = params->coladdr; int x; diff --git a/src/mame/drivers/coolridr.c b/src/mame/drivers/coolridr.c index 57c55460550..c4ef00f8167 100644 --- a/src/mame/drivers/coolridr.c +++ b/src/mame/drivers/coolridr.c @@ -357,7 +357,7 @@ static SCREEN_UPDATE(coolridr) } copybitmap_trans(bitmap, state->m_temp_bitmap_sprites, 0, 0, 0, 0, cliprect, 0); - bitmap_fill(state->m_temp_bitmap_sprites, cliprect, 0); + state->m_temp_bitmap_sprites->fill(0, *cliprect); return 0; @@ -477,10 +477,7 @@ static WRITE32_HANDLER( sysh1_txt_blit_w ) y2 = (state->m_attr_buff[9] & 0x01ff0000) >> 16; x2 = (state->m_attr_buff[9] & 0x000001ff); - clip.min_x = 0; - clip.max_x = state->m_temp_bitmap_sprites->width; - clip.min_y = 0; - clip.max_y = state->m_temp_bitmap_sprites->height; + clip = state->m_temp_bitmap_sprites->cliprect(); drawgfx_opaque(state->m_temp_bitmap_sprites,&clip,gfx,1,1,0,0,x2,y2); } diff --git a/src/mame/drivers/corona.c b/src/mame/drivers/corona.c index 411bda79785..1591b46b9a2 100644 --- a/src/mame/drivers/corona.c +++ b/src/mame/drivers/corona.c @@ -454,7 +454,7 @@ static SCREEN_UPDATE(winner) for (y = 0; y < 256; y++) for (x = 0; x < 256; x++) - *BITMAP_ADDR16(bitmap, y, x) = state->m_videobuf[y * 512 + x]; + bitmap->pix16(y, x) = state->m_videobuf[y * 512 + x]; return 0; } @@ -466,7 +466,7 @@ static SCREEN_UPDATE(luckyrlt) for (y = 0; y < 256; y++) for (x = 0; x < 256; x++) - *BITMAP_ADDR16(bitmap, 255 - y, x) = state->m_videobuf[y * 512 + x]; + bitmap->pix16(255 - y, x) = state->m_videobuf[y * 512 + x]; return 0; } diff --git a/src/mame/drivers/cps3.c b/src/mame/drivers/cps3.c index 4a1c7da8b2d..9c0d0e9db27 100644 --- a/src/mame/drivers/cps3.c +++ b/src/mame/drivers/cps3.c @@ -442,16 +442,8 @@ INLINE void cps3_drawgfxzoom(bitmap_t *dest_bmp,const rectangle *clip,const gfx_ /* force clip to bitmap boundary */ if(clip) { - myclip.min_x = clip->min_x; - myclip.max_x = clip->max_x; - myclip.min_y = clip->min_y; - myclip.max_y = clip->max_y; - - if (myclip.min_x < 0) myclip.min_x = 0; - if (myclip.max_x >= dest_bmp->width) myclip.max_x = dest_bmp->width-1; - if (myclip.min_y < 0) myclip.min_y = 0; - if (myclip.max_y >= dest_bmp->height) myclip.max_y = dest_bmp->height-1; - + myclip = *clip; + myclip &= dest_bmp->cliprect(); clip=&myclip; } @@ -537,7 +529,7 @@ INLINE void cps3_drawgfxzoom(bitmap_t *dest_bmp,const rectangle *clip,const gfx_ for( y=sy; y<ey; y++ ) { const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; - UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0); + UINT32 *dest = &dest_bmp->pix32(y); int x, x_index = x_index_base; for( x=sx; x<ex; x++ ) @@ -556,7 +548,7 @@ INLINE void cps3_drawgfxzoom(bitmap_t *dest_bmp,const rectangle *clip,const gfx_ for( y=sy; y<ey; y++ ) { const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; - UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0); + UINT32 *dest = &dest_bmp->pix32(y); int x, x_index = x_index_base; for( x=sx; x<ex; x++ ) @@ -576,7 +568,7 @@ INLINE void cps3_drawgfxzoom(bitmap_t *dest_bmp,const rectangle *clip,const gfx_ for( y=sy; y<ey; y++ ) { const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; - UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0); + UINT32 *dest = &dest_bmp->pix32(y); int x, x_index = x_index_base; for( x=sx; x<ex; x++ ) @@ -596,7 +588,7 @@ INLINE void cps3_drawgfxzoom(bitmap_t *dest_bmp,const rectangle *clip,const gfx_ for( y=sy; y<ey; y++ ) { const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; - UINT32 *dest = BITMAP_ADDR32(dest_bmp, y, 0); + UINT32 *dest = &dest_bmp->pix32(y); int x, x_index = x_index_base; for( x=sx; x<ex; x++ ) @@ -868,7 +860,7 @@ static VIDEO_START(cps3) state->m_renderbuffer_clip.min_y = 0; state->m_renderbuffer_clip.max_y = 224-1; - bitmap_fill(state->m_renderbuffer_bitmap,&state->m_renderbuffer_clip,0x3f); + state->m_renderbuffer_bitmap->fill(0x3f, state->m_renderbuffer_clip); } @@ -1010,7 +1002,7 @@ static SCREEN_UPDATE(cps3) state->m_renderbuffer_clip.min_y = 0; state->m_renderbuffer_clip.max_y = ((224*fszx)>>16)-1; - bitmap_fill(state->m_renderbuffer_bitmap,&state->m_renderbuffer_clip,0); + state->m_renderbuffer_bitmap->fill(0, state->m_renderbuffer_clip); /* Sprites */ { @@ -1226,8 +1218,8 @@ static SCREEN_UPDATE(cps3) srcy=0; for (rendery=0;rendery<224;rendery++) { - dstbitmap = BITMAP_ADDR32(bitmap, rendery, 0); - srcbitmap = BITMAP_ADDR32(state->m_renderbuffer_bitmap, srcy>>16, 0); + dstbitmap = &bitmap->pix32(rendery); + srcbitmap = &state->m_renderbuffer_bitmap->pix32(srcy>>16); srcx=0; for (renderx=0;renderx<state->m_screenwidth;renderx++) diff --git a/src/mame/drivers/crystal.c b/src/mame/drivers/crystal.c index e89ed162f62..5a0fe106a93 100644 --- a/src/mame/drivers/crystal.c +++ b/src/mame/drivers/crystal.c @@ -689,7 +689,7 @@ static SCREEN_UPDATE( crystal ) srcline = (UINT16 *) Visible; for (y = 0; y < 240; y++) - memcpy(BITMAP_ADDR16(bitmap, y, 0), &srcline[y * 512], width * 2); + memcpy(&bitmap->pix16(y), &srcline[y * 512], width * 2); return 0; } diff --git a/src/mame/drivers/cshooter.c b/src/mame/drivers/cshooter.c index fded0916034..d2af5a2d85a 100644 --- a/src/mame/drivers/cshooter.c +++ b/src/mame/drivers/cshooter.c @@ -138,7 +138,7 @@ static VIDEO_START(cshooter) static SCREEN_UPDATE(cshooter) { cshooter_state *state = screen.machine().driver_data<cshooter_state>(); - bitmap_fill(bitmap, cliprect, 0/*get_black_pen(screen.screen.machine())*/); + bitmap->fill(0/*get_black_pen(screen.screen.machine(, *cliprect))*/); tilemap_mark_all_tiles_dirty(state->m_txtilemap); //sprites diff --git a/src/mame/drivers/csplayh5.c b/src/mame/drivers/csplayh5.c index b38582fa32e..10acbefe90b 100644 --- a/src/mame/drivers/csplayh5.c +++ b/src/mame/drivers/csplayh5.c @@ -70,7 +70,7 @@ static VIDEO_START( csplayh5 ) static SCREEN_UPDATE( csplayh5 ) { csplayh5_state *state = screen.machine().driver_data<csplayh5_state>(); - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); copybitmap(bitmap, state->m_vdp0_bitmap, 0, 0, 0, 0, cliprect); diff --git a/src/mame/drivers/cubeqst.c b/src/mame/drivers/cubeqst.c index a1a8b69f803..7ba83a0d498 100644 --- a/src/mame/drivers/cubeqst.c +++ b/src/mame/drivers/cubeqst.c @@ -58,8 +58,6 @@ public: * *************************************/ -static const rectangle overlay_clip = { 0, 320-1, 0, 256-8 }; - static VIDEO_START( cubeqst ) { cubeqst_state *state = machine.driver_data<cubeqst_state>(); @@ -106,7 +104,7 @@ static SCREEN_UPDATE( cubeqst ) */ /* Bit 3 selects LD/#GRAPHICS */ - bitmap_fill(bitmap, cliprect, state->m_colormap[255]); + bitmap->fill(state->m_colormap[255], *cliprect); /* TODO: Add 1 for linebuffering? */ for (y = cliprect->min_y; y <= cliprect->max_y; ++y) @@ -114,7 +112,7 @@ static SCREEN_UPDATE( cubeqst ) int i; int num_entries = cubeqcpu_get_ptr_ram_val(screen.machine().device("line_cpu"), y); UINT32 *stk_ram = cubeqcpu_get_stack_ram(screen.machine().device("line_cpu")); - UINT32 *dest = BITMAP_ADDR32(bitmap, y, 0); + UINT32 *dest = &bitmap->pix32(y); UINT32 pen; /* Zap the depth buffer */ diff --git a/src/mame/drivers/cybertnk.c b/src/mame/drivers/cybertnk.c index 8de258ad9c0..75f6272ff21 100644 --- a/src/mame/drivers/cybertnk.c +++ b/src/mame/drivers/cybertnk.c @@ -213,7 +213,7 @@ static void draw_pixel( bitmap_t* bitmap, const rectangle *cliprect, int y, int if (y>cliprect->max_y) return; if (y<cliprect->min_y) return; - *BITMAP_ADDR16(bitmap, y, x) = pen; + bitmap->pix16(y, x) = pen; } static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const rectangle *cliprect, int screen_shift) @@ -223,7 +223,7 @@ static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const recta tilemap_set_scrolldx(state->m_tx_tilemap, screen_shift, screen_shift); - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); { int i; @@ -460,7 +460,7 @@ static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const recta popmessage("%02x %02x %04x %02x",state->m_test_x,state->m_test_y,state->m_start_offs,state->m_color_pen); - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); count = (state->m_start_offs); @@ -477,28 +477,28 @@ static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const recta color|= ((blit_ram[count+3] & 0xff) << 0); dot = (color & 0xf0000000) >> 28; - *BITMAP_ADDR16(bitmap, y, x+0) = screen.machine().pens[dot+(state->m_color_pen<<4)]; + bitmap->pix16(y, x+0) = screen.machine().pens[dot+(state->m_color_pen<<4)]; dot = (color & 0x0f000000) >> 24; - *BITMAP_ADDR16(bitmap, y, x+4) = screen.machine().pens[dot+(state->m_color_pen<<4)]; + bitmap->pix16(y, x+4) = screen.machine().pens[dot+(state->m_color_pen<<4)]; dot = (color & 0x00f00000) >> 20; - *BITMAP_ADDR16(bitmap, y, x+1) = screen.machine().pens[dot+(state->m_color_pen<<4)]; + bitmap->pix16(y, x+1) = screen.machine().pens[dot+(state->m_color_pen<<4)]; dot = (color & 0x000f0000) >> 16; - *BITMAP_ADDR16(bitmap, y, x+5) = screen.machine().pens[dot+(state->m_color_pen<<4)]; + bitmap->pix16(y, x+5) = screen.machine().pens[dot+(state->m_color_pen<<4)]; dot = (color & 0x0000f000) >> 12; - *BITMAP_ADDR16(bitmap, y, x+2) = screen.machine().pens[dot+(state->m_color_pen<<4)]; + bitmap->pix16(y, x+2) = screen.machine().pens[dot+(state->m_color_pen<<4)]; dot = (color & 0x00000f00) >> 8; - *BITMAP_ADDR16(bitmap, y, x+6) = screen.machine().pens[dot+(state->m_color_pen<<4)]; + bitmap->pix16(y, x+6) = screen.machine().pens[dot+(state->m_color_pen<<4)]; dot = (color & 0x000000f0) >> 4; - *BITMAP_ADDR16(bitmap, y, x+3) = screen.machine().pens[dot+(state->m_color_pen<<4)]; + bitmap->pix16(y, x+3) = screen.machine().pens[dot+(state->m_color_pen<<4)]; dot = (color & 0x0000000f) >> 0; - *BITMAP_ADDR16(bitmap, y, x+7) = screen.machine().pens[dot+(state->m_color_pen<<4)]; + bitmap->pix16(y, x+7) = screen.machine().pens[dot+(state->m_color_pen<<4)]; count+=4; } diff --git a/src/mame/drivers/dai3wksi.c b/src/mame/drivers/dai3wksi.c index 5ac7e5590bd..8b988d089c0 100644 --- a/src/mame/drivers/dai3wksi.c +++ b/src/mame/drivers/dai3wksi.c @@ -158,9 +158,9 @@ static SCREEN_UPDATE( dai3wksi ) pen_t pen = (data & (1 << i)) ? pens[color] : pens[0]; if (state->m_dai3wksi_flipscreen) - *BITMAP_ADDR32(bitmap, 255-y, 255-x) = pen; + bitmap->pix32(255-y, 255-x) = pen; else - *BITMAP_ADDR32(bitmap, y, x) = pen; + bitmap->pix32(y, x) = pen; x++; } diff --git a/src/mame/drivers/darkhors.c b/src/mame/drivers/darkhors.c index d4c81abc8a8..715af66a36d 100644 --- a/src/mame/drivers/darkhors.c +++ b/src/mame/drivers/darkhors.c @@ -195,7 +195,7 @@ static SCREEN_UPDATE( darkhors ) } #endif - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); tilemap_set_scrollx(state->m_tmap,0, (state->m_tmapscroll[0] >> 16) - 5); tilemap_set_scrolly(state->m_tmap,0, (state->m_tmapscroll[0] & 0xffff) - 0xff ); diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c index d1a59b3c88e..9f23cf642d4 100644 --- a/src/mame/drivers/dblewing.c +++ b/src/mame/drivers/dblewing.c @@ -101,8 +101,8 @@ static SCREEN_UPDATE(dblewing) flip_screen_set(screen.machine(), BIT(flip, 7)); deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll); - bitmap_fill(bitmap, cliprect, 0); /* not Confirmed */ - bitmap_fill(screen.machine().priority_bitmap, NULL, 0); + bitmap->fill(0, *cliprect); /* not Confirmed */ + screen.machine().priority_bitmap->fill(0); deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 2); deco16ic_tilemap_1_draw(state->m_deco_tilegen1, bitmap, cliprect, 0, 4); diff --git a/src/mame/drivers/ddenlovr.c b/src/mame/drivers/ddenlovr.c index abb77552aba..e510897b7fc 100644 --- a/src/mame/drivers/ddenlovr.c +++ b/src/mame/drivers/ddenlovr.c @@ -1294,7 +1294,7 @@ static void copylayer(running_machine &machine, bitmap_t *bitmap, const rectangl { pen &= penmask; pen |= palbase; - *BITMAP_ADDR16(bitmap, y, x) = pen; + bitmap->pix16(y, x) = pen; } } } @@ -1341,7 +1341,7 @@ SCREEN_UPDATE(ddenlovr) if (screen.machine().input().code_pressed_once(KEYCODE_F)) { base++; while ((gfx[base] & 0xf0) != 0x30) base++; } #endif - bitmap_fill(bitmap, cliprect, state->m_ddenlovr_bgcolor); + bitmap->fill(state->m_ddenlovr_bgcolor, *cliprect); #ifdef MAME_DEBUG if (screen.machine().input().code_pressed(KEYCODE_Z)) diff --git a/src/mame/drivers/deco156.c b/src/mame/drivers/deco156.c index 55d0c5f37ad..60c1fd8bc03 100644 --- a/src/mame/drivers/deco156.c +++ b/src/mame/drivers/deco156.c @@ -63,8 +63,8 @@ static SCREEN_UPDATE( wcvol95 ) deco156_state *state = screen.machine().driver_data<deco156_state>(); - bitmap_fill(screen.machine().priority_bitmap, NULL, 0); - bitmap_fill(bitmap, NULL, 0); + screen.machine().priority_bitmap->fill(0); + bitmap->fill(0); deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll); diff --git a/src/mame/drivers/destroyr.c b/src/mame/drivers/destroyr.c index 26a2b7f7625..127b416e810 100644 --- a/src/mame/drivers/destroyr.c +++ b/src/mame/drivers/destroyr.c @@ -47,7 +47,7 @@ static SCREEN_UPDATE( destroyr ) destroyr_state *state = screen.machine().driver_data<destroyr_state>(); int i, j; - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); /* draw major objects */ for (i = 0; i < 16; i++) @@ -104,7 +104,7 @@ static SCREEN_UPDATE( destroyr ) for (i = 0; i < 256; i++) { if (i & 4) - *BITMAP_ADDR16(bitmap, state->m_cursor ^ 0xff, i) = 7; + bitmap->pix16(state->m_cursor ^ 0xff, i) = 7; } return 0; } diff --git a/src/mame/drivers/dgpix.c b/src/mame/drivers/dgpix.c index 7d184030443..478cd253c81 100644 --- a/src/mame/drivers/dgpix.c +++ b/src/mame/drivers/dgpix.c @@ -294,7 +294,7 @@ static SCREEN_UPDATE( dgpix ) { int x; UINT32 *src = &state->m_vram[(state->m_vbuffer ? 0 : 0x10000) | (y << 8)]; - UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0); + UINT16 *dest = &bitmap->pix16(y); for (x = 0; x < 320; x += 2) { diff --git a/src/mame/drivers/discoboy.c b/src/mame/drivers/discoboy.c index 5e55886e211..b43b2443201 100644 --- a/src/mame/drivers/discoboy.c +++ b/src/mame/drivers/discoboy.c @@ -157,7 +157,7 @@ static SCREEN_UPDATE( discoboy ) palette_set_color(screen.machine(), (i / 2) + 0x400, MAKE_RGB(r, g, b)); } - bitmap_fill(bitmap, cliprect, 0x3ff); + bitmap->fill(0x3ff, *cliprect); for (y = 0; y < 32; y++) { diff --git a/src/mame/drivers/diverboy.c b/src/mame/drivers/diverboy.c index 1bae24b62f0..67d747f8846 100644 --- a/src/mame/drivers/diverboy.c +++ b/src/mame/drivers/diverboy.c @@ -111,7 +111,7 @@ static void draw_sprites( running_machine& machine, bitmap_t *bitmap, const rect static SCREEN_UPDATE(diverboy) { -// bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); +// bitmap->fill(get_black_pen(screen.machine()), *cliprect); draw_sprites(screen.machine(), bitmap, cliprect); return 0; } diff --git a/src/mame/drivers/dmndrby.c b/src/mame/drivers/dmndrby.c index c30aa07d004..be7a050ac7e 100644 --- a/src/mame/drivers/dmndrby.c +++ b/src/mame/drivers/dmndrby.c @@ -347,7 +347,7 @@ static SCREEN_UPDATE(dderby) const gfx_element *sprites = screen.machine().gfx[1]; const gfx_element *track = screen.machine().gfx[2]; - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); /* Draw racetrack diff --git a/src/mame/drivers/dorachan.c b/src/mame/drivers/dorachan.c index d298a3b3f0b..b1d5282c2db 100644 --- a/src/mame/drivers/dorachan.c +++ b/src/mame/drivers/dorachan.c @@ -109,7 +109,7 @@ static SCREEN_UPDATE( dorachan ) for (i = 0; i < 8; i++) { UINT8 color = (data & 0x01) ? fore_color : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x) = pens[color]; + bitmap->pix32(y, x) = pens[color]; data = data >> 1; x = x + 1; diff --git a/src/mame/drivers/dotrikun.c b/src/mame/drivers/dotrikun.c index b292c2572aa..25cc9890c13 100644 --- a/src/mame/drivers/dotrikun.c +++ b/src/mame/drivers/dotrikun.c @@ -78,10 +78,10 @@ static SCREEN_UPDATE( dotrikun ) pen_t pen = ((data >> (7 - i)) & 1) ? fore_pen : back_pen; /* I think the video hardware doubles pixels, screen would be too small otherwise */ - *BITMAP_ADDR32(bitmap, y + 0, (x + 0) + i*2) = pen; - *BITMAP_ADDR32(bitmap, y + 0, (x + 1) + i*2) = pen; - *BITMAP_ADDR32(bitmap, y + 1, (x + 0) + i*2) = pen; - *BITMAP_ADDR32(bitmap, y + 1, (x + 1) + i*2) = pen; + bitmap->pix32(y + 0, (x + 0) + i*2) = pen; + bitmap->pix32(y + 0, (x + 1) + i*2) = pen; + bitmap->pix32(y + 1, (x + 0) + i*2) = pen; + bitmap->pix32(y + 1, (x + 1) + i*2) = pen; } } } diff --git a/src/mame/drivers/dunhuang.c b/src/mame/drivers/dunhuang.c index f315e182bf2..6649c9c3233 100644 --- a/src/mame/drivers/dunhuang.c +++ b/src/mame/drivers/dunhuang.c @@ -147,7 +147,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z)) } #endif - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); switch (state->m_layers) { diff --git a/src/mame/drivers/dwarfd.c b/src/mame/drivers/dwarfd.c index ad951ba698b..c152e0ee4ca 100644 --- a/src/mame/drivers/dwarfd.c +++ b/src/mame/drivers/dwarfd.c @@ -837,7 +837,7 @@ static void drawCrt( running_machine &machine, bitmap_t *bitmap,const rectangle static SCREEN_UPDATE( dwarfd ) { - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); drawCrt(screen.machine(), bitmap, cliprect); return 0; } diff --git a/src/mame/drivers/embargo.c b/src/mame/drivers/embargo.c index 39848d14d3a..4b0f931ca95 100644 --- a/src/mame/drivers/embargo.c +++ b/src/mame/drivers/embargo.c @@ -47,7 +47,7 @@ static SCREEN_UPDATE( embargo ) for (i = 0; i < 8; i++) { pen_t pen = (data & 0x01) ? RGB_WHITE : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x) = pen; + bitmap->pix32(y, x) = pen; data = data >> 1; x = x + 1; diff --git a/src/mame/drivers/enigma2.c b/src/mame/drivers/enigma2.c index 5885bffe2e3..e160eefd45d 100644 --- a/src/mame/drivers/enigma2.c +++ b/src/mame/drivers/enigma2.c @@ -260,7 +260,7 @@ static SCREEN_UPDATE( enigma2 ) /* stars only appear at certain positions */ color = ((x & y & 0x0f) == 0x0f) ? star_color : 0; - *BITMAP_ADDR32(bitmap, bitmap_y, x) = pens[color]; + bitmap->pix32(bitmap_y, x) = pens[color]; /* next pixel */ x = x + 1; @@ -323,7 +323,7 @@ static SCREEN_UPDATE( enigma2a ) } pen = bit ? RGB_WHITE : RGB_BLACK; - *BITMAP_ADDR32(bitmap, bitmap_y, x) = pen; + bitmap->pix32(bitmap_y, x) = pen; /* next pixel */ x = x + 1; diff --git a/src/mame/drivers/eolith16.c b/src/mame/drivers/eolith16.c index 4186e8d0743..669dd8eb454 100644 --- a/src/mame/drivers/eolith16.c +++ b/src/mame/drivers/eolith16.c @@ -133,10 +133,10 @@ static SCREEN_UPDATE( eolith16 ) for (x=0;x < 320/2;x++) { color = state->m_vram[count + (0x10000/2) * (state->m_vbuffer ^ 1)] & 0xff; - *BITMAP_ADDR16(bitmap, y, x*2 + 0) = color; + bitmap->pix16(y, x*2 + 0) = color; color = (state->m_vram[count + (0x10000/2) * (state->m_vbuffer ^ 1)] & 0xff00) >> 8; - *BITMAP_ADDR16(bitmap, y, x*2 + 1) = color; + bitmap->pix16(y, x*2 + 1) = color; count++; } diff --git a/src/mame/drivers/esh.c b/src/mame/drivers/esh.c index bba25128b1f..eb3163d1784 100644 --- a/src/mame/drivers/esh.c +++ b/src/mame/drivers/esh.c @@ -52,7 +52,7 @@ static SCREEN_UPDATE( esh ) int charx, chary; /* clear */ - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); /* Draw tiles */ for (charx = 0; charx < 32; charx++) diff --git a/src/mame/drivers/f-32.c b/src/mame/drivers/f-32.c index f783990a7b9..2a3b39a6ec7 100644 --- a/src/mame/drivers/f-32.c +++ b/src/mame/drivers/f-32.c @@ -42,8 +42,8 @@ static SCREEN_UPDATE( mosaicf2 ) if ((x < 0xa0) && (y < 0xe0)) { - *BITMAP_ADDR16(bitmap, y, (x * 2) + 0) = (state->m_videoram[offs] >> 16) & 0x7fff; - *BITMAP_ADDR16(bitmap, y, (x * 2) + 1) = (state->m_videoram[offs] >> 0) & 0x7fff; + bitmap->pix16(y, (x * 2) + 0) = (state->m_videoram[offs] >> 16) & 0x7fff; + bitmap->pix16(y, (x * 2) + 1) = (state->m_videoram[offs] >> 0) & 0x7fff; } } diff --git a/src/mame/drivers/fcrash.c b/src/mame/drivers/fcrash.c index 691288fe4b4..72b17d5a0ae 100644 --- a/src/mame/drivers/fcrash.c +++ b/src/mame/drivers/fcrash.c @@ -268,9 +268,9 @@ static SCREEN_UPDATE( fcrash ) tilemap_set_enable(state->m_bg_tilemap[2], 1); /* Blank screen */ - bitmap_fill(bitmap, cliprect, 0xbff); + bitmap->fill(0xbff, *cliprect); - bitmap_fill(screen.machine().priority_bitmap,cliprect,0); + screen.machine().priority_bitmap->fill(0, *cliprect); l0 = (layercontrol >> 0x06) & 03; l1 = (layercontrol >> 0x08) & 03; l2 = (layercontrol >> 0x0a) & 03; @@ -349,9 +349,9 @@ static SCREEN_UPDATE( kodb ) tilemap_set_enable(state->m_bg_tilemap[2], 1); /* Blank screen */ - bitmap_fill(bitmap, cliprect, 0xbff); + bitmap->fill(0xbff, *cliprect); - bitmap_fill(screen.machine().priority_bitmap, cliprect, 0); + screen.machine().priority_bitmap->fill(0, *cliprect); l0 = (layercontrol >> 0x06) & 03; l1 = (layercontrol >> 0x08) & 03; l2 = (layercontrol >> 0x0a) & 03; diff --git a/src/mame/drivers/feversoc.c b/src/mame/drivers/feversoc.c index 03d76e9501e..5148d165f2b 100644 --- a/src/mame/drivers/feversoc.c +++ b/src/mame/drivers/feversoc.c @@ -88,7 +88,7 @@ static SCREEN_UPDATE( feversoc ) UINT32 *spriteram32 = state->m_spriteram; int offs,spr_offs,colour,sx,sy,h,w,dx,dy; - bitmap_fill(bitmap, cliprect, screen.machine().pens[0]); //black pen + bitmap->fill(screen.machine().pens[0], *cliprect); //black pen for(offs=(0x2000/4)-2;offs>-1;offs-=2) { diff --git a/src/mame/drivers/firebeat.c b/src/mame/drivers/firebeat.c index b1a731fb513..a395ddc6d29 100644 --- a/src/mame/drivers/firebeat.c +++ b/src/mame/drivers/firebeat.c @@ -254,7 +254,7 @@ static void gcu_draw_object(running_machine &machine, bitmap_t *bitmap, const re { int xi; int index; - UINT16 *d = BITMAP_ADDR16(bitmap, j+y, x); + UINT16 *d = &bitmap->pix16(j+y, x); //int index = address + ((v >> 6) * 1024); if (yflip) @@ -382,7 +382,7 @@ static void gcu_fill_rect(bitmap_t *bitmap, const rectangle *cliprect, UINT32 *c for (j=y1; j < y2; j++) { - UINT16 *d = BITMAP_ADDR16(bitmap, j, 0); + UINT16 *d = &bitmap->pix16(j); for (i=x1; i < x2; i++) { if (color[i&3] & 0x8000) @@ -429,7 +429,7 @@ static void gcu_draw_character(running_machine &machine, bitmap_t *bitmap, const for (j=0; j < 8; j++) { - UINT16 *d = BITMAP_ADDR16(bitmap, y+j, x); + UINT16 *d = &bitmap->pix16(y+j, x); UINT16 line = vr[address^1]; address += 4; @@ -517,7 +517,7 @@ static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const recta { firebeat_state *state = screen.machine().driver_data<firebeat_state>(); - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); if (mame_stricmp(screen.machine().system().name, "popn7") == 0) { diff --git a/src/mame/drivers/firefox.c b/src/mame/drivers/firefox.c index cb5136c26df..d1d0f4eaf6e 100644 --- a/src/mame/drivers/firefox.c +++ b/src/mame/drivers/firefox.c @@ -188,7 +188,7 @@ static SCREEN_UPDATE( firefox ) int sprite; int gfxtop = screen.visible_area().min_y; - bitmap_fill( bitmap, cliprect, palette_get_color(screen.machine(), 256) ); + bitmap->fill(palette_get_color(screen.machine(), 256), *cliprect); for( sprite = 0; sprite < 32; sprite++ ) { diff --git a/src/mame/drivers/flyball.c b/src/mame/drivers/flyball.c index 4fa4ceea3d0..55961443a4f 100644 --- a/src/mame/drivers/flyball.c +++ b/src/mame/drivers/flyball.c @@ -111,7 +111,7 @@ static SCREEN_UPDATE( flyball ) x <= cliprect->max_x && y >= cliprect->min_y && y <= cliprect->max_y) - *BITMAP_ADDR16(bitmap, y, x) = 1; + bitmap->pix16(y, x) = 1; return 0; } diff --git a/src/mame/drivers/galaxi.c b/src/mame/drivers/galaxi.c index 8b82257a944..c9ac06eca23 100644 --- a/src/mame/drivers/galaxi.c +++ b/src/mame/drivers/galaxi.c @@ -188,7 +188,7 @@ static SCREEN_UPDATE(galaxi) #endif if (layers_ctrl & 1) tilemap_draw(bitmap, cliprect, state->m_bg1_tmap, TILEMAP_DRAW_OPAQUE, 0); - else bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + else bitmap->fill(get_black_pen(screen.machine()), *cliprect); if (layers_ctrl & 2) tilemap_draw(bitmap, cliprect, state->m_bg2_tmap, 0, 0); if (layers_ctrl & 4) tilemap_draw(bitmap, cliprect, state->m_bg3_tmap, 0, 0); if (layers_ctrl & 8) tilemap_draw(bitmap, cliprect, state->m_bg4_tmap, 0, 0); diff --git a/src/mame/drivers/galaxia.c b/src/mame/drivers/galaxia.c index b44e9a63cec..27ccfda7b7c 100644 --- a/src/mame/drivers/galaxia.c +++ b/src/mame/drivers/galaxia.c @@ -80,18 +80,18 @@ static SCREEN_UPDATE( galaxia ) for (x = cliprect->min_x; x <= cliprect->max_x; x++) { - int pixel0 = *BITMAP_ADDR16(s2636_0_bitmap, y, x); - int pixel1 = *BITMAP_ADDR16(s2636_1_bitmap, y, x); - int pixel2 = *BITMAP_ADDR16(s2636_2_bitmap, y, x); + int pixel0 = s2636_0_bitmap->pix16(y, x); + int pixel1 = s2636_1_bitmap->pix16(y, x); + int pixel2 = s2636_2_bitmap->pix16(y, x); if (S2636_IS_PIXEL_DRAWN(pixel0)) - *BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel0); + bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel0); if (S2636_IS_PIXEL_DRAWN(pixel1)) - *BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel1); + bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel1); if (S2636_IS_PIXEL_DRAWN(pixel2)) - *BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel2); + bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel2); } } } diff --git a/src/mame/drivers/galgame.c b/src/mame/drivers/galgame.c index f94cf9c53d8..59934134197 100644 --- a/src/mame/drivers/galgame.c +++ b/src/mame/drivers/galgame.c @@ -163,10 +163,10 @@ static WRITE16_HANDLER(ke_w) static SCREEN_UPDATE( galaxygame ) { galaxygame_state *state = screen.machine().driver_data<galaxygame_state>(); - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); for (int i = 0; i < state->m_point_display_list_index; i++ ) { - *BITMAP_ADDR16(bitmap, state->m_point_display_list[i].x >> 7, state->m_point_display_list[i].y >> 7) = 1; + bitmap->pix16(state->m_point_display_list[i].x >> 7, state->m_point_display_list[i].y >> 7) = 1; } return 0; } diff --git a/src/mame/drivers/galpani3.c b/src/mame/drivers/galpani3.c index 046409af90f..283a7f87f3b 100644 --- a/src/mame/drivers/galpani3.c +++ b/src/mame/drivers/galpani3.c @@ -210,7 +210,7 @@ static SCREEN_UPDATE(galpani3) UINT16 pixdata1; const pen_t *paldata = screen.machine().pens; - bitmap_fill(bitmap, cliprect, 0x0000); + bitmap->fill(0x0000, *cliprect); { int drawy, drawx; @@ -236,7 +236,7 @@ static SCREEN_UPDATE(galpani3) UINT8 pridat = state->m_priority_buffer[(priline*0x200)+prioffs]; - UINT32* dst = BITMAP_ADDR32(bitmap, drawy, drawx); + UINT32* dst = &bitmap->pix32(drawy, drawx); @@ -352,15 +352,15 @@ static SCREEN_UPDATE(galpani3) } } - bitmap_fill(state->m_sprite_bitmap_1, cliprect, 0x0000); + state->m_sprite_bitmap_1->fill(0x0000, *cliprect); state->m_spritegen->skns_draw_sprites(screen.machine(), state->m_sprite_bitmap_1, cliprect, state->m_spriteram32, screen.machine().generic.spriteram_size, screen.machine().region("gfx1")->base(), screen.machine().region ("gfx1")->bytes(), state->m_spc_regs ); // ignoring priority bits for now.. for (y=0;y<240;y++) { - src1 = BITMAP_ADDR16(state->m_sprite_bitmap_1, y, 0); - dst = BITMAP_ADDR32(bitmap, y, 0); + src1 = &state->m_sprite_bitmap_1->pix16(y); + dst = &bitmap->pix32(y); for (x=0;x<320;x++) { diff --git a/src/mame/drivers/gamecstl.c b/src/mame/drivers/gamecstl.c index a284efb4438..bae30bf52a5 100644 --- a/src/mame/drivers/gamecstl.c +++ b/src/mame/drivers/gamecstl.c @@ -123,7 +123,7 @@ static void draw_char(bitmap_t *bitmap, const rectangle *cliprect, const gfx_ele for (j=y; j < y+8; j++) { - UINT16 *p = BITMAP_ADDR16(bitmap, j, 0); + UINT16 *p = &bitmap->pix16(j); for (i=x; i < x+8; i++) { @@ -144,7 +144,7 @@ static SCREEN_UPDATE(gamecstl) UINT32 *cga = state->m_cga_ram; int index = 0; - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); for (j=0; j < 25; j++) { diff --git a/src/mame/drivers/gei.c b/src/mame/drivers/gei.c index 2616ded57a1..081058bce2a 100644 --- a/src/mame/drivers/gei.c +++ b/src/mame/drivers/gei.c @@ -116,7 +116,7 @@ static WRITE8_HANDLER( gei_bitmap_w ) for (i = 0; i < 8; i++) - *BITMAP_ADDR16(space->machine().generic.tmpbitmap, sy, sx+i) = state->m_color[8-i-1]; + space->machine().generic.tmpbitmap->pix16(sy, sx+i) = state->m_color[8-i-1]; } static PALETTE_INIT(gei) diff --git a/src/mame/drivers/goldngam.c b/src/mame/drivers/goldngam.c index 15dff6b4906..2c9f238f9c1 100644 --- a/src/mame/drivers/goldngam.c +++ b/src/mame/drivers/goldngam.c @@ -269,7 +269,7 @@ static SCREEN_UPDATE( goldngam ) { for(x = 0; x < 384; ++x) { - *BITMAP_ADDR16(bitmap, y, x) = tmp[index ^ 1]; /* swapped bytes in 16 bit word */ + bitmap->pix16(y, x) = tmp[index ^ 1]; /* swapped bytes in 16 bit word */ ++index; } } diff --git a/src/mame/drivers/gpworld.c b/src/mame/drivers/gpworld.c index 2ab9e7ffcbe..51caf2e7ac1 100644 --- a/src/mame/drivers/gpworld.c +++ b/src/mame/drivers/gpworld.c @@ -92,8 +92,8 @@ INLINE void draw_pixel(bitmap_t *bitmap,const rectangle *cliprect,int x,int y,in { if (flip) { - x = bitmap->width - x - 1; - y = bitmap->height - y - 1; + x = bitmap->width() - x - 1; + y = bitmap->height() - y - 1; } if (x < cliprect->min_x || @@ -102,7 +102,7 @@ INLINE void draw_pixel(bitmap_t *bitmap,const rectangle *cliprect,int x,int y,in y > cliprect->max_y) return; - *BITMAP_ADDR32(bitmap, y, x) = color; + bitmap->pix32(y, x) = color; } static void gpworld_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect) @@ -218,7 +218,7 @@ static void gpworld_draw_sprites(running_machine &machine, bitmap_t *bitmap, con static SCREEN_UPDATE( gpworld ) { - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); gpworld_draw_tiles(screen.machine(), bitmap, cliprect); gpworld_draw_sprites(screen.machine(), bitmap, cliprect); diff --git a/src/mame/drivers/guab.c b/src/mame/drivers/guab.c index a7014883226..0dce6f3b9a2 100644 --- a/src/mame/drivers/guab.c +++ b/src/mame/drivers/guab.c @@ -253,14 +253,14 @@ static SCREEN_UPDATE( guab ) /* If blanked, fill with black */ if (state.blanked) { - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); return 0; } for (y = cliprect->min_y; y <= cliprect->max_y; ++y) { UINT8 *src = &state.vram[256 * y]; - UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0); + UINT16 *dest = &bitmap->pix16(y); for (x = cliprect->min_x; x <= cliprect->max_x; x += 2) { diff --git a/src/mame/drivers/gunpey.c b/src/mame/drivers/gunpey.c index fa5357429c4..bfcac3491a0 100644 --- a/src/mame/drivers/gunpey.c +++ b/src/mame/drivers/gunpey.c @@ -90,7 +90,7 @@ static SCREEN_UPDATE( gunpey ) r = (color & 0x7c00) >> 7; if(x<screen.visible_area().max_x && y<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, x) = b | (g<<8) | (r<<16); + bitmap->pix32(y, x) = b | (g<<8) | (r<<16); count++; diff --git a/src/mame/drivers/halleys.c b/src/mame/drivers/halleys.c index 5de75fa5268..deb8d8c5148 100644 --- a/src/mame/drivers/halleys.c +++ b/src/mame/drivers/halleys.c @@ -1268,8 +1268,8 @@ static void copy_scroll_op(bitmap_t *bitmap, UINT16 *source, int sx, int sy) if ((bch = CLIP_H - sy) < 0) bch = 0; esi = source + CLIP_SKIP + (sy << SCREEN_WIDTH_L2); - edi = BITMAP_ADDR16(bitmap, VIS_MINY, VIS_MINX); - edx = bitmap->rowpixels; + edi = &bitmap->pix16(VIS_MINY, VIS_MINX); + edx = bitmap->rowpixels(); // draw top split for (ecx=bch; ecx; ecx--) OPCOPY_COMMON @@ -1325,8 +1325,8 @@ static void copy_scroll_xp(bitmap_t *bitmap, UINT16 *source, int sx, int sy) if ((bch = CLIP_H - sy) < 0) bch = 0; src_base = source + CLIP_SKIP + (sy << SCREEN_WIDTH_L2); - edi = BITMAP_ADDR16(bitmap, VIS_MINY, VIS_MINX); - dst_adv = bitmap->rowpixels - CLIP_W; + edi = &bitmap->pix16(VIS_MINY, VIS_MINX); + dst_adv = bitmap->rowpixels() - CLIP_W; // draw top split for (edx=bch; edx; edx--) YCOPY_COMMON @@ -1349,8 +1349,8 @@ static void copy_fixed_xp(bitmap_t *bitmap, UINT16 *source) UINT16 ax, bx; esi = source + CLIP_SKIP + CLIP_W; - edi = BITMAP_ADDR16(bitmap, VIS_MINY, VIS_MINX + CLIP_W); - dst_pitch = bitmap->rowpixels; + edi = &bitmap->pix16(VIS_MINY, VIS_MINX + CLIP_W); + dst_pitch = bitmap->rowpixels(); ecx = -CLIP_W; edx = CLIP_H; @@ -1384,8 +1384,8 @@ static void copy_fixed_2b(bitmap_t *bitmap, UINT16 *source) UINT16 ax, bx; esi = source + CLIP_SKIP + CLIP_W; - edi = BITMAP_ADDR16(bitmap, VIS_MINY, VIS_MINX + CLIP_W); - dst_pitch = bitmap->rowpixels; + edi = &bitmap->pix16(VIS_MINY, VIS_MINX + CLIP_W); + dst_pitch = bitmap->rowpixels(); ecx = -CLIP_W; edx = CLIP_H; @@ -1434,8 +1434,8 @@ static void filter_bitmap(running_machine &machine, bitmap_t *bitmap, int mask) pal_ptr = state->m_internal_palette; esi = mask | 0xffffff00; - edi = (UINT32*)BITMAP_ADDR16(bitmap, VIS_MINY, VIS_MINX + CLIP_W); - dst_pitch = bitmap->rowpixels >> 1; + edi = (UINT32*)&bitmap->pix16(VIS_MINY, VIS_MINX + CLIP_W); + dst_pitch = bitmap->rowpixels() >> 1; ecx = -(CLIP_W>>1); edx = CLIP_H; @@ -1476,7 +1476,7 @@ static SCREEN_UPDATE( halleys ) copy_scroll_xp(bitmap, state->m_render_layer[4], *state->m_scrollx1, *state->m_scrolly1); } else - bitmap_fill(bitmap, cliprect, state->m_bgcolor); + bitmap->fill(state->m_bgcolor, *cliprect); #ifdef MAME_DEBUG if (input_port_read(screen.machine(), "DEBUG")) copy_scroll_xp(bitmap, state->m_render_layer[3], *state->m_scrollx0, *state->m_scrolly0); // not used??? @@ -1500,7 +1500,7 @@ static SCREEN_UPDATE( benberob ) if (state->m_io_ram[0xa0] & 0x80) copy_scroll_op(bitmap, state->m_render_layer[2], *state->m_scrollx1, *state->m_scrolly1); else - bitmap_fill(bitmap, cliprect, state->m_bgcolor); + bitmap->fill(state->m_bgcolor, *cliprect); copy_fixed_xp (bitmap, state->m_render_layer[1]); copy_fixed_xp (bitmap, state->m_render_layer[0]); diff --git a/src/mame/drivers/highvdeo.c b/src/mame/drivers/highvdeo.c index d41fa564d43..8f34f80ee70 100644 --- a/src/mame/drivers/highvdeo.c +++ b/src/mame/drivers/highvdeo.c @@ -126,12 +126,12 @@ static SCREEN_UPDATE(tourvisn) color = ((state->m_blit_ram[count]) & 0x00ff)>>0; if((x*2)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, (x*2)+0) = screen.machine().pens[color]; + bitmap->pix32(y, (x*2)+0) = screen.machine().pens[color]; color = ((state->m_blit_ram[count]) & 0xff00)>>8; if(((x*2)+1)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, (x*2)+1) = screen.machine().pens[color]; + bitmap->pix32(y, (x*2)+1) = screen.machine().pens[color]; count++; } @@ -163,7 +163,7 @@ static SCREEN_UPDATE(brasil) g = (color & 0x07e0) >> 3; r = (color & 0xf800) >> 8; if(x<screen.visible_area().max_x && y<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, x) = b | (g<<8) | (r<<16); + bitmap->pix32(y, x) = b | (g<<8) | (r<<16); count++; } diff --git a/src/mame/drivers/hitme.c b/src/mame/drivers/hitme.c index c256825e2a7..32d249a2ec6 100644 --- a/src/mame/drivers/hitme.c +++ b/src/mame/drivers/hitme.c @@ -89,7 +89,7 @@ static SCREEN_UPDATE( hitme ) /* now loop over and invert anything */ for (y = 0; y < 19; y++) { - int dy = bitmap->rowpixels; + int dy = bitmap->rowpixels(); for (inv = x = 0; x < 40; x++, offs++) { /* if the high bit is set, reset the oneshot */ @@ -99,7 +99,7 @@ static SCREEN_UPDATE( hitme ) /* invert pixels until we run out */ for (xx = 0; xx < 8 && inv; xx++, inv--) { - UINT16 *dest = BITMAP_ADDR16(bitmap, y * 10, x * 8 + xx); + UINT16 *dest = &bitmap->pix16(y * 10, x * 8 + xx); dest[0 * dy] ^= 1; dest[1 * dy] ^= 1; dest[2 * dy] ^= 1; diff --git a/src/mame/drivers/hitpoker.c b/src/mame/drivers/hitpoker.c index b9aad0ef900..1c481a46461 100644 --- a/src/mame/drivers/hitpoker.c +++ b/src/mame/drivers/hitpoker.c @@ -81,7 +81,7 @@ static SCREEN_UPDATE(hitpoker) int count = 0; int y,x; - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); for (y=0;y<31;y++) { diff --git a/src/mame/drivers/hotblock.c b/src/mame/drivers/hotblock.c index 63036cc2e32..238d1fea96a 100644 --- a/src/mame/drivers/hotblock.c +++ b/src/mame/drivers/hotblock.c @@ -145,7 +145,7 @@ static SCREEN_UPDATE(hotblock) int i; static const int xxx = 320, yyy = 204; - bitmap_fill(bitmap, 0, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine())); for (i = 0; i < 256; i++) { @@ -159,7 +159,7 @@ static SCREEN_UPDATE(hotblock) for(x = 0; x < xxx; x++) { if (state->m_port0 & 0x40) - *BITMAP_ADDR16(bitmap, y, x) = state->m_vram[count]; + bitmap->pix16(y, x) = state->m_vram[count]; count++; } } diff --git a/src/mame/drivers/hotstuff.c b/src/mame/drivers/hotstuff.c index 7f794401671..8a1dd5b96e7 100644 --- a/src/mame/drivers/hotstuff.c +++ b/src/mame/drivers/hotstuff.c @@ -46,13 +46,13 @@ SCREEN_UPDATE( hotstuff ) for(x = 0; x < xxx; x++) { { - *BITMAP_ADDR32(bitmap, y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0xf000)>>12]; + bitmap->pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0xf000)>>12]; x++; - *BITMAP_ADDR32(bitmap, y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0x0f00)>>8]; + bitmap->pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0x0f00)>>8]; x++; - *BITMAP_ADDR32(bitmap, y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0x00f0)>>4]; + bitmap->pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0x00f0)>>4]; x++; - *BITMAP_ADDR32(bitmap, y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0x000f)>>0]; + bitmap->pix32(y, x) = row_palette_data_as_rgb32_pen_data[(state->m_bitmapram[count] &0x000f)>>0]; } count++; diff --git a/src/mame/drivers/hvyunit.c b/src/mame/drivers/hvyunit.c index dd7dcecc3f6..e1dac3cf13c 100644 --- a/src/mame/drivers/hvyunit.c +++ b/src/mame/drivers/hvyunit.c @@ -162,7 +162,7 @@ static SCREEN_UPDATE( hvyunit ) tilemap_set_scrollx(state->m_bg_tilemap, 0, ((state->m_port0_data & 0x40) << 2) + state->m_scrollx + SX_POS); // TODO tilemap_set_scrolly(state->m_bg_tilemap, 0, ((state->m_port0_data & 0x80) << 1) + state->m_scrolly + SY_POS); // TODO - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0); pandora_update(state->m_pandora, bitmap, cliprect); diff --git a/src/mame/drivers/igs009.c b/src/mame/drivers/igs009.c index 0c1a02a0ddd..ab6527f203a 100644 --- a/src/mame/drivers/igs009.c +++ b/src/mame/drivers/igs009.c @@ -303,7 +303,7 @@ static SCREEN_UPDATE(jingbell) clip.min_y = startclipmin; clip.max_y = startclipmin+2; - bitmap_fill(bitmap,&clip,screen.machine().pens[rowenable]); + bitmap->fill(screen.machine().pens[rowenable], clip); if (rowenable==0) { // 0 and 1 are the same? or is there a global switchoff? @@ -327,7 +327,7 @@ static SCREEN_UPDATE(jingbell) } } - else bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + else bitmap->fill(get_black_pen(screen.machine()), *cliprect); if (layers_ctrl & 2) tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0); diff --git a/src/mame/drivers/igs011.c b/src/mame/drivers/igs011.c index 1230822f165..0a166234c35 100644 --- a/src/mame/drivers/igs011.c +++ b/src/mame/drivers/igs011.c @@ -207,10 +207,10 @@ static SCREEN_UPDATE( igs011 ) #ifdef MAME_DEBUG if ((layer_enable != -1) && (pri_addr == 0xff)) - *BITMAP_ADDR16(bitmap, y, x) = get_black_pen(screen.machine()); + bitmap->pix16(y, x) = get_black_pen(screen.machine()); else #endif - *BITMAP_ADDR16(bitmap, y, x) = state->m_layer[l][scr_addr] | (l << 8); + bitmap->pix16(y, x) = state->m_layer[l][scr_addr] | (l << 8); } } return 0; diff --git a/src/mame/drivers/igs017.c b/src/mame/drivers/igs017.c index 00fc26e3a18..4919d320e09 100644 --- a/src/mame/drivers/igs017.c +++ b/src/mame/drivers/igs017.c @@ -330,7 +330,7 @@ static int debug_viewer(running_machine &machine, bitmap_t *bitmap,const rectang if (w <= 0) w = 0; if (w > 1024) w = 1024; - bitmap_fill(bitmap,cliprect,0); + bitmap->fill(0, *cliprect); draw_sprite(machine, bitmap, cliprect, 0,0, w,h, 0,0, 0, a); @@ -363,7 +363,7 @@ static SCREEN_UPDATE( igs017 ) if (debug_viewer(screen.machine(), bitmap,cliprect)) return 0; - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); if (state->m_video_disable) return 0; diff --git a/src/mame/drivers/igs_m027.c b/src/mame/drivers/igs_m027.c index fa04ac7ebdf..707806c8d1f 100644 --- a/src/mame/drivers/igs_m027.c +++ b/src/mame/drivers/igs_m027.c @@ -167,7 +167,7 @@ static SCREEN_UPDATE(igs_majhong) { igs_m027_state *state = screen.machine().driver_data<igs_m027_state>(); //?????????? - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); //?????? tilemap_draw(bitmap,cliprect,state->m_igs_bg_tilemap,0,0); diff --git a/src/mame/drivers/igspoker.c b/src/mame/drivers/igspoker.c index 6d88a107270..164dcb1be12 100644 --- a/src/mame/drivers/igspoker.c +++ b/src/mame/drivers/igspoker.c @@ -180,7 +180,7 @@ static VIDEO_START(igs_video) static SCREEN_UPDATE(igs_video) { igspoker_state *state = screen.machine().driver_data<igspoker_state>(); - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); // FIX: CSK227IT must have some way to disable background, or wrong gfx? if (state->m_bg_enable) tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0); diff --git a/src/mame/drivers/imolagp.c b/src/mame/drivers/imolagp.c index 3ae80e99c48..c3c2d667364 100644 --- a/src/mame/drivers/imolagp.c +++ b/src/mame/drivers/imolagp.c @@ -213,7 +213,7 @@ static SCREEN_UPDATE( imolagp ) int pen; int y = (i / 0x40); int x = (i & 0x3f) * 4 - scroll2; - UINT16 *dest = BITMAP_ADDR16(bitmap, y & 0xff, 0); + UINT16 *dest = &bitmap->pix16(y & 0xff); int data = source[i]; if (data || pass == 0) { diff --git a/src/mame/drivers/intrscti.c b/src/mame/drivers/intrscti.c index 033e97de1dc..91dd9d80c6e 100644 --- a/src/mame/drivers/intrscti.c +++ b/src/mame/drivers/intrscti.c @@ -72,7 +72,7 @@ static SCREEN_UPDATE(intrscti) int y,x; int count; - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); count = 0; for (y=0;y<64;y++) diff --git a/src/mame/drivers/istellar.c b/src/mame/drivers/istellar.c index a359f8fba82..ba3fa71cc57 100644 --- a/src/mame/drivers/istellar.c +++ b/src/mame/drivers/istellar.c @@ -52,7 +52,7 @@ static SCREEN_UPDATE( istellar ) int charx, chary; /* clear */ - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); /* DEBUG */ /* diff --git a/src/mame/drivers/itech8.c b/src/mame/drivers/itech8.c index 0092860eeda..19777af7f0c 100644 --- a/src/mame/drivers/itech8.c +++ b/src/mame/drivers/itech8.c @@ -662,10 +662,10 @@ static MACHINE_RESET( itech8 ) } /* set the visible area */ - if (state->m_visarea) + if (state->m_visarea.width() > 1) { - machine.primary_screen->set_visible_area(state->m_visarea->min_x, state->m_visarea->max_x, state->m_visarea->min_y, state->m_visarea->max_y); - state->m_visarea = NULL; + machine.primary_screen->set_visible_area(state->m_visarea.min_x, state->m_visarea.max_x, state->m_visarea.min_y, state->m_visarea.max_y); + state->m_visarea.set(0, 0, 0, 0); } } @@ -2659,32 +2659,28 @@ static DRIVER_INIT( sstrike ) static DRIVER_INIT( hstennis ) { itech8_state *state = machine.driver_data<itech8_state>(); - static const rectangle visible = { 0, 375, 0, 239 }; - state->m_visarea = &visible; + state->m_visarea.set(0, 375, 0, 239); } static DRIVER_INIT( arligntn ) { itech8_state *state = machine.driver_data<itech8_state>(); - static const rectangle visible = { 16, 389, 0, 239 }; - state->m_visarea = &visible; + state->m_visarea.set(16, 389, 0, 239); } static DRIVER_INIT( peggle ) { itech8_state *state = machine.driver_data<itech8_state>(); - static const rectangle visible = { 18, 367, 0, 239 }; - state->m_visarea = &visible; + state->m_visarea.set(18, 367, 0, 239); } static DRIVER_INIT( neckneck ) { itech8_state *state = machine.driver_data<itech8_state>(); - static const rectangle visible = { 8, 375, 0, 239 }; - state->m_visarea = &visible; + state->m_visarea.set(8, 375, 0, 239); } diff --git a/src/mame/drivers/itgambl2.c b/src/mame/drivers/itgambl2.c index 5b877ab2fc8..0ee01ed7e12 100644 --- a/src/mame/drivers/itgambl2.c +++ b/src/mame/drivers/itgambl2.c @@ -114,7 +114,7 @@ static SCREEN_UPDATE( itgambl2 ) popmessage("%d %d %04x",state->m_test_x,state->m_test_y,state->m_start_offs); - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); count = (state->m_start_offs); @@ -127,7 +127,7 @@ static SCREEN_UPDATE( itgambl2 ) color = (blit_ram[count] & 0xff)>>0; if((x)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, x) = screen.machine().pens[color]; + bitmap->pix32(y, x) = screen.machine().pens[color]; count++; } diff --git a/src/mame/drivers/itgambl3.c b/src/mame/drivers/itgambl3.c index 762932c95bb..42b9a9f86ac 100644 --- a/src/mame/drivers/itgambl3.c +++ b/src/mame/drivers/itgambl3.c @@ -102,7 +102,7 @@ static SCREEN_UPDATE( itgambl3 ) popmessage("%d %d %04x",state->m_test_x,state->m_test_y,state->m_start_offs); - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); count = (state->m_start_offs); @@ -115,7 +115,7 @@ static SCREEN_UPDATE( itgambl3 ) color = (blit_ram[count] & 0xff)>>0; if((x)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, x) = screen.machine().pens[color]; + bitmap->pix32(y, x) = screen.machine().pens[color]; count++; } diff --git a/src/mame/drivers/jackie.c b/src/mame/drivers/jackie.c index dda46390660..6c26878979e 100644 --- a/src/mame/drivers/jackie.c +++ b/src/mame/drivers/jackie.c @@ -181,7 +181,7 @@ static SCREEN_UPDATE(jackie) int startclipmin = 0; const rectangle &visarea = screen.visible_area(); - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); for (i=0;i < 0x40;i++) { diff --git a/src/mame/drivers/jalmah.c b/src/mame/drivers/jalmah.c index 406c8784762..bb58938f6e0 100644 --- a/src/mame/drivers/jalmah.c +++ b/src/mame/drivers/jalmah.c @@ -443,7 +443,7 @@ static SCREEN_UPDATE( jalmah ) tilemap_set_scrolly(state->m_sc3_tilemap_2, 0, jm_scrollram[7] & 0x1ff); tilemap_set_scrolly(state->m_sc3_tilemap_3, 0, jm_scrollram[7] & 0x3ff); - bitmap_fill(bitmap, cliprect, screen.machine().pens[0xff]); //selectable by a ram address? + bitmap->fill(screen.machine().pens[0xff], *cliprect); //selectable by a ram address? for(cur_prin=1;cur_prin<=0x8;cur_prin<<=1) { @@ -466,7 +466,7 @@ static SCREEN_UPDATE( urashima ) tilemap_set_scrolly(state->m_sc0_tilemap_0, 0, jm_scrollram[4]); tilemap_set_scrolly(state->m_sc3_tilemap_0, 0, jm_scrollram[7]); - bitmap_fill(bitmap, cliprect, screen.machine().pens[0x1ff]);//selectable by a ram address? + bitmap->fill(screen.machine().pens[0x1ff], *cliprect);//selectable by a ram address? if(state->m_jm_vregs[0] & 1) { tilemap_draw(bitmap,cliprect,state->m_sc0_tilemap_0,0,0); } if(state->m_jm_vregs[3] & 1) { tilemap_draw(bitmap,cliprect,state->m_sc3_tilemap_0,0,0); } return 0; diff --git a/src/mame/drivers/jangou.c b/src/mame/drivers/jangou.c index 7c6873baf09..9b4dde2a957 100644 --- a/src/mame/drivers/jangou.c +++ b/src/mame/drivers/jangou.c @@ -128,7 +128,7 @@ static SCREEN_UPDATE( jangou ) for (y = cliprect->min_y; y <= cliprect->max_y; ++y) { UINT8 *src = &state->m_blit_buffer[y * 512 / 2 + cliprect->min_x]; - UINT16 *dst = BITMAP_ADDR16(bitmap, y, cliprect->min_x); + UINT16 *dst = &bitmap->pix16(y, cliprect->min_x); for (x = cliprect->min_x; x <= cliprect->max_x; x += 2) { diff --git a/src/mame/drivers/jantotsu.c b/src/mame/drivers/jantotsu.c index a3b8046387c..6e7d0b86a22 100644 --- a/src/mame/drivers/jantotsu.c +++ b/src/mame/drivers/jantotsu.c @@ -159,7 +159,7 @@ static SCREEN_UPDATE(jantotsu) color |= (((state->m_bitmap[count + pen_i*0x2000]) >> (7 - i)) & 1) << pen_i; if ((x + i) <= screen.visible_area().max_x && (y + 0) < screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, x + i) = screen.machine().pens[color]; + bitmap->pix32(y, x + i) = screen.machine().pens[color]; } count++; diff --git a/src/mame/drivers/jchan.c b/src/mame/drivers/jchan.c index d057c7ac338..8d5c420e4c9 100644 --- a/src/mame/drivers/jchan.c +++ b/src/mame/drivers/jchan.c @@ -368,12 +368,12 @@ static SCREEN_UPDATE(jchan) UINT16 pixdata1; UINT16 pixdata2; - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); SCREEN_UPDATE_CALL(jchan_view2); - bitmap_fill(state->m_sprite_bitmap_1, cliprect, 0x0000); - bitmap_fill(state->m_sprite_bitmap_2, cliprect, 0x0000); + state->m_sprite_bitmap_1->fill(0x0000, *cliprect); + state->m_sprite_bitmap_2->fill(0x0000, *cliprect); state->m_spritegen1->skns_draw_sprites(screen.machine(), state->m_sprite_bitmap_1, cliprect, state->m_sprite_ram32_1, 0x4000, screen.machine().region("gfx1")->base(), screen.machine().region ("gfx1")->bytes(), state->m_sprite_regs32_1 ); state->m_spritegen2->skns_draw_sprites(screen.machine(), state->m_sprite_bitmap_2, cliprect, state->m_sprite_ram32_2, 0x4000, screen.machine().region("gfx2")->base(), screen.machine().region ("gfx2")->bytes(), state->m_sprite_regs32_2 ); @@ -381,9 +381,9 @@ static SCREEN_UPDATE(jchan) // ignoring priority bits for now - might use alpha too, check 0x8000 of palette writes for (y=0;y<240;y++) { - src1 = BITMAP_ADDR16(state->m_sprite_bitmap_1, y, 0); - src2 = BITMAP_ADDR16(state->m_sprite_bitmap_2, y, 0); - dst = BITMAP_ADDR16(bitmap, y, 0); + src1 = &state->m_sprite_bitmap_1->pix16(y); + src2 = &state->m_sprite_bitmap_2->pix16(y); + dst = &bitmap->pix16(y); for (x=0;x<320;x++) { diff --git a/src/mame/drivers/jollyjgr.c b/src/mame/drivers/jollyjgr.c index 0d8f17af47d..c776a54288b 100644 --- a/src/mame/drivers/jollyjgr.c +++ b/src/mame/drivers/jollyjgr.c @@ -467,13 +467,13 @@ static void draw_bitmap( running_machine &machine, bitmap_t *bitmap ) if(color) { if(state->m_flip_x && state->m_flip_y) - *BITMAP_ADDR16(bitmap, y, x * 8 + i) = color + 32; + bitmap->pix16(y, x * 8 + i) = color + 32; else if(state->m_flip_x && !state->m_flip_y) - *BITMAP_ADDR16(bitmap, 255 - y, x * 8 + i) = color + 32; + bitmap->pix16(255 - y, x * 8 + i) = color + 32; else if(!state->m_flip_x && state->m_flip_y) - *BITMAP_ADDR16(bitmap, y, 255 - x * 8 - i) = color + 32; + bitmap->pix16(y, 255 - x * 8 - i) = color + 32; else - *BITMAP_ADDR16(bitmap, 255 - y, 255 - x * 8 - i) = color + 32; + bitmap->pix16(255 - y, 255 - x * 8 - i) = color + 32; } } @@ -488,7 +488,7 @@ static SCREEN_UPDATE( jollyjgr ) UINT8 *spriteram = state->m_spriteram; int offs; - bitmap_fill(bitmap, cliprect, 32); + bitmap->fill(32, *cliprect); if(state->m_pri) //used in Frog & Spiders level 3 { @@ -562,7 +562,7 @@ static SCREEN_UPDATE( fspider ) if (sy>=cliprect->min_y && sy<=cliprect->max_y) for (int x=sx-4;x<sx;x++) if (x>=cliprect->min_x && x<=cliprect->max_x) - *BITMAP_ADDR16(bitmap,sy,x)=bc; + bitmap->pix16(sy, x)=bc; } return 0; diff --git a/src/mame/drivers/jongkyo.c b/src/mame/drivers/jongkyo.c index b2c42584cc5..e53ba8c050b 100644 --- a/src/mame/drivers/jongkyo.c +++ b/src/mame/drivers/jongkyo.c @@ -89,7 +89,7 @@ static SCREEN_UPDATE( jongkyo ) for (b = 0; b < 4; ++b) { - *BITMAP_ADDR16(bitmap, 255 - y, 255 - (x + b)) = ((data2 & 0x01)) + ((data2 & 0x10) >> 3) + + bitmap->pix16(255 - y, 255 - (x + b)) = ((data2 & 0x01)) + ((data2 & 0x10) >> 3) + ((data1 & 0x01) << 2) + ((data1 & 0x10) >> 1) + ((data3 & 0x01) << 4) + ((data3 & 0x10) << 1); data1 >>= 1; diff --git a/src/mame/drivers/jpmsys5.c b/src/mame/drivers/jpmsys5.c index 7f0e0aa9afa..9ef0bf547c0 100644 --- a/src/mame/drivers/jpmsys5.c +++ b/src/mame/drivers/jpmsys5.c @@ -199,14 +199,14 @@ static SCREEN_UPDATE( jpmsys5v ) if (state.blanked) { - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); return 0; } for (y = cliprect->min_y; y <= cliprect->max_y; ++y) { UINT8 *src = &state.vram[(state.dispstart & 0xffff)*2 + 256 * y]; - UINT32 *dest = BITMAP_ADDR32(bitmap, y, cliprect->min_x); + UINT32 *dest = &bitmap->pix32(y, cliprect->min_x); for (x = cliprect->min_x; x <= cliprect->max_x; x +=2) { diff --git a/src/mame/drivers/kinst.c b/src/mame/drivers/kinst.c index b0295f5c12e..294e7240588 100644 --- a/src/mame/drivers/kinst.c +++ b/src/mame/drivers/kinst.c @@ -239,7 +239,7 @@ static SCREEN_UPDATE( kinst ) for (y = cliprect->min_y; y <= cliprect->max_y; y++) { UINT32 *src = &state->m_video_base[640/4 * y]; - UINT16 *dest = BITMAP_ADDR16(bitmap, y, cliprect->min_x); + UINT16 *dest = &bitmap->pix16(y, cliprect->min_x); int x; /* loop over columns */ diff --git a/src/mame/drivers/konamim2.c b/src/mame/drivers/konamim2.c index 539f54d64a9..fd4ae6cf1cf 100644 --- a/src/mame/drivers/konamim2.c +++ b/src/mame/drivers/konamim2.c @@ -250,7 +250,7 @@ static SCREEN_UPDATE( m2 ) for (j=0; j < 384; j++) { UINT16 *fb = &frame[(j*512)]; - UINT16 *d = BITMAP_ADDR16(bitmap, j, 0); + UINT16 *d = &bitmap->pix16(j); for (i=0; i < 512; i++) { d[i^3] = *fb++ & 0x7fff; @@ -259,7 +259,7 @@ static SCREEN_UPDATE( m2 ) } else { - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); } return 0; } diff --git a/src/mame/drivers/kongambl.c b/src/mame/drivers/kongambl.c index fe58c364f7e..5612f89f07a 100644 --- a/src/mame/drivers/kongambl.c +++ b/src/mame/drivers/kongambl.c @@ -43,8 +43,8 @@ static SCREEN_UPDATE(kongambl) { device_t *k056832 = screen.machine().device("k056832"); - bitmap_fill(bitmap, cliprect, 0); - bitmap_fill(screen.machine().priority_bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); + screen.machine().priority_bitmap->fill(0, *cliprect); // k056832_tilemap_draw(k056832, bitmap, cliprect, 3, 0, 0); // k056832_tilemap_draw(k056832, bitmap, cliprect, 2, 0, 0); diff --git a/src/mame/drivers/kungfur.c b/src/mame/drivers/kungfur.c index 18449598bd6..311da97aba2 100644 --- a/src/mame/drivers/kungfur.c +++ b/src/mame/drivers/kungfur.c @@ -83,38 +83,38 @@ g & 40 static void draw_led(bitmap_t *bitmap, int x, int y,UINT8 value) { - plot_box(bitmap, x, y, 6, 10, 0x00000000); + bitmap->plot_box(x, y, 6, 10, 0x00000000); /*a*/ - *BITMAP_ADDR16(bitmap, y+0, x+1) = ((value & 0x01) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+0, x+2) = ((value & 0x01) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+0, x+3) = ((value & 0x01) ? LED_ON : LED_OFF); + bitmap->pix16(y+0, x+1) = ((value & 0x01) ? LED_ON : LED_OFF); + bitmap->pix16(y+0, x+2) = ((value & 0x01) ? LED_ON : LED_OFF); + bitmap->pix16(y+0, x+3) = ((value & 0x01) ? LED_ON : LED_OFF); /*b*/ - *BITMAP_ADDR16(bitmap, y+1, x+4) = ((value & 0x02) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+2, x+4) = ((value & 0x02) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+3, x+4) = ((value & 0x02) ? LED_ON : LED_OFF); + bitmap->pix16(y+1, x+4) = ((value & 0x02) ? LED_ON : LED_OFF); + bitmap->pix16(y+2, x+4) = ((value & 0x02) ? LED_ON : LED_OFF); + bitmap->pix16(y+3, x+4) = ((value & 0x02) ? LED_ON : LED_OFF); /*c*/ - *BITMAP_ADDR16(bitmap, y+5, x+4) = ((value & 0x04) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+6, x+4) = ((value & 0x04) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+7, x+4) = ((value & 0x04) ? LED_ON : LED_OFF); + bitmap->pix16(y+5, x+4) = ((value & 0x04) ? LED_ON : LED_OFF); + bitmap->pix16(y+6, x+4) = ((value & 0x04) ? LED_ON : LED_OFF); + bitmap->pix16(y+7, x+4) = ((value & 0x04) ? LED_ON : LED_OFF); /*d*/ - *BITMAP_ADDR16(bitmap, y+8, x+1) = ((value & 0x08) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+8, x+2) = ((value & 0x08) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+8, x+3) = ((value & 0x08) ? LED_ON : LED_OFF); + bitmap->pix16(y+8, x+1) = ((value & 0x08) ? LED_ON : LED_OFF); + bitmap->pix16(y+8, x+2) = ((value & 0x08) ? LED_ON : LED_OFF); + bitmap->pix16(y+8, x+3) = ((value & 0x08) ? LED_ON : LED_OFF); /*e*/ - *BITMAP_ADDR16(bitmap, y+5, x+0) = ((value & 0x10) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+6, x+0) = ((value & 0x10) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+7, x+0) = ((value & 0x10) ? LED_ON : LED_OFF); + bitmap->pix16(y+5, x+0) = ((value & 0x10) ? LED_ON : LED_OFF); + bitmap->pix16(y+6, x+0) = ((value & 0x10) ? LED_ON : LED_OFF); + bitmap->pix16(y+7, x+0) = ((value & 0x10) ? LED_ON : LED_OFF); /*f*/ - *BITMAP_ADDR16(bitmap, y+1, x+0) = ((value & 0x20) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+2, x+0) = ((value & 0x20) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+3, x+0) = ((value & 0x20) ? LED_ON : LED_OFF); + bitmap->pix16(y+1, x+0) = ((value & 0x20) ? LED_ON : LED_OFF); + bitmap->pix16(y+2, x+0) = ((value & 0x20) ? LED_ON : LED_OFF); + bitmap->pix16(y+3, x+0) = ((value & 0x20) ? LED_ON : LED_OFF); /*g*/ - *BITMAP_ADDR16(bitmap, y+4, x+1) = ((value & 0x40) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+4, x+2) = ((value & 0x40) ? LED_ON : LED_OFF); - *BITMAP_ADDR16(bitmap, y+4, x+3) = ((value & 0x40) ? LED_ON : LED_OFF); + bitmap->pix16(y+4, x+1) = ((value & 0x40) ? LED_ON : LED_OFF); + bitmap->pix16(y+4, x+2) = ((value & 0x40) ? LED_ON : LED_OFF); + bitmap->pix16(y+4, x+3) = ((value & 0x40) ? LED_ON : LED_OFF); /*"point" (just for debugging)*/ - *BITMAP_ADDR16(bitmap, y+9, x+4) = ((value & 0x80) ? LED_ON : LED_OFF); + bitmap->pix16(y+9, x+4) = ((value & 0x80) ? LED_ON : LED_OFF); } /* actually debugging purpose, it will be converted to the artwork system at some point. */ diff --git a/src/mame/drivers/laserbas.c b/src/mame/drivers/laserbas.c index 9b58271dce4..2d330c35c38 100644 --- a/src/mame/drivers/laserbas.c +++ b/src/mame/drivers/laserbas.c @@ -69,14 +69,14 @@ static SCREEN_UPDATE(laserbas) for(x = 0; x < 128; x++) { if (state->m_vram2[y * 128 + x] & 0xf) - *BITMAP_ADDR16(bitmap, y, x * 2) = (state->m_vram2[y * 128 + x] & 0xf); + bitmap->pix16(y, x * 2) = (state->m_vram2[y * 128 + x] & 0xf); else - *BITMAP_ADDR16(bitmap, y, x * 2) = (state->m_vram1[y * 128 + x] & 0xf) + 16; + bitmap->pix16(y, x * 2) = (state->m_vram1[y * 128 + x] & 0xf) + 16; if (state->m_vram2[y * 128 + x] >> 4) - *BITMAP_ADDR16(bitmap, y, x * 2 + 1) = (state->m_vram2[y * 128 + x] >> 4); + bitmap->pix16(y, x * 2 + 1) = (state->m_vram2[y * 128 + x] >> 4); else - *BITMAP_ADDR16(bitmap, y, x * 2 + 1) = (state->m_vram1[y * 128 + x] >> 4) + 16; + bitmap->pix16(y, x * 2 + 1) = (state->m_vram1[y * 128 + x] >> 4) + 16; } return 0; } diff --git a/src/mame/drivers/laserbat.c b/src/mame/drivers/laserbat.c index 9e9ca48408a..bc409459b76 100644 --- a/src/mame/drivers/laserbat.c +++ b/src/mame/drivers/laserbat.c @@ -525,18 +525,18 @@ static SCREEN_UPDATE( laserbat ) for (x = cliprect->min_x; x <= cliprect->max_x; x++) { - int pixel1 = *BITMAP_ADDR16(s2636_1_bitmap, y, x); - int pixel2 = *BITMAP_ADDR16(s2636_2_bitmap, y, x); - int pixel3 = *BITMAP_ADDR16(s2636_3_bitmap, y, x); + int pixel1 = s2636_1_bitmap->pix16(y, x); + int pixel2 = s2636_2_bitmap->pix16(y, x); + int pixel3 = s2636_3_bitmap->pix16(y, x); if (S2636_IS_PIXEL_DRAWN(pixel1)) - *BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel1); + bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel1); if (S2636_IS_PIXEL_DRAWN(pixel2)) - *BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel2); + bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel2); if (S2636_IS_PIXEL_DRAWN(pixel3)) - *BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel3); + bitmap->pix16(y, x) = S2636_PIXEL_COLOR(pixel3); } } diff --git a/src/mame/drivers/lastfght.c b/src/mame/drivers/lastfght.c index b4be67c2d87..49987e4a526 100644 --- a/src/mame/drivers/lastfght.c +++ b/src/mame/drivers/lastfght.c @@ -142,13 +142,13 @@ static SCREEN_UPDATE( lastfght ) count = state->m_base; - bitmap_fill(bitmap, cliprect , get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect ); for (y = 0 ; y < 256; y++) { for (x = 0; x < 512; x++) { data = (((count & 0xf) == 0) && ((count & 0x1e00) == 0)) ? get_white_pen(screen.machine()) : gfxdata[count]; // white grid or data - *BITMAP_ADDR16(bitmap, y, x) = data; + bitmap->pix16(y, x) = data; count++; } } @@ -345,7 +345,7 @@ static WRITE16_HANDLER( lastfght_blit_w ) data = gfxdata[addr]; if (data && (state->m_x + x >= 0) && (state->m_x + x < 512) && (state->m_y + y >= 0) && (state->m_y + y < 256)) - *BITMAP_ADDR16(dest, state->m_y + y, state->m_x + x) = data; + dest->pix16(state->m_y + y, state->m_x + x) = data; } } } diff --git a/src/mame/drivers/lgp.c b/src/mame/drivers/lgp.c index 55d41586c47..dbe3a91ced9 100644 --- a/src/mame/drivers/lgp.c +++ b/src/mame/drivers/lgp.c @@ -97,7 +97,7 @@ static SCREEN_UPDATE( lgp ) palette_set_color(screen.machine(), 0, MAKE_ARGB(0,0,0,0)); /* clear */ - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); /* Draw tiles */ for (charx = 0; charx < 32; charx++) diff --git a/src/mame/drivers/limenko.c b/src/mame/drivers/limenko.c index 0f5cfcf4845..2ea0de427aa 100644 --- a/src/mame/drivers/limenko.c +++ b/src/mame/drivers/limenko.c @@ -125,8 +125,8 @@ static WRITE32_HANDLER( spriteram_buffer_w ) clip.min_y = 0; clip.max_y = 239; - bitmap_fill(state->m_sprites_bitmap_pri,&clip,0); - bitmap_fill(state->m_sprites_bitmap,&clip,0); + state->m_sprites_bitmap_pri->fill(0, clip); + state->m_sprites_bitmap->fill(0, clip); // toggle spriterams location in the memory map state->m_spriteram_bit ^= 1; @@ -333,8 +333,8 @@ static void draw_single_sprite(bitmap_t *dest_bmp,const rectangle *clip,const gf for( y=sy; y<ey; y++ ) { const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; - UINT16 *dest = BITMAP_ADDR16(dest_bmp, y, 0); - UINT8 *pri = BITMAP_ADDR8(state->m_sprites_bitmap_pri, y, 0); + UINT16 *dest = &dest_bmp->pix16(y); + UINT8 *pri = &state->m_sprites_bitmap_pri->pix8(y); int x, x_index = x_index_base; for( x=sx; x<ex; x++ ) @@ -424,10 +424,10 @@ static void copy_sprites(running_machine &machine, bitmap_t *bitmap, bitmap_t *s int y; for( y=cliprect->min_y; y<=cliprect->max_y; y++ ) { - UINT16 *source = BITMAP_ADDR16(sprites_bitmap, y, 0); - UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0); - UINT8 *dest_pri = BITMAP_ADDR8(priority_bitmap, y, 0); - UINT8 *source_pri = BITMAP_ADDR8(state->m_sprites_bitmap_pri, y, 0); + UINT16 *source = &sprites_bitmap->pix16(y); + UINT16 *dest = &bitmap->pix16(y); + UINT8 *dest_pri = &priority_bitmap->pix8(y); + UINT8 *source_pri = &state->m_sprites_bitmap_pri->pix8(y); int x; for( x=cliprect->min_x; x<=cliprect->max_x; x++ ) @@ -460,7 +460,7 @@ static SCREEN_UPDATE( limenko ) limenko_state *state = screen.machine().driver_data<limenko_state>(); // state->m_videoreg[4] ???? It always has this value: 0xffeffff8 (2 signed bytes? values: -17 and -8 ?) - bitmap_fill(screen.machine().priority_bitmap,cliprect,0); + screen.machine().priority_bitmap->fill(0, *cliprect); tilemap_set_enable(state->m_bg_tilemap, state->m_videoreg[0] & 4); tilemap_set_enable(state->m_md_tilemap, state->m_videoreg[0] & 2); diff --git a/src/mame/drivers/littlerb.c b/src/mame/drivers/littlerb.c index f2b117e6d6c..5b411705c5b 100644 --- a/src/mame/drivers/littlerb.c +++ b/src/mame/drivers/littlerb.c @@ -426,12 +426,12 @@ static void draw_sprite(running_machine &machine, bitmap_t *bitmap, int xsize,in if ((drawxpos < 320) && (drawypos < 256) && (drawxpos >= 0) && (drawypos >=0)) { - if(pix1&0xf) *BITMAP_ADDR16(bitmap, drawypos, drawxpos) = pix1; + if(pix1&0xf) bitmap->pix16(drawypos, drawxpos) = pix1; } drawxpos++; if ((drawxpos < 320) && (drawypos < 256) && (drawxpos >= 0) && (drawypos >=0)) { - if(pix2&0xf) *BITMAP_ADDR16(bitmap, drawypos, drawxpos) = pix2; + if(pix2&0xf) bitmap->pix16(drawypos, drawxpos) = pix2; } offset++; @@ -449,7 +449,7 @@ static SCREEN_UPDATE(littlerb) int xsize,ysize; int pal; UINT16* spriteregion = &state->m_region4[0x400]; - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); //printf("frame\n"); /* the spriteram format is something like this .. */ for (offs=0x26/2;offs<0xc00;offs+=6) // start at 00x26? diff --git a/src/mame/drivers/luckgrln.c b/src/mame/drivers/luckgrln.c index 1c86afa6f44..68d92237a61 100644 --- a/src/mame/drivers/luckgrln.c +++ b/src/mame/drivers/luckgrln.c @@ -276,7 +276,7 @@ static SCREEN_UPDATE(luckgrln) clip.min_y = visarea.min_y; clip.max_y = visarea.max_y; - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); for (i= 0;i < 64;i++) { diff --git a/src/mame/drivers/m79amb.c b/src/mame/drivers/m79amb.c index 596437d5c86..dda9dc2be28 100644 --- a/src/mame/drivers/m79amb.c +++ b/src/mame/drivers/m79amb.c @@ -96,7 +96,7 @@ static SCREEN_UPDATE( ramtek ) for (i = 0; i < 8; i++) { pen_t pen = (data & 0x80) ? RGB_WHITE : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x) = pen; + bitmap->pix32(y, x) = pen; x++; data <<= 1; diff --git a/src/mame/drivers/magicard.c b/src/mame/drivers/magicard.c index 2ff38f7a47d..154d0ee1118 100644 --- a/src/mame/drivers/magicard.c +++ b/src/mame/drivers/magicard.c @@ -385,7 +385,7 @@ static SCREEN_UPDATE(magicard) int x,y; UINT32 count; - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); //TODO + bitmap->fill(get_black_pen(screen.machine()), *cliprect); //TODO if(!(SCC_DE_VREG)) //display enable return 0; @@ -403,22 +403,22 @@ static SCREEN_UPDATE(magicard) color = ((state->m_magicram[count]) & 0x000f)>>0; if(((x*4)+3)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, (x*4)+3) = screen.machine().pens[color]; + bitmap->pix32(y, (x*4)+3) = screen.machine().pens[color]; color = ((state->m_magicram[count]) & 0x00f0)>>4; if(((x*4)+2)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, (x*4)+2) = screen.machine().pens[color]; + bitmap->pix32(y, (x*4)+2) = screen.machine().pens[color]; color = ((state->m_magicram[count]) & 0x0f00)>>8; if(((x*4)+1)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, (x*4)+1) = screen.machine().pens[color]; + bitmap->pix32(y, (x*4)+1) = screen.machine().pens[color]; color = ((state->m_magicram[count]) & 0xf000)>>12; if(((x*4)+0)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, (x*4)+0) = screen.machine().pens[color]; + bitmap->pix32(y, (x*4)+0) = screen.machine().pens[color]; count++; } @@ -435,12 +435,12 @@ static SCREEN_UPDATE(magicard) color = ((state->m_magicram[count]) & 0x00ff)>>0; if(((x*2)+1)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, (x*2)+1) = screen.machine().pens[color]; + bitmap->pix32(y, (x*2)+1) = screen.machine().pens[color]; color = ((state->m_magicram[count]) & 0xff00)>>8; if(((x*2)+0)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, (x*2)+0) = screen.machine().pens[color]; + bitmap->pix32(y, (x*2)+0) = screen.machine().pens[color]; count++; } diff --git a/src/mame/drivers/majorpkr.c b/src/mame/drivers/majorpkr.c index e6fce89efbf..47cad15c981 100644 --- a/src/mame/drivers/majorpkr.c +++ b/src/mame/drivers/majorpkr.c @@ -525,7 +525,7 @@ static SCREEN_UPDATE(majorpkr) { majorpkr_state *state = screen.machine().driver_data<majorpkr_state>(); - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); rectangle custom_clip; diff --git a/src/mame/drivers/marinedt.c b/src/mame/drivers/marinedt.c index cb532cefd88..596ad50f89a 100644 --- a/src/mame/drivers/marinedt.c +++ b/src/mame/drivers/marinedt.c @@ -511,24 +511,24 @@ static SCREEN_UPDATE( marinedt ) marinedt_state *state = screen.machine().driver_data<marinedt_state>(); int sx, sy; - bitmap_fill(state->m_tile, NULL, 0); + state->m_tile->fill(0); tilemap_draw(state->m_tile, cliprect, state->m_tx_tilemap, 0, 0); - bitmap_fill(state->m_obj1, NULL, 0); + state->m_obj1->fill(0); drawgfx_transpen(state->m_obj1, NULL, screen.machine().gfx[1], OBJ_CODE(state->m_obj1_a), OBJ_COLOR(state->m_obj1_a), OBJ_FLIPX(state->m_obj1_a), OBJ_FLIPY(state->m_obj1_a), 0, 0, 0); - bitmap_fill(state->m_obj2, NULL, 0); + state->m_obj2->fill(0); drawgfx_transpen(state->m_obj2, NULL, screen.machine().gfx[2], OBJ_CODE(state->m_obj2_a), OBJ_COLOR(state->m_obj2_a), OBJ_FLIPX(state->m_obj2_a), OBJ_FLIPY(state->m_obj2_a), 0, 0, 0); - bitmap_fill(bitmap, NULL, 0); + bitmap->fill(0); if (state->m_pd & 0x02) copybitmap_trans(bitmap, state->m_obj2, 0, 0, OBJ_X(state->m_obj2_x), OBJ_Y(state->m_obj2_y), cliprect, 0); @@ -550,10 +550,10 @@ static SCREEN_UPDATE( marinedt ) if (x < cliprect->min_x || x > cliprect->max_x || y < cliprect->min_y || y > cliprect->max_y) continue; - if (*BITMAP_ADDR16(state->m_obj1, sy, sx) == 0) + if (state->m_obj1->pix16(sy, sx) == 0) continue; - if (*BITMAP_ADDR16(state->m_tile, y, x) != 0) + if (state->m_tile->pix16(y, x) != 0) { state->m_coll = 0x08; @@ -586,10 +586,10 @@ static SCREEN_UPDATE( marinedt ) if (xx < 0 || xx >= 32 || yy < 0 || yy >= 32) continue; - if (*BITMAP_ADDR16(state->m_obj1, sy, sx) == 0) + if (state->m_obj1->pix16(sy, sx) == 0) continue; - if (*BITMAP_ADDR16(state->m_obj2, yy, xx) != 0) + if (state->m_obj2->pix16(yy, xx) != 0) { state->m_collh = 0x80; diff --git a/src/mame/drivers/maygayv1.c b/src/mame/drivers/maygayv1.c index 15719bdc601..ac114dfdb42 100644 --- a/src/mame/drivers/maygayv1.c +++ b/src/mame/drivers/maygayv1.c @@ -297,7 +297,7 @@ static SCREEN_UPDATE( maygayv1 ) /* If screen output is disabled, fill with black */ if (!(VREG(VCR0) & VCR0_DEN)) { - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); return 0; } @@ -308,7 +308,7 @@ static SCREEN_UPDATE( maygayv1 ) UINT16 aflags = atable[sl]; UINT16 slmask_old = slmask; - UINT16 *bmp_ptr = BITMAP_ADDR16(bitmap, sl, 0); + UINT16 *bmp_ptr = &bitmap->pix16(sl); slmask = 0xffff ^ (slmask ^ aflags); diff --git a/src/mame/drivers/mazerbla.c b/src/mame/drivers/mazerbla.c index 352de1801ba..7db60f8edd6 100644 --- a/src/mame/drivers/mazerbla.c +++ b/src/mame/drivers/mazerbla.c @@ -185,7 +185,7 @@ SCREEN_UPDATE( test_vcu ) if (state->m_game_id == GREATGUN) color_base = 0x00; - bitmap_fill(bitmap, NULL, 0); + bitmap->fill(0); // logerror("-->frame\n"); if (planes_enabled[3]) @@ -194,17 +194,17 @@ SCREEN_UPDATE( test_vcu ) if (planes_enabled[2]) copybitmap_trans(bitmap, state->m_tmpbitmaps[2], 0, 0, 0, 0,cliprect, color_base); - bitmap_fill(state->m_tmpbitmaps[2], NULL, color_base); + state->m_tmpbitmaps[2]->fill(color_base); if (planes_enabled[1]) copybitmap_trans(bitmap, state->m_tmpbitmaps[1], 0, 0, 0, 0,cliprect, color_base); - bitmap_fill(state->m_tmpbitmaps[1], NULL, color_base); + state->m_tmpbitmaps[1]->fill(color_base); if (planes_enabled[0]) copybitmap_trans(bitmap, state->m_tmpbitmaps[0], 0, 0, 0, 0,cliprect, color_base); - bitmap_fill(state->m_tmpbitmaps[0], NULL, color_base); + state->m_tmpbitmaps[0]->fill(color_base); if (screen.machine().input().code_pressed_once(KEYCODE_1)) /* plane 1 */ planes_enabled[0] ^= 1; @@ -281,7 +281,7 @@ static SCREEN_UPDATE( mazerbla ) // if (state->m_game_id == GREATGUN) // color_base = 0x00; - // bitmap_fill(bitmap, NULL, 0); + // bitmap->fill(0); copybitmap(bitmap, state->m_tmpbitmaps[3], 0, 0, 0, 0, cliprect); copybitmap_trans(bitmap, state->m_tmpbitmaps[2], 0, 0, 0, 0, cliprect, 0); @@ -464,7 +464,7 @@ static READ8_HANDLER( vcu_set_gfx_addr_r ) } if (((state->m_xpos + x) < 256) && ((state->m_ypos + y) < 256) ) - *BITMAP_ADDR16(state->m_tmpbitmaps[state->m_plane], state->m_ypos + y, state->m_xpos + x) = col; + state->m_tmpbitmaps[state->m_plane]->pix16(state->m_ypos + y, state->m_xpos + x) = col; bits += 2; } @@ -493,7 +493,7 @@ static READ8_HANDLER( vcu_set_gfx_addr_r ) /* color = 4 MSB = front PEN, 4 LSB = background PEN */ if (((state->m_xpos + x) < 256) && ((state->m_ypos + y) < 256)) - *BITMAP_ADDR16(state->m_tmpbitmaps[state->m_plane], state->m_ypos + y, state->m_xpos + x) = data ? color_base | ((state->m_color1 & 0xf0) >> 4): color_base | ((state->m_color1 & 0x0f)); + state->m_tmpbitmaps[state->m_plane]->pix16(state->m_ypos + y, state->m_xpos + x) = data ? color_base | ((state->m_color1 & 0xf0) >> 4): color_base | ((state->m_color1 & 0x0f)); bits += 1; } @@ -521,7 +521,7 @@ static READ8_HANDLER( vcu_set_gfx_addr_r ) col = color_base | data; if (((state->m_xpos + x) < 256) && ((state->m_ypos + y) < 256)) - *BITMAP_ADDR16(state->m_tmpbitmaps[state->m_plane], state->m_ypos + y, state->m_xpos + x) = col; + state->m_tmpbitmaps[state->m_plane]->pix16(state->m_ypos + y, state->m_xpos + x) = col; bits += 4; } @@ -622,7 +622,7 @@ static READ8_HANDLER( vcu_set_clr_addr_r ) } if (((state->m_xpos + x) < 256) && ((state->m_ypos + y) < 256)) - *BITMAP_ADDR16(state->m_tmpbitmaps[state->m_plane], state->m_ypos + y, state->m_xpos + x) = col; + state->m_tmpbitmaps[state->m_plane]->pix16(state->m_ypos + y, state->m_xpos + x) = col; bits += 2; } diff --git a/src/mame/drivers/mediagx.c b/src/mame/drivers/mediagx.c index 8b5ee0ba4c8..daf0c36c71b 100644 --- a/src/mame/drivers/mediagx.c +++ b/src/mame/drivers/mediagx.c @@ -212,7 +212,7 @@ static void draw_char(bitmap_t *bitmap, const rectangle *cliprect, const gfx_ele for (j=y; j < y+8; j++) { - UINT32 *p = BITMAP_ADDR32(bitmap, j, 0); + UINT32 *p = &bitmap->pix32(j); for (i=x; i < x+8; i++) { UINT8 pen = dp[index++]; @@ -264,7 +264,7 @@ static void draw_framebuffer(running_machine &machine, bitmap_t *bitmap, const r for (j=0; j < state->m_frame_height; j++) { - UINT32 *p = BITMAP_ADDR32(bitmap, j, 0); + UINT32 *p = &bitmap->pix32(j); UINT8 *si = &framebuf[j * line_delta]; for (i=0; i < state->m_frame_width; i++) { @@ -286,7 +286,7 @@ static void draw_framebuffer(running_machine &machine, bitmap_t *bitmap, const r { for (j=0; j < state->m_frame_height; j++) { - UINT32 *p = BITMAP_ADDR32(bitmap, j, 0); + UINT32 *p = &bitmap->pix32(j); UINT16 *si = &framebuf[j * (line_delta/2)]; for (i=0; i < state->m_frame_width; i++) { @@ -304,7 +304,7 @@ static void draw_framebuffer(running_machine &machine, bitmap_t *bitmap, const r { for (j=0; j < state->m_frame_height; j++) { - UINT32 *p = BITMAP_ADDR32(bitmap, j, 0); + UINT32 *p = &bitmap->pix32(j); UINT16 *si = &framebuf[j * (line_delta/2)]; for (i=0; i < state->m_frame_width; i++) { @@ -347,7 +347,7 @@ static void draw_cga(running_machine &machine, bitmap_t *bitmap, const rectangle static SCREEN_UPDATE(mediagx) { mediagx_state *state = screen.machine().driver_data<mediagx_state>(); - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); draw_framebuffer(screen.machine(), bitmap, cliprect); diff --git a/src/mame/drivers/meijinsn.c b/src/mame/drivers/meijinsn.c index f1366fce5e9..ff5020d0471 100644 --- a/src/mame/drivers/meijinsn.c +++ b/src/mame/drivers/meijinsn.c @@ -302,7 +302,7 @@ static SCREEN_UPDATE(meijinsn) { color= BIT(data1, x) | (BIT(data1, x + 4) << 1); data = BIT(data2, x) | (BIT(data2, x + 4) << 1); - *BITMAP_ADDR16(bitmap, sy, (sx * 4 + (3 - x))) = color * 4 + data; + bitmap->pix16(sy, (sx * 4 + (3 - x))) = color * 4 + data; } } return 0; diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c index 3cd59babdc4..bd3b11ae0ed 100644 --- a/src/mame/drivers/merit.c +++ b/src/mame/drivers/merit.c @@ -246,7 +246,7 @@ static MC6845_UPDATE_ROW( update_row ) col |= 0x03; col = state->m_ram_palette[col & 0x3ff]; - *BITMAP_ADDR32(bitmap, y, x) = pens[col ? col : (state->m_lscnblk ? 8 : 0)]; + bitmap->pix32(y, x) = pens[col ? col : (state->m_lscnblk ? 8 : 0)]; x++; } diff --git a/src/mame/drivers/meritm.c b/src/mame/drivers/meritm.c index 8b75c6c2abe..c82894bd509 100644 --- a/src/mame/drivers/meritm.c +++ b/src/mame/drivers/meritm.c @@ -382,7 +382,7 @@ static SCREEN_UPDATE( meritm ) popmessage("Layer 1 %sabled",state->m_layer1_enabled ? "en" : "dis"); } - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); if ( state->m_layer0_enabled ) { diff --git a/src/mame/drivers/metalmx.c b/src/mame/drivers/metalmx.c index 77512380fd8..9b169a7c1e1 100644 --- a/src/mame/drivers/metalmx.c +++ b/src/mame/drivers/metalmx.c @@ -291,7 +291,7 @@ static SCREEN_UPDATE( metalmx ) { int x; UINT16 *src = &src_base[512 * y]; - UINT16 *dst = BITMAP_ADDR16(bitmap, y, 0); + UINT16 *dst = &bitmap->pix16(y); for(x = 0; x < 512; x++) *dst++ = *src++; diff --git a/src/mame/drivers/midas.c b/src/mame/drivers/midas.c index 974a3232012..f6fa3a2b740 100644 --- a/src/mame/drivers/midas.c +++ b/src/mame/drivers/midas.c @@ -190,7 +190,7 @@ static SCREEN_UPDATE( midas ) } #endif - bitmap_fill(bitmap,cliprect,4095); + bitmap->fill(4095, *cliprect); if (layers_ctrl & 2) draw_sprites(screen.machine(), bitmap,cliprect); if (layers_ctrl & 1) tilemap_draw(bitmap,cliprect, state->m_tmap, 0, 0); diff --git a/src/mame/drivers/minivadr.c b/src/mame/drivers/minivadr.c index 40567e88d93..04a6a788afe 100644 --- a/src/mame/drivers/minivadr.c +++ b/src/mame/drivers/minivadr.c @@ -47,7 +47,7 @@ static SCREEN_UPDATE( minivadr ) for (i = 0; i < 8; i++) { pen_t pen = (data & 0x80) ? RGB_WHITE : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x) = pen; + bitmap->pix32(y, x) = pen; data = data << 1; x = x + 1; diff --git a/src/mame/drivers/mirage.c b/src/mame/drivers/mirage.c index 812170359a2..ff22d3eb9a6 100644 --- a/src/mame/drivers/mirage.c +++ b/src/mame/drivers/mirage.c @@ -83,7 +83,7 @@ static SCREEN_UPDATE( mirage ) deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll); - bitmap_fill(bitmap, cliprect, 256); /* not verified */ + bitmap->fill(256, *cliprect); /* not verified */ deco16ic_tilemap_2_draw(state->m_deco_tilegen1, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); screen.machine().device<decospr_device>("spritegen")->inefficient_copy_sprite_bitmap(screen.machine(), bitmap, cliprect, 0x0800, 0x0800, 0x200, 0x1ff); diff --git a/src/mame/drivers/missb2.c b/src/mame/drivers/missb2.c index ee43dc738a9..1036ad12cfa 100644 --- a/src/mame/drivers/missb2.c +++ b/src/mame/drivers/missb2.c @@ -49,7 +49,7 @@ static SCREEN_UPDATE( missb2 ) /* and sprites) are stored in the same memory region, and information on */ /* the background character columns is stored in the area dd00-dd3f */ - bitmap_fill(bitmap, cliprect, 255); + bitmap->fill(255, *cliprect); if (!state->m_video_enable) return 0; diff --git a/src/mame/drivers/missile.c b/src/mame/drivers/missile.c index 01cb1721e5e..0c18ba46568 100644 --- a/src/mame/drivers/missile.c +++ b/src/mame/drivers/missile.c @@ -673,7 +673,7 @@ static SCREEN_UPDATE( missile ) /* draw the bitmap to the screen, looping over Y */ for (y = cliprect->min_y; y <= cliprect->max_y; y++) { - UINT16 *dst = (UINT16 *)bitmap->base + y * bitmap->rowpixels; + UINT16 *dst = &bitmap->pix16(y); int effy = state->m_flipscreen ? ((256+24 - y) & 0xff) : y; UINT8 *src = &videoram[effy * 64]; diff --git a/src/mame/drivers/mjsister.c b/src/mame/drivers/mjsister.c index 54085f7b640..5f3c989deab 100644 --- a/src/mame/drivers/mjsister.c +++ b/src/mame/drivers/mjsister.c @@ -79,8 +79,8 @@ static void mjsister_plot0( running_machine &machine, int offset, UINT8 data ) c1 = (data & 0x0f) + state->m_colorbank * 0x20; c2 = ((data & 0xf0) >> 4) + state->m_colorbank * 0x20; - *BITMAP_ADDR16(state->m_tmpbitmap0, y, x * 2 + 0) = c1; - *BITMAP_ADDR16(state->m_tmpbitmap0, y, x * 2 + 1) = c2; + state->m_tmpbitmap0->pix16(y, x * 2 + 0) = c1; + state->m_tmpbitmap0->pix16(y, x * 2 + 1) = c2; } static void mjsister_plot1( running_machine &machine, int offset, UINT8 data ) @@ -99,8 +99,8 @@ static void mjsister_plot1( running_machine &machine, int offset, UINT8 data ) if (c2) c2 += state->m_colorbank * 0x20 + 0x10; - *BITMAP_ADDR16(state->m_tmpbitmap1, y, x * 2 + 0) = c1; - *BITMAP_ADDR16(state->m_tmpbitmap1, y, x * 2 + 1) = c2; + state->m_tmpbitmap1->pix16(y, x * 2 + 0) = c1; + state->m_tmpbitmap1->pix16(y, x * 2 + 1) = c2; } static WRITE8_HANDLER( mjsister_videoram_w ) @@ -140,13 +140,13 @@ static SCREEN_UPDATE( mjsister ) { for (i = 0; i < 256; i++) for (j = 0; j < 4; j++) - *BITMAP_ADDR16(bitmap, i, 256 + j) = state->m_colorbank * 0x20; + bitmap->pix16(i, 256 + j) = state->m_colorbank * 0x20; copybitmap(bitmap, state->m_tmpbitmap0, flip, flip, 0, 0, cliprect); copybitmap_trans(bitmap, state->m_tmpbitmap1, flip, flip, 2, 0, cliprect, 0); } else - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); return 0; } diff --git a/src/mame/drivers/mlanding.c b/src/mame/drivers/mlanding.c index ccf18843331..b6f9c2e868f 100644 --- a/src/mame/drivers/mlanding.c +++ b/src/mame/drivers/mlanding.c @@ -66,7 +66,7 @@ static SCREEN_UPDATE(mlanding) for (y = cliprect->min_y; y <= cliprect->max_y; ++y) { UINT16 *src = &state->m_g_ram[y * 512/2 + cliprect->min_x]; - UINT16 *dst = BITMAP_ADDR16(bitmap, y, cliprect->min_x); + UINT16 *dst = &bitmap->pix16(y, cliprect->min_x); for (x = cliprect->min_x; x <= cliprect->max_x; x += 2) { diff --git a/src/mame/drivers/monzagp.c b/src/mame/drivers/monzagp.c index 172811bc725..0d5eec77598 100644 --- a/src/mame/drivers/monzagp.c +++ b/src/mame/drivers/monzagp.c @@ -92,7 +92,7 @@ static SCREEN_UPDATE(monzagp) fclose(p); } - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); for(y=0;y<256;y++) { for(x=0;x<256;x++) diff --git a/src/mame/drivers/mpu4vid.c b/src/mame/drivers/mpu4vid.c index 73749d1052d..d2e0c778591 100644 --- a/src/mame/drivers/mpu4vid.c +++ b/src/mame/drivers/mpu4vid.c @@ -452,7 +452,7 @@ static SCREEN_UPDATE(mpu4_vid) mpu4_state *state = screen.machine().driver_data<mpu4_state>(); int x, y/*, count = 0*/; - bitmap_fill(bitmap,cliprect,0); + bitmap->fill(0, *cliprect); /* this is in main ram.. i think it must transfer it out of here??? */ /* count = 0x0018b6/2; - crmaze count = 0x004950/2; - turnover */ diff --git a/src/mame/drivers/multfish.c b/src/mame/drivers/multfish.c index eeced491b34..0a40b28f78e 100644 --- a/src/mame/drivers/multfish.c +++ b/src/mame/drivers/multfish.c @@ -246,7 +246,7 @@ static SCREEN_UPDATE(multfish) multfish_state *state = screen.machine().driver_data<multfish_state>(); int i; - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); if (!state->m_disp_enable) return 0; diff --git a/src/mame/drivers/murogem.c b/src/mame/drivers/murogem.c index 9df5a898c85..544d8ddcaa8 100644 --- a/src/mame/drivers/murogem.c +++ b/src/mame/drivers/murogem.c @@ -205,7 +205,7 @@ static SCREEN_UPDATE(murogem) int xx,yy,count; count = 0x000; - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); for (yy=0;yy<32;yy++) { diff --git a/src/mame/drivers/mwarr.c b/src/mame/drivers/mwarr.c index b90e61278cd..8c817f6770b 100644 --- a/src/mame/drivers/mwarr.c +++ b/src/mame/drivers/mwarr.c @@ -471,7 +471,7 @@ static SCREEN_UPDATE( mwarr ) mwarr_state *state = screen.machine().driver_data<mwarr_state>(); int i; - bitmap_fill(screen.machine().priority_bitmap, cliprect, 0); + screen.machine().priority_bitmap->fill(0, *cliprect); if (BIT(state->m_vidattrram[6], 0)) { diff --git a/src/mame/drivers/namcoic.c b/src/mame/drivers/namcoic.c index 78a4c466d0e..5ab90fc6bc2 100644 --- a/src/mame/drivers/namcoic.c +++ b/src/mame/drivers/namcoic.c @@ -271,7 +271,7 @@ static void zdrawgfxzoom( int scalex, int scaley, int zpos ) { if (!scalex || !scaley) return; - if (dest_bmp->bpp == 16) + if (dest_bmp->bpp() == 16) { if( gfx ) { @@ -347,8 +347,8 @@ static void zdrawgfxzoom( for( y=sy; y<ey; y++ ) { const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo; - UINT16 *dest = BITMAP_ADDR16(dest_bmp, y, 0); - UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0); + UINT16 *dest = &dest_bmp->pix16(y); + UINT8 *pri = &priority_bitmap->pix8(y); int x, x_index = x_index_base; if( mPalXOR ) { @@ -417,7 +417,7 @@ namcos2_draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle int loop; if( pri==0 ) { - bitmap_fill( machine.priority_bitmap, cliprect , 0); + machine.priority_bitmap->fill(0, *cliprect ); } for( loop=0; loop < 128; loop++ ) { @@ -528,7 +528,7 @@ namcos2_draw_sprites_metalhawk(running_machine &machine, bitmap_t *bitmap, const int loop; if( pri==0 ) { - bitmap_fill( machine.priority_bitmap, cliprect , 0); + machine.priority_bitmap->fill(0, *cliprect ); } for( loop=0; loop < 128; loop++ ) { @@ -773,7 +773,7 @@ draw_spriteC355(running_machine &machine, bitmap_t *bitmap, const rectangle *cli xscroll &= 0x1ff; if( xscroll & 0x100 ) xscroll |= ~0x1ff; yscroll &= 0x1ff; if( yscroll & 0x100 ) yscroll |= ~0x1ff; - if( bitmap->width > 384 ) + if( bitmap->width() > 384 ) { /* Medium Resolution: System21 adjust */ xscroll = (INT16)mSpritePos[1]; xscroll &= 0x3ff; if( xscroll & 0x200 ) xscroll |= ~0x3ff; @@ -947,7 +947,7 @@ namco_obj_draw(running_machine &machine, bitmap_t *bitmap, const rectangle *clip // int offs = spriteram16[0x18000/2]; /* end-of-sprite-list */ if( pri==0 ) { - bitmap_fill( machine.priority_bitmap, cliprect , 0); + machine.priority_bitmap->fill(0, *cliprect ); } // if( offs==0 ) { /* boot */ @@ -1219,7 +1219,7 @@ DrawRozHelper( const struct RozParam *rozInfo ) { - if( (bitmap->bpp == 16) && + if( (bitmap->bpp() == 16) && (namcos2_gametype != NAMCOFL_SPEED_RACER) && (namcos2_gametype != NAMCOFL_FINAL_LAP_R)) { @@ -1235,14 +1235,14 @@ DrawRozHelper( int x = sx; UINT32 cx = startx; UINT32 cy = starty; - UINT16 *dest = BITMAP_ADDR16(bitmap, sy, sx); + UINT16 *dest = &bitmap->pix16(sy, sx); while( x <= clip->max_x ) { UINT32 xpos = (((cx>>16)&size_mask) + rozInfo->left)&0xfff; UINT32 ypos = (((cy>>16)&size_mask) + rozInfo->top)&0xfff; - if( *BITMAP_ADDR8(flagsbitmap, ypos, xpos)&TILEMAP_PIXEL_LAYER0 ) + if( flagsbitmap->pix8(ypos, xpos)&TILEMAP_PIXEL_LAYER0 ) { - *dest = *BITMAP_ADDR16(srcbitmap,ypos,xpos)+rozInfo->color; + *dest = srcbitmap->pix16(ypos, xpos)+rozInfo->color; } cx += rozInfo->incxx; cy += rozInfo->incxy; @@ -1286,7 +1286,7 @@ DrawRozScanline( bitmap_t *bitmap, int line, int which, int pri, const rectangle if( pri == rozInfo.priority ) { clip.min_x = 0; - clip.max_x = bitmap->width-1; + clip.max_x = bitmap->width()-1; clip.min_y = clip.max_y = line; if( clip.min_x < cliprect->min_x ){ clip.min_x = cliprect->min_x; } @@ -1618,11 +1618,11 @@ namco_road_draw(running_machine &machine, bitmap_t *bitmap, const rectangle *cli if( zoomx ) { unsigned sourcey = mpRoadRAM[0x1fc00/2+i+15]+yscroll; - const UINT16 *pSourceGfx = BITMAP_ADDR16(pSourceBitmap, sourcey&(ROAD_TILEMAP_HEIGHT-1), 0); + const UINT16 *pSourceGfx = &pSourceBitmap->pix16(sourcey&(ROAD_TILEMAP_HEIGHT-1)); unsigned dsourcex = (ROAD_TILEMAP_WIDTH<<16)/zoomx; if( dsourcex ) { - UINT16 *pDest = BITMAP_ADDR16(bitmap, i, 0); + UINT16 *pDest = &bitmap->pix16(i); unsigned sourcex = 0; int numpixels = (44*ROAD_TILE_SIZE<<16)/dsourcex; int clipPixels; diff --git a/src/mame/drivers/namcos23.c b/src/mame/drivers/namcos23.c index dc4b9233cbd..ef5f1b02dc3 100644 --- a/src/mame/drivers/namcos23.c +++ b/src/mame/drivers/namcos23.c @@ -1655,7 +1655,7 @@ static void render_scanline(void *dest, INT32 scanline, const poly_extent *exten float dv = extent->param[2].dpdx; float dl = extent->param[3].dpdx; bitmap_t *bitmap = (bitmap_t *)dest; - UINT32 *img = BITMAP_ADDR32(bitmap, scanline, extent->startx); + UINT32 *img = &bitmap->pix32(scanline, extent->startx); for(int x = extent->startx; x < extent->stopx; x++) { float z = w ? 1/w : 0; @@ -2077,7 +2077,7 @@ static void render_flush(running_machine &machine, bitmap_t *bitmap) qsort(render.poly_order, render.poly_count, sizeof(namcos23_poly_entry *), render_poly_compare); - const static rectangle scissor = { 0, 639, 0, 479 }; + const static rectangle scissor(0, 639, 0, 479); for(int i=0; i<render.poly_count; i++) { const namcos23_poly_entry *p = render.poly_order[i]; @@ -2136,7 +2136,7 @@ static VIDEO_START( ss23 ) static SCREEN_UPDATE( ss23 ) { namcos23_state *state = screen.machine().driver_data<namcos23_state>(); - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); render_run( screen.machine(), bitmap ); diff --git a/src/mame/drivers/neoprint.c b/src/mame/drivers/neoprint.c index ebeffb96c76..fdb33a2f32d 100644 --- a/src/mame/drivers/neoprint.c +++ b/src/mame/drivers/neoprint.c @@ -93,7 +93,7 @@ static void draw_layer(running_machine &machine, bitmap_t *bitmap,const rectangl SCREEN_UPDATE(neoprint) { - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); draw_layer(screen.machine(),bitmap,cliprect,1,2); draw_layer(screen.machine(),bitmap,cliprect,0,2); @@ -103,7 +103,7 @@ SCREEN_UPDATE(neoprint) SCREEN_UPDATE(nprsp) { - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); draw_layer(screen.machine(),bitmap,cliprect,1,0); draw_layer(screen.machine(),bitmap,cliprect,2,0); diff --git a/src/mame/drivers/nightgal.c b/src/mame/drivers/nightgal.c index 4117e61503d..73f62325813 100644 --- a/src/mame/drivers/nightgal.c +++ b/src/mame/drivers/nightgal.c @@ -76,7 +76,7 @@ static SCREEN_UPDATE( nightgal ) for (y = cliprect->min_y; y <= cliprect->max_y; ++y) { UINT8 *src = &state->m_blit_buffer[y * 512 / 2 + cliprect->min_x]; - UINT16 *dst = BITMAP_ADDR16(bitmap, y, cliprect->min_x); + UINT16 *dst = &bitmap->pix16(y, cliprect->min_x); for (x = cliprect->min_x; x <= cliprect->max_x; x += 2) { diff --git a/src/mame/drivers/nmg5.c b/src/mame/drivers/nmg5.c index 405c48dfe8f..47e6ff4ce1e 100644 --- a/src/mame/drivers/nmg5.c +++ b/src/mame/drivers/nmg5.c @@ -897,13 +897,13 @@ static void draw_bitmap( running_machine &machine, bitmap_t *bitmap ) for (x = 0; x < xxx; x++) { pix = (state->m_bitmap[count] & 0xf000) >> 12; - if (pix) *BITMAP_ADDR16(bitmap, y + yoff, x * 4 + 0 + xoff) = pix + 0x300; + if (pix) bitmap->pix16(y + yoff, x * 4 + 0 + xoff) = pix + 0x300; pix = (state->m_bitmap[count] & 0x0f00) >> 8; - if (pix) *BITMAP_ADDR16(bitmap, y + yoff, x * 4 + 1 + xoff) = pix + 0x300; + if (pix) bitmap->pix16(y + yoff, x * 4 + 1 + xoff) = pix + 0x300; pix = (state->m_bitmap[count] & 0x00f0) >> 4; - if (pix) *BITMAP_ADDR16(bitmap, y + yoff, x * 4 + 2 + xoff) = pix + 0x300; + if (pix) bitmap->pix16(y + yoff, x * 4 + 2 + xoff) = pix + 0x300; pix = (state->m_bitmap[count] & 0x000f) >> 0; - if (pix) *BITMAP_ADDR16(bitmap, y + yoff, x * 4 + 3 + xoff) = pix + 0x300; + if (pix) bitmap->pix16(y + yoff, x * 4 + 3 + xoff) = pix + 0x300; count++; } diff --git a/src/mame/drivers/norautp.c b/src/mame/drivers/norautp.c index b9e0378c0cc..6468bdb6ece 100644 --- a/src/mame/drivers/norautp.c +++ b/src/mame/drivers/norautp.c @@ -571,7 +571,7 @@ static SCREEN_UPDATE( norautp ) count = 0; - bitmap_fill(bitmap, cliprect, screen.machine().pens[0]); //black pen + bitmap->fill(screen.machine().pens[0], *cliprect); //black pen for(y = 0; y < 8; y++) { diff --git a/src/mame/drivers/nwk-tr.c b/src/mame/drivers/nwk-tr.c index f7c03c3d202..d8c7e91737d 100644 --- a/src/mame/drivers/nwk-tr.c +++ b/src/mame/drivers/nwk-tr.c @@ -265,7 +265,7 @@ static SCREEN_UPDATE( nwktr ) device_t *voodoo = screen.machine().device("voodoo"); device_t *k001604 = screen.machine().device("k001604"); - bitmap_fill(bitmap, cliprect, screen.machine().pens[0]); + bitmap->fill(screen.machine().pens[0], *cliprect); voodoo_update(voodoo, bitmap, cliprect); diff --git a/src/mame/drivers/nyny.c b/src/mame/drivers/nyny.c index 1e2710aac7b..492d5d333a4 100644 --- a/src/mame/drivers/nyny.c +++ b/src/mame/drivers/nyny.c @@ -350,7 +350,7 @@ static MC6845_UPDATE_ROW( update_row ) else color = bit2 ? color2 : 0; - *BITMAP_ADDR32(bitmap, y, x) = pens[color]; + bitmap->pix32(y, x) = pens[color]; x += 1; } @@ -385,7 +385,7 @@ static MC6845_END_UPDATE( end_update ) { /* check if the star status */ if (state->m_star_enable && - (*BITMAP_ADDR32(bitmap, y, x) == pens[0]) && + (bitmap->pix32(y, x) == pens[0]) && ((state->m_star_shift_reg & 0x80ff) == 0x00ff) && (((y & 0x01) ^ state->m_flipscreen) ^ (((x & 0x08) >> 3) ^ state->m_flipscreen))) { @@ -393,7 +393,7 @@ static MC6845_END_UPDATE( end_update ) ((state->m_star_shift_reg & 0x0400) >> 9) | /* G */ ((state->m_star_shift_reg & 0x1000) >> 10); /* B */ - *BITMAP_ADDR32(bitmap, y, x) = pens[color]; + bitmap->pix32(y, x) = pens[color]; } if (delay_counter == 0) diff --git a/src/mame/drivers/othello.c b/src/mame/drivers/othello.c index 2cf4e10ae45..69571c31416 100644 --- a/src/mame/drivers/othello.c +++ b/src/mame/drivers/othello.c @@ -92,7 +92,7 @@ static MC6845_UPDATE_ROW( update_row ) for(x = 0; x < TILE_WIDTH; ++x) { - *BITMAP_ADDR16(bitmap, y, (cx * TILE_WIDTH + x) ^ 1) = tmp & 0x0f; + bitmap->pix16(y, (cx * TILE_WIDTH + x) ^ 1) = tmp & 0x0f; tmp >>= 4; } } diff --git a/src/mame/drivers/panicr.c b/src/mame/drivers/panicr.c index b3b5b14e298..5fb92e17430 100644 --- a/src/mame/drivers/panicr.c +++ b/src/mame/drivers/panicr.c @@ -242,7 +242,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectan static SCREEN_UPDATE( panicr) { panicr_state *state = screen.machine().driver_data<panicr_state>(); - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); tilemap_mark_all_tiles_dirty( state->m_txttilemap ); tilemap_set_scrollx( state->m_bgtilemap,0, ((state->m_scrollram[0x02]&0x0f)<<12)+((state->m_scrollram[0x02]&0xf0)<<4)+((state->m_scrollram[0x04]&0x7f)<<1)+((state->m_scrollram[0x04]&0x80)>>7) ); tilemap_draw(bitmap,cliprect,state->m_bgtilemap,0,0); diff --git a/src/mame/drivers/pasha2.c b/src/mame/drivers/pasha2.c index 89e3fed1f5a..627d3848ac6 100644 --- a/src/mame/drivers/pasha2.c +++ b/src/mame/drivers/pasha2.c @@ -348,10 +348,10 @@ static SCREEN_UPDATE( pasha2 ) if (x * 2 < cliprect->max_x) { color = (state->m_bitmap0[count + (state->m_vbuffer ^ 1) * 0x20000 / 2] & 0xff00) >> 8; - *BITMAP_ADDR16(bitmap, y, x * 2 + 0) = color + 0x100; + bitmap->pix16(y, x * 2 + 0) = color + 0x100; color = state->m_bitmap0[count + (state->m_vbuffer ^ 1) * 0x20000 / 2] & 0xff; - *BITMAP_ADDR16(bitmap, y, x * 2 + 1) = color + 0x100; + bitmap->pix16(y, x * 2 + 1) = color + 0x100; } count++; @@ -367,11 +367,11 @@ static SCREEN_UPDATE( pasha2 ) { color = state->m_bitmap1[count + (state->m_vbuffer ^ 1) * 0x20000 / 2] & 0xff; if (color != 0) - *BITMAP_ADDR16(bitmap, y, x * 2 + 1) = color; + bitmap->pix16(y, x * 2 + 1) = color; color = (state->m_bitmap1[count + (state->m_vbuffer ^ 1) * 0x20000 / 2] & 0xff00) >> 8; if (color != 0) - *BITMAP_ADDR16(bitmap, y, x * 2 + 0) = color; + bitmap->pix16(y, x * 2 + 0) = color; } count++; diff --git a/src/mame/drivers/pcxt.c b/src/mame/drivers/pcxt.c index 92a3526831d..474f18ada3a 100644 --- a/src/mame/drivers/pcxt.c +++ b/src/mame/drivers/pcxt.c @@ -102,7 +102,7 @@ static SCREEN_UPDATE( tetriskr ) //popmessage("%04x",m_start_offs); - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); for(y=0;y<200/8;y++) { @@ -121,7 +121,7 @@ static SCREEN_UPDATE( tetriskr ) color |= ((bg_rom[y*320/8+x+(pen_i*0x20000)+yi*0x400+state->m_bg_bank*0x2000+1] >> (7-xi)) & 1) << pen_i; if((x+xi)<screen.visible_area().max_x && ((y)+yi)<screen.visible_area().max_y) - *BITMAP_ADDR16(bitmap, y*8+yi, x*8+xi) = screen.machine().pens[color]; + bitmap->pix16(y*8+yi, x*8+xi) = screen.machine().pens[color]; } } } diff --git a/src/mame/drivers/photon2.c b/src/mame/drivers/photon2.c index 4bfefc0532a..810b53b458e 100644 --- a/src/mame/drivers/photon2.c +++ b/src/mame/drivers/photon2.c @@ -113,7 +113,7 @@ static SCREEN_EOF( spectrum ) INLINE void spectrum_plot_pixel(bitmap_t *bitmap, int x, int y, UINT32 color) { - *BITMAP_ADDR16(bitmap, y, x) = (UINT16)color; + bitmap->pix16(y, x) = (UINT16)color; } static SCREEN_UPDATE( spectrum ) @@ -127,7 +127,7 @@ static SCREEN_UPDATE( spectrum ) scr=state->m_spectrum_video_ram; - bitmap_fill(bitmap, cliprect, state->m_spectrum_port_fe & 0x07); + bitmap->fill(state->m_spectrum_port_fe & 0x07, *cliprect); for (y=0; y<192; y++) { diff --git a/src/mame/drivers/pinkiri8.c b/src/mame/drivers/pinkiri8.c index 29859e1f235..e407a7e4702 100644 --- a/src/mame/drivers/pinkiri8.c +++ b/src/mame/drivers/pinkiri8.c @@ -213,7 +213,7 @@ static SCREEN_UPDATE( pinkiri8 ) //popmessage("%02x",state->m_janshi_crtc_regs[0x0a]); col_bank = (state->m_janshi_crtc_regs[0x0a] & 0x40) >> 6; - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); /* FIXME: color is a bit of a mystery */ { diff --git a/src/mame/drivers/progolf.c b/src/mame/drivers/progolf.c index 07308f8410f..b6e629e58ae 100644 --- a/src/mame/drivers/progolf.c +++ b/src/mame/drivers/progolf.c @@ -128,7 +128,7 @@ static SCREEN_UPDATE( progolf ) color = state->m_fg_fb[(xi+yi*8)+count*0x40]; if((x+yi) <= cliprect->max_x && (256-y+xi) <= cliprect->max_y && color != 0) - *BITMAP_ADDR16(bitmap, x+yi, 256-y+xi) = screen.machine().pens[(color & 0x7)]; + bitmap->pix16(x+yi, 256-y+xi) = screen.machine().pens[(color & 0x7)]; } } diff --git a/src/mame/drivers/pturn.c b/src/mame/drivers/pturn.c index de25184ef6c..b3f8e24480c 100644 --- a/src/mame/drivers/pturn.c +++ b/src/mame/drivers/pturn.c @@ -154,7 +154,7 @@ static SCREEN_UPDATE(pturn) int sx, sy; int flipx, flipy; - bitmap_fill(bitmap, cliprect, state->m_bgcolor); + bitmap->fill(state->m_bgcolor, *cliprect); tilemap_draw(bitmap,cliprect,state->m_bgmap,0,0); for ( offs = 0x80-4 ; offs >=0 ; offs -= 4) { diff --git a/src/mame/drivers/pzletime.c b/src/mame/drivers/pzletime.c index 0d109bd4113..b1f361c932e 100644 --- a/src/mame/drivers/pzletime.c +++ b/src/mame/drivers/pzletime.c @@ -81,7 +81,7 @@ static SCREEN_UPDATE( pzletime ) int count; int y, x; - bitmap_fill(bitmap, cliprect, screen.machine().pens[0]); //bg pen + bitmap->fill(screen.machine().pens[0], *cliprect); //bg pen tilemap_set_scrolly(state->m_txt_tilemap, 0, state->m_tilemap_regs[0] - 3); tilemap_set_scrollx(state->m_txt_tilemap, 0, state->m_tilemap_regs[1]); @@ -98,7 +98,7 @@ static SCREEN_UPDATE( pzletime ) for (x = 0; x < 512; x++) { if (state->m_bg_videoram[count] & 0x8000) - *BITMAP_ADDR16(bitmap, (y - 18) & 0xff, (x - 32) & 0x1ff) = 0x300 + (state->m_bg_videoram[count] & 0x7fff); + bitmap->pix16((y - 18) & 0xff, (x - 32) & 0x1ff) = 0x300 + (state->m_bg_videoram[count] & 0x7fff); count++; } diff --git a/src/mame/drivers/quizo.c b/src/mame/drivers/quizo.c index 2e309608d5c..f8a33154c25 100644 --- a/src/mame/drivers/quizo.c +++ b/src/mame/drivers/quizo.c @@ -87,19 +87,19 @@ static SCREEN_UPDATE( quizo ) int pix; pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3); - *BITMAP_ADDR16(bitmap, y, x*4+3) = pix; + bitmap->pix16(y, x*4+3) = pix; data>>=1; data1>>=1; pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3); - *BITMAP_ADDR16(bitmap, y, x*4+2) = pix; + bitmap->pix16(y, x*4+2) = pix; data>>=1; data1>>=1; pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3); - *BITMAP_ADDR16(bitmap, y, x*4+1) = pix; + bitmap->pix16(y, x*4+1) = pix; data>>=1; data1>>=1; pix=(data&1)|(((data>>4)&1)<<1)|((data1&1)<<2)|(((data1>>4)&1)<<3); - *BITMAP_ADDR16(bitmap, y, x*4+0) = pix; + bitmap->pix16(y, x*4+0) = pix; } } return 0; diff --git a/src/mame/drivers/quizpun2.c b/src/mame/drivers/quizpun2.c index de3cdd13a34..55780d56f89 100644 --- a/src/mame/drivers/quizpun2.c +++ b/src/mame/drivers/quizpun2.c @@ -163,9 +163,9 @@ static SCREEN_UPDATE(quizpun2) #endif if (layers_ctrl & 1) tilemap_draw(bitmap,cliprect, state->m_bg_tmap, TILEMAP_DRAW_OPAQUE, 0); - else bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + else bitmap->fill(get_black_pen(screen.machine()), *cliprect); -bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); +bitmap->fill(get_black_pen(screen.machine()), *cliprect); if (layers_ctrl & 2) tilemap_draw(bitmap,cliprect, state->m_fg_tmap, 0, 0); return 0; diff --git a/src/mame/drivers/r2dtank.c b/src/mame/drivers/r2dtank.c index bce26e4b8fa..84d056d7c50 100644 --- a/src/mame/drivers/r2dtank.c +++ b/src/mame/drivers/r2dtank.c @@ -366,7 +366,7 @@ static MC6845_UPDATE_ROW( update_row ) } color = bit ? fore_color : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x) = pens[color]; + bitmap->pix32(y, x) = pens[color]; x = x + 1; } diff --git a/src/mame/drivers/r2dx_v33.c b/src/mame/drivers/r2dx_v33.c index ed738f0e1cf..a8a06321d64 100644 --- a/src/mame/drivers/r2dx_v33.c +++ b/src/mame/drivers/r2dx_v33.c @@ -181,7 +181,7 @@ static VIDEO_START( rdx_v33 ) static SCREEN_UPDATE( rdx_v33 ) { - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); tilemap_draw(bitmap, cliprect, md_tilemap, 0, 0); diff --git a/src/mame/drivers/rabbit.c b/src/mame/drivers/rabbit.c index 2d4c5c2cf12..a46554c4b87 100644 --- a/src/mame/drivers/rabbit.c +++ b/src/mame/drivers/rabbit.c @@ -240,7 +240,7 @@ static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const recta UINT32 *source = (state->m_spriteram+ (todraw*2))-2; UINT32 *finish = state->m_spriteram; -// bitmap_fill(state->m_sprite_bitmap, &state->m_sprite_clip, 0x0); // sloooow +// state->m_sprite_bitmap->fill(0x0, state->m_sprite_clip); // sloooow while( source>=finish ) { @@ -291,7 +291,7 @@ static void rabbit_clearspritebitmap( running_machine &machine, bitmap_t *bitmap for (y=0; y<amounty;y++) { - dstline = BITMAP_ADDR16(state->m_sprite_bitmap, (starty+y)&0xfff, 0); + dstline = &state->m_sprite_bitmap->pix16((starty+y)&0xfff); memset(dstline+startx,0x00,amountx*2); } } @@ -332,8 +332,8 @@ static void draw_sprite_bitmap( running_machine &machine, bitmap_t *bitmap, cons if ((ydrawpos >= cliprect->min_y) && (ydrawpos <= cliprect->max_y)) { - srcline = BITMAP_ADDR16(state->m_sprite_bitmap, (starty+(y>>7))&0xfff, 0); - dstline = BITMAP_ADDR16(bitmap, ydrawpos, 0); + srcline = &state->m_sprite_bitmap->pix16((starty+(y>>7))&0xfff); + dstline = &bitmap->pix16(ydrawpos); for (x=0;x<xsize;x+=0x80) { @@ -434,7 +434,7 @@ static SCREEN_UPDATE(rabbit) rabbit_state *state = screen.machine().driver_data<rabbit_state>(); int prilevel; - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); // popmessage("%08x %08x", state->m_viewregs0[0], state->m_viewregs0[1]); // popmessage("%08x %08x %08x %08x %08x %08x", state->m_tilemap_regs[0][0],state->m_tilemap_regs[0][1],state->m_tilemap_regs[0][2],state->m_tilemap_regs[0][3],state->m_tilemap_regs[0][4],state->m_tilemap_regs[0][5]); diff --git a/src/mame/drivers/raiden2.c b/src/mame/drivers/raiden2.c index 112eaa7856c..07d5d9836fb 100644 --- a/src/mame/drivers/raiden2.c +++ b/src/mame/drivers/raiden2.c @@ -889,7 +889,7 @@ static VIDEO_START( raiden2 ) static SCREEN_UPDATE( raiden2 ) { raiden2_state *state = screen.machine().driver_data<raiden2_state>(); - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); //if (!screen.machine().input().code_pressed(KEYCODE_Q)) { diff --git a/src/mame/drivers/rotaryf.c b/src/mame/drivers/rotaryf.c index 2ac4709689b..1d3e10cb2e4 100644 --- a/src/mame/drivers/rotaryf.c +++ b/src/mame/drivers/rotaryf.c @@ -79,7 +79,7 @@ static SCREEN_UPDATE( rotaryf ) for (i = 0; i < 8; i++) { pen_t pen = (data & 0x01) ? RGB_WHITE : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x) = pen; + bitmap->pix32(y, x) = pen; data = data >> 1; x = x + 1; diff --git a/src/mame/drivers/roul.c b/src/mame/drivers/roul.c index b96e197ab39..87a99736628 100644 --- a/src/mame/drivers/roul.c +++ b/src/mame/drivers/roul.c @@ -216,7 +216,7 @@ static SCREEN_UPDATE(roul) int i,j; for (i = 0; i < 256; i++) for (j = 0; j < 256; j++) - *BITMAP_ADDR16(bitmap, j, i) = state->m_videobuf[j * 256 + 255 - i]; + bitmap->pix16(j, i) = state->m_videobuf[j * 256 + 255 - i]; return 0; } diff --git a/src/mame/drivers/royalmah.c b/src/mame/drivers/royalmah.c index 028a9bdd0bc..328964483e4 100644 --- a/src/mame/drivers/royalmah.c +++ b/src/mame/drivers/royalmah.c @@ -233,7 +233,7 @@ static SCREEN_UPDATE( royalmah ) { UINT8 pen = ((data2 >> 1) & 0x08) | ((data2 << 2) & 0x04) | ((data1 >> 3) & 0x02) | ((data1 >> 0) & 0x01); - *BITMAP_ADDR16(bitmap, y, x) = (state->m_palette_base << 4) | pen; + bitmap->pix16(y, x) = (state->m_palette_base << 4) | pen; x = x - 1; data1 = data1 >> 1; diff --git a/src/mame/drivers/sbowling.c b/src/mame/drivers/sbowling.c index 536b8ed27de..e3d8004e9ee 100644 --- a/src/mame/drivers/sbowling.c +++ b/src/mame/drivers/sbowling.c @@ -81,7 +81,7 @@ static void plot_pixel_sbw(bitmap_t *tmpbitmap, int x, int y, int col, int flip) y = 255-y; x = 247-x; } - *BITMAP_ADDR16(tmpbitmap, y, x) = col; + tmpbitmap->pix16(y, x) = col; } static WRITE8_HANDLER( sbw_videoram_w ) @@ -112,7 +112,7 @@ static SCREEN_UPDATE(sbowling) { sbowling_state *state = screen.machine().driver_data<sbowling_state>(); - bitmap_fill(bitmap, cliprect, 0x18); + bitmap->fill(0x18, *cliprect); tilemap_draw(bitmap, cliprect,state->m_sb_tilemap, 0, 0); copybitmap_trans(bitmap, state->m_tmpbitmap, 0, 0, 0, 0, cliprect, state->m_color_prom_address); return 0; diff --git a/src/mame/drivers/segac2.c b/src/mame/drivers/segac2.c index cd0ccc0147a..fdfd9213dff 100644 --- a/src/mame/drivers/segac2.c +++ b/src/mame/drivers/segac2.c @@ -1267,7 +1267,7 @@ static SCREEN_UPDATE(segac2_new) segac2_state *state = screen.machine().driver_data<segac2_state>(); if (!state->m_segac2_enable_display) { - bitmap_fill(bitmap, NULL, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine())); return 0; } diff --git a/src/mame/drivers/segald.c b/src/mame/drivers/segald.c index 9ecaccc031e..fcc5eaff936 100644 --- a/src/mame/drivers/segald.c +++ b/src/mame/drivers/segald.c @@ -91,7 +91,7 @@ static void astron_draw_sprites(running_machine &machine, bitmap_t *bitmap, cons static SCREEN_UPDATE( astron ) { - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); astron_draw_characters(screen.machine(), bitmap, cliprect); astron_draw_sprites(screen.machine(), bitmap, cliprect); diff --git a/src/mame/drivers/sfbonus.c b/src/mame/drivers/sfbonus.c index a54a836c846..c26ee13da26 100644 --- a/src/mame/drivers/sfbonus.c +++ b/src/mame/drivers/sfbonus.c @@ -934,8 +934,8 @@ static SCREEN_UPDATE(sfbonus) globalyscroll += 8; globalxscroll += 8; - bitmap_fill(bitmap,cliprect,screen.machine().pens[0]); - bitmap_fill(state->m_temp_reel_bitmap,cliprect,screen.machine().pens[0]); + bitmap->fill(screen.machine().pens[0], *cliprect); + state->m_temp_reel_bitmap->fill(screen.machine().pens[0], *cliprect); /* render reels to bitmap */ sfbonus_draw_reel_layer(screen,state->m_temp_reel_bitmap,cliprect,0); @@ -947,8 +947,8 @@ static SCREEN_UPDATE(sfbonus) { for (x=0;x<512;x++) { - UINT16* src = BITMAP_ADDR16(state->m_temp_reel_bitmap, y, x); - UINT16* dst = BITMAP_ADDR16(bitmap, y, x); + UINT16* src = &state->m_temp_reel_bitmap->pix16(y, x); + UINT16* dst = &bitmap->pix16(y, x); if ((src[0]&0x100)==0x000) dst[0] = src[0]; @@ -973,8 +973,8 @@ static SCREEN_UPDATE(sfbonus) { for (x=0;x<512;x++) { - UINT16* src = BITMAP_ADDR16(state->m_temp_reel_bitmap, y, x); - UINT16* dst = BITMAP_ADDR16(bitmap, y, x); + UINT16* src = &state->m_temp_reel_bitmap->pix16(y, x); + UINT16* dst = &bitmap->pix16(y, x); if ((src[0]&0x100)==0x100) dst[0] = src[0]-0x100; diff --git a/src/mame/drivers/shanghai.c b/src/mame/drivers/shanghai.c index c389f16adaf..6e5e4013326 100644 --- a/src/mame/drivers/shanghai.c +++ b/src/mame/drivers/shanghai.c @@ -83,8 +83,8 @@ static SCREEN_UPDATE( shanghai ) { b &= (HD63484_RAM_SIZE - 1); src = hd63484_ram_r(hd63484, b, 0xffff); - *BITMAP_ADDR16(bitmap, y, x) = src & 0x00ff; - *BITMAP_ADDR16(bitmap, y, x + 1) = (src & 0xff00) >> 8; + bitmap->pix16(y, x) = src & 0x00ff; + bitmap->pix16(y, x + 1) = (src & 0xff00) >> 8; b++; } } @@ -107,8 +107,8 @@ static SCREEN_UPDATE( shanghai ) src = hd63484_ram_r(hd63484, b, 0xffff); if (x <= w && x + sx >= 0 && x + sx < (hd63484_regs_r(hd63484, 0xca/2, 0xffff) & 0x0fff) * 2) { - *BITMAP_ADDR16(bitmap, y, x + sx) = src & 0x00ff; - *BITMAP_ADDR16(bitmap, y, x + sx + 1) = (src & 0xff00) >> 8; + bitmap->pix16(y, x + sx) = src & 0x00ff; + bitmap->pix16(y, x + sx + 1) = (src & 0xff00) >> 8; } b++; } diff --git a/src/mame/drivers/shougi.c b/src/mame/drivers/shougi.c index 843e87ea8e9..71ac1b402d1 100644 --- a/src/mame/drivers/shougi.c +++ b/src/mame/drivers/shougi.c @@ -182,7 +182,7 @@ static SCREEN_UPDATE( shougi ) color= ((data1>>x) & 1) | (((data1>>(4+x)) & 1)<<1); data = ((data2>>x) & 1) | (((data2>>(4+x)) & 1)<<1); - *BITMAP_ADDR16(bitmap, 255-sy, 255-(sx*4 + x)) = color*4 + data; + bitmap->pix16(255-sy, 255-(sx*4 + x)) = color*4 + data; } } diff --git a/src/mame/drivers/sigmab52.c b/src/mame/drivers/sigmab52.c index 0f51f213e01..0019fa0deb8 100644 --- a/src/mame/drivers/sigmab52.c +++ b/src/mame/drivers/sigmab52.c @@ -182,10 +182,10 @@ static SCREEN_UPDATE( jwildb52 ) src = hd63484_ram_r(hd63484, b & (HD63484_RAM_SIZE - 1), 0xffff); - *BITMAP_ADDR16(bitmap, y, x ) = ((src & 0x000f) >> 0) << 0; - *BITMAP_ADDR16(bitmap, y, x + 1) = ((src & 0x00f0) >> 4) << 0; - *BITMAP_ADDR16(bitmap, y, x + 2) = ((src & 0x0f00) >> 8) << 0; - *BITMAP_ADDR16(bitmap, y, x + 3) = ((src & 0xf000) >> 12) << 0; + bitmap->pix16(y, x ) = ((src & 0x000f) >> 0) << 0; + bitmap->pix16(y, x + 1) = ((src & 0x00f0) >> 4) << 0; + bitmap->pix16(y, x + 2) = ((src & 0x0f00) >> 8) << 0; + bitmap->pix16(y, x + 3) = ((src & 0xf000) >> 12) << 0; b++; } } @@ -210,10 +210,10 @@ if (!screen.machine().input().code_pressed(KEYCODE_O)) if (x <= w && x + sx >= 0 && x + sx < (hd63484_regs_r(hd63484, 0xca/2, 0xffff) & 0x0fff) * 4) { - *BITMAP_ADDR16(bitmap, y, x + sx ) = ((src & 0x000f) >> 0) << 0; - *BITMAP_ADDR16(bitmap, y, x + sx + 1) = ((src & 0x00f0) >> 4) << 0; - *BITMAP_ADDR16(bitmap, y, x + sx + 2) = ((src & 0x0f00) >> 8) << 0; - *BITMAP_ADDR16(bitmap, y, x + sx + 3) = ((src & 0xf000) >> 12) << 0; + bitmap->pix16(y, x + sx ) = ((src & 0x000f) >> 0) << 0; + bitmap->pix16(y, x + sx + 1) = ((src & 0x00f0) >> 4) << 0; + bitmap->pix16(y, x + sx + 2) = ((src & 0x0f00) >> 8) << 0; + bitmap->pix16(y, x + sx + 3) = ((src & 0xf000) >> 12) << 0; } b++; } diff --git a/src/mame/drivers/sigmab98.c b/src/mame/drivers/sigmab98.c index 170de8f6b85..dae821b89f4 100644 --- a/src/mame/drivers/sigmab98.c +++ b/src/mame/drivers/sigmab98.c @@ -265,7 +265,7 @@ static SCREEN_UPDATE(sigmab98) } #endif - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); // Draw from priority 3 (bottom, converted to a bitmask) to priority 0 (top) draw_sprites(screen.machine(), bitmap, cliprect, layers_ctrl & 8); diff --git a/src/mame/drivers/skeetsht.c b/src/mame/drivers/skeetsht.c index f620090f629..c372637220f 100644 --- a/src/mame/drivers/skeetsht.c +++ b/src/mame/drivers/skeetsht.c @@ -63,7 +63,7 @@ static void skeetsht_scanline_update(screen_device &screen, bitmap_t *bitmap, in skeetsht_state *state = screen.machine().driver_data<skeetsht_state>(); const rgb_t *const pens = tlc34076_get_pens(screen.machine().device("tlc34076")); UINT16 *vram = &state->m_tms_vram[(params->rowaddr << 8) & 0x3ff00]; - UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0); + UINT32 *dest = &bitmap->pix32(scanline); int coladdr = params->coladdr; int x; diff --git a/src/mame/drivers/skimaxx.c b/src/mame/drivers/skimaxx.c index 3e7815f03dd..163c7151a32 100644 --- a/src/mame/drivers/skimaxx.c +++ b/src/mame/drivers/skimaxx.c @@ -182,7 +182,7 @@ static void skimaxx_scanline_update(screen_device &screen, bitmap_t *bitmap, int UINT32 rowaddr = (params->rowaddr - 0x220); UINT16 *fg = &state->m_fg_buffer[rowaddr << 8]; UINT32 *bg = &state->m_bg_buffer_front[rowaddr/2 * 1024/2]; - UINT16 *dest = BITMAP_ADDR16(bitmap, scanline, 0); + UINT16 *dest = &bitmap->pix16(scanline); //int coladdr = params->coladdr; int x; //coladdr = 0; diff --git a/src/mame/drivers/skylncr.c b/src/mame/drivers/skylncr.c index dc879792055..108673c4a4a 100644 --- a/src/mame/drivers/skylncr.c +++ b/src/mame/drivers/skylncr.c @@ -148,20 +148,20 @@ static VIDEO_START( skylncr ) tilemap_set_transparent_pen(state->m_tmap, 0); } -// are these hardcoded, or registers? -static const rectangle visible1 = { 0*8, (20+48)*8-1, 4*8, (4+7)*8-1 }; -static const rectangle visible2 = { 0*8, (20+48)*8-1, 12*8, (12+7)*8-1 }; -static const rectangle visible3 = { 0*8, (20+48)*8-1, 20*8, (20+7)*8-1 }; - static SCREEN_UPDATE( skylncr ) { skylncr_state *state = screen.machine().driver_data<skylncr_state>(); int i; - bitmap_fill(bitmap,cliprect,0); + bitmap->fill(0, *cliprect); tilemap_draw(bitmap,cliprect, state->m_reel_1_tilemap, 0, 0); + // are these hardcoded, or registers? + const rectangle visible1(0*8, (20+48)*8-1, 4*8, (4+7)*8-1); + const rectangle visible2(0*8, (20+48)*8-1, 12*8, (12+7)*8-1); + const rectangle visible3(0*8, (20+48)*8-1, 20*8, (20+7)*8-1); + for (i= 0;i < 64;i++) { tilemap_set_scrolly(state->m_reel_2_tilemap, i, state->m_reelscroll2[i]); diff --git a/src/mame/drivers/sliver.c b/src/mame/drivers/sliver.c index 8ced54f29e9..5a2c769ae27 100644 --- a/src/mame/drivers/sliver.c +++ b/src/mame/drivers/sliver.c @@ -197,9 +197,9 @@ static void plot_pixel_rgb(sliver_state *state, int x, int y, UINT32 r, UINT32 g if (y < 0 || x < 0 || x > 383 || y > 255) return; - if (state->m_bitmap_bg->bpp == 32) + if (state->m_bitmap_bg->bpp() == 32) { - *BITMAP_ADDR32(state->m_bitmap_bg, y, x) = r | (g<<8) | (b<<16); + state->m_bitmap_bg->pix32(y, x) = r | (g<<8) | (b<<16); } else { @@ -207,7 +207,7 @@ static void plot_pixel_rgb(sliver_state *state, int x, int y, UINT32 r, UINT32 g g>>=3; b>>=3; color = r|(g<<5)|(b<<10); - *BITMAP_ADDR16(state->m_bitmap_bg, y, x) = color; + state->m_bitmap_bg->pix16(y, x) = color; } } @@ -224,9 +224,9 @@ static void plot_pixel_pal(running_machine &machine, int x, int y, int addr) g=(state->m_colorram[addr+0x100] << 2) | (state->m_colorram[addr+0x100] & 3); r=(state->m_colorram[addr+0x200] << 2) | (state->m_colorram[addr+0x200] & 3); - if (state->m_bitmap_fg->bpp == 32) + if (state->m_bitmap_fg->bpp() == 32) { - *BITMAP_ADDR32(state->m_bitmap_fg, y, x) = r | (g<<8) | (b<<16); + state->m_bitmap_fg->pix32(y, x) = r | (g<<8) | (b<<16); } else { @@ -234,7 +234,7 @@ static void plot_pixel_pal(running_machine &machine, int x, int y, int addr) g>>=3; b>>=3; color = r|(g<<5)|(b<<10); - *BITMAP_ADDR16(state->m_bitmap_fg, y, x) = color; + state->m_bitmap_fg->pix16(y, x) = color; } } @@ -299,7 +299,7 @@ static WRITE16_HANDLER( fifo_clear_w ) { sliver_state *state = space->machine().driver_data<sliver_state>(); - bitmap_fill(state->m_bitmap_fg, 0,0); + state->m_bitmap_fg->fill(0); state->m_fptr=0; state->m_tmp_counter=0; } @@ -324,7 +324,7 @@ static void render_jpeg(running_machine &machine) int addr = state->m_jpeg_addr; UINT8 *rom; - bitmap_fill(state->m_bitmap_bg, 0, 0); + state->m_bitmap_bg->fill(0); if (addr < 0) { return; diff --git a/src/mame/drivers/slotcarn.c b/src/mame/drivers/slotcarn.c index 2023b52408b..9db907b7ab8 100644 --- a/src/mame/drivers/slotcarn.c +++ b/src/mame/drivers/slotcarn.c @@ -140,7 +140,7 @@ static MC6845_UPDATE_ROW( update_row ) col |= 0x03; col = state->m_ram_palette[col & 0x3ff]; - *BITMAP_ADDR32(bitmap, y, x) = pens[col ? col : (lscnblk ? 8 : 0)]; + bitmap->pix32(y, x) = pens[col ? col : (lscnblk ? 8 : 0)]; x++; } diff --git a/src/mame/drivers/sms.c b/src/mame/drivers/sms.c index 04929b418c1..312c872b340 100644 --- a/src/mame/drivers/sms.c +++ b/src/mame/drivers/sms.c @@ -456,7 +456,7 @@ static WRITE8_HANDLER(video_w) for ( x = xstart; x < xstart + width; x++ ) { if ( y < 256 ) - *BITMAP_ADDR16(state->m_bitmap, y, x) = color; + state->m_bitmap->pix16(y, x) = color; } } } diff --git a/src/mame/drivers/snowbros.c b/src/mame/drivers/snowbros.c index 6f0d268e9fa..871e56723b0 100644 --- a/src/mame/drivers/snowbros.c +++ b/src/mame/drivers/snowbros.c @@ -86,7 +86,7 @@ static SCREEN_UPDATE( snowbros ) device_t *pandora = screen.machine().device("pandora"); /* This clears & redraws the entire screen each pass */ - bitmap_fill(bitmap,cliprect,0xf0); + bitmap->fill(0xf0, *cliprect); pandora_update(pandora, bitmap, cliprect); return 0; } diff --git a/src/mame/drivers/spaceg.c b/src/mame/drivers/spaceg.c index d997b3ba1e3..89ba84995c1 100644 --- a/src/mame/drivers/spaceg.c +++ b/src/mame/drivers/spaceg.c @@ -306,7 +306,7 @@ static SCREEN_UPDATE( spaceg ) for (i = 0; i < 8; i++) { - *BITMAP_ADDR16(bitmap, y, x) = (data & 0x80) ? state->m_colorram[offs] : 0; + bitmap->pix16(y, x) = (data & 0x80) ? state->m_colorram[offs] : 0; x++; data <<= 1; diff --git a/src/mame/drivers/speglsht.c b/src/mame/drivers/speglsht.c index 9117b4f8f8a..2ce0587c946 100644 --- a/src/mame/drivers/speglsht.c +++ b/src/mame/drivers/speglsht.c @@ -340,7 +340,7 @@ static VIDEO_START(speglsht) #define PLOT_PIXEL_RGB(x,y,r,g,b) if(y>=0 && x>=0 && x<512 && y<512) \ { \ - *BITMAP_ADDR32(bitmap, y, x) = (b) | ((g)<<8) | ((r)<<16); \ + bitmap->pix32(y, x) = (b) | ((g)<<8) | ((r)<<16); \ } static SCREEN_UPDATE(speglsht) @@ -360,13 +360,13 @@ static SCREEN_UPDATE(speglsht) } //draw st0016 gfx to temporary bitmap (indexed 16) - bitmap_fill(state->m_bitmap,NULL,0); + state->m_bitmap->fill(0); st0016_draw_screen(screen, state->m_bitmap, cliprect); //copy temporary bitmap to rgb 32 bit bitmap for(y=cliprect->min_y; y<cliprect->max_y;y++) { - UINT16 *srcline = BITMAP_ADDR16(state->m_bitmap, y, 0); + UINT16 *srcline = &state->m_bitmap->pix16(y); for(x=cliprect->min_x; x<cliprect->max_x;x++) { if(srcline[x]) diff --git a/src/mame/drivers/spiders.c b/src/mame/drivers/spiders.c index 74a6ca6633b..10431f44aeb 100644 --- a/src/mame/drivers/spiders.c +++ b/src/mame/drivers/spiders.c @@ -490,7 +490,7 @@ static MC6845_UPDATE_ROW( update_row ) data3 = data3 >> 1; } - *BITMAP_ADDR32(bitmap, y, x) = pens[color]; + bitmap->pix32(y, x) = pens[color]; x = x + 1; } diff --git a/src/mame/drivers/spoker.c b/src/mame/drivers/spoker.c index 73d157e9c47..9c364ec46fd 100644 --- a/src/mame/drivers/spoker.c +++ b/src/mame/drivers/spoker.c @@ -93,7 +93,7 @@ static SCREEN_UPDATE(spoker) { spoker_state *state = screen.machine().driver_data<spoker_state>(); - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); tilemap_draw(bitmap, cliprect, state->m_bg_tilemap, 0, 0); tilemap_draw(bitmap, cliprect, state->m_fg_tilemap, 0, 0); return 0; diff --git a/src/mame/drivers/srmp5.c b/src/mame/drivers/srmp5.c index c6d2d52e461..2b391bb9463 100644 --- a/src/mame/drivers/srmp5.c +++ b/src/mame/drivers/srmp5.c @@ -119,7 +119,7 @@ static SCREEN_UPDATE( srmp5 ) if(pen) { UINT16 pixdata=state->m_palram[pen]; - *BITMAP_ADDR32(bitmap, yw * 16 + y, xw * 16 + x) = ((pixdata&0x7c00)>>7) | ((pixdata&0x3e0)<<6) | ((pixdata&0x1f)<<19); + bitmap->pix32(yw * 16 + y, xw * 16 + x) = ((pixdata&0x7c00)>>7) | ((pixdata&0x3e0)<<6) | ((pixdata&0x1f)<<19); } address++; } @@ -129,7 +129,7 @@ static SCREEN_UPDATE( srmp5 ) } else #endif - bitmap_fill(bitmap,cliprect,0); + bitmap->fill(0, *cliprect); while((sprite_list[SUBLIST_OFFSET]&SPRITE_LIST_END_MARKER)==0 && sprite_list<sprite_list_end) { @@ -171,7 +171,7 @@ static SCREEN_UPDATE( srmp5 ) if(xb+xs2<=visarea.max_x && xb+xs2>=visarea.min_x && yb+ys2<=visarea.max_y && yb+ys2>=visarea.min_y ) { UINT16 pixdata=state->m_palram[pen+((sprite_sublist[SPRITE_PALETTE]&0xff)<<8)]; - *BITMAP_ADDR32(bitmap, yb+ys2, xb+xs2) = ((pixdata&0x7c00)>>7) | ((pixdata&0x3e0)<<6) | ((pixdata&0x1f)<<19); + bitmap->pix32(yb+ys2, xb+xs2) = ((pixdata&0x7c00)>>7) | ((pixdata&0x3e0)<<6) | ((pixdata&0x1f)<<19); } } ++address; diff --git a/src/mame/drivers/srmp6.c b/src/mame/drivers/srmp6.c index 6d5cd3acb00..94a005d8aa7 100644 --- a/src/mame/drivers/srmp6.c +++ b/src/mame/drivers/srmp6.c @@ -172,7 +172,7 @@ static SCREEN_UPDATE(srmp6) UINT16 b; } temp; - bitmap_fill(bitmap,cliprect,0); + bitmap->fill(0, *cliprect); #if 0 /* debug */ diff --git a/src/mame/drivers/ssfindo.c b/src/mame/drivers/ssfindo.c index e5a4fbedfd6..a976ab21e01 100644 --- a/src/mame/drivers/ssfindo.c +++ b/src/mame/drivers/ssfindo.c @@ -250,10 +250,10 @@ static SCREEN_UPDATE(ssfindo) for(y=0;y<256;y++) for(x=0;x<320;x+=4) { - *BITMAP_ADDR16(bitmap, y, x+0) = state->m_vram[s]&0xff; - *BITMAP_ADDR16(bitmap, y, x+1) = (state->m_vram[s]>>8)&0xff; - *BITMAP_ADDR16(bitmap, y, x+2) = (state->m_vram[s]>>16)&0xff; - *BITMAP_ADDR16(bitmap, y, x+3) = (state->m_vram[s]>>24)&0xff; + bitmap->pix16(y, x+0) = state->m_vram[s]&0xff; + bitmap->pix16(y, x+1) = (state->m_vram[s]>>8)&0xff; + bitmap->pix16(y, x+2) = (state->m_vram[s]>>16)&0xff; + bitmap->pix16(y, x+3) = (state->m_vram[s]>>24)&0xff; s++; } } diff --git a/src/mame/drivers/ssingles.c b/src/mame/drivers/ssingles.c index 6125df33dbc..d7bbfd3d1c6 100644 --- a/src/mame/drivers/ssingles.c +++ b/src/mame/drivers/ssingles.c @@ -209,7 +209,7 @@ static MC6845_UPDATE_ROW( ssingles_update_row ) for(x=7;x>=0;--x) { - *BITMAP_ADDR32(bitmap, y, (cx<<3)|(x)) = state->m_pens[palette+((b1&1)|((b0&1)<<1))]; + bitmap->pix32(y, (cx<<3)|(x)) = state->m_pens[palette+((b1&1)|((b0&1)<<1))]; b0>>=1; b1>>=1; } @@ -247,7 +247,7 @@ static MC6845_UPDATE_ROW( atamanot_update_row ) for(x=7;x>=0;--x) { - *BITMAP_ADDR32(bitmap, y, (cx<<3)|(x)) = state->m_pens[palette+((b1&1)|((b0&1)<<1))]; + bitmap->pix32(y, (cx<<3)|(x)) = state->m_pens[palette+((b1&1)|((b0&1)<<1))]; b0>>=1; b1>>=1; } diff --git a/src/mame/drivers/sstrangr.c b/src/mame/drivers/sstrangr.c index 46aaf3c12d5..e48594d8c95 100644 --- a/src/mame/drivers/sstrangr.c +++ b/src/mame/drivers/sstrangr.c @@ -60,7 +60,7 @@ static SCREEN_UPDATE( sstrangr ) data = data >> 1; } - *BITMAP_ADDR32(bitmap, y, x) = pen; + bitmap->pix32(y, x) = pen; x = x + 1; } @@ -119,7 +119,7 @@ static SCREEN_UPDATE( sstrngr2 ) data = data >> 1; } - *BITMAP_ADDR32(bitmap, y, x) = pens[color]; + bitmap->pix32(y, x) = pens[color]; x = x + 1; } diff --git a/src/mame/drivers/statriv2.c b/src/mame/drivers/statriv2.c index 23d980a7137..6ede0c88ba8 100644 --- a/src/mame/drivers/statriv2.c +++ b/src/mame/drivers/statriv2.c @@ -181,7 +181,7 @@ static SCREEN_UPDATE( statriv2 ) { statriv2_state *state = screen.machine().driver_data<statriv2_state>(); if (tms9927_screen_reset(screen.machine().device("tms"))) - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); else tilemap_draw(bitmap, cliprect, state->m_tilemap, 0, 0); return 0; diff --git a/src/mame/drivers/subsino.c b/src/mame/drivers/subsino.c index 7da06905474..f0a66b55797 100644 --- a/src/mame/drivers/subsino.c +++ b/src/mame/drivers/subsino.c @@ -454,21 +454,16 @@ static VIDEO_START( stisub ) static SCREEN_UPDATE( subsino ) { subsino_state *state = screen.machine().driver_data<subsino_state>(); - bitmap_fill(bitmap,cliprect,0); + bitmap->fill(0, *cliprect); tilemap_draw(bitmap,cliprect, state->m_tmap, 0, 0); return 0; } -// are these hardcoded, or registers? -static const rectangle visible1 = { 0*8, (14+48)*8-1, 4*8, (4+7)*8-1 }; -static const rectangle visible2 = { 0*8, (14+48)*8-1, 10*8, (10+7)*8-1 }; -static const rectangle visible3 = { 0*8, (14+48)*8-1, 18*8, (18+7)*8-1 }; - static SCREEN_UPDATE( subsino_reels ) { subsino_state *state = screen.machine().driver_data<subsino_state>(); int i; - bitmap_fill(bitmap,cliprect,0); + bitmap->fill(0, *cliprect); for (i= 0;i < 64;i++) { @@ -479,6 +474,11 @@ static SCREEN_UPDATE( subsino_reels ) if (state->m_out_c&0x08) { + // are these hardcoded, or registers? + const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+7)*8-1); + const rectangle visible2(0*8, (14+48)*8-1, 10*8, (10+7)*8-1); + const rectangle visible3(0*8, (14+48)*8-1, 18*8, (18+7)*8-1); + tilemap_draw(bitmap, &visible1, state->m_reel1_tilemap, 0, 0); tilemap_draw(bitmap, &visible2, state->m_reel2_tilemap, 0, 0); tilemap_draw(bitmap, &visible3, state->m_reel3_tilemap, 0, 0); @@ -488,17 +488,12 @@ static SCREEN_UPDATE( subsino_reels ) return 0; } -// areas based on d-up game in attract mode -static const rectangle stisub_visible1 = { 0, 511, 0, 87 }; -static const rectangle stisub_visible2 = { 0, 511, 88, 143 }; -static const rectangle stisub_visible3 = { 0, 511, 144, 223 }; - static SCREEN_UPDATE( stisub_reels ) { subsino_state *state = screen.machine().driver_data<subsino_state>(); int i; - bitmap_fill(bitmap,cliprect,0); + bitmap->fill(0, *cliprect); if (state->m_reel1_attr) { @@ -516,9 +511,14 @@ static SCREEN_UPDATE( stisub_reels ) if (state->m_out_c&0x08) { - tilemap_draw(bitmap, &stisub_visible1, state->m_reel1_tilemap, 0, 0); - tilemap_draw(bitmap, &stisub_visible2, state->m_reel2_tilemap, 0, 0); - tilemap_draw(bitmap, &stisub_visible3, state->m_reel3_tilemap, 0, 0); + // areas based on d-up game in attract mode + const rectangle visible1(0, 511, 0, 87); + const rectangle visible2(0, 511, 88, 143); + const rectangle visible3(0, 511, 144, 223); + + tilemap_draw(bitmap, &visible1, state->m_reel1_tilemap, 0, 0); + tilemap_draw(bitmap, &visible2, state->m_reel2_tilemap, 0, 0); + tilemap_draw(bitmap, &visible3, state->m_reel3_tilemap, 0, 0); } tilemap_draw(bitmap,cliprect, state->m_tmap, 0, 0); diff --git a/src/mame/drivers/subsino2.c b/src/mame/drivers/subsino2.c index 331be539754..e7ea734bc2d 100644 --- a/src/mame/drivers/subsino2.c +++ b/src/mame/drivers/subsino2.c @@ -85,7 +85,7 @@ public: UINT8 m_ss9601_byte_lo; UINT8 m_ss9601_byte_lo2; UINT8 *m_ss9601_reelrams[2]; - const rectangle *m_ss9601_reelrects; + rectangle m_ss9601_reelrects[3]; UINT8 m_ss9601_scrollctrl; UINT8 m_ss9601_tilesize; UINT8 m_ss9601_disable; @@ -528,14 +528,6 @@ static WRITE8_HANDLER( ss9601_disable_w ) Video Update ***************************************************************************/ -static const rectangle mtrain_reelrects[3] = { { 0, 0, 0x00*8, 0x09*8-1 }, - { 0, 0, 0x09*8, 0x10*8-1 }, - { 0, 0, 0x10*8, 256-16-1 } }; - -static const rectangle xtrain_reelrects[3] = { { 0, 0, 0x00*8, 0x08*8-1 }, - { 0, 0, 0x08*8, 0x18*8-1 }, - { 0, 0, 0x18*8, 256-16-1 } }; - static VIDEO_START( subsino2 ) { subsino2_state *state = machine.driver_data<subsino2_state>(); @@ -575,7 +567,9 @@ static VIDEO_START( subsino2 ) state->m_ss9601_reelrams[VRAM_LO] = auto_alloc_array(machine, UINT8, 0x2000); memset(state->m_ss9601_reelrams[VRAM_HI], 0, 0x2000); memset(state->m_ss9601_reelrams[VRAM_LO], 0, 0x2000); - state->m_ss9601_reelrects = mtrain_reelrects; + state->m_ss9601_reelrects[0].set(0, 0, 0x00*8, 0x09*8-1); + state->m_ss9601_reelrects[1].set(0, 0, 0x09*8, 0x10*8-1); + state->m_ss9601_reelrects[2].set(0, 0, 0x10*8, 256-16-1); /* state_save_register_global_pointer(machine, state->m_ss9601_reelrams[VRAM_HI], 0x2000); @@ -591,16 +585,16 @@ static VIDEO_START( subsino2 ) static VIDEO_START( mtrain ) { - subsino2_state *state = machine.driver_data<subsino2_state>(); VIDEO_START_CALL( subsino2 ); - state->m_ss9601_reelrects = mtrain_reelrects; } static VIDEO_START( xtrain ) { subsino2_state *state = machine.driver_data<subsino2_state>(); VIDEO_START_CALL( subsino2 ); - state->m_ss9601_reelrects = xtrain_reelrects; + state->m_ss9601_reelrects[0].set(0, 0, 0x00*8, 0x08*8-1); + state->m_ss9601_reelrects[1].set(0, 0, 0x08*8, 0x18*8-1); + state->m_ss9601_reelrects[2].set(0, 0, 0x18*8, 256-16-1); } static SCREEN_UPDATE( subsino2 ) @@ -659,7 +653,7 @@ static SCREEN_UPDATE( subsino2 ) } } - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); if (layers_ctrl & 1) { diff --git a/src/mame/drivers/supertnk.c b/src/mame/drivers/supertnk.c index 14e243a2b17..f9cb869d3aa 100644 --- a/src/mame/drivers/supertnk.c +++ b/src/mame/drivers/supertnk.c @@ -261,7 +261,7 @@ static SCREEN_UPDATE( supertnk ) for (i = 0; i < 8; i++) { UINT8 color = ((data0 & 0x80) >> 5) | ((data1 & 0x80) >> 6) | ((data2 & 0x80) >> 7); - *BITMAP_ADDR32(bitmap, y, x) = state->m_pens[color]; + bitmap->pix32(y, x) = state->m_pens[color]; data0 = data0 << 1; data1 = data1 << 1; diff --git a/src/mame/drivers/suprgolf.c b/src/mame/drivers/suprgolf.c index 971a14b155d..72dbf64b902 100644 --- a/src/mame/drivers/suprgolf.c +++ b/src/mame/drivers/suprgolf.c @@ -79,7 +79,7 @@ static SCREEN_UPDATE( suprgolf ) { suprgolf_state *state = screen.machine().driver_data<suprgolf_state>(); int x,y,count,color; - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); { count = 0; @@ -91,7 +91,7 @@ static SCREEN_UPDATE( suprgolf ) color = state->m_bg_fb[count]; if(x <= cliprect->max_x && y <= cliprect->max_y) - *BITMAP_ADDR16(bitmap, y, x) = screen.machine().pens[(color & 0x7ff)]; + bitmap->pix16(y, x) = screen.machine().pens[(color & 0x7ff)]; count++; } @@ -108,7 +108,7 @@ static SCREEN_UPDATE( suprgolf ) color = state->m_fg_fb[count]; if(((state->m_fg_fb[count] & 0x0f) != 0x0f) && (x <= cliprect->max_x && y <= cliprect->max_y)) - *BITMAP_ADDR16(bitmap, y, x) = screen.machine().pens[(color & 0x7ff)]; + bitmap->pix16(y, x) = screen.machine().pens[(color & 0x7ff)]; count++; } diff --git a/src/mame/drivers/taitopjc.c b/src/mame/drivers/taitopjc.c index 66165ebccd3..06543aa564d 100644 --- a/src/mame/drivers/taitopjc.c +++ b/src/mame/drivers/taitopjc.c @@ -95,7 +95,7 @@ static SCREEN_UPDATE( taitopjc ) for (y=0; y < 16; y++) { - UINT32 *fb = BITMAP_ADDR32(bitmap, y+(u*16), 0); + UINT32 *fb = &bitmap->pix32(y+(u*16)); for (x=0; x < 16; x++) { UINT8 p = s[((tile*256) + ((y*16)+x)) ^3]; diff --git a/src/mame/drivers/taitotz.c b/src/mame/drivers/taitotz.c index aa089f2c850..83a48180e0b 100644 --- a/src/mame/drivers/taitotz.c +++ b/src/mame/drivers/taitotz.c @@ -126,7 +126,7 @@ static SCREEN_UPDATE( taitotz ) for (y=0; y < FONT_HEIGHT; y++) { - UINT32 *fb = BITMAP_ADDR32(bitmap, y+(u*FONT_WIDTH), 0); + UINT32 *fb = &bitmap->pix32(y+(u*FONT_WIDTH)); for (x=0; x < FONT_WIDTH; x++) { UINT32 p = s[((tile*(FONT_WIDTH*FONT_HEIGHT*2)) + ((y*FONT_WIDTH)+x)) ^ 1]; @@ -145,7 +145,7 @@ static SCREEN_UPDATE( taitotz ) int t,u; for (u=0; u < 256; u++) { - UINT32 *fb = BITMAP_ADDR32(bitmap, u, 0); + UINT32 *fb = &bitmap->pix32(u); for (t=0; t < 512; t++) { UINT32 p = s[((u*512)+t) ^ 1]; @@ -158,7 +158,7 @@ static SCREEN_UPDATE( taitotz ) taitotz_state *state = screen.machine().driver_data<taitotz_state>(); - bitmap_fill(bitmap, cliprect, 0); + bitmap->fill(0, *cliprect); copybitmap_trans(bitmap, state->framebuffer, 0, 0, 0, 0, cliprect, 0); return 0; @@ -182,7 +182,7 @@ static void draw_tile(running_machine &machine, UINT32 pos, UINT32 tile) { int u = tileu; - UINT32 *fb = BITMAP_ADDR32(state->framebuffer, j, 0); + UINT32 *fb = &state->framebuffer->pix32(j); for (int i=tilex; i < (tilex+16); i++) { diff --git a/src/mame/drivers/taitowlf.c b/src/mame/drivers/taitowlf.c index 2c7e50455e5..b6ccf4eb148 100644 --- a/src/mame/drivers/taitowlf.c +++ b/src/mame/drivers/taitowlf.c @@ -68,7 +68,7 @@ static SCREEN_UPDATE( taitowlf ) int x,y,count; const UINT8 *blit_ram = screen.machine().region("user5")->base(); - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); count = (0); @@ -81,7 +81,7 @@ static SCREEN_UPDATE( taitowlf ) color = (blit_ram[count] & 0xff); if((x)+0<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y) - *BITMAP_ADDR32(bitmap, y, x+0) = screen.machine().pens[color]; + bitmap->pix32(y, x+0) = screen.machine().pens[color]; count++; } diff --git a/src/mame/drivers/tapatune.c b/src/mame/drivers/tapatune.c index a041a9224c2..f5081a1b7ff 100644 --- a/src/mame/drivers/tapatune.c +++ b/src/mame/drivers/tapatune.c @@ -330,7 +330,7 @@ static MC6845_BEGIN_UPDATE( begin_update ) static MC6845_UPDATE_ROW( update_row ) { tapatune_state *state = device->machine().driver_data<tapatune_state>(); - UINT32 *dest = BITMAP_ADDR32(bitmap, y, 0); + UINT32 *dest = &bitmap->pix32(y); UINT16 x; pen_t *pens = (pen_t *)param; diff --git a/src/mame/drivers/tgtpanic.c b/src/mame/drivers/tgtpanic.c index 569064f15da..cc72a109b0f 100644 --- a/src/mame/drivers/tgtpanic.c +++ b/src/mame/drivers/tgtpanic.c @@ -50,17 +50,17 @@ static SCREEN_UPDATE( tgtpanic ) x = (offs >> 7) << 2; /* I'm guessing the hardware doubles lines */ - *BITMAP_ADDR32(bitmap, y + 0, x + 0) = colors[val & 3]; - *BITMAP_ADDR32(bitmap, y + 1, x + 0) = colors[val & 3]; + bitmap->pix32(y + 0, x + 0) = colors[val & 3]; + bitmap->pix32(y + 1, x + 0) = colors[val & 3]; val >>= 2; - *BITMAP_ADDR32(bitmap, y + 0, x + 1) = colors[val & 3]; - *BITMAP_ADDR32(bitmap, y + 1, x + 1) = colors[val & 3]; + bitmap->pix32(y + 0, x + 1) = colors[val & 3]; + bitmap->pix32(y + 1, x + 1) = colors[val & 3]; val >>= 2; - *BITMAP_ADDR32(bitmap, y + 0, x + 2) = colors[val & 3]; - *BITMAP_ADDR32(bitmap, y + 1, x + 2) = colors[val & 3]; + bitmap->pix32(y + 0, x + 2) = colors[val & 3]; + bitmap->pix32(y + 1, x + 2) = colors[val & 3]; val >>= 2; - *BITMAP_ADDR32(bitmap, y + 0, x + 3) = colors[val & 3]; - *BITMAP_ADDR32(bitmap, y + 1, x + 3) = colors[val & 3]; + bitmap->pix32(y + 0, x + 3) = colors[val & 3]; + bitmap->pix32(y + 1, x + 3) = colors[val & 3]; } return 0; diff --git a/src/mame/drivers/tickee.c b/src/mame/drivers/tickee.c index 9e2feeb35ea..7ec78f507aa 100644 --- a/src/mame/drivers/tickee.c +++ b/src/mame/drivers/tickee.c @@ -145,7 +145,7 @@ static void scanline_update(screen_device &screen, bitmap_t *bitmap, int scanlin { tickee_state *state = screen.machine().driver_data<tickee_state>(); UINT16 *src = &state->m_vram[(params->rowaddr << 8) & 0x3ff00]; - UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0); + UINT32 *dest = &bitmap->pix32(scanline); const rgb_t *pens = tlc34076_get_pens(screen.machine().device("tlc34076")); int coladdr = params->coladdr << 1; int x; @@ -171,7 +171,7 @@ static void rapidfir_scanline_update(screen_device &screen, bitmap_t *bitmap, in { tickee_state *state = screen.machine().driver_data<tickee_state>(); UINT16 *src = &state->m_vram[(params->rowaddr << 8) & 0x3ff00]; - UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0); + UINT32 *dest = &bitmap->pix32(scanline); const rgb_t *pens = tlc34076_get_pens(screen.machine().device("tlc34076")); int coladdr = params->coladdr << 1; int x; diff --git a/src/mame/drivers/tmaster.c b/src/mame/drivers/tmaster.c index ae9b2b11781..edef2648392 100644 --- a/src/mame/drivers/tmaster.c +++ b/src/mame/drivers/tmaster.c @@ -300,7 +300,7 @@ static VIDEO_START( tmaster ) for (buffer = 0; buffer < 2; buffer++) { state->m_bitmap[layer][buffer] = machine.primary_screen->alloc_compatible_bitmap(); - bitmap_fill(state->m_bitmap[layer][buffer], NULL, 0xff); + state->m_bitmap[layer][buffer]->fill(0xff); } } @@ -330,7 +330,7 @@ static SCREEN_UPDATE( tmaster ) #endif - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); if (layers_ctrl & 1) copybitmap_trans(bitmap, state->m_bitmap[0][(state->m_regs[0x02/2]>>8)&1], 0,0,0,0, cliprect, 0xff); if (layers_ctrl & 2) copybitmap_trans(bitmap, state->m_bitmap[1][(state->m_regs[0x02/2]>>9)&1], 0,0,0,0, cliprect, 0xff); @@ -425,7 +425,7 @@ static void tmaster_draw(running_machine &machine) pen = dst_pen; if ((pen != 0xff) && (sx + x >= 0) && (sx + x < 400) && (sy + y >= 0) && (sy + y < 256)) - *BITMAP_ADDR16(bitmap, sy + y, sx + x) = pen + color; + bitmap->pix16(sy + y, sx + x) = pen + color; } } } @@ -440,7 +440,7 @@ static void tmaster_draw(running_machine &machine) pen = gfxdata[addr++]; if ((pen != 0xff) && (sx + x >= 0) && (sx + x < 400) && (sy + y >= 0) && (sy + y < 256)) - *BITMAP_ADDR16(bitmap, sy + y, sx + x) = pen + color; + bitmap->pix16(sy + y, sx + x) = pen + color; } } } @@ -457,7 +457,7 @@ static void tmaster_draw(running_machine &machine) for (x = x0; x != x1; x += dx) { if ((sx + x >= 0) && (sx + x < 400) && (sy + y >= 0) && (sy + y < 256)) - *BITMAP_ADDR16(bitmap, sy + y, sx + x) = pen; + bitmap->pix16(sy + y, sx + x) = pen; } } break; diff --git a/src/mame/drivers/tmmjprd.c b/src/mame/drivers/tmmjprd.c index 46fd5fe9908..8a4a3561956 100644 --- a/src/mame/drivers/tmmjprd.c +++ b/src/mame/drivers/tmmjprd.c @@ -198,7 +198,7 @@ static void ttmjprd_draw_tile(running_machine &machine, bitmap_t *bitmap, const if (dat!=15) { //dat += (colour<<8); - dst = BITMAP_ADDR16(bitmap, drawy, drawx); + dst = &bitmap->pix16(drawy, drawx); dst[0] = dat; } } @@ -209,7 +209,7 @@ static void ttmjprd_draw_tile(running_machine &machine, bitmap_t *bitmap, const if (dat!=15) { //dat += (colour<<8); - dst = BITMAP_ADDR16(bitmap, drawy, drawx); + dst = &bitmap->pix16(drawy, drawx); dst[0] = dat; } } @@ -224,7 +224,7 @@ static void ttmjprd_draw_tile(running_machine &machine, bitmap_t *bitmap, const if (dat!=255) { dat += (colour<<8) & 0xf00; - dst = BITMAP_ADDR16(bitmap, drawy, drawx); + dst = &bitmap->pix16(drawy, drawx); dst[0] = dat; } } @@ -280,7 +280,7 @@ static SCREEN_UPDATE( tmmjprd_left ) tmmjprd_state *state = screen.machine().driver_data<tmmjprd_state>(); UINT8* gfxroms = screen.machine().region("gfx2")->base(); - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); ttmjprd_draw_tilemap( screen.machine(), bitmap, cliprect, state->m_tilemap_ram[3], state->m_tilemap_regs[3], gfxroms ); draw_sprites(screen.machine(),bitmap,cliprect, 1); @@ -315,7 +315,7 @@ static SCREEN_UPDATE( tmmjprd_right ) tmmjprd_state *state = screen.machine().driver_data<tmmjprd_state>(); UINT8* gfxroms = screen.machine().region("gfx2")->base(); - bitmap_fill(bitmap,cliprect,get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); ttmjprd_draw_tilemap( screen.machine(), bitmap, cliprect, state->m_tilemap_ram[1], state->m_tilemap_regs[1], gfxroms ); draw_sprites(screen.machine(),bitmap,cliprect, 0); diff --git a/src/mame/drivers/tonton.c b/src/mame/drivers/tonton.c index 32d9ff060cb..7bbe8a391b8 100644 --- a/src/mame/drivers/tonton.c +++ b/src/mame/drivers/tonton.c @@ -71,7 +71,7 @@ static VIDEO_START( tonton ) static SCREEN_UPDATE( tonton ) { tonton_state *state = screen.machine().driver_data<tonton_state>(); - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); copybitmap(bitmap, state->m_vdp0_bitmap, 0, 0, 0, 0, cliprect); diff --git a/src/mame/drivers/toratora.c b/src/mame/drivers/toratora.c index 03dfe611525..3e60a6110a2 100644 --- a/src/mame/drivers/toratora.c +++ b/src/mame/drivers/toratora.c @@ -81,7 +81,7 @@ static SCREEN_UPDATE( toratora ) for (i = 0; i < 8; i++) { pen_t pen = (data & 0x80) ? RGB_WHITE : RGB_BLACK; - *BITMAP_ADDR32(bitmap, y, x) = pen; + bitmap->pix32(y, x) = pen; data = data << 1; x = x + 1; diff --git a/src/mame/drivers/trvmadns.c b/src/mame/drivers/trvmadns.c index 311ac21483f..81bc9578be3 100644 --- a/src/mame/drivers/trvmadns.c +++ b/src/mame/drivers/trvmadns.c @@ -291,7 +291,7 @@ static SCREEN_UPDATE( trvmadns ) int x,y,count; const gfx_element *gfx = screen.machine().gfx[0]; - bitmap_fill(bitmap,cliprect,0xd); + bitmap->fill(0xd, *cliprect); count = 0; diff --git a/src/mame/drivers/ttchamp.c b/src/mame/drivers/ttchamp.c index ea6084b1772..978e5857857 100644 --- a/src/mame/drivers/ttchamp.c +++ b/src/mame/drivers/ttchamp.c @@ -67,7 +67,7 @@ static SCREEN_UPDATE(ttchamp) // int i; static const int xxx=320,yyy=204; - bitmap_fill(bitmap, 0, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine())); // for (i=0;i<256;i++) // { @@ -85,7 +85,7 @@ static SCREEN_UPDATE(ttchamp) { for(x=0;x<xxx;x++) { - /*if(hotblock_port0&0x40)*/*BITMAP_ADDR16(bitmap, y, x) = ((UINT8 *)state->m_peno_vram)[BYTE_XOR_LE(count)]+0x300; + /*if(hotblock_port0&0x40)*/bitmap->pix16(y, x) = ((UINT8 *)state->m_peno_vram)[BYTE_XOR_LE(count)]+0x300; count++; } } diff --git a/src/mame/drivers/twins.c b/src/mame/drivers/twins.c index f2ba4adc95a..a79fc2226e2 100644 --- a/src/mame/drivers/twins.c +++ b/src/mame/drivers/twins.c @@ -117,7 +117,7 @@ static SCREEN_UPDATE(twins) int i; static const int xxx=320,yyy=204; - bitmap_fill(bitmap, 0, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine())); for (i=0;i<0x100;i++) { @@ -141,7 +141,7 @@ static SCREEN_UPDATE(twins) { for(x=0;x<xxx;x++) { - *BITMAP_ADDR16(bitmap, y, x) = ((UINT8 *)state->m_videoram)[BYTE_XOR_LE(count)]; + bitmap->pix16(y, x) = ((UINT8 *)state->m_videoram)[BYTE_XOR_LE(count)]; count++; } } @@ -224,7 +224,7 @@ static SCREEN_UPDATE(twinsa) int i; static const int xxx=320,yyy=204; - bitmap_fill(bitmap, 0, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine())); for (i=0;i<0x1000-3;i+=3) { @@ -241,7 +241,7 @@ static SCREEN_UPDATE(twinsa) { for(x=0;x<xxx;x++) { - *BITMAP_ADDR16(bitmap, y, x) = ((UINT8 *)state->m_videoram)[BYTE_XOR_LE(count)]; + bitmap->pix16(y, x) = ((UINT8 *)state->m_videoram)[BYTE_XOR_LE(count)]; count++; } } diff --git a/src/mame/drivers/ultrsprt.c b/src/mame/drivers/ultrsprt.c index 2d0e09c1993..400eb9216f1 100644 --- a/src/mame/drivers/ultrsprt.c +++ b/src/mame/drivers/ultrsprt.c @@ -39,7 +39,7 @@ static SCREEN_UPDATE( ultrsprt ) for (j=0; j < 400; j++) { - UINT16 *dest = BITMAP_ADDR16(bitmap, j, 0); + UINT16 *dest = &bitmap->pix16(j); int fb_index = j * 1024; for (i=0; i < 512; i++) diff --git a/src/mame/drivers/umipoker.c b/src/mame/drivers/umipoker.c index dcbd4079721..286893222c2 100644 --- a/src/mame/drivers/umipoker.c +++ b/src/mame/drivers/umipoker.c @@ -117,7 +117,7 @@ static SCREEN_UPDATE( umipoker ) tilemap_set_scrolly(state->m_tilemap_2, 0, state->m_umipoker_scrolly[2]); tilemap_set_scrolly(state->m_tilemap_3, 0, state->m_umipoker_scrolly[3]); - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); tilemap_draw(bitmap,cliprect,state->m_tilemap_0,0,0); tilemap_draw(bitmap,cliprect,state->m_tilemap_1,0,0); diff --git a/src/mame/drivers/vamphalf.c b/src/mame/drivers/vamphalf.c index dc9308740d7..bae36f79657 100644 --- a/src/mame/drivers/vamphalf.c +++ b/src/mame/drivers/vamphalf.c @@ -531,14 +531,14 @@ static void draw_sprites_aoh(screen_device &screen, bitmap_t *bitmap) static SCREEN_UPDATE( common ) { - bitmap_fill(bitmap,cliprect,0); + bitmap->fill(0, *cliprect); draw_sprites(screen, bitmap); return 0; } static SCREEN_UPDATE( aoh ) { - bitmap_fill(bitmap,cliprect,0); + bitmap->fill(0, *cliprect); draw_sprites_aoh(screen, bitmap); return 0; } diff --git a/src/mame/drivers/vcombat.c b/src/mame/drivers/vcombat.c index 92c95028a6a..82fcef7e83a 100644 --- a/src/mame/drivers/vcombat.c +++ b/src/mame/drivers/vcombat.c @@ -124,7 +124,7 @@ static UINT32 update_screen(screen_device &screen, bitmap_t *bitmap, const recta int src_addr = 256/2 * y; const UINT16 *m68k_src = &m68k_buf[src_addr]; const UINT16 *i860_src = &i860_buf[src_addr]; - UINT32 *dst = BITMAP_ADDR32(bitmap, y, cliprect->min_x); + UINT32 *dst = &bitmap->pix32(y, cliprect->min_x); for (x = cliprect->min_x; x <= cliprect->max_x; x += 2) { diff --git a/src/mame/drivers/vegaeo.c b/src/mame/drivers/vegaeo.c index 6860119539f..09beaac590a 100644 --- a/src/mame/drivers/vegaeo.c +++ b/src/mame/drivers/vegaeo.c @@ -158,16 +158,16 @@ static SCREEN_UPDATE( vega ) for (x=0;x < 320/4;x++) { color = state->m_vega_vram[count + (0x14000/4) * (state->m_vega_vbuffer ^ 1)] & 0xff; - *BITMAP_ADDR16(bitmap, y, x*4 + 3) = color; + bitmap->pix16(y, x*4 + 3) = color; color = (state->m_vega_vram[count + (0x14000/4) * (state->m_vega_vbuffer ^ 1)] & 0xff00) >> 8; - *BITMAP_ADDR16(bitmap, y, x*4 + 2) = color; + bitmap->pix16(y, x*4 + 2) = color; color = (state->m_vega_vram[count + (0x14000/4) * (state->m_vega_vbuffer ^ 1)] & 0xff0000) >> 16; - *BITMAP_ADDR16(bitmap, y, x*4 + 1) = color; + bitmap->pix16(y, x*4 + 1) = color; color = (state->m_vega_vram[count + (0x14000/4) * (state->m_vega_vbuffer ^ 1)] & 0xff000000) >> 24; - *BITMAP_ADDR16(bitmap, y, x*4 + 0) = color; + bitmap->pix16(y, x*4 + 0) = color; count++; } diff --git a/src/mame/drivers/vmetal.c b/src/mame/drivers/vmetal.c index a1448ee26f8..d704ac95263 100644 --- a/src/mame/drivers/vmetal.c +++ b/src/mame/drivers/vmetal.c @@ -420,8 +420,8 @@ static SCREEN_UPDATE(varia) { vmetal_state *state = screen.machine().driver_data<vmetal_state>(); - bitmap_fill(bitmap, cliprect, get_black_pen(screen.machine())); - bitmap_fill(screen.machine().priority_bitmap, cliprect, 0); + bitmap->fill(get_black_pen(screen.machine()), *cliprect); + screen.machine().priority_bitmap->fill(0, *cliprect); tilemap_set_scrollx(state->m_mid2tilemap, 0, state->m_vmetal_videoregs[0x06a/2]-64 /*+ state->m_vmetal_videoregs[0x066/2]*/); tilemap_set_scrollx(state->m_mid1tilemap, 0, state->m_vmetal_videoregs[0x07a/2]-64 /*+ state->m_vmetal_videoregs[0x076/2]*/); diff --git a/src/mame/drivers/warpsped.c b/src/mame/drivers/warpsped.c index 54eb1c87b9d..ef59d01732d 100644 --- a/src/mame/drivers/warpsped.c +++ b/src/mame/drivers/warpsped.c @@ -142,17 +142,17 @@ static VIDEO_START( warpspeed ) static void draw_circle_line(bitmap_t *bitmap, int x, int y, int l, int color) { - if (y >= 0 && y <= bitmap->height - 1) + if (y >= 0 && y <= bitmap->height() - 1) { - UINT16* pLine = BITMAP_ADDR16(bitmap, y, 0); + UINT16* pLine = &bitmap->pix16(y); int h1 = x - l; int h2 = x + l; if (h1 < 0) h1 = 0; - if (h2 > bitmap->width - 1) - h2 = bitmap->width - 1; + if (h2 > bitmap->width() - 1) + h2 = bitmap->width() - 1; for (x = h1; x <= h2; x++) pLine[x] = color; diff --git a/src/mame/drivers/wheelfir.c b/src/mame/drivers/wheelfir.c index bf35544bdac..81ee365035a 100644 --- a/src/mame/drivers/wheelfir.c +++ b/src/mame/drivers/wheelfir.c @@ -321,7 +321,7 @@ static WRITE16_HANDLER(wheelfir_blit_w) if(x<512 && y <512) { - *BITMAP_ADDR16(state->m_tmp_bitmap[LAYER_BG], y, x) = sixdat; + state->m_tmp_bitmap[LAYER_BG]->pix16(y, x) = sixdat; } } @@ -539,7 +539,7 @@ static WRITE16_HANDLER(wheelfir_blit_w) //hack for clear if(screen_x >0 && screen_y >0 && screen_x < width && screen_y <height) { - // *BITMAP_ADDR16(state->m_tmp_bitmap[vpage], screen_y , screen_x ) =0; + // state->m_tmp_bitmap[vpage]->pix16(screen_y , screen_x ) =0; } } else @@ -548,7 +548,7 @@ static WRITE16_HANDLER(wheelfir_blit_w) if(pix && screen_x >0 && screen_y >0 && screen_x < width && screen_y <height) { - *BITMAP_ADDR16(state->m_tmp_bitmap[vpage], screen_y , screen_x ) = pix; + state->m_tmp_bitmap[vpage]->pix16(screen_y , screen_x ) = pix; } } } @@ -568,12 +568,12 @@ static SCREEN_UPDATE(wheelfir) { wheelfir_state *state = screen.machine().driver_data<wheelfir_state>(); - bitmap_fill(bitmap, cliprect,0); + bitmap->fill(0, *cliprect); for(int y=0;y<NUM_SCANLINES;++y) { - UINT16 *source = BITMAP_ADDR16(state->m_tmp_bitmap[LAYER_BG],( (state->m_scanlines[y].y)&511), 0); - UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0); + UINT16 *source = &state->m_tmp_bitmap[LAYER_BG]->pix16(( (state->m_scanlines[y].y)&511)); + UINT16 *dest = &bitmap->pix16(y); for (int x=0;x<336;x++) { @@ -587,7 +587,7 @@ static SCREEN_UPDATE(wheelfir) /* { - bitmap_fill(state->m_tmp_bitmap[LAYER_BG], &screen.visible_area(),0); + state->m_tmp_bitmap[LAYER_BG]->fill(0, screen.visible_area()); } */ @@ -598,7 +598,7 @@ static SCREEN_UPDATE(wheelfir) static SCREEN_EOF( wheelfir ) { wheelfir_state *state = screen.machine().driver_data<wheelfir_state>(); - bitmap_fill(state->m_tmp_bitmap[LAYER_FG], &screen.visible_area(),0); + state->m_tmp_bitmap[LAYER_FG]->fill(0, screen.visible_area()); } diff --git a/src/mame/drivers/whitestar.c b/src/mame/drivers/whitestar.c index a014c825403..24f2e453047 100644 --- a/src/mame/drivers/whitestar.c +++ b/src/mame/drivers/whitestar.c @@ -210,8 +210,8 @@ void dmd_put_pixel(bitmap_t *bitmap, int x, int y, int color) // iterate over y for (UINT32 y = 0; y <= width; y++) { - UINT16 *d0 = BITMAP_ADDR16(bitmap, midy - y, 0); - UINT16 *d1 = BITMAP_ADDR16(bitmap, midy + y, 0); + UINT16 *d0 = &bitmap->pix16(midy - y); + UINT16 *d1 = &bitmap->pix16(midy + y); float xval = width * sqrt(1.0f - (float)(y * y) * ooradius2); INT32 left, right; diff --git a/src/mame/drivers/wldarrow.c b/src/mame/drivers/wldarrow.c index 14cae479875..ffc7fbadfb5 100644 --- a/src/mame/drivers/wldarrow.c +++ b/src/mame/drivers/wldarrow.c @@ -89,7 +89,7 @@ static SCREEN_UPDATE( wldarrow ) ((data_g >> 6) & 0x02) | ((data_b >> 7) & 0x01); - *BITMAP_ADDR32(bitmap, y, x) = pens[color]; + bitmap->pix32(y, x) = pens[color]; data_r = data_r << 1; data_g = data_g << 1; diff --git a/src/mame/drivers/xtheball.c b/src/mame/drivers/xtheball.c index 6487c1c70a8..2f662d58459 100644 --- a/src/mame/drivers/xtheball.c +++ b/src/mame/drivers/xtheball.c @@ -38,7 +38,7 @@ static void xtheball_scanline_update(screen_device &screen, bitmap_t *bitmap, in { xtheball_state *state = screen.machine().driver_data<xtheball_state>(); UINT16 *srcbg = &state->m_vram_bg[(params->rowaddr << 8) & 0xff00]; - UINT32 *dest = BITMAP_ADDR32(bitmap, scanline, 0); + UINT32 *dest = &bitmap->pix32(scanline); const rgb_t *pens = tlc34076_get_pens(screen.machine().device("tlc34076")); int coladdr = params->coladdr; int x; diff --git a/src/mame/drivers/zr107.c b/src/mame/drivers/zr107.c index bbb81ada41a..7d477871909 100644 --- a/src/mame/drivers/zr107.c +++ b/src/mame/drivers/zr107.c @@ -207,7 +207,7 @@ static SCREEN_UPDATE( jetwave ) zr107_state *state = screen.machine().driver_data<zr107_state>(); device_t *k001604 = screen.machine().device("k001604"); - bitmap_fill(bitmap, cliprect, screen.machine().pens[0]); + bitmap->fill(screen.machine().pens[0], *cliprect); K001005_draw(bitmap, cliprect); @@ -259,7 +259,7 @@ static SCREEN_UPDATE( zr107 ) { zr107_state *state = screen.machine().driver_data<zr107_state>(); device_t *k056832 = screen.machine().device("k056832"); - bitmap_fill(bitmap, cliprect, screen.machine().pens[0]); + bitmap->fill(screen.machine().pens[0], *cliprect); k056832_tilemap_draw(k056832, bitmap, cliprect, 1, 0, 0); K001005_draw(bitmap, cliprect); |