diff options
author | 2009-06-25 07:56:56 +0000 | |
---|---|---|
committer | 2009-06-25 07:56:56 +0000 | |
commit | f7ce2a786aaa4ac5e9f82daa4b78ee89ca5ef46c (patch) | |
tree | 6f905823e1dff4d781e7f9d95130e42a11d38ee2 | |
parent | 51d2e24a300e89a001709a52da3857c8b2a7b647 (diff) |
From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Sunday, June 21, 2009 6:15 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: Re: [patch] Convert most legacy drawgfx apis to new apis
On Sun, 21 Jun 2009 18:12:39 -0700, you wrote:
Woops, hit send before I attaches the patches.
>Hi mamedev,
>
>The following set of patches migrates much of MAME from the legacy
>drawgfx apis to the new drawgfx apis introduced in January.
>
>0. This removes the machine parameter from some custom drawgfx
>routines to align them better with the current idiom.
>1. This changes some custom drawgfx routines to follow the (bitmap,
>cliprect, gfx, ...) convention of the new drawgfx apis and adjusts a
>few apis to use an explicit transparency constant.
>2. This patch is entirely mechanical (generated by gfx07.pl) and
>converts legacys apis to the new apis.
>3. This patch fixes a few cases where the last patch mangled the
>code.
>
>This leaves about twenty uses of the legacy drawgfx apis in MAME. I'll
>likely try to modify most of these before moving the legacy apis to
>deprecat.h
>
>~aa
527 files changed, 2333 insertions, 3101 deletions
diff --git a/src/mame/drivers/1945kiii.c b/src/mame/drivers/1945kiii.c index 5fdd706e521..99c6a103b76 100644 --- a/src/mame/drivers/1945kiii.c +++ b/src/mame/drivers/1945kiii.c @@ -97,10 +97,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta ypos = (source[0] & 0x00ff) >> 0; tileno = (source2[0] & 0x7ffe) >> 1; xpos |= (source2[0] & 0x0001) << 8; - drawgfx(bitmap,gfx, tileno,1,0,0,xpos,ypos,cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,gfx, tileno,1,0,0,xpos,ypos-0x100,cliprect,TRANSPARENCY_PEN,0); // wrap - drawgfx(bitmap,gfx, tileno,1,0,0,xpos-0x200,ypos,cliprect,TRANSPARENCY_PEN,0); // wrap - drawgfx(bitmap,gfx, tileno,1,0,0,xpos-0x200,ypos-0x100,cliprect,TRANSPARENCY_PEN,0); // wrap + drawgfx_transpen(bitmap,cliprect,gfx, tileno,1,0,0,xpos,ypos,0); + drawgfx_transpen(bitmap,cliprect,gfx, tileno,1,0,0,xpos,ypos-0x100,0); // wrap + drawgfx_transpen(bitmap,cliprect,gfx, tileno,1,0,0,xpos-0x200,ypos,0); // wrap + drawgfx_transpen(bitmap,cliprect,gfx, tileno,1,0,0,xpos-0x200,ypos-0x100,0); // wrap source++;source2++; } diff --git a/src/mame/drivers/2mindril.c b/src/mame/drivers/2mindril.c index b74b05efdb4..c38d4a45a40 100644 --- a/src/mame/drivers/2mindril.c +++ b/src/mame/drivers/2mindril.c @@ -71,11 +71,11 @@ static UINT16 *textram; { \ UINT16 data0=map[y*128+x*2]; \ UINT16 data1=map[y*128+x*2+1]; \ - drawgfx(bitmap,screen->machine->gfx[0], data1, \ + drawgfx_transpen(bitmap,\ + cliprect,screen->machine->gfx[0], data1, \ data0&0xff, \ data0&0x4000, data0&0x8000, \ - x*16-512/*+(((INT16)(unkram[0x60000/2+num]))/32)*/, y*16/*+(((INT16)(unkram[0x60008/2+num]))/32)*/, \ - cliprect,TRANSPARENCY_PEN,0); \ + x*16-512/*+(((INT16)(unkram[0x60000/2+num]))/32)*/, y*16/*+(((INT16)(unkram[0x60008/2+num]))/32)*/,0); \ } \ } @@ -94,14 +94,13 @@ static VIDEO_UPDATE( drill ) for(y=0;y<64;y++) for(x=0;x<64;x++) { - drawgfx( bitmap, + drawgfx_transpen( bitmap, + cliprect, screen->machine->gfx[1], textram[y*64+x]&0xff, //1ff ?? ((textram[y*64+x]>>9)&0xf), 0, 0, - x*8,y*8, - cliprect, - TRANSPARENCY_PEN,0); + x*8,y*8,0); } } //printf("%.4X %.4X %.4X %.4X %.4X %.4X\n", unkram[0x60000/2],unkram[0x60000/2+1],unkram[0x60000/2+2],unkram[0x60000/2+3],unkram[0x60000/2+4],unkram[0x60000/2+5]); diff --git a/src/mame/drivers/86lions.c b/src/mame/drivers/86lions.c index c2f1450bcd1..638e68d0bc8 100644 --- a/src/mame/drivers/86lions.c +++ b/src/mame/drivers/86lions.c @@ -53,7 +53,7 @@ static VIDEO_UPDATE(lions) int tile = lions_vram[count+1]|lions_vram[count]<<8; tile&=0x1ff; //int colour = tile>>12; - drawgfx(bitmap,gfx,tile,0,0,0,x*8,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,gfx,tile,0,0,0,x*8,y*8); count+=2; } diff --git a/src/mame/drivers/ace.c b/src/mame/drivers/ace.c index d5be913e772..5cba35b6d30 100644 --- a/src/mame/drivers/ace.c +++ b/src/mame/drivers/ace.c @@ -77,35 +77,32 @@ static VIDEO_UPDATE( ace ) bitmap_fill(bitmap, cliprect, 0); - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[1], 0, 0, 0,0, - objpos[0],objpos[1], - cliprect,TRANSPARENCY_NONE,0); + objpos[0],objpos[1]); - drawgfx(bitmap,screen->machine->gfx[2], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[2], 0, 0, 0,0, - objpos[2],objpos[3], - cliprect,TRANSPARENCY_NONE,0); + objpos[2],objpos[3]); - drawgfx(bitmap,screen->machine->gfx[3], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[3], 0, 0, 0,0, - objpos[4],objpos[5], - cliprect,TRANSPARENCY_NONE,0); + objpos[4],objpos[5]); for (offs = 0; offs < 8; offs++) { - drawgfx(bitmap,screen->machine->gfx[4], + drawgfx_opaque(bitmap,/* ?? */ + cliprect,screen->machine->gfx[4], offs, 0, 0,0, - 10*8+offs*16,256-16, /* ?? */ - cliprect,TRANSPARENCY_NONE,0); + 10*8+offs*16,256-16); } return 0; } diff --git a/src/mame/drivers/acefruit.c b/src/mame/drivers/acefruit.c index f7e01ba9ccf..d0a74601713 100644 --- a/src/mame/drivers/acefruit.c +++ b/src/mame/drivers/acefruit.c @@ -78,7 +78,7 @@ static VIDEO_UPDATE( acefruit ) if( color < 0x4 ) { - drawgfx( bitmap, screen->machine->gfx[ 1 ], code, color, 0, 0, col * 16, row * 8, cliprect, TRANSPARENCY_NONE, 0 ); + drawgfx_opaque( bitmap, cliprect, screen->machine->gfx[ 1 ], code, color, 0, 0, col * 16, row * 8 ); } else if( color >= 0x5 && color <= 0x7 ) { diff --git a/src/mame/drivers/acommand.c b/src/mame/drivers/acommand.c index 3927e278fd3..70bdb7a14bb 100644 --- a/src/mame/drivers/acommand.c +++ b/src/mame/drivers/acommand.c @@ -130,12 +130,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta xx = w; do { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code, color, flipx, flipy, - ((x + 16) & 0x1ff) - 16,sy & 0x1ff, - cliprect,TRANSPARENCY_PEN,15); + ((x + 16) & 0x1ff) - 16,sy & 0x1ff,15); code++; x += delta; diff --git a/src/mame/drivers/albazc.c b/src/mame/drivers/albazc.c index 0285d43e441..4549c4dd0bf 100644 --- a/src/mame/drivers/albazc.c +++ b/src/mame/drivers/albazc.c @@ -61,8 +61,8 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[0], code, color, flipx, flipy, - sx, sy, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[0], code, color, flipx, flipy, + sx, sy, 0); } } diff --git a/src/mame/drivers/aristmk4.c b/src/mame/drivers/aristmk4.c index 0857dfc7d48..17ce8cb05c4 100644 --- a/src/mame/drivers/aristmk4.c +++ b/src/mame/drivers/aristmk4.c @@ -60,7 +60,7 @@ static VIDEO_UPDATE(aristmk4) int flipx = ((mkiv_vram[count]) & 0x04); // 0x0800 probably flipy - drawgfx(bitmap,gfx,tile,color,flipx,0,x*8,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,gfx,tile,color,flipx,0,x*8,y*8); count+=2; } } diff --git a/src/mame/drivers/astrocorp.c b/src/mame/drivers/astrocorp.c index f4dc0759ecf..fc31a5b03c6 100644 --- a/src/mame/drivers/astrocorp.c +++ b/src/mame/drivers/astrocorp.c @@ -64,11 +64,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan { for (x = 0 ; x < dimx ; x++) { - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect, machine->gfx[0], code++, 0, 0, 0, - sx + x * 16, sy + y * 16, - cliprect, TRANSPARENCY_PEN, 0xff); + sx + x * 16, sy + y * 16, 0xff); } } } diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c index d8f08a7063c..5374598ae07 100644 --- a/src/mame/drivers/backfire.c +++ b/src/mame/drivers/backfire.c @@ -153,12 +153,12 @@ static void draw_sprites(running_machine *machine,bitmap_t *bitmap,const rectang while (multi >= 0) { - pdrawgfx(bitmap,machine->gfx[region], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[region], sprite - multi * inc, colour, fx,fy, x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0,pri); + priority_bitmap,pri,0); multi--; } diff --git a/src/mame/drivers/bestleag.c b/src/mame/drivers/bestleag.c index 5eed28d40b7..4cd9aa2cedb 100644 --- a/src/mame/drivers/bestleag.c +++ b/src/mame/drivers/bestleag.c @@ -114,34 +114,30 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if(bestleag_vregs[0x00/2] & 0x1000) color &= 7; - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code, color, flipx, 0, - flipx ? (sx+16) : (sx),sy, - cliprect,TRANSPARENCY_PEN,15); + flipx ? (sx+16) : (sx),sy,15); - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code+1, color, flipx, 0, - flipx ? (sx) : (sx+16),sy, - cliprect,TRANSPARENCY_PEN,15); + flipx ? (sx) : (sx+16),sy,15); /* wraparound x */ - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code, color, flipx, 0, - flipx ? (sx+16 - 512) : (sx - 512),sy, - cliprect,TRANSPARENCY_PEN,15); + flipx ? (sx+16 - 512) : (sx - 512),sy,15); - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code+1, color, flipx, 0, - flipx ? (sx - 512) : (sx+16 - 512),sy, - cliprect,TRANSPARENCY_PEN,15); + flipx ? (sx - 512) : (sx+16 - 512),sy,15); } } diff --git a/src/mame/drivers/bigfghtr.c b/src/mame/drivers/bigfghtr.c index d53978a603e..fbfe831dc86 100644 --- a/src/mame/drivers/bigfghtr.c +++ b/src/mame/drivers/bigfghtr.c @@ -230,12 +230,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (((buffered_spriteram16[offs+0] & 0x3000) >> 12) == priority) { - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code & 0xfff, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); } } } diff --git a/src/mame/drivers/blackt96.c b/src/mame/drivers/blackt96.c index e3f25161a7a..b9b311b949f 100644 --- a/src/mame/drivers/blackt96.c +++ b/src/mame/drivers/blackt96.c @@ -72,7 +72,7 @@ static VIDEO_UPDATE( blackt96 ) for (y=0;y<32;y++) { UINT16 tile = (blackt96_tilemapram2[count*2 + (0x2000/2)+1]); - drawgfx(bitmap,gfxbg,tile,6,0,0,x*16,y*16,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,gfxbg,tile,6,0,0,x*16,y*16); count++; } } @@ -88,7 +88,7 @@ static VIDEO_UPDATE( blackt96 ) UINT16 flipx = (blackt96_tilemapram2[count*2 + (base/2)+1]&0x4000); UINT16 colour = (blackt96_tilemapram2[count*2 + (base/2)]&0x000f)+0x10; - drawgfx(bitmap,gfxspr,tile,colour,flipx,0,x*16,y*16,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfxspr,tile,colour,flipx,0,x*16,y*16,0); count++; } } @@ -102,7 +102,7 @@ static VIDEO_UPDATE( blackt96 ) UINT16 flipx = (blackt96_tilemapram2[count*2 + (base/2)+1]&0x4000); UINT16 colour = (blackt96_tilemapram2[count*2 + (base/2)]&0x000f)+0x10; - drawgfx(bitmap,gfxspr,tile,colour,flipx,0,x*16,y*16,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfxspr,tile,colour,flipx,0,x*16,y*16,0); count++; } } @@ -116,7 +116,7 @@ static VIDEO_UPDATE( blackt96 ) UINT16 flipx = (blackt96_tilemapram2[count*2 + (base/2)+1]&0x4000); UINT16 colour = (blackt96_tilemapram2[count*2 + (base/2)]&0x000f)+0x10; - drawgfx(bitmap,gfxspr,tile,colour,flipx,0,x*16,y*16,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfxspr,tile,colour,flipx,0,x*16,y*16,0); count++; } } @@ -130,7 +130,7 @@ static VIDEO_UPDATE( blackt96 ) UINT16 flipx = (blackt96_tilemapram2[count*2 + (base/2)+1]&0x4000); UINT16 colour = (blackt96_tilemapram2[count*2 + (base/2)]&0x000f)+0x10; - drawgfx(bitmap,gfxspr,tile,colour,flipx,0,x*16,y*16,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfxspr,tile,colour,flipx,0,x*16,y*16,0); count++; } } @@ -143,7 +143,7 @@ static VIDEO_UPDATE( blackt96 ) UINT16 flipx = (blackt96_tilemapram2[count*2 + (base/2)+1]&0x4000); UINT16 colour = (blackt96_tilemapram2[count*2 + (base/2)]&0x000f)+0x10; - drawgfx(bitmap,gfxspr,tile,colour,flipx,0,x*16,y*16,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfxspr,tile,colour,flipx,0,x*16,y*16,0); count++; } } @@ -156,7 +156,7 @@ static VIDEO_UPDATE( blackt96 ) UINT16 flipx = (blackt96_tilemapram2[count*2 + (base/2)+1]&0x4000); UINT16 colour = (blackt96_tilemapram2[count*2 + (base/2)]&0x000f)+0x10; - drawgfx(bitmap,gfxspr,tile,colour,flipx,0,x*16,y*16,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfxspr,tile,colour,flipx,0,x*16,y*16,0); count++; } } @@ -168,7 +168,7 @@ static VIDEO_UPDATE( blackt96 ) for (y=0;y<32;y++) { UINT16 tile = (blackt96_tilemapram[count*2]&0x7ff)+0x800; // +0xc00 for korean text - drawgfx(bitmap,gfx,tile,0,0,0,x*8,y*8,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,tile,0,0,0,x*8,y*8,0); count++; } diff --git a/src/mame/drivers/bnstars.c b/src/mame/drivers/bnstars.c index f694549cb95..890b87aa1be 100644 --- a/src/mame/drivers/bnstars.c +++ b/src/mame/drivers/bnstars.c @@ -368,7 +368,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int tx, ty, sx, sy, flipx, flipy; int xsize, ysize, xzoom, yzoom; - int code, attr, color, size, pri, pri_mask, trans; + int code, attr, color, size, pri, pri_mask; gfx_element *gfx = machine->gfx[region]; UINT32 *source = sprram_top; @@ -422,7 +422,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta yzoom = 0x1000000/yzoom; xzoom = 0x1000000/xzoom; - trans = TRANSPARENCY_PEN; // there are surely also shadows (see gametngk) but how they're enabled we don't know + //trans = TRANSPARENCY_PEN; // there are surely also shadows (see gametngk) but how they're enabled we don't know if (flipscreen) { @@ -443,13 +443,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta pri_mask = 0xfe; gfx_element_set_source_clip(gfx, tx, xsize, ty, ysize); - pdrawgfxzoom(bitmap, gfx, + pdrawgfxzoom_transpen(bitmap, cliprect, gfx, code, color, flipx, flipy, sx,sy, - cliprect, trans, 0, - xzoom, yzoom, pri_mask); + xzoom, yzoom, priority_bitmap,pri_mask, 0); } /* end sprite loop */ } diff --git a/src/mame/drivers/buster.c b/src/mame/drivers/buster.c index c2d16bf9c32..b131eca3f18 100644 --- a/src/mame/drivers/buster.c +++ b/src/mame/drivers/buster.c @@ -32,7 +32,7 @@ static VIDEO_UPDATE(buster) { int tile = (buster_vram[count+1])|(buster_vram[count]<<8); //int colour = tile>>12; - drawgfx(bitmap,gfx,tile,0,0,0,x*8,y*4,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,gfx,tile,0,0,0,x*8,y*4); count+=2; } diff --git a/src/mame/drivers/calorie.c b/src/mame/drivers/calorie.c index 229076fcc37..ea5eb694cce 100644 --- a/src/mame/drivers/calorie.c +++ b/src/mame/drivers/calorie.c @@ -157,12 +157,12 @@ static VIDEO_UPDATE( calorie ) if( calorie_sprites[x+1] & 0x10 ) { /* 32x32 sprites */ - drawgfx(bitmap,screen->machine->gfx[3],tileno | 0x40,color,flipx,flipy,xpos,ypos - 31,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[3],tileno | 0x40,color,flipx,flipy,xpos,ypos - 31,0); } else { /* 16x16 sprites */ - drawgfx(bitmap,screen->machine->gfx[2],tileno,color,flipx,flipy,xpos,ypos - 15,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[2],tileno,color,flipx,flipy,xpos,ypos - 15,0); } } return 0; diff --git a/src/mame/drivers/carrera.c b/src/mame/drivers/carrera.c index 8fc492c5a46..916be791cc7 100644 --- a/src/mame/drivers/carrera.c +++ b/src/mame/drivers/carrera.c @@ -248,7 +248,7 @@ static VIDEO_UPDATE(carrera) { int tile = carrera_tileram[count&0x7ff] | carrera_tileram[(count&0x7ff)+0x800]<<8; - drawgfx(bitmap,screen->machine->gfx[0],tile,0,0,0,x*8,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0],tile,0,0,0,x*8,y*8); count++; } } diff --git a/src/mame/drivers/cball.c b/src/mame/drivers/cball.c index 0fc1b78cdff..bf40d1cf971 100644 --- a/src/mame/drivers/cball.c +++ b/src/mame/drivers/cball.c @@ -41,13 +41,12 @@ static VIDEO_UPDATE( cball ) /* draw sprite */ - drawgfx(bitmap, screen->machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], cball_video_ram[0x399] >> 4, 0, 0, 0, 240 - cball_video_ram[0x390], - 240 - cball_video_ram[0x398], - cliprect, TRANSPARENCY_PEN, 0); + 240 - cball_video_ram[0x398], 0); return 0; } diff --git a/src/mame/drivers/chanbara.c b/src/mame/drivers/chanbara.c index 514ab8ba2f1..1018045a450 100644 --- a/src/mame/drivers/chanbara.c +++ b/src/mame/drivers/chanbara.c @@ -144,18 +144,18 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if(!flipy) { - drawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, sx, sy-16,cliprect, TRANSPARENCY_PEN, 0); - drawgfx(bitmap, machine->gfx[1], code+1, color, flipx, flipy, sx, sy, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code, color, flipx, flipy, sx, sy-16, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code+1, color, flipx, flipy, sx, sy, 0); } else { - drawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, sx, sy,cliprect, TRANSPARENCY_PEN, 0); - drawgfx(bitmap, machine->gfx[1], code+1, color, flipx, flipy, sx, sy-16,cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code, color, flipx, flipy, sx, sy, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code+1, color, flipx, flipy, sx, sy-16, 0); } } else { - drawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, sx, sy,cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code, color, flipx, flipy, sx, sy, 0); } } } diff --git a/src/mame/drivers/chinsan.c b/src/mame/drivers/chinsan.c index b424d50045f..349d5348942 100644 --- a/src/mame/drivers/chinsan.c +++ b/src/mame/drivers/chinsan.c @@ -68,7 +68,7 @@ static VIDEO_UPDATE(chinsan) int tileno,colour; tileno = chinsan_video[count] | (chinsan_video[count+0x800]<<8); colour = chinsan_video[count+0x1000]>>3; - drawgfx(bitmap,screen->machine->gfx[0],tileno,colour,0,0,x*8,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0],tileno,colour,0,0,x*8,y*8); count++; } } diff --git a/src/mame/drivers/chsuper.c b/src/mame/drivers/chsuper.c index f3293caaef7..dfad69ba9ae 100644 --- a/src/mame/drivers/chsuper.c +++ b/src/mame/drivers/chsuper.c @@ -36,7 +36,7 @@ static VIDEO_UPDATE(chsuper) tile ^=chsuper_tilexor; //int colour = tile>>12; - drawgfx(bitmap,gfx,tile,0,0,0,x*4,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,gfx,tile,0,0,0,x*4,y*8); count+=2; } } diff --git a/src/mame/drivers/cntsteer.c b/src/mame/drivers/cntsteer.c index 8b9c0f0fabc..d6cb1edd741 100644 --- a/src/mame/drivers/cntsteer.c +++ b/src/mame/drivers/cntsteer.c @@ -146,17 +146,17 @@ static void zerotrgt_draw_sprites(running_machine *machine, bitmap_t *bitmap, co { if(fy) { - drawgfx(bitmap,machine->gfx[1],code,color,fx,fy,sx,sy,cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[1],code+1,color,fx,fy,sx,sy-16,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[1],code,color,fx,fy,sx,sy,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[1],code+1,color,fx,fy,sx,sy-16,0); } else { - drawgfx(bitmap,machine->gfx[1],code,color,fx,fy,sx,sy-16,cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[1],code+1,color,fx,fy,sx,sy,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[1],code,color,fx,fy,sx,sy-16,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[1],code+1,color,fx,fy,sx,sy,0); } } else - drawgfx(bitmap,machine->gfx[1],code,color,fx,fy,sx,sy,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[1],code,color,fx,fy,sx,sy,0); } } @@ -201,17 +201,17 @@ static void cntsteer_draw_sprites(running_machine *machine, bitmap_t *bitmap, co { if(fy) { - drawgfx(bitmap,machine->gfx[1],code,color,fx,fy,sx,sy,cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[1],code+1,color,fx,fy,sx,sy-16,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[1],code,color,fx,fy,sx,sy,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[1],code+1,color,fx,fy,sx,sy-16,0); } else { - drawgfx(bitmap,machine->gfx[1],code,color,fx,fy,sx,sy-16,cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[1],code+1,color,fx,fy,sx,sy,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[1],code,color,fx,fy,sx,sy-16,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[1],code+1,color,fx,fy,sx,sy,0); } } else - drawgfx(bitmap,machine->gfx[1],code,color,fx,fy,sx,sy,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[1],code,color,fx,fy,sx,sy,0); } } diff --git a/src/mame/drivers/cps3.c b/src/mame/drivers/cps3.c index ffc394f8d99..2071dfe3dcb 100644 --- a/src/mame/drivers/cps3.c +++ b/src/mame/drivers/cps3.c @@ -380,9 +380,9 @@ UINT8* cps3_user5region; #define CPS3_TRANSPARENCY_PEN_INDEX 2 #define CPS3_TRANSPARENCY_PEN_INDEX_BLEND 3 -INLINE void cps3_drawgfxzoom(running_machine *machine, bitmap_t *dest_bmp,const gfx_element *gfx, +INLINE void cps3_drawgfxzoom(bitmap_t *dest_bmp,const rectangle *clip,const gfx_element *gfx, unsigned int code,unsigned int color,int flipx,int flipy,int sx,int sy, - const rectangle *clip,int transparency,int transparent_color, + int transparency,int transparent_color, int scalex, int scaley,bitmap_t *pri_buffer,UINT32 pri_mask) { rectangle myclip; @@ -581,7 +581,7 @@ INLINE void cps3_drawgfxzoom(running_machine *machine, bitmap_t *dest_bmp,const if (c&0x02) dest[x] |= 0x4000; if (c&0x04) dest[x] |= 0x8000; if (c&0x08) dest[x] |= 0x10000; - if (c&0xf0) dest[x] |= mame_rand(machine); // ?? not used? + if (c&0xf0) dest[x] |= mame_rand(gfx->machine); // ?? not used? } else { @@ -912,7 +912,7 @@ static void cps3_draw_tilemapsprite_line(running_machine *machine, int tmnum, in if (!bpp) machine->gfx[1]->color_granularity=256; else machine->gfx[1]->color_granularity=64; - cps3_drawgfxzoom(machine, bitmap, machine->gfx[1],tileno,colour,xflip,yflip,(x*16)-scrollx%16,drawline-tilesubline,&clip,CPS3_TRANSPARENCY_PEN_INDEX,0, 0x10000, 0x10000, NULL, 0); + cps3_drawgfxzoom(bitmap,&clip,machine->gfx[1],tileno,colour,xflip,yflip,(x*16)-scrollx%16,drawline-tilesubline,CPS3_TRANSPARENCY_PEN_INDEX,0, 0x10000, 0x10000, NULL, 0); } } } @@ -1155,11 +1155,11 @@ static VIDEO_UPDATE(cps3) if (global_alpha || alpha) { - cps3_drawgfxzoom(screen->machine, renderbuffer_bitmap, screen->machine->gfx[1],realtileno,actualpal,0^flipx,0^flipy,current_xpos,current_ypos,&renderbuffer_clip,CPS3_TRANSPARENCY_PEN_INDEX_BLEND,0,xinc,yinc, NULL, 0); + cps3_drawgfxzoom(renderbuffer_bitmap,&renderbuffer_clip,screen->machine->gfx[1],realtileno,actualpal,0^flipx,0^flipy,current_xpos,current_ypos,CPS3_TRANSPARENCY_PEN_INDEX_BLEND,0,xinc,yinc, NULL, 0); } else { - cps3_drawgfxzoom(screen->machine, renderbuffer_bitmap, screen->machine->gfx[1],realtileno,actualpal,0^flipx,0^flipy,current_xpos,current_ypos,&renderbuffer_clip,CPS3_TRANSPARENCY_PEN_INDEX,0,xinc,yinc, NULL, 0); + cps3_drawgfxzoom(renderbuffer_bitmap,&renderbuffer_clip,screen->machine->gfx[1],realtileno,actualpal,0^flipx,0^flipy,current_xpos,current_ypos,CPS3_TRANSPARENCY_PEN_INDEX,0,xinc,yinc, NULL, 0); } count++; } @@ -1225,7 +1225,7 @@ static VIDEO_UPDATE(cps3) pal += cps3_ss_pal_base << 5; tile+=0x200; - cps3_drawgfxzoom(screen->machine, bitmap, screen->machine->gfx[0],tile,pal,flipx,flipy,x*8,y*8,cliprect,CPS3_TRANSPARENCY_PEN,0,0x10000,0x10000,NULL,0); + cps3_drawgfxzoom(bitmap, cliprect, screen->machine->gfx[0],tile,pal,flipx,flipy,x*8,y*8,CPS3_TRANSPARENCY_PEN,0,0x10000,0x10000,NULL,0); count++; } } diff --git a/src/mame/drivers/cshooter.c b/src/mame/drivers/cshooter.c index 74954baa485..fbf1158a8dc 100644 --- a/src/mame/drivers/cshooter.c +++ b/src/mame/drivers/cshooter.c @@ -158,33 +158,29 @@ static VIDEO_UPDATE(cshooter) { int tile=0x30+((spriteram[i]>>2)&0x1f); - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], tile, spriteram[i+1], 0, 0, - spriteram[i+3],spriteram[i+2], - cliprect,TRANSPARENCY_PEN,3); + spriteram[i+3],spriteram[i+2],3); - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], tile, spriteram[i+1], 0, 0, - spriteram[i+3]+8,spriteram[i+2], - cliprect,TRANSPARENCY_PEN,3); + spriteram[i+3]+8,spriteram[i+2],3); - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], tile, spriteram[i+1], 0, 0, - spriteram[i+3]+8,spriteram[i+2]+8, - cliprect,TRANSPARENCY_PEN,3); + spriteram[i+3]+8,spriteram[i+2]+8,3); - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], tile, spriteram[i+1], 0, 0, - spriteram[i+3],spriteram[i+2]+8, - cliprect,TRANSPARENCY_PEN,3); + spriteram[i+3],spriteram[i+2]+8,3); } } } diff --git a/src/mame/drivers/dacholer.c b/src/mame/drivers/dacholer.c index b85ac3bce33..69892ccae40 100644 --- a/src/mame/drivers/dacholer.c +++ b/src/mame/drivers/dacholer.c @@ -322,12 +322,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code, 0, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/drivers/darkhors.c b/src/mame/drivers/darkhors.c index a5545c94496..0f05d53f0ba 100644 --- a/src/mame/drivers/darkhors.c +++ b/src/mame/drivers/darkhors.c @@ -130,10 +130,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta sy = -sy; sy += 0xf8; - drawgfx( bitmap, machine->gfx[0], + drawgfx_transpen( bitmap, cliprect, machine->gfx[0], code/2, color, - flipx, flipy, sx, sy, - cliprect, TRANSPARENCY_PEN, 0); + flipx, flipy, sx, sy, 0); } } diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c index d9cac7cf917..a182c3715d2 100644 --- a/src/mame/drivers/dblewing.c +++ b/src/mame/drivers/dblewing.c @@ -119,20 +119,20 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan while (multi >= 0) { - pdrawgfx(bitmap,machine->gfx[2], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[2], sprite - multi * inc, colour, fx,fy, x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0,pri); + priority_bitmap,pri,0); if (xsize) - pdrawgfx(bitmap,machine->gfx[2], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[2], (sprite - multi * inc)-mult2, colour, fx,fy, x-16,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0,pri); + priority_bitmap,pri,0); multi--; diff --git a/src/mame/drivers/ddayjlc.c b/src/mame/drivers/ddayjlc.c index 1394ad7682a..66fe5914d50 100644 --- a/src/mame/drivers/ddayjlc.c +++ b/src/mame/drivers/ddayjlc.c @@ -360,7 +360,7 @@ static VIDEO_UPDATE( ddayjlc ) code=(code&0x7f)|((flags&0x30)<<3); - drawgfx(bitmap, screen->machine->gfx[0], code, 1, xflip, yflip, x, y, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[0], code, 1, xflip, yflip, x, y, 0); } { @@ -370,9 +370,9 @@ static VIDEO_UPDATE( ddayjlc ) { c=videoram[y*32+x]; if(x>1&&x<30) - drawgfx(bitmap, screen->machine->gfx[1], c+char_bank*0x100, 1, 0, 0, x*8, y*8, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], c+char_bank*0x100, 1, 0, 0, x*8, y*8, 0); else - drawgfx(bitmap, screen->machine->gfx[1], c+char_bank*0x100, 1, 0, 0, x*8, y*8, cliprect, TRANSPARENCY_NONE, 0); + drawgfx_opaque(bitmap, cliprect, screen->machine->gfx[1], c+char_bank*0x100, 1, 0, 0, x*8, y*8); } } return 0; diff --git a/src/mame/drivers/ddealer.c b/src/mame/drivers/ddealer.c index 49e43de30a7..6dce5d83d8e 100644 --- a/src/mame/drivers/ddealer.c +++ b/src/mame/drivers/ddealer.c @@ -175,7 +175,7 @@ static void ddealer_draw_video_layer( running_machine *machine, UINT16* vreg_bas UINT16 tile = (src[count]&0x0fff); UINT16 colr = (src[count]&0xf000)>>12; count++; - drawgfx(bitmap,gfx,tile,colr,0,flipy,(x*16)-sx,(y*16)-sy,cliprect,TRANSPARENCY_PEN,15); + drawgfx_transpen(bitmap,cliprect,gfx,tile,colr,0,flipy,(x*16)-sx,(y*16)-sy,15); } } count = 0; @@ -188,7 +188,7 @@ static void ddealer_draw_video_layer( running_machine *machine, UINT16* vreg_bas UINT16 tile = (src[count]&0x0fff); UINT16 colr = (src[count]&0xf000)>>12; count++; - drawgfx(bitmap,gfx,tile,colr,0,flipy,(x*16)-sx,(y*16)-sy,cliprect,TRANSPARENCY_PEN,15); + drawgfx_transpen(bitmap,cliprect,gfx,tile,colr,0,flipy,(x*16)-sx,(y*16)-sy,15); } } } @@ -207,7 +207,7 @@ static void ddealer_draw_video_layer( running_machine *machine, UINT16* vreg_bas UINT16 tile = (src[count]&0x0fff); UINT16 colr = (src[count]&0xf000)>>12; count++; - drawgfx(bitmap,gfx,tile,colr,flipy,flipy,(x*16)+sx,(y*16)+sy,cliprect,TRANSPARENCY_PEN,15); + drawgfx_transpen(bitmap,cliprect,gfx,tile,colr,flipy,flipy,(x*16)+sx,(y*16)+sy,15); } } count = 0; @@ -220,7 +220,7 @@ static void ddealer_draw_video_layer( running_machine *machine, UINT16* vreg_bas UINT16 tile = (src[count]&0x0fff); UINT16 colr = (src[count]&0xf000)>>12; count++; - drawgfx(bitmap,gfx,tile,colr,flipy,flipy,(x*16)+sx,(y*16)+sy,cliprect,TRANSPARENCY_PEN,15); + drawgfx_transpen(bitmap,cliprect,gfx,tile,colr,flipy,flipy,(x*16)+sx,(y*16)+sy,15); } } } diff --git a/src/mame/drivers/deco156.c b/src/mame/drivers/deco156.c index 3d96ee5edaa..b65f7a5f0d3 100644 --- a/src/mame/drivers/deco156.c +++ b/src/mame/drivers/deco156.c @@ -119,12 +119,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan while (multi >= 0) { - pdrawgfx(bitmap,machine->gfx[2], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[2], sprite - multi * inc, colour, fx,fy, x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0,pri); + priority_bitmap,pri,0); multi--; } diff --git a/src/mame/drivers/discoboy.c b/src/mame/drivers/discoboy.c index 6b0a9acf1b3..d18be25ce72 100644 --- a/src/mame/drivers/discoboy.c +++ b/src/mame/drivers/discoboy.c @@ -94,12 +94,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan } } - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code, color, flipscreen,0, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); } } @@ -156,7 +155,7 @@ static VIDEO_UPDATE( discoboy ) } - drawgfx(bitmap,screen->machine->gfx[1], tileno ,discoboy_ram_att[count/2],0,0,x*8,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[1], tileno ,discoboy_ram_att[count/2],0,0,x*8,y*8); count+=2; } } diff --git a/src/mame/drivers/dlair.c b/src/mame/drivers/dlair.c index b6120dcf5ee..0b8c5ef7b4e 100644 --- a/src/mame/drivers/dlair.c +++ b/src/mame/drivers/dlair.c @@ -168,7 +168,7 @@ static VIDEO_UPDATE( dleuro ) for (x = 0; x < 32; x++) { UINT8 *base = &videoram[y * 64 + x * 2 + 1]; - drawgfx(bitmap, screen->machine->gfx[0], base[0], base[1], 0, 0, 10 * x, 16 * y, cliprect, TRANSPARENCY_NONE, 0); + drawgfx_opaque(bitmap, cliprect, screen->machine->gfx[0], base[0], base[1], 0, 0, 10 * x, 16 * y); } return 0; diff --git a/src/mame/drivers/dmndrby.c b/src/mame/drivers/dmndrby.c index 1c93c2fb7de..151ae5d1af9 100644 --- a/src/mame/drivers/dmndrby.c +++ b/src/mame/drivers/dmndrby.c @@ -363,13 +363,13 @@ can we draw it with the tilemap? maybe not, the layout is a litle strange int chr = racetrack_tilemap_rom[off]; int col = racetrack_tilemap_rom[off+0x2000]&0x1f; int flipx = racetrack_tilemap_rom[off+0x2000]&0x40; - drawgfx(bitmap,track,chr,col,flipx,0,y*16+scrolly,x*16,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,track,chr,col,flipx,0,y*16+scrolly,x*16); // draw another bit of track // a rubbish way of doing it chr = racetrack_tilemap_rom[off-0x100]; col = racetrack_tilemap_rom[off+0x1f00]&0x1f; flipx = racetrack_tilemap_rom[off+0x1f00]&0x40; - drawgfx(bitmap,track,chr,col,flipx,0,y*16-256+scrolly,x*16,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,track,chr,col,flipx,0,y*16-256+scrolly,x*16); off++; } } @@ -399,13 +399,13 @@ wouldnt like to say its the most effective way though... for (a=0;a<8 ;a++) { for(b=0;b<7;b++) { - drawgfx(bitmap,sprites,anim+a*8+b,col,0,0,sprx+a*8,spry+b*8,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,sprites,anim+a*8+b,col,0,0,sprx+a*8,spry+b*8,0); } } // draw the horse number a=3; b=3; - drawgfx(bitmap,sprites,anim+horse,col,0,0,sprx+a*8,spry+b*8,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,sprites,anim+horse,col,0,0,sprx+a*8,spry+b*8,0); } diff --git a/src/mame/drivers/dominob.c b/src/mame/drivers/dominob.c index f98eff36faa..d51613110bc 100644 --- a/src/mame/drivers/dominob.c +++ b/src/mame/drivers/dominob.c @@ -55,18 +55,16 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta code = spriteram[offs + 3] + ((spriteram[offs + 2] & 0x03) << 8) ; - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], 2 * code, ((spriteram[offs + 2] & 0xf8) >> 3) , flip_screen_x_get(machine),flip_screen_y_get(machine), - sx,sy + (flip_screen_y_get(machine) ? 8 : -8), - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[0], + sx,sy + (flip_screen_y_get(machine) ? 8 : -8),0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], 2 * code + 1, ((spriteram[offs + 2] & 0xf8) >> 3) , flip_screen_x_get(machine),flip_screen_y_get(machine), - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } @@ -80,14 +78,13 @@ static VIDEO_UPDATE( dominob ) for(y=0;y<256/32;y++) for(x=0;x<256/32;x++) { - drawgfx( bitmap, - screen->machine->gfx[1], + drawgfx_opaque( bitmap, + cliprect, + screen->machine->gfx[1], bgram[index]+256*(bgram[index+1]&0xf), bgram[index+1]>>4, 0, 0, - x*32,y*32, - cliprect, - TRANSPARENCY_NONE,0); + x*32,y*32); index+=2; } } @@ -97,14 +94,13 @@ static VIDEO_UPDATE( dominob ) for(y=0;y<32;y++) for(x=0;x<32;x++) { - drawgfx( bitmap, + drawgfx_transpen( bitmap, + cliprect, screen->machine->gfx[0], videoram[(y*32+x)*2+1]+(videoram[(y*32+x)*2]&7)*256, (videoram[(y*32+x)*2]>>3), 0, 0, - x*8,y*8, - cliprect, - TRANSPARENCY_PEN,0); + x*8,y*8,0); } } diff --git a/src/mame/drivers/dreamwld.c b/src/mame/drivers/dreamwld.c index f8d0cdd1adf..caea17ee777 100644 --- a/src/mame/drivers/dreamwld.c +++ b/src/mame/drivers/dreamwld.c @@ -138,10 +138,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { for (xct=0;xct<xsize;xct++) { - drawgfx(bitmap,gfx,redirect[tileno],colour,xflip,0,xpos+xct*xinc,ypos+yct*16,cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,gfx,redirect[tileno],colour,xflip,0,(xpos+xct*xinc)-0x200,ypos+yct*16,cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,gfx,redirect[tileno],colour,xflip,0,(xpos+xct*xinc)-0x200,(ypos+yct*16)-0x200,cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,gfx,redirect[tileno],colour,xflip,0,xpos+xct*xinc,(ypos+yct*16)-0x200,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,redirect[tileno],colour,xflip,0,xpos+xct*xinc,ypos+yct*16,0); + drawgfx_transpen(bitmap,cliprect,gfx,redirect[tileno],colour,xflip,0,(xpos+xct*xinc)-0x200,ypos+yct*16,0); + drawgfx_transpen(bitmap,cliprect,gfx,redirect[tileno],colour,xflip,0,(xpos+xct*xinc)-0x200,(ypos+yct*16)-0x200,0); + drawgfx_transpen(bitmap,cliprect,gfx,redirect[tileno],colour,xflip,0,xpos+xct*xinc,(ypos+yct*16)-0x200,0); tileno++; } diff --git a/src/mame/drivers/drtomy.c b/src/mame/drivers/drtomy.c index 771fb9ddb85..9f631ee03b0 100644 --- a/src/mame/drivers/drtomy.c +++ b/src/mame/drivers/drtomy.c @@ -81,10 +81,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta ex = xflip ? (spr_size-1-x) : x; ey = yflip ? (spr_size-1-y) : y; - drawgfx(bitmap,gfx,number + x_offset[ex] + y_offset[ey], + drawgfx_transpen(bitmap,cliprect,gfx,number + x_offset[ex] + y_offset[ey], color,xflip,yflip, - sx-0x09+x*8,sy+y*8, - cliprect,TRANSPARENCY_PEN,0); + sx-0x09+x*8,sy+y*8,0); } } } diff --git a/src/mame/drivers/dwarfd.c b/src/mame/drivers/dwarfd.c index 5e81f78a887..3d949fb08e3 100644 --- a/src/mame/drivers/dwarfd.c +++ b/src/mame/drivers/dwarfd.c @@ -515,12 +515,11 @@ static void drawCrt(running_machine *machine, bitmap_t *bitmap,const rectangle * b=1; } } - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], tile+(bank+bank2)*128, 0, 0, 0, - x*8,y*8, - cliprect,TRANSPARENCY_PEN,0); + x*8,y*8,0); } } } diff --git a/src/mame/drivers/egghunt.c b/src/mame/drivers/egghunt.c index 94f40626f6a..a27d0848cfc 100644 --- a/src/mame/drivers/egghunt.c +++ b/src/mame/drivers/egghunt.c @@ -84,12 +84,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan sx = 496 - sx; sy = 240 - sy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipscreen,flipscreen, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); } } diff --git a/src/mame/drivers/esh.c b/src/mame/drivers/esh.c index 37160ab4ae7..c961fca42f3 100644 --- a/src/mame/drivers/esh.c +++ b/src/mame/drivers/esh.c @@ -58,10 +58,10 @@ static VIDEO_UPDATE( esh ) //int blinkLine = (tile_control_ram[current_screen_character] & 0x40) >> 6; //int blinkChar = (tile_control_ram[current_screen_character] & 0x80) >> 7; - drawgfx(bitmap, screen->machine->gfx[0], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[0], tile_ram[current_screen_character] + (0x100 * tileOffs), palIndex, - 0, 0, charx*8, chary*8, cliprect, TRANSPARENCY_PEN, 0); + 0, 0, charx*8, chary*8, 0); } } diff --git a/src/mame/drivers/fcrash.c b/src/mame/drivers/fcrash.c index 76231694c64..4259694d207 100644 --- a/src/mame/drivers/fcrash.c +++ b/src/mame/drivers/fcrash.c @@ -147,7 +147,7 @@ static void fcrash_render_sprites(running_machine *machine, bitmap_t *bitmap,con colour = cps1_gfxram[base+pos+1]&0x1f; ypos = 256-ypos; - pdrawgfx(bitmap,machine->gfx[2],tileno,colour,flipx,flipy,xpos+49,ypos-16,cliprect,TRANSPARENCY_PEN,15,0x02); + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[2],tileno,colour,flipx,flipy,xpos+49,ypos-16,priority_bitmap,0x02,15); } diff --git a/src/mame/drivers/feversoc.c b/src/mame/drivers/feversoc.c index 2c471db3365..c883810b38a 100644 --- a/src/mame/drivers/feversoc.c +++ b/src/mame/drivers/feversoc.c @@ -92,7 +92,7 @@ static VIDEO_UPDATE( feversoc ) for(dx=0;dx<w;dx++) for(dy=0;dy<h;dy++) - drawgfx(bitmap,screen->machine->gfx[0],spr_offs++,colour,0,0,(sx+dx*16),(sy+dy*16),cliprect,TRANSPARENCY_PEN,0x3f); + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0],spr_offs++,colour,0,0,(sx+dx*16),(sy+dy*16),0x3f); } return 0; diff --git a/src/mame/drivers/firefox.c b/src/mame/drivers/firefox.c index 92a31bc24ea..35fb38d4b74 100644 --- a/src/mame/drivers/firefox.c +++ b/src/mame/drivers/firefox.c @@ -188,7 +188,7 @@ static VIDEO_UPDATE( firefox ) int flipx = flags & 0x20; int code = sprite_data[ 15 - row ] + ( 256 * ( ( flags >> 6 ) & 3 ) ); - drawgfx( bitmap, screen->machine->gfx[ 1 ], code, color, flipx, flipy, x + 8, gfxtop + 500 - y - ( row * 16 ), cliprect, TRANSPARENCY_PEN, 0 ); + drawgfx_transpen( bitmap, cliprect, screen->machine->gfx[ 1 ], code, color, flipx, flipy, x + 8, gfxtop + 500 - y - ( row * 16 ), 0 ); } } } diff --git a/src/mame/drivers/fortecar.c b/src/mame/drivers/fortecar.c index b3c8d4fb859..b3591d57fed 100644 --- a/src/mame/drivers/fortecar.c +++ b/src/mame/drivers/fortecar.c @@ -257,7 +257,7 @@ static VIDEO_UPDATE(fortecar) tile = fortecar_ram[(count*4)+1] | (fortecar_ram[(count*4)+2]<<8); color = fortecar_ram[(count*4)+3]; - drawgfx(bitmap,screen->machine->gfx[0],tile,color,0,0,x*8,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0],tile,color,0,0,x*8,y*8); count++; } diff --git a/src/mame/drivers/galaxia.c b/src/mame/drivers/galaxia.c index b8cbbb7959d..14f7399d6b7 100644 --- a/src/mame/drivers/galaxia.c +++ b/src/mame/drivers/galaxia.c @@ -61,7 +61,7 @@ static VIDEO_UPDATE( galaxia ) for (x=0;x<256/8;x++) { int tile = galaxia_video[count]; - drawgfx(bitmap,screen->machine->gfx[0],tile,0,0,0,x*8,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0],tile,0,0,0,x*8,y*8); count++; } } diff --git a/src/mame/drivers/go2000.c b/src/mame/drivers/go2000.c index 4d7c7a889be..31b6867ed0e 100644 --- a/src/mame/drivers/go2000.c +++ b/src/mame/drivers/go2000.c @@ -170,7 +170,7 @@ static VIDEO_UPDATE(go2000) { int tile = go2000_video[count]; int attr = go2000_video2[count]; - drawgfx(bitmap,screen->machine->gfx[0],tile,attr,0,0,x*8,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0],tile,attr,0,0,x*8,y*8); count++; } } @@ -182,7 +182,7 @@ static VIDEO_UPDATE(go2000) { int tile = go2000_video[count]; int attr = go2000_video2[count]; - drawgfx(bitmap,screen->machine->gfx[0],tile,attr,0,0,x*8,y*8,cliprect,TRANSPARENCY_PEN,0xf); + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0],tile,attr,0,0,x*8,y*8,0xf); count++; } } @@ -261,12 +261,11 @@ static VIDEO_UPDATE(go2000) tile_flipy = !tile_flipy; } - drawgfx( bitmap, screen->machine->gfx[0], + drawgfx_transpen( bitmap, cliprect,screen->machine->gfx[0], (tile & 0x1fff) + bank*0x4000, attr, tile_flipx, tile_flipy, - sx, sy, - cliprect,TRANSPARENCY_PEN,15 ); + sx, sy,15 ); tile_x += tile_xinc; } diff --git a/src/mame/drivers/gpworld.c b/src/mame/drivers/gpworld.c index b181edaf63b..8812d01dc9d 100644 --- a/src/mame/drivers/gpworld.c +++ b/src/mame/drivers/gpworld.c @@ -71,8 +71,8 @@ static void gpworld_draw_tiles(running_machine *machine, bitmap_t *bitmap,const { int current_screen_character = (characterY*64) + characterX; - drawgfx(bitmap, machine->gfx[0], tile_RAM[current_screen_character], - characterY, 0, 0, characterX*8, characterY*8, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[0], tile_RAM[current_screen_character], + characterY, 0, 0, characterX*8, characterY*8, 0); } } } diff --git a/src/mame/drivers/gstream.c b/src/mame/drivers/gstream.c index 6fd17357f6b..8eeaacb692a 100644 --- a/src/mame/drivers/gstream.c +++ b/src/mame/drivers/gstream.c @@ -433,7 +433,7 @@ static VIDEO_UPDATE(gstream) if (x & 0x8000) x-=0x10000; if (y & 0x8000) y-=0x10000; - drawgfx(bitmap,screen->machine->gfx[1],code,col,0,0,x-2,y,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1],code,col,0,0,x-2,y,0); } return 0; diff --git a/src/mame/drivers/hitpoker.c b/src/mame/drivers/hitpoker.c index 977a2e91786..315a36eddbc 100644 --- a/src/mame/drivers/hitpoker.c +++ b/src/mame/drivers/hitpoker.c @@ -76,7 +76,7 @@ VIDEO_UPDATE(hitpoker) gfx_bpp = (colorram[count] & 0x80)>>7; //flag between 4 and 8 bpp color = gfx_bpp ? ((colorram[count] & 0x70)>>4) : (colorram[count] & 0xf); - drawgfx(bitmap,screen->machine->gfx[gfx_bpp],tile,color,0,0,x*8,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[gfx_bpp],tile,color,0,0,x*8,y*8); count+=2; } diff --git a/src/mame/drivers/igs017.c b/src/mame/drivers/igs017.c index c7aab151c0d..82255efdbde 100644 --- a/src/mame/drivers/igs017.c +++ b/src/mame/drivers/igs017.c @@ -180,11 +180,10 @@ static void draw_sprite(running_machine *machine, bitmap_t *bitmap,const rectang gfx_element_build_temporary(&gfx, machine, sprites_gfx + addr, dimx, dimy, dimx, 0x100, 32, 0); - drawgfx( bitmap,&gfx, + drawgfx_transpen( bitmap,cliprect, &gfx, 0, color, flipx, flipy, - sx, sy, - cliprect, TRANSPARENCY_PEN, 0x1f ); + sx, sy, 0x1f ); } static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect) diff --git a/src/mame/drivers/intrscti.c b/src/mame/drivers/intrscti.c index 4d7407528e4..5de780432f5 100644 --- a/src/mame/drivers/intrscti.c +++ b/src/mame/drivers/intrscti.c @@ -71,7 +71,7 @@ static VIDEO_UPDATE(intrscti) { int dat; dat = intrscti_ram[count]; - drawgfx(bitmap,screen->machine->gfx[0],dat/*+0x100*/,0,0,0,x*8,y*8,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0],dat/*+0x100*/,0,0,0,x*8,y*8,0); count++; } } diff --git a/src/mame/drivers/istellar.c b/src/mame/drivers/istellar.c index c8081813db8..2e2254dd1a0 100644 --- a/src/mame/drivers/istellar.c +++ b/src/mame/drivers/istellar.c @@ -64,10 +64,10 @@ static VIDEO_UPDATE( istellar ) { int current_screen_character = (chary*32) + charx; - drawgfx(bitmap, screen->machine->gfx[0], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[0], tile_ram[current_screen_character], (tile_control_ram[current_screen_character] & 0x0f), - 0, 0, charx*8, chary*8, cliprect, TRANSPARENCY_PEN, 0); + 0, 0, charx*8, chary*8, 0); } } diff --git a/src/mame/drivers/jackpool.c b/src/mame/drivers/jackpool.c index e1ea068741b..9544215217e 100644 --- a/src/mame/drivers/jackpool.c +++ b/src/mame/drivers/jackpool.c @@ -54,7 +54,7 @@ static VIDEO_UPDATE(jackpool) int attr = (sc1_vram[count+0x800] & 0x1f00)>>8; //int t_pen = (sc1_vram[count+0x800] & 0x2000); //int colour = tile>>12; - drawgfx(bitmap,gfx,tile,attr,0,0,x*8,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,gfx,tile,attr,0,0,x*8,y*8); count++; } @@ -87,7 +87,7 @@ static VIDEO_UPDATE(jackpool) int attr = (sc2_vram[count+0x800] & 0x1f00)>>8; //int t_pen = (sc1_vram[count+0x800] & 0x2000); //int colour = tile>>12; - drawgfx(bitmap,gfx,tile,attr,0,0,x*8,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,gfx,tile,attr,0,0,x*8,y*8); count++; } diff --git a/src/mame/drivers/jollyjgr.c b/src/mame/drivers/jollyjgr.c index 0e0bb3b827d..8942bbaa7ec 100644 --- a/src/mame/drivers/jollyjgr.c +++ b/src/mame/drivers/jollyjgr.c @@ -353,11 +353,10 @@ static VIDEO_UPDATE( jollyjgr ) if (offs < 3*4) sy++; - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], code,color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } return 0; diff --git a/src/mame/drivers/kingdrby.c b/src/mame/drivers/kingdrby.c index dd220c67787..f46803770c0 100644 --- a/src/mame/drivers/kingdrby.c +++ b/src/mame/drivers/kingdrby.c @@ -164,13 +164,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { for(dy=0;dy<h;dy++) for(dx=0;dx<w;dx++) - drawgfx(bitmap,machine->gfx[0],spr_offs++,colour,1,0,((x+16*w)-(dx+1)*16),(y+dy*16),cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[0],spr_offs++,colour,1,0,((x+16*w)-(dx+1)*16),(y+dy*16),0); } else { for(dy=0;dy<h;dy++) for(dx=0;dx<w;dx++) - drawgfx(bitmap,machine->gfx[0],spr_offs++,colour,0,0,(x+dx*16),(y+dy*16),cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[0],spr_offs++,colour,0,0,(x+dx*16),(y+dy*16),0); } } } diff --git a/src/mame/drivers/laserbat.c b/src/mame/drivers/laserbat.c index 6569e09039c..d26db3ba2f7 100644 --- a/src/mame/drivers/laserbat.c +++ b/src/mame/drivers/laserbat.c @@ -554,12 +554,11 @@ static VIDEO_UPDATE( laserbat ) } if(sprite_info.enable) - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], sprite_info.code, sprite_info.color, 0,0, - sprite_info.x - 6,sprite_info.y, - cliprect,TRANSPARENCY_PEN,0); + sprite_info.x - 6,sprite_info.y,0); return 0; } diff --git a/src/mame/drivers/lgp.c b/src/mame/drivers/lgp.c index 54983e41f21..4c2c66393b4 100644 --- a/src/mame/drivers/lgp.c +++ b/src/mame/drivers/lgp.c @@ -99,10 +99,10 @@ static VIDEO_UPDATE( lgp ) /* Somewhere there's a flag that offsets the tilemap by 0x100*x */ /* Palette is likely set somewhere as well (tile_control_ram?) */ - drawgfx(bitmap, screen->machine->gfx[0], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[0], tile_ram[current_screen_character], 0, - 0, 0, charx*8, chary*8, cliprect, TRANSPARENCY_PEN, 0); + 0, 0, charx*8, chary*8, 0); } } diff --git a/src/mame/drivers/limenko.c b/src/mame/drivers/limenko.c index 8669241f75b..0e39098b88b 100644 --- a/src/mame/drivers/limenko.c +++ b/src/mame/drivers/limenko.c @@ -241,9 +241,9 @@ static TILE_GET_INFO( get_fg_tile_info ) SET_TILE_INFO(0,tile,color,0); } -static void draw_single_sprite(bitmap_t *dest_bmp,const gfx_element *gfx, +static void draw_single_sprite(bitmap_t *dest_bmp,const rectangle *clip,const gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, - const rectangle *clip,int priority) + int priority) { int pal_base = gfx->color_base + gfx->color_granularity * (color % gfx->total_colors); const UINT8 *source_base = gfx_element_get_data(gfx, code % gfx->total_elements); @@ -388,16 +388,16 @@ static void draw_sprites(running_machine *machine, UINT32 *sprites, const rectan /* prepare GfxElement on the fly */ gfx_element_build_temporary(&gfx, machine, gfxdata, width, height, width, 0, 256, 0); - draw_single_sprite(sprites_bitmap,&gfx,0,color,flipx,flipy,x,y,cliprect,pri); + draw_single_sprite(sprites_bitmap,cliprect,&gfx,0,color,flipx,flipy,x,y,pri); // wrap around x - draw_single_sprite(sprites_bitmap,&gfx,0,color,flipx,flipy,x-512,y,cliprect,pri); + draw_single_sprite(sprites_bitmap,cliprect,&gfx,0,color,flipx,flipy,x-512,y,pri); // wrap around y - draw_single_sprite(sprites_bitmap,&gfx,0,color,flipx,flipy,x,y-512,cliprect,pri); + draw_single_sprite(sprites_bitmap,cliprect,&gfx,0,color,flipx,flipy,x,y-512,pri); // wrap around x and y - draw_single_sprite(sprites_bitmap,&gfx,0,color,flipx,flipy,x-512,y-512,cliprect,pri); + draw_single_sprite(sprites_bitmap,cliprect,&gfx,0,color,flipx,flipy,x-512,y-512,pri); } } diff --git a/src/mame/drivers/looping.c b/src/mame/drivers/looping.c index 601c53de4cd..0f37d91ae74 100644 --- a/src/mame/drivers/looping.c +++ b/src/mame/drivers/looping.c @@ -269,7 +269,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, sx, sy, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code, color, flipx, flipy, sx, sy, 0); } } diff --git a/src/mame/drivers/m63.c b/src/mame/drivers/m63.c index 897d643e457..6c26ccf5d20 100644 --- a/src/mame/drivers/m63.c +++ b/src/mame/drivers/m63.c @@ -281,22 +281,20 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[2], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[2], code, color, flipx, flipy, - sx, sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx, sy, 0); /* sprite wrapping - verified on real hardware*/ if(sx>0xf0) { - drawgfx(bitmap, machine->gfx[2], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[2], code, color, flipx, flipy, - sx-0x100, sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx-0x100, sy, 0); } } diff --git a/src/mame/drivers/marinedt.c b/src/mame/drivers/marinedt.c index 3ce227a8fac..354cbe0d438 100644 --- a/src/mame/drivers/marinedt.c +++ b/src/mame/drivers/marinedt.c @@ -468,20 +468,18 @@ static VIDEO_UPDATE( marinedt ) tilemap_draw(tile, cliprect, tx_tilemap, 0, 0); bitmap_fill(obj1, NULL, 0); - drawgfx(obj1, screen->machine->gfx[1], + drawgfx_transpen(obj1, NULL, screen->machine->gfx[1], OBJ_CODE(marinedt_obj1_a), OBJ_COLOR(marinedt_obj1_a), OBJ_FLIPX(marinedt_obj1_a), OBJ_FLIPY(marinedt_obj1_a), - 0, 0, - NULL, TRANSPARENCY_PEN, 0); + 0, 0, 0); bitmap_fill(obj2, NULL, 0); - drawgfx(obj2, screen->machine->gfx[2], + drawgfx_transpen(obj2, NULL, screen->machine->gfx[2], OBJ_CODE(marinedt_obj2_a), OBJ_COLOR(marinedt_obj2_a), OBJ_FLIPX(marinedt_obj2_a), OBJ_FLIPY(marinedt_obj2_a), - 0, 0, - NULL, TRANSPARENCY_PEN, 0); + 0, 0, 0); bitmap_fill(bitmap, NULL, 0); diff --git a/src/mame/drivers/mastboy.c b/src/mame/drivers/mastboy.c index 87c38031e31..5a832c9b112 100644 --- a/src/mame/drivers/mastboy.c +++ b/src/mame/drivers/mastboy.c @@ -495,7 +495,7 @@ static VIDEO_UPDATE(mastboy) } - drawgfx(bitmap,gfx,tileno,attr,0,0,x*8,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,gfx,tileno,attr,0,0,x*8,y*8); count+=4; diff --git a/src/mame/drivers/mediagx.c b/src/mame/drivers/mediagx.c index ff4028db92c..8f6b7245ee6 100644 --- a/src/mame/drivers/mediagx.c +++ b/src/mame/drivers/mediagx.c @@ -180,11 +180,13 @@ static VIDEO_START(mediagx) } } -static void draw_char(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx, int ch, int att, int x, int y) +static void draw_char(bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx, int ch, int att, int x, int y) { int i,j; const UINT8 *dp; int index = 0; + const pen_t *pens = gfx->machine->pens; + dp = gfx_element_get_data(gfx, ch); for (j=y; j < y+8; j++) @@ -194,11 +196,11 @@ static void draw_char(running_machine *machine, bitmap_t *bitmap, const rectangl { UINT8 pen = dp[index++]; if (pen) - p[i] = machine->pens[gfx->color_base + (att & 0xf)]; + p[i] = pens[gfx->color_base + (att & 0xf)]; else { if (((att >> 4) & 7) > 0) - p[i] = machine->pens[gfx->color_base + ((att >> 4) & 0x7)]; + p[i] = pens[gfx->color_base + ((att >> 4) & 0x7)]; } } } @@ -311,8 +313,8 @@ static void draw_cga(running_machine *machine, bitmap_t *bitmap, const rectangle int att1 = (cga[index] >> 24) & 0xff; int ch1 = (cga[index] >> 16) & 0xff; - draw_char(machine, bitmap, cliprect, gfx, ch0, att0, i*8, j*8); - draw_char(machine, bitmap, cliprect, gfx, ch1, att1, (i*8)+8, j*8); + draw_char(bitmap, cliprect, gfx, ch0, att0, i*8, j*8); + draw_char(bitmap, cliprect, gfx, ch1, att1, (i*8)+8, j*8); index++; } } diff --git a/src/mame/drivers/mgolf.c b/src/mame/drivers/mgolf.c index effb285f2de..1dc84a56634 100644 --- a/src/mame/drivers/mgolf.c +++ b/src/mame/drivers/mgolf.c @@ -51,21 +51,19 @@ static VIDEO_UPDATE( mgolf ) for (i = 0; i < 2; i++) { - drawgfx(bitmap, screen->machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], mgolf_video_ram[0x399 + 4 * i], i, 0, 0, mgolf_video_ram[0x390 + 2 * i] - 7, - mgolf_video_ram[0x398 + 4 * i] - 16, - cliprect, TRANSPARENCY_PEN, 0); + mgolf_video_ram[0x398 + 4 * i] - 16, 0); - drawgfx(bitmap, screen->machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], mgolf_video_ram[0x39b + 4 * i], i, 0, 0, mgolf_video_ram[0x390 + 2 * i] - 15, - mgolf_video_ram[0x39a + 4 * i] - 16, - cliprect, TRANSPARENCY_PEN, 0); + mgolf_video_ram[0x39a + 4 * i] - 16, 0); } return 0; } diff --git a/src/mame/drivers/midas.c b/src/mame/drivers/midas.c index d61c6b14ec5..2ab2eea935b 100644 --- a/src/mame/drivers/midas.c +++ b/src/mame/drivers/midas.c @@ -146,13 +146,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta UINT16 code = codes[y*2]; UINT16 attr = codes[y*2+1]; - drawgfxzoom( bitmap, machine->gfx[0], + drawgfxzoom_transpen( bitmap, cliprect, machine->gfx[0], code, attr >> 8, attr & 1, attr & 2, sx / 0x10000, ((sy + y * ydim) / 0x10000)&0x1ff, - cliprect, TRANSPARENCY_PEN, 0, - xscale, yscale ); + xscale, yscale, 0 ); } } } diff --git a/src/mame/drivers/mirage.c b/src/mame/drivers/mirage.c index 98bdd49fdb3..cca9c86f26b 100644 --- a/src/mame/drivers/mirage.c +++ b/src/mame/drivers/mirage.c @@ -97,12 +97,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan while (multi >= 0) { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x,y + mult * multi,0); multi--; } diff --git a/src/mame/drivers/mirax.c b/src/mame/drivers/mirax.c index 95d5a47cb2f..2d046d55b36 100644 --- a/src/mame/drivers/mirax.c +++ b/src/mame/drivers/mirax.c @@ -103,7 +103,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta y = 0x100 - spriteram[count]; x = spriteram[count+3]; - drawgfx(bitmap,machine->gfx[1],spr_offs,color,fx,fy,x,y-16,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[1],spr_offs,color,fx,fy,x,y-16,0); } } @@ -122,9 +122,9 @@ static VIDEO_UPDATE(mirax) int x_scroll = (color & 0xff00)>>8; tile |= ((color & 0xe0)<<3); - drawgfx(bitmap,gfx,tile,color & 7,0,0,(x*8),(y*8)-x_scroll,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,gfx,tile,color & 7,0,0,(x*8),(y*8)-x_scroll); /* wrap-around */ - drawgfx(bitmap,gfx,tile,color & 7,0,0,(x*8),(y*8)-x_scroll+256,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,gfx,tile,color & 7,0,0,(x*8),(y*8)-x_scroll+256); count++; } @@ -146,9 +146,9 @@ static VIDEO_UPDATE(mirax) if(x <= 1 || x >= 30) { - drawgfx(bitmap,gfx,tile,color & 7,0,0,(x*8),(y*8)-x_scroll,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,gfx,tile,color & 7,0,0,(x*8),(y*8)-x_scroll); /* wrap-around */ - drawgfx(bitmap,gfx,tile,color & 7,0,0,(x*8),(y*8)-x_scroll+256,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,gfx,tile,color & 7,0,0,(x*8),(y*8)-x_scroll+256); } count++; diff --git a/src/mame/drivers/missb2.c b/src/mame/drivers/missb2.c index e64c31643b4..b86c4836e48 100644 --- a/src/mame/drivers/missb2.c +++ b/src/mame/drivers/missb2.c @@ -105,12 +105,11 @@ static VIDEO_UPDATE( missb2 ) flipy = !flipy; } - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], code, 0, flipx,flipy, - x,y, - cliprect,TRANSPARENCY_PEN,0xff); + x,y,0xff); } } diff --git a/src/mame/drivers/mlanding.c b/src/mame/drivers/mlanding.c index 20ec1456923..939c20ecc93 100644 --- a/src/mame/drivers/mlanding.c +++ b/src/mame/drivers/mlanding.c @@ -240,12 +240,11 @@ static VIDEO_UPDATE(mlanding) //test if(code) { - drawgfx(ml_bitmap[num],screen->machine->gfx[0], + drawgfx_opaque(ml_bitmap[num],cliprect,screen->machine->gfx[0], code++, color, 0,0, - x+j*8,y+k*8, - cliprect,TRANSPARENCY_NONE,0); + x+j*8,y+k*8); } else { diff --git a/src/mame/drivers/mpoker.c b/src/mame/drivers/mpoker.c index a056a9939c4..cf7dc93ead1 100644 --- a/src/mame/drivers/mpoker.c +++ b/src/mame/drivers/mpoker.c @@ -28,7 +28,7 @@ static VIDEO_UPDATE(mpoker) { UINT16 dat = mpoker_video[count]; UINT16 col = mpoker_video[count+0x400]; - drawgfx(bitmap,gfx,dat,col,0,0,x*16,y*16,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,gfx,dat,col,0,0,x*16,y*16); count++; } diff --git a/src/mame/drivers/mpu4drvr.c b/src/mame/drivers/mpu4drvr.c index 611894dcafb..62175a64b20 100644 --- a/src/mame/drivers/mpu4drvr.c +++ b/src/mame/drivers/mpu4drvr.c @@ -524,7 +524,7 @@ static VIDEO_UPDATE( mpu4_vid ) colattr = tiledat >>12; tiledat &= 0x0fff; - drawgfx(bitmap,screen->machine->gfx[gfxregion],tiledat,colattr,0,0,x*8,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[gfxregion],tiledat,colattr,0,0,x*8,y*8); count++; } @@ -1625,7 +1625,7 @@ static VIDEO_UPDATE(dealem) { int tile = dealem_videoram[count + 0x1000] | (dealem_videoram[count] << 8); count++; - drawgfx(bitmap,screen->machine->gfx[0],tile,0,0,0,x * 8,y * 8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0],tile,0,0,0,x * 8,y * 8); } } diff --git a/src/mame/drivers/murogem.c b/src/mame/drivers/murogem.c index 7b7d895f4b5..99ff0ab2cbe 100644 --- a/src/mame/drivers/murogem.c +++ b/src/mame/drivers/murogem.c @@ -181,7 +181,7 @@ static VIDEO_UPDATE(murogem) int tileno = murogem_videoram[count]&0x3f; int attr = murogem_videoram[count+0x400]&0x0f; - drawgfx(bitmap,screen->machine->gfx[0],tileno,attr,0,0,xx*8,yy*8,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0],tileno,attr,0,0,xx*8,yy*8,0); count++; diff --git a/src/mame/drivers/murogmbl.c b/src/mame/drivers/murogmbl.c index 072aa2f4373..ef39fc025ec 100644 --- a/src/mame/drivers/murogmbl.c +++ b/src/mame/drivers/murogmbl.c @@ -93,7 +93,7 @@ static VIDEO_UPDATE(murogmbl) for (x = 0; x < 32; x++) { int tile = murogmbl_video[count]; - drawgfx(bitmap, gfx, tile, 0, 0, 0, x * 8, y * 8, cliprect, TRANSPARENCY_NONE, 0); + drawgfx_opaque(bitmap, cliprect, gfx, tile, 0, 0, 0, x * 8, y * 8); count++; } diff --git a/src/mame/drivers/mwarr.c b/src/mame/drivers/mwarr.c index 62336755937..7af19eab5f8 100644 --- a/src/mame/drivers/mwarr.c +++ b/src/mame/drivers/mwarr.c @@ -354,44 +354,44 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta for(i=0;i<=dy;i++) { - pdrawgfx( bitmap, + pdrawgfx_transpen( bitmap, + cliprect, gfx, source[2]+i, color, flipx,0, x,y+i*16, - cliprect, - TRANSPARENCY_PEN,0,pri_mask ); + priority_bitmap,pri_mask,0 ); /* wrap around x */ - pdrawgfx( bitmap, + pdrawgfx_transpen( bitmap, + cliprect, gfx, source[2]+i, color, flipx,0, x-1024,y+i*16, - cliprect, - TRANSPARENCY_PEN,0,pri_mask ); + priority_bitmap,pri_mask,0 ); /* wrap around y */ - pdrawgfx( bitmap, - gfx, + pdrawgfx_transpen( bitmap, + cliprect, + gfx, source[2]+i, color, flipx,0, x,y-512+i*16, - cliprect, - TRANSPARENCY_PEN,0,pri_mask ); + priority_bitmap,pri_mask,0 ); /* wrap around x & y */ - pdrawgfx( bitmap, + pdrawgfx_transpen( bitmap, + cliprect, gfx, source[2]+i, color, flipx,0, x-1024,y-512+i*16, - cliprect, - TRANSPARENCY_PEN,0,pri_mask ); + priority_bitmap,pri_mask,0 ); } } diff --git a/src/mame/drivers/namcoic.c b/src/mame/drivers/namcoic.c index 70875d5ad3d..b7d473fee0a 100644 --- a/src/mame/drivers/namcoic.c +++ b/src/mame/drivers/namcoic.c @@ -265,10 +265,10 @@ WRITE32_HANDLER( namco_tilemapvideoram32_le_w ) /**************************************************************************************/ -static void zdrawgfxzoom(running_machine *machine, - bitmap_t *dest_bmp,const gfx_element *gfx, +static void zdrawgfxzoom( + bitmap_t *dest_bmp,const rectangle *clip,const gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, - const rectangle *clip,int transparency,int transparent_color, + int transparency,int transparent_color, int scalex, int scaley, int zpos ) { if (!scalex || !scaley) return; @@ -276,8 +276,8 @@ static void zdrawgfxzoom(running_machine *machine, { if( gfx ) { - int shadow_offset = (machine->config->video_attributes&VIDEO_HAS_SHADOWS)?machine->config->total_colors:0; - const pen_t *pal = &machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; + int shadow_offset = (gfx->machine->config->video_attributes&VIDEO_HAS_SHADOWS)?gfx->machine->config->total_colors:0; + const pen_t *pal = &gfx->machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; const UINT8 *source_base = gfx_element_get_data(gfx, code % gfx->total_elements); int sprite_screen_height = (scaley*gfx->height+0x8000)>>16; int sprite_screen_width = (scalex*gfx->width+0x8000)>>16; @@ -478,14 +478,13 @@ namcos2_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle gfx_element_set_source_clip(gfx, 0, 32, 0, 32); zdrawgfxzoom( - machine, bitmap, + cliprect, gfx, sprn, color, flipx,flipy, xpos,ypos, - cliprect, TRANSPARENCY_PEN,0xff, scalex,scaley, loop ); @@ -613,12 +612,13 @@ namcos2_draw_sprites_metalhawk(running_machine *machine, bitmap_t *bitmap, const rect.min_y += (tile&2)?16:0; rect.max_y += (tile&2)?16:0; } - zdrawgfxzoom(machine, - bitmap,machine->gfx[0], + zdrawgfxzoom( + bitmap, + &rect, + machine->gfx[0], sprn, color, flipx,flipy, sx,sy, - &rect, TRANSPARENCY_PEN,0xff, scalex, scaley, loop ); @@ -877,13 +877,14 @@ draw_spriteC355(running_machine *machine, bitmap_t *bitmap, const rectangle *cli tile = spritetile16[tile_index++]; if( (tile&0x8000)==0 ) { - zdrawgfxzoom(machine, - bitmap,machine->gfx[mGfxC355], + zdrawgfxzoom( + bitmap, + &clip, + machine->gfx[mGfxC355], mpCodeToTile(tile) + offset, color, flipx,flipy, sx,sy, - &clip, TRANSPARENCY_PEN,0xff, zoomx, zoomy, zpos ); } diff --git a/src/mame/drivers/nmg5.c b/src/mame/drivers/nmg5.c index f3bc86372e6..e9cb51795bc 100644 --- a/src/mame/drivers/nmg5.c +++ b/src/mame/drivers/nmg5.c @@ -823,20 +823,18 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan for (y = 0;y < height;y++) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code + (flipy ? height-1 - y : y), color, flipx,flipy, - sx & 0x1ff,248 - ((sy + 0x10 * (height - y)) & 0x1ff), - cliprect,TRANSPARENCY_PEN,0); + sx & 0x1ff,248 - ((sy + 0x10 * (height - y)) & 0x1ff),0); /* wrap around */ - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code + (flipy ? height-1 - y : y), color, flipx,flipy, - (sx & 0x1ff) - 512,248 - ((sy + 0x10 * (height - y)) & 0x1ff), - cliprect,TRANSPARENCY_PEN,0); + (sx & 0x1ff) - 512,248 - ((sy + 0x10 * (height - y)) & 0x1ff),0); } } } diff --git a/src/mame/drivers/norautp.c b/src/mame/drivers/norautp.c index 46eb37f4239..2a5c2cda50b 100644 --- a/src/mame/drivers/norautp.c +++ b/src/mame/drivers/norautp.c @@ -204,7 +204,7 @@ static VIDEO_UPDATE( norautp ) int tile = np_vram[count] & 0x3f; int colour = (np_vram[count] & 0xc0) >> 6; - drawgfx(bitmap,screen->machine->gfx[1], tile, colour, 0, 0, x * 32, y * 32, cliprect, TRANSPARENCY_NONE, 0); + drawgfx_opaque(bitmap,cliprect, screen->machine->gfx[1], tile, colour, 0, 0, x * 32, y * 32); count+=2; } @@ -216,7 +216,7 @@ static VIDEO_UPDATE( norautp ) int tile = np_vram[count] & 0x3f; int colour = (np_vram[count] & 0xc0) >> 6; - drawgfx(bitmap,screen->machine->gfx[0], tile, colour, 0, 0, x * 16, y * 32, cliprect, TRANSPARENCY_NONE, 0); + drawgfx_opaque(bitmap,cliprect, screen->machine->gfx[0], tile, colour, 0, 0, x * 16, y * 32); count++; } diff --git a/src/mame/drivers/olibochu.c b/src/mame/drivers/olibochu.c index b2779724471..a9e84ee1540 100644 --- a/src/mame/drivers/olibochu.c +++ b/src/mame/drivers/olibochu.c @@ -158,12 +158,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[1], code, color, flipx, flipy, - sx, sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx, sy, 0); } /* 8x8 sprites */ @@ -186,12 +185,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[0], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[0], code, color, flipx, flipy, - sx, sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx, sy, 0); } } diff --git a/src/mame/drivers/panicr.c b/src/mame/drivers/panicr.c index 7a2d2e1e4ff..6a519d9dbe8 100644 --- a/src/mame/drivers/panicr.c +++ b/src/mame/drivers/panicr.c @@ -216,10 +216,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan sprite = spriteram[offs+0]+(scrollram[0x0c]<<8); - drawgfx(bitmap,machine->gfx[2], + drawgfx_transmask(bitmap,cliprect,machine->gfx[2], sprite, color,fx,fy,x,y, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[2], color, 0)); } } diff --git a/src/mame/drivers/pcat_nit.c b/src/mame/drivers/pcat_nit.c index da1e0677172..42ecee204f5 100644 --- a/src/mame/drivers/pcat_nit.c +++ b/src/mame/drivers/pcat_nit.c @@ -144,23 +144,21 @@ static void cga_alphanumeric_tilemap(running_machine *machine, bitmap_t *bitmap, tile = (vga_vram[offs] & 0x00ff0000)>>16; color = (vga_vram[offs] & 0xff000000)>>24; - drawgfx(bitmap,machine->gfx[gfx_num], + drawgfx_opaque(bitmap,cliprect,machine->gfx[gfx_num], tile, color, 0,0, - (x+1)*8,y*8, - cliprect,TRANSPARENCY_NONE,0); + (x+1)*8,y*8); tile = (vga_vram[offs] & 0x000000ff); color = (vga_vram[offs] & 0x0000ff00)>>8; - drawgfx(bitmap,machine->gfx[gfx_num], + drawgfx_opaque(bitmap,cliprect,machine->gfx[gfx_num], tile, color, 0,0, - (x+0)*8,y*8, - cliprect,TRANSPARENCY_NONE,0); + (x+0)*8,y*8); offs++; } diff --git a/src/mame/drivers/powerbal.c b/src/mame/drivers/powerbal.c index 2785a6d9c98..74d2cb5ba3f 100644 --- a/src/mame/drivers/powerbal.c +++ b/src/mame/drivers/powerbal.c @@ -429,12 +429,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan code = spriteram16[offs+2]; color = (spriteram16[offs+1] & 0xf000) >> 12; - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code, color, flipx,0, - sx + xoffset,sy + yoffset, - cliprect,TRANSPARENCY_PEN,0); + sx + xoffset,sy + yoffset,0); } } diff --git a/src/mame/drivers/progolf.c b/src/mame/drivers/progolf.c index 4e0b2fd60ea..95581dfb61e 100644 --- a/src/mame/drivers/progolf.c +++ b/src/mame/drivers/progolf.c @@ -92,9 +92,9 @@ static VIDEO_UPDATE( progolf ) { int tile = videoram[count]; - drawgfx(bitmap,screen->machine->gfx[0],tile,1,0,0,(256-x*8)+scroll,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0],tile,1,0,0,(256-x*8)+scroll,y*8); /* wrap-around */ - drawgfx(bitmap,screen->machine->gfx[0],tile,1,0,0,(256-x*8)+scroll-1024,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0],tile,1,0,0,(256-x*8)+scroll-1024,y*8); count++; } diff --git a/src/mame/drivers/pturn.c b/src/mame/drivers/pturn.c index 6c53bedceba..eb5ad374b95 100644 --- a/src/mame/drivers/pturn.c +++ b/src/mame/drivers/pturn.c @@ -158,12 +158,11 @@ static VIDEO_UPDATE(pturn) if(sx|sy) { - drawgfx(bitmap, screen->machine->gfx[2], + drawgfx_transpen(bitmap, cliprect,screen->machine->gfx[2], spriteram[offs+1] & 0x3f , (spriteram[offs+2] & 0x1f), flipx, flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } tilemap_draw(bitmap,cliprect,pturn_fgmap,0,0); diff --git a/src/mame/drivers/pzletime.c b/src/mame/drivers/pzletime.c index 2cdc1b81eb6..60cdc4583b4 100644 --- a/src/mame/drivers/pzletime.c +++ b/src/mame/drivers/pzletime.c @@ -103,7 +103,7 @@ static VIDEO_UPDATE( pzletime ) // is spriteram16[offs+0] & 0x200 flipy? it's always set - drawgfx(bitmap,screen->machine->gfx[1],spr_offs,colour,0,1,sx,sy,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1],spr_offs,colour,0,1,sx,sy,0); } } diff --git a/src/mame/drivers/rabbit.c b/src/mame/drivers/rabbit.c index 99a0b77bd3b..c1749729718 100644 --- a/src/mame/drivers/rabbit.c +++ b/src/mame/drivers/rabbit.c @@ -244,8 +244,8 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if(xpos&0x800)xpos-=0x1000; - drawgfx(rabbit_sprite_bitmap,gfx,tileno,colr,!xflip/*wrongdecode?*/,yflip,xpos+0x20-8/*-(rabbit_spriteregs[0]&0x00000fff)*/,ypos-24/*-((rabbit_spriteregs[1]&0x0fff0000)>>16)*/,&rabbit_sprite_clip,TRANSPARENCY_PEN,0); -// drawgfx(bitmap,gfx,tileno,colr,!xflip/*wrongdecode?*/,yflip,xpos+0xa0-8/*-(rabbit_spriteregs[0]&0x00000fff)*/,ypos-24+0x80/*-((rabbit_spriteregs[1]&0x0fff0000)>>16)*/,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(rabbit_sprite_bitmap,&rabbit_sprite_clip,gfx,tileno,colr,!xflip/*wrongdecode?*/,yflip,xpos+0x20-8/*-(rabbit_spriteregs[0]&0x00000fff)*/,ypos-24/*-((rabbit_spriteregs[1]&0x0fff0000)>>16)*/,0); +// drawgfx_transpen(bitmap,cliprect,gfx,tileno,colr,!xflip/*wrongdecode?*/,yflip,xpos+0xa0-8/*-(rabbit_spriteregs[0]&0x00000fff)*/,ypos-24+0x80/*-((rabbit_spriteregs[1]&0x0fff0000)>>16)*/,0); source-=2; diff --git a/src/mame/drivers/raiden2.c b/src/mame/drivers/raiden2.c index 18d210cc996..e782fec73c2 100644 --- a/src/mame/drivers/raiden2.c +++ b/src/mame/drivers/raiden2.c @@ -240,15 +240,14 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { for (ytiles = 0; ytiles < ytlim; ytiles++) { - drawgfx( + drawgfx_transpen( bitmap, + cliprect, gfx, tile_number, colr, yflip,xflip, - sx+xstep*xtiles,sy+ystep*ytiles, - cliprect, - TRANSPARENCY_PEN,15); + sx+xstep*xtiles,sy+ystep*ytiles,15); tile_number++; } diff --git a/src/mame/drivers/rbmk.c b/src/mame/drivers/rbmk.c index 4c350bd18cb..90c8e1560c8 100644 --- a/src/mame/drivers/rbmk.c +++ b/src/mame/drivers/rbmk.c @@ -440,7 +440,7 @@ static VIDEO_UPDATE(rbmk) for (x=0;x<64;x++) { int tile = gms_vidram2[count+0x600]; - drawgfx(bitmap,screen->machine->gfx[0],(tile&0xfff)+((tilebank&0x10)>>4)*0x1000,tile>>12,0,0,x*8,y*32,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0],(tile&0xfff)+((tilebank&0x10)>>4)*0x1000,tile>>12,0,0,x*8,y*32); count++; } } @@ -452,7 +452,7 @@ static VIDEO_UPDATE(rbmk) for (x=0;x<64;x++) { int tile = gms_vidram[count]; - drawgfx(bitmap,screen->machine->gfx[1],(tile&0xfff)+((tilebank>>1)&3)*0x1000,tile>>12,0,0,x*8,y*8,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1],(tile&0xfff)+((tilebank>>1)&3)*0x1000,tile>>12,0,0,x*8,y*8,0); count++; } } diff --git a/src/mame/drivers/sbrkout.c b/src/mame/drivers/sbrkout.c index 8f062587ec6..b75368e2c3d 100644 --- a/src/mame/drivers/sbrkout.c +++ b/src/mame/drivers/sbrkout.c @@ -316,7 +316,7 @@ static VIDEO_UPDATE( sbrkout ) int sx = 31 * 8 - videoram[0x380 + 0x10 + ball * 2]; int sy = 30 * 8 - videoram[0x380 + 0x18 + ball * 2]; - drawgfx(bitmap, screen->machine->gfx[1], code, 0, 0, 0, sx, sy, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], code, 0, 0, 0, sx, sy, 0); } return 0; } diff --git a/src/mame/drivers/segald.c b/src/mame/drivers/segald.c index c41de8ecbee..193a6ad2d43 100644 --- a/src/mame/drivers/segald.c +++ b/src/mame/drivers/segald.c @@ -45,8 +45,8 @@ static void astron_draw_characters(running_machine *machine, bitmap_t *bitmap,co for (characterY = 0; characterY < 32; characterY++) { int current_screen_character = (characterY*32) + characterX; - drawgfx(bitmap, machine->gfx[0], fix_RAM[current_screen_character], - 1, 0, 0, characterX*8, characterY*8, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[0], fix_RAM[current_screen_character], + 1, 0, 0, characterX*8, characterY*8, 0); } } } diff --git a/src/mame/drivers/skyarmy.c b/src/mame/drivers/skyarmy.c index 4f9214ef598..1b425f47f33 100644 --- a/src/mame/drivers/skyarmy.c +++ b/src/mame/drivers/skyarmy.c @@ -118,12 +118,11 @@ static VIDEO_UPDATE( skyarmy ) sy = 242-spriteram[offs]; flipy = (spriteram[offs+1]&0x80)>>7; flipx = (spriteram[offs+1]&0x40)>>6; - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], spriteram[offs+1]&0x3f, pal, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } return 0; } diff --git a/src/mame/drivers/supdrapo.c b/src/mame/drivers/supdrapo.c index 4c0af3b631f..a9506026e1e 100644 --- a/src/mame/drivers/supdrapo.c +++ b/src/mame/drivers/supdrapo.c @@ -208,7 +208,7 @@ static VIDEO_UPDATE( supdrapo ) /* Global Column Coloring, GUESS! */ color = col_line[(x*2)+1] ? (col_line[(x*2)+1]-1) & 0x7 : 0; - drawgfx(bitmap,screen->machine->gfx[0],tile,color,0,0,x*8,y*8,cliprect,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0],tile,color,0,0,x*8,y*8); count++; } diff --git a/src/mame/drivers/vamphalf.c b/src/mame/drivers/vamphalf.c index a4b749d0bb7..6e0261ca1c6 100644 --- a/src/mame/drivers/vamphalf.c +++ b/src/mame/drivers/vamphalf.c @@ -407,7 +407,7 @@ static void draw_sprites(const device_config *screen, bitmap_t *bitmap) y = 256 - y; } - drawgfx(bitmap,gfx,code,color,fx,fy,x,y,&clip,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,&clip,gfx,code,color,fx,fy,x,y,0); } } } @@ -460,7 +460,7 @@ static void draw_sprites_aoh(const device_config *screen, bitmap_t *bitmap) y = 256 - y; } - drawgfx(bitmap,gfx,code,color,fx,fy,x,y,&clip,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,&clip,gfx,code,color,fx,fy,x,y,0); } } } diff --git a/src/mame/drivers/vroulet.c b/src/mame/drivers/vroulet.c index 399e31ba92d..bc037ed2c11 100644 --- a/src/mame/drivers/vroulet.c +++ b/src/mame/drivers/vroulet.c @@ -94,8 +94,8 @@ static VIDEO_START(vroulet) static VIDEO_UPDATE(vroulet) { tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); - drawgfx(bitmap, screen->machine->gfx[0], 0x320, 1, 0, 0, - vroulet_ball[1], vroulet_ball[0] - 12, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[0], 0x320, 1, 0, 0, + vroulet_ball[1], vroulet_ball[0] - 12, 0); return 0; } diff --git a/src/mame/drivers/witch.c b/src/mame/drivers/witch.c index 62982698eb1..b8993e63519 100644 --- a/src/mame/drivers/witch.c +++ b/src/mame/drivers/witch.c @@ -707,29 +707,25 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta color = flags & 0x0f; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], tileno, color, flipx, flipy, - sx+8*flipx,sy+8*flipy, - cliprect,TRANSPARENCY_PEN,0); + sx+8*flipx,sy+8*flipy,0); - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], tileno+1, color, flipx, flipy, - sx+8-8*flipx,sy+8*flipy, - cliprect,TRANSPARENCY_PEN,0); + sx+8-8*flipx,sy+8*flipy,0); - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], tileno+2, color, flipx, flipy, - sx+8*flipx,sy+8-8*flipy, - cliprect,TRANSPARENCY_PEN,0); + sx+8*flipx,sy+8-8*flipy,0); - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], tileno+3, color, flipx, flipy, - sx+8-8*flipx,sy+8-8*flipy, - cliprect,TRANSPARENCY_PEN,0); + sx+8-8*flipx,sy+8-8*flipy,0); } } diff --git a/src/mame/includes/deco16ic.h b/src/mame/includes/deco16ic.h index 65b615eca13..5da962f0c07 100644 --- a/src/mame/includes/deco16ic.h +++ b/src/mame/includes/deco16ic.h @@ -37,10 +37,10 @@ void deco16_tilemap_4_draw(const device_config *screen, bitmap_t *bitmap, const void deco16_tilemap_34_combine_draw(const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority); void deco16_clear_sprite_priority_bitmap(void); -void deco16_pdrawgfx(running_machine *machine, - bitmap_t *dest,const gfx_element *gfx, +void deco16_pdrawgfx( + bitmap_t *dest,const rectangle *clip,const gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, - const rectangle *clip,int transparent_color,UINT32 pri_mask,UINT32 sprite_mask,UINT8 write_pri,UINT8 alpha); + int transparent_color,UINT32 pri_mask,UINT32 sprite_mask,UINT8 write_pri,UINT8 alpha); tilemap *deco16_get_tilemap(int pf, int size); diff --git a/src/mame/machine/konamigx.c b/src/mame/machine/konamigx.c index cf50a1373eb..cd7e4be82d1 100644 --- a/src/mame/machine/konamigx.c +++ b/src/mame/machine/konamigx.c @@ -305,8 +305,8 @@ void K053936GP_1_zoom_draw(running_machine *machine, bitmap_t *bitmap, const rec pri : 0 = topmost, 255 = backmost (pixel priority) */ -INLINE void zdrawgfxzoom32GP( running_machine *machine, - bitmap_t *bitmap, const gfx_element *gfx, const rectangle *cliprect, +INLINE void zdrawgfxzoom32GP( + bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, int sx, int sy, int scalex, int scaley, int alpha, int drawmode, int zcode, int pri) { @@ -371,8 +371,8 @@ INLINE void zdrawgfxzoom32GP( running_machine *machine, src_fh = 16; src_base = gfx_element_get_data(gfx, code % gfx->total_elements); - pal_base = machine->pens + gfx->color_base + (color % gfx->total_colors) * granularity; - shd_base = machine->shadow_table; + pal_base = gfx->machine->pens + gfx->color_base + (color % gfx->total_colors) * granularity; + shd_base = gfx->machine->shadow_table; dst_ptr = (UINT32 *)bitmap->base; dst_pitch = bitmap->rowpixels; @@ -1662,8 +1662,8 @@ void konamigx_mixer(running_machine *machine, bitmap_t *bitmap, const rectangle if (nozoom) { scaley = scalex = 0x10000; } else { scalex = zw << 12; scaley = zh << 12; }; - zdrawgfxzoom32GP(machine, - bitmap, K053247_gfx, cliprect, + zdrawgfxzoom32GP( + bitmap, cliprect, K053247_gfx, temp, color, temp1,temp2, diff --git a/src/mame/video/1942.c b/src/mame/video/1942.c index f02a596eb35..dc831d71d61 100644 --- a/src/mame/video/1942.c +++ b/src/mame/video/1942.c @@ -226,11 +226,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan do { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code + i,col, flip_screen_get(machine),flip_screen_get(machine), - sx,sy + 16 * i * dir, - cliprect,TRANSPARENCY_PEN,15); + sx,sy + 16 * i * dir,15); i--; } while (i >= 0); diff --git a/src/mame/video/1943.c b/src/mame/video/1943.c index 74a9f130d79..f22ca7de0f0 100644 --- a/src/mame/video/1943.c +++ b/src/mame/video/1943.c @@ -250,16 +250,16 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { if (color != 0x0a && color != 0x0b) { - drawgfx(bitmap, machine->gfx[3], code, color, flip_screen_get(machine), flip_screen_get(machine), - sx, sy, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[3], code, color, flip_screen_get(machine), flip_screen_get(machine), + sx, sy, 0); } } else { if (color == 0x0a || color == 0x0b) { - drawgfx(bitmap, machine->gfx[3], code, color, flip_screen_get(machine), flip_screen_get(machine), - sx, sy, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[3], code, color, flip_screen_get(machine), flip_screen_get(machine), + sx, sy, 0); } } } diff --git a/src/mame/video/40love.c b/src/mame/video/40love.c index a510792c3bf..7a6ba2b4a79 100644 --- a/src/mame/video/40love.c +++ b/src/mame/video/40love.c @@ -303,12 +303,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (spriteram[offs+2] & 0xe0) color = mame_rand(machine)&0xf; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, - sx+fortyl_xoffset,sy, - cliprect,TRANSPARENCY_PEN,0); + sx+fortyl_xoffset,sy,0); } /* spriteram #2 */ @@ -332,12 +331,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (spriteram_2[offs+2] & 0xe0) color = mame_rand(machine)&0xf; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, - sx+fortyl_xoffset,sy, - cliprect,TRANSPARENCY_PEN,0); + sx+fortyl_xoffset,sy,0); } } diff --git a/src/mame/video/actfancr.c b/src/mame/video/actfancr.c index ab3beace1fa..6d5f2eb8821 100644 --- a/src/mame/video/actfancr.c +++ b/src/mame/video/actfancr.c @@ -211,12 +211,11 @@ VIDEO_UPDATE( actfancr ) while (multi >= 0) { - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x,y + mult * multi,0); multi--; } } @@ -296,12 +295,11 @@ VIDEO_UPDATE( triothep ) while (multi >= 0) { - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x,y + mult * multi,0); multi--; } } diff --git a/src/mame/video/aeroboto.c b/src/mame/video/aeroboto.c index b6ec28674e9..b823ad8dc82 100644 --- a/src/mame/video/aeroboto.c +++ b/src/mame/video/aeroboto.c @@ -135,12 +135,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta y = 240 - y; } - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], spriteram[offs+1], spriteram[offs+2] & 0x07, flip_screen_get(machine), flip_screen_get(machine), - ((x + 8) & 0xff) - 8, y, - cliprect, TRANSPARENCY_PEN, 0); + ((x + 8) & 0xff) - 8, y, 0); } } diff --git a/src/mame/video/aerofgt.c b/src/mame/video/aerofgt.c index b355374ca6a..9a03ead7eb5 100644 --- a/src/mame/video/aerofgt.c +++ b/src/mame/video/aerofgt.c @@ -383,13 +383,12 @@ static void aerofgt_draw_sprites(running_machine *machine, bitmap_t *bitmap,cons else code = aerofgt_spriteram2[map_start & 0x1fff] & 0x1fff; - drawgfxzoom(bitmap,machine->gfx[sprite_gfx + (map_start >= 0x2000 ? 1 : 0)], + drawgfxzoom_transpen(bitmap,cliprect,machine->gfx[sprite_gfx + (map_start >= 0x2000 ? 1 : 0)], code, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PEN,15, - zoomx << 11, zoomy << 11); + zoomx << 11, zoomy << 11,15); map_start++; } } @@ -455,14 +454,13 @@ static void turbofrc_draw_sprites(running_machine *machine, bitmap_t *bitmap,con else code = aerofgt_spriteram2[map_start % (aerofgt_spriteram2_size/2)]; - pdrawgfxzoom(bitmap,machine->gfx[sprite_gfx + chip], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[sprite_gfx + chip], code, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PEN,15, zoomx << 11, zoomy << 11, - pri ? 0 : 2); + priority_bitmap,pri ? 0 : 2,15); map_start++; } @@ -530,14 +528,13 @@ static void spinlbrk_draw_sprites(running_machine *machine, bitmap_t *bitmap,con else code = aerofgt_spriteram2[map_start % (aerofgt_spriteram2_size/2)]; - pdrawgfxzoom(bitmap,machine->gfx[sprite_gfx + chip], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[sprite_gfx + chip], code, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PEN,15, zoomx << 11, zoomy << 11, - pri ? 2 : 0); + priority_bitmap,pri ? 2 : 0,15); map_start++; } @@ -606,14 +603,13 @@ static void aerfboo2_draw_sprites(running_machine *machine, bitmap_t *bitmap,con else code = aerofgt_spriteram2[map_start % (aerofgt_spriteram2_size/2)]; - pdrawgfxzoom(bitmap,machine->gfx[sprite_gfx + chip], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[sprite_gfx + chip], code, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PEN,15, zoomx << 11, zoomy << 11, - pri ? 0 : 2); + priority_bitmap,pri ? 0 : 2,15); map_start++; } @@ -642,20 +638,18 @@ static void pspikesb_draw_sprites(running_machine *machine, bitmap_t *bitmap,con flipx = aerofgt_spriteram3[i + 1] & 0x0800; color = aerofgt_spriteram3[i + 1] & 0x000f; - drawgfx(bitmap,machine->gfx[sprite_gfx], + drawgfx_transpen(bitmap,cliprect,machine->gfx[sprite_gfx], code, color, flipx,flipy, - xpos,ypos, - cliprect,TRANSPARENCY_PEN,15); + xpos,ypos,15); /* wrap around y */ - drawgfx(bitmap,machine->gfx[sprite_gfx], + drawgfx_transpen(bitmap,cliprect,machine->gfx[sprite_gfx], code, color, flipx,flipy, - xpos,ypos + 512, - cliprect,TRANSPARENCY_PEN,15); + xpos,ypos + 512,15); } } @@ -685,20 +679,18 @@ static void spikes91_draw_sprites(running_machine *machine, bitmap_t *bitmap,con realcode = (lookup[code] << 8) + lookup[0x10000 + code]; - drawgfx(bitmap,machine->gfx[sprite_gfx], + drawgfx_transpen(bitmap,cliprect,machine->gfx[sprite_gfx], realcode, color, flipx,flipy, - xpos,ypos, - cliprect,TRANSPARENCY_PEN,15); + xpos,ypos,15); /* wrap around y */ - drawgfx(bitmap,machine->gfx[sprite_gfx], + drawgfx_transpen(bitmap,cliprect,machine->gfx[sprite_gfx], realcode, color, flipx,flipy, - xpos,ypos + 512, - cliprect,TRANSPARENCY_PEN,15); + xpos,ypos + 512,15); } } @@ -733,14 +725,13 @@ static void aerfboot_draw_sprites(running_machine *machine, bitmap_t *bitmap,con sx = ((ox + 16 + 3) & 0x1ff) - 16; - pdrawgfxzoom(bitmap,machine->gfx[sprite_gfx + (code >= 0x1000 ? 0 : 1)], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[sprite_gfx + (code >= 0x1000 ? 0 : 1)], code, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PEN,15, zoomx << 11,zoomy << 11, - pri ? 0 : 2); + priority_bitmap,pri ? 0 : 2,15); } @@ -771,14 +762,13 @@ static void aerfboot_draw_sprites(running_machine *machine, bitmap_t *bitmap,con sx = ((ox + 16 + 3) & 0x1ff) - 16; - pdrawgfxzoom(bitmap,machine->gfx[sprite_gfx + (code >= 0x1000 ? 0 : 1)], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[sprite_gfx + (code >= 0x1000 ? 0 : 1)], code, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PEN,15, zoomx << 11,zoomy << 11, - pri ? 0 : 2); + priority_bitmap,pri ? 0 : 2,15); } } @@ -861,12 +851,11 @@ VIDEO_UPDATE( spikes91 ) { UINT16 tileno = spikes91_tx_tilemap_ram[count]&0x1fff; UINT16 colour = spikes91_tx_tilemap_ram[count]&0xe000; - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,cliprect,gfx, tileno, colour>>13, 0,0, - (x*8)+24,(y*8)+8, - cliprect,TRANSPARENCY_PEN,15); + (x*8)+24,(y*8)+8,15); count++; diff --git a/src/mame/video/alpha68k.c b/src/mame/video/alpha68k.c index 652a868823b..f0c508b841a 100644 --- a/src/mame/video/alpha68k.c +++ b/src/mame/video/alpha68k.c @@ -116,12 +116,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta } if (color) - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], tile, color, fx,fy, - mx,my, - cliprect,TRANSPARENCY_PEN,0); + mx,my,0); if (flipscreen) my=(my-16)&0x1ff; @@ -257,12 +256,11 @@ static void draw_sprites_V(running_machine *machine, bitmap_t *bitmap, const rec } if (color) - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], tile, color, fx,fy, - mx,my, - cliprect,TRANSPARENCY_PEN,0); + mx,my,0); if (flipscreen) my=(my-16)&0x1ff; @@ -350,8 +348,7 @@ static void draw_sprites_I(running_machine *machine, bitmap_t *bitmap, const rec fy = data & 0x4000; color = color_prom[tile<<1|data>>15]; - drawgfx(bitmap, gfx, tile, color, 0, fy, mx, my, - cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, gfx, tile, color, 0, fy, mx, my, 0); my = (my + 8) & 0xff; } @@ -473,8 +470,7 @@ static void kyros_draw_sprites(running_machine *machine, bitmap_t *bitmap, const tile = (data>>3 & 0x400) | (data & 0x3ff); alpha68k_video_banking(&bank, data); - drawgfx(bitmap, machine->gfx[bank], tile, color, fx, fy, mx, my, - cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[bank], tile, color, fx, fy, mx, my, 0); } } //ZT @@ -532,8 +528,7 @@ static void sstingry_draw_sprites(running_machine *machine, bitmap_t *bitmap, co color = (data>>7 & 0x18) | (data>>13 & 7); tile = data & 0x3ff; bank = data>>10 & 3; - drawgfx(bitmap, machine->gfx[bank], tile, color, fx, fy, mx, my, - cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[bank], tile, color, fx, fy, mx, my, 0); } //ZT if(flipscreen) diff --git a/src/mame/video/ambush.c b/src/mame/video/ambush.c index 82695f4a39a..793ea57e75f 100644 --- a/src/mame/video/ambush.c +++ b/src/mame/video/ambush.c @@ -159,11 +159,10 @@ VIDEO_UPDATE( ambush ) flipy = !flipy; } - drawgfx(bitmap,screen->machine->gfx[gfx], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[gfx], code, col | ((*ambush_colorbank & 0x03) << 4), flipx, flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } diff --git a/src/mame/video/amspdwy.c b/src/mame/video/amspdwy.c index c0c04d67b8a..b3a01c0b0a1 100644 --- a/src/mame/video/amspdwy.c +++ b/src/mame/video/amspdwy.c @@ -123,13 +123,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan flipx = !flipx; flipy = !flipy; } - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], // code + ((attr & 0x18)<<5), code + ((attr & 0x08)<<5), attr, flipx, flipy, - x,y, - cliprect,TRANSPARENCY_PEN,0 ); + x,y,0 ); } } diff --git a/src/mame/video/angelkds.c b/src/mame/video/angelkds.c index c19e8a02468..82078543532 100644 --- a/src/mame/video/angelkds.c +++ b/src/mame/video/angelkds.c @@ -177,52 +177,48 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (enable & enable_n) { - drawgfx( + drawgfx_transpen( bitmap, + cliprect, gfx, tile_no, color*4, flipx,flipy, - xpos,ypos, - cliprect, - TRANSPARENCY_PEN,15 + xpos,ypos,15 ); /* wraparound */ if (xpos > 240) - drawgfx( + drawgfx_transpen( bitmap, + cliprect, gfx, tile_no, color*4, flipx,flipy, - xpos-256,ypos, - cliprect, - TRANSPARENCY_PEN,15 + xpos-256,ypos,15 ); /* wraparound */ if (ypos > 240) { - drawgfx( + drawgfx_transpen( bitmap, + cliprect, gfx, tile_no, color*4, flipx,flipy, - xpos,ypos-256, - cliprect, - TRANSPARENCY_PEN,15 + xpos,ypos-256,15 ); /* wraparound */ if (xpos > 240) - drawgfx( + drawgfx_transpen( bitmap, + cliprect, gfx, tile_no, color*4, flipx,flipy, - xpos-256,ypos-256, - cliprect, - TRANSPARENCY_PEN,15 + xpos-256,ypos-256,15 ); } diff --git a/src/mame/video/appoooh.c b/src/mame/video/appoooh.c index b90717540c7..175f10c0951 100644 --- a/src/mame/video/appoooh.c +++ b/src/mame/video/appoooh.c @@ -206,13 +206,14 @@ WRITE8_HANDLER( appoooh_out_w ) /* bit 7 unknown (used) */ } -static void appoooh_draw_sprites(running_machine *machine, +static void appoooh_draw_sprites( bitmap_t *dest_bmp, const rectangle *cliprect, const gfx_element *gfx, UINT8 *sprite) { int offs; + int flipy = flip_screen_get(gfx->machine); for (offs = 0x20 - 4;offs >= 0;offs -= 4) { @@ -224,29 +225,29 @@ static void appoooh_draw_sprites(running_machine *machine, if(sx>=248) sx -= 256; - if (flip_screen_get(machine)) + if (flipy) { sx = 239 - sx; sy = 239 - sy; flipx = !flipx; } - drawgfx( dest_bmp, gfx, + drawgfx_transpen( dest_bmp, cliprect, + gfx, code, color, - flipx,flip_screen_get(machine), - sx, sy, - cliprect, - TRANSPARENCY_PEN , 0); + flipx,flipy, + sx, sy, 0); } } -static void robowres_draw_sprites(running_machine *machine, +static void robowres_draw_sprites( bitmap_t *dest_bmp, const rectangle *cliprect, const gfx_element *gfx, UINT8 *sprite) { int offs; + int flipy = flip_screen_get(gfx->machine); for (offs = 0x20 - 4;offs >= 0;offs -= 4) { @@ -258,19 +259,18 @@ static void robowres_draw_sprites(running_machine *machine, if(sx>=248) sx -= 256; - if (flip_screen_get(machine)) + if (flipy) { sx = 239 - sx; sy = 239 - sy; flipx = !flipx; } - drawgfx( dest_bmp, gfx, + drawgfx_transpen( dest_bmp, cliprect, + gfx, code, color, - flipx,flip_screen_get(machine), - sx, sy, - cliprect, - TRANSPARENCY_PEN , 0); + flipx,flipy, + sx, sy, 0); } } @@ -286,16 +286,16 @@ VIDEO_UPDATE( appoooh ) if (priority == 1) { /* sprite set #1 */ - appoooh_draw_sprites( screen->machine, bitmap, cliprect, screen->machine->gfx[2],spriteram); + appoooh_draw_sprites( bitmap, cliprect, screen->machine->gfx[2],spriteram); /* sprite set #2 */ - appoooh_draw_sprites( screen->machine, bitmap, cliprect, screen->machine->gfx[3],spriteram_2); + appoooh_draw_sprites( bitmap, cliprect, screen->machine->gfx[3],spriteram_2); } else { /* sprite set #2 */ - appoooh_draw_sprites( screen->machine, bitmap, cliprect, screen->machine->gfx[3],spriteram_2); + appoooh_draw_sprites( bitmap, cliprect, screen->machine->gfx[3],spriteram_2); /* sprite set #1 */ - appoooh_draw_sprites( screen->machine, bitmap, cliprect, screen->machine->gfx[2],spriteram); + appoooh_draw_sprites( bitmap, cliprect, screen->machine->gfx[2],spriteram); } if (priority != 0) /* fg in front of sprites */ @@ -314,16 +314,16 @@ VIDEO_UPDATE( robowres ) if (priority == 1) { /* sprite set #1 */ - robowres_draw_sprites( screen->machine, bitmap, cliprect, screen->machine->gfx[2],spriteram); + robowres_draw_sprites( bitmap, cliprect, screen->machine->gfx[2],spriteram); /* sprite set #2 */ - robowres_draw_sprites( screen->machine, bitmap, cliprect, screen->machine->gfx[3],spriteram_2); + robowres_draw_sprites( bitmap, cliprect, screen->machine->gfx[3],spriteram_2); } else { /* sprite set #2 */ - robowres_draw_sprites( screen->machine, bitmap, cliprect, screen->machine->gfx[3],spriteram_2); + robowres_draw_sprites( bitmap, cliprect, screen->machine->gfx[3],spriteram_2); /* sprite set #1 */ - robowres_draw_sprites( screen->machine, bitmap, cliprect, screen->machine->gfx[2],spriteram); + robowres_draw_sprites( bitmap, cliprect, screen->machine->gfx[2],spriteram); } if (priority != 0) /* fg in front of sprites */ diff --git a/src/mame/video/aquarium.c b/src/mame/video/aquarium.c index 81033947766..5468463718b 100644 --- a/src/mame/video/aquarium.c +++ b/src/mame/video/aquarium.c @@ -46,20 +46,18 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan for (chain_pos = chain;chain_pos >= 0;chain_pos--) { - drawgfx(bitmap, machine->gfx[0], + drawgfx_transpen(bitmap, cliprect,machine->gfx[0], code, col, flipx, flipy, - curx,cury, - cliprect,TRANSPARENCY_PEN,0); + curx,cury,0); /* wrap around y */ - drawgfx(bitmap, machine->gfx[0], + drawgfx_transpen(bitmap, cliprect,machine->gfx[0], code, col, flipx, flipy, - curx,cury+256, - cliprect,TRANSPARENCY_PEN,0); + curx,cury+256,0); code++; diff --git a/src/mame/video/argus.c b/src/mame/video/argus.c index 9270d1857a5..ecec96134e3 100644 --- a/src/mame/video/argus.c +++ b/src/mame/video/argus.c @@ -900,13 +900,12 @@ static void argus_draw_sprites(running_machine *machine, bitmap_t *bitmap, const } if (priority != pri) - jal_blend_drawgfx(machine, - bitmap,machine->gfx[0], + jal_blend_drawgfx( + bitmap,cliprect,machine->gfx[0], tile, color, flipx, flipy, sx, sy, - cliprect, TRANSPARENCY_PEN, 15); } } @@ -1033,13 +1032,12 @@ static void valtric_draw_sprites(running_machine *machine, bitmap_t *bitmap, con flipy = !flipy; } - jal_blend_drawgfx(machine, - bitmap,machine->gfx[0], + jal_blend_drawgfx( + bitmap,cliprect,machine->gfx[0], tile, color, flipx, flipy, sx, sy, - cliprect, TRANSPARENCY_PEN, 15); } } @@ -1084,13 +1082,12 @@ static void butasan_draw_sprites(running_machine *machine, bitmap_t *bitmap, con if ((offs >= 0x100 && offs <= 0x2ff) || (offs >= 0x400 && offs <= 0x57f)) { - jal_blend_drawgfx(machine, - bitmap,machine->gfx[0], + jal_blend_drawgfx( + bitmap,cliprect,machine->gfx[0], tile, color, flipx, flipy, sx, sy, - cliprect, TRANSPARENCY_PEN, 7); } else if ((offs >= 0x000 && offs <= 0x0ff) || (offs >= 0x300 && offs <= 0x3ff)) @@ -1099,13 +1096,12 @@ static void butasan_draw_sprites(running_machine *machine, bitmap_t *bitmap, con { td = (fx) ? (1 - i) : i; - jal_blend_drawgfx(machine, - bitmap,machine->gfx[0], + jal_blend_drawgfx( + bitmap,cliprect,machine->gfx[0], tile + td, color, flipx, flipy, sx + i * 16, sy, - cliprect, TRANSPARENCY_PEN, 7); } } @@ -1120,13 +1116,12 @@ static void butasan_draw_sprites(running_machine *machine, bitmap_t *bitmap, con else td = (fx) ? (i * 2) + 1 - j : i * 2 + j; - jal_blend_drawgfx(machine, - bitmap,machine->gfx[0], + jal_blend_drawgfx( + bitmap,cliprect,machine->gfx[0], tile + td, color, flipx, flipy, sx + j * 16, sy - i * 16, - cliprect, TRANSPARENCY_PEN, 7); } } @@ -1142,13 +1137,12 @@ static void butasan_draw_sprites(running_machine *machine, bitmap_t *bitmap, con else td = (fx) ? (i * 4) + 3 - j : i * 4 + j; - jal_blend_drawgfx(machine, - bitmap,machine->gfx[0], + jal_blend_drawgfx( + bitmap,cliprect,machine->gfx[0], tile + td, color, flipx, flipy, sx + j * 16, sy - i * 16, - cliprect, TRANSPARENCY_PEN, 7); } } diff --git a/src/mame/video/arkanoid.c b/src/mame/video/arkanoid.c index d3ae2caf056..e71c0e9bba9 100644 --- a/src/mame/video/arkanoid.c +++ b/src/mame/video/arkanoid.c @@ -153,18 +153,16 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta code = spriteram[offs + 3] + ((spriteram[offs + 2] & 0x03) << 8) + 1024 * gfxbank; - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], 2 * code, ((spriteram[offs + 2] & 0xf8) >> 3) + 32 * palettebank, flip_screen_x_get(machine),flip_screen_y_get(machine), - sx,sy + (flip_screen_y_get(machine) ? 8 : -8), - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[0], + sx,sy + (flip_screen_y_get(machine) ? 8 : -8),0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], 2 * code + 1, ((spriteram[offs + 2] & 0xf8) >> 3) + 32 * palettebank, flip_screen_x_get(machine),flip_screen_y_get(machine), - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/armedf.c b/src/mame/video/armedf.c index dc6fd352a1c..3c9f6c02291 100644 --- a/src/mame/video/armedf.c +++ b/src/mame/video/armedf.c @@ -251,12 +251,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (((buffered_spriteram16[offs+0] & 0x3000) >> 12) == priority) { - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code & 0xfff, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); } } } diff --git a/src/mame/video/atarifb.c b/src/mame/video/atarifb.c index 1929a22e3ad..7e4a6d4c998 100644 --- a/src/mame/video/atarifb.c +++ b/src/mame/video/atarifb.c @@ -153,18 +153,16 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { shade = ((spriteram[obj*2+1 + 0x20]) & 0x07); - drawgfx(bitmap,machine->gfx[gfx + 1], + drawgfx_transpen(bitmap,&bigfield_area,machine->gfx[gfx + 1], charcode, shade, - flipx,flipy,sx,sy, - &bigfield_area,TRANSPARENCY_PEN,0); + flipx,flipy,sx,sy,0); shade = ((spriteram[obj*2+1 + 0x20]) & 0x08) >> 3; } - drawgfx(bitmap,machine->gfx[gfx], + drawgfx_transpen(bitmap,&bigfield_area,machine->gfx[gfx], charcode, shade, - flipx,flipy,sx,sy, - &bigfield_area,TRANSPARENCY_PEN,0); + flipx,flipy,sx,sy,0); /* If this isn't soccer, handle the multiplexed sprites */ if (!is_soccer) @@ -174,10 +172,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if ((charcode == 0x11) && (sy == 0x07)) { sy = 0xf1; /* When multiplexed, it's 0x10...why? */ - drawgfx(bitmap,machine->gfx[gfx], + drawgfx_transpen(bitmap,&bigfield_area,machine->gfx[gfx], charcode, 0, - flipx,flipy,sx,sy, - &bigfield_area,TRANSPARENCY_PEN,0); + flipx,flipy,sx,sy,0); } } } diff --git a/src/mame/video/bagman.c b/src/mame/video/bagman.c index 65126cb0f0f..1ead4d8b2e0 100644 --- a/src/mame/video/bagman.c +++ b/src/mame/video/bagman.c @@ -133,12 +133,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta } if (spriteram[offs + 2] && spriteram[offs + 3]) - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,/* compensate misplacement */ + cliprect,machine->gfx[1], (spriteram[offs] & 0x3f) + 2 * (spriteram[offs + 1] & 0x20), spriteram[offs + 1] & 0x1f, flipx,flipy, - sx,sy+1, /* compensate misplacement */ - cliprect,TRANSPARENCY_PEN,0); + sx,sy+1,0); } } diff --git a/src/mame/video/baraduke.c b/src/mame/video/baraduke.c index 207c4005bd5..65d9c313a6a 100644 --- a/src/mame/video/baraduke.c +++ b/src/mame/video/baraduke.c @@ -273,13 +273,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { for (x = 0;x <= sizex;x++) { - drawgfx( bitmap, machine->gfx[3], + drawgfx_transpen( bitmap, cliprect,machine->gfx[3], sprite + gfx_offs[y ^ (sizey * flipy)][x ^ (sizex * flipx)], color, flipx,flipy, -71 + ((sx + 16*x) & 0x1ff), - 1 + ((sy + 16*y) & 0xff), - cliprect,TRANSPARENCY_PEN,0xf); + 1 + ((sy + 16*y) & 0xff),0xf); } } } diff --git a/src/mame/video/battlane.c b/src/mame/video/battlane.c index 70f7db984bc..02b68e1288d 100644 --- a/src/mame/video/battlane.c +++ b/src/mame/video/battlane.c @@ -190,25 +190,23 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect, + machine->gfx[0], code, color, flipx, flipy, - sx, sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx, sy, 0); if (attr & 0x10) /* Double Y direction */ { dy = flipy ? 16 : -16; - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect, + machine->gfx[0], code + 1, color, flipx, flipy, - sx, sy + dy, - cliprect, - TRANSPARENCY_PEN, 0); + sx, sy + dy, 0); } } } diff --git a/src/mame/video/battlera.c b/src/mame/video/battlera.c index 18a4521df33..89357b7bc84 100644 --- a/src/mame/video/battlera.c +++ b/src/mame/video/battlera.c @@ -285,20 +285,18 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan if (fy) { my += 16*(cgy-1); yinc = -16; } /* Swap tile order on Y flips */ for (i=0; i<cgy; i++) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,clip,machine->gfx[1], code, colour, fx,fy, - mx,my, - clip,TRANSPARENCY_PEN,0); + mx,my,0); if (cgx) - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,clip,machine->gfx[1], code2, colour, fx,fy, - mx+16,my, - clip,TRANSPARENCY_PEN,0); + mx+16,my,0); my += yinc; /* if (cgx) */ /* Different from console? */ code += 2; @@ -333,24 +331,21 @@ VIDEO_UPDATE( battlera ) /* If this tile was changed OR tilemap was changed, redraw */ if (vram_dirty[offs/2]) { vram_dirty[offs/2]=0; - drawgfx(tile_bitmap,screen->machine->gfx[0], + drawgfx_opaque(tile_bitmap,0,screen->machine->gfx[0], code, HuC6270_vram[offs] >> 4, 0,0, - 8*mx,8*my, - 0,TRANSPARENCY_NONE,0); - drawgfx(front_bitmap,screen->machine->gfx[2], + 8*mx,8*my); + drawgfx_opaque(front_bitmap,0,screen->machine->gfx[2], 0, 0, /* fill the spot with pen 256 */ 0,0, - 8*mx,8*my, - 0,TRANSPARENCY_NONE,0); - drawgfx(front_bitmap,screen->machine->gfx[0], + 8*mx,8*my); + drawgfx_transmask(front_bitmap,0,screen->machine->gfx[0], code, HuC6270_vram[offs] >> 4, 0,0, - 8*mx,8*my, - 0,TRANSPARENCY_PENS,0x1); + 8*mx,8*my,0x1); } } diff --git a/src/mame/video/battlex.c b/src/mame/video/battlex.c index a850b806ffa..356d2d7516f 100644 --- a/src/mame/video/battlex.c +++ b/src/mame/video/battlex.c @@ -104,7 +104,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,gfx,tile,color,flipx,flipy,sx,sy,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,tile,color,flipx,flipy,sx,sy,0); source += 4; } diff --git a/src/mame/video/bigevglf.c b/src/mame/video/bigevglf.c index a32cf10d842..5889c613607 100644 --- a/src/mame/video/bigevglf.c +++ b/src/mame/video/bigevglf.c @@ -79,12 +79,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta sx = bigevglf_spriteram2[i+3]; sy = 200-bigevglf_spriteram2[i]; for(j=0;j<16;j++) - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], bigevglf_spriteram1[(code<<4)+j]+((bigevglf_spriteram1[0x400+(code<<4)+j]&0xf)<<8), bigevglf_spriteram2[i+2] & 0xf, 0,0, - sx+((j&1)<<3),sy+((j>>1)<<3), - cliprect,TRANSPARENCY_PEN,0); + sx+((j&1)<<3),sy+((j>>1)<<3),0); } } diff --git a/src/mame/video/bigstrkb.c b/src/mame/video/bigstrkb.c index bfdd8cade0b..1945aea6668 100644 --- a/src/mame/video/bigstrkb.c +++ b/src/mame/video/bigstrkb.c @@ -44,7 +44,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipx = attr & 0x0100; col = attr & 0x000f; - drawgfx(bitmap,gfx,num,col,flipx,0,xpos,ypos,cliprect,TRANSPARENCY_PEN,15); + drawgfx_transpen(bitmap,cliprect,gfx,num,col,flipx,0,xpos,ypos,15); source+=8; } } diff --git a/src/mame/video/bionicc.c b/src/mame/video/bionicc.c index 36ecac23fff..27ef3bba76b 100644 --- a/src/mame/video/bionicc.c +++ b/src/mame/video/bionicc.c @@ -219,12 +219,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx( bitmap, gfx, + drawgfx_transpen( bitmap, cliprect,gfx, tile_number, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); } } } diff --git a/src/mame/video/bking.c b/src/mame/video/bking.c index 589778a0c10..02a95b96d69 100644 --- a/src/mame/video/bking.c +++ b/src/mame/video/bking.c @@ -258,28 +258,25 @@ VIDEO_UPDATE( bking ) /* draw the balls */ - drawgfx(bitmap, screen->machine->gfx[2], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[2], ball1_pic, palette_bank, 0, 0, - xld1, yld1, - cliprect, TRANSPARENCY_PEN, 0); + xld1, yld1, 0); - drawgfx(bitmap, screen->machine->gfx[3], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[3], ball2_pic, palette_bank, 0, 0, - xld2, yld2, - cliprect, TRANSPARENCY_PEN, 0); + xld2, yld2, 0); /* draw the crow */ - drawgfx(bitmap, screen->machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], crow_pic, palette_bank, crow_flip, crow_flip, - crow_flip ? xld3 - 16 : 256 - xld3, crow_flip ? yld3 - 16 : 256 - yld3, - cliprect, TRANSPARENCY_PEN, 0); + crow_flip ? xld3 - 16 : 256 - xld3, crow_flip ? yld3 - 16 : 256 - yld3, 0); return 0; } @@ -298,12 +295,11 @@ VIDEO_EOF( bking ) xld = xld1; yld = yld1; - drawgfx(helper1, machine->gfx[2], + drawgfx_opaque(helper1, &rect, machine->gfx[2], ball1_pic, 0, 0, 0, - 0, 0, - &rect, TRANSPARENCY_NONE, 0); + 0, 0); latch = 0x0C00; } @@ -313,12 +309,11 @@ VIDEO_EOF( bking ) xld = xld2; yld = yld2; - drawgfx(helper1, machine->gfx[3], + drawgfx_opaque(helper1, &rect, machine->gfx[3], ball2_pic, 0, 0, 0, - 0, 0, - &rect, TRANSPARENCY_NONE, 0); + 0, 0); latch = 0x0400; } diff --git a/src/mame/video/blktiger.c b/src/mame/video/blktiger.c index 19499635af5..fc64b8efe89 100644 --- a/src/mame/video/blktiger.c +++ b/src/mame/video/blktiger.c @@ -215,12 +215,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipx = !flipx; } - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code, color, flipx,flip_screen_get(machine), - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); } } diff --git a/src/mame/video/blmbycar.c b/src/mame/video/blmbycar.c index 83d02d68193..4dcfbac666b 100644 --- a/src/mame/video/blmbycar.c +++ b/src/mame/video/blmbycar.c @@ -200,13 +200,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta x = (x & 0x1ff) - 0x10; y = 0xf0 - ((y & 0xff) - (y & 0x100)); - pdrawgfx( bitmap, machine->gfx[0], + pdrawgfx_transpen( bitmap, cliprect, machine->gfx[0], code, 0x20 + (attr & 0xf), flipx, flipy, x, y, - cliprect, TRANSPARENCY_PEN,0, - pri_mask ); + priority_bitmap, + pri_mask,0 ); } } diff --git a/src/mame/video/bloodbro.c b/src/mame/video/bloodbro.c index 0cbe586a290..cb42601f36f 100644 --- a/src/mame/video/bloodbro.c +++ b/src/mame/video/bloodbro.c @@ -170,13 +170,13 @@ static void bloodbro_draw_sprites(running_machine *machine, bitmap_t *bitmap, co { for (y = 0;y <= height;y++) { - pdrawgfx(bitmap,machine->gfx[3], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[3], tile_number++, color, flipx,flipy, flipx ? (sx + 16*(width-x)) : (sx + 16*x),flipy ? (sy + 16*(height-y)) : (sy + 16*y), - cliprect,TRANSPARENCY_PEN,15, - pri_mask); + priority_bitmap, + pri_mask,15); } } } @@ -214,13 +214,13 @@ static void weststry_draw_sprites(running_machine *machine, bitmap_t *bitmap, co /* Remap code 0x800 <-> 0x1000 */ code = (code&0x7ff) | ((code&0x800)<<1) | ((code&0x1000)>>1); - pdrawgfx(bitmap,machine->gfx[3], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[3], code, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PEN,15, - pri_mask); + priority_bitmap, + pri_mask,15); } } diff --git a/src/mame/video/blueprnt.c b/src/mame/video/blueprnt.c index 7b36d594301..c76cc228bd4 100644 --- a/src/mame/video/blueprnt.c +++ b/src/mame/video/blueprnt.c @@ -106,8 +106,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta } // sprites are slightly misplaced, regardless of the screen flip - drawgfx(bitmap, machine->gfx[1], code, 0, flipx, flipy, 2+sx, sy-1, - cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code, 0, flipx, flipy, 2+sx, sy-1, 0); } } diff --git a/src/mame/video/bogeyman.c b/src/mame/video/bogeyman.c index 7e860ef6987..f0c4b8cab8e 100644 --- a/src/mame/video/bogeyman.c +++ b/src/mame/video/bogeyman.c @@ -126,21 +126,19 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[2], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[2], code, color, flipx, flipy, - sx, sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx, sy, 0); if (multi) { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect, + machine->gfx[2], code + 1, color, flipx, flipy, - sx, sy + (flip_screen_get(machine) ? -16 : 16), - cliprect, - TRANSPARENCY_PEN, 0); + sx, sy + (flip_screen_get(machine) ? -16 : 16), 0); } } } diff --git a/src/mame/video/bombjack.c b/src/mame/video/bombjack.c index f19a2583364..5ea8f2e9187 100644 --- a/src/mame/video/bombjack.c +++ b/src/mame/video/bombjack.c @@ -122,12 +122,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,machine->gfx[(spriteram[offs] & 0x80) ? 3 : 2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[(spriteram[offs] & 0x80) ? 3 : 2], spriteram[offs] & 0x7f, spriteram[offs+1] & 0x0f, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/boogwing.c b/src/mame/video/boogwing.c index a29e6be4015..16df24de5c6 100644 --- a/src/mame/video/boogwing.c +++ b/src/mame/video/boogwing.c @@ -117,13 +117,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan while (multi >= 0) { - deco16_pdrawgfx(machine, - bitmap,machine->gfx[gfx_region], + deco16_pdrawgfx( + bitmap, cliprect, machine->gfx[gfx_region], sprite - multi * inc, colour, fx,fy, x,y + mult * multi, - cliprect, 0, pri, spri, 0, alpha); + 0, pri, spri, 0, alpha); multi--; } diff --git a/src/mame/video/bosco.c b/src/mame/video/bosco.c index b7847795bdf..0172c30e30b 100644 --- a/src/mame/video/bosco.c +++ b/src/mame/video/bosco.c @@ -224,12 +224,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int color = spriteram_2[offs + 1] & 0x3f; if (flip_screen_get(machine)) sx += 32-2; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transmask(bitmap,cliprect,machine->gfx[1], (spriteram[offs] & 0xfc) >> 2, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0x0f)); } } @@ -247,12 +246,11 @@ static void draw_bullets(running_machine *machine, bitmap_t *bitmap, const recta y = 253 - bosco_radary[offs]; if (flip_screen_get(machine)) x -= 3; - drawgfx(bitmap,machine->gfx[2], + drawgfx_transmask(bitmap,cliprect,machine->gfx[2], ((bosco_radarattr[offs] & 0x0e) >> 1) ^ 0x07, 0, 0,0, - x,y, - cliprect,TRANSPARENCY_PENS,0xf0); + x,y,0xf0); } } diff --git a/src/mame/video/boxer.c b/src/mame/video/boxer.c index c421191af41..b8ecd6c3e49 100644 --- a/src/mame/video/boxer.c +++ b/src/mame/video/boxer.c @@ -35,25 +35,23 @@ static void draw_boxer(running_machine *machine, bitmap_t* bitmap, const rectang code = p[32 * l + 4 * i + j]; - drawgfx(bitmap, machine->gfx[n], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[n], code, 0, code & 0x80, 0, x + 8 * j, - y + 8 * i, - cliprect, - TRANSPARENCY_PEN, 1); + y + 8 * i, 1); code = p[32 * r + 4 * i - j + 3]; - drawgfx(bitmap, machine->gfx[n], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[n], code, 0, !(code & 0x80), 0, x + 8 * j + 32, - y + 8 * i, - cliprect, - TRANSPARENCY_PEN, 1); + y + 8 * i, 1); } } } @@ -73,14 +71,13 @@ VIDEO_UPDATE( boxer ) { UINT8 code = boxer_tile_ram[32 * i + j]; - drawgfx(bitmap, screen->machine->gfx[2], + drawgfx_transpen(bitmap, cliprect, + screen->machine->gfx[2], code, 0, code & 0x40, code & 0x40, 8 * j + 4, - 8 * (i % 2) + 32 * (i / 2), - cliprect, - TRANSPARENCY_PEN, 0); + 8 * (i % 2) + 32 * (i / 2), 0); } } diff --git a/src/mame/video/brkthru.c b/src/mame/video/brkthru.c index 83198b8fa2d..74641c7cd86 100644 --- a/src/mame/video/brkthru.c +++ b/src/mame/video/brkthru.c @@ -210,50 +210,44 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (spriteram[offs] & 0x10) /* double height */ { - drawgfx(bitmap,machine->gfx[9], + drawgfx_transpen(bitmap,cliprect,machine->gfx[9], code & ~1, color, flipscreen,flipscreen, - sx,flipscreen? sy + 16 : sy - 16, - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[9], + sx,flipscreen? sy + 16 : sy - 16,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[9], code | 1, color, flipscreen,flipscreen, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); /* redraw with wraparound */ - drawgfx(bitmap,machine->gfx[9], + drawgfx_transpen(bitmap,cliprect,machine->gfx[9], code & ~1, color, flipscreen,flipscreen, - sx,(flipscreen? sy + 16 : sy - 16) + 256, - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[9], + sx,(flipscreen? sy + 16 : sy - 16) + 256,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[9], code | 1, color, flipscreen,flipscreen, - sx,sy + 256, - cliprect,TRANSPARENCY_PEN,0); + sx,sy + 256,0); } else { - drawgfx(bitmap,machine->gfx[9], + drawgfx_transpen(bitmap,cliprect,machine->gfx[9], code, color, flipscreen,flipscreen, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); /* redraw with wraparound */ - drawgfx(bitmap,machine->gfx[9], + drawgfx_transpen(bitmap,cliprect,machine->gfx[9], code, color, flipscreen,flipscreen, - sx,sy + 256, - cliprect,TRANSPARENCY_PEN,0); + sx,sy + 256,0); } } diff --git a/src/mame/video/bsktball.c b/src/mame/video/bsktball.c index 7480641b287..faae98abf9c 100644 --- a/src/mame/video/bsktball.c +++ b/src/mame/video/bsktball.c @@ -48,10 +48,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rect pic = (pic & 0x3F); color = (color & 0x3F); - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], pic, color, - flipx,0,sx,sy, - cliprect,TRANSPARENCY_PEN,0); + flipx,0,sx,sy,0); } } diff --git a/src/mame/video/btime.c b/src/mame/video/btime.c index 9b985c88377..35c12349a0c 100644 --- a/src/mame/video/btime.c +++ b/src/mame/video/btime.c @@ -371,22 +371,20 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta y = y - sprite_y_adjust; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite_ram[offs + interleave], color, flipx,flipy, - x, y, - cliprect,TRANSPARENCY_PEN,0); + x, y,0); y = y + (flip_screen_get(machine) ? -256 : 256); // Wrap around - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite_ram[offs + interleave], color, flipx,flipy, - x,y, - cliprect,TRANSPARENCY_PEN,0); + x,y,0); } } @@ -418,12 +416,11 @@ static void draw_background(running_machine *machine, bitmap_t *bitmap, const re y = 256 - y; } - drawgfx(bitmap, machine->gfx[2], + drawgfx_opaque(bitmap, cliprect,machine->gfx[2], gfx[tileoffset + offs], color, flip_screen_get(machine),flip_screen_get(machine), - x,y, - cliprect,TRANSPARENCY_NONE,0); + x,y); } } } @@ -517,12 +514,11 @@ VIDEO_UPDATE( bnj ) sy = 256 - sy; } - drawgfx(background_bitmap, screen->machine->gfx[2], + drawgfx_opaque(background_bitmap, 0, screen->machine->gfx[2], (bnj_backgroundram[offs] >> 4) + ((offs & 0x80) >> 3) + 32, 0, flip_screen_get(screen->machine), flip_screen_get(screen->machine), - sx, sy, - 0, TRANSPARENCY_NONE, 0); + sx, sy); } /* copy the background bitmap to the screen */ @@ -564,12 +560,11 @@ VIDEO_UPDATE( cookrace ) sy = 33 - sy; } - drawgfx(bitmap, screen->machine->gfx[2], + drawgfx_opaque(bitmap, cliprect, screen->machine->gfx[2], bnj_backgroundram[offs], 0, flip_screen_get(screen->machine), flip_screen_get(screen->machine), - 8*sx,8*sy, - cliprect, TRANSPARENCY_NONE, 0); + 8*sx,8*sy); } draw_chars(screen->machine, bitmap, cliprect, TRANSPARENCY_PEN, 0, -1); diff --git a/src/mame/video/bublbobl.c b/src/mame/video/bublbobl.c index c26b4f4d231..d73610b79c5 100644 --- a/src/mame/video/bublbobl.c +++ b/src/mame/video/bublbobl.c @@ -86,12 +86,11 @@ VIDEO_UPDATE( bublbobl ) flipy = !flipy; } - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], code, color, flipx,flipy, - x,y, - cliprect,TRANSPARENCY_PEN,15); + x,y,15); } } diff --git a/src/mame/video/buggychl.c b/src/mame/video/buggychl.c index cd78b49a921..97ed80fc3f1 100644 --- a/src/mame/video/buggychl.c +++ b/src/mame/video/buggychl.c @@ -111,12 +111,11 @@ static void draw_bg(running_machine *machine, bitmap_t *bitmap, const rectangle if (flip_screen_x_get(machine)) sx = 31 - sx; if (flip_screen_y_get(machine)) sy = 31 - sy; - drawgfx(tmpbitmap1,machine->gfx[0], + drawgfx_opaque(tmpbitmap1,NULL,machine->gfx[0], code, 2, flip_screen_x_get(machine),flip_screen_y_get(machine), - 8*sx,8*sy, - NULL,TRANSPARENCY_NONE,0); + 8*sx,8*sy); } /* first copy to a temp bitmap doing column scroll */ diff --git a/src/mame/video/bwing.c b/src/mame/video/bwing.c index 1e92d89abdf..1a900bd80a2 100644 --- a/src/mame/video/bwing.c +++ b/src/mame/video/bwing.c @@ -240,9 +240,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bmp, const rectangl // single/double if (!(attrib & 0x10)) - drawgfx(bmp, gfx, code, color, fx, fy, x, y, clip, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bmp, clip, gfx, code, color, fx, fy, x, y, 0); else - drawgfxzoom(bmp, gfx, code, color, fx, fy, x, y, clip, TRANSPARENCY_PEN, 0, 1<<16, 2<<16); + drawgfxzoom_transpen(bmp, clip, gfx, code, color, fx, fy, x, y, 1<<16, 2<<16, 0); } } diff --git a/src/mame/video/cabal.c b/src/mame/video/cabal.c index c17ba58b94b..b420d3851a4 100644 --- a/src/mame/video/cabal.c +++ b/src/mame/video/cabal.c @@ -127,12 +127,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx( bitmap,machine->gfx[2], + drawgfx_transpen( bitmap,cliprect,machine->gfx[2], tile_number, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0xf ); + sx,sy,0xf ); } } } diff --git a/src/mame/video/canyon.c b/src/mame/video/canyon.c index 0f5c748d468..978acf4e443 100644 --- a/src/mame/video/canyon.c +++ b/src/mame/video/canyon.c @@ -44,14 +44,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int y = canyon_videoram[0x3d0 + 2 * i + 0x8]; int c = canyon_videoram[0x3d0 + 2 * i + 0x9]; - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[1], c >> 3, i, !(c & 0x80), 0, 224 - x, - 240 - y, - cliprect, - TRANSPARENCY_PEN, 0); + 240 - y, 0); } } diff --git a/src/mame/video/carjmbre.c b/src/mame/video/carjmbre.c index 3d2a9ed6733..e9a7e8273ba 100644 --- a/src/mame/video/carjmbre.c +++ b/src/mame/video/carjmbre.c @@ -133,12 +133,11 @@ VIDEO_UPDATE( carjmbre ) flipy = !flipy; } - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], spriteram[troffs+1], spriteram[troffs+2]&0x07, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } } diff --git a/src/mame/video/carpolo.c b/src/mame/video/carpolo.c index 1b1c7fe3bed..64cf13de562 100644 --- a/src/mame/video/carpolo.c +++ b/src/mame/video/carpolo.c @@ -196,11 +196,10 @@ static void draw_alpha_line(running_machine *machine, bitmap_t *bitmap, const re code = carpolo_alpharam[alpha_line * 32 + x] >> 2; col = carpolo_alpharam[alpha_line * 32 + x] & 0x03; - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code,col, 0,0, - x*8,video_line*8, - cliprect,TRANSPARENCY_PEN,0); + x*8,video_line*8,0); } } @@ -225,18 +224,16 @@ static void draw_sprite(running_machine *machine, bitmap_t *bitmap, const rectan x = 240 - x; y = 240 - y; - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], remapped_code, col, 0, flipy, - x, y, - cliprect,TRANSPARENCY_PEN,0); + x, y,0); /* draw with wrap around */ - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], remapped_code, col, 0, flipy, - (INT16)x - 256, y, - cliprect,TRANSPARENCY_PEN,0); + (INT16)x - 256, y,0); } @@ -283,20 +280,18 @@ VIDEO_UPDATE( carpolo ) /* left goal - position determined by bit 6 of the horizontal and vertical timing PROMs */ - drawgfxzoom(bitmap,screen->machine->gfx[1], + drawgfxzoom_transpen(bitmap,cliprect,screen->machine->gfx[1], 0,0, 0,0, LEFT_GOAL_X,GOAL_Y, - cliprect,TRANSPARENCY_PEN,0, - 0x20000,0x20000); + 0x20000,0x20000,0); /* right goal */ - drawgfxzoom(bitmap,screen->machine->gfx[1], + drawgfxzoom_transpen(bitmap,cliprect,screen->machine->gfx[1], 0,1, 1,0, RIGHT_GOAL_X,GOAL_Y, - cliprect,TRANSPARENCY_PEN,0, - 0x20000,0x20000); + 0x20000,0x20000,0); /* special char - bit 0 of 0x0f enables it, bit 1 marked as WIDE, but never appears to be set */ @@ -382,17 +377,15 @@ static int check_sprite_sprite_collision(running_machine *machine, bitmap_fill(sprite_sprite_collision_bitmap1, 0, 0); bitmap_fill(sprite_sprite_collision_bitmap2, 0, 0); - drawgfx(sprite_sprite_collision_bitmap1,machine->gfx[0], + drawgfx_opaque(sprite_sprite_collision_bitmap1,0,machine->gfx[0], code1,0, 0,flipy1, - x1,y1, - 0,TRANSPARENCY_NONE,0); + x1,y1); - drawgfx(sprite_sprite_collision_bitmap2,machine->gfx[0], + drawgfx_opaque(sprite_sprite_collision_bitmap2,0,machine->gfx[0], code2,0, 0,flipy2, - x2,y2, - 0,TRANSPARENCY_NONE,0); + x2,y2); for (x = x1; x < x1 + SPRITE_WIDTH; x++) for (y = y1; y < y1 + SPRITE_HEIGHT; y++) @@ -437,18 +430,16 @@ static int check_sprite_left_goal_collision(running_machine *machine, int x1, in bitmap_fill(sprite_goal_collision_bitmap1, 0, 0); bitmap_fill(sprite_goal_collision_bitmap2, 0, 0); - drawgfx(sprite_goal_collision_bitmap1,machine->gfx[0], + drawgfx_opaque(sprite_goal_collision_bitmap1,0,machine->gfx[0], code1,0, 0,flipy1, - x1,y1, - 0,TRANSPARENCY_NONE,0); + x1,y1); - drawgfxzoom(sprite_goal_collision_bitmap2,machine->gfx[1], + drawgfxzoom_transpen(sprite_goal_collision_bitmap2,0,machine->gfx[1], 0,0, 0,0, x2,y2, - 0,TRANSPARENCY_PEN,0, - 0x20000,0x20000); + 0x20000,0x20000,0); for (x = x1; x < x1 + SPRITE_WIDTH; x++) for (y = y1; y < y1 + SPRITE_HEIGHT; y++) @@ -496,18 +487,16 @@ static int check_sprite_right_goal_collision(running_machine *machine, int x1, i bitmap_fill(sprite_goal_collision_bitmap1, 0, 0); bitmap_fill(sprite_goal_collision_bitmap2, 0, 0); - drawgfx(sprite_goal_collision_bitmap1,machine->gfx[0], + drawgfx_opaque(sprite_goal_collision_bitmap1,0,machine->gfx[0], code1,0, 0,flipy1, - x1,y1, - 0,TRANSPARENCY_NONE,0); + x1,y1); - drawgfxzoom(sprite_goal_collision_bitmap2,machine->gfx[1], + drawgfxzoom_transpen(sprite_goal_collision_bitmap2,0,machine->gfx[1], 0,1, 1,0, x2,y2, - 0,TRANSPARENCY_PEN,0, - 0x20000,0x20000); + 0x20000,0x20000,0); for (x = x1; x < x1 + SPRITE_WIDTH; x++) for (y = y1; y < y1 + SPRITE_HEIGHT; y++) @@ -543,11 +532,10 @@ static int check_sprite_border_collision(running_machine *machine, UINT8 x1, UIN x1 = 240 - x1; y1 = 240 - y1; - drawgfx(sprite_border_collision_bitmap,machine->gfx[0], + drawgfx_opaque(sprite_border_collision_bitmap,0,machine->gfx[0], code1,0, 0,flipy1, - 0,0, - 0,TRANSPARENCY_NONE,0); + 0,0); for (x = 0; x < SPRITE_WIDTH; x++) for (y = 0; y < SPRITE_HEIGHT; y++) diff --git a/src/mame/video/cbasebal.c b/src/mame/video/cbasebal.c index 077a15ea13e..ea92ef4cccd 100644 --- a/src/mame/video/cbasebal.c +++ b/src/mame/video/cbasebal.c @@ -162,12 +162,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipx = !flipx; } - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code, color, flipx,flipscreen, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); } } diff --git a/src/mame/video/cbuster.c b/src/mame/video/cbuster.c index 1d5abe8f0f0..b71f263be11 100644 --- a/src/mame/video/cbuster.c +++ b/src/mame/video/cbuster.c @@ -121,12 +121,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta while (multi >= 0) { - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x,y + mult * multi,0); multi--; } diff --git a/src/mame/video/ccastles.c b/src/mame/video/ccastles.c index 2f63694526c..ac3be3cc188 100644 --- a/src/mame/video/ccastles.c +++ b/src/mame/video/ccastles.c @@ -288,7 +288,7 @@ VIDEO_UPDATE( ccastles ) int which = spriteaddr[offs]; int color = spriteaddr[offs+2] >> 7; - drawgfx(spritebitmap, screen->machine->gfx[0], which, color, flip, flip, x, y, cliprect, TRANSPARENCY_PEN, 7); + drawgfx_transpen(spritebitmap, cliprect, screen->machine->gfx[0], which, color, flip, flip, x, y, 7); } /* draw the bitmap to the screen, looping over Y */ diff --git a/src/mame/video/cclimber.c b/src/mame/video/cclimber.c index 0fb7790518a..968b0fa0b30 100644 --- a/src/mame/video/cclimber.c +++ b/src/mame/video/cclimber.c @@ -550,7 +550,7 @@ static void toprollr_draw_bigsprite(bitmap_t *bitmap, const rectangle *cliprect) } -static void cclimber_draw_sprites(bitmap_t *bitmap, gfx_element **gfx, const rectangle *cliprect) +static void cclimber_draw_sprites(bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx) { int offs; @@ -582,12 +582,12 @@ static void cclimber_draw_sprites(bitmap_t *bitmap, gfx_element **gfx, const rec flipy = !flipy; } - drawgfx(bitmap, gfx[1], code, color, flipx, flipy, x, y, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, gfx, code, color, flipx, flipy, x, y, 0); } } -static void swimmer_draw_sprites(bitmap_t *bitmap, gfx_element **gfx, const rectangle *cliprect) +static void swimmer_draw_sprites(bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx) { int offs; @@ -619,7 +619,7 @@ static void swimmer_draw_sprites(bitmap_t *bitmap, gfx_element **gfx, const rect flipy = !flipy; } - drawgfx(bitmap, gfx[1], code, color, flipx, flipy, x, y, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, gfx, code, color, flipx, flipy, x, y, 0); } } @@ -633,13 +633,13 @@ VIDEO_UPDATE( cclimber ) if ((cclimber_bigsprite_control[0] & 0x01)) { cclimber_draw_bigsprite(bitmap, cliprect); - cclimber_draw_sprites(bitmap, screen->machine->gfx, cliprect); + cclimber_draw_sprites(bitmap, cliprect, screen->machine->gfx[1]); } /* draw the "big sprite" over the regular sprites */ else { - cclimber_draw_sprites(bitmap, screen->machine->gfx, cliprect); + cclimber_draw_sprites(bitmap, cliprect, screen->machine->gfx[1]); cclimber_draw_bigsprite(bitmap, cliprect); } @@ -667,13 +667,13 @@ VIDEO_UPDATE( yamato ) if ((cclimber_bigsprite_control[0] & 0x01)) { cclimber_draw_bigsprite(bitmap, cliprect); - cclimber_draw_sprites(bitmap, screen->machine->gfx, cliprect); + cclimber_draw_sprites(bitmap, cliprect, screen->machine->gfx[1]); } /* draw the "big sprite" over the regular sprites */ else { - cclimber_draw_sprites(bitmap, screen->machine->gfx, cliprect); + cclimber_draw_sprites(bitmap, cliprect, screen->machine->gfx[1]); cclimber_draw_bigsprite(bitmap, cliprect); } @@ -719,13 +719,13 @@ VIDEO_UPDATE( swimmer ) if ((cclimber_bigsprite_control[0] & 0x01)) { cclimber_draw_bigsprite(bitmap, cliprect); - swimmer_draw_sprites(bitmap, screen->machine->gfx, cliprect); + swimmer_draw_sprites(bitmap, cliprect, screen->machine->gfx[1]); } /* draw the "big sprite" over the regular sprites */ else { - swimmer_draw_sprites(bitmap, screen->machine->gfx, cliprect); + swimmer_draw_sprites(bitmap, cliprect, screen->machine->gfx[1]); cclimber_draw_bigsprite(bitmap, cliprect); } @@ -750,7 +750,7 @@ VIDEO_UPDATE( toprollr ) /* draw the "big sprite" over the regular sprites */ if ((cclimber_bigsprite_control[1] & 0x20)) { - cclimber_draw_sprites(bitmap, screen->machine->gfx, &scroll_area_clip); + cclimber_draw_sprites(bitmap, &scroll_area_clip, screen->machine->gfx[1]); toprollr_draw_bigsprite(bitmap, &scroll_area_clip); } @@ -758,7 +758,7 @@ VIDEO_UPDATE( toprollr ) else { toprollr_draw_bigsprite(bitmap, &scroll_area_clip); - cclimber_draw_sprites(bitmap, screen->machine->gfx, &scroll_area_clip); + cclimber_draw_sprites(bitmap, &scroll_area_clip, screen->machine->gfx[1]); } tilemap_mark_all_tiles_dirty(pf_tilemap); diff --git a/src/mame/video/centiped.c b/src/mame/video/centiped.c index b9ff4dfb971..8842ce816fd 100644 --- a/src/mame/video/centiped.c +++ b/src/mame/video/centiped.c @@ -431,8 +431,7 @@ VIDEO_UPDATE( centiped ) int x = spriteram[offs + 0x20]; int y = 240 - spriteram[offs + 0x10]; - drawgfx(bitmap, screen->machine->gfx[1], code, color, flipx, flipy, x, y, - &spriteclip, TRANSPARENCY_PENS, penmask[color & 0x3f]); + drawgfx_transmask(bitmap, &spriteclip, screen->machine->gfx[1], code, color, flipx, flipy, x, y, penmask[color & 0x3f]); } return 0; } @@ -476,8 +475,7 @@ VIDEO_UPDATE( warlords ) flipx = !flipx; } - drawgfx(bitmap, screen->machine->gfx[1], code, color, flipx, flipy, x, y, - cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], code, color, flipx, flipy, x, y, 0); } return 0; } @@ -507,8 +505,7 @@ VIDEO_UPDATE( bullsdrt ) int x = spriteram[offs + 0x20]; int y = 240 - spriteram[offs + 0x10]; - drawgfx(bitmap, screen->machine->gfx[1], code, color & 0x3f, 1, flipy, x, y, - &spriteclip, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, &spriteclip, screen->machine->gfx[1], code, color & 0x3f, 1, flipy, x, y, 0); } return 0; } @@ -544,8 +541,7 @@ VIDEO_UPDATE( milliped ) flipy = !flipy; } - drawgfx(bitmap, screen->machine->gfx[1], code, color, flipx, flipy, x, y, - &spriteclip, TRANSPARENCY_PENS, penmask[color & 0x3f]); + drawgfx_transmask(bitmap, &spriteclip, screen->machine->gfx[1], code, color, flipx, flipy, x, y, penmask[color & 0x3f]); } return 0; } diff --git a/src/mame/video/chaknpop.c b/src/mame/video/chaknpop.c index b7681ec628e..03ad6578af9 100644 --- a/src/mame/video/chaknpop.c +++ b/src/mame/video/chaknpop.c @@ -235,13 +235,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect, + machine->gfx[0], tile, color, flipx, flipy, - sx, sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx, sy, 0); } } diff --git a/src/mame/video/champbas.c b/src/mame/video/champbas.c index 67d0bb55e13..968835c5ac3 100644 --- a/src/mame/video/champbas.c +++ b/src/mame/video/champbas.c @@ -210,21 +210,19 @@ static void champbas_draw_sprites(running_machine *machine, bitmap_t *bitmap, co int sx = spriteram_2[offs + 1] - 16; int sy = 255 - spriteram_2[offs]; - drawgfx(bitmap, gfx, + drawgfx_transmask(bitmap, cliprect, + gfx, code, color, flipx, flipy, sx, sy, - cliprect, - TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, gfx, color, 0)); // wraparound - drawgfx(bitmap, gfx, + drawgfx_transmask(bitmap, cliprect, + gfx, code, color, flipx, flipy, sx + 256, sy, - cliprect, - TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, gfx, color, 0)); } } @@ -250,13 +248,12 @@ static void exctsccr_draw_sprites(running_machine *machine, bitmap_t *bitmap, co color = ( obj1[offs+1] ) & 0x0f; bank = ( ( obj1[offs+1] >> 4 ) & 1 ); - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect, + machine->gfx[1], code + (bank << 6), color, flipx, flipy, - sx,sy, - cliprect, - TRANSPARENCY_PEN,0); + sx,sy,0); } obj1 = spriteram_2; @@ -274,13 +271,12 @@ static void exctsccr_draw_sprites(running_machine *machine, bitmap_t *bitmap, co flipy = ( ~obj1[offs] ) & 0x02; color = ( obj1[offs+1] ) & 0x0f; - drawgfx(bitmap,machine->gfx[2], + drawgfx_transmask(bitmap,cliprect, + machine->gfx[2], code, color, flipx, flipy, sx,sy, - cliprect, - TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[2], color, 0x10)); } } diff --git a/src/mame/video/cheekyms.c b/src/mame/video/cheekyms.c index 68344199d02..f569ea5bdca 100644 --- a/src/mame/video/cheekyms.c +++ b/src/mame/video/cheekyms.c @@ -110,7 +110,7 @@ VIDEO_START( cheekyms ) } -static void draw_sprites(gfx_element **gfx, bitmap_t *bitmap, const rectangle *cliprect, int flip) +static void draw_sprites(bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx, int flip) { offs_t offs; @@ -130,19 +130,19 @@ static void draw_sprites(gfx_element **gfx, bitmap_t *bitmap, const rectangle *c if (!flip) code++; - drawgfx(bitmap, gfx[1], code, color, 0, 0, x, y, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, gfx, code, color, 0, 0, x, y, 0); } else { if (cheekyms_spriteram[offs + 0] & 0x02) { - drawgfx(bitmap, gfx[1], code | 0x20, color, 0, 0, x, y, cliprect, TRANSPARENCY_PEN, 0); - drawgfx(bitmap, gfx[1], code | 0x21, color, 0, 0, 0x10 + x, y, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, gfx, code | 0x20, color, 0, 0, x, y, 0); + drawgfx_transpen(bitmap, cliprect, gfx, code | 0x21, color, 0, 0, 0x10 + x, y, 0); } else { - drawgfx(bitmap, gfx[1], code | 0x20, color, 0, 0, x, y, cliprect, TRANSPARENCY_PEN, 0); - drawgfx(bitmap, gfx[1], code | 0x21, color, 0, 0, x, 0x10 + y, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, gfx, code | 0x20, color, 0, 0, x, y, 0); + drawgfx_transpen(bitmap, cliprect, gfx, code | 0x21, color, 0, 0, x, 0x10 + y, 0); } } } @@ -162,7 +162,7 @@ VIDEO_UPDATE( cheekyms ) bitmap_fill(bitmap_buffer, cliprect, 0); /* sprites go under the playfield */ - draw_sprites(screen->machine->gfx, bitmap, cliprect, flip); + draw_sprites(bitmap, cliprect, screen->machine->gfx[1], flip); /* draw the tilemap to a temp bitmap */ tilemap_draw(bitmap_buffer, cliprect, cheekyms_tilemap, 0, 0); diff --git a/src/mame/video/circus.c b/src/mame/video/circus.c index 0fbb10dbccb..c8fb088c27c 100644 --- a/src/mame/video/circus.c +++ b/src/mame/video/circus.c @@ -111,12 +111,11 @@ static void circus_draw_fg(running_machine *machine, bitmap_t *bitmap, const rec draw_line (bitmap,cliprect,0,193,17,193,0); draw_line (bitmap,cliprect,231,193,248,193,0); - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], clown_z, 0, 0,0, - clown_y,clown_x, - cliprect,TRANSPARENCY_PEN,0); + clown_y,clown_x,0); } VIDEO_UPDATE( circus ) @@ -161,12 +160,12 @@ static void robotbwl_draw_bowling_alley(bitmap_t *bitmap, const rectangle *clipr static void robotbwl_draw_ball(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,/* Y is horizontal position */ + cliprect,machine->gfx[1], clown_z, 0, 0,0, - clown_y+8,clown_x+8, /* Y is horizontal position */ - cliprect,TRANSPARENCY_PEN,0); + clown_y+8,clown_x+8,0); } VIDEO_UPDATE( robotbwl ) @@ -180,12 +179,12 @@ VIDEO_UPDATE( robotbwl ) static void crash_draw_car(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,/* Y is horizontal position */ + cliprect,machine->gfx[1], clown_z, 0, 0,0, - clown_y,clown_x, /* Y is horizontal position */ - cliprect,TRANSPARENCY_PEN,0); + clown_y,clown_x,0); } VIDEO_UPDATE( crash ) diff --git a/src/mame/video/circusc.c b/src/mame/video/circusc.c index 49eb2bc8b63..317a916ddac 100644 --- a/src/mame/video/circusc.c +++ b/src/mame/video/circusc.c @@ -194,11 +194,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transmask(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); } } diff --git a/src/mame/video/citycon.c b/src/mame/video/citycon.c index 053ea84cffa..bb6e0f738e5 100644 --- a/src/mame/video/citycon.c +++ b/src/mame/video/citycon.c @@ -126,12 +126,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipx = !flipx; } - drawgfx(bitmap,machine->gfx[spriteram[offs + 1] & 0x80 ? 2 : 1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[spriteram[offs + 1] & 0x80 ? 2 : 1], spriteram[offs + 1] & 0x7f, spriteram[offs + 2] & 0x0f, flipx,flip_screen_get(machine), - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/cloak.c b/src/mame/video/cloak.c index 0dda7c3aa21..fd189bc82f7 100644 --- a/src/mame/video/cloak.c +++ b/src/mame/video/cloak.c @@ -223,7 +223,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[1], code, 0, flipx, flipy, sx, sy, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code, 0, flipx, flipy, sx, sy, 0); } } diff --git a/src/mame/video/cloud9.c b/src/mame/video/cloud9.c index 3274d226f0a..0c3e91d0c8c 100644 --- a/src/mame/video/cloud9.c +++ b/src/mame/video/cloud9.c @@ -271,9 +271,9 @@ VIDEO_UPDATE( cloud9 ) int which = spriteaddr[offs + 0x20]; int color = 0; - drawgfx(spritebitmap, screen->machine->gfx[0], which, color, xflip, yflip, x, y, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(spritebitmap, cliprect, screen->machine->gfx[0], which, color, xflip, yflip, x, y, 0); if (x >= 256 - 16) - drawgfx(spritebitmap, screen->machine->gfx[0], which, color, xflip, yflip, x - 256, y, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(spritebitmap, cliprect, screen->machine->gfx[0], which, color, xflip, yflip, x - 256, y, 0); } /* draw the bitmap to the screen, looping over Y */ diff --git a/src/mame/video/clshroad.c b/src/mame/video/clshroad.c index ba895d98501..440070eb507 100644 --- a/src/mame/video/clshroad.c +++ b/src/mame/video/clshroad.c @@ -312,12 +312,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code, attr & 0x0f, flipx,flipy, - x,y, - cliprect,TRANSPARENCY_PEN,15 ); + x,y,15 ); } } diff --git a/src/mame/video/cninja.c b/src/mame/video/cninja.c index 85fb807d699..076de344e99 100644 --- a/src/mame/video/cninja.c +++ b/src/mame/video/cninja.c @@ -205,12 +205,12 @@ static void cninja_draw_sprites(running_machine *machine, bitmap_t *bitmap, cons while (multi >= 0) { - pdrawgfx(bitmap,machine->gfx[3], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[3], sprite - multi * inc, colour, fx,fy, x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0,pri); + priority_bitmap,pri,0); multi--; } @@ -273,12 +273,12 @@ static void robocop2_draw_sprites(running_machine *machine, bitmap_t *bitmap, co while (multi >= 0) { - pdrawgfx(bitmap,machine->gfx[3], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[3], sprite - multi * inc, colour, fx,fy, x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0,pri); + priority_bitmap,pri,0); multi--; } diff --git a/src/mame/video/combatsc.c b/src/mame/video/combatsc.c index f018a420358..c599c950c0a 100644 --- a/src/mame/video/combatsc.c +++ b/src/mame/video/combatsc.c @@ -479,7 +479,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { int base_color = (circuit*4)*16+(K007121_ctrlram[circuit][6]&0x10)*2; - K007121_sprites_draw(circuit,bitmap,machine->gfx,machine->colortable,cliprect,source,base_color,0,0,pri_mask); + K007121_sprites_draw(circuit,bitmap,cliprect,machine->gfx,machine->colortable,source,base_color,0,0,pri_mask); } @@ -630,11 +630,10 @@ static void bootleg_draw_sprites(running_machine *machine, bitmap_t *bitmap, con // if(combasc_vreg == 0x23 && (attributes & 0x02)) color += 1*16; // if(combasc_vreg == 0x66 ) color += 2*16; - drawgfx( bitmap, gfx, + drawgfx_transpen( bitmap, cliprect, gfx, number, color, attributes & 0x10,0, /* flip */ - x,y, - cliprect, TRANSPARENCY_PEN, 15 ); + x,y, 15 ); } source -= 8; } diff --git a/src/mame/video/commando.c b/src/mame/video/commando.c index 206b6a1c77b..db9eab01ad2 100644 --- a/src/mame/video/commando.c +++ b/src/mame/video/commando.c @@ -121,8 +121,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta } if (bank < 3) - drawgfx(bitmap,machine->gfx[2], code, color, flipx, flipy, sx, sy, - cliprect, TRANSPARENCY_PEN, 15); + drawgfx_transpen(bitmap,cliprect, machine->gfx[2], code, color, flipx, flipy, sx, sy, 15); } } diff --git a/src/mame/video/compgolf.c b/src/mame/video/compgolf.c index 44b206c3656..f3a2f1df079 100644 --- a/src/mame/video/compgolf.c +++ b/src/mame/video/compgolf.c @@ -101,18 +101,16 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan fx = spriteram[offs]&4; fy = 0; /* ? */ - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], sprite, - color,fx,fy,x,y, - cliprect,TRANSPARENCY_PEN,0); + color,fx,fy,x,y,0); /* Double Height */ if(spriteram[offs] & 0x10) { - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], sprite+1, - color,fx,fy,x,y+16, - cliprect,TRANSPARENCY_PEN,0); + color,fx,fy,x,y+16,0); } } } diff --git a/src/mame/video/contra.c b/src/mame/video/contra.c index e2dd0fe1ed8..635e8b2db80 100644 --- a/src/mame/video/contra.c +++ b/src/mame/video/contra.c @@ -275,7 +275,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (bank==0) source=private_spriteram; else source=private_spriteram_2; - K007121_sprites_draw(bank,bitmap,machine->gfx,machine->colortable,cliprect,source,base_color,40,0,-1); + K007121_sprites_draw(bank,bitmap,cliprect,machine->gfx,machine->colortable,source,base_color,40,0,-1); } VIDEO_UPDATE( contra ) diff --git a/src/mame/video/cop01.c b/src/mame/video/cop01.c index 0e89a893e5b..7f4efd2e21e 100644 --- a/src/mame/video/cop01.c +++ b/src/mame/video/cop01.c @@ -196,12 +196,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (code&0x80) code += (mightguy_vreg[0]&0x30)<<3; - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0 ); + sx,sy,0 ); } } diff --git a/src/mame/video/copsnrob.c b/src/mame/video/copsnrob.c index a697fd2d74d..810ce8dd46f 100644 --- a/src/mame/video/copsnrob.c +++ b/src/mame/video/copsnrob.c @@ -28,42 +28,37 @@ VIDEO_UPDATE( copsnrob ) sx = 31 - (offs % 32); sy = offs / 32; - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0], videoram[offs] & 0x3f,0, 0,0, - 8*sx,8*sy, - cliprect,TRANSPARENCY_NONE,0); + 8*sx,8*sy); } /* Draw the cars. Positioning was based on a screen shot */ if (copsnrob_cary[0]) - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], copsnrob_carimage[0],0, 1,0, - 0xe4,256-copsnrob_cary[0], - cliprect,TRANSPARENCY_PEN,0); + 0xe4,256-copsnrob_cary[0],0); if (copsnrob_cary[1]) - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], copsnrob_carimage[1],0, 1,0, - 0xc4,256-copsnrob_cary[1], - cliprect,TRANSPARENCY_PEN,0); + 0xc4,256-copsnrob_cary[1],0); if (copsnrob_cary[2]) - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], copsnrob_carimage[2],0, 0,0, - 0x24,256-copsnrob_cary[2], - cliprect,TRANSPARENCY_PEN,0); + 0x24,256-copsnrob_cary[2],0); if (copsnrob_cary[3]) - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], copsnrob_carimage[3],0, 0,0, - 0x04,256-copsnrob_cary[3], - cliprect,TRANSPARENCY_PEN,0); + 0x04,256-copsnrob_cary[3],0); /* Draw the beer truck. Positioning was based on a screen shot. @@ -89,11 +84,10 @@ VIDEO_UPDATE( copsnrob ) { /* We've hit a truck's back end, so draw the truck. The front end may be off the top of the screen, but we don't care. */ - drawgfx(bitmap,screen->machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[2], 0,0, 0,0, - 0x80,256-(y+31), - cliprect,TRANSPARENCY_PEN,0); + 0x80,256-(y+31),0); /* Skip past this truck's front end so we don't draw this truck twice. */ y += 31; @@ -102,11 +96,10 @@ VIDEO_UPDATE( copsnrob ) { /* We missed a truck's back end (it was off the bottom of the screen) but have hit its front end, so draw the truck. */ - drawgfx(bitmap,screen->machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[2], 0,0, 0,0, - 0x80,256-y, - cliprect,TRANSPARENCY_PEN,0); + 0x80,256-y,0); } } } diff --git a/src/mame/video/cosmic.c b/src/mame/video/cosmic.c index e9501242962..684052f31af 100644 --- a/src/mame/video/cosmic.c +++ b/src/mame/video/cosmic.c @@ -297,18 +297,16 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (spriteram[offs] & 0x80) /* 16x16 sprite */ - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code, color, 0, ~spriteram[offs] & 0x40, - 256-spriteram[offs+2],spriteram[offs+1], - cliprect,TRANSPARENCY_PEN,0); + 256-spriteram[offs+2],spriteram[offs+1],0); else /* 32x32 sprite */ - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code >> 2, color, 0, ~spriteram[offs] & 0x40, - 256-spriteram[offs+2],spriteram[offs+1], - cliprect,TRANSPARENCY_PEN,0); + 256-spriteram[offs+2],spriteram[offs+1],0); } } } diff --git a/src/mame/video/cps1.c b/src/mame/video/cps1.c index 1c94dc9d478..6c58c2e1266 100644 --- a/src/mame/video/cps1.c +++ b/src/mame/video/cps1.c @@ -2210,19 +2210,19 @@ static void cps1_render_sprites(running_machine *machine, bitmap_t *bitmap, cons #define DRAWSPRITE(CODE,COLOR,FLIPX,FLIPY,SX,SY) \ { \ if (flip_screen_get(machine)) \ - pdrawgfx(bitmap,machine->gfx[2], \ + pdrawgfx_transpen(bitmap,\ + cliprect,machine->gfx[2], \ CODE, \ COLOR, \ !(FLIPX),!(FLIPY), \ - 511-16-(SX),255-16-(SY), \ - cliprect,TRANSPARENCY_PEN,15,0x02); \ + 511-16-(SX),255-16-(SY), priority_bitmap,0x02,15); \ else \ - pdrawgfx(bitmap,machine->gfx[2], \ + pdrawgfx_transpen(bitmap,\ + cliprect,machine->gfx[2], \ CODE, \ COLOR, \ FLIPX,FLIPY, \ - SX,SY, \ - cliprect,TRANSPARENCY_PEN,15,0x02); \ + SX,SY, priority_bitmap,0x02,15); \ } @@ -2446,19 +2446,19 @@ static void cps2_render_sprites(running_machine *machine, bitmap_t *bitmap,const #define DRAWSPRITE(CODE,COLOR,FLIPX,FLIPY,SX,SY) \ { \ if (flip_screen_get(machine)) \ - pdrawgfx(bitmap,machine->gfx[2], \ + pdrawgfx_transpen(bitmap,\ + cliprect,machine->gfx[2], \ CODE, \ COLOR, \ !(FLIPX),!(FLIPY), \ - 511-16-(SX),255-16-(SY), \ - cliprect,TRANSPARENCY_PEN,15,primasks[priority]); \ + 511-16-(SX),255-16-(SY), priority_bitmap,primasks[priority],15); \ else \ - pdrawgfx(bitmap,machine->gfx[2], \ + pdrawgfx_transpen(bitmap,\ + cliprect,machine->gfx[2], \ CODE, \ COLOR, \ FLIPX,FLIPY, \ - SX,SY, \ - cliprect,TRANSPARENCY_PEN,15,primasks[priority]); \ + SX,SY, priority_bitmap,primasks[priority],15); \ } int i; diff --git a/src/mame/video/crospang.c b/src/mame/video/crospang.c index 1582674c624..2323cc3dd3c 100644 --- a/src/mame/video/crospang.c +++ b/src/mame/video/crospang.c @@ -176,12 +176,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan while (multi >= 0) { - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], sprite - multi * inc, colour, fx,fy, - x-xsproff,y-ysproff + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x-xsproff,y-ysproff + mult * multi,0); multi--; } diff --git a/src/mame/video/crshrace.c b/src/mame/video/crshrace.c index 058c61489c5..3a8c6becec8 100644 --- a/src/mame/video/crshrace.c +++ b/src/mame/video/crshrace.c @@ -150,21 +150,19 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan map_start++; if (flipscreen) - drawgfxzoom(bitmap,machine->gfx[2], + drawgfxzoom_transpen(bitmap,cliprect,machine->gfx[2], code, color, !flipx,!flipy, 304-sx,208-sy, - cliprect,TRANSPARENCY_PEN,15, - 0x1000 * zoomx,0x1000 * zoomy); + 0x1000 * zoomx,0x1000 * zoomy,15); else - drawgfxzoom(bitmap,machine->gfx[2], + drawgfxzoom_transpen(bitmap,cliprect,machine->gfx[2], code, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PEN,15, - 0x1000 * zoomx,0x1000 * zoomy); + 0x1000 * zoomx,0x1000 * zoomy,15); } } } diff --git a/src/mame/video/cvs.c b/src/mame/video/cvs.c index 61346c2fba4..17f6cb25480 100644 --- a/src/mame/video/cvs.c +++ b/src/mame/video/cvs.c @@ -235,11 +235,10 @@ VIDEO_UPDATE( cvs ) int gfxnum = (code < ram_based_char_start_indices[character_banking_mode]) ? 0 : 1; - drawgfx(background_bitmap, screen->machine->gfx[gfxnum], + drawgfx_opaque(background_bitmap, 0, screen->machine->gfx[gfxnum], code, color, 0, 0, - x, y, - 0, TRANSPARENCY_NONE, 0); + x, y); /* foreground for collision detection */ if (color & 0x80) @@ -252,11 +251,10 @@ VIDEO_UPDATE( cvs ) collision_color = 0x102; } - drawgfx(cvs_collision_background, screen->machine->gfx[gfxnum], + drawgfx_opaque(cvs_collision_background, 0, screen->machine->gfx[gfxnum], code, collision_color, 0, 0, - x, y, - 0, TRANSPARENCY_NONE, 0); + x, y); } diff --git a/src/mame/video/darius.c b/src/mame/video/darius.c index 38e161723de..0dffcb8b5d5 100644 --- a/src/mame/video/darius.c +++ b/src/mame/video/darius.c @@ -105,12 +105,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan sprite_ptr->x = curx; sprite_ptr->y = cury; - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, - sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0); + sprite_ptr->x,sprite_ptr->y,0); } } } diff --git a/src/mame/video/darkmist.c b/src/mame/video/darkmist.c index 132174634be..c9cbb226e6c 100644 --- a/src/mame/video/darkmist.c +++ b/src/mame/video/darkmist.c @@ -180,14 +180,13 @@ VIDEO_UPDATE( darkmist) palette+=32; - drawgfx( - bitmap,screen->machine->gfx[2], + drawgfx_transpen( + bitmap,cliprect, + screen->machine->gfx[2], tile, palette, fx,fy, - spriteram[i+3],spriteram[i+2], - cliprect, - TRANSPARENCY_PEN,0 ); + spriteram[i+3],spriteram[i+2],0 ); } } diff --git a/src/mame/video/darkseal.c b/src/mame/video/darkseal.c index 128805c7e20..b8a90f8faee 100644 --- a/src/mame/video/darkseal.c +++ b/src/mame/video/darkseal.c @@ -216,12 +216,11 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap, const recta while (multi >= 0) { - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x,y + mult * multi,0); multi--; } diff --git a/src/mame/video/dassault.c b/src/mame/video/dassault.c index f1ca1c2a923..cd2dee63726 100644 --- a/src/mame/video/dassault.c +++ b/src/mame/video/dassault.c @@ -128,13 +128,13 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap, const recta while (multi >= 0) { - deco16_pdrawgfx(machine, - bitmap,machine->gfx[gfxbank], + deco16_pdrawgfx( + bitmap,cliprect,machine->gfx[gfxbank], sprite - multi * inc, colour, fx,fy, x,y + mult * multi, - cliprect,0,pmask,1<<bank, 1, alpha); + 0,pmask,1<<bank, 1, alpha); multi--; } diff --git a/src/mame/video/dcon.c b/src/mame/video/dcon.c index be1d5708a51..16ee3e562a1 100644 --- a/src/mame/video/dcon.c +++ b/src/mame/video/dcon.c @@ -187,79 +187,79 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap,const rectan for (ay=0; ay<dy; ay++) { if (!fx && !fy) { - pdrawgfx(bitmap,machine->gfx[4], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[4], sprite + inc, color,fx,fy,x+ax*16,y+ay*16, - cliprect,TRANSPARENCY_PEN,15,pri_mask); + priority_bitmap,pri_mask,15); // wrap around y - pdrawgfx(bitmap,machine->gfx[4], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[4], sprite + inc, color,fx,fy,x+ax*16,y+ay*16 + 512, - cliprect,TRANSPARENCY_PEN,15,pri_mask); + priority_bitmap,pri_mask,15); // wrap around y - pdrawgfx(bitmap,machine->gfx[4], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[4], sprite + inc, color,fx,fy,x+ax*16,y+ay*16 - 512, - cliprect,TRANSPARENCY_PEN,15,pri_mask); + priority_bitmap,pri_mask,15); } else if (fx && !fy) { - pdrawgfx(bitmap,machine->gfx[4], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[4], sprite + inc, color,fx,fy,x+(dx-1-ax)*16,y+ay*16, - cliprect,TRANSPARENCY_PEN,15,pri_mask); + priority_bitmap,pri_mask,15); // wrap around y - pdrawgfx(bitmap,machine->gfx[4], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[4], sprite + inc, color,fx,fy,x+(dx-1-ax)*16,y+ay*16 + 512, - cliprect,TRANSPARENCY_PEN,15,pri_mask); + priority_bitmap,pri_mask,15); // wrap around y - pdrawgfx(bitmap,machine->gfx[4], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[4], sprite + inc, color,fx,fy,x+(dx-1-ax)*16,y+ay*16 - 512, - cliprect,TRANSPARENCY_PEN,15,pri_mask); + priority_bitmap,pri_mask,15); } else if (!fx && fy) { - pdrawgfx(bitmap,machine->gfx[4], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[4], sprite + inc, color,fx,fy,x+ax*16,y+(dy-1-ay)*16, - cliprect,TRANSPARENCY_PEN,15,pri_mask); + priority_bitmap,pri_mask,15); // wrap around y - pdrawgfx(bitmap,machine->gfx[4], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[4], sprite + inc, color,fx,fy,x+ax*16,y+(dy-1-ay)*16 + 512, - cliprect,TRANSPARENCY_PEN,15,pri_mask); + priority_bitmap,pri_mask,15); // wrap around y - pdrawgfx(bitmap,machine->gfx[4], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[4], sprite + inc, color,fx,fy,x+ax*16,y+(dy-1-ay)*16 - 512, - cliprect,TRANSPARENCY_PEN,15,pri_mask); + priority_bitmap,pri_mask,15); } else { - pdrawgfx(bitmap,machine->gfx[4], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[4], sprite + inc, color,fx,fy,x+(dx-1-ax)*16,y+(dy-1-ay)*16, - cliprect,TRANSPARENCY_PEN,15,pri_mask); + priority_bitmap,pri_mask,15); // wrap around y - pdrawgfx(bitmap,machine->gfx[4], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[4], sprite + inc, color,fx,fy,x+(dx-1-ax)*16,y+(dy-1-ay)*16 + 512, - cliprect,TRANSPARENCY_PEN,15,pri_mask); + priority_bitmap,pri_mask,15); // wrap around y - pdrawgfx(bitmap,machine->gfx[4], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[4], sprite + inc, color,fx,fy,x+(dx-1-ax)*16,y+(dy-1-ay)*16 - 512, - cliprect,TRANSPARENCY_PEN,15,pri_mask); + priority_bitmap,pri_mask,15); } inc++; diff --git a/src/mame/video/ddragon.c b/src/mame/video/ddragon.c index dc3babf3105..57a924c7461 100644 --- a/src/mame/video/ddragon.c +++ b/src/mame/video/ddragon.c @@ -157,9 +157,9 @@ WRITE8_HANDLER( ddragon_fgvideoram_w ) ***************************************************************************/ -#define DRAW_SPRITE( order, sx, sy ) drawgfx( bitmap, gfx, \ - (which+order),color,flipx,flipy,sx,sy, \ - cliprect,TRANSPARENCY_PEN,0); +#define DRAW_SPRITE( order, sx, sy ) drawgfx_transpen( bitmap, \ + cliprect,gfx, \ + (which+order),color,flipx,flipy,sx,sy,0); static void draw_sprites(running_machine* machine, bitmap_t *bitmap,const rectangle *cliprect) { diff --git a/src/mame/video/ddragon3.c b/src/mame/video/ddragon3.c index 0b3e79bfc26..ab928388056 100644 --- a/src/mame/video/ddragon3.c +++ b/src/mame/video/ddragon3.c @@ -163,9 +163,9 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap, const recta for (i = 0; i <= height; i++) { - drawgfx(bitmap, machine->gfx[1], code + i, color, flipx, flipy, - sx, sy + (flip_screen_get(machine) ? (i * 16) : (-i * 16)), cliprect, - TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, + machine->gfx[1], code + i, color, flipx, flipy, + sx, sy + (flip_screen_get(machine) ? (i * 16) : (-i * 16)), 0); } } diff --git a/src/mame/video/ddrible.c b/src/mame/video/ddrible.c index b527eae5bf6..00496ea19c6 100644 --- a/src/mame/video/ddrible.c +++ b/src/mame/video/ddrible.c @@ -230,13 +230,12 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap, const recta ex = flipx ? (width-1-x) : x; ey = flipy ? (height-1-y) : y; - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,cliprect, + gfx, (number)+x_offset[ex]+y_offset[ey], color, flipx, flipy, - sx+x*16,sy+y*16, - cliprect, - TRANSPARENCY_PEN, 0); + sx+x*16,sy+y*16, 0); } } } diff --git a/src/mame/video/deadang.c b/src/mame/video/deadang.c index d059b1f6a25..94e0e1c9763 100644 --- a/src/mame/video/deadang.c +++ b/src/mame/video/deadang.c @@ -115,10 +115,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (fy) fy=0; else fy=1; } - pdrawgfx(bitmap,machine->gfx[1], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite, color,fx,fy,x,y, - cliprect,TRANSPARENCY_PEN,15,pri); + priority_bitmap,pri,15); } } diff --git a/src/mame/video/dec0.c b/src/mame/video/dec0.c index bc51979f0d5..35e6a4e5653 100644 --- a/src/mame/video/dec0.c +++ b/src/mame/video/dec0.c @@ -201,12 +201,11 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap,const rectan while (multi >= 0) { - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x,y + mult * multi,0); multi--; } diff --git a/src/mame/video/dec8.c b/src/mame/video/dec8.c index 316d311a6a5..9e55c7aed02 100644 --- a/src/mame/video/dec8.c +++ b/src/mame/video/dec8.c @@ -296,17 +296,15 @@ static void draw_sprites1(running_machine* machine, bitmap_t *bitmap, const rect else sprite2=sprite+1; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite, - colour,fx,fy,x,y, - cliprect,TRANSPARENCY_PEN,0); + colour,fx,fy,x,y,0); /* 1 more sprite drawn underneath */ if (extra) - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite2, - colour,fx,fy,x,y+16, - cliprect,TRANSPARENCY_PEN,0); + colour,fx,fy,x,y+16,0); } } @@ -364,12 +362,11 @@ static void draw_sprites2(running_machine* machine, bitmap_t *bitmap, const rect while (multi >= 0) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x,y + mult * multi,0); multi--; } } @@ -408,19 +405,17 @@ static void srdarwin_draw_sprites(running_machine* machine, bitmap_t *bitmap, co } else sy2=sy+16; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, fx,flip_screen_get(machine), - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); if (multi) - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code+1, color, fx,flip_screen_get(machine), - sx,sy2, - cliprect,TRANSPARENCY_PEN,0); + sx,sy2,0); } } @@ -440,9 +435,8 @@ static void draw_characters(running_machine* machine, bitmap_t *bitmap, const re mx = (offs/2) % 32; my = (offs/2) / 32; - drawgfx(bitmap,machine->gfx[0], - tile,color,0,0,8*mx,8*my, - cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], + tile,color,0,0,8*mx,8*my,0); } } #endif diff --git a/src/mame/video/deco16ic.c b/src/mame/video/deco16ic.c index 06ec4d5da9e..702b0fc7097 100644 --- a/src/mame/video/deco16ic.c +++ b/src/mame/video/deco16ic.c @@ -835,15 +835,15 @@ void deco16_clear_sprite_priority_bitmap(void) } /* A special pdrawgfx z-buffered sprite renderer that is needed to properly draw multiple sprite sources with alpha */ -void deco16_pdrawgfx(running_machine *machine, - bitmap_t *dest,const gfx_element *gfx, +void deco16_pdrawgfx( + bitmap_t *dest,const rectangle *clip,const gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, - const rectangle *clip,int transparent_color,UINT32 pri_mask,UINT32 sprite_mask,UINT8 write_pri,UINT8 alpha) + int transparent_color,UINT32 pri_mask,UINT32 sprite_mask,UINT8 write_pri,UINT8 alpha) { int ox,oy,cx,cy; int x_index,y_index,x,y; - const pen_t *pal = &machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; + const pen_t *pal = &gfx->machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; const UINT8 *code_base = gfx_element_get_data(gfx, code % gfx->total_elements); /* check bounds */ diff --git a/src/mame/video/deco32.c b/src/mame/video/deco32.c index e820a383bca..34962ba9f61 100644 --- a/src/mame/video/deco32.c +++ b/src/mame/video/deco32.c @@ -279,20 +279,20 @@ static void captaven_draw_sprites(running_machine* machine, bitmap_t *bitmap, co for (x=0; x<w; x++) { for (y=0; y<h; y++) { - pdrawgfx(bitmap,machine->gfx[gfxbank], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[gfxbank], sprite + y + h * x, colour, fx,fy, sx + x_mult * (w-x),sy + y_mult * (h-y), - cliprect,TRANSPARENCY_PEN,0,prival); + priority_bitmap,prival,0); // wrap-around y - pdrawgfx(bitmap,machine->gfx[gfxbank], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[gfxbank], sprite + y + h * x, colour, fx,fy, sx + x_mult * (w-x),sy + y_mult * (h-y) - 512, - cliprect,TRANSPARENCY_PEN,0,prival); + priority_bitmap,prival,0); } } } @@ -346,13 +346,13 @@ static void fghthist_draw_sprites(running_machine* machine, bitmap_t *bitmap, co while (multi >= 0) { - deco16_pdrawgfx(machine, - bitmap,machine->gfx[gfxbank], + deco16_pdrawgfx( + bitmap,cliprect,machine->gfx[gfxbank], sprite - multi * inc, colour, fx,fy, x,y + mult * multi, - cliprect,0,pri,1<<gfxbank, 1, alpha); + 0,pri,1<<gfxbank, 1, alpha); multi--; } @@ -364,9 +364,8 @@ static void fghthist_draw_sprites(running_machine* machine, bitmap_t *bitmap, co Bottom 8 bits per pixel is palettised sprite data, top 8 is colour/alpha/priority. */ -static void deco32_draw_sprite(bitmap_t *dest,const gfx_element *gfx, - UINT32 code,UINT32 priority,int flipx,int flipy,int sx,int sy, - const rectangle *clip) +static void deco32_draw_sprite(bitmap_t *dest,const rectangle *clip,const gfx_element *gfx, + UINT32 code,UINT32 priority,int flipx,int flipy,int sx,int sy) { const UINT8 *code_base = gfx_element_get_data(gfx, code % gfx->total_elements); int ox,oy,cx,cy; @@ -462,22 +461,21 @@ static void nslasher_draw_sprites(running_machine* machine, bitmap_t *bitmap, co while (multi >= 0) { - deco32_draw_sprite(bitmap,machine->gfx[gfxbank], + deco32_draw_sprite(bitmap,cliprect,machine->gfx[gfxbank], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect); + x,y + mult * multi); multi--; } } } -INLINE void dragngun_drawgfxzoom( running_machine *machine, - bitmap_t *dest_bmp,const gfx_element *gfx, +INLINE void dragngun_drawgfxzoom( + bitmap_t *dest_bmp,const rectangle *clip,const gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, - const rectangle *clip,int transparent_color, + int transparent_color, int scalex, int scaley,bitmap_t *pri_buffer,UINT32 pri_mask, int sprite_screen_width, int sprite_screen_height, UINT8 alpha ) { rectangle myclip; @@ -510,7 +508,7 @@ INLINE void dragngun_drawgfxzoom( running_machine *machine, { if( gfx ) { - const pen_t *pal = &machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; + const pen_t *pal = &gfx->machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; const UINT8 *code_base = gfx_element_get_data(gfx, code % gfx->total_elements); if (sprite_screen_width && sprite_screen_height) @@ -821,13 +819,13 @@ static void dragngun_draw_sprites(running_machine* machine, bitmap_t *bitmap, co sprite&=0x7fff; if (zoomx!=0x10000 || zoomy!=0x10000) - dragngun_drawgfxzoom(machine, - bitmap,machine->gfx[bank], + dragngun_drawgfxzoom( + bitmap,cliprect,machine->gfx[bank], sprite, colour, fx,fy, xpos>>16,ypos>>16, - cliprect,15,zoomx,zoomy,NULL,0, + 15,zoomx,zoomy,NULL,0, ((xpos+(zoomx<<4))>>16) - (xpos>>16), ((ypos+(zoomy<<4))>>16) - (ypos>>16), alpha ); else drawgfx_alpha(bitmap,cliprect,machine->gfx[bank], @@ -1443,11 +1441,12 @@ VIDEO_UPDATE( fghthist ) blending support - it can't be done in-place on the final framebuffer without a lot of support bitmaps. */ -static void mixDualAlphaSprites(running_machine* machine, bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx0, const gfx_element *gfx1, int mixAlphaTilemap) +static void mixDualAlphaSprites(bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx0, const gfx_element *gfx1, int mixAlphaTilemap) { - const pen_t *pal0 = &machine->pens[gfx0->color_base]; - const pen_t *pal1 = &machine->pens[gfx1->color_base]; - const pen_t *pal2 = &machine->pens[(deco32_pri&1) ? machine->gfx[1]->color_base : machine->gfx[2]->color_base]; + const pen_t *pens = gfx0->machine->pens; + const pen_t *pal0 = &pens[gfx0->color_base]; + const pen_t *pal1 = &pens[gfx1->color_base]; + const pen_t *pal2 = &pens[gfx0->machine->gfx[(deco32_pri&1) ? 1 : 2]->color_base]; int x,y; /* Mix sprites into main bitmap, based on priority & alpha */ @@ -1653,7 +1652,7 @@ VIDEO_UPDATE( nslasher ) } } - mixDualAlphaSprites(screen->machine, bitmap, cliprect, screen->machine->gfx[3], screen->machine->gfx[4], alphaTilemap); + mixDualAlphaSprites(bitmap, cliprect, screen->machine->gfx[3], screen->machine->gfx[4], alphaTilemap); tilemap_draw(bitmap,cliprect,pf1_tilemap,0,0); return 0; diff --git a/src/mame/video/deco_mlc.c b/src/mame/video/deco_mlc.c index d3ecb32c9ab..41f979c7c04 100644 --- a/src/mame/video/deco_mlc.c +++ b/src/mame/video/deco_mlc.c @@ -60,10 +60,10 @@ static void blitRaster(bitmap_t *bitmap, int rasterMode) } #endif -static void mlc_drawgfxzoom(running_machine *machine, - bitmap_t *dest_bmp,const gfx_element *gfx, +static void mlc_drawgfxzoom( + bitmap_t *dest_bmp,const rectangle *clip,const gfx_element *gfx, UINT32 code1,UINT32 code2, UINT32 color,int flipx,int flipy,int sx,int sy, - const rectangle *clip,int transparent_color,int use8bpp, + int transparent_color,int use8bpp, int scalex, int scaley,int alpha) { rectangle myclip; @@ -96,7 +96,7 @@ static void mlc_drawgfxzoom(running_machine *machine, { if( gfx ) { - const pen_t *pal = &machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; + const pen_t *pal = &gfx->machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; const UINT8 *code_base1 = gfx_element_get_data(gfx, code1 % gfx->total_elements); const UINT8 *code_base2 = gfx_element_get_data(gfx, code2 % gfx->total_elements); @@ -482,11 +482,11 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap,const rectan // if (rasterMode) // rasterDirty=1; - mlc_drawgfxzoom(machine, - /*rasterMode ? temp_bitmap : */bitmap,machine->gfx[0], + mlc_drawgfxzoom( + /*rasterMode ? temp_bitmap : */bitmap,&user_clip,machine->gfx[0], tile,tile2, color + colorOffset,fx,fy,xbase,ybase, - &user_clip,0, + 0, use8bppMode,(xscale<<8),(yscale<<8),alpha); sprite++; diff --git a/src/mame/video/decocass.c b/src/mame/video/decocass.c index 972043636ec..6f996a50280 100644 --- a/src/mame/video/decocass.c +++ b/src/mame/video/decocass.c @@ -159,10 +159,10 @@ static void draw_object(running_machine* machine, bitmap_t *bitmap, const rectan else sx = 91 - (part_h_shift & 0x7f); - drawgfx(bitmap, machine->gfx[3], 0, color, 0, 0, sx + 64, sy, cliprect, TRANSPARENCY_PEN, 0); - drawgfx(bitmap, machine->gfx[3], 1, color, 0, 0, sx, sy, cliprect, TRANSPARENCY_PEN, 0); - drawgfx(bitmap, machine->gfx[3], 0, color, 0, 1, sx + 64, sy - 64, cliprect, TRANSPARENCY_PEN, 0); - drawgfx(bitmap, machine->gfx[3], 1, color, 0, 1, sx, sy - 64, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[3], 0, color, 0, 0, sx + 64, sy, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[3], 1, color, 0, 0, sx, sy, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[3], 0, color, 0, 1, sx + 64, sy - 64, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[3], 1, color, 0, 1, sx, sy - 64, 0); } static void draw_center(bitmap_t *bitmap, const rectangle *cliprect) @@ -426,22 +426,20 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap, const recta sy -= sprite_y_adjust; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect, machine->gfx[1], sprite_ram[offs + interleave], color, flipx,flipy, - sx,sy, - cliprect, TRANSPARENCY_PEN, 0); + sx,sy, 0); sy += (flip_screen_get(machine) ? -256 : 256); // Wrap around - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect, machine->gfx[1], sprite_ram[offs + interleave], color, flipx,flipy, - sx,sy, - cliprect, TRANSPARENCY_PEN, 0); + sx,sy, 0); } } diff --git a/src/mame/video/destroyr.c b/src/mame/video/destroyr.c index 5016505b18f..2c47a6a4670 100644 --- a/src/mame/video/destroyr.c +++ b/src/mame/video/destroyr.c @@ -43,8 +43,8 @@ VIDEO_UPDATE( destroyr ) continue; } - drawgfx(bitmap, screen->machine->gfx[2], num, 0, flipx, 0, - horz, 16 * i, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[2], num, 0, flipx, 0, + horz, 16 * i, 0); } /* draw alpha numerics */ @@ -55,8 +55,8 @@ VIDEO_UPDATE( destroyr ) { int num = destroyr_alpha_num_ram[32 * i + j]; - drawgfx(bitmap, screen->machine->gfx[0], num, 0, 0, 0, - 8 * j, 8 * i, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[0], num, 0, 0, 0, + 8 * j, 8 * i, 0); } } @@ -67,16 +67,16 @@ VIDEO_UPDATE( destroyr ) int horz = 256 - destroyr_minor_obj_ram[i + 2]; int vert = 256 - destroyr_minor_obj_ram[i + 4]; - drawgfx(bitmap, screen->machine->gfx[1], destroyr_minor_obj_ram[i + 0], 0, 0, 0, - horz, vert, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], destroyr_minor_obj_ram[i + 0], 0, 0, 0, + horz, vert, 0); } /* draw waves */ for (i = 0; i < 4; i++) { - drawgfx(bitmap, screen->machine->gfx[3], destroyr_wavemod ? 1 : 0, 0, 0, 0, - 64 * i, 0x4e, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[3], destroyr_wavemod ? 1 : 0, 0, 0, 0, + 64 * i, 0x4e, 0); } /* draw cursor */ diff --git a/src/mame/video/dietgo.c b/src/mame/video/dietgo.c index b3d87b895e7..b0fa60d629c 100644 --- a/src/mame/video/dietgo.c +++ b/src/mame/video/dietgo.c @@ -53,12 +53,11 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap,const rectan while (multi >= 0) { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x,y + mult * multi,0); multi--; } diff --git a/src/mame/video/digdug.c b/src/mame/video/digdug.c index 6649a160e1d..66bd1f6bb8f 100644 --- a/src/mame/video/digdug.c +++ b/src/mame/video/digdug.c @@ -292,19 +292,17 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap, const recta for (x = 0;x <= size;x++) { UINT32 transmask = colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0x1f); - drawgfx(bitmap,machine->gfx[1], + drawgfx_transmask(bitmap,&spritevisiblearea,machine->gfx[1], sprite + gfx_offs[y ^ (size * flipy)][x ^ (size * flipx)], color, flipx,flipy, - ((sx + 16*x) & 0xff), sy + 16*y, - &spritevisiblearea,TRANSPARENCY_PENS,transmask); + ((sx + 16*x) & 0xff), sy + 16*y,transmask); /* wraparound */ - drawgfx(bitmap,machine->gfx[1], + drawgfx_transmask(bitmap,&spritevisiblearea,machine->gfx[1], sprite + gfx_offs[y ^ (size * flipy)][x ^ (size * flipx)], color, flipx,flipy, - ((sx + 16*x) & 0xff) + 0x100, sy + 16*y, - &spritevisiblearea,TRANSPARENCY_PENS,transmask); + ((sx + 16*x) & 0xff) + 0x100, sy + 16*y,transmask); } } } diff --git a/src/mame/video/djmain.c b/src/mame/video/djmain.c index 006f67a8362..15355a6505b 100644 --- a/src/mame/video/djmain.c +++ b/src/mame/video/djmain.c @@ -94,7 +94,8 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap, const recta int zw = ox + (((x + 1) * xscale + (1 << 11)) >> 12) - sx; int zh = oy + (((y + 1) * yscale + (1 << 11)) >> 12) - sy; - drawgfxzoom(bitmap, + drawgfxzoom_transpen(bitmap, + cliprect, machine->gfx[0], c, color, @@ -102,18 +103,17 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap, const recta flipy, sx, sy, - cliprect, - TRANSPARENCY_PEN, - 0, (zw << 16) / 16, - (zh << 16) / 16); + (zh << 16) / 16, + 0); } else { int sx = ox + (x << 4); int sy = oy + (y << 4); - drawgfx(bitmap, + drawgfx_transpen(bitmap, + cliprect, machine->gfx[0], c, color, @@ -121,8 +121,6 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap, const recta flipy, sx, sy, - cliprect, - TRANSPARENCY_PEN, 0); } } diff --git a/src/mame/video/dkong.c b/src/mame/video/dkong.c index 0adf4810db6..6c8b6a369dd 100644 --- a/src/mame/video/dkong.c +++ b/src/mame/video/dkong.c @@ -649,21 +649,19 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (state->flip) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], (state->sprite_ram[offs + 1] & 0x7f) + ((state->sprite_ram[offs + 2] & mask_bank) << shift_bits), (state->sprite_ram[offs + 2] & 0x0f) + 16 * state->palette_bank, !(state->sprite_ram[offs + 2] & 0x80),(state->sprite_ram[offs + 1] & 0x80), - x-15, scanline-y, - cliprect,TRANSPARENCY_PEN,0); + x-15, scanline-y,0); } else { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], (state->sprite_ram[offs + 1] & 0x7f) + ((state->sprite_ram[offs + 2] & mask_bank) << shift_bits), (state->sprite_ram[offs + 2] & 0x0f) + 16 * state->palette_bank, (state->sprite_ram[offs + 2] & 0x80),(state->sprite_ram[offs + 1] & 0x80), - x, scanline-y, - cliprect,TRANSPARENCY_PEN,0); + x, scanline-y,0); } num_sprt++; @@ -1016,12 +1014,11 @@ VIDEO_UPDATE( pestplce ) { if (state->sprite_ram[offs]) { - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], state->sprite_ram[offs + 2], (state->sprite_ram[offs + 1] & 0x0f) + 16 * state->palette_bank, state->sprite_ram[offs + 1] & 0x80,state->sprite_ram[offs + 1] & 0x40, - state->sprite_ram[offs + 3] - 8,240 - state->sprite_ram[offs] + 8, - cliprect,TRANSPARENCY_PEN,0); + state->sprite_ram[offs + 3] - 8,240 - state->sprite_ram[offs] + 8,0); } } return 0; diff --git a/src/mame/video/docastle.c b/src/mame/video/docastle.c index 61a116647d8..26552b9874d 100644 --- a/src/mame/video/docastle.c +++ b/src/mame/video/docastle.c @@ -197,22 +197,22 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta } /* first draw the sprite, visible */ - pdrawgfx(bitmap,machine->gfx[1], + pdrawgfx_transmask(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PENS,0x80ff, - 0x00); + priority_bitmap, + 0x00,0x80ff); /* then draw the mask, behind the background but obscuring following sprites */ - pdrawgfx(bitmap,machine->gfx[1], + pdrawgfx_transmask(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PENS,0x7fff, - 0x02); + priority_bitmap, + 0x02,0x7fff); } } diff --git a/src/mame/video/dogfgt.c b/src/mame/video/dogfgt.c index 5a25c4fa199..481ed5bbdc4 100644 --- a/src/mame/video/dogfgt.c +++ b/src/mame/video/dogfgt.c @@ -207,12 +207,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], spriteram[offs+1] + ((spriteram[offs] & 0x30) << 4), (spriteram[offs] & 0x08) >> 3, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } } diff --git a/src/mame/video/dooyong.c b/src/mame/video/dooyong.c index aa9fcddc161..1bb1d4ed990 100644 --- a/src/mame/video/dooyong.c +++ b/src/mame/video/dooyong.c @@ -424,13 +424,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta for (y = 0; y <= height; y++) { - pdrawgfx(bitmap, machine->gfx[1], + pdrawgfx_transpen(bitmap, cliprect, machine->gfx[1], code + y, color, flipx, flipy, sx, sy + (16 * (flipy ? (height - y) : y)), - cliprect, TRANSPARENCY_PEN, 15, - pri); + priority_bitmap, + pri, 15); } } } @@ -490,13 +490,13 @@ static void rshark_draw_sprites(running_machine *machine, bitmap_t *bitmap, cons for (x = 0; x <= width; x++) { int _x = sx + (16 * (flipx ? (width - x) : x)); - pdrawgfx(bitmap, machine->gfx[0], + pdrawgfx_transpen(bitmap, cliprect, machine->gfx[0], code, color, flipx, flipy, _x, _y, - cliprect, TRANSPARENCY_PEN, 15, - pri); + priority_bitmap, + pri, 15); code++; } } diff --git a/src/mame/video/drgnmst.c b/src/mame/video/drgnmst.c index 152743cc9b6..208663f1b27 100644 --- a/src/mame/video/drgnmst.c +++ b/src/mame/video/drgnmst.c @@ -99,7 +99,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan realy = ypos+incy*y; realnumber = number+x+y*16; - drawgfx(bitmap,gfx,realnumber,colr,flipx,flipy,realx,realy,cliprect,TRANSPARENCY_PEN,15); + drawgfx_transpen(bitmap,cliprect,gfx,realnumber,colr,flipx,flipy,realx,realy,15); } } diff --git a/src/mame/video/drmicro.c b/src/mame/video/drmicro.c index 1135753d5f9..3294d4bc53a 100644 --- a/src/mame/video/drmicro.c +++ b/src/mame/video/drmicro.c @@ -154,21 +154,19 @@ VIDEO_UPDATE( drmicro ) else x = (240-x) & 0xff; - drawgfx(bitmap,screen->machine->gfx[3-g], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[3-g], chr, col, fx,fy, - x,y, - cliprect,TRANSPARENCY_PEN,0); + x,y,0); if (x>240) { - drawgfx(bitmap,screen->machine->gfx[3-g], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[3-g], chr, col, fx,fy, - x-256,y, - cliprect,TRANSPARENCY_PEN,0); + x-256,y,0); } } } diff --git a/src/mame/video/dynduke.c b/src/mame/video/dynduke.c index af3af9d9800..d26bbc14233 100644 --- a/src/mame/video/dynduke.c +++ b/src/mame/video/dynduke.c @@ -161,10 +161,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan if (fy) fy=0; else fy=1; } - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], sprite, - color,fx,fy,x,y, - cliprect,TRANSPARENCY_PEN,15); + color,fx,fy,x,y,15); } } diff --git a/src/mame/video/equites.c b/src/mame/video/equites.c index dba04c93d26..1fb59d34c8a 100644 --- a/src/mame/video/equites.c +++ b/src/mame/video/equites.c @@ -283,12 +283,11 @@ static void equites_draw_sprites_block(running_machine *machine, bitmap_t *bitma // sprites are 16x14 centered in a 16x16 square, so skip the first line sy += 1; - drawgfx(bitmap,machine->gfx[2], + drawgfx_transmask(bitmap,cliprect, machine->gfx[2], tile, color, fx, fy, - sx, sy, - cliprect, TRANSPARENCY_PENS, transmask); + sx, sy, transmask); } } } diff --git a/src/mame/video/esd16.c b/src/mame/video/esd16.c index 07aad3241d2..111febf9049 100644 --- a/src/mame/video/esd16.c +++ b/src/mame/video/esd16.c @@ -247,12 +247,12 @@ static void esd16_draw_sprites(running_machine *machine, bitmap_t *bitmap, const for (y = starty ; y != endy ; y += incy) { - pdrawgfx( bitmap, machine->gfx[0], + pdrawgfx_transpen( bitmap, cliprect, machine->gfx[0], code++, color, flipx, flipy, sx, y, - cliprect, TRANSPARENCY_PEN, 0, pri_mask ); + priority_bitmap, pri_mask, 0 ); } } } @@ -310,12 +310,12 @@ static void hedpanic_draw_sprites(running_machine *machine, bitmap_t *bitmap, co for (y = starty ; y != endy ; y += incy) { - pdrawgfx( bitmap, machine->gfx[0], + pdrawgfx_transpen( bitmap, cliprect, machine->gfx[0], code++, color, flipx, flipy, sx, y, - cliprect, TRANSPARENCY_PEN, 0, pri_mask ); + priority_bitmap, pri_mask, 0 ); } } } diff --git a/src/mame/video/espial.c b/src/mame/video/espial.c index b4155989f3d..5999bbd74cc 100644 --- a/src/mame/video/espial.c +++ b/src/mame/video/espial.c @@ -200,39 +200,34 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { if (flipscreen) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code,color, flipx,flipy, - sx,sy + 16, - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[1], + sx,sy + 16,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code + 1, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } else { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code,color, flipx,flipy, - sx,sy - 16, - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[1], + sx,sy - 16,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code + 1,color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } else { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code,color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } } diff --git a/src/mame/video/exedexes.c b/src/mame/video/exedexes.c index e418f83cf38..0d17c3d0fc8 100644 --- a/src/mame/video/exedexes.c +++ b/src/mame/video/exedexes.c @@ -204,12 +204,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta sx = buffered_spriteram[offs + 3] - ((buffered_spriteram[offs + 1] & 0x80) << 1); sy = buffered_spriteram[offs + 2]; - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } } diff --git a/src/mame/video/exerion.c b/src/mame/video/exerion.c index 141987b94dd..fea01c8f427 100644 --- a/src/mame/video/exerion.c +++ b/src/mame/video/exerion.c @@ -394,13 +394,11 @@ VIDEO_UPDATE( exerion ) else code &= ~0x10, code2 |= 0x10; - drawgfx(bitmap, gfx, code2, color, xflip, yflip, x, y + gfx->height, - cliprect, TRANSPARENCY_PENS, + drawgfx_transmask(bitmap, cliprect, gfx, code2, color, xflip, yflip, x, y + gfx->height, colortable_get_transpen_mask(screen->machine->colortable, gfx, color, 0x10)); } - drawgfx(bitmap, gfx, code, color, xflip, yflip, x, y, - cliprect, TRANSPARENCY_PENS, + drawgfx_transmask(bitmap, cliprect, gfx, code, color, xflip, yflip, x, y, colortable_get_transpen_mask(screen->machine->colortable, gfx, color, 0x10)); if (doubled) i += 4; @@ -414,11 +412,10 @@ VIDEO_UPDATE( exerion ) int y = exerion_cocktail_flip ? (31*8 - 8*sy) : 8*sy; offs = sx + sy * 64; - drawgfx(bitmap, screen->machine->gfx[0], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[0], videoram[offs] + 256 * char_bank, ((videoram[offs] & 0xf0) >> 4) + char_palette * 16, - exerion_cocktail_flip, exerion_cocktail_flip, x, y, - cliprect, TRANSPARENCY_PEN, 0); + exerion_cocktail_flip, exerion_cocktail_flip, x, y, 0); } return 0; diff --git a/src/mame/video/exidy.c b/src/mame/video/exidy.c index 70fd604d4b6..47c33067a34 100644 --- a/src/mame/video/exidy.c +++ b/src/mame/video/exidy.c @@ -248,9 +248,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int sx = 236 - *exidy_sprite2_xpos - 4; int sy = 244 - *exidy_sprite2_ypos - 4; - drawgfx(bitmap, machine->gfx[0], + drawgfx_transpen(bitmap, cliprect, machine->gfx[0], ((*exidy_spriteno >> 4) & 0x0f) + 32 + 16 * sprite_set_2, 1, - 0, 0, sx, sy, cliprect, TRANSPARENCY_PEN, 0); + 0, 0, sx, sy, 0); /* draw sprite 1 next */ if (sprite_1_enabled()) @@ -262,9 +262,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (sy < 0) sy = 0; - drawgfx(bitmap, machine->gfx[0], + drawgfx_transpen(bitmap, cliprect, machine->gfx[0], (*exidy_spriteno & 0x0f) + 16 * sprite_set_1, 0, - 0, 0, sx, sy, cliprect, TRANSPARENCY_PEN, 0); + 0, 0, sx, sy, 0); } } @@ -319,18 +319,18 @@ static void check_collision(running_machine *machine) { org_1_x = 236 - *exidy_sprite1_xpos - 4; org_1_y = 244 - *exidy_sprite1_ypos - 4; - drawgfx(motion_object_1_vid, machine->gfx[0], + drawgfx_transpen(motion_object_1_vid, &clip, machine->gfx[0], (*exidy_spriteno & 0x0f) + 16 * sprite_set_1, 0, - 0, 0, 0, 0, &clip, TRANSPARENCY_PEN, 0); + 0, 0, 0, 0, 0); } /* draw sprite 2 */ bitmap_fill(motion_object_2_vid, &clip, 0xff); org_2_x = 236 - *exidy_sprite2_xpos - 4; org_2_y = 244 - *exidy_sprite2_ypos - 4; - drawgfx(motion_object_2_vid, machine->gfx[0], + drawgfx_transpen(motion_object_2_vid, &clip, machine->gfx[0], ((*exidy_spriteno >> 4) & 0x0f) + 32 + 16 * sprite_set_2, 0, - 0, 0, 0, 0, &clip, TRANSPARENCY_PEN, 0); + 0, 0, 0, 0, 0); /* draw sprite 2 clipped to sprite 1's location */ bitmap_fill(motion_object_2_clip, &clip, 0xff); @@ -338,9 +338,9 @@ static void check_collision(running_machine *machine) { sx = org_2_x - org_1_x; sy = org_2_y - org_1_y; - drawgfx(motion_object_2_clip, machine->gfx[0], + drawgfx_transpen(motion_object_2_clip, &clip, machine->gfx[0], ((*exidy_spriteno >> 4) & 0x0f) + 32 + 16 * sprite_set_2, 0, - 0, 0, sx, sy, &clip, TRANSPARENCY_PEN, 0); + 0, 0, sx, sy, 0); } /* scan for collisions */ diff --git a/src/mame/video/exprraid.c b/src/mame/video/exprraid.c index 103b5c3a1f2..5517ad88b88 100644 --- a/src/mame/video/exprraid.c +++ b/src/mame/video/exprraid.c @@ -114,21 +114,19 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap, 0, machine->gfx[1], code, color, flipx, flipy, - sx, sy, - 0, TRANSPARENCY_PEN, 0); + sx, sy, 0); /* double height */ if (attr & 0x10) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect, machine->gfx[1], code + 1, color, flipx, flipy, - sx, sy + (flip_screen_get(machine) ? -16 : 16), - cliprect, TRANSPARENCY_PEN, 0); + sx, sy + (flip_screen_get(machine) ? -16 : 16), 0); } } } diff --git a/src/mame/video/exzisus.c b/src/mame/video/exzisus.c index 484a9eef48c..cf3bf197387 100644 --- a/src/mame/video/exzisus.c +++ b/src/mame/video/exzisus.c @@ -144,12 +144,11 @@ VIDEO_UPDATE( exzisus ) y = 248 - y; } - drawgfx(bitmap, screen->machine->gfx[0], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[0], code & 0x3fff, color, flip_screen_get(screen->machine), flip_screen_get(screen->machine), - x, y, - cliprect, TRANSPARENCY_PEN, 15); + x, y, 15); goffs += 2; } gfx_offs += height << 1; @@ -214,12 +213,11 @@ VIDEO_UPDATE( exzisus ) y = 248 - y; } - drawgfx(bitmap, screen->machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], code & 0x3fff, color, flip_screen_get(screen->machine), flip_screen_get(screen->machine), - x, y, - cliprect, TRANSPARENCY_PEN, 15); + x, y, 15); goffs += 2; } gfx_offs += height << 1; diff --git a/src/mame/video/f1gp.c b/src/mame/video/f1gp.c index eb5ba9db54a..513d974a9e8 100644 --- a/src/mame/video/f1gp.c +++ b/src/mame/video/f1gp.c @@ -226,15 +226,15 @@ static void f1gp_draw_sprites(running_machine *machine,bitmap_t *bitmap,const re else code = f1gp_spr2cgram[map_start % (f1gp_spr2cgram_size/2)]; - pdrawgfxzoom(bitmap,machine->gfx[1 + chip], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[1 + chip], code, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PEN,15, 0x1000 * zoomx,0x1000 * zoomy, + priority_bitmap, // pri ? 0 : 0x2); - primask); + primask,15); map_start++; } @@ -293,22 +293,22 @@ static void f1gpb_draw_sprites(running_machine *machine, bitmap_t *bitmap,const gfx = 0; } - pdrawgfx(bitmap,machine->gfx[1 + gfx], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[1 + gfx], code, color, flipx,flipy, x,y, - cliprect,TRANSPARENCY_PEN,15, - pri ? 0 : 0x2); + priority_bitmap, + pri ? 0 : 0x2,15); // wrap around x - pdrawgfx(bitmap,machine->gfx[1 + gfx], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[1 + gfx], code, color, flipx,flipy, x - 512,y, - cliprect,TRANSPARENCY_PEN,15, - pri ? 0 : 0x2); + priority_bitmap, + pri ? 0 : 0x2,15); } } @@ -415,21 +415,19 @@ static void f1gp2_draw_sprites(running_machine *machine,bitmap_t *bitmap,const r map_start++; if (flipscreen) - drawgfxzoom(bitmap,machine->gfx[1], + drawgfxzoom_transpen(bitmap,cliprect,machine->gfx[1], code, color, !flipx,!flipy, 304-sx,208-sy, - cliprect,TRANSPARENCY_PEN,15, - zoomx << 11,zoomy << 11); + zoomx << 11,zoomy << 11,15); else - drawgfxzoom(bitmap,machine->gfx[1], + drawgfxzoom_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PEN,15, - zoomx << 11,zoomy << 11); + zoomx << 11,zoomy << 11,15); } } } diff --git a/src/mame/video/fantland.c b/src/mame/video/fantland.c index 33b892b0531..b32cce45bc1 100644 --- a/src/mame/video/fantland.c +++ b/src/mame/video/fantland.c @@ -132,7 +132,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan if (x >= 0x180) x -= 0x200; - drawgfx(bitmap,machine->gfx[0], code,color, flipx,flipy, x,y, cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code,color, flipx,flipy, x,y,0); } } diff --git a/src/mame/video/fastfred.c b/src/mame/video/fastfred.c index 0425d49f3d0..68b9abb02e5 100644 --- a/src/mame/video/fastfred.c +++ b/src/mame/video/fastfred.c @@ -298,12 +298,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,flip_screen_x_get(machine) ? &spritevisibleareaflipx : &spritevisiblearea,machine->gfx[1], code, colorbank | (fastfred_spriteram[offs + 2] & 0x07), flipx,flipy, - sx,sy, - flip_screen_x_get(machine) ? &spritevisibleareaflipx : &spritevisiblearea,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/fastlane.c b/src/mame/video/fastlane.c index 5d496f78c79..7fc54b73d09 100644 --- a/src/mame/video/fastlane.c +++ b/src/mame/video/fastlane.c @@ -163,7 +163,7 @@ VIDEO_UPDATE( fastlane ) tilemap_set_scrolly( layer0, 0, K007121_ctrlram[0][0x02] ); tilemap_draw(bitmap,&finalclip0,layer0,0,0); - K007121_sprites_draw(0,bitmap,screen->machine->gfx,screen->machine->colortable,cliprect,spriteram,0,40,0,-1); + K007121_sprites_draw(0,bitmap,cliprect,screen->machine->gfx,screen->machine->colortable,spriteram,0,40,0,-1); tilemap_draw(bitmap,&finalclip1,layer1,0,0); return 0; } diff --git a/src/mame/video/fcombat.c b/src/mame/video/fcombat.c index 70b5b301537..edb8320ee37 100644 --- a/src/mame/video/fcombat.c +++ b/src/mame/video/fcombat.c @@ -195,8 +195,7 @@ tilemap_mark_all_tiles_dirty(bgmap); else code &= ~0x10, code2 |= 0x10; - drawgfx(bitmap, gfx, code2, color, xflip, yflip, x, y + gfx->height, - cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, gfx, code2, color, xflip, yflip, x, y + gfx->height, 0); } if(flags&0x10) @@ -204,19 +203,15 @@ tilemap_mark_all_tiles_dirty(bgmap); - drawgfx(bitmap, gfx, code2+16, color, xflip, yflip, x, y + gfx->height, - cliprect, TRANSPARENCY_PEN, 0); - drawgfx(bitmap, gfx, code2+16*2, color, xflip, yflip, x, y + 2*gfx->height, - cliprect, TRANSPARENCY_PEN, 0); - drawgfx(bitmap, gfx, code2+16*3, color, xflip, yflip, x, y + 3*gfx->height, - cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, gfx, code2+16, color, xflip, yflip, x, y + gfx->height, 0); + drawgfx_transpen(bitmap, cliprect, gfx, code2+16*2, color, xflip, yflip, x, y + 2*gfx->height, 0); + drawgfx_transpen(bitmap, cliprect, gfx, code2+16*3, color, xflip, yflip, x, y + 3*gfx->height, 0); } - drawgfx(bitmap, gfx, code, color, xflip, yflip, x, y, - cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, gfx, code, color, xflip, yflip, x, y, 0); if (doubled) i += 4; } @@ -229,11 +224,10 @@ tilemap_mark_all_tiles_dirty(bgmap); int y = fcombat_cocktail_flip ? (31*8 - 8*sy) : 8*sy; offs = sx + sy * 64; - drawgfx(bitmap, screen->machine->gfx[0], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[0], videoram[offs] + 256 * char_bank, ((videoram[offs] & 0xf0) >> 4) + char_palette * 16, - fcombat_cocktail_flip, fcombat_cocktail_flip, x, y, - cliprect, TRANSPARENCY_PEN, 0); + fcombat_cocktail_flip, fcombat_cocktail_flip, x, y, 0); } return 0; } diff --git a/src/mame/video/fgoal.c b/src/mame/video/fgoal.c index 4469236926d..dc0c1182c5a 100644 --- a/src/mame/video/fgoal.c +++ b/src/mame/video/fgoal.c @@ -53,37 +53,33 @@ VIDEO_UPDATE( fgoal ) if (fgoal_player == 1 && (input_port_read(screen->machine, "IN1") & 0x40)) { - drawgfxzoom(fgbitmap, screen->machine->gfx[0], + drawgfxzoom_opaque(fgbitmap, cliprect, screen->machine->gfx[0], 0, (fgoal_player << 2) | current_color, 1, 1, 0, 16, - cliprect, TRANSPARENCY_NONE, 0, 0x40000, 0x40000); - drawgfxzoom(bgbitmap, screen->machine->gfx[1], + drawgfxzoom_opaque(bgbitmap, cliprect, screen->machine->gfx[1], 0, 0, 1, 1, 0, 16, - cliprect, TRANSPARENCY_NONE, 0, 0x40000, 0x40000); } else { - drawgfxzoom(fgbitmap, screen->machine->gfx[0], + drawgfxzoom_opaque(fgbitmap, cliprect, screen->machine->gfx[0], 0, (fgoal_player << 2) | current_color, 0, 0, 0, 0, - cliprect, TRANSPARENCY_NONE, 0, 0x40000, 0x40000); - drawgfxzoom(bgbitmap, screen->machine->gfx[1], + drawgfxzoom_opaque(bgbitmap, cliprect, screen->machine->gfx[1], 0, 0, 0, 0, 0, 0, - cliprect, TRANSPARENCY_NONE, 0, 0x40000, 0x40000); } diff --git a/src/mame/video/finalizr.c b/src/mame/video/finalizr.c index be52faa2c46..bf3268d6ce7 100644 --- a/src/mame/video/finalizr.c +++ b/src/mame/video/finalizr.c @@ -135,30 +135,26 @@ VIDEO_UPDATE( finalizr ) flipy = !flipy; } - drawgfx(bitmap,gfx1, + drawgfx_transpen(bitmap,cliprect,gfx1, code, color, flipx,flipy, - flipx?sx+16:sx,flipy?sy+16:sy, - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,gfx1, + flipx?sx+16:sx,flipy?sy+16:sy,0); + drawgfx_transpen(bitmap,cliprect,gfx1, code + 1, color, flipx,flipy, - flipx?sx:sx+16,flipy?sy+16:sy, - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,gfx1, + flipx?sx:sx+16,flipy?sy+16:sy,0); + drawgfx_transpen(bitmap,cliprect,gfx1, code + 2, color, flipx,flipy, - flipx?sx+16:sx,flipy?sy:sy+16, - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,gfx1, + flipx?sx+16:sx,flipy?sy:sy+16,0); + drawgfx_transpen(bitmap,cliprect,gfx1, code + 3, color, flipx,flipy, - flipx?sx:sx+16,flipy?sy:sy+16, - cliprect,TRANSPARENCY_PEN,0); + flipx?sx:sx+16,flipy?sy:sy+16,0); } else { @@ -172,12 +168,11 @@ VIDEO_UPDATE( finalizr ) if (size == 0x00) /* 16x16 */ { - drawgfx(bitmap,gfx1, + drawgfx_transpen(bitmap,cliprect,gfx1, code, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } else { @@ -185,42 +180,37 @@ VIDEO_UPDATE( finalizr ) if (size == 0x04) /* 16x8 */ { - drawgfx(bitmap,gfx2, + drawgfx_transpen(bitmap,cliprect,gfx2, code & ~1, color, flipx,flipy, - flipx?sx+8:sx,sy, - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,gfx2, + flipx?sx+8:sx,sy,0); + drawgfx_transpen(bitmap,cliprect,gfx2, code | 1, color, flipx,flipy, - flipx?sx:sx+8,sy, - cliprect,TRANSPARENCY_PEN,0); + flipx?sx:sx+8,sy,0); } else if (size == 0x08) /* 8x16 */ { - drawgfx(bitmap,gfx2, + drawgfx_transpen(bitmap,cliprect,gfx2, code & ~2, color, flipx,flipy, - sx,flipy?sy+8:sy, - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,gfx2, + sx,flipy?sy+8:sy,0); + drawgfx_transpen(bitmap,cliprect,gfx2, code | 2, color, flipx,flipy, - sx,flipy?sy:sy+8, - cliprect,TRANSPARENCY_PEN,0); + sx,flipy?sy:sy+8,0); } else if (size == 0x0c) /* 8x8 */ { - drawgfx(bitmap,gfx2, + drawgfx_transpen(bitmap,cliprect,gfx2, code, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } } diff --git a/src/mame/video/firetrap.c b/src/mame/video/firetrap.c index c42694f40dd..c8137f14185 100644 --- a/src/mame/video/firetrap.c +++ b/src/mame/video/firetrap.c @@ -239,49 +239,43 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { if (flip_screen_get(machine)) sy -= 16; - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code & ~1, color, flipx,flipy, - sx,flipy ? sy : sy + 16, - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[3], + sx,flipy ? sy : sy + 16,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code | 1, color, flipx,flipy, - sx,flipy ? sy + 16 : sy, - cliprect,TRANSPARENCY_PEN,0); + sx,flipy ? sy + 16 : sy,0); /* redraw with wraparound */ - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code & ~1, color, flipx,flipy, - sx - 256,flipy ? sy : sy + 16, - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[3], + sx - 256,flipy ? sy : sy + 16,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code | 1, color, flipx,flipy, - sx - 256,flipy ? sy + 16 : sy, - cliprect,TRANSPARENCY_PEN,0); + sx - 256,flipy ? sy + 16 : sy,0); } else { - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); /* redraw with wraparound */ - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code, color, flipx,flipy, - sx - 256,sy, - cliprect,TRANSPARENCY_PEN,0); + sx - 256,sy,0); } } } diff --git a/src/mame/video/firetrk.c b/src/mame/video/firetrk.c index 0f6cbb8fbe7..bdce628302b 100644 --- a/src/mame/video/firetrk.c +++ b/src/mame/video/firetrk.c @@ -262,7 +262,7 @@ VIDEO_START( montecar ) } -static void firetrk_draw_car(gfx_element **gfx, bitmap_t *bitmap, const rectangle *cliprect, int which, int flash) +static void firetrk_draw_car(bitmap_t *bitmap, const rectangle *cliprect, gfx_element **gfx, int which, int flash) { int gfx_bank, code, color, flip_x, flip_y, x, y; @@ -287,11 +287,11 @@ static void firetrk_draw_car(gfx_element **gfx, bitmap_t *bitmap, const rectangl y = 104; } - drawgfx(bitmap, gfx[gfx_bank], code, color, flip_x, flip_y, x, y, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, gfx[gfx_bank], code, color, flip_x, flip_y, x, y, 0); } -static void superbug_draw_car(gfx_element **gfx, bitmap_t *bitmap, const rectangle *cliprect, int flash) +static void superbug_draw_car(bitmap_t *bitmap, const rectangle *cliprect, gfx_element **gfx, int flash) { int gfx_bank = (*firetrk_car_rot & 0x10) ? 4 : 3; int code = ~*firetrk_car_rot & 0x03; @@ -299,11 +299,11 @@ static void superbug_draw_car(gfx_element **gfx, bitmap_t *bitmap, const rectang int flip_x = *firetrk_car_rot & 0x04; int flip_y = *firetrk_car_rot & 0x08; - drawgfx(bitmap, gfx[gfx_bank], code, color, flip_x, flip_y, 144, 104, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, gfx[gfx_bank], code, color, flip_x, flip_y, 144, 104, 0); } -static void montecar_draw_car(gfx_element **gfx, bitmap_t *bitmap, const rectangle *cliprect, int which, int is_collision_detection) +static void montecar_draw_car(bitmap_t *bitmap, const rectangle *cliprect, gfx_element **gfx, int which, int is_collision_detection) { int gfx_bank, code, color, flip_x, flip_y, x, y; @@ -328,17 +328,17 @@ static void montecar_draw_car(gfx_element **gfx, bitmap_t *bitmap, const rectang y = 104; } - drawgfx(bitmap, gfx[gfx_bank], code, color, flip_x, flip_y, x, y, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, gfx[gfx_bank], code, color, flip_x, flip_y, x, y, 0); } -static void draw_text(gfx_element **gfx, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *alpha_ram, +static void draw_text(bitmap_t *bitmap, const rectangle *cliprect, gfx_element **gfx, UINT8 *alpha_ram, int x, int count, int height) { int i; for (i = 0; i < count; i++) - drawgfx(bitmap, gfx[0], alpha_ram[i], 0, 0, 0, x, i * height, cliprect, TRANSPARENCY_NONE, 0); + drawgfx_opaque(bitmap, cliprect, gfx[0], alpha_ram[i], 0, 0, 0, x, i * height); } @@ -371,21 +371,21 @@ VIDEO_UPDATE( firetrk ) bitmap_fill(bitmap, cliprect, 0); tilemap_draw(bitmap, &playfield_window, tilemap1, 0, 0); - firetrk_draw_car(screen->machine->gfx, bitmap, &playfield_window, 0, firetrk_flash); - firetrk_draw_car(screen->machine->gfx, bitmap, &playfield_window, 1, firetrk_flash); - draw_text(screen->machine->gfx, bitmap, cliprect, firetrk_alpha_num_ram + 0x00, 296, 0x10, 0x10); - draw_text(screen->machine->gfx, bitmap, cliprect, firetrk_alpha_num_ram + 0x10, 8, 0x10, 0x10); + firetrk_draw_car(bitmap, &playfield_window, screen->machine->gfx, 0, firetrk_flash); + firetrk_draw_car(bitmap, &playfield_window, screen->machine->gfx, 1, firetrk_flash); + draw_text(bitmap, cliprect, screen->machine->gfx, firetrk_alpha_num_ram + 0x00, 296, 0x10, 0x10); + draw_text(bitmap, cliprect, screen->machine->gfx, firetrk_alpha_num_ram + 0x10, 8, 0x10, 0x10); if (cliprect->max_y == video_screen_get_visible_area(screen)->max_y) { tilemap_draw(helper1, &playfield_window, tilemap2, 0, 0); bitmap_fill(helper2, &playfield_window, 0xff); - firetrk_draw_car(screen->machine->gfx, helper2, &playfield_window, 0, FALSE); + firetrk_draw_car(helper2, &playfield_window, screen->machine->gfx, 0, FALSE); check_collision(0); bitmap_fill(helper2, &playfield_window, 0xff); - firetrk_draw_car(screen->machine->gfx, helper2, &playfield_window, 1, FALSE); + firetrk_draw_car(helper2, &playfield_window, screen->machine->gfx, 1, FALSE); check_collision(1); *firetrk_blink = FALSE; @@ -405,16 +405,16 @@ VIDEO_UPDATE( superbug ) bitmap_fill(bitmap, cliprect, 0); tilemap_draw(bitmap, &playfield_window, tilemap1, 0, 0); - superbug_draw_car(screen->machine->gfx, bitmap, &playfield_window, firetrk_flash); - draw_text(screen->machine->gfx, bitmap, cliprect, firetrk_alpha_num_ram + 0x00, 296, 0x10, 0x10); - draw_text(screen->machine->gfx, bitmap, cliprect, firetrk_alpha_num_ram + 0x10, 8, 0x10, 0x10); + superbug_draw_car(bitmap, &playfield_window, screen->machine->gfx, firetrk_flash); + draw_text(bitmap, cliprect, screen->machine->gfx, firetrk_alpha_num_ram + 0x00, 296, 0x10, 0x10); + draw_text(bitmap, cliprect, screen->machine->gfx, firetrk_alpha_num_ram + 0x10, 8, 0x10, 0x10); if (cliprect->max_y == video_screen_get_visible_area(screen)->max_y) { tilemap_draw(helper1, &playfield_window, tilemap2, 0, 0); bitmap_fill(helper2, &playfield_window, 0xff); - superbug_draw_car(screen->machine->gfx, helper2, &playfield_window, FALSE); + superbug_draw_car(helper2, &playfield_window, screen->machine->gfx, FALSE); check_collision(0); *firetrk_blink = FALSE; @@ -434,21 +434,21 @@ VIDEO_UPDATE( montecar ) bitmap_fill(bitmap, cliprect, 0x2c); tilemap_draw(bitmap, &playfield_window, tilemap1, 0, 0); - montecar_draw_car(screen->machine->gfx, bitmap, &playfield_window, 0, FALSE); - montecar_draw_car(screen->machine->gfx, bitmap, &playfield_window, 1, FALSE); - draw_text(screen->machine->gfx, bitmap, cliprect, firetrk_alpha_num_ram + 0x00, 24, 0x20, 0x08); - draw_text(screen->machine->gfx, bitmap, cliprect, firetrk_alpha_num_ram + 0x20, 16, 0x20, 0x08); + montecar_draw_car(bitmap, &playfield_window, screen->machine->gfx, 0, FALSE); + montecar_draw_car(bitmap, &playfield_window, screen->machine->gfx, 1, FALSE); + draw_text(bitmap, cliprect, screen->machine->gfx, firetrk_alpha_num_ram + 0x00, 24, 0x20, 0x08); + draw_text(bitmap, cliprect, screen->machine->gfx, firetrk_alpha_num_ram + 0x20, 16, 0x20, 0x08); if (cliprect->max_y == video_screen_get_visible_area(screen)->max_y) { tilemap_draw(helper1, &playfield_window, tilemap2, 0, 0); bitmap_fill(helper2, &playfield_window, 0xff); - montecar_draw_car(screen->machine->gfx, helper2, &playfield_window, 0, TRUE); + montecar_draw_car(helper2, &playfield_window, screen->machine->gfx, 0, TRUE); check_collision(0); bitmap_fill(helper2, &playfield_window, 0xff); - montecar_draw_car(screen->machine->gfx, helper2, &playfield_window, 1, TRUE); + montecar_draw_car(helper2, &playfield_window, screen->machine->gfx, 1, TRUE); check_collision(1); } diff --git a/src/mame/video/fitfight.c b/src/mame/video/fitfight.c index 41a1c1559e7..d0aac8fe704 100644 --- a/src/mame/video/fitfight.c +++ b/src/mame/video/fitfight.c @@ -34,7 +34,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (end) break; if (prio == layer) - drawgfx(bitmap,gfx,number,colr,xflip,yflip,xpos,ypos,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,number,colr,xflip,yflip,xpos,ypos,0); source+=4; } diff --git a/src/mame/video/flkatck.c b/src/mame/video/flkatck.c index 9afe424637b..b30bb305a6a 100644 --- a/src/mame/video/flkatck.c +++ b/src/mame/video/flkatck.c @@ -173,7 +173,7 @@ popmessage("%02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x %02x-%02x-%02x-%02x-%02x-%0 /* draw the graphics */ tilemap_draw(bitmap,&final_clip[0],k007121_tilemap[0],0,0); - K007121_sprites_draw(0,bitmap,screen->machine->gfx,NULL,cliprect,&k007121_ram[0x1000],0,40,0,-1); + K007121_sprites_draw(0,bitmap,cliprect,screen->machine->gfx,NULL,&k007121_ram[0x1000],0,40,0,-1); tilemap_draw(bitmap,&final_clip[1],k007121_tilemap[1],0,0); return 0; } diff --git a/src/mame/video/flower.c b/src/mame/video/flower.c index 0d167132835..af644fd554d 100644 --- a/src/mame/video/flower.c +++ b/src/mame/video/flower.c @@ -106,13 +106,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (xblock) sxoffs+=xblocksizeinpixels; if (yblock) syoffs+=yblocksizeinpixels; - drawgfxzoom(bitmap,gfx, + drawgfxzoom_transpen(bitmap,cliprect,gfx, code+yoffs+xoffs, color, flipx,flipy, sx+sxoffs,sy+syoffs, - cliprect,TRANSPARENCY_PEN,15, - zoomx,zoomy); + zoomx,zoomy,15); } } source -= 8; diff --git a/src/mame/video/flstory.c b/src/mame/video/flstory.c index ed5bb1fbc8e..f40e4efd4e2 100644 --- a/src/mame/video/flstory.c +++ b/src/mame/video/flstory.c @@ -166,20 +166,18 @@ static void flstory_draw_sprites(running_machine *machine, bitmap_t *bitmap, con flipx = ((spriteram[offs+1]&0x40)>>6)^flipscreen; flipy = ((spriteram[offs+1]&0x80)>>7)^flipscreen; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, spriteram[offs+1] & 0x0f, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); /* wrap around */ if (sx > 240) - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, spriteram[offs+1] & 0x0f, flipx,flipy, - sx-256,sy, - cliprect,TRANSPARENCY_PEN,15); + sx-256,sy,15); } } } @@ -223,20 +221,18 @@ static void victnine_draw_sprites(running_machine *machine, bitmap_t *bitmap, co flipx = ((spriteram[offs+1]&0x40)>>6)^flipscreen; flipy = ((spriteram[offs+1]&0x80)>>7)^flipscreen; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, spriteram[offs+1] & 0x0f, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); /* wrap around */ if (sx > 240) - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, spriteram[offs+1] & 0x0f, flipx,flipy, - sx-256,sy, - cliprect,TRANSPARENCY_PEN,15); + sx-256,sy,15); } } } diff --git a/src/mame/video/flyball.c b/src/mame/video/flyball.c index 4e98ffc493d..2aa57d6b817 100644 --- a/src/mame/video/flyball.c +++ b/src/mame/video/flyball.c @@ -73,8 +73,8 @@ VIDEO_UPDATE( flyball ) /* draw pitcher */ - drawgfx(bitmap, screen->machine->gfx[1], flyball_pitcher_pic ^ 0xf, - 0, 1, 0, pitcherx, pitchery, cliprect, TRANSPARENCY_PEN, 1); + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], flyball_pitcher_pic ^ 0xf, + 0, 1, 0, pitcherx, pitchery, 1); /* draw ball */ diff --git a/src/mame/video/foodf.c b/src/mame/video/foodf.c index c9aa7e173a5..da6155d4b93 100644 --- a/src/mame/video/foodf.c +++ b/src/mame/video/foodf.c @@ -143,12 +143,12 @@ VIDEO_UPDATE( foodf ) int vflip = (data1 >> 14) & 1; int pri = (data1 >> 13) & 1; - pdrawgfx(bitmap, screen->machine->gfx[1], pict, color, hflip, vflip, - xpos, ypos, cliprect, TRANSPARENCY_PEN, 0, pri * 2); + pdrawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], pict, color, hflip, vflip, + xpos, ypos, priority_bitmap, pri * 2, 0); /* draw again with wraparound (needed to get the end of level animation right) */ - pdrawgfx(bitmap, screen->machine->gfx[1], pict, color, hflip, vflip, - xpos - 256, ypos, cliprect, TRANSPARENCY_PEN, 0, pri * 2); + pdrawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], pict, color, hflip, vflip, + xpos - 256, ypos, priority_bitmap, pri * 2, 0); } return 0; diff --git a/src/mame/video/freekick.c b/src/mame/video/freekick.c index 73ce9468266..32ce1fbf87c 100644 --- a/src/mame/video/freekick.c +++ b/src/mame/video/freekick.c @@ -55,12 +55,11 @@ static void gigas_draw_sprites(running_machine *machine, bitmap_t *bitmap, const flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, - xpos,240-ypos, - cliprect,TRANSPARENCY_PEN,0); + xpos,240-ypos,0); } } @@ -90,12 +89,11 @@ static void pbillrd_draw_sprites(running_machine *machine, bitmap_t *bitmap, con flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, - xpos,240-ypos, - cliprect,TRANSPARENCY_PEN,0); + xpos,240-ypos,0); } } @@ -126,12 +124,11 @@ static void freekick_draw_sprites(running_machine *machine, bitmap_t *bitmap, co flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, - xpos,248-ypos, - cliprect,TRANSPARENCY_PEN,0); + xpos,248-ypos,0); } } diff --git a/src/mame/video/fromance.c b/src/mame/video/fromance.c index 7b8c91782cf..fc38bb7933b 100644 --- a/src/mame/video/fromance.c +++ b/src/mame/video/fromance.c @@ -360,12 +360,12 @@ static void draw_sprites(const device_config *screen, bitmap_t *bitmap, const re for (yt = 0; yt < ytiles; yt++) for (xt = 0; xt < xtiles; xt++, code++) if (!zoomed) - drawgfx(bitmap, screen->machine->gfx[2], code, color, 0, 0, - x + xt * 16, y + yt * 16, cliprect, TRANSPARENCY_PEN, 15); + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[2], code, color, 0, 0, + x + xt * 16, y + yt * 16, 15); else - drawgfxzoom(bitmap, screen->machine->gfx[2], code, color, 0, 0, - x + xt * xzoom, y + yt * yzoom, cliprect, TRANSPARENCY_PEN, 15, - 0x1000 * xzoom, 0x1000 * yzoom); + drawgfxzoom_transpen(bitmap, cliprect, screen->machine->gfx[2], code, color, 0, 0, + x + xt * xzoom, y + yt * yzoom, + 0x1000 * xzoom, 0x1000 * yzoom, 15); } /* xflipped case */ @@ -374,12 +374,12 @@ static void draw_sprites(const device_config *screen, bitmap_t *bitmap, const re for (yt = 0; yt < ytiles; yt++) for (xt = 0; xt < xtiles; xt++, code++) if (!zoomed) - drawgfx(bitmap, screen->machine->gfx[2], code, color, 1, 0, - x + (xtiles - 1 - xt) * 16, y + yt * 16, cliprect, TRANSPARENCY_PEN, 15); + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[2], code, color, 1, 0, + x + (xtiles - 1 - xt) * 16, y + yt * 16, 15); else - drawgfxzoom(bitmap, screen->machine->gfx[2], code, color, 1, 0, - x + (xtiles - 1 - xt) * xzoom, y + yt * yzoom, cliprect, TRANSPARENCY_PEN, 15, - 0x1000 * xzoom, 0x1000 * yzoom); + drawgfxzoom_transpen(bitmap, cliprect, screen->machine->gfx[2], code, color, 1, 0, + x + (xtiles - 1 - xt) * xzoom, y + yt * yzoom, + 0x1000 * xzoom, 0x1000 * yzoom, 15); } /* yflipped case */ @@ -388,12 +388,12 @@ static void draw_sprites(const device_config *screen, bitmap_t *bitmap, const re for (yt = 0; yt < ytiles; yt++) for (xt = 0; xt < xtiles; xt++, code++) if (!zoomed) - drawgfx(bitmap, screen->machine->gfx[2], code, color, 0, 1, - x + xt * 16, y + (ytiles - 1 - yt) * 16, cliprect, TRANSPARENCY_PEN, 15); + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[2], code, color, 0, 1, + x + xt * 16, y + (ytiles - 1 - yt) * 16, 15); else - drawgfxzoom(bitmap, screen->machine->gfx[2], code, color, 0, 1, - x + xt * xzoom, y + (ytiles - 1 - yt) * yzoom, cliprect, TRANSPARENCY_PEN, 15, - 0x1000 * xzoom, 0x1000 * yzoom); + drawgfxzoom_transpen(bitmap, cliprect, screen->machine->gfx[2], code, color, 0, 1, + x + xt * xzoom, y + (ytiles - 1 - yt) * yzoom, + 0x1000 * xzoom, 0x1000 * yzoom, 15); } /* x & yflipped case */ @@ -402,12 +402,12 @@ static void draw_sprites(const device_config *screen, bitmap_t *bitmap, const re for (yt = 0; yt < ytiles; yt++) for (xt = 0; xt < xtiles; xt++, code++) if (!zoomed) - drawgfx(bitmap, screen->machine->gfx[2], code, color, 1, 1, - x + (xtiles - 1 - xt) * 16, y + (ytiles - 1 - yt) * 16, cliprect, TRANSPARENCY_PEN, 15); + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[2], code, color, 1, 1, + x + (xtiles - 1 - xt) * 16, y + (ytiles - 1 - yt) * 16, 15); else - drawgfxzoom(bitmap, screen->machine->gfx[2], code, color, 1, 1, - x + (xtiles - 1 - xt) * xzoom, y + (ytiles - 1 - yt) * yzoom, cliprect, TRANSPARENCY_PEN, 15, - 0x1000 * xzoom, 0x1000 * yzoom); + drawgfxzoom_transpen(bitmap, cliprect, screen->machine->gfx[2], code, color, 1, 1, + x + (xtiles - 1 - xt) * xzoom, y + (ytiles - 1 - yt) * yzoom, + 0x1000 * xzoom, 0x1000 * yzoom, 15); } } } diff --git a/src/mame/video/funkybee.c b/src/mame/video/funkybee.c index 2d71964313a..c61f4b78ad6 100644 --- a/src/mame/video/funkybee.c +++ b/src/mame/video/funkybee.c @@ -113,11 +113,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipx = !flipx; } - drawgfx(bitmap,machine->gfx[2+gfx_bank], + drawgfx_transpen(bitmap,cliprect, machine->gfx[2+gfx_bank], code, color, flipx, flipy, - sx, sy, - cliprect, TRANSPARENCY_PEN, 0); + sx, sy, 0); } } @@ -136,11 +135,10 @@ static void draw_columns(running_machine *machine, bitmap_t *bitmap, const recta if (flip) sy = 248 - sy; - drawgfx(bitmap,machine->gfx[gfx_bank], + drawgfx_transpen(bitmap,cliprect,machine->gfx[gfx_bank], code, color, flip, flip, - sx, sy, - cliprect,TRANSPARENCY_PEN,0); + sx, sy,0); code = videoram[0x1d00 + offs]; color = colorram[0x1f11] & 0x03; @@ -150,11 +148,10 @@ static void draw_columns(running_machine *machine, bitmap_t *bitmap, const recta if (flip) sy = 248 - sy; - drawgfx(bitmap,machine->gfx[gfx_bank], + drawgfx_transpen(bitmap,cliprect,machine->gfx[gfx_bank], code, color, flip, flip, - sx, sy, - cliprect,TRANSPARENCY_PEN,0); + sx, sy,0); } } diff --git a/src/mame/video/funkyjet.c b/src/mame/video/funkyjet.c index 2fd18a0ea48..0178b684d58 100644 --- a/src/mame/video/funkyjet.c +++ b/src/mame/video/funkyjet.c @@ -65,12 +65,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta while (multi >= 0) { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x,y + mult * multi,0); multi--; } diff --git a/src/mame/video/funybubl.c b/src/mame/video/funybubl.c index a86ff63ec60..57d846a3963 100644 --- a/src/mame/video/funybubl.c +++ b/src/mame/video/funybubl.c @@ -67,7 +67,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (source[1] & 0x20) { if (xpos < 0xe0) xpos += 0x100; } // bits 0x40 and 0x10 not used?... - drawgfx(bitmap,machine->gfx[1],tile,0,0,0,xpos,ypos,cliprect,TRANSPARENCY_PEN,255); + drawgfx_transpen(bitmap,cliprect,machine->gfx[1],tile,0,0,0,xpos,ypos,255); source -= 0x20; } @@ -92,7 +92,7 @@ VIDEO_UPDATE(funybubl) int data; data = funybubl_banked_videoram[offs] | (funybubl_banked_videoram[offs+1] << 8); - drawgfx(bitmap,screen->machine->gfx[0],data&0x7fff,(data&0x8000)?2:1,0,0,x*8,y*8,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0],data&0x7fff,(data&0x8000)?2:1,0,0,x*8,y*8,0); offs+=2; } } diff --git a/src/mame/video/fuukifg2.c b/src/mame/video/fuukifg2.c index b524086174c..8d8b268db83 100644 --- a/src/mame/video/fuukifg2.c +++ b/src/mame/video/fuukifg2.c @@ -202,22 +202,21 @@ static void draw_sprites(const device_config *screen, bitmap_t *bitmap, const re for (x = xstart; x != xend; x += xinc) { if (xzoom == (16*8) && yzoom == (16*8)) - pdrawgfx( bitmap,screen->machine->gfx[0], + pdrawgfx_transpen( bitmap,cliprect,screen->machine->gfx[0], code++, attr & 0x3f, flipx, flipy, sx + x * 16, sy + y * 16, - cliprect,TRANSPARENCY_PEN,15, - pri_mask ); + priority_bitmap, + pri_mask,15 ); else - pdrawgfxzoom( bitmap,screen->machine->gfx[0], + pdrawgfxzoom_transpen( bitmap,cliprect,screen->machine->gfx[0], code++, attr & 0x3f, flipx, flipy, sx + (x * xzoom) / 8, sy + (y * yzoom) / 8, - cliprect,TRANSPARENCY_PEN,15, - (0x10000/0x10/8) * (xzoom + 8),(0x10000/0x10/8) * (yzoom + 8), // nearest greater integer value to avoid holes - pri_mask ); + (0x10000/0x10/8) * (xzoom + 8),(0x10000/0x10/8) * (yzoom + 8), priority_bitmap,// nearest greater integer value to avoid holes + pri_mask,15 ); } } diff --git a/src/mame/video/fuukifg3.c b/src/mame/video/fuukifg3.c index 671ffbc3792..fcb389b8edc 100644 --- a/src/mame/video/fuukifg3.c +++ b/src/mame/video/fuukifg3.c @@ -234,22 +234,21 @@ static void draw_sprites(const device_config *screen, bitmap_t *bitmap, const re for (x = xstart; x != xend; x += xinc) { if (xzoom == (16*8) && yzoom == (16*8)) - pdrawgfx( bitmap,screen->machine->gfx[0], + pdrawgfx_transpen( bitmap,cliprect,screen->machine->gfx[0], code++, attr & 0x3f, flipx, flipy, sx + x * 16, sy + y * 16, - cliprect,TRANSPARENCY_PEN,15, - pri_mask ); + priority_bitmap, + pri_mask,15 ); else - pdrawgfxzoom( bitmap,screen->machine->gfx[0], + pdrawgfxzoom_transpen( bitmap,cliprect,screen->machine->gfx[0], code++, attr & 0x3f, flipx, flipy, sx + (x * xzoom) / 8, sy + (y * yzoom) / 8, - cliprect,TRANSPARENCY_PEN,15, - (0x10000/0x10/8) * (xzoom + 8),(0x10000/0x10/8) * (yzoom + 8), // nearest greater integer value to avoid holes - pri_mask ); + (0x10000/0x10/8) * (xzoom + 8),(0x10000/0x10/8) * (yzoom + 8), priority_bitmap,// nearest greater integer value to avoid holes + pri_mask,15 ); } } diff --git a/src/mame/video/gaelco.c b/src/mame/video/gaelco.c index 57c14e2b728..96857863cda 100644 --- a/src/mame/video/gaelco.c +++ b/src/mame/video/gaelco.c @@ -172,10 +172,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta ex = xflip ? (spr_size-1-x) : x; ey = yflip ? (spr_size-1-y) : y; - pdrawgfx(bitmap,gfx,number + x_offset[ex] + y_offset[ey], + pdrawgfx_transpen(bitmap,cliprect,gfx,number + x_offset[ex] + y_offset[ey], color,xflip,yflip, sx-0x0f+x*8,sy+y*8, - cliprect,TRANSPARENCY_PEN,0,pri_mask); + priority_bitmap,pri_mask,0); } } } diff --git a/src/mame/video/gaelco2.c b/src/mame/video/gaelco2.c index de87be42b3c..d2a8d115609 100644 --- a/src/mame/video/gaelco2.c +++ b/src/mame/video/gaelco2.c @@ -383,11 +383,10 @@ static void draw_sprites(const device_config *screen, bitmap_t *bitmap, const re /* normal sprite, pen 0 transparent */ if (color_effect == 0){ - drawgfx(bitmap, gfx, number, + drawgfx_transpen(bitmap, cliprect, gfx, number, color, xflip, yflip, ((sx + ex*16) & 0x3ff) + spr_x_adjust, - ((sy + ey*16) & 0x1ff), - cliprect, TRANSPARENCY_PEN, 0); + ((sy + ey*16) & 0x1ff), 0); } else { /* last palette entry is reserved for shadows and highlights */ diff --git a/src/mame/video/galaga.c b/src/mame/video/galaga.c index 49d9c134603..d47835132d8 100644 --- a/src/mame/video/galaga.c +++ b/src/mame/video/galaga.c @@ -530,12 +530,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { for (x = 0;x <= sizex;x++) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transmask(bitmap,cliprect,machine->gfx[1], sprite + gfx_offs[y ^ (sizey * flipy)][x ^ (sizex * flipx)], color, flipx,flipy, sx + 16*x, sy + 16*y, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0x0f)); } } diff --git a/src/mame/video/galastrm.c b/src/mame/video/galastrm.c index 0aabb868a7b..7743e5c6848 100644 --- a/src/mame/video/galastrm.c +++ b/src/mame/video/galastrm.c @@ -221,14 +221,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if ((priority != 0 && sprite_ptr->primask != 0) || (priority == 0 && sprite_ptr->primask == 0)) { - pdrawgfxzoom(bitmap,machine->gfx[sprite_ptr->gfx], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[sprite_ptr->gfx], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0, sprite_ptr->zoomx,sprite_ptr->zoomy, - primasks[sprite_ptr->primask]); + priority_bitmap,primasks[sprite_ptr->primask],0); } } } diff --git a/src/mame/video/galaxian.c b/src/mame/video/galaxian.c index a160221babf..413606065dd 100644 --- a/src/mame/video/galaxian.c +++ b/src/mame/video/galaxian.c @@ -640,12 +640,11 @@ static void sprites_draw(running_machine *machine, bitmap_t *bitmap, const recta } /* draw */ - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap, &clip, + machine->gfx[1], code, color, flipx, flipy, - GALAXIAN_H0START + GALAXIAN_XSCALE * sx, sy, - &clip, - TRANSPARENCY_PEN, 0); + GALAXIAN_H0START + GALAXIAN_XSCALE * sx, sy, 0); } } diff --git a/src/mame/video/galaxold.c b/src/mame/video/galaxold.c index 97c88f289a1..db3327e1266 100644 --- a/src/mame/video/galaxold.c +++ b/src/mame/video/galaxold.c @@ -1857,11 +1857,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, UINT8 *spri if (offs < 3*4) sy++; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,flipscreen_x ? spritevisibleareaflipx : spritevisiblearea,machine->gfx[1], code,color, flipx,flipy, - sx,sy, - flipscreen_x ? spritevisibleareaflipx : spritevisiblearea,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/galivan.c b/src/mame/video/galivan.c index f55a88087db..2637230316d 100644 --- a/src/mame/video/galivan.c +++ b/src/mame/video/galivan.c @@ -376,12 +376,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta // code = spriteram[offs+1] + ((attr & 0x02) << 7); code = spriteram[offs+1] + ((attr & 0x06) << 7); // for ninjemak, not sure ? - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code, color + 16 * (spritepalettebank[code >> 2] & 0x0f), flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); } } diff --git a/src/mame/video/galpanic.c b/src/mame/video/galpanic.c index 61d032870f4..fd06db0e45c 100644 --- a/src/mame/video/galpanic.c +++ b/src/mame/video/galpanic.c @@ -76,12 +76,11 @@ static void comad_draw_sprites(running_machine *machine, bitmap_t *bitmap, const sx = (sx&0x1ff) - (sx&0x200); sy = (sy&0x1ff) - (sy&0x200); - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/galspnbl.c b/src/mame/video/galspnbl.c index 5d7381b47d9..a99f2bb5bde 100644 --- a/src/mame/video/galspnbl.c +++ b/src/mame/video/galspnbl.c @@ -75,12 +75,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { int x = sx + 8*(flipx?(size-1-col):col); int y = sy + 8*(flipy?(size-1-row):row); - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code + layout[row][col], color, flipx,flipy, - x,y, - cliprect,TRANSPARENCY_PEN,0); + x,y,0); } } } @@ -125,13 +124,12 @@ VIDEO_UPDATE( galspnbl ) /* What is this? A priority/half transparency marker? */ if (!(attr & 0x0008)) { - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], code, color, 0,0, // 16*sx + screenscroll,8*sy, - 16*sx,8*sy, - cliprect,TRANSPARENCY_PEN,0); + 16*sx,8*sy,0); } } diff --git a/src/mame/video/gaplus.c b/src/mame/video/gaplus.c index e440ec0e1c0..92746e564d8 100644 --- a/src/mame/video/gaplus.c +++ b/src/mame/video/gaplus.c @@ -303,12 +303,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { for (x = 0;x <= sizex;x++) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transmask(bitmap,cliprect,machine->gfx[1], sprite + (duplicate ? 0 : (gfx_offs[y ^ (sizey * flipy)][x ^ (sizex * flipx)])), color, flipx,flipy, sx + 16*x,sy + 16*y, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0xff)); } } diff --git a/src/mame/video/gberet.c b/src/mame/video/gberet.c index 64777cf8a41..73c3c313653 100644 --- a/src/mame/video/gberet.c +++ b/src/mame/video/gberet.c @@ -161,8 +161,7 @@ static void gberet_draw_sprites(running_machine *machine, bitmap_t *bitmap, cons flipy = !flipy; } - drawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, sx, sy, - cliprect, TRANSPARENCY_PENS, + drawgfx_transmask(bitmap, cliprect, machine->gfx[1], code, color, flipx, flipy, sx, sy, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); } } @@ -213,8 +212,7 @@ static void gberetb_draw_sprites(running_machine *machine, bitmap_t *bitmap, con flipy = !flipy; } - drawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, sx, sy, - cliprect, TRANSPARENCY_PENS, + drawgfx_transmask(bitmap, cliprect, machine->gfx[1], code, color, flipx, flipy, sx, sy, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); } } diff --git a/src/mame/video/gcpinbal.c b/src/mame/video/gcpinbal.c index 5d581375283..ffb67f0274a 100644 --- a/src/mame/video/gcpinbal.c +++ b/src/mame/video/gcpinbal.c @@ -231,13 +231,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan for (chain_pos = chain;chain_pos >= 0;chain_pos--) { - pdrawgfx(bitmap, machine->gfx[0], + pdrawgfx_transpen(bitmap, cliprect,machine->gfx[0], code, col, flipx, flipy, curx,cury, - cliprect,TRANSPARENCY_PEN,0, - priority ? 0xfc : 0xf0); + priority_bitmap, + priority ? 0xfc : 0xf0,0); code++; diff --git a/src/mame/video/ginganin.c b/src/mame/video/ginganin.c index b06cb5c8e57..e0050ce81d0 100644 --- a/src/mame/video/ginganin.c +++ b/src/mame/video/ginganin.c @@ -233,12 +233,11 @@ int offs; flipx = !flipx; flipy = !flipy; } - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code & 0x3fff, attr >> 12, flipx, flipy, - x,y, - cliprect,TRANSPARENCY_PEN,15); + x,y,15); } } diff --git a/src/mame/video/gladiatr.c b/src/mame/video/gladiatr.c index cf9250446a5..8be8fac1ca2 100644 --- a/src/mame/video/gladiatr.c +++ b/src/mame/video/gladiatr.c @@ -236,12 +236,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int t = tile_offset[ey][ex] + tile_number; - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], t, color, xflip, yflip, - sx+x*16, sy+y*16, - cliprect,TRANSPARENCY_PEN,0); + sx+x*16, sy+y*16,0); } } } diff --git a/src/mame/video/glass.c b/src/mame/video/glass.c index 8212daf1272..15c03024e2c 100644 --- a/src/mame/video/glass.c +++ b/src/mame/video/glass.c @@ -180,10 +180,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta number = ((number & 0x03) << 14) | ((number & 0x0fffc) >> 2); - drawgfx(bitmap,gfx,number, + drawgfx_transpen(bitmap,cliprect,gfx,number, 0x10 + (color & 0x0f),xflip,yflip, - sx-0x0f,sy, - cliprect,TRANSPARENCY_PEN,0); + sx-0x0f,sy,0); } } diff --git a/src/mame/video/gng.c b/src/mame/video/gng.c index 65cae79c891..c0a94f78cce 100644 --- a/src/mame/video/gng.c +++ b/src/mame/video/gng.c @@ -136,12 +136,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,cliprect,gfx, buffered_spriteram[offs] + ((attributes<<2) & 0x300), (attributes >> 4) & 3, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); } } diff --git a/src/mame/video/goal92.c b/src/mame/video/goal92.c index d4e78e9c04d..b2591d4caa6 100644 --- a/src/mame/video/goal92.c +++ b/src/mame/video/goal92.c @@ -125,10 +125,9 @@ static void draw_sprites(running_machine *machine,bitmap_t *bitmap,const rectang y = 256-(y+7); - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], sprite, - color,fx,fy,x,y, - cliprect,TRANSPARENCY_PEN,15); + color,fx,fy,x,y,15); } } diff --git a/src/mame/video/goindol.c b/src/mame/video/goindol.c index 7062f9c0ede..c27559ad832 100644 --- a/src/mame/video/goindol.c +++ b/src/mame/video/goindol.c @@ -112,20 +112,18 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta tile += tile; palette = sprite_ram[offs+2] >> 3; - drawgfx(bitmap,machine->gfx[gfxbank], + drawgfx_transpen(bitmap,cliprect, + machine->gfx[gfxbank], tile, palette, flip_screen_get(machine),flip_screen_get(machine), - sx,sy, - cliprect, - TRANSPARENCY_PEN, 0); - drawgfx(bitmap,machine->gfx[gfxbank], + sx,sy, 0); + drawgfx_transpen(bitmap,cliprect, + machine->gfx[gfxbank], tile+1, palette, flip_screen_get(machine),flip_screen_get(machine), - sx,sy + (flip_screen_get(machine) ? -8 : 8), - cliprect, - TRANSPARENCY_PEN, 0); + sx,sy + (flip_screen_get(machine) ? -8 : 8), 0); } } } diff --git a/src/mame/video/goldstar.c b/src/mame/video/goldstar.c index 0a8c02f9a9f..2487ec41470 100644 --- a/src/mame/video/goldstar.c +++ b/src/mame/video/goldstar.c @@ -289,7 +289,7 @@ VIDEO_UPDATE( goldstar ) int girlyscroll = (INT8)((cm_girl_scroll & 0xf0)); int girlxscroll = (INT8)((cm_girl_scroll & 0x0f)<<4); - drawgfxzoom(bitmap,gfx,cmaster_girl_num,cmaster_girl_pal,0,0,-(girlxscroll*2),-(girlyscroll),cliprect,TRANSPARENCY_PEN,0, 0x20000, 0x10000); + drawgfxzoom_transpen(bitmap,cliprect,gfx,cmaster_girl_num,cmaster_girl_pal,0,0,-(girlxscroll*2),-(girlyscroll), 0x20000, 0x10000,0); } } diff --git a/src/mame/video/gotcha.c b/src/mame/video/gotcha.c index f7b3b7403ae..c98028a2f59 100644 --- a/src/mame/video/gotcha.c +++ b/src/mame/video/gotcha.c @@ -114,12 +114,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan for (y = 0;y < height;y++) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code + (flipy ? height-1 - y : y), color, flipx,flipy, - 0x140-5 - ((sx + 0x10) & 0x1ff),0x100+1 - ((sy + 0x10 * (height - y)) & 0x1ff), - cliprect,TRANSPARENCY_PEN,0); + 0x140-5 - ((sx + 0x10) & 0x1ff),0x100+1 - ((sy + 0x10 * (height - y)) & 0x1ff),0); } } } diff --git a/src/mame/video/gottlieb.c b/src/mame/video/gottlieb.c index f4ca9c37b91..1116ae51cd2 100644 --- a/src/mame/video/gottlieb.c +++ b/src/mame/video/gottlieb.c @@ -233,12 +233,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (flip_screen_x_get(machine)) sx = 233 - sx; if (flip_screen_y_get(machine)) sy = 244 - sy; - drawgfx(bitmap, machine->gfx[2], + drawgfx_transpen(bitmap, &clip, + machine->gfx[2], code, 0, flip_screen_x_get(machine), flip_screen_y_get(machine), - sx,sy, - &clip, - TRANSPARENCY_PEN, 0); + sx,sy, 0); } } diff --git a/src/mame/video/gotya.c b/src/mame/video/gotya.c index 523a67db533..de5a43ede29 100644 --- a/src/mame/video/gotya.c +++ b/src/mame/video/gotya.c @@ -138,13 +138,12 @@ static void draw_status_row(running_machine *machine, bitmap_t *bitmap, const re sy = 31 - row; } - drawgfx(bitmap,machine->gfx[0], + drawgfx_opaque(bitmap,cliprect, + machine->gfx[0], gotya_videoram2[row * 32 + col], gotya_videoram2[row * 32 + col + 0x10] & 0x0f, flip_screen_x_get(machine), flip_screen_y_get(machine), - 8 * sx, 8 * sy, - cliprect, - TRANSPARENCY_NONE, 0); + 8 * sx, 8 * sy); } } @@ -164,12 +163,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta sy = 240 - sy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect, + machine->gfx[1], code, color, flip_screen_x_get(machine), flip_screen_y_get(machine), - sx, sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx, sy, 0); } } diff --git a/src/mame/video/grchamp.c b/src/mame/video/grchamp.c index f803e5a4c6f..01b549a38fe 100644 --- a/src/mame/video/grchamp.c +++ b/src/mame/video/grchamp.c @@ -131,14 +131,13 @@ static int collision_check(running_machine *machine, grchamp_state *state, bitma if( which==0 ) { /* draw the current player sprite into a work bitmap */ - drawgfx( state->work_bitmap, + drawgfx_opaque( state->work_bitmap, + 0, machine->gfx[4], state->cpu0_out[4]&0xf, 1, /* color */ 0,0, - 0,0, - 0, - TRANSPARENCY_NONE, 0 ); + 0,0 ); } for( y = 0; y <32; y++ ) @@ -199,14 +198,13 @@ static void draw_sprites(running_machine *machine, grchamp_state *state, bitmap_ int sy = 240-source[0]; int color = source[2]; int code = source[1]; - drawgfx(bitmap, gfx, + drawgfx_transpen(bitmap, cliprect, + gfx, bank + (code & 0x3f), color, code & 0x40, code & 0x80, - sx,sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx,sy, 0); source += 4; } } diff --git a/src/mame/video/groundfx.c b/src/mame/video/groundfx.c index 0b1373a8e8c..3c696ebaced 100644 --- a/src/mame/video/groundfx.c +++ b/src/mame/video/groundfx.c @@ -203,14 +203,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan else clipper=cliprect; - pdrawgfxzoom(bitmap,machine->gfx[sprite_ptr->gfx], + pdrawgfxzoom_transpen(bitmap,clipper,machine->gfx[sprite_ptr->gfx], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - clipper,TRANSPARENCY_PEN,0, sprite_ptr->zoomx,sprite_ptr->zoomy, - primasks[sprite_ptr->pri]); + priority_bitmap,primasks[sprite_ptr->pri],0); } } diff --git a/src/mame/video/gstriker.c b/src/mame/video/gstriker.c index 1052dc73077..f3e9ea52c59 100644 --- a/src/mame/video/gstriker.c +++ b/src/mame/video/gstriker.c @@ -449,8 +449,8 @@ static void CG10103_draw_sprite(running_machine *machine, bitmap_t* screen, cons for (x=0;x<xnum;x++) { // Hack to handle horizontal wrapping - drawgfxzoom(screen, machine->gfx[CG10103_cur_chip->gfx_region], tile, color+CG10103_cur_chip->pal_base, flipx, flipy, xp>>16, ypos>>16, cliprect, TRANSPARENCY_PEN, CG10103_cur_chip->transpen, xfact, yfact); - drawgfxzoom(screen, machine->gfx[CG10103_cur_chip->gfx_region], tile, color+CG10103_cur_chip->pal_base, flipx, flipy, (xp>>16) - 0x200, ypos>>16, cliprect, TRANSPARENCY_PEN, CG10103_cur_chip->transpen, xfact, yfact); + drawgfxzoom_transpen(screen, cliprect, machine->gfx[CG10103_cur_chip->gfx_region], tile, color+CG10103_cur_chip->pal_base, flipx, flipy, xp>>16, ypos>>16, xfact, yfact, CG10103_cur_chip->transpen); + drawgfxzoom_transpen(screen, cliprect, machine->gfx[CG10103_cur_chip->gfx_region], tile, color+CG10103_cur_chip->pal_base, flipx, flipy, (xp>>16) - 0x200, ypos>>16, xfact, yfact, CG10103_cur_chip->transpen); xp += xstep; tile++; } diff --git a/src/mame/video/gsword.c b/src/mame/video/gsword.c index b9a613f2656..bd1d260f50a 100644 --- a/src/mame/video/gsword.c +++ b/src/mame/video/gsword.c @@ -196,12 +196,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipx = !flipx; flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1+spritebank], + drawgfx_transmask(bitmap,cliprect,machine->gfx[1+spritebank], tile, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1+spritebank], color, 0x8f)); } } diff --git a/src/mame/video/gunbustr.c b/src/mame/video/gunbustr.c index 1e7b48d794c..78cb81a723d 100644 --- a/src/mame/video/gunbustr.c +++ b/src/mame/video/gunbustr.c @@ -178,13 +178,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan } else { - drawgfxzoom(bitmap,machine->gfx[sprite_ptr->gfx], + drawgfxzoom_transpen(bitmap,cliprect,machine->gfx[sprite_ptr->gfx], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0, - sprite_ptr->zoomx,sprite_ptr->zoomy); + sprite_ptr->zoomx,sprite_ptr->zoomy,0); } } } @@ -198,14 +197,13 @@ logerror("Sprite number %04x had %02x invalid chunks\n",tilenum,bad_chunks); { sprite_ptr--; - pdrawgfxzoom(bitmap,machine->gfx[sprite_ptr->gfx], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[sprite_ptr->gfx], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0, sprite_ptr->zoomx,sprite_ptr->zoomy, - sprite_ptr->primask); + priority_bitmap,sprite_ptr->primask,0); } } diff --git a/src/mame/video/gunsmoke.c b/src/mame/video/gunsmoke.c index 82d4095d6a5..b83b2d81920 100644 --- a/src/mame/video/gunsmoke.c +++ b/src/mame/video/gunsmoke.c @@ -175,8 +175,8 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[2], code, color, flipx, flipy, - sx, sy, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[2], code, color, flipx, flipy, + sx, sy, 0); } } diff --git a/src/mame/video/gyruss.c b/src/mame/video/gyruss.c index eb165c40d00..667881d3a20 100644 --- a/src/mame/video/gyruss.c +++ b/src/mame/video/gyruss.c @@ -134,7 +134,7 @@ READ8_HANDLER( gyruss_scanline_r ) } -static void draw_sprites(gfx_element **gfx, bitmap_t *bitmap, const rectangle *cliprect) +static void draw_sprites(bitmap_t *bitmap, const rectangle *cliprect, gfx_element **gfx) { int offs; @@ -149,7 +149,7 @@ static void draw_sprites(gfx_element **gfx, bitmap_t *bitmap, const rectangle *c int flip_x = ~gyruss_spriteram[offs + 2] & 0x40; int flip_y = gyruss_spriteram[offs + 2] & 0x80; - drawgfx(bitmap, gfx[gfx_bank], code, color, flip_x, flip_y, x, y, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, gfx[gfx_bank], code, color, flip_x, flip_y, x, y, 0); } } @@ -163,7 +163,7 @@ VIDEO_UPDATE( gyruss ) } tilemap_draw(bitmap, cliprect, gyruss_tilemap, TILEMAP_DRAW_OPAQUE, 0); - draw_sprites(screen->machine->gfx, bitmap, cliprect); + draw_sprites(bitmap, cliprect, screen->machine->gfx); tilemap_draw(bitmap, cliprect, gyruss_tilemap, 0, 0); return 0; diff --git a/src/mame/video/hcastle.c b/src/mame/video/hcastle.c index 5e1dd228e6f..a2f680c1052 100644 --- a/src/mame/video/hcastle.c +++ b/src/mame/video/hcastle.c @@ -201,7 +201,7 @@ WRITE8_HANDLER( hcastle_pf2_control_w ) static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *sbank, int bank ) { int bank_base = (bank == 0) ? 0x4000 * (gfx_bank & 1) : 0; - K007121_sprites_draw(bank,bitmap,machine->gfx,machine->colortable,cliprect,sbank,(K007121_ctrlram[bank][6]&0x30)*2,0,bank_base,-1); + K007121_sprites_draw(bank,bitmap,cliprect,machine->gfx,machine->colortable,sbank,(K007121_ctrlram[bank][6]&0x30)*2,0,bank_base,-1); } /*****************************************************************************/ diff --git a/src/mame/video/higemaru.c b/src/mame/video/higemaru.c index f301c16a56d..c76b79479a1 100644 --- a/src/mame/video/higemaru.c +++ b/src/mame/video/higemaru.c @@ -122,20 +122,18 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, col, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); /* draw again with wraparound */ - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, col, flipx,flipy, - sx - 256,sy, - cliprect,TRANSPARENCY_PEN,15); + sx - 256,sy,15); } } diff --git a/src/mame/video/himesiki.c b/src/mame/video/himesiki.c index 4d90ce9433e..e94dc0b28c4 100644 --- a/src/mame/video/himesiki.c +++ b/src/mame/video/himesiki.c @@ -85,7 +85,7 @@ static void himesiki_draw_sprites(running_machine *machine, bitmap_t *bitmap, co y -= 0x100; } - drawgfx(bitmap,machine->gfx[1],code,col,fx,fy,x,y,cliprect,TRANSPARENCY_PEN,15); + drawgfx_transpen(bitmap,cliprect,machine->gfx[1],code,col,fx,fy,x,y,15); } for (offs = 0; offs<0x100; offs+=4) @@ -114,7 +114,7 @@ static void himesiki_draw_sprites(running_machine *machine, bitmap_t *bitmap, co if (y > 0xf0) y -= 0x100; - drawgfx(bitmap,machine->gfx[2],code,col,f,f,x,y,cliprect,TRANSPARENCY_PEN,15); + drawgfx_transpen(bitmap,cliprect,machine->gfx[2],code,col,f,f,x,y,15); } } diff --git a/src/mame/video/hng64.c b/src/mame/video/hng64.c index a8d281fb409..3299d0b3a45 100644 --- a/src/mame/video/hng64.c +++ b/src/mame/video/hng64.c @@ -199,7 +199,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { for(xdrw=0;xdrw<=chainx;xdrw++) { - drawgfxzoom(bitmap,gfx,tileno,pal,xflip,yflip,xpos+(xinc*xdrw),ypos+(yinc*ydrw),cliprect,TRANSPARENCY_PEN,0,zoomx,zoomy/*0x10000*/); + drawgfxzoom_transpen(bitmap,cliprect,gfx,tileno,pal,xflip,yflip,xpos+(xinc*xdrw),ypos+(yinc*ydrw),zoomx,zoomy/*0x10000*/,0); tileno++; } } diff --git a/src/mame/video/holeland.c b/src/mame/video/holeland.c index c89aa31dd27..5a07b353398 100644 --- a/src/mame/video/holeland.c +++ b/src/mame/video/holeland.c @@ -132,12 +132,11 @@ static void holeland_draw_sprites(running_machine *machine, bitmap_t *bitmap,con sy = 240 - sy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, - 2*sx,2*sy, - cliprect,TRANSPARENCY_PEN,0); + 2*sx,2*sy,0); } } @@ -170,12 +169,11 @@ static void crzrally_draw_sprites(running_machine *machine, bitmap_t *bitmap,con sy = 240 - sy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/homerun.c b/src/mame/video/homerun.c index ce91b0cc70d..e5bdb6d6241 100644 --- a/src/mame/video/homerun.c +++ b/src/mame/video/homerun.c @@ -77,12 +77,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta color = (spriteram[offs+2] & 0x7)+8 ; flipx=(spriteram[offs+2] & 0x40) ; flipy=(spriteram[offs+2] & 0x80) ; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/hyperspt.c b/src/mame/video/hyperspt.c index 31944fd1dcd..56952078665 100644 --- a/src/mame/video/hyperspt.c +++ b/src/mame/video/hyperspt.c @@ -152,22 +152,20 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta sy += 1; - drawgfx(bitmap,machine->gfx[0], + drawgfx_transmask(bitmap,cliprect, + machine->gfx[0], code, color, flipx, flipy, sx, sy, - cliprect, - TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[0], color, 0)); /* redraw with wraparound */ - drawgfx(bitmap,machine->gfx[0], + drawgfx_transmask(bitmap,cliprect, + machine->gfx[0], code, color, flipx, flipy, sx - 256, sy, - cliprect, - TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[0], color, 0)); } } diff --git a/src/mame/video/hyprduel.c b/src/mame/video/hyprduel.c index 105d696258e..909042ccc22 100644 --- a/src/mame/video/hyprduel.c +++ b/src/mame/video/hyprduel.c @@ -530,14 +530,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta gfx_element_build_temporary(&gfx, machine, gfxdata, width, height, width, 0, 256, 0); - pdrawgfxzoom( bitmap,&gfx, + pdrawgfxzoom_transpen( bitmap,cliprect, &gfx, 0, color_start >> 4, flipx, flipy, x, y, - cliprect, TRANSPARENCY_PEN, 255, zoom, zoom, - primask[pri]); + priority_bitmap,primask[pri], 255); } else { @@ -547,14 +546,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta gfx_element_build_temporary(&gfx, machine, gfxdata, width, height, width/2, 0, 16, GFX_ELEMENT_PACKED); - pdrawgfxzoom( bitmap,&gfx, + pdrawgfxzoom_transpen( bitmap,cliprect, &gfx, 0, color + color_start, flipx, flipy, x, y, - cliprect, TRANSPARENCY_PEN, 15, zoom, zoom, - primask[pri]); + priority_bitmap,primask[pri], 15); } #if 0 { /* Display priority + zoom on each sprite */ diff --git a/src/mame/video/ikki.c b/src/mame/video/ikki.c index 97f1a94483f..fb88ee525af 100644 --- a/src/mame/video/ikki.c +++ b/src/mame/video/ikki.c @@ -94,11 +94,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (y > 240) y = y - 256; - drawgfx(sprite_bitmap,machine->gfx[1], + drawgfx_transmask(sprite_bitmap,cliprect, machine->gfx[1], code, color, ikki_flipscreen,ikki_flipscreen, x,y, - cliprect, TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); } @@ -177,12 +176,11 @@ VIDEO_UPDATE( ikki ) bank = (color & 0xe0) << 3; color = ((color & 0x1f)<<0) | ((color & 0x80) >> 2); - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0], videoram[offs*2+1] + bank, color, ikki_flipscreen,ikki_flipscreen, - x,y, - cliprect,TRANSPARENCY_NONE,0); + x,y); } draw_sprites(screen->machine, bitmap, cliprect); @@ -213,12 +211,11 @@ VIDEO_UPDATE( ikki ) bank = (color & 0xe0) << 3; color = ((color & 0x1f)<<0) | ((color & 0x80) >> 2); - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0], videoram[offs*2+1] + bank, color, ikki_flipscreen,ikki_flipscreen, - x,y, - cliprect,TRANSPARENCY_NONE,0); + x,y); } } diff --git a/src/mame/video/inufuku.c b/src/mame/video/inufuku.c index 93c826a960c..417952aebb7 100644 --- a/src/mame/video/inufuku.c +++ b/src/mame/video/inufuku.c @@ -143,14 +143,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta code = ((inufuku_spriteram2[map_start] & 0x0007) << 16) + inufuku_spriteram2[map_start + 1]; - pdrawgfxzoom(bitmap, machine->gfx[2], + pdrawgfxzoom_transpen(bitmap, cliprect, machine->gfx[2], code, color, flipx, flipy, sx - 16, sy - 16, - cliprect, TRANSPARENCY_PEN, 15, zoomx << 11, zoomy << 11, - priority_mask); + priority_bitmap,priority_mask, 15); map_start += 2; } diff --git a/src/mame/video/irobot.c b/src/mame/video/irobot.c index a611178196a..142164431b3 100644 --- a/src/mame/video/irobot.c +++ b/src/mame/video/irobot.c @@ -362,11 +362,10 @@ VIDEO_UPDATE( irobot ) int code = videoram[offs] & 0x3f; int color = ((videoram[offs] & 0xc0) >> 6) | (irobot_alphamap >> 3); - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], code, color, 0,0, - 8*x,8*y, - cliprect,TRANSPARENCY_PEN,0); + 8*x,8*y,0); } return 0; } diff --git a/src/mame/video/ironhors.c b/src/mame/video/ironhors.c index 38be3a74e2d..2c9f80d5373 100644 --- a/src/mame/video/ironhors.c +++ b/src/mame/video/ironhors.c @@ -183,58 +183,52 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta switch (sr[offs+4] & 0x0c) { case 0x00: /* 16x16 */ - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code/4, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); break; case 0x04: /* 16x8 */ { if (flip_screen_get(machine)) sy += 8; // this fixes the train wheels' position - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code & ~1, color, flipx,flipy, - flipx?sx+8:sx,sy, - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[2], + flipx?sx+8:sx,sy,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code | 1, color, flipx,flipy, - flipx?sx:sx+8,sy, - cliprect,TRANSPARENCY_PEN,0); + flipx?sx:sx+8,sy,0); } break; case 0x08: /* 8x16 */ { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code & ~2, color, flipx,flipy, - sx,flipy?sy+8:sy, - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[2], + sx,flipy?sy+8:sy,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code | 2, color, flipx,flipy, - sx,flipy?sy:sy+8, - cliprect,TRANSPARENCY_PEN,0); + sx,flipy?sy:sy+8,0); } break; case 0x0c: /* 8x8 */ { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } break; } @@ -306,58 +300,52 @@ static void farwest_draw_sprites(running_machine *machine, bitmap_t *bitmap, con switch (sr[offs+3] & 0x0c) { case 0x00: /* 16x16 */ - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code/4, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); break; case 0x04: /* 16x8 */ { if (flip_screen_get(machine)) sy += 8; // this fixes the train wheels' position - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code & ~1, color, flipx,flipy, - flipx?sx+8:sx,sy, - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[2], + flipx?sx+8:sx,sy,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code | 1, color, flipx,flipy, - flipx?sx:sx+8,sy, - cliprect,TRANSPARENCY_PEN,0); + flipx?sx:sx+8,sy,0); } break; case 0x08: /* 8x16 */ { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code & ~2, color, flipx,flipy, - sx,flipy?sy+8:sy, - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[2], + sx,flipy?sy+8:sy,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code | 2, color, flipx,flipy, - sx,flipy?sy:sy+8, - cliprect,TRANSPARENCY_PEN,0); + sx,flipy?sy:sy+8,0); } break; case 0x0c: /* 8x8 */ { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } break; } diff --git a/src/mame/video/jack.c b/src/mame/video/jack.c index 696e0b1e8f1..8b1e70cf848 100644 --- a/src/mame/video/jack.c +++ b/src/mame/video/jack.c @@ -83,12 +83,11 @@ static void jack_draw_sprites(running_machine *machine, bitmap_t *bitmap, const flipy = !flipy; } - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], num, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } @@ -164,12 +163,11 @@ static void joinem_draw_sprites(running_machine *machine, bitmap_t *bitmap, cons flipy = !flipy; } - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], num, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/jackal.c b/src/mame/video/jackal.c index bb94c6043e1..3cc3f931c0e 100644 --- a/src/mame/video/jackal.c +++ b/src/mame/video/jackal.c @@ -118,7 +118,7 @@ static void draw_background( running_machine *machine, bitmap_t *bitmap, const r tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); } -#define DRAW_SPRITE(bank, code, sx, sy) drawgfx(bitmap, machine->gfx[bank], code, color, flipx, flipy, sx, sy, cliprect, TRANSPARENCY_PEN, 0); +#define DRAW_SPRITE(bank, code, sx, sy) drawgfx_transpen(bitmap, cliprect, machine->gfx[bank], code, color, flipx, flipy, sx, sy, 0); static void draw_sprites_region(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, const UINT8 *sram, int length, int bank ) { diff --git a/src/mame/video/jailbrek.c b/src/mame/video/jailbrek.c index 80d7cbd731c..25678454568 100644 --- a/src/mame/video/jailbrek.c +++ b/src/mame/video/jailbrek.c @@ -88,8 +88,8 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, - sx, sy, cliprect, TRANSPARENCY_PENS, + drawgfx_transmask(bitmap, cliprect, machine->gfx[1], code, color, flipx, flipy, + sx, sy, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); } } diff --git a/src/mame/video/jalblend.c b/src/mame/video/jalblend.c index 309b8caa28f..3d1faf505e4 100644 --- a/src/mame/video/jalblend.c +++ b/src/mame/video/jalblend.c @@ -60,9 +60,9 @@ rgb_t jal_blend_func(rgb_t dest, rgb_t addMe, UINT8 alpha) return MAKE_RGB(r,g,b); } -void jal_blend_drawgfx(running_machine *machine,bitmap_t *dest_bmp,const gfx_element *gfx, +void jal_blend_drawgfx(bitmap_t *dest_bmp,const rectangle *clip,const gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,int offsx,int offsy, - const rectangle *clip,int transparency,int transparent_color) + int transparency,int transparent_color) { if (jal_blend_table == NULL) { @@ -73,7 +73,7 @@ void jal_blend_drawgfx(running_machine *machine,bitmap_t *dest_bmp,const gfx_ele /* Start drawing */ if (gfx) { - const pen_t *pal = &machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; + const pen_t *pal = &gfx->machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; const UINT8 *alpha = &jal_blend_table[gfx->color_granularity * (color % gfx->total_colors)]; const UINT8 *source_base = gfx_element_get_data(gfx, code % gfx->total_elements); int x_index_base, y_index, sx, sy, ex, ey; diff --git a/src/mame/video/jalblend.h b/src/mame/video/jalblend.h index 8f0b03e4b30..9d57e7b742f 100644 --- a/src/mame/video/jalblend.h +++ b/src/mame/video/jalblend.h @@ -1,5 +1,5 @@ extern UINT8 *jal_blend_table; rgb_t jal_blend_func(rgb_t dest, rgb_t addMe, UINT8 alpha); -void jal_blend_drawgfx(running_machine *machine,bitmap_t *dest_bmp,const gfx_element *gfx, +void jal_blend_drawgfx(bitmap_t *dest_bmp,const rectangle *clip,const gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,int offsx,int offsy, - const rectangle *clip,int transparency,int transparent_color); + int transparency,int transparent_color); diff --git a/src/mame/video/kan_panb.c b/src/mame/video/kan_panb.c index 5a19e78a1ed..3434328ddb7 100644 --- a/src/mame/video/kan_panb.c +++ b/src/mame/video/kan_panb.c @@ -43,12 +43,11 @@ VIDEO_UPDATE( honeydol ) sy = y; } - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], tile, tilecolour, flipx, flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); /* second list interleaved with first (4bpp) ??? */ dx = spriteram16[offs+4] & 0xff; @@ -78,12 +77,11 @@ VIDEO_UPDATE( honeydol ) tilecolour = (tilecolour&0x03f0) >> 4; tilecolour ^=0x3f; // unusual, but correct.. - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], tile, tilecolour, flipx, flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } return 0; } @@ -133,12 +131,11 @@ VIDEO_UPDATE( twinadv ) tilecolour = (tilecolour&0x00f0) >> 4; tilecolour ^=0xf; // unusual, but correct.. - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], tile, tilecolour, flipx, flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } return 0; } @@ -175,12 +172,11 @@ VIDEO_UPDATE( wintbob ) if ((xpos > -16) && (ypos > 0) && (xpos < 256) && (ypos < 240) && (disbl !=2)) { - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], tilen, colr, flipx, flipy, - xpos,ypos, - cliprect,TRANSPARENCY_PEN,0); + xpos,ypos,0); } } return 0; @@ -264,12 +260,11 @@ VIDEO_UPDATE( snowbro3 ) tilecolour = 0x10; } - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,cliprect,gfx, tile, (tilecolour & 0xf0) >> 4, flipx, flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } return 0; } diff --git a/src/mame/video/kan_pand.c b/src/mame/video/kan_pand.c index 13f1bb76ed0..ec12393b087 100644 --- a/src/mame/video/kan_pand.c +++ b/src/mame/video/kan_pand.c @@ -142,12 +142,11 @@ static void pandora_draw(running_machine *machine, bitmap_t *bitmap, const recta if (sx&0x100) sx-=0x200; if (sy&0x100) sy-=0x200; - drawgfx(bitmap,machine->gfx[pandora_region], + drawgfx_transpen(bitmap,cliprect,machine->gfx[pandora_region], tile, (tilecolour & 0xf0) >> 4, flipx, flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/kaneko16.c b/src/mame/video/kaneko16.c index 26e2a9c4204..b90508232dc 100644 --- a/src/mame/video/kaneko16.c +++ b/src/mame/video/kaneko16.c @@ -432,9 +432,9 @@ else } // custom function to draw a single sprite. needed to keep correct sprites - sprites and sprites - tilemaps priorities -static void kaneko16_draw_sprites_custom(running_machine *machine, bitmap_t *dest_bmp,const gfx_element *gfx, +static void kaneko16_draw_sprites_custom(bitmap_t *dest_bmp,const rectangle *clip,const gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, - const rectangle *clip,int priority) + int priority) { pen_t pen_base = gfx->color_base + gfx->color_granularity * (color % gfx->total_colors); const UINT8 *source_base = gfx_element_get_data(gfx, code % gfx->total_elements); @@ -635,13 +635,12 @@ void kaneko16_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rec UINT32 primask = kaneko16_priority.sprite[curr_pri]; - kaneko16_draw_sprites_custom( machine, - bitmap,machine->gfx[0], + kaneko16_draw_sprites_custom( + bitmap,cliprect,machine->gfx[0], s->code, s->color, s->flipx, s->flipy, s->x, s->y, - cliprect, primask ); } } diff --git a/src/mame/video/karnov.c b/src/mame/video/karnov.c index db34a21e1ac..747ce94068a 100644 --- a/src/mame/video/karnov.c +++ b/src/mame/video/karnov.c @@ -90,13 +90,11 @@ static void draw_background(running_machine *machine, bitmap_t *bitmap, const re color = tile >> 12; tile = tile&0x7ff; if (flipscreen) - drawgfx(bitmap_f,machine->gfx[1],tile, - color, fx, fy, 496-16*mx,496-16*my, - 0,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap_f,0,machine->gfx[1],tile, + color, fx, fy, 496-16*mx,496-16*my); else - drawgfx(bitmap_f,machine->gfx[1],tile, - color, fx, fy, 16*mx,16*my, - 0,TRANSPARENCY_NONE,0); + drawgfx_opaque(bitmap_f,0,machine->gfx[1],tile, + color, fx, fy, 16*mx,16*my); } if (!flipscreen) { @@ -152,17 +150,15 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan } else sprite2=sprite+1; - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], sprite, - colour,fx,fy,x,y, - cliprect,TRANSPARENCY_PEN,0); + colour,fx,fy,x,y,0); /* 1 more sprite drawn underneath */ if (extra) - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], sprite2, - colour,fx,fy,x,y+16, - cliprect,TRANSPARENCY_PEN,0); + colour,fx,fy,x,y+16,0); } } diff --git a/src/mame/video/kchamp.c b/src/mame/video/kchamp.c index ef9c0a2c221..95ce96c85ae 100644 --- a/src/mame/video/kchamp.c +++ b/src/mame/video/kchamp.c @@ -88,8 +88,7 @@ static void kchamp_draw_sprites(running_machine *machine, bitmap_t *bitmap, cons flipy = !flipy; } - drawgfx(bitmap, machine->gfx[bank], code, color, flipx, flipy, sx, sy, - cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[bank], code, color, flipx, flipy, sx, sy, 0); } } @@ -116,8 +115,7 @@ static void kchampvs_draw_sprites(running_machine *machine, bitmap_t *bitmap, co flipy = !flipy; } - drawgfx(bitmap, machine->gfx[bank], code, color, flipx, flipy, sx, sy, - cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[bank], code, color, flipx, flipy, sx, sy, 0); } } diff --git a/src/mame/video/kickgoal.c b/src/mame/video/kickgoal.c index 4b2c0d7be64..b2e69a17d2f 100644 --- a/src/mame/video/kickgoal.c +++ b/src/mame/video/kickgoal.c @@ -103,12 +103,11 @@ static void kickgoal_draw_sprites(running_machine *machine, bitmap_t *bitmap,con ypos = 0x200-ypos; - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,cliprect,gfx, tileno, 0x30 + color, flipx,0, - xpos-16+4,ypos-32, - cliprect,TRANSPARENCY_PEN,15); + xpos-16+4,ypos-32,15); } } @@ -226,12 +225,11 @@ static void actionhw_draw_sprites(running_machine *machine, bitmap_t *bitmap,con ypos = 0x110-ypos; - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,cliprect,gfx, tileno+0x4000, 0x30 + color, flipx,0, - xpos-16+4,ypos-32, - cliprect,TRANSPARENCY_PEN,15); + xpos-16+4,ypos-32,15); } } diff --git a/src/mame/video/kingobox.c b/src/mame/video/kingobox.c index db0d35011a8..f15f8621317 100644 --- a/src/mame/video/kingobox.c +++ b/src/mame/video/kingobox.c @@ -237,11 +237,10 @@ static void kingofb_draw_sprites(running_machine *machine, bitmap_t *bitmap, con flipy = !flipy; } - drawgfx(bitmap, machine->gfx[2 + bank], + drawgfx_transpen(bitmap, cliprect, machine->gfx[2 + bank], code, color, flipx, flipy, - sx, sy, - cliprect, TRANSPARENCY_PEN, 0); + sx, sy, 0); } } @@ -297,11 +296,10 @@ static void ringking_draw_sprites(running_machine *machine, bitmap_t *bitmap, co flipy = !flipy; } - drawgfx(bitmap, machine->gfx[2 + bank], + drawgfx_transpen(bitmap, cliprect, machine->gfx[2 + bank], code, color, flipx, flipy, - sx, sy, - cliprect, TRANSPARENCY_PEN, 0); + sx, sy, 0); } } diff --git a/src/mame/video/kncljoe.c b/src/mame/video/kncljoe.c index 05dcf1ba1d6..78402069a05 100644 --- a/src/mame/video/kncljoe.c +++ b/src/mame/video/kncljoe.c @@ -226,12 +226,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (sx >= 256-8) sx -= 256; - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,&clip,gfx, code, color, flipx,flipy, - sx,sy, - &clip,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/konamiic.c b/src/mame/video/konamiic.c index b8c928d7740..32dc0cf5f06 100644 --- a/src/mame/video/konamiic.c +++ b/src/mame/video/konamiic.c @@ -1292,8 +1292,8 @@ WRITE8_HANDLER( K007121_ctrl_1_w ) * */ -void K007121_sprites_draw(int chip,bitmap_t *bitmap,gfx_element **gfxs, colortable_t *ctable, - const rectangle *cliprect, const UINT8 *source,int base_color, +void K007121_sprites_draw(int chip,bitmap_t *bitmap,const rectangle *cliprect, gfx_element **gfxs, colortable_t *ctable, + const UINT8 *source,int base_color, int global_x_offset,int bank_base, UINT32 pri_mask) { const gfx_element *gfx = gfxs[chip]; @@ -1804,20 +1804,18 @@ void K007420_sprites_draw(bitmap_t *bitmap,const rectangle *cliprect) if (c & bankmask) continue; else c += bank; - drawgfx(bitmap,K007420_gfx, + drawgfx_transpen(bitmap,cliprect,K007420_gfx, c, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); if (K007342_regs[2] & 0x80) - drawgfx(bitmap,K007420_gfx, + drawgfx_transpen(bitmap,cliprect,K007420_gfx, c, color, flipx,flipy, - sx,sy-256, - cliprect,TRANSPARENCY_PEN,0); + sx,sy-256,0); } } } @@ -1842,22 +1840,20 @@ void K007420_sprites_draw(bitmap_t *bitmap,const rectangle *cliprect) if (c & bankmask) continue; else c += bank; - drawgfxzoom(bitmap,K007420_gfx, + drawgfxzoom_transpen(bitmap,cliprect,K007420_gfx, c, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PEN,0, - (zw << 16) / 8,(zh << 16) / 8); + (zw << 16) / 8,(zh << 16) / 8,0); if (K007342_regs[2] & 0x80) - drawgfxzoom(bitmap,K007420_gfx, + drawgfxzoom_transpen(bitmap,cliprect,K007420_gfx, c, color, flipx,flipy, sx,sy-256, - cliprect,TRANSPARENCY_PEN,0, - (zw << 16) / 8,(zh << 16) / 8); + (zw << 16) / 8,(zh << 16) / 8,0); } } } diff --git a/src/mame/video/konamiic.h b/src/mame/video/konamiic.h index d71f46738ee..fba79fc5301 100644 --- a/src/mame/video/konamiic.h +++ b/src/mame/video/konamiic.h @@ -11,8 +11,8 @@ extern UINT8 K007121_ctrlram[MAX_K007121][8]; void K007121_ctrl_w(int chip,int offset,int data); WRITE8_HANDLER( K007121_ctrl_0_w ); WRITE8_HANDLER( K007121_ctrl_1_w ); -void K007121_sprites_draw(int chip,bitmap_t *bitmap,gfx_element **gfxs, colortable_t *ctable, - const rectangle *cliprect, const UINT8 *source,int base_color, +void K007121_sprites_draw(int chip,bitmap_t *bitmap,const rectangle *cliprect, gfx_element **gfxs, colortable_t *ctable, + const UINT8 *source,int base_color, int global_x_offset,int bank_base, UINT32 pri_mask); diff --git a/src/mame/video/ksayakyu.c b/src/mame/video/ksayakyu.c index 9ae9ef09a1b..2d5dd669a55 100644 --- a/src/mame/video/ksayakyu.c +++ b/src/mame/video/ksayakyu.c @@ -89,12 +89,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy^=1; } - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,cliprect,gfx, tile&0x7f, (attributes) & 7, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0 ); + sx,sy,0 ); source -= 4; } diff --git a/src/mame/video/kyugo.c b/src/mame/video/kyugo.c index 944a487f617..9ddd6486718 100644 --- a/src/mame/video/kyugo.c +++ b/src/mame/video/kyugo.c @@ -207,12 +207,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta } - drawgfx( bitmap, machine->gfx[2], + drawgfx_transpen( bitmap, cliprect,machine->gfx[2], code, color, flipx,flipy, - sx,flipscreen ? sy - 16*y : sy + 16*y, - cliprect,TRANSPARENCY_PEN, 0 ); + sx,flipscreen ? sy - 16*y : sy + 16*y, 0 ); } } } diff --git a/src/mame/video/labyrunr.c b/src/mame/video/labyrunr.c index 0829ab6a992..8281446f14a 100644 --- a/src/mame/video/labyrunr.c +++ b/src/mame/video/labyrunr.c @@ -201,7 +201,7 @@ VIDEO_UPDATE( labyrunr ) } tilemap_draw(bitmap,&finalclip0,layer0,TILEMAP_DRAW_OPAQUE,0); - K007121_sprites_draw(0,bitmap,screen->machine->gfx,screen->machine->colortable,cliprect,spriteram,(K007121_ctrlram[0][6]&0x30)*2,40,0,(K007121_ctrlram[0][3] & 0x40) >> 5); + K007121_sprites_draw(0,bitmap,cliprect,screen->machine->gfx,screen->machine->colortable,spriteram,(K007121_ctrlram[0][6]&0x30)*2,40,0,(K007121_ctrlram[0][3] & 0x40) >> 5); /* we ignore the transparency because layer1 is drawn only at the top of the screen also covering sprites */ tilemap_draw(bitmap,&finalclip1,layer1,TILEMAP_DRAW_OPAQUE,0); } @@ -269,7 +269,7 @@ VIDEO_UPDATE( labyrunr ) tilemap_draw(bitmap,&finalclip1,layer1,0,1); if(use_clip3[1]) tilemap_draw(bitmap,&finalclip3,layer1,0,1); - K007121_sprites_draw(0,bitmap,screen->machine->gfx,screen->machine->colortable,cliprect,spriteram,(K007121_ctrlram[0][6]&0x30)*2,40,0,(K007121_ctrlram[0][3] & 0x40) >> 5); + K007121_sprites_draw(0,bitmap,cliprect,screen->machine->gfx,screen->machine->colortable,spriteram,(K007121_ctrlram[0][6]&0x30)*2,40,0,(K007121_ctrlram[0][3] & 0x40) >> 5); } return 0; } diff --git a/src/mame/video/ladybug.c b/src/mame/video/ladybug.c index 70d6880ef91..de2357fc2fd 100644 --- a/src/mame/video/ladybug.c +++ b/src/mame/video/ladybug.c @@ -338,21 +338,19 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (spriteram[offs + i] & 0x80) { if (spriteram[offs + i] & 0x40) /* 16x16 */ - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], (spriteram[offs + i + 1] >> 2) + 4 * (spriteram[offs + i + 2] & 0x10), spriteram[offs + i + 2] & 0x0f, spriteram[offs + i] & 0x20,spriteram[offs + i] & 0x10, spriteram[offs + i + 3], - offs / 4 - 8 + (spriteram[offs + i] & 0x0f), - cliprect,TRANSPARENCY_PEN,0); + offs / 4 - 8 + (spriteram[offs + i] & 0x0f),0); else /* 8x8 */ - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], spriteram[offs + i + 1] + 16 * (spriteram[offs + i + 2] & 0x10), spriteram[offs + i + 2] & 0x0f, spriteram[offs + i] & 0x20,spriteram[offs + i] & 0x10, spriteram[offs + i + 3], - offs / 4 + (spriteram[offs + i] & 0x0f), - cliprect,TRANSPARENCY_PEN,0); + offs / 4 + (spriteram[offs + i] & 0x0f),0); } } } diff --git a/src/mame/video/ladyfrog.c b/src/mame/video/ladyfrog.c index a5e37f4181f..8e3a5e5d085 100644 --- a/src/mame/video/ladyfrog.c +++ b/src/mame/video/ladyfrog.c @@ -112,22 +112,20 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta sy = 240-ladyfrog_spriteram[offs+0]; flipx = ((ladyfrog_spriteram[offs+1]&0x40)>>6); flipy = ((ladyfrog_spriteram[offs+1]&0x80)>>7); - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, pal, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); if(ladyfrog_spriteram[offs+3]>240) { sx = (ladyfrog_spriteram[offs+3]-256); - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, pal, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); } } } diff --git a/src/mame/video/lasso.c b/src/mame/video/lasso.c index c970d0dcb70..cdbaa0c173c 100644 --- a/src/mame/video/lasso.c +++ b/src/mame/video/lasso.c @@ -328,12 +328,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta color = source[2] & 0x0f; - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code | ((UINT16)gfxbank << 6), color, flipx, flipy, - sx,sy, - cliprect, TRANSPARENCY_PEN,0); + sx,sy,0); source += inc; } diff --git a/src/mame/video/lastduel.c b/src/mame/video/lastduel.c index f932289b3c7..ea0e6ddd837 100644 --- a/src/mame/video/lastduel.c +++ b/src/mame/video/lastduel.c @@ -242,13 +242,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect, + machine->gfx[0], code, color, flipx,flipy, - sx,sy, - cliprect, - TRANSPARENCY_PEN,15); + sx,sy,15); } } diff --git a/src/mame/video/lazercmd.c b/src/mame/video/lazercmd.c index 93dda5117f8..a717f6aca64 100644 --- a/src/mame/video/lazercmd.c +++ b/src/mame/video/lazercmd.c @@ -70,11 +70,10 @@ VIDEO_UPDATE( lazercmd ) sx *= HORZ_CHR; sy *= VERT_CHR; - drawgfx(bitmap, screen->machine->gfx[0], + drawgfx_opaque(bitmap, cliprect,screen->machine->gfx[0], videoram[i], video_inverted ? 1 : 0, 0,0, - sx,sy, - cliprect,TRANSPARENCY_NONE,0); + sx,sy); } x = marker_x - 1; /* normal video lags marker by 1 pixel */ diff --git a/src/mame/video/legionna.c b/src/mame/video/legionna.c index f83de741846..78705327541 100644 --- a/src/mame/video/legionna.c +++ b/src/mame/video/legionna.c @@ -285,10 +285,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan for (ax=0; ax<dx; ax++) for (ay=0; ay<dy; ay++) { - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], sprite++, - color,fx,fy,x+ax*16,y+ay*16, - cliprect,TRANSPARENCY_PEN,15); + color,fx,fy,x+ax*16,y+ay*16,15); } } else @@ -296,10 +295,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan for (ax=0; ax<dx; ax++) for (ay=0; ay<dy; ay++) { - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], sprite++, - color,fx,fy,x+ax*16,y+(dy-ay-1)*16, - cliprect,TRANSPARENCY_PEN,15); + color,fx,fy,x+ax*16,y+(dy-ay-1)*16,15); } } } @@ -310,10 +308,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan for (ax=0; ax<dx; ax++) for (ay=0; ay<dy; ay++) { - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], sprite++, - color,fx,fy,x+(dx-ax-1)*16,y+ay*16, - cliprect,TRANSPARENCY_PEN,15); + color,fx,fy,x+(dx-ax-1)*16,y+ay*16,15); } } else @@ -321,10 +318,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan for (ax=0; ax<dx; ax++) for (ay=0; ay<dy; ay++) { - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], sprite++, - color,fx,fy,x+(dx-ax-1)*16,y+(dy-ay-1)*16, - cliprect,TRANSPARENCY_PEN,15); + color,fx,fy,x+(dx-ax-1)*16,y+(dy-ay-1)*16,15); } } } diff --git a/src/mame/video/lemmings.c b/src/mame/video/lemmings.c index 3e418123d73..2b699edc598 100644 --- a/src/mame/video/lemmings.c +++ b/src/mame/video/lemmings.c @@ -66,12 +66,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta while (multi >= 0) { - drawgfx(bitmap,machine->gfx[gfxbank], + drawgfx_transpen(bitmap,cliprect,machine->gfx[gfxbank], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x,y + mult * multi,0); multi--; } diff --git a/src/mame/video/liberate.c b/src/mame/video/liberate.c index 64fb7db3e45..28ebf63f70a 100644 --- a/src/mame/video/liberate.c +++ b/src/mame/video/liberate.c @@ -322,19 +322,17 @@ static void liberate_draw_sprites(running_machine *machine, bitmap_t *bitmap, co sy2=sy+16; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, fx,fy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); if (multi) - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code+1, color, fx,fy, - sx,sy2, - cliprect,TRANSPARENCY_PEN,0); + sx,sy2,0); } } @@ -385,19 +383,17 @@ static void prosport_draw_sprites(running_machine *machine, bitmap_t *bitmap, co sy2=sy+16; } - drawgfx(bitmap,machine->gfx[gfx_region], + drawgfx_transpen(bitmap,cliprect,machine->gfx[gfx_region], code, color, fx,fy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); if (multi) - drawgfx(bitmap,machine->gfx[gfx_region], + drawgfx_transpen(bitmap,cliprect,machine->gfx[gfx_region], code2, color, fx,fy, - sx,sy2, - cliprect,TRANSPARENCY_PEN,0); + sx,sy2,0); } } @@ -443,19 +439,17 @@ static void boomrang_draw_sprites(running_machine *machine, bitmap_t *bitmap, co sy2=sy+16; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, fx,fy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); if (multi) - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code2, color, fx,fy, - sx,sy2, - cliprect,TRANSPARENCY_PEN,0); + sx,sy2,0); } } @@ -473,12 +467,11 @@ static void prosoccr_draw_sprites(running_machine *machine, bitmap_t *bitmap, co fx = spriteram[offs+0] & 4; fy = spriteram[offs+0] & 2; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, 0, fx,fy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } @@ -532,9 +525,8 @@ VIDEO_UPDATE( prosport ) my = (offs) % 32; mx = (offs) / 32; - drawgfx(bitmap,screen->machine->gfx[gfx_region], - tile,1,0,0,248-8*mx,8*my, - cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[gfx_region], + tile,1,0,0,248-8*mx,8*my,0); } prosport_draw_sprites(screen->machine,bitmap,cliprect); diff --git a/src/mame/video/lkage.c b/src/mame/video/lkage.c index 80c1ee6694e..55f581b8d0c 100644 --- a/src/mame/video/lkage.c +++ b/src/mame/video/lkage.c @@ -145,17 +145,17 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta for (y = 0;y < height;y++) { - pdrawgfx( + pdrawgfx_transpen( bitmap, + cliprect, machine->gfx[1], sprite_number ^ y, color, flipx,flipy, sx&0xff, sy + 16*y, - cliprect, - TRANSPARENCY_PEN,0, - priority_mask ); + priority_bitmap, + priority_mask,0 ); } source+=4; } diff --git a/src/mame/video/lordgun.c b/src/mame/video/lordgun.c index 9ca3a203e68..fce84d66b04 100644 --- a/src/mame/video/lordgun.c +++ b/src/mame/video/lordgun.c @@ -245,10 +245,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta sx -= 0x18; sy = (sy & 0x7ff) - (sy & 0x800); - drawgfx( bitmap, machine->gfx[0], + drawgfx_transpen( bitmap, cliprect, machine->gfx[0], code, color, - flipx, flipy, sx, sy, - cliprect, TRANSPARENCY_PEN, 0x3f); + flipx, flipy, sx, sy, 0x3f); } } diff --git a/src/mame/video/lsasquad.c b/src/mame/video/lsasquad.c index c39ef5cc4fc..8d88595063d 100644 --- a/src/mame/video/lsasquad.c +++ b/src/mame/video/lsasquad.c @@ -34,19 +34,17 @@ static void draw_layer(running_machine *machine, bitmap_t *bitmap, const rectang code = videoram[base + 2*y] + ((attr & 0x0f) << 8); color = attr >> 4; - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code, color, flip_screen_get(machine),flip_screen_get(machine), - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); if (sx > 248) /* wraparound */ - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code, color, flip_screen_get(machine),flip_screen_get(machine), - sx-256,sy, - cliprect,TRANSPARENCY_PEN,15); + sx-256,sy,15); } } } @@ -122,19 +120,17 @@ static int draw_layer_daikaiju(running_machine *machine, bitmap_t *bitmap, const if((type==0 && color!=0x0d) || (type !=0 && color==0x0d)) { - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code, color, flip_screen_get(machine),flip_screen_get(machine), - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); if (sx > 248) /* wraparound */ - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code, color, flip_screen_get(machine),flip_screen_get(machine), - sx-256,sy, - cliprect,TRANSPARENCY_PEN,15); + sx-256,sy,15); } } } @@ -184,19 +180,17 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); /* wraparound */ - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, - sx-256,sy, - cliprect,TRANSPARENCY_PEN,15); + sx-256,sy,15); } } diff --git a/src/mame/video/lwings.c b/src/mame/video/lwings.c index 7d853f17fc4..b7090ff1aad 100644 --- a/src/mame/video/lwings.c +++ b/src/mame/video/lwings.c @@ -211,11 +211,10 @@ static void lwings_draw_sprites(running_machine *machine, bitmap_t *bitmap, cons flipy = !flipy; } - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code,color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); } } } @@ -260,11 +259,10 @@ static void trojan_draw_sprites(running_machine *machine, bitmap_t *bitmap, cons flipy = !flipy; } - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code,color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); } } } diff --git a/src/mame/video/m10.c b/src/mame/video/m10.c index 36820f1c8d7..acc604a1c3f 100644 --- a/src/mame/video/m10.c +++ b/src/mame/video/m10.c @@ -146,9 +146,9 @@ VIDEO_UPDATE( m10 ) for (i=0;i<4;i++) if (state->flip) - drawgfx(bitmap, back_gfx, i, color[i], 1, 1, 31*8 - xpos[i], 6, cliprect, 0, 0); + drawgfx_opaque(bitmap, cliprect, back_gfx, i, color[i], 1, 1, 31*8 - xpos[i], 6); else - drawgfx(bitmap, back_gfx, i, color[i], 0, 0, xpos[i], 0, cliprect, 0, 0); + drawgfx_opaque(bitmap, cliprect, back_gfx, i, color[i], 0, 0, xpos[i], 0); if (state->bottomline) { diff --git a/src/mame/video/m107.c b/src/mame/video/m107.c index bf6882fb8c2..18e9a33508a 100644 --- a/src/mame/video/m107.c +++ b/src/mame/video/m107.c @@ -190,12 +190,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta for (i=0; i<y_multi; i++) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite + s_ptr, colour, fx,fy, - x,y-i*16, - cliprect,TRANSPARENCY_PEN,0); + x,y-i*16,0); if (fy) s_ptr++; else s_ptr--; } } @@ -218,12 +217,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (!ffy) sprite+=y_multi-1; for (i=0; i<y_multi; i++) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite+(ffy?i:-i), colour, ffx,ffy, - (x+xdisp)&0x1ff,(y-ydisp-16*i)&0x1ff, - cliprect,TRANSPARENCY_PEN,0); + (x+xdisp)&0x1ff,(y-ydisp-16*i)&0x1ff,0); } if (rom[rom_offs+1]&0x80) break; /* end of block */ diff --git a/src/mame/video/m52.c b/src/mame/video/m52.c index 9ee343a71d6..979341f86ae 100644 --- a/src/mame/video/m52.c +++ b/src/mame/video/m52.c @@ -314,23 +314,21 @@ static void draw_background(running_machine *machine, bitmap_t *bitmap, const re /* this may not be correct */ ypos = ypos + (22 - 8); - drawgfx(bitmap, machine->gfx[image], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[image], 0, 0, flip_screen_get(machine), flip_screen_get(machine), xpos, - ypos, - cliprect, - TRANSPARENCY_PEN, 0); + ypos, 0); - drawgfx(bitmap, machine->gfx[image], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[image], 0, 0, flip_screen_get(machine), flip_screen_get(machine), xpos - 256, - ypos, - cliprect, - TRANSPARENCY_PEN, 0); + ypos, 0); rect.min_x = visarea->min_x; rect.max_x = visarea->max_x; @@ -419,9 +417,8 @@ VIDEO_UPDATE( m52 ) clip = *cliprect; #endif - drawgfx(bitmap, screen->machine->gfx[1], + drawgfx_transmask(bitmap, &clip, screen->machine->gfx[1], code, color, flipx, flipy, sx, sy, - &clip, TRANSPARENCY_PENS, colortable_get_transpen_mask(screen->machine->colortable, screen->machine->gfx[1], color, 512+32)); } return 0; diff --git a/src/mame/video/m57.c b/src/mame/video/m57.c index 1f6084ab7fd..e6ea16b56c7 100644 --- a/src/mame/video/m57.c +++ b/src/mame/video/m57.c @@ -244,12 +244,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1+bank], + drawgfx_transmask(bitmap,cliprect,machine->gfx[1+bank], tile_number, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 256+15)); } } diff --git a/src/mame/video/m58.c b/src/mame/video/m58.c index 9e46769669c..239fa51d61a 100644 --- a/src/mame/video/m58.c +++ b/src/mame/video/m58.c @@ -216,7 +216,7 @@ WRITE8_HANDLER( yard_flipscreen_w ) * *************************************/ -#define DRAW_SPRITE(code, sy) drawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, sx, sy, cliprect, TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 512)); +#define DRAW_SPRITE(code, sy) drawgfx_transmask(bitmap, cliprect, machine->gfx[1], code, color, flipx, flipy, sx, sy, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 512)); static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect ) { diff --git a/src/mame/video/m62.c b/src/mame/video/m62.c index ca4349c413f..bc6174a590c 100644 --- a/src/mame/video/m62.c +++ b/src/mame/video/m62.c @@ -389,11 +389,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta do { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code + i * incr,col, flipx,flipy, - sx,sy + 16 * i, - cliprect,TRANSPARENCY_PEN,0); + sx,sy + 16 * i,0); i--; } while (i >= 0); diff --git a/src/mame/video/m72.c b/src/mame/video/m72.c index 19a7fd6de6a..95d00965ef7 100644 --- a/src/mame/video/m72.c +++ b/src/mame/video/m72.c @@ -443,12 +443,11 @@ static void m72_draw_sprites(running_machine *machine, bitmap_t *bitmap,const re if (flipy) c += h-1-y; else c += y; - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], c, color, flipx,flipy, - sx + 16*x,sy + 16*y, - cliprect,TRANSPARENCY_PEN,0); + sx + 16*x,sy + 16*y,0); } } @@ -495,12 +494,11 @@ static void majtitle_draw_sprites(running_machine *machine, bitmap_t *bitmap,con if (flipy) c += h-1-y; else c += y; - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], c, color, flipx,flipy, - sx + 16*x,sy + 16*y, - cliprect,TRANSPARENCY_PEN,0); + sx + 16*x,sy + 16*y,0); } } } diff --git a/src/mame/video/m90.c b/src/mame/video/m90.c index 08570fa81f9..8300ff42122 100644 --- a/src/mame/video/m90.c +++ b/src/mame/video/m90.c @@ -160,29 +160,29 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan for (i = 0;i < y_multi;i++) if (m90_video_control_data[7] & 0x01) - pdrawgfx(bitmap,machine->gfx[1], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite + (fy ? y_multi-1 - i : i), colour, fx,fy, x,y+i*16, - cliprect,TRANSPARENCY_PEN,0, - (colour & 0x08) ? 0x00 : 0x02); + priority_bitmap, + (colour & 0x08) ? 0x00 : 0x02,0); else if (m90_video_control_data[7] & 0x02) - pdrawgfx(bitmap,machine->gfx[1], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite + (fy ? y_multi-1 - i : i), colour, fx,fy, x,y+i*16, - cliprect,TRANSPARENCY_PEN,0, - ((colour & 0x0c)==0x0c) ? 0x00 : 0x02); + priority_bitmap, + ((colour & 0x0c)==0x0c) ? 0x00 : 0x02,0); else - pdrawgfx(bitmap,machine->gfx[1], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite + (fy ? y_multi-1 - i : i), colour, fx,fy, x,y+i*16, - cliprect,TRANSPARENCY_PEN,0, - 0x02); + priority_bitmap, + 0x02,0); } } @@ -214,13 +214,13 @@ static void bomblord_draw_sprites(running_machine *machine, bitmap_t *bitmap,con fx = (spriteram16[offs+3] >> 8) & 0x02; fy = (spriteram16[offs+2] >> 8) & 0x80; - pdrawgfx(bitmap,machine->gfx[1], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite, colour, fx,fy, x,y, - cliprect,TRANSPARENCY_PEN,0, - (colour & 0x08) ? 0x00 : 0x02); + priority_bitmap, + (colour & 0x08) ? 0x00 : 0x02,0); } } @@ -251,13 +251,13 @@ static void dynablsb_draw_sprites(running_machine *machine, bitmap_t *bitmap,con fx = (spriteram16[offs+3] >> 8) & 0x02; fy = (spriteram16[offs+2] >> 8) & 0x80; - pdrawgfx(bitmap,machine->gfx[1], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite, colour, fx,fy, x,y, - cliprect,TRANSPARENCY_PEN,0, - (colour & 0x08) ? 0x00 : 0x02); + priority_bitmap, + (colour & 0x08) ? 0x00 : 0x02,0); } } diff --git a/src/mame/video/m92.c b/src/mame/video/m92.c index 1a17f181541..fff2dc83e8e 100644 --- a/src/mame/video/m92.c +++ b/src/mame/video/m92.c @@ -340,35 +340,35 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta for (i=0; i<y_multi; i++) { if (flip_screen_get(machine)) { - pdrawgfx(bitmap,machine->gfx[1], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite + s_ptr, colour, !fx,!fy, 464-x,240-(y-i*16), - cliprect,TRANSPARENCY_PEN,0,pri_back); + priority_bitmap,pri_back,0); // wrap around x - pdrawgfx(bitmap,machine->gfx[1], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite + s_ptr, colour, !fx,!fy, 464-x+512,240-(y-i*16), - cliprect,TRANSPARENCY_PEN,0,pri_back); + priority_bitmap,pri_back,0); } else { - pdrawgfx(bitmap,machine->gfx[1], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite + s_ptr, colour, fx,fy, x,y-i*16, - cliprect,TRANSPARENCY_PEN,0,pri_back); + priority_bitmap,pri_back,0); // wrap around x - pdrawgfx(bitmap,machine->gfx[1], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite + s_ptr, colour, fx,fy, x-512,y-i*16, - cliprect,TRANSPARENCY_PEN,0,pri_back); + priority_bitmap,pri_back,0); } if (fy) s_ptr++; else s_ptr--; } diff --git a/src/mame/video/madalien.c b/src/mame/video/madalien.c index c87d89d037a..f4fa433f216 100644 --- a/src/mame/video/madalien.c +++ b/src/mame/video/madalien.c @@ -168,8 +168,8 @@ static VIDEO_START( madalien ) gfx_element_set_source(machine->gfx[0], madalien_charram); - drawgfx(headlight_bitmap, machine->gfx[2], 0, 0, 0, 0, 0x00, 0x00, NULL, TRANSPARENCY_NONE, 0); - drawgfx(headlight_bitmap, machine->gfx[2], 0, 0, 0, 1, 0x00, 0x40, NULL, TRANSPARENCY_NONE, 0); + drawgfx_opaque(headlight_bitmap, NULL, machine->gfx[2], 0, 0, 0, 0, 0x00, 0x00); + drawgfx_opaque(headlight_bitmap, NULL, machine->gfx[2], 0, 0, 0, 1, 0x00, 0x40); } diff --git a/src/mame/video/madmotor.c b/src/mame/video/madmotor.c index 288a706683d..7cf4b402515 100644 --- a/src/mame/video/madmotor.c +++ b/src/mame/video/madmotor.c @@ -204,12 +204,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan { if ((color & pri_mask) == pri_val && (!flash || (video_screen_get_frame_number(machine->primary_screen) & 1))) - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code - y * incy + h * x, color, flipx,flipy, - sx + mult * x,sy + mult * y, - cliprect,TRANSPARENCY_PEN,0); + sx + mult * x,sy + mult * y,0); } offs += 4; diff --git a/src/mame/video/magmax.c b/src/mame/video/magmax.c index 0fa624539e8..582884cc423 100644 --- a/src/mame/video/magmax.c +++ b/src/mame/video/magmax.c @@ -203,12 +203,11 @@ VIDEO_UPDATE( magmax ) if (code & 0x80) /* sprite bankswitch */ code += (*magmax_vreg & 0x30) * 0x8; - drawgfx(bitmap, screen->machine->gfx[1], + drawgfx_transmask(bitmap, cliprect, screen->machine->gfx[1], code, color, flipx, flipy, sx, sy, - cliprect, TRANSPARENCY_PENS, colortable_get_transpen_mask(screen->machine->colortable, screen->machine->gfx[1], color, 0x1f)); } } @@ -234,12 +233,11 @@ VIDEO_UPDATE( magmax ) sy = 31 - sy; } - drawgfx(bitmap, screen->machine->gfx[0], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[0], code, 0, flipscreen, flipscreen, - 8 * sx, 8 * sy, - cliprect, TRANSPARENCY_PEN, 0x0f); + 8 * sx, 8 * sy, 0x0f); } } return 0; diff --git a/src/mame/video/mainsnk.c b/src/mame/video/mainsnk.c index a51e6b4e0c1..81bf9e942d7 100644 --- a/src/mame/video/mainsnk.c +++ b/src/mame/video/mainsnk.c @@ -121,12 +121,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx( bitmap,gfx, + drawgfx_transpen( bitmap,cliprect,gfx, tile_number, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,7); + sx,sy,7); source+=4; } diff --git a/src/mame/video/malzak.c b/src/mame/video/malzak.c index 7923fcaf3da..dd2eb34f3f0 100644 --- a/src/mame/video/malzak.c +++ b/src/mame/video/malzak.c @@ -178,15 +178,15 @@ VIDEO_UPDATE( malzak ) { if (saa5050_state.saa5050_flags & SAA5050_DBLHI) { - drawgfx (bitmap, screen->machine->gfx[2], code, colour, 0, 0, - sx * 6, sy * 10, cliprect, TRANSPARENCY_NONE, 0); - drawgfx (bitmap, screen->machine->gfx[3], code, colour, 0, 0, - sx * 6, (sy + 1) * 10, cliprect, TRANSPARENCY_NONE, 0); + drawgfx_opaque (bitmap, cliprect, screen->machine->gfx[2], code, colour, 0, 0, + sx * 6, sy * 10); + drawgfx_opaque (bitmap, cliprect, screen->machine->gfx[3], code, colour, 0, 0, + sx * 6, (sy + 1) * 10); } else { - drawgfx (bitmap, screen->machine->gfx[1], code, colour, 0, 0, - sx * 6, sy * 10, cliprect, TRANSPARENCY_NONE, 0); + drawgfx_opaque (bitmap, cliprect, screen->machine->gfx[1], code, colour, 0, 0, + sx * 6, sy * 10); } } } @@ -213,8 +213,8 @@ VIDEO_UPDATE( malzak ) if(sx < -15) sx+=256; - drawgfx(bitmap,screen->machine->gfx[0],field[x*16 + y].code,7,0,0, - sx, sy, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap,cliprect, screen->machine->gfx[0],field[x*16 + y].code,7,0,0, + sx, sy, 0); } /* update the S2636 chips */ diff --git a/src/mame/video/mappy.c b/src/mame/video/mappy.c index fa5257843f2..50afcef9509 100644 --- a/src/mame/video/mappy.c +++ b/src/mame/video/mappy.c @@ -441,12 +441,11 @@ void mappy_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectan { for (x = 0;x <= sizex;x++) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transmask(bitmap,cliprect,machine->gfx[1], sprite + gfx_offs[y ^ (sizey * flipy)][x ^ (sizex * flipx)], color, flipx,flipy, sx + 16*x,sy + 16*y, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, transcolor)); } } @@ -517,12 +516,11 @@ static void phozon_draw_sprites(running_machine *machine, bitmap_t *bitmap, cons { for (x = 0;x <= sizex;x++) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transmask(bitmap,cliprect,machine->gfx[1], sprite + gfx_offs[y ^ (sizey * flipy)][x ^ (sizex * flipx)], color, flipx,flipy, sx + 8*x,sy + 8*y, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 31)); } } diff --git a/src/mame/video/marineb.c b/src/mame/video/marineb.c index 1463cb8cb67..ab5449bc23d 100644 --- a/src/mame/video/marineb.c +++ b/src/mame/video/marineb.c @@ -202,12 +202,11 @@ VIDEO_UPDATE( marineb ) sx++; } - drawgfx(bitmap,screen->machine->gfx[gfx], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[gfx], code, col, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } return 0; } @@ -248,12 +247,11 @@ VIDEO_UPDATE( changes ) sx++; } - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], code >> 2, col, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } /* draw the big sprite */ @@ -278,21 +276,19 @@ VIDEO_UPDATE( changes ) code >>= 4; - drawgfx(bitmap,screen->machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[2], code, col, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); /* draw again for wrap around */ - drawgfx(bitmap,screen->machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[2], code, col, flipx,flipy, - sx-256,sy, - cliprect,TRANSPARENCY_PEN,0); + sx-256,sy,0); return 0; } @@ -350,12 +346,11 @@ VIDEO_UPDATE( springer ) sx--; } - drawgfx(bitmap,screen->machine->gfx[gfx], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[gfx], code, col, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } return 0; } @@ -398,12 +393,11 @@ VIDEO_UPDATE( hoccer ) flipx = !flipx; } - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], code >> 2, col, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } return 0; } @@ -461,12 +455,11 @@ VIDEO_UPDATE( hopprobo ) sx--; } - drawgfx(bitmap,screen->machine->gfx[gfx], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[gfx], code, col, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } return 0; } diff --git a/src/mame/video/mario.c b/src/mame/video/mario.c index 5417e7c9f97..5062aa984ac 100644 --- a/src/mame/video/mario.c +++ b/src/mame/video/mario.c @@ -188,23 +188,21 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { y -= 14; x -= 7; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], state->spriteram[offs + 2], (state->spriteram[offs + 1] & 0x0f) + 16 * state->palette_bank + 32 * state->monitor, !(state->spriteram[offs + 1] & 0x80),!(state->spriteram[offs + 1] & 0x40), - x, y, - cliprect,TRANSPARENCY_PEN,0); + x, y,0); } else { y += 1; x -= 8; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], state->spriteram[offs + 2], (state->spriteram[offs + 1] & 0x0f) + 16 * state->palette_bank + 32 * state->monitor, (state->spriteram[offs + 1] & 0x80),(state->spriteram[offs + 1] & 0x40), - x, y, - cliprect,TRANSPARENCY_PEN,0); + x, y,0); } } } diff --git a/src/mame/video/markham.c b/src/mame/video/markham.c index fbe88d6229a..64b3354d5f3 100644 --- a/src/mame/video/markham.c +++ b/src/mame/video/markham.c @@ -108,12 +108,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (px>248) px = px-256; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transmask(bitmap,cliprect,machine->gfx[1], chr, col, fx,fy, px,py, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], col, 0)); } } diff --git a/src/mame/video/matmania.c b/src/mame/video/matmania.c index 971c6ad336b..2a19142f8e6 100644 --- a/src/mame/video/matmania.c +++ b/src/mame/video/matmania.c @@ -150,12 +150,11 @@ VIDEO_UPDATE( matmania ) sx = 15 - offs / 32; sy = offs % 32; - drawgfx(tmpbitmap,screen->machine->gfx[1], + drawgfx_opaque(tmpbitmap,0,screen->machine->gfx[1], videoram[offs] + ((colorram[offs] & 0x08) << 5), (colorram[offs] & 0x30) >> 4, 0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */ - 16*sx,16*sy, - 0,TRANSPARENCY_NONE,0); + 16*sx,16*sy); } /* Update the tiles in the right tile ram bank */ @@ -167,12 +166,11 @@ VIDEO_UPDATE( matmania ) sx = 15 - offs / 32; sy = offs % 32; - drawgfx(tmpbitmap2,screen->machine->gfx[1], + drawgfx_opaque(tmpbitmap2,0,screen->machine->gfx[1], matmania_videoram3[offs] + ((matmania_colorram3[offs] & 0x08) << 5), (matmania_colorram3[offs] & 0x30) >> 4, 0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */ - 16*sx,16*sy, - 0,TRANSPARENCY_NONE,0); + 16*sx,16*sy); } @@ -194,12 +192,11 @@ VIDEO_UPDATE( matmania ) { if (spriteram[offs] & 0x01) { - drawgfx(bitmap,screen->machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[2], spriteram[offs+1] + ((spriteram[offs] & 0xf0) << 4), (spriteram[offs] & 0x08) >> 3, spriteram[offs] & 0x04,spriteram[offs] & 0x02, - 239 - spriteram[offs+3],(240 - spriteram[offs+2]) & 0xff, - cliprect,TRANSPARENCY_PEN,0); + 239 - spriteram[offs+3],(240 - spriteram[offs+2]) & 0xff,0); } } @@ -213,12 +210,11 @@ VIDEO_UPDATE( matmania ) sx = 31 - offs / 32; sy = offs % 32; - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], matmania_videoram2[offs] + 256 * (matmania_colorram2[offs] & 0x07), (matmania_colorram2[offs] & 0x30) >> 4, 0,0, - 8*sx,8*sy, - cliprect,TRANSPARENCY_PEN,0); + 8*sx,8*sy,0); } return 0; } @@ -237,12 +233,11 @@ VIDEO_UPDATE( maniach ) sx = 15 - offs / 32; sy = offs % 32; - drawgfx(tmpbitmap,screen->machine->gfx[1], + drawgfx_opaque(tmpbitmap,0,screen->machine->gfx[1], videoram[offs] + ((colorram[offs] & 0x03) << 8), (colorram[offs] & 0x30) >> 4, 0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */ - 16*sx,16*sy, - 0,TRANSPARENCY_NONE,0); + 16*sx,16*sy); } /* Update the tiles in the right tile ram bank */ @@ -254,12 +249,11 @@ VIDEO_UPDATE( maniach ) sx = 15 - offs / 32; sy = offs % 32; - drawgfx(tmpbitmap2,screen->machine->gfx[1], + drawgfx_opaque(tmpbitmap2,0,screen->machine->gfx[1], matmania_videoram3[offs] + ((matmania_colorram3[offs] & 0x03) << 8), (matmania_colorram3[offs] & 0x30) >> 4, 0,sy >= 16, /* flip horizontally tiles on the right half of the bitmap */ - 16*sx,16*sy, - 0,TRANSPARENCY_NONE,0); + 16*sx,16*sy); } @@ -282,12 +276,11 @@ VIDEO_UPDATE( maniach ) { if (spriteram[offs] & 0x01) { - drawgfx(bitmap,screen->machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[2], spriteram[offs+1] + ((spriteram[offs] & 0xf0) << 4), (spriteram[offs] & 0x08) >> 3, spriteram[offs] & 0x04,spriteram[offs] & 0x02, - 239 - spriteram[offs+3],(240 - spriteram[offs+2]) & 0xff, - cliprect,TRANSPARENCY_PEN,0); + 239 - spriteram[offs+3],(240 - spriteram[offs+2]) & 0xff,0); } } @@ -301,12 +294,11 @@ VIDEO_UPDATE( maniach ) sx = 31 - offs / 32; sy = offs % 32; - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], matmania_videoram2[offs] + 256 * (matmania_colorram2[offs] & 0x07), (matmania_colorram2[offs] & 0x30) >> 4, 0,0, - 8*sx,8*sy, - cliprect,TRANSPARENCY_PEN,0); + 8*sx,8*sy,0); } return 0; } diff --git a/src/mame/video/mcr3.c b/src/mame/video/mcr3.c index b25e5937898..9ff2bd134c2 100644 --- a/src/mame/video/mcr3.c +++ b/src/mame/video/mcr3.c @@ -233,22 +233,22 @@ static void mcr3_update_sprites(running_machine *machine, bitmap_t *bitmap, cons if (!mcr_cocktail_flip) { /* first draw the sprite, visible */ - pdrawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, sx, sy, - cliprect, TRANSPARENCY_PENS, 0x0101, 0x00); + pdrawgfx_transmask(bitmap, cliprect, machine->gfx[1], code, color, flipx, flipy, sx, sy, + priority_bitmap, 0x00, 0x0101); /* then draw the mask, behind the background but obscuring following sprites */ - pdrawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, sx, sy, - cliprect, TRANSPARENCY_PENS, 0xfeff, 0x02); + pdrawgfx_transmask(bitmap, cliprect, machine->gfx[1], code, color, flipx, flipy, sx, sy, + priority_bitmap, 0x02, 0xfeff); } else { /* first draw the sprite, visible */ - pdrawgfx(bitmap, machine->gfx[1], code, color, !flipx, !flipy, 480 - sx, 452 - sy, - cliprect, TRANSPARENCY_PENS, 0x0101, 0x00); + pdrawgfx_transmask(bitmap, cliprect, machine->gfx[1], code, color, !flipx, !flipy, 480 - sx, 452 - sy, + priority_bitmap, 0x00, 0x0101); /* then draw the mask, behind the background but obscuring following sprites */ - pdrawgfx(bitmap, machine->gfx[1], code, color, !flipx, !flipy, 480 - sx, 452 - sy, - cliprect, TRANSPARENCY_PENS, 0xfeff, 0x02); + pdrawgfx_transmask(bitmap, cliprect, machine->gfx[1], code, color, !flipx, !flipy, 480 - sx, 452 - sy, + priority_bitmap, 0x02, 0xfeff); } } } diff --git a/src/mame/video/mcr68.c b/src/mame/video/mcr68.c index 1c104e3bf38..2b98fc577c4 100644 --- a/src/mame/video/mcr68.c +++ b/src/mame/video/mcr68.c @@ -249,12 +249,12 @@ static void mcr68_update_sprites(running_machine *machine, bitmap_t *bitmap, con The color 8 is used to cover over other sprites. */ /* first draw the sprite, visible */ - pdrawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, x, y, - &sprite_clip, TRANSPARENCY_PENS, 0x0101, 0x00); + pdrawgfx_transmask(bitmap, &sprite_clip, machine->gfx[1], code, color, flipx, flipy, x, y, + priority_bitmap, 0x00, 0x0101); /* then draw the mask, behind the background but obscuring following sprites */ - pdrawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, x, y, - &sprite_clip, TRANSPARENCY_PENS, 0xfeff, 0x02); + pdrawgfx_transmask(bitmap, &sprite_clip, machine->gfx[1], code, color, flipx, flipy, x, y, + priority_bitmap, 0x02, 0xfeff); } } @@ -305,12 +305,12 @@ static void zwackery_update_sprites(running_machine *machine, bitmap_t *bitmap, The color 8 is used to cover over other sprites. */ /* first draw the sprite, visible */ - pdrawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, x, y, - cliprect, TRANSPARENCY_PENS, 0x0101, 0x00); + pdrawgfx_transmask(bitmap, cliprect, machine->gfx[1], code, color, flipx, flipy, x, y, + priority_bitmap, 0x00, 0x0101); /* then draw the mask, behind the background but obscuring following sprites */ - pdrawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, x, y, - cliprect, TRANSPARENCY_PENS, 0xfeff, 0x02); + pdrawgfx_transmask(bitmap, cliprect, machine->gfx[1], code, color, flipx, flipy, x, y, + priority_bitmap, 0x02, 0xfeff); } } diff --git a/src/mame/video/meadows.c b/src/mame/video/meadows.c index 6c0eef9ea7c..3931f80c20c 100644 --- a/src/mame/video/meadows.c +++ b/src/mame/video/meadows.c @@ -88,7 +88,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int bank = i; /* that fixes it for now :-/ */ int flip = spriteram[i+8] >> 5; /* bit #5 flip vertical flag */ - drawgfx(bitmap, machine->gfx[bank + 1], code, 0, flip, 0, x, y, clip, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, clip, machine->gfx[bank + 1], code, 0, flip, 0, x, y, 0); } } diff --git a/src/mame/video/megasys1.c b/src/mame/video/megasys1.c index 05fe8ad2293..b2101116ff6 100644 --- a/src/mame/video/megasys1.c +++ b/src/mame/video/megasys1.c @@ -620,14 +620,14 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan code = spritedata[0x0E/2] + objectdata[0x06/2]; color = (attr & color_mask); - pdrawgfx(bitmap,machine->gfx[3], + pdrawgfx_transpen(bitmap,cliprect, + machine->gfx[3], (code & 0xfff ) + ((megasys1_sprite_bank & 1) << 12), color, flipx, flipy, sx, sy, - cliprect, - TRANSPARENCY_PEN,15, - (attr & 0x08) ? 0x0c : 0x0a); + priority_bitmap, + (attr & 0x08) ? 0x0c : 0x0a,15); } /* sprite */ } /* offs */ } /* non Z hw */ @@ -660,14 +660,14 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan sx = 240-sx; sy = 240-sy; } - pdrawgfx(bitmap,machine->gfx[2], + pdrawgfx_transpen(bitmap,cliprect, + machine->gfx[2], code, color, flipx, flipy, sx, sy, - cliprect, - TRANSPARENCY_PEN,15, - (attr & 0x08) ? 0x0c : 0x0a); + priority_bitmap, + (attr & 0x08) ? 0x0c : 0x0a,15); } /* sprite */ } /* Z hw */ diff --git a/src/mame/video/megazone.c b/src/mame/video/megazone.c index 15b717a334e..27b39640355 100644 --- a/src/mame/video/megazone.c +++ b/src/mame/video/megazone.c @@ -135,12 +135,11 @@ VIDEO_UPDATE( megazone ) flipy = !flipy; } - drawgfx(tmpbitmap,screen->machine->gfx[1], + drawgfx_opaque(tmpbitmap,0,screen->machine->gfx[1], ((int)videoram[offs]) + ((colorram[offs] & (1<<7) ? 256 : 0) ), (colorram[offs] & 0x0f) + 0x10, flipx,flipy, - 8*sx,8*sy, - 0,TRANSPARENCY_NONE,0); + 8*sx,8*sy); } /* copy the temporary bitmap to the screen */ @@ -182,12 +181,11 @@ VIDEO_UPDATE( megazone ) else sx = sx + 32; - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transmask(bitmap,cliprect,screen->machine->gfx[0], spriteram[offs + 2], color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(screen->machine->colortable, screen->machine->gfx[0], color, 0)); } } @@ -216,12 +214,11 @@ VIDEO_UPDATE( megazone ) - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[1], ((int)megazone_videoram2[offs]) + ((megazone_colorram2[offs] & (1<<7) ? 256 : 0) ), (megazone_colorram2[offs] & 0x0f) + 0x10, flipx,flipy, - 8*sx,8*sy, - cliprect,TRANSPARENCY_NONE,0); + 8*sx,8*sy); offs++; } } diff --git a/src/mame/video/mermaid.c b/src/mame/video/mermaid.c index a94914a4286..ddaef91e653 100644 --- a/src/mame/video/mermaid.c +++ b/src/mame/video/mermaid.c @@ -199,9 +199,8 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta sy = 240 - sy; } - drawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, sx, sy, - (flip_screen_x_get(machine) ? &flip_spritevisiblearea : &spritevisiblearea), - TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, (flip_screen_x_get(machine) ? &flip_spritevisiblearea : &spritevisiblearea), + machine->gfx[1], code, color, flipx, flipy, sx, sy, 0); } } @@ -299,8 +298,7 @@ VIDEO_EOF( mermaid ) tilemap_draw(helper, &rect, bg_tilemap, 0, 0); - drawgfx(helper2, machine->gfx[1], code, 0, flipx, flipy, sx, sy, - &rect,TRANSPARENCY_PEN, 0); + drawgfx_transpen(helper2, &rect,machine->gfx[1], code, 0, flipx, flipy, sx, sy, 0); coll_bit2 |= collision_check(machine->colortable, &rect); @@ -311,8 +309,7 @@ VIDEO_EOF( mermaid ) tilemap_draw(helper, &rect, fg_tilemap, 0, 0); - drawgfx(helper2, machine->gfx[1], code, 0, flipx, flipy, sx, sy, - &rect,TRANSPARENCY_PEN, 0); + drawgfx_transpen(helper2, &rect,machine->gfx[1], code, 0, flipx, flipy, sx, sy, 0); coll_bit1 |= collision_check(machine->colortable, &rect); @@ -350,12 +347,10 @@ VIDEO_EOF( mermaid ) sy2 = 240 - sy2; } - drawgfx(helper, machine->gfx[1], code2, 0, flipx2, flipy2, sx2, sy2, - &rect,TRANSPARENCY_PEN, 0); + drawgfx_transpen(helper, &rect,machine->gfx[1], code2, 0, flipx2, flipy2, sx2, sy2, 0); } - drawgfx(helper2, machine->gfx[1], code, 0, flipx, flipy, sx, sy, - &rect,TRANSPARENCY_PEN, 0); + drawgfx_transpen(helper2, &rect,machine->gfx[1], code, 0, flipx, flipy, sx, sy, 0); coll_bit0 |= collision_check(machine->colortable, &rect); } @@ -440,12 +435,10 @@ VIDEO_EOF( mermaid ) sy2 = 240 - sy2; } - drawgfx(helper, machine->gfx[1], code2, 0, flipx2, flipy2, sx2, sy2, - &rect,TRANSPARENCY_PEN, 0); + drawgfx_transpen(helper, &rect,machine->gfx[1], code2, 0, flipx2, flipy2, sx2, sy2, 0); } - drawgfx(helper2, machine->gfx[1], code, 0, flipx, flipy, sx, sy, - &rect,TRANSPARENCY_PEN, 0); + drawgfx_transpen(helper2, &rect,machine->gfx[1], code, 0, flipx, flipy, sx, sy, 0); coll_bit3 |= collision_check(machine->colortable, &rect); } @@ -530,12 +523,10 @@ VIDEO_EOF( mermaid ) sy2 = 240 - sy2; } - drawgfx(helper, machine->gfx[1], code2, 0, flipx2, flipy2, sx2, sy2, - &rect,TRANSPARENCY_PEN, 0); + drawgfx_transpen(helper, &rect,machine->gfx[1], code2, 0, flipx2, flipy2, sx2, sy2, 0); } - drawgfx(helper2, machine->gfx[1], code, 0, flipx, flipy, sx, sy, - &rect,TRANSPARENCY_PEN, 0); + drawgfx_transpen(helper2, &rect,machine->gfx[1], code, 0, flipx, flipy, sx, sy, 0); coll_bit6 |= collision_check(machine->colortable, &rect); } diff --git a/src/mame/video/metlclsh.c b/src/mame/video/metlclsh.c index 43a00f54878..e0e9a4e32bd 100644 --- a/src/mame/video/metlclsh.c +++ b/src/mame/video/metlclsh.c @@ -206,16 +206,16 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan { if (sizey) { - drawgfx(bitmap,gfx, code & ~1, color, flipx,flipy, - sx, sy + (flipy ? 0 : -16) + wrapy, cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx, code & ~1, color, flipx,flipy, + sx, sy + (flipy ? 0 : -16) + wrapy,0); - drawgfx(bitmap,gfx, code | 1, color, flipx,flipy, - sx,sy + (flipy ? -16 : 0) + wrapy, cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx, code | 1, color, flipx,flipy, + sx,sy + (flipy ? -16 : 0) + wrapy,0); } else { - drawgfx(bitmap,gfx, code, color, flipx,flipy, - sx,sy + wrapy, cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx, code, color, flipx,flipy, + sx,sy + wrapy,0); } } } diff --git a/src/mame/video/metro.c b/src/mame/video/metro.c index 9e482a1d9fc..f8d9dab86f3 100644 --- a/src/mame/video/metro.c +++ b/src/mame/video/metro.c @@ -697,14 +697,13 @@ void metro_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectan gfx_element_build_temporary(&gfx, machine, gfxdata, width, height, width, 0, 256, 0); - pdrawgfxzoom( bitmap,&gfx, + pdrawgfxzoom_transpen( bitmap,cliprect, &gfx, 0, color_start >> 4, flipx, flipy, x, y, - cliprect, TRANSPARENCY_PEN, 255, zoom, zoom, - primask[pri]); + priority_bitmap,primask[pri], 255); } else { @@ -714,14 +713,13 @@ void metro_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectan gfx_element_build_temporary(&gfx, machine, gfxdata, width, height, width/2, 0, 16, GFX_ELEMENT_PACKED); - pdrawgfxzoom( bitmap,&gfx, + pdrawgfxzoom_transpen( bitmap,cliprect, &gfx, 0, color + color_start, flipx, flipy, x, y, - cliprect, TRANSPARENCY_PEN, 15, zoom, zoom, - primask[pri]); + priority_bitmap,primask[pri], 15); } #if 0 { /* Display priority + zoom on each sprite */ diff --git a/src/mame/video/mexico86.c b/src/mame/video/mexico86.c index 21a64b0c84a..cd6586b5c68 100644 --- a/src/mame/video/mexico86.c +++ b/src/mame/video/mexico86.c @@ -88,12 +88,11 @@ if (offs >= mexico86_objectram_size+0x1c0) continue; x = (sx + xc * 8) & 0xff; y = (sy + yc * 8) & 0xff; - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], code, color, flipx,flipy, - x,y, - cliprect,TRANSPARENCY_PEN,15); + x,y,15); } } } @@ -145,22 +144,20 @@ VIDEO_UPDATE( kikikai ) color = (mexico86_videoram[goffs + 1] & 0xe0) >> 5; goffs += 0x40; - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], code, color, 0,0, - sx&0xff,y, - cliprect,TRANSPARENCY_PEN,15); + sx&0xff,y,15); code = mexico86_videoram[goffs] + ((mexico86_videoram[goffs + 1] & 0x1f) << 8); color = (mexico86_videoram[goffs + 1] & 0xe0) >> 5; - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], code, color, 0,0, - (sx+8)&0xff,y, - cliprect,TRANSPARENCY_PEN,15); + (sx+8)&0xff,y,15); } } return 0; diff --git a/src/mame/video/mikie.c b/src/mame/video/mikie.c index 99c0e21bc3a..5157354b80c 100644 --- a/src/mame/video/mikie.c +++ b/src/mame/video/mikie.c @@ -155,12 +155,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[gfxbank], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[gfxbank], code, color, flipx,flipy, - sx,sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx,sy, 0); } } diff --git a/src/mame/video/mitchell.c b/src/mame/video/mitchell.c index dba3325747b..da789556f79 100644 --- a/src/mame/video/mitchell.c +++ b/src/mame/video/mitchell.c @@ -271,12 +271,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan sx = 496 - sx; sy = 240 - sy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipscreen,flipscreen, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); } } diff --git a/src/mame/video/mjkjidai.c b/src/mame/video/mjkjidai.c index 1f89f372707..94e0587cd6d 100644 --- a/src/mame/video/mjkjidai.c +++ b/src/mame/video/mjkjidai.c @@ -115,12 +115,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan sx += 16; sy += 1; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/momoko.c b/src/mame/video/momoko.c index 3468978f92e..0b5b07b155f 100644 --- a/src/mame/video/momoko.c +++ b/src/mame/video/momoko.c @@ -142,12 +142,11 @@ VIDEO_UPDATE( momoko ) py = 248-(8*y+dy+9); } - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[1], chr, col, flip,flip, - px,py, - cliprect,TRANSPARENCY_NONE,0); + px,py); } } } @@ -177,12 +176,11 @@ VIDEO_UPDATE( momoko ) py = y+1; } - drawgfx(bitmap,screen->machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[3], chr, col, !fx,fy, - px,py, - cliprect,TRANSPARENCY_PEN,0); + px,py,0); } @@ -241,12 +239,11 @@ VIDEO_UPDATE( momoko ) px = 248-x; py = y+1; } - drawgfx(bitmap,screen->machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[3], chr, col, !fx,fy, - px,py, - cliprect,TRANSPARENCY_PEN,0); + px,py,0); } @@ -276,12 +273,11 @@ VIDEO_UPDATE( momoko ) px = 248-x*8; py = 255-y; } - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], videoram[(sy>>3)*32+x]*8+dy, col, flip,0, - px,py, - cliprect,TRANSPARENCY_PEN,0); + px,py,0); } } @@ -311,12 +307,11 @@ VIDEO_UPDATE( momoko ) px = 248-(8*x+dx-8); py = 248-(8*y+dy+9); } - drawgfx(bitmap,screen->machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[2], chr, 0, /* color */ flip,flip, /* flip */ - px,py, - cliprect,TRANSPARENCY_PEN,0); + px,py,0); } } } diff --git a/src/mame/video/mouser.c b/src/mame/video/mouser.c index c1e1e4775c8..49a674a6ed2 100644 --- a/src/mame/video/mouser.c +++ b/src/mame/video/mouser.c @@ -87,12 +87,11 @@ VIDEO_UPDATE( mouser ) /* Note: this is _not_ dependant on flipping */ color_offs = offs%32 + ((256 + 8*(offs/32) - spriteram[offs%32])%256)/8*32; - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0], videoram[offs] | (colorram[color_offs]>>5)*256 | ((colorram[color_offs]>>4)&1)*512, colorram[color_offs]%16, flip_screen_x_get(screen->machine),flip_screen_y_get(screen->machine), - 8*sx,scrolled_y_position, - cliprect,TRANSPARENCY_NONE,0); + 8*sx,scrolled_y_position); } /* There seem to be two sets of sprites, each decoded identically */ @@ -119,12 +118,11 @@ VIDEO_UPDATE( mouser ) } if ((spriteram[offs+1]&0x10)>>4) - drawgfx(bitmap,screen->machine->gfx[1+((spriteram[offs+1]&0x20)>>5)], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1+((spriteram[offs+1]&0x20)>>5)], spriteram[offs]&0x3f, spriteram[offs+1]%16, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } /* This is the second set of 8 sprites */ @@ -149,12 +147,11 @@ VIDEO_UPDATE( mouser ) } if ((spriteram[offs+1]&0x10)>>4) - drawgfx(bitmap,screen->machine->gfx[1+((spriteram[offs+1]&0x20)>>5)], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1+((spriteram[offs+1]&0x20)>>5)], spriteram[offs]&0x3f, spriteram[offs+1]%16, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } return 0; diff --git a/src/mame/video/mrdo.c b/src/mame/video/mrdo.c index bc3a3441404..2e0441e397d 100644 --- a/src/mame/video/mrdo.c +++ b/src/mame/video/mrdo.c @@ -241,11 +241,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan { if (spriteram[offs + 1] != 0) { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], spriteram[offs],spriteram[offs + 2] & 0x0f, spriteram[offs + 2] & 0x10,spriteram[offs + 2] & 0x20, - spriteram[offs + 3],256 - spriteram[offs + 1], - cliprect,TRANSPARENCY_PEN,0); + spriteram[offs + 3],256 - spriteram[offs + 1],0); } } } diff --git a/src/mame/video/mrflea.c b/src/mame/video/mrflea.c index e46502c3980..381465b0ec2 100644 --- a/src/mame/video/mrflea.c +++ b/src/mame/video/mrflea.c @@ -47,18 +47,16 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int ypos = source[0]-16+3; int tile_number = source[2]+source[3]*0x100; - drawgfx( bitmap, gfx, + drawgfx_transpen( bitmap, &clip,gfx, tile_number, 0, /* color */ 0,0, /* no flip */ - xpos,ypos, - &clip,TRANSPARENCY_PEN,0 ); - drawgfx( bitmap, gfx, + xpos,ypos,0 ); + drawgfx_transpen( bitmap, &clip,gfx, tile_number, 0, /* color */ 0,0, /* no flip */ - xpos,256+ypos, - &clip,TRANSPARENCY_PEN,0 ); + xpos,256+ypos,0 ); source+=4; } } @@ -75,13 +73,12 @@ static void draw_background(running_machine *machine, bitmap_t *bitmap, const re for( sx=0; sx<256; sx+=8 ){ int tile_number = base+source[0]+source[0x400]*0x100; source++; - drawgfx( bitmap, gfx, + drawgfx_opaque( bitmap, cliprect, + gfx, tile_number, 0, /* color */ 0,0, /* no flip */ - sx,sy, - cliprect, - TRANSPARENCY_NONE,0 ); + sx,sy ); } } } diff --git a/src/mame/video/mrjong.c b/src/mame/video/mrjong.c index 78ab63aaa1b..a4c147ee02e 100644 --- a/src/mame/video/mrjong.c +++ b/src/mame/video/mrjong.c @@ -130,12 +130,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], sprt, color, flipx, flipy, - sx, sy, - cliprect, TRANSPARENCY_PEN, 0); + sx, sy, 0); } } diff --git a/src/mame/video/ms32.c b/src/mame/video/ms32.c index 3d534d59961..9cb7ff7dab4 100644 --- a/src/mame/video/ms32.c +++ b/src/mame/video/ms32.c @@ -281,7 +281,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int tx, ty, sx, sy, flipx, flipy; int xsize, ysize, xzoom, yzoom; - int code, attr, color, size, pri, pri_mask, trans; + int code, attr, color, size, pri, pri_mask; gfx_element *gfx = machine->gfx[0]; UINT32 *source = sprram_top; @@ -335,7 +335,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta yzoom = 0x1000000/yzoom; xzoom = 0x1000000/xzoom; - trans = TRANSPARENCY_PEN; // there are surely also shadows (see gametngk) but how they're enabled we don't know + //trans = TRANSPARENCY_PEN; // there are surely also shadows (see gametngk) but how they're enabled we don't know if (flipscreen) { @@ -363,13 +363,12 @@ if (input_code_pressed(KEYCODE_F) && (pri & 1)) color = rand(); pri_mask = 0xfe; gfx_element_set_source_clip(gfx, tx, xsize, ty, ysize); - pdrawgfxzoom(bitmap, gfx, + pdrawgfxzoom_transpen(bitmap, cliprect, gfx, code, color, flipx, flipy, sx,sy, - cliprect, trans, 0, - xzoom, yzoom, pri_mask); + xzoom, yzoom, priority_bitmap,pri_mask, 0); } /* end sprite loop */ } diff --git a/src/mame/video/msisaac.c b/src/mame/video/msisaac.c index bb09cb8d166..4faeeb72f57 100644 --- a/src/mame/video/msisaac.c +++ b/src/mame/video/msisaac.c @@ -186,55 +186,54 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta switch(attributes&3) { case 0: /* flipx==0 && flipy==0 */ - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,cliprect,gfx, sprite_number+1,color, flipx,flipy, - sx,sy-16,cliprect,TRANSPARENCY_PEN,0 ); - drawgfx(bitmap,gfx, + sx,sy-16,0 ); + drawgfx_transpen(bitmap,cliprect,gfx, sprite_number,color, flipx,flipy, - sx,sy,cliprect,TRANSPARENCY_PEN,0 ); + sx,sy,0 ); break; case 1: /* flipx==1 && flipy==0 */ - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,cliprect,gfx, sprite_number+1,color, flipx,flipy, - sx,sy-16,cliprect,TRANSPARENCY_PEN,0 ); - drawgfx(bitmap,gfx, + sx,sy-16,0 ); + drawgfx_transpen(bitmap,cliprect,gfx, sprite_number,color, flipx,flipy, - sx,sy,cliprect,TRANSPARENCY_PEN,0 ); + sx,sy,0 ); break; case 2: /* flipx==0 && flipy==1 */ - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,cliprect,gfx, sprite_number,color, flipx,flipy, - sx,sy-16,cliprect,TRANSPARENCY_PEN,0 ); - drawgfx(bitmap,gfx, + sx,sy-16,0 ); + drawgfx_transpen(bitmap,cliprect,gfx, sprite_number+1,color, flipx,flipy, - sx,sy,cliprect,TRANSPARENCY_PEN,0 ); + sx,sy,0 ); break; case 3: /* flipx==1 && flipy==1 */ - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,cliprect,gfx, sprite_number,color, flipx,flipy, - sx,sy-16,cliprect,TRANSPARENCY_PEN,0 ); - drawgfx(bitmap,gfx, + sx,sy-16,0 ); + drawgfx_transpen(bitmap,cliprect,gfx, sprite_number+1,color, flipx,flipy, - sx,sy,cliprect,TRANSPARENCY_PEN,0 ); + sx,sy,0 ); break; } } else { - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,cliprect,gfx, sprite_number, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0 ); + sx,sy,0 ); } source -= 4; } diff --git a/src/mame/video/mugsmash.c b/src/mame/video/mugsmash.c index e7793f6a464..c695fd9b974 100644 --- a/src/mame/video/mugsmash.c +++ b/src/mame/video/mugsmash.c @@ -48,15 +48,14 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta xpos -= 28; ypos -= 16; - drawgfx( + drawgfx_transpen( bitmap, + cliprect, gfx, num, colour, flipx,0, - xpos,ypos, - cliprect, - TRANSPARENCY_PEN,0 + xpos,ypos,0 ); source += 0x8; diff --git a/src/mame/video/munchmo.c b/src/mame/video/munchmo.c index 09f5b5547fa..4cb9321d6da 100644 --- a/src/mame/video/munchmo.c +++ b/src/mame/video/munchmo.c @@ -69,13 +69,12 @@ static void draw_status(running_machine *machine, bitmap_t *bitmap, const rectan } for( sy=0; sy<256; sy+=8 ) { - drawgfx( bitmap, gfx, + drawgfx_opaque( bitmap, cliprect, + gfx, *source++, 0, /* color */ 0,0, /* no flip */ - sx,sy, - cliprect, - TRANSPARENCY_NONE, 0 ); + sx,sy ); } } } @@ -101,12 +100,11 @@ static void draw_background(running_machine *machine, bitmap_t *bitmap, const re { for( col=0; col<4; col++ ) { - drawgfx( tmpbitmap,gfx, + drawgfx_opaque( tmpbitmap,0, gfx, rom[col+tile_number*4+row*0x400], mnchmobl_palette_bank, 0,0, /* flip */ - sx+col*8, sy+row*8, - 0, TRANSPARENCY_NONE, 0 ); + sx+col*8, sy+row*8 ); } } } @@ -143,12 +141,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { sx = (sx >> 1) | (tile_number & 0x80); sx = 2 * ((- 32 - scroll - sx) & 0xff) + xadjust; - drawgfx( bitmap, gfx, + drawgfx_transpen( bitmap, cliprect, gfx, 0x7f - (tile_number & 0x7f), color_base - (attributes & 0x03), 0,0, /* no flip */ - sx,sy, - cliprect, TRANSPARENCY_PEN, 7 ); + sx,sy, 7 ); } } } diff --git a/src/mame/video/mustache.c b/src/mame/video/mustache.c index b086aea6ad5..d6ebb163595 100644 --- a/src/mame/video/mustache.c +++ b/src/mame/video/mustache.c @@ -127,12 +127,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta sy = 240 - sy; } - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,&clip,gfx, code, color, flip_screen_get(machine),flip_screen_get(machine), - sx,sy, - &clip,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/mystston.c b/src/mame/video/mystston.c index a6e2e7b74e8..1967ad4b5fb 100644 --- a/src/mame/video/mystston.c +++ b/src/mame/video/mystston.c @@ -179,8 +179,9 @@ static TILE_GET_INFO( get_fg_tile_info ) * *************************************/ -static void draw_sprites(mystston_state *state, gfx_element **gfx, bitmap_t *bitmap, const rectangle *cliprect, int flip) +static void draw_sprites(bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx, int flip) { + mystston_state *state = (mystston_state *)gfx->machine->driver_data; int offs; for (offs = 0; offs < 0x60; offs += 4) @@ -204,7 +205,7 @@ static void draw_sprites(mystston_state *state, gfx_element **gfx, bitmap_t *bit flipy = !flipy; } - drawgfx(bitmap, gfx[2], code, color, flipx, flipy, x, y, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, gfx, code, color, flipx, flipy, x, y, 0); } } } @@ -266,7 +267,7 @@ static VIDEO_UPDATE( mystston ) tilemap_set_flip(ALL_TILEMAPS, flip ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); tilemap_draw(bitmap, cliprect, state->bg_tilemap, 0, 0); - draw_sprites(state, screen->machine->gfx, bitmap, cliprect, flip); + draw_sprites(bitmap, cliprect, screen->machine->gfx[2], flip); tilemap_draw(bitmap, cliprect, state->fg_tilemap, 0, 0); return 0; diff --git a/src/mame/video/namcos22.c b/src/mame/video/namcos22.c index 6580c107f8e..05cacdba25d 100644 --- a/src/mame/video/namcos22.c +++ b/src/mame/video/namcos22.c @@ -556,9 +556,8 @@ static void renderscanline_sprite(void *destbase, INT32 scanline, const poly_ext static void mydrawgfxzoom( - bitmap_t *dest_bmp,const gfx_element *gfx, + bitmap_t *dest_bmp,const rectangle *clip,const gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, - const rectangle *clip, int scalex, int scaley, int z, int prioverchar, int alpha ) { int sprite_screen_height = (scaley*gfx->height+0x8000)>>16; @@ -650,7 +649,7 @@ ApplyGamma( running_machine *machine, bitmap_t *bitmap ) } /* ApplyGamma */ static void -poly3d_Draw3dSprite( bitmap_t *bitmap, gfx_element *gfx, int tileNumber, int color, int sx, int sy, int width, int height, int translucency, int zc, UINT32 pri ) +poly3d_Draw3dSprite( bitmap_t *bitmap, const gfx_element *gfx, int tileNumber, int color, int sx, int sy, int width, int height, int translucency, int zc, UINT32 pri ) { int flipx = 0; int flipy = 0; @@ -661,12 +660,12 @@ poly3d_Draw3dSprite( bitmap_t *bitmap, gfx_element *gfx, int tileNumber, int col clip.max_y = 480-1; mydrawgfxzoom( bitmap, + &clip, gfx, tileNumber, color, flipx, flipy, sx, sy, - &clip, (width<<16)/32, (height<<16)/32, zc, pri, 0xff - translucency ); diff --git a/src/mame/video/namcos86.c b/src/mame/video/namcos86.c index 09a18cc5ec3..bb0eced2fe2 100644 --- a/src/mame/video/namcos86.c +++ b/src/mame/video/namcos86.c @@ -310,13 +310,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta sy++; /* sprites are buffered and delayed by one scanline */ gfx_element_set_source_clip(gfx, tx, sizex, ty, sizey); - pdrawgfx( bitmap, gfx, + pdrawgfx_transpen( bitmap, cliprect,gfx, sprite, color, flipx,flipy, sx & 0x1ff, ((sy + 16) & 0xff) - 16, - cliprect,TRANSPARENCY_PEN,0xf, pri_mask); + priority_bitmap, pri_mask,0xf); source -= 0x10; } diff --git a/src/mame/video/naughtyb.c b/src/mame/video/naughtyb.c index 6130853185a..1bf90b51e65 100644 --- a/src/mame/video/naughtyb.c +++ b/src/mame/video/naughtyb.c @@ -223,19 +223,17 @@ VIDEO_UPDATE( naughtyb ) } } - drawgfx(tmpbitmap,screen->machine->gfx[0], + drawgfx_opaque(tmpbitmap,0,screen->machine->gfx[0], naughtyb_videoram2[offs] + 256 * bankreg, (naughtyb_videoram2[offs] >> 5) + 8 * palreg, naughtyb_cocktail,naughtyb_cocktail, - 8*sx,8*sy, - 0,TRANSPARENCY_NONE,0); + 8*sx,8*sy); - drawgfx(tmpbitmap,screen->machine->gfx[1], + drawgfx_transpen(tmpbitmap,0,screen->machine->gfx[1], videoram[offs] + 256*bankreg, (videoram[offs] >> 5) + 8 * palreg, naughtyb_cocktail,naughtyb_cocktail, - 8*sx,8*sy, - 0,TRANSPARENCY_PEN,0); + 8*sx,8*sy,0); } // copy the temporary bitmap to the screen diff --git a/src/mame/video/nemesis.c b/src/mame/video/nemesis.c index 57a356e2465..f4396105239 100644 --- a/src/mame/video/nemesis.c +++ b/src/mame/video/nemesis.c @@ -396,14 +396,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipx = !flipx; flipy = !flipy; } - pdrawgfxzoom(bitmap,machine->gfx[char_type], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[char_type], code, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PEN,0, zoom,zoom, - 0xffcc ); + priority_bitmap,0xffcc,0 ); } } /* if sprite */ } /* for loop */ diff --git a/src/mame/video/ninjakd2.c b/src/mame/video/ninjakd2.c index 113f1911cfe..f16019b0a7d 100644 --- a/src/mame/video/ninjakd2.c +++ b/src/mame/video/ninjakd2.c @@ -410,12 +410,11 @@ static void draw_sprites(running_machine* machine, bitmap_t* bitmap) { int const tile = code ^ (x << big_xshift) ^ (y << big_yshift); - drawgfx(bitmap, gfx, + drawgfx_transpen(bitmap, 0, gfx, tile, color, flipx,flipy, - sx + 16*x, sy + 16*y, - 0, TRANSPARENCY_PEN, 15); + sx + 16*x, sy + 16*y, 15); ++sprites_drawn; if (sprites_drawn >= 96) diff --git a/src/mame/video/ninjaw.c b/src/mame/video/ninjaw.c index 29776852773..64991830524 100644 --- a/src/mame/video/ninjaw.c +++ b/src/mame/video/ninjaw.c @@ -128,12 +128,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan sprite_ptr->x = curx; sprite_ptr->y = cury; - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, - sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0); + sprite_ptr->x,sprite_ptr->y,0); } #ifdef MAME_DEBUG diff --git a/src/mame/video/nmk16.c b/src/mame/video/nmk16.c index 5b0c2e7feaf..863fe33eef1 100644 --- a/src/mame/video/nmk16.c +++ b/src/mame/video/nmk16.c @@ -405,12 +405,11 @@ static void nmk16_draw_sprites(running_machine *machine, bitmap_t *bitmap, const xx = w; do { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code, color, flip_screen_get(machine), flip_screen_get(machine), - ((x + 16) & 0x1ff) - 16,sy & 0x1ff, - cliprect,TRANSPARENCY_PEN,15); + ((x + 16) & 0x1ff) - 16,sy & 0x1ff,15); code++; x += delta; } while (--xx >= 0); @@ -465,12 +464,11 @@ static void nmk16_draw_sprites_flipsupported(running_machine *machine, bitmap_t xx = w; do { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code, color, flipx, flipy, - ((x + 16) & 0x1ff) - 16,sy & 0x1ff, - cliprect,TRANSPARENCY_PEN,15); + ((x + 16) & 0x1ff) - 16,sy & 0x1ff,15); code++; x +=delta * ( flipx?-1:1 ); @@ -627,22 +625,20 @@ VIDEO_UPDATE( bioship ) int numtile = data&0xfff; int color = (data&0xf000)>>12; - drawgfx(background_bitmap,screen->machine->gfx[3], + drawgfx_opaque(background_bitmap,0,screen->machine->gfx[3], numtile, color, 0,0, /* no flip */ - 16*sx,16*sy, - 0,TRANSPARENCY_NONE,0); + 16*sx,16*sy); data = tilerom[offs+0x1000+bank]; numtile = data&0xfff; color = (data&0xf000)>>12; - drawgfx(background_bitmap,screen->machine->gfx[3], + drawgfx_opaque(background_bitmap,0,screen->machine->gfx[3], numtile, color, 0,0, /* no flip */ - 16*sx,(16*sy)+256, - 0,TRANSPARENCY_NONE,0); + 16*sx,(16*sy)+256); sy++; if (sy==16) {sy=0; sx++;} diff --git a/src/mame/video/nova2001.c b/src/mame/video/nova2001.c index 8fd9a55661c..e9c3a8a4283 100644 --- a/src/mame/video/nova2001.c +++ b/src/mame/video/nova2001.c @@ -285,12 +285,11 @@ static void nova2001_draw_sprites(running_machine *machine, bitmap_t *bitmap, co flipy = !flipy; } - drawgfx(bitmap, gfx, + drawgfx_transpen(bitmap, cliprect, gfx, tile, color, flipx, flipy, - sx, sy, - cliprect, TRANSPARENCY_PEN, 0); + sx, sy, 0); } } @@ -322,20 +321,18 @@ static void pkunwar_draw_sprites(running_machine *machine, bitmap_t *bitmap, con flipy = !flipy; } - drawgfx(bitmap, gfx, + drawgfx_transpen(bitmap, cliprect, gfx, tile, color, flipx, flipy, - sx, sy, - cliprect, TRANSPARENCY_PEN, 0); + sx, sy, 0); // there's no X MSB, so draw with wraparound (fixes title screen) - drawgfx(bitmap, gfx, + drawgfx_transpen(bitmap, cliprect, gfx, tile, color, flipx, flipy, - sx - 256, sy, - cliprect, TRANSPARENCY_PEN, 0); + sx - 256, sy, 0); } } diff --git a/src/mame/video/nycaptor.c b/src/mame/video/nycaptor.c index 1addf724ee4..0ff48e2bd35 100644 --- a/src/mame/video/nycaptor.c +++ b/src/mame/video/nycaptor.c @@ -166,22 +166,20 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipx = ((nycaptor_spriteram[offs+1]&0x40)>>6); flipy = ((nycaptor_spriteram[offs+1]&0x80)>>7); - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, pal, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); if(nycaptor_spriteram[offs+3]>240) { sx = (nycaptor_spriteram[offs+3]-256); - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, pal, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,15); + sx,sy,15); } } } diff --git a/src/mame/video/ohmygod.c b/src/mame/video/ohmygod.c index 748093295ab..880c935e3ff 100644 --- a/src/mame/video/ohmygod.c +++ b/src/mame/video/ohmygod.c @@ -97,12 +97,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan if (sy >= 32768) sy -= 65536; flipx = sr[offs+3] & 0x8000; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,0, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/oneshot.c b/src/mame/video/oneshot.c index db6baa6f4bf..70090945703 100644 --- a/src/mame/video/oneshot.c +++ b/src/mame/video/oneshot.c @@ -129,26 +129,24 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta for (blocky = 0; blocky<ysize;blocky++) { - drawgfx( + drawgfx_transpen( bitmap, + cliprect, gfx, num+(blocky*xsize)+blockx, 1, 0,0, - xpos+blockx*8,ypos+blocky*8, - cliprect, - TRANSPARENCY_PEN,0 + xpos+blockx*8,ypos+blocky*8,0 ); - drawgfx( + drawgfx_transpen( bitmap, + cliprect, gfx, num+(blocky*xsize)+blockx, 1, 0,0, - xpos+blockx*8-0x200,ypos+blocky*8, - cliprect, - TRANSPARENCY_PEN,0 + xpos+blockx*8-0x200,ypos+blocky*8,0 ); } } diff --git a/src/mame/video/orbit.c b/src/mame/video/orbit.c index c98fbb8064a..3febf0ead94 100644 --- a/src/mame/video/orbit.c +++ b/src/mame/video/orbit.c @@ -78,8 +78,8 @@ static void draw_sprites(running_machine *machine, bitmap_t* bitmap, const recta hpos <<= 1; vpos <<= 1; - drawgfxzoom(bitmap, machine->gfx[layout], code, 0, flip_x, flip_y, - hpos, vpos, cliprect, TRANSPARENCY_PEN, 0, zoom_x, zoom_y); + drawgfxzoom_transpen(bitmap, cliprect, machine->gfx[layout], code, 0, flip_x, flip_y, + hpos, vpos, zoom_x, zoom_y, 0); } } diff --git a/src/mame/video/othldrby.c b/src/mame/video/othldrby.c index 47a80a00abf..9dd42e801dd 100644 --- a/src/mame/video/othldrby.c +++ b/src/mame/video/othldrby.c @@ -165,12 +165,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan { for (x = 0;x < sizex;x++) { - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code + x + sizex * y, color, flipx,flipy, - (sx + (flipx ? (-8*(x+1)+1) : 8*x) - vreg[6]+44) & 0x1ff,(sy + (flipy ? (-8*(y+1)+1) : 8*y) - vreg[7]-9) & 0x1ff, - cliprect,TRANSPARENCY_PEN,0); + (sx + (flipx ? (-8*(x+1)+1) : 8*x) - vreg[6]+44) & 0x1ff,(sy + (flipy ? (-8*(y+1)+1) : 8*y) - vreg[7]-9) & 0x1ff,0); } } } diff --git a/src/mame/video/othunder.c b/src/mame/video/othunder.c index 9a3732e387a..3966a2b721f 100644 --- a/src/mame/video/othunder.c +++ b/src/mame/video/othunder.c @@ -184,13 +184,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan } else { - drawgfxzoom(bitmap,machine->gfx[0], + drawgfxzoom_transpen(bitmap,cliprect,machine->gfx[0], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0, - sprite_ptr->zoomx,sprite_ptr->zoomy); + sprite_ptr->zoomx,sprite_ptr->zoomy,0); } } @@ -203,14 +202,13 @@ logerror("Sprite number %04x had %02x invalid chunks\n",tilenum,bad_chunks); { sprite_ptr--; - pdrawgfxzoom(bitmap,machine->gfx[0], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[0], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0, sprite_ptr->zoomx,sprite_ptr->zoomy, - sprite_ptr->primask); + priority_bitmap,sprite_ptr->primask,0); } } diff --git a/src/mame/video/pacland.c b/src/mame/video/pacland.c index c094a292cd4..6133199e329 100644 --- a/src/mame/video/pacland.c +++ b/src/mame/video/pacland.c @@ -323,19 +323,18 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta for (x = 0;x <= sizex;x++) { if (whichmask != 0) - drawgfx(bitmap,machine->gfx[2], + drawgfx_transmask(bitmap,cliprect,machine->gfx[2], sprite + gfx_offs[y ^ (sizey * flipy)][x ^ (sizex * flipx)], color, flipx,flipy, - sx + 16*x,sy + 16*y, - cliprect,TRANSPARENCY_PENS,transmask[whichmask][color]); + sx + 16*x,sy + 16*y,transmask[whichmask][color]); else - pdrawgfx(bitmap,machine->gfx[2], + pdrawgfx_transmask(bitmap,cliprect,machine->gfx[2], sprite + gfx_offs[y ^ (sizey * flipy)][x ^ (sizex * flipx)], color, flipx,flipy, sx + 16*x,sy + 16*y, - cliprect,TRANSPARENCY_PENS,transmask[whichmask][color],0); + priority_bitmap,0,transmask[whichmask][color]); } } } diff --git a/src/mame/video/pacman.c b/src/mame/video/pacman.c index e9304bdc0b9..435659b5a12 100644 --- a/src/mame/video/pacman.c +++ b/src/mame/video/pacman.c @@ -240,21 +240,19 @@ VIDEO_UPDATE( pacman ) sy = spriteram_2[offs] - 31; color = ( spriteram[offs + 1] & 0x1f ) | (colortablebank << 5) | (palettebank << 6 ); - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transmask(bitmap,&spriteclip,screen->machine->gfx[1], ( spriteram[offs] >> 2 ) | (spritebank << 6), color, spriteram[offs] & 1,spriteram[offs] & 2, sx,sy, - &spriteclip,TRANSPARENCY_PENS, colortable_get_transpen_mask(screen->machine->colortable, screen->machine->gfx[1], color & 0x3f, 0)); /* also plot the sprite with wraparound (tunnel in Crush Roller) */ - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transmask(bitmap,&spriteclip,screen->machine->gfx[1], ( spriteram[offs] >> 2 ) | (spritebank << 6), color, spriteram[offs] & 1,spriteram[offs] & 2, sx - 256,sy, - &spriteclip,TRANSPARENCY_PENS, colortable_get_transpen_mask(screen->machine->colortable, screen->machine->gfx[1], color & 0x3f, 0)); } /* In the Pac Man based games (NOT Pengo) the first two sprites must be offset */ @@ -268,21 +266,19 @@ VIDEO_UPDATE( pacman ) sy = spriteram_2[offs] - 31; color = ( spriteram[offs + 1] & 0x1f ) | (colortablebank << 5) | (palettebank << 6 ); - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transmask(bitmap,&spriteclip,screen->machine->gfx[1], ( spriteram[offs] >> 2 ) | (spritebank << 6), color, spriteram[offs] & 1,spriteram[offs] & 2, sx,sy + xoffsethack, - &spriteclip,TRANSPARENCY_PENS, colortable_get_transpen_mask(screen->machine->colortable, screen->machine->gfx[1], color & 0x3f, 0)); /* also plot the sprite with wraparound (tunnel in Crush Roller) */ - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transmask(bitmap,&spriteclip,screen->machine->gfx[1], ( spriteram[offs] >> 2 ) | (spritebank << 6), color, spriteram[offs] & 2,spriteram[offs] & 1, sx - 256,sy + xoffsethack, - &spriteclip,TRANSPARENCY_PENS, colortable_get_transpen_mask(screen->machine->colortable, screen->machine->gfx[1], color & 0x3f, 0)); } } @@ -410,12 +406,11 @@ VIDEO_UPDATE( s2650games ) color = spriteram[offs + 1] & 0x1f; /* TODO: ?? */ - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transmask(bitmap,cliprect,screen->machine->gfx[1], (spriteram[offs] >> 2) | ((s2650games_spriteram[offs] & 3) << 6), color, spriteram[offs] & 1,spriteram[offs] & 2, sx,sy, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(screen->machine->colortable, screen->machine->gfx[1], color & 0x3f, 0)); } /* In the Pac Man based games (NOT Pengo) the first two sprites must be offset */ @@ -431,12 +426,11 @@ VIDEO_UPDATE( s2650games ) color = spriteram[offs + 1] & 0x1f; /* TODO: ?? */ - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transmask(bitmap,cliprect,screen->machine->gfx[1], (spriteram[offs] >> 2) | ((s2650games_spriteram[offs] & 3)<<6), color, spriteram[offs] & 1,spriteram[offs] & 2, sx,sy + xoffsethack, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(screen->machine->colortable, screen->machine->gfx[1], color & 0x3f, 0)); } return 0; diff --git a/src/mame/video/pandoras.c b/src/mame/video/pandoras.c index 5ae7f7ff54f..7c53296285d 100644 --- a/src/mame/video/pandoras.c +++ b/src/mame/video/pandoras.c @@ -157,12 +157,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int nflipx = sr[offs + 3] & 0x40; int nflipy = sr[offs + 3] & 0x80; - drawgfx(bitmap,machine->gfx[0], + drawgfx_transmask(bitmap,cliprect,machine->gfx[0], sr[offs + 2], color, !nflipx,!nflipy, sx,sy, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[0], color, 0)); } } diff --git a/src/mame/video/paradise.c b/src/mame/video/paradise.c index 0df0626890a..95a345eb4d9 100644 --- a/src/mame/video/paradise.c +++ b/src/mame/video/paradise.c @@ -195,27 +195,24 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan if (flip_screen_get(machine)) { x = 0xf0 - x; flipx = !flipx; y = 0xf0 - y; flipy = !flipy; } - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code + (attr << 8), 0, flipx, flipy, - x,y, - cliprect,TRANSPARENCY_PEN, 0xff ); + x,y, 0xff ); /* wrap around x */ - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code + (attr << 8), 0, flipx, flipy, - x - 256,y, - cliprect,TRANSPARENCY_PEN, 0xff ); + x - 256,y, 0xff ); - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code + (attr << 8), 0, flipx, flipy, - x + 256,y, - cliprect,TRANSPARENCY_PEN, 0xff ); + x + 256,y, 0xff ); } } diff --git a/src/mame/video/pbaction.c b/src/mame/video/pbaction.c index b7562e5c3c3..bbc2ec2fb1c 100644 --- a/src/mame/video/pbaction.c +++ b/src/mame/video/pbaction.c @@ -116,12 +116,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,machine->gfx[(spriteram[offs] & 0x80) ? 3 : 2], /* normal or double size */ + drawgfx_transpen(bitmap,cliprect,machine->gfx[(spriteram[offs] & 0x80) ? 3 : 2], /* normal or double size */ spriteram[offs], spriteram[offs + 1] & 0x0f, flipx,flipy, - sx + (flip_screen_get(machine) ? scroll : -scroll), sy, - cliprect,TRANSPARENCY_PEN,0); + sx + (flip_screen_get(machine) ? scroll : -scroll), sy,0); } } diff --git a/src/mame/video/pcktgal.c b/src/mame/video/pcktgal.c index 8107ee827b5..a3c005e590d 100644 --- a/src/mame/video/pcktgal.c +++ b/src/mame/video/pcktgal.c @@ -82,12 +82,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (flipy) flipy=0; else flipy=1; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], spriteram[offs+3] + ((spriteram[offs+1] & 1) << 8), (spriteram[offs+1] & 0x70) >> 4, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } } diff --git a/src/mame/video/pingpong.c b/src/mame/video/pingpong.c index 0739d961d4f..c034f05b5d2 100644 --- a/src/mame/video/pingpong.c +++ b/src/mame/video/pingpong.c @@ -137,12 +137,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta color = spriteram[offs] & 0x1f; schar = spriteram[offs + 2] & 0x7f; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transmask(bitmap,&spritevisiblearea,machine->gfx[1], schar, color, flipx,flipy, sx,sy, - &spritevisiblearea,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); } } diff --git a/src/mame/video/pirates.c b/src/mame/video/pirates.c index 0eb5a680572..0c174dac776 100644 --- a/src/mame/video/pirates.c +++ b/src/mame/video/pirates.c @@ -94,12 +94,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta ypos = 0xf2 - ypos; - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,cliprect,gfx, code, color, flipx,flipy, - xpos,ypos, - cliprect,TRANSPARENCY_PEN,0); + xpos,ypos,0); source+=4; } diff --git a/src/mame/video/pitnrun.c b/src/mame/video/pitnrun.c index 7e3743c3594..3759aabc6fd 100644 --- a/src/mame/video/pitnrun.c +++ b/src/mame/video/pitnrun.c @@ -202,12 +202,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], (spriteram[offs+1]&0x3f)+((spriteram[offs+2]&0x80)>>1)+((spriteram[offs+2]&0x40)<<1), pal, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/pktgaldx.c b/src/mame/video/pktgaldx.c index 937de5182bf..045ae00d045 100644 --- a/src/mame/video/pktgaldx.c +++ b/src/mame/video/pktgaldx.c @@ -58,12 +58,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan while (multi >= 0) { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x,y + mult * multi,0); multi--; } @@ -123,7 +122,7 @@ VIDEO_UPDATE(pktgaldb) y&=0x1ff; y-=8; - drawgfx(bitmap,screen->machine->gfx[0],tileno^0x1000,colour,0,0,x,y,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0],tileno^0x1000,colour,0,0,x,y,0); } for (offset = 0x1600/2;offset<0x2000/2;offset+=8) @@ -137,7 +136,7 @@ VIDEO_UPDATE(pktgaldb) y&=0x1ff; y-=8; - drawgfx(bitmap,screen->machine->gfx[0],tileno^0x4000,colour,0,0,x,y,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0],tileno^0x4000,colour,0,0,x,y,0); } for (offset = 0x2000/2;offset<0x4000/2;offset+=8) @@ -151,7 +150,7 @@ VIDEO_UPDATE(pktgaldb) y&=0x1ff; y-=8; - drawgfx(bitmap,screen->machine->gfx[0],tileno^0x3000,colour,0,0,x,y,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0],tileno^0x3000,colour,0,0,x,y,0); } return 0; diff --git a/src/mame/video/playmark.c b/src/mame/video/playmark.c index 91251f20f59..c28311a3b6a 100644 --- a/src/mame/video/playmark.c +++ b/src/mame/video/playmark.c @@ -361,12 +361,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan if(!pri && (color & 0x0c) == 0x0c) pri = 2; - pdrawgfx(bitmap,machine->gfx[0], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[0], code, color, flipx,0, sx + xoffset,sy + yoffset, - cliprect,TRANSPARENCY_PEN,0,pri_masks[pri]); + priority_bitmap,pri_masks[pri],0); } } diff --git a/src/mame/video/pokechmp.c b/src/mame/video/pokechmp.c index cf2b151f8c6..2f0e0822806 100644 --- a/src/mame/video/pokechmp.c +++ b/src/mame/video/pokechmp.c @@ -56,12 +56,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (flipy) flipy=0; else flipy=1; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], spriteram[offs+3] + ((spriteram[offs+1] & 1) << 8), (spriteram[offs+1] & 0x70) >> 4, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } } diff --git a/src/mame/video/polyplay.c b/src/mame/video/polyplay.c index 9e75bee06cd..56ee3f61fcd 100644 --- a/src/mame/video/polyplay.c +++ b/src/mame/video/polyplay.c @@ -60,9 +60,8 @@ VIDEO_UPDATE( polyplay ) int sy = offs >> 6 << 3; UINT8 code = videoram[offs]; - drawgfx(bitmap,screen->machine->gfx[(code >> 7) & 0x01], - code, 0, 0, 0, sx, sy, - cliprect, TRANSPARENCY_NONE, 0); + drawgfx_opaque(bitmap,cliprect, screen->machine->gfx[(code >> 7) & 0x01], + code, 0, 0, 0, sx, sy); } return 0; diff --git a/src/mame/video/poolshrk.c b/src/mame/video/poolshrk.c index 737c8651fd8..d2f6f82f8a2 100644 --- a/src/mame/video/poolshrk.c +++ b/src/mame/video/poolshrk.c @@ -44,8 +44,8 @@ VIDEO_UPDATE( poolshrk ) int hpos = poolshrk_hpos_ram[i]; int vpos = poolshrk_vpos_ram[i]; - drawgfx(bitmap, screen->machine->gfx[0], i, (i == 0) ? 0 : 1, 0, 0, - 248 - hpos, vpos - 15, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[0], i, (i == 0) ? 0 : 1, 0, 0, + 248 - hpos, vpos - 15, 0); } /* draw playfield */ diff --git a/src/mame/video/pooyan.c b/src/mame/video/pooyan.c index 920ff2bc54a..ad9b0a7b0ff 100644 --- a/src/mame/video/pooyan.c +++ b/src/mame/video/pooyan.c @@ -172,13 +172,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int flipx = ~spriteram_2[offs] & 0x40; int flipy = spriteram_2[offs] & 0x80; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transmask(bitmap,cliprect, + machine->gfx[1], code, color, flipx, flipy, sx, sy, - cliprect, - TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); } } diff --git a/src/mame/video/popeye.c b/src/mame/video/popeye.c index a4ff60fcc60..c6f6e3bfa6c 100644 --- a/src/mame/video/popeye.c +++ b/src/mame/video/popeye.c @@ -357,12 +357,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta } if (spriteram[offs] != 0) - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code ^ 0x1ff, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/popper.c b/src/mame/video/popper.c index e493273de10..0c9ab8294f7 100644 --- a/src/mame/video/popper.c +++ b/src/mame/video/popper.c @@ -226,12 +226,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], popper_spriteram[offs+1], (popper_spriteram[offs+2]&0x0f), flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } } diff --git a/src/mame/video/portrait.c b/src/mame/video/portrait.c index 4cd1351c004..1d8290dde11 100644 --- a/src/mame/video/portrait.c +++ b/src/mame/video/portrait.c @@ -137,11 +137,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta } - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], tilenum,color, 0,fy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); source += 0x10; } diff --git a/src/mame/video/powerins.c b/src/mame/video/powerins.c index f273413dad8..3a1391effaa 100644 --- a/src/mame/video/powerins.c +++ b/src/mame/video/powerins.c @@ -311,13 +311,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan { for (y = 0 ; y < dimy ; y++) { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code, color, flipx, flipy, sx + x*16, - sy + y*16, - cliprect,TRANSPARENCY_PEN,15); + sy + y*16,15); code += inc; } diff --git a/src/mame/video/prehisle.c b/src/mame/video/prehisle.c index 93e0e5b89de..7fbd11e48a8 100644 --- a/src/mame/video/prehisle.c +++ b/src/mame/video/prehisle.c @@ -137,8 +137,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if ((foreground && priority) || (!foreground && !priority)) { - drawgfx(bitmap, machine->gfx[3], code, color, flipx, flipy, sx, sy, - cliprect, TRANSPARENCY_PEN, 15); + drawgfx_transpen(bitmap, cliprect, machine->gfx[3], code, color, flipx, flipy, sx, sy, 15); } } } diff --git a/src/mame/video/psikyo.c b/src/mame/video/psikyo.c index cd173c32ee4..550b3eaeecb 100644 --- a/src/mame/video/psikyo.c +++ b/src/mame/video/psikyo.c @@ -380,22 +380,21 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int addr = (code*2) & (TILES_LEN-1); if (zoomx == 32 && zoomy == 32) - pdrawgfx(bitmap,machine->gfx[0], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[0], TILES[addr+1] * 256 + TILES[addr], attr >> 8, flipx, flipy, x + dx * 16, y + dy * 16, - cliprect,TRANSPARENCY_PEN,trans_pen, - pri[(attr & 0xc0) >> 6]); + priority_bitmap, + pri[(attr & 0xc0) >> 6],trans_pen); else - pdrawgfxzoom(bitmap,machine->gfx[0], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[0], TILES[addr+1] * 256 + TILES[addr], attr >> 8, flipx, flipy, x + (dx * zoomx) / 2, y + (dy * zoomy) / 2, - cliprect,TRANSPARENCY_PEN,trans_pen, zoomx << 11,zoomy << 11, - pri[(attr & 0xc0) >> 6]); + priority_bitmap,pri[(attr & 0xc0) >> 6],trans_pen); code++; } diff --git a/src/mame/video/psikyo4.c b/src/mame/video/psikyo4.c index d32925de32f..f3f024650ad 100644 --- a/src/mame/video/psikyo4.c +++ b/src/mame/video/psikyo4.c @@ -112,7 +112,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta for (j = ystart; j != yend; j += yinc) { for (i = xstart; i != xend; i += xinc) { - drawgfx(bitmap,gfx,tnum+loopnum,colr,flipx,flipy,xpos+16*i,ypos+16*j,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,tnum+loopnum,colr,flipx,flipy,xpos+16*i,ypos+16*j,0); loopnum++; } } diff --git a/src/mame/video/psikyosh.c b/src/mame/video/psikyosh.c index a700f6b1728..c303f2fc271 100644 --- a/src/mame/video/psikyosh.c +++ b/src/mame/video/psikyosh.c @@ -342,7 +342,7 @@ static void draw_bglayerscroll(running_machine *machine, int layer, bitmap_t *bi tileno = (psikyosh_bgram[(bank*0x800)/4 + offs - 0x4000/4] & 0x0007ffff); /* seems to take into account spriteram, hence -0x4000 */ colour = (psikyosh_bgram[(bank*0x800)/4 + offs - 0x4000/4] & 0xff000000) >> 24; -// drawgfx(zoom_bitmap,gfx,tileno,colour,0,0,(16*sx)&0x1ff,((16*sy)&(width-1)),NULL,TRANSPARENCY_PEN,0); +// drawgfx_transpen(zoom_bitmap,NULL,gfx,tileno,colour,0,0,(16*sx)&0x1ff,((16*sy)&(width-1)),0); drawgfx_alphatable(bitmap,cliprect,gfx,tileno,colour,0,0,(16*sx+scrollx)&0x1ff,((16*sy+scrolly)&(width-1)),alpha); /* normal */ if(scrollx) @@ -421,10 +421,10 @@ static void draw_background(running_machine *machine, bitmap_t *bitmap, const re /* sx and sy is top-left of entire sprite regardless of flip */ /* Note that Level 5-4 of sbomberb boss is perfect! (Alpha blended zoomed) as well as S1945II logo */ /* pixel is only plotted if z is >= priority_buffer[y][x] */ -static void psikyosh_drawgfxzoom( running_machine *machine, - bitmap_t *dest_bmp,const gfx_element *gfx, +static void psikyosh_drawgfxzoom( + bitmap_t *dest_bmp,const rectangle *clip,const gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,int offsx,int offsy, - const rectangle *clip,int alpha, + int alpha, int zoomx, int zoomy, int wide, int high, UINT32 z) { rectangle myclip; /* Clip to screen boundaries */ @@ -471,7 +471,7 @@ static void psikyosh_drawgfxzoom( running_machine *machine, { for (xtile = xstart; xtile != xend; xtile += xinc ) { - const pen_t *pal = &machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; + const pen_t *pal = &gfx->machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; const UINT8 *code_base = gfx_element_get_data(gfx, (code + code_offset++) % gfx->total_elements); int x_index_base, y_index, sx, sy, ex, ey; @@ -735,7 +735,7 @@ static void psikyosh_drawgfxzoom( running_machine *machine, /* Start drawing */ if( gfx ) { - const pen_t *pal = &machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; + const pen_t *pal = &gfx->machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; int sprite_screen_height = ((high*gfx->height*(0x400*0x400))/zoomy + 0x200)>>10; /* Round up to nearest pixel */ int sprite_screen_width = ((wide*gfx->width*(0x400*0x400))/zoomx + 0x200)>>10; @@ -1046,7 +1046,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta /* start drawing */ if( zoom_table[BYTE_XOR_BE(zoomy)] && zoom_table[BYTE_XOR_BE(zoomx)] ) /* Avoid division-by-zero when table contains 0 (Uninitialised/Bug) */ { - psikyosh_drawgfxzoom(machine, bitmap,gfx,tnum,colr,flpx,flpy,xpos,ypos,cliprect,alpha, + psikyosh_drawgfxzoom(bitmap,cliprect,gfx,tnum,colr,flpx,flpy,xpos,ypos,alpha, (UINT32)zoom_table[BYTE_XOR_BE(zoomx)], (UINT32)zoom_table[BYTE_XOR_BE(zoomy)], wide, high, listcntr); #if 0 diff --git a/src/mame/video/psychic5.c b/src/mame/video/psychic5.c index cdb2171fce2..108e3806801 100644 --- a/src/mame/video/psychic5.c +++ b/src/mame/video/psychic5.c @@ -320,7 +320,7 @@ VIDEO_RESET( bombsa ) Screen refresh ***************************************************************************/ -#define DRAW_SPRITE(code, sx, sy) jal_blend_drawgfx(machine, bitmap, machine->gfx[0], code, color, flipx, flipy, sx, sy, cliprect, TRANSPARENCY_PEN, 15); +#define DRAW_SPRITE(code, sx, sy) jal_blend_drawgfx(bitmap, cliprect, machine->gfx[0], code, color, flipx, flipy, sx, sy, TRANSPARENCY_PEN, 15); static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) { diff --git a/src/mame/video/pushman.c b/src/mame/video/pushman.c index 9879e8ff671..c1cbf595e04 100644 --- a/src/mame/video/pushman.c +++ b/src/mame/video/pushman.c @@ -107,10 +107,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite, - color,flipx,flipy,x,y, - cliprect,TRANSPARENCY_PEN,15); + color,flipx,flipy,x,y,15); } } diff --git a/src/mame/video/quasar.c b/src/mame/video/quasar.c index 8418fab59c4..f55b87e06f0 100644 --- a/src/mame/video/quasar.c +++ b/src/mame/video/quasar.c @@ -139,24 +139,22 @@ VIDEO_UPDATE( quasar ) /* Main Screen */ - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], code, cvs_color_ram[offs] & 0x3f, 0,0, - x,y, - cliprect,TRANSPARENCY_PEN,0); + x,y,0); /* background for Collision Detection (it can only hit certain items) */ if((cvs_color_ram[offs] & 7) == 0) { - drawgfx(cvs_collision_background,screen->machine->gfx[0], + drawgfx_opaque(cvs_collision_background,cliprect,screen->machine->gfx[0], code, 64, 0,0, - x,y, - cliprect,TRANSPARENCY_NONE,0); + x,y); } } diff --git a/src/mame/video/quizdna.c b/src/mame/video/quizdna.c index 32139b849b3..71b67b66309 100644 --- a/src/mame/video/quizdna.c +++ b/src/mame/video/quizdna.c @@ -181,12 +181,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { y &= 0x1ff; - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code ^ i, col, fx,fy, - x,y, - cliprect,TRANSPARENCY_PEN,0); + x,y,0); y += dy; } diff --git a/src/mame/video/raiden.c b/src/mame/video/raiden.c index faa2e1d02ed..2d77c3e3ea3 100644 --- a/src/mame/video/raiden.c +++ b/src/mame/video/raiden.c @@ -137,10 +137,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan if (fy) fy=0; else fy=1; } - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], sprite, - color,fx,fy,x,y, - cliprect,TRANSPARENCY_PEN,15); + color,fx,fy,x,y,15); } } diff --git a/src/mame/video/rallyx.c b/src/mame/video/rallyx.c index a719d75a809..d7a7753dcce 100644 --- a/src/mame/video/rallyx.c +++ b/src/mame/video/rallyx.c @@ -543,14 +543,13 @@ static void rallyx_draw_sprites(running_machine *machine, bitmap_t *bitmap, cons int flipy = spriteram[offs] & 2; if (flip_screen_get(machine)) sx -= 2*displacement; - pdrawgfx(bitmap,machine->gfx[1], + pdrawgfx_transmask(bitmap,cliprect,machine->gfx[1], (spriteram[offs] & 0xfc) >> 2, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PENS, - colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0), - 0x02); + priority_bitmap,0x02, + colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); } } @@ -565,14 +564,13 @@ static void locomotn_draw_sprites(running_machine *machine, bitmap_t *bitmap, co int color = spriteram_2[offs + 1] & 0x3f; int flip = spriteram[offs] & 2; - pdrawgfx(bitmap,machine->gfx[1], + pdrawgfx_transmask(bitmap,cliprect,machine->gfx[1], ((spriteram[offs] & 0x7c) >> 2) + 0x20*(spriteram[offs] & 0x01) + ((spriteram[offs] & 0x80) >> 1), color, flip,flip, sx,sy, - cliprect,TRANSPARENCY_PENS, - colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0), - 0x02); + priority_bitmap,0x02, + colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); } } diff --git a/src/mame/video/rastan.c b/src/mame/video/rastan.c index a637663cb58..080b56f7240 100644 --- a/src/mame/video/rastan.c +++ b/src/mame/video/rastan.c @@ -198,12 +198,11 @@ VIDEO_UPDATE( jumping ) data1 = spriteram16[offs+3]; color = (spriteram16[offs+4] & 0x0f) | sprite_colbank; - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], tile, color, data1 & 0x40, data1 & 0x80, - sx,sy+1, - cliprect,TRANSPARENCY_PEN,15); + sx,sy+1,15); } } diff --git a/src/mame/video/realbrk.c b/src/mame/video/realbrk.c index 20921b3a7ff..378e64154f3 100644 --- a/src/mame/video/realbrk.c +++ b/src/mame/video/realbrk.c @@ -299,13 +299,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan { bitmap_fill( tmpbitmap0, &spritetile_clip , 0); bitmap_fill( tmpbitmap1, &spritetile_clip , 0); - drawgfxzoom( tmpbitmap0,machine->gfx[gfx], + drawgfxzoom_transpen( tmpbitmap0,&spritetile_clip,machine->gfx[gfx], code++, color, flipx, flipy, 0,0, - &spritetile_clip,TRANSPARENCY_PEN,0, - (rot & 1 ? scaley : scalex) << 12, (rot & 1 ? scalex : scaley) << 12); + (rot & 1 ? scaley : scalex) << 12, (rot & 1 ? scalex : scaley) << 12,0); // peek at the unrotated sprite // copybitmap_trans( bitmap,tmpbitmap0, 0,0, 50+(x * xdim/0x10000),50+(y * ydim/0x10000), cliprect, 0 ); @@ -362,13 +361,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan break; default: - drawgfxzoom( bitmap,machine->gfx[gfx], + drawgfxzoom_transpen( bitmap,cliprect,machine->gfx[gfx], code++, color, flipx, flipy, currx, curry, - cliprect,TRANSPARENCY_PEN,0, - scalex << 12, scaley << 12); + scalex << 12, scaley << 12,0); break; } @@ -443,13 +441,12 @@ static void dai2kaku_draw_sprites(running_machine *machine, bitmap_t *bitmap,con int scalex = (sx + (x + 1) * xdim) / 0x10000 - currx; int scaley = (sy + (y + 1) * ydim) / 0x10000 - curry; - drawgfxzoom( bitmap,machine->gfx[gfx], + drawgfxzoom_transpen( bitmap,cliprect,machine->gfx[gfx], code++, color, flipx, flipy, currx, curry, - cliprect,TRANSPARENCY_PEN,0, - scalex << 12, scaley << 12); + scalex << 12, scaley << 12,0); } } } diff --git a/src/mame/video/redclash.c b/src/mame/video/redclash.c index 519dd258f61..7b628214578 100644 --- a/src/mame/video/redclash.c +++ b/src/mame/video/redclash.c @@ -200,19 +200,17 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { int code = ((spriteram[offs + i + 1] & 0xf0) >> 4) + ((gfxbank & 1) << 4); - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code, color, 0,0, - sx,sy - 16, - cliprect,TRANSPARENCY_PEN,0); + sx,sy - 16,0); /* wraparound */ - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code, color, 0,0, - sx - 256,sy - 16, - cliprect,TRANSPARENCY_PEN,0); + sx - 256,sy - 16,0); break; } @@ -222,33 +220,30 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int code = ((spriteram[offs + i + 1] & 0xf8) >> 3) + ((gfxbank & 1) << 5); int bank = (spriteram[offs + i + 1] & 0x02) >> 1; - drawgfx(bitmap,machine->gfx[4+bank], + drawgfx_transpen(bitmap,cliprect,machine->gfx[4+bank], code, color, 0,0, - sx,sy - 16, - cliprect,TRANSPARENCY_PEN,0); + sx,sy - 16,0); } else { int code = ((spriteram[offs + i + 1] & 0xf0) >> 4) + ((gfxbank & 1) << 4); - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code, color, 0,0, - sx,sy - 16, - cliprect,TRANSPARENCY_PEN,0); + sx,sy - 16,0); } break; case 1: /* 8x8 */ - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], spriteram[offs + i + 1],// + 4 * (spriteram[offs + i + 2] & 0x10), color, 0,0, - sx,sy - 16, - cliprect,TRANSPARENCY_PEN,0); + sx,sy - 16,0); break; case 0: diff --git a/src/mame/video/renegade.c b/src/mame/video/renegade.c index a4161624b58..c23e0ffd2f2 100644 --- a/src/mame/video/renegade.c +++ b/src/mame/video/renegade.c @@ -104,23 +104,21 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (attributes & 0x80) /* big sprite */ { sprite_number &= ~1; - drawgfx(bitmap, machine->gfx[sprite_bank], + drawgfx_transpen(bitmap, cliprect, machine->gfx[sprite_bank], sprite_number + 1, color, xflip, flip_screen_get(machine), - sx, sy + (flip_screen_get(machine) ? -16 : 16), - cliprect, TRANSPARENCY_PEN, 0); + sx, sy + (flip_screen_get(machine) ? -16 : 16), 0); } else { sy += (flip_screen_get(machine) ? -16 : 16); } - drawgfx(bitmap, machine->gfx[sprite_bank], + drawgfx_transpen(bitmap, cliprect, machine->gfx[sprite_bank], sprite_number, color, xflip, flip_screen_get(machine), - sx, sy, - cliprect, TRANSPARENCY_PEN, 0); + sx, sy, 0); } source += 4; } diff --git a/src/mame/video/retofinv.c b/src/mame/video/retofinv.c index fd5f898a252..859425663c7 100644 --- a/src/mame/video/retofinv.c +++ b/src/mame/video/retofinv.c @@ -218,12 +218,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap) { for (x = 0;x <= sizex;x++) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transmask(bitmap,&spritevisiblearea,machine->gfx[1], sprite + gfx_offs[y ^ (sizey * flipy)][x ^ (sizex * flipx)], color, flipx,flipy, sx + 16*x,sy + 16*y, - &spritevisiblearea,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0xff)); } } diff --git a/src/mame/video/rocnrope.c b/src/mame/video/rocnrope.c index 0d695f76a60..a3899f5eb3a 100644 --- a/src/mame/video/rocnrope.c +++ b/src/mame/video/rocnrope.c @@ -126,12 +126,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { int color = spriteram_2[offs] & 0x0f; - drawgfx(bitmap,machine->gfx[0], + drawgfx_transmask(bitmap,cliprect,machine->gfx[0], spriteram[offs + 1], color, spriteram_2[offs] & 0x40,~spriteram_2[offs] & 0x80, 240-spriteram[offs],spriteram_2[offs + 1], - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[0], color, 0)); } } diff --git a/src/mame/video/rohga.c b/src/mame/video/rohga.c index 850ec5247f7..7bfa993e2a0 100644 --- a/src/mame/video/rohga.c +++ b/src/mame/video/rohga.c @@ -130,12 +130,12 @@ static void rohga_draw_sprites(running_machine *machine, bitmap_t *bitmap, const while (multi >= 0) { - pdrawgfx(bitmap,machine->gfx[3], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[3], sprite - multi * inc, colour, fx,fy, x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0,pri); + priority_bitmap,pri,0); multi--; } @@ -416,13 +416,13 @@ sprite 2: for (x=0; x<w; x++) { for (y=0; y<h; y++) { - deco16_pdrawgfx(machine, - bitmap,machine->gfx[gfxbank], + deco16_pdrawgfx( + bitmap,cliprect,machine->gfx[gfxbank], sprite + y + h * x, colour, fx,fy, sx + x_mult * (w-x),sy + y_mult * (h-y), - cliprect,0,tilemap_pri,sprite_pri,1,alpha); + 0,tilemap_pri,sprite_pri,1,alpha); } } diff --git a/src/mame/video/rollrace.c b/src/mame/video/rollrace.c index 44050cee9f2..837e5362108 100644 --- a/src/mame/video/rollrace.c +++ b/src/mame/video/rollrace.c @@ -87,14 +87,13 @@ VIDEO_UPDATE( rollrace ) if(ra_flipy) sy = 31-sy ; - drawgfx(bitmap, - screen->machine->gfx[RA_BGCHAR_BASE], + drawgfx_transpen(bitmap, + cliprect,screen->machine->gfx[RA_BGCHAR_BASE], mem[offs + ( ra_bkgpage * 1024 )] + ((( mem[offs + 0x4000 + ( ra_bkgpage * 1024 )] & 0xc0 ) >> 6 ) * 256 ) , ra_bkgcol, ra_flipx,(ra_bkgflip^ra_flipy), - sx*8,sy*8, - cliprect,TRANSPARENCY_PEN,0); + sx*8,sy*8,0); } @@ -127,12 +126,11 @@ VIDEO_UPDATE( rollrace ) if(bank) bank += ra_spritebank; - drawgfx(bitmap, screen->machine->gfx[ RA_SP_BASE + bank ], + drawgfx_transpen(bitmap, cliprect,screen->machine->gfx[ RA_SP_BASE + bank ], spriteram[offs+1] & 0x3f , spriteram[offs+2] & 0x1f, ra_flipx,!(s_flipy^ra_flipy), - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } @@ -156,12 +154,11 @@ VIDEO_UPDATE( rollrace ) if (ra_flipx) sx = 31 - sx; - drawgfx(bitmap,screen->machine->gfx[RA_FGCHAR_BASE + ra_chrbank] , + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[RA_FGCHAR_BASE + ra_chrbank] , videoram[ offs ] , col, ra_flipx,ra_flipy, - 8*sx,scroll, - cliprect,TRANSPARENCY_PEN,0); + 8*sx,scroll,0); } diff --git a/src/mame/video/rpunch.c b/src/mame/video/rpunch.c index c335c57e76a..dc87f0f8c35 100644 --- a/src/mame/video/rpunch.c +++ b/src/mame/video/rpunch.c @@ -230,8 +230,8 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (x >= BITMAP_WIDTH) x -= 512; if (y >= BITMAP_HEIGHT) y -= 512; - drawgfx(bitmap, machine->gfx[2], - code, color + (rpunch_sprite_palette / 16), xflip, yflip, x, y, cliprect, TRANSPARENCY_PEN, 15); + drawgfx_transpen(bitmap, cliprect, machine->gfx[2], + code, color + (rpunch_sprite_palette / 16), xflip, yflip, x, y, 15); } } diff --git a/src/mame/video/runaway.c b/src/mame/video/runaway.c index 3cd4669a6c1..cf20ac0e89e 100644 --- a/src/mame/video/runaway.c +++ b/src/mame/video/runaway.c @@ -109,19 +109,17 @@ VIDEO_UPDATE( runaway ) code |= (runaway_sprite_ram[i + 0x30] << 2) & 0x1c0; - drawgfx(bitmap, screen->machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], code, 0, flipx, flipy, - x, 240 - y, - cliprect, TRANSPARENCY_PEN, 0); + x, 240 - y, 0); - drawgfx(bitmap, screen->machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], code, 0, flipx, flipy, - x - 256, 240 - y, - cliprect, TRANSPARENCY_PEN, 0); + x - 256, 240 - y, 0); } return 0; } @@ -145,19 +143,17 @@ VIDEO_UPDATE( qwak ) code |= (runaway_sprite_ram[i + 0x30] << 2) & 0x1c0; - drawgfx(bitmap, screen->machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], code, 0, flipx, flipy, - x, 240 - y, - cliprect, TRANSPARENCY_PEN, 0); + x, 240 - y, 0); - drawgfx(bitmap, screen->machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], code, 0, flipx, flipy, - x - 256, 240 - y, - cliprect, TRANSPARENCY_PEN, 0); + x - 256, 240 - y, 0); } return 0; } diff --git a/src/mame/video/sauro.c b/src/mame/video/sauro.c index c1e344251b6..4818dbc4bcd 100644 --- a/src/mame/video/sauro.c +++ b/src/mame/video/sauro.c @@ -133,12 +133,11 @@ static void sauro_draw_sprites(running_machine *machine, bitmap_t *bitmap, const sy = 240 - sy; } - drawgfx(bitmap, machine->gfx[2], + drawgfx_transpen(bitmap, cliprect,machine->gfx[2], code, color, flipx,flip_screen_get(machine), - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } @@ -203,12 +202,11 @@ static void trckydoc_draw_sprites(running_machine *machine, bitmap_t *bitmap, co sy = 240 - sy; } - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap, cliprect,machine->gfx[1], code, color, flipx,flip_screen_get(machine), - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/sbasketb.c b/src/mame/video/sbasketb.c index 221b648c9e6..36b0666f64b 100644 --- a/src/mame/video/sbasketb.c +++ b/src/mame/video/sbasketb.c @@ -160,12 +160,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect, + machine->gfx[1], code, color, flipx, flipy, - sx, sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx, sy, 0); } } } diff --git a/src/mame/video/scotrsht.c b/src/mame/video/scotrsht.c index 90ee5382cb3..0ebbae12c49 100644 --- a/src/mame/video/scotrsht.c +++ b/src/mame/video/scotrsht.c @@ -116,8 +116,8 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, - sx, sy, cliprect, TRANSPARENCY_PENS, + drawgfx_transmask(bitmap, cliprect, machine->gfx[1], code, color, flipx, flipy, + sx, sy, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, scotrsht_palette_bank * 16)); } } diff --git a/src/mame/video/sderby.c b/src/mame/video/sderby.c index da4cc0158be..01a259c70b7 100644 --- a/src/mame/video/sderby.c +++ b/src/mame/video/sderby.c @@ -83,12 +83,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan code = spriteram16[offs+2] >> codeshift; color = (spriteram16[offs+1] & 0x3e00) >> 9; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color/colordiv+48, flipx,0, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/segag80r.c b/src/mame/video/segag80r.c index cd98bce123b..59c05e9737b 100644 --- a/src/mame/video/segag80r.c +++ b/src/mame/video/segag80r.c @@ -656,7 +656,7 @@ static void draw_videoram(running_machine *machine, bitmap_t *bitmap, const rect UINT8 tile = videoram[offs]; /* draw the tile */ - drawgfx(bitmap, machine->gfx[0], tile, tile >> 4, video_flip, video_flip, x*8, y*8, cliprect, TRANSPARENCY_PENS, transparent_pens[tile >> 4]); + drawgfx_transmask(bitmap, cliprect, machine->gfx[0], tile, tile >> 4, video_flip, video_flip, x*8, y*8, transparent_pens[tile >> 4]); } } } diff --git a/src/mame/video/sei_crtc.c b/src/mame/video/sei_crtc.c index bbcb515a6f0..c0a5b164049 100644 --- a/src/mame/video/sei_crtc.c +++ b/src/mame/video/sei_crtc.c @@ -235,15 +235,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan for (ax=0; ax<dx; ax++) for (ay=0; ay<dy; ay++) { if (!fx) - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], sprite++, - color,fx,fy,x+ax*16,y+ay*16, - cliprect,TRANSPARENCY_PEN,15); + color,fx,fy,x+ax*16,y+ay*16,15); else - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], sprite++, - color,fx,fy,x+(dx-1-ax)*16,y+ay*16, - cliprect,TRANSPARENCY_PEN,15); + color,fx,fy,x+(dx-1-ax)*16,y+ay*16,15); } } } diff --git a/src/mame/video/seibuspi.c b/src/mame/video/seibuspi.c index b73554326a4..09e0ef8e958 100644 --- a/src/mame/video/seibuspi.c +++ b/src/mame/video/seibuspi.c @@ -234,9 +234,9 @@ WRITE32_HANDLER( video_dma_address_w ) COMBINE_DATA( &video_dma_address ); } -static void draw_blend_gfx(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, int sx, int sy) +static void drawgfx_blend(bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, int sx, int sy) { - const pen_t *pens = &machine->pens[gfx->color_base]; + const pen_t *pens = &gfx->machine->pens[gfx->color_base]; const UINT8 *dp; int i, j; int x1, x2; @@ -410,11 +410,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta for( x=x1; x < width; x++ ) { for( y=y1; y < height; y++ ) { - draw_blend_gfx(machine, bitmap, cliprect, gfx, tile_num, color, flip_x, flip_y, xpos + sprite_xtable[flip_x][x], ypos + sprite_ytable[flip_y][y]); + drawgfx_blend(bitmap, cliprect, gfx, tile_num, color, flip_x, flip_y, xpos + sprite_xtable[flip_x][x], ypos + sprite_ytable[flip_y][y]); /* xpos seems to wrap-around to 0 at 512 */ if( (xpos + (16 * x) + 16) >= 512 ) { - draw_blend_gfx(machine, bitmap, cliprect, gfx, tile_num, color, flip_x, flip_y, xpos - 512 + sprite_xtable[flip_x][x], ypos + sprite_ytable[flip_y][y]); + drawgfx_blend(bitmap, cliprect, gfx, tile_num, color, flip_x, flip_y, xpos - 512 + sprite_xtable[flip_x][x], ypos + sprite_ytable[flip_y][y]); } tile_num++; diff --git a/src/mame/video/seicross.c b/src/mame/video/seicross.c index 4bbb7d08dbd..11cb7f56700 100644 --- a/src/mame/video/seicross.c +++ b/src/mame/video/seicross.c @@ -100,37 +100,33 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta for (offs = spriteram_size - 4;offs >= 0;offs -= 4) { int x = spriteram[offs + 3]; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], (spriteram[offs] & 0x3f) + ((spriteram[offs + 1] & 0x10) << 2) + 128, spriteram[offs + 1] & 0x0f, spriteram[offs] & 0x40,spriteram[offs] & 0x80, - x,240-spriteram[offs + 2], - cliprect,TRANSPARENCY_PEN,0); + x,240-spriteram[offs + 2],0); if(x>0xf0) - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], (spriteram[offs] & 0x3f) + ((spriteram[offs + 1] & 0x10) << 2) + 128, spriteram[offs + 1] & 0x0f, spriteram[offs] & 0x40,spriteram[offs] & 0x80, - x-256,240-spriteram[offs + 2], - cliprect,TRANSPARENCY_PEN,0); + x-256,240-spriteram[offs + 2],0); } for (offs = spriteram_2_size - 4;offs >= 0;offs -= 4) { int x = spriteram_2[offs + 3]; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], (spriteram_2[offs] & 0x3f) + ((spriteram_2[offs + 1] & 0x10) << 2), spriteram_2[offs + 1] & 0x0f, spriteram_2[offs] & 0x40,spriteram_2[offs] & 0x80, - x,240-spriteram_2[offs + 2], - cliprect,TRANSPARENCY_PEN,0); + x,240-spriteram_2[offs + 2],0); if(x>0xf0) - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], (spriteram_2[offs] & 0x3f) + ((spriteram_2[offs + 1] & 0x10) << 2), spriteram_2[offs + 1] & 0x0f, spriteram_2[offs] & 0x40,spriteram_2[offs] & 0x80, - x-256,240-spriteram_2[offs + 2], - cliprect,TRANSPARENCY_PEN,0); + x-256,240-spriteram_2[offs + 2],0); } } diff --git a/src/mame/video/senjyo.c b/src/mame/video/senjyo.c index 9bd4a6cd252..445290627fb 100644 --- a/src/mame/video/senjyo.c +++ b/src/mame/video/senjyo.c @@ -268,12 +268,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan } - drawgfx(bitmap,machine->gfx[big ? 5 : 4], + drawgfx_transpen(bitmap,cliprect,machine->gfx[big ? 5 : 4], spriteram[offs], spriteram[offs + 1] & 0x07, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } } diff --git a/src/mame/video/seta.c b/src/mame/video/seta.c index ff2670a9c11..7db5afc2292 100644 --- a/src/mame/video/seta.c +++ b/src/mame/video/seta.c @@ -801,12 +801,11 @@ twineagl: 000 027 00 0f (test mode) color = ( color >> (16-5) ) % total_color_codes; code = (code & 0x3fff) + (bank * 0x4000); - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code, color, flipx, flipy, - ((sx + 0x10) & 0x1ff) - 0x10,((sy + 8) & 0x0ff) - 8, - cliprect,TRANSPARENCY_PEN,0); + ((sx + 0x10) & 0x1ff) - 0x10,((sy + 8) & 0x0ff) - 8,0); } /* next column */ } @@ -863,12 +862,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan y = max_y - y; - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code, color, flipx, flipy, - ((x + xoffs + 0x10) & 0x1ff) - 0x10,((y - yoffs + 8) & 0x0ff) - 8, - cliprect,TRANSPARENCY_PEN,0); + ((x + xoffs + 0x10) & 0x1ff) - 0x10,((y - yoffs + 8) & 0x0ff) - 8,0); } } diff --git a/src/mame/video/seta2.c b/src/mame/video/seta2.c index 6c7db4df7f6..9decf516214 100644 --- a/src/mame/video/seta2.c +++ b/src/mame/video/seta2.c @@ -285,12 +285,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan { for (tx = 0; tx <= tilesize; tx++) { - drawgfx(bitmap, machine->gfx[gfx], + drawgfx_transpen(bitmap, cliprect,machine->gfx[gfx], code ^ tx ^ (ty<<1), color, flipx, flipy, - px + (flipx ? tilesize-tx : tx) * 8, py + (flipy ? tilesize-ty : ty) * 8, - cliprect,TRANSPARENCY_PEN,0 ); + px + (flipx ? tilesize-tx : tx) * 8, py + (flipy ? tilesize-ty : ty) * 8,0 ); } } @@ -328,12 +327,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan { for (x = 0; x <= sizex; x++) { - drawgfx(bitmap, machine->gfx[gfx], + drawgfx_transpen(bitmap, cliprect,machine->gfx[gfx], code++, color, flipx, flipy, - sx + (flipx ? sizex-x : x) * 8, sy + (flipy ? sizey-y : y) * 8, - cliprect,TRANSPARENCY_PEN,0 ); + sx + (flipx ? sizex-x : x) * 8, sy + (flipy ? sizey-y : y) * 8,0 ); } } } diff --git a/src/mame/video/sf.c b/src/mame/video/sf.c index ecf2bed5d51..88d26578164 100644 --- a/src/mame/video/sf.c +++ b/src/mame/video/sf.c @@ -172,34 +172,30 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan t = c2; c2 = c4; c4 = t; } - drawgfx(bitmap, - machine->gfx[2], + drawgfx_transpen(bitmap, + cliprect, machine->gfx[2], sf_invert(c1), color, flipx,flipy, - sx,sy, - cliprect, TRANSPARENCY_PEN, 15); - drawgfx(bitmap, - machine->gfx[2], + sx,sy, 15); + drawgfx_transpen(bitmap, + cliprect, machine->gfx[2], sf_invert(c2), color, flipx,flipy, - sx+16,sy, - cliprect, TRANSPARENCY_PEN, 15); - drawgfx(bitmap, - machine->gfx[2], + sx+16,sy, 15); + drawgfx_transpen(bitmap, + cliprect, machine->gfx[2], sf_invert(c3), color, flipx,flipy, - sx,sy+16, - cliprect, TRANSPARENCY_PEN, 15); - drawgfx(bitmap, - machine->gfx[2], + sx,sy+16, 15); + drawgfx_transpen(bitmap, + cliprect, machine->gfx[2], sf_invert(c4), color, flipx,flipy, - sx+16,sy+16, - cliprect, TRANSPARENCY_PEN, 15); + sx+16,sy+16, 15); } else { @@ -211,13 +207,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan flipy = !flipy; } - drawgfx(bitmap, - machine->gfx[2], + drawgfx_transpen(bitmap, + cliprect, machine->gfx[2], sf_invert(c), color, flipx,flipy, - sx,sy, - cliprect, TRANSPARENCY_PEN, 15); + sx,sy, 15); } } } diff --git a/src/mame/video/shadfrce.c b/src/mame/video/shadfrce.c index 9cc0dad09c5..ee527ebfbfb 100644 --- a/src/mame/video/shadfrce.c +++ b/src/mame/video/shadfrce.c @@ -139,10 +139,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta height++; if (enable) { for (hcount=0;hcount<height;hcount++) { - pdrawgfx(bitmap,gfx,tile+hcount,pal,flipx,flipy,xpos,ypos-hcount*16-16,cliprect,TRANSPARENCY_PEN,0,pri_mask); - pdrawgfx(bitmap,gfx,tile+hcount,pal,flipx,flipy,xpos-0x200,ypos-hcount*16-16,cliprect,TRANSPARENCY_PEN,0,pri_mask); - pdrawgfx(bitmap,gfx,tile+hcount,pal,flipx,flipy,xpos,ypos-hcount*16-16+0x200,cliprect,TRANSPARENCY_PEN,0,pri_mask); - pdrawgfx(bitmap,gfx,tile+hcount,pal,flipx,flipy,xpos-0x200,ypos-hcount*16-16+0x200,cliprect,TRANSPARENCY_PEN,0,pri_mask); + pdrawgfx_transpen(bitmap,cliprect,gfx,tile+hcount,pal,flipx,flipy,xpos,ypos-hcount*16-16,priority_bitmap,pri_mask,0); + pdrawgfx_transpen(bitmap,cliprect,gfx,tile+hcount,pal,flipx,flipy,xpos-0x200,ypos-hcount*16-16,priority_bitmap,pri_mask,0); + pdrawgfx_transpen(bitmap,cliprect,gfx,tile+hcount,pal,flipx,flipy,xpos,ypos-hcount*16-16+0x200,priority_bitmap,pri_mask,0); + pdrawgfx_transpen(bitmap,cliprect,gfx,tile+hcount,pal,flipx,flipy,xpos-0x200,ypos-hcount*16-16+0x200,priority_bitmap,pri_mask,0); } } source-=8; diff --git a/src/mame/video/shangha3.c b/src/mame/video/shangha3.c index 88779ea0b84..8d71548cc14 100644 --- a/src/mame/video/shangha3.c +++ b/src/mame/video/shangha3.c @@ -215,12 +215,11 @@ WRITE16_HANDLER( shangha3_blitter_go_w ) if (flipy) dy = sy + sizey-15 - dy; else dy = sy + dy; - drawgfx(rawbitmap,space->machine->gfx[0], + drawgfx_transpen(rawbitmap,&myclip,space->machine->gfx[0], (tile & 0x0fff) | (code & 0xf000), (tile >> 12) | (color & 0x70), flipx,flipy, - dx,dy, - &myclip,TRANSPARENCY_PEN,15); + dx,dy,15); } } } diff --git a/src/mame/video/shangkid.c b/src/mame/video/shangkid.c index 8e235d608d3..9d35852a4a2 100644 --- a/src/mame/video/shangkid.c +++ b/src/mame/video/shangkid.c @@ -138,16 +138,15 @@ static void draw_sprite(running_machine *machine, const UINT8 *source, bitmap_t { sx = xpos+(c^xflip)*width; sy = ypos+(r^yflip)*height; - drawgfxzoom( + drawgfxzoom_transpen( bitmap, + cliprect, gfx, tile+c*8+r, color, xflip,yflip, sx,sy, - cliprect, - TRANSPARENCY_PEN,transparent_pen, - (width<<16)/16, (height<<16)/16 ); + (width<<16)/16, (height<<16)/16,transparent_pen ); } } } @@ -286,15 +285,14 @@ static void dynamski_draw_sprites(running_machine *machine, bitmap_t *bitmap, co sx = videoram[0x1381+i]-64+8+16; if( attr&1 ) sx += 0x100; - drawgfx( + drawgfx_transpen( bitmap, + cliprect, machine->gfx[1], bank*0x40 + (tile&0x3f), color, tile&0x80,tile&0x40, /* flipx,flipy */ - sx,sy, - cliprect, - TRANSPARENCY_PEN,3 ); + sx,sy,3 ); } } diff --git a/src/mame/video/shaolins.c b/src/mame/video/shaolins.c index 971958c7949..3a719c50bb0 100644 --- a/src/mame/video/shaolins.c +++ b/src/mame/video/shaolins.c @@ -172,11 +172,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[1], + drawgfx_transmask(bitmap, cliprect,machine->gfx[1], code, color, flipx, flipy, sx, sy, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, palettebank << 5)); } } diff --git a/src/mame/video/shootout.c b/src/mame/video/shootout.c index f20bbace5a7..ba31c90acce 100644 --- a/src/mame/video/shootout.c +++ b/src/mame/video/shootout.c @@ -122,13 +122,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta vy = 240 - vy; } - pdrawgfx(bitmap,gfx, + pdrawgfx_transpen(bitmap,cliprect,gfx, number, 0 /*color*/, flipx,flipy, vx,vy, - cliprect,TRANSPARENCY_PEN,0, - priority_mask); + priority_bitmap, + priority_mask,0); number++; sy += 16; @@ -141,13 +141,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta vy = 240 - vy; } - pdrawgfx(bitmap,gfx, + pdrawgfx_transpen(bitmap,cliprect,gfx, number, 0 /*color*/, flipx,flipy, vx,vy, - cliprect,TRANSPARENCY_PEN,0, - priority_mask); + priority_bitmap, + priority_mask,0); } } source -= 4; diff --git a/src/mame/video/sidearms.c b/src/mame/video/sidearms.c index 69851076765..bfcffdd9009 100644 --- a/src/mame/video/sidearms.c +++ b/src/mame/video/sidearms.c @@ -194,12 +194,11 @@ static void draw_sprites_region(running_machine *machine, bitmap_t *bitmap, cons y = (30 * 8) - y; } - drawgfx(bitmap, gfx, + drawgfx_transpen(bitmap, cliprect, + gfx, code, color, flipx, flipy, - x, y, - cliprect, - TRANSPARENCY_PEN, 15); + x, y, 15); } } diff --git a/src/mame/video/sidepckt.c b/src/mame/video/sidepckt.c index de1caca8b19..077d19f429f 100644 --- a/src/mame/video/sidepckt.c +++ b/src/mame/video/sidepckt.c @@ -123,19 +123,17 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan flipx = spriteram[offs+1] & 0x08; flipy = spriteram[offs+1] & 0x04; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); /* wraparound */ - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, - sx-256,sy, - cliprect,TRANSPARENCY_PEN,0); + sx-256,sy,0); } } diff --git a/src/mame/video/silkroad.c b/src/mame/video/silkroad.c index 6607c9c8900..c20bc83eb70 100644 --- a/src/mame/video/silkroad.c +++ b/src/mame/video/silkroad.c @@ -37,13 +37,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (!flipx) { for (wcount=0;wcount<width;wcount++) { - pdrawgfx(bitmap,gfx,tileno+wcount,color,0,0,xpos+wcount*16+8,ypos,cliprect,TRANSPARENCY_PEN,0,pri_mask); + pdrawgfx_transpen(bitmap,cliprect,gfx,tileno+wcount,color,0,0,xpos+wcount*16+8,ypos,priority_bitmap,pri_mask,0); } } else { for (wcount=width;wcount>0;wcount--) { - pdrawgfx(bitmap,gfx,tileno+(width-wcount),color,1,0,xpos+wcount*16-16+8,ypos,cliprect,TRANSPARENCY_PEN,0,pri_mask); + pdrawgfx_transpen(bitmap,cliprect,gfx,tileno+(width-wcount),color,1,0,xpos+wcount*16-16+8,ypos,priority_bitmap,pri_mask,0); } } diff --git a/src/mame/video/simpl156.c b/src/mame/video/simpl156.c index 407cdb40c8a..9d2bb31c517 100644 --- a/src/mame/video/simpl156.c +++ b/src/mame/video/simpl156.c @@ -98,12 +98,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan while (multi >= 0) { - pdrawgfx(bitmap,machine->gfx[2], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[2], sprite - multi * inc, colour, fx,fy, x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0,pri); + priority_bitmap,pri,0); multi--; } diff --git a/src/mame/video/skydiver.c b/src/mame/video/skydiver.c index d64b8b055cd..2ae92ad5223 100644 --- a/src/mame/video/skydiver.c +++ b/src/mame/video/skydiver.c @@ -197,11 +197,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta sx -= 8; } - drawgfxzoom(bitmap,machine->gfx[1], + drawgfxzoom_transpen(bitmap,cliprect,machine->gfx[1], charcode, color, xflip,yflip,sx,sy, - cliprect,TRANSPARENCY_PEN,0, - wide ? 0x20000 : 0x10000, 0x10000); + wide ? 0x20000 : 0x10000, 0x10000,0); } } diff --git a/src/mame/video/skyfox.c b/src/mame/video/skyfox.c index f48626a004c..b43c61ea2f6 100644 --- a/src/mame/video/skyfox.c +++ b/src/mame/video/skyfox.c @@ -199,12 +199,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta } #define DRAW_SPRITE(DX,DY,CODE) \ - drawgfx(bitmap,machine->gfx[0], \ + drawgfx_transpen(bitmap,\ + cliprect,machine->gfx[0], \ (CODE), \ 0, \ flipx,flipy, \ - x + (DX),y + (DY), \ - cliprect,TRANSPARENCY_PEN, 0xff); \ + x + (DX),y + (DY), 0xff); \ if (skyfox_bg_ctrl & 1) // flipscreen { diff --git a/src/mame/video/skykid.c b/src/mame/video/skykid.c index 6d6f7f58e70..92fe2c5d601 100644 --- a/src/mame/video/skykid.c +++ b/src/mame/video/skykid.c @@ -219,12 +219,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan { for (x = 0;x <= sizex;x++) { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transmask(bitmap,cliprect,machine->gfx[2], sprite + gfx_offs[y ^ (sizey * flipy)][x ^ (sizex * flipx)], color, flipx,flipy, sx + 16*x,sy + 16*y, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[2], color, 0xff)); } } diff --git a/src/mame/video/skyraid.c b/src/mame/video/skyraid.c index 0bd330af675..26f4d8f5d3b 100644 --- a/src/mame/video/skyraid.c +++ b/src/mame/video/skyraid.c @@ -35,7 +35,7 @@ static void draw_text(running_machine *machine, bitmap_t* bitmap, const rectangl y = 136 + 16 * (i ^ 1); for (x = 0; x < bitmap->width; x += 16) - drawgfx(bitmap, machine->gfx[0], *p++, 0, 0, 0, x, y, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[0], *p++, 0, 0, 0, x, y, 0); } } @@ -89,9 +89,9 @@ static void draw_sprites(running_machine *machine, bitmap_t* bitmap, const recta vert -= 31; if (flag & 1) - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code ^ 15, code >> 3, 0, 0, - horz / 2, vert, cliprect, TRANSPARENCY_PEN, 2); + horz / 2, vert, 2); } } @@ -111,9 +111,9 @@ static void draw_missiles(running_machine *machine, bitmap_t* bitmap, const rect vert -= 15; horz -= 31; - drawgfx(bitmap, machine->gfx[2], + drawgfx_transpen(bitmap, cliprect, machine->gfx[2], code ^ 15, 0, 0, 0, - horz / 2, vert, cliprect, TRANSPARENCY_PEN, 0); + horz / 2, vert, 0); } } diff --git a/src/mame/video/slapfght.c b/src/mame/video/slapfght.c index d8dcb9f4089..e0e3709064d 100644 --- a/src/mame/video/slapfght.c +++ b/src/mame/video/slapfght.c @@ -172,13 +172,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta sx = buffered_spriteram[offs+1] + 3; sy = buffered_spriteram[offs+3] - 1; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], buffered_spriteram[offs], ((buffered_spriteram[offs+2] >> 1) & 3) | ((buffered_spriteram[offs+2] << 2) & 4) | (slapfight_palette_bank << 3), flipscreen, flipscreen, - sx, sy, - cliprect,TRANSPARENCY_PEN,0); + sx, sy,0); } } } @@ -231,19 +230,17 @@ VIDEO_UPDATE( slapfight ) for (offs = 0;offs < spriteram_size;offs += 4) { if (flipscreen) - drawgfx(bitmap,screen->machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[2], buffered_spriteram[offs] + ((buffered_spriteram[offs+2] & 0xc0) << 2), (buffered_spriteram[offs+2] & 0x1e) >> 1, 1,1, - 288-(buffered_spriteram[offs+1] + ((buffered_spriteram[offs+2] & 0x01) << 8)) +18,240-buffered_spriteram[offs+3], - cliprect,TRANSPARENCY_PEN,0); + 288-(buffered_spriteram[offs+1] + ((buffered_spriteram[offs+2] & 0x01) << 8)) +18,240-buffered_spriteram[offs+3],0); else - drawgfx(bitmap,screen->machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[2], buffered_spriteram[offs] + ((buffered_spriteram[offs+2] & 0xc0) << 2), (buffered_spriteram[offs+2] & 0x1e) >> 1, 0,0, - (buffered_spriteram[offs+1] + ((buffered_spriteram[offs+2] & 0x01) << 8)) - 13,buffered_spriteram[offs+3], - cliprect,TRANSPARENCY_PEN,0); + (buffered_spriteram[offs+1] + ((buffered_spriteram[offs+2] & 0x01) << 8)) - 13,buffered_spriteram[offs+3],0); } tilemap_draw(bitmap,cliprect,fix_tilemap,0,0); diff --git a/src/mame/video/slapshot.c b/src/mame/video/slapshot.c index 397b17ccd86..e3e0fdf8f43 100644 --- a/src/mame/video/slapshot.c +++ b/src/mame/video/slapshot.c @@ -410,13 +410,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan } else { - drawgfxzoom(bitmap,machine->gfx[0], + drawgfxzoom_transpen(bitmap,cliprect,machine->gfx[0], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0, - sprite_ptr->zoomx,sprite_ptr->zoomy); + sprite_ptr->zoomx,sprite_ptr->zoomy,0); } } } @@ -427,14 +426,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan { sprite_ptr--; - pdrawgfxzoom(bitmap,machine->gfx[0], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[0], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0, sprite_ptr->zoomx,sprite_ptr->zoomy, - sprite_ptr->primask); + priority_bitmap,sprite_ptr->primask,0); } } diff --git a/src/mame/video/snk68.c b/src/mame/video/snk68.c index 75013c5f922..709f526e1f4 100644 --- a/src/mame/video/snk68.c +++ b/src/mame/video/snk68.c @@ -247,12 +247,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta fy = !fy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect, machine->gfx[1], tile, color, fx, fy, - mx, my, - cliprect, TRANSPARENCY_PEN, 0); + mx, my, 0); } else { diff --git a/src/mame/video/solomon.c b/src/mame/video/solomon.c index d13932d671d..9db65a30e4e 100644 --- a/src/mame/video/solomon.c +++ b/src/mame/video/solomon.c @@ -89,12 +89,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[2], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[2], code, color, flipx, flipy, - sx, sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx, sy, 0); } } diff --git a/src/mame/video/sonson.c b/src/mame/video/sonson.c index 18f55c28673..cc5c19142aa 100644 --- a/src/mame/video/sonson.c +++ b/src/mame/video/sonson.c @@ -156,12 +156,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[1], code, color, flipx, flipy, - sx, sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx, sy, 0); } } diff --git a/src/mame/video/spcforce.c b/src/mame/video/spcforce.c index 5c2198dd526..114589fd145 100644 --- a/src/mame/video/spcforce.c +++ b/src/mame/video/spcforce.c @@ -45,11 +45,10 @@ VIDEO_UPDATE( spcforce ) sy = 248 - sy; } - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], code, col, flip_screen_get(screen->machine), flip_screen_get(screen->machine), - sx, sy, - cliprect,TRANSPARENCY_PEN,0); + sx, sy,0); } return 0; } diff --git a/src/mame/video/spdodgeb.c b/src/mame/video/spdodgeb.c index 120859b8074..e6ed5ef8b8f 100644 --- a/src/mame/video/spdodgeb.c +++ b/src/mame/video/spdodgeb.c @@ -151,9 +151,9 @@ WRITE8_HANDLER( spdodgeb_videoram_w ) ***************************************************************************/ -#define DRAW_SPRITE( order, sx, sy ) drawgfx( bitmap, gfx, \ - (which+order),color+ 8 * sprite_palbank,flipx,flipy,sx,sy, \ - cliprect,TRANSPARENCY_PEN,0); +#define DRAW_SPRITE( order, sx, sy ) drawgfx_transpen( bitmap, \ + cliprect,gfx, \ + (which+order),color+ 8 * sprite_palbank,flipx,flipy,sx,sy,0); static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect ) { diff --git a/src/mame/video/speedbal.c b/src/mame/video/speedbal.c index a932bd64e04..451e1046f3d 100644 --- a/src/mame/video/speedbal.c +++ b/src/mame/video/speedbal.c @@ -109,12 +109,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipx = flipy = 1; } - drawgfx (bitmap,machine->gfx[2], + drawgfx_transpen (bitmap,cliprect,machine->gfx[2], code, color, flipx,flipy, - x,y, - cliprect,TRANSPARENCY_PEN,0); + x,y,0); } } diff --git a/src/mame/video/speedspn.c b/src/mame/video/speedspn.c index c9a3fec75bd..37083574c35 100644 --- a/src/mame/video/speedspn.c +++ b/src/mame/video/speedspn.c @@ -78,12 +78,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta tileno += ((attr & 0xe0) >> 5) * 0x100; color = attr & 0x0f; - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,cliprect,gfx, tileno, color, 0,0, - xpos,ypos, - cliprect,TRANSPARENCY_PEN,15); + xpos,ypos,15); source +=4; } diff --git a/src/mame/video/splash.c b/src/mame/video/splash.c index 1eb0a93fba8..4366a74ba2f 100644 --- a/src/mame/video/splash.c +++ b/src/mame/video/splash.c @@ -225,10 +225,9 @@ static void splash_draw_sprites(running_machine *machine, bitmap_t *bitmap,const if (attr2 & 0x80) sx += 256; - drawgfx(bitmap,gfx,number, + drawgfx_transpen(bitmap,cliprect,gfx,number, 0x10 + (attr2 & 0x0f),attr & 0x40,attr & 0x80, - sx-8,sy, - cliprect,TRANSPARENCY_PEN,0); + sx-8,sy,0); } } @@ -244,10 +243,9 @@ static void funystrp_draw_sprites(running_machine *machine, bitmap_t *bitmap,con int attr2 = splash_spriteram[i+0x400] >> splash_sprite_attr2_shift; int number = (splash_spriteram[i] & 0xff) + (attr & 0xf)*256; - drawgfx(bitmap,gfx,number, + drawgfx_transpen(bitmap,cliprect,gfx,number, (attr2 & 0x7f),attr & 0x40,attr & 0x80, - sx-8,sy, - cliprect,TRANSPARENCY_PEN,0); + sx-8,sy,0); } } diff --git a/src/mame/video/sprcros2.c b/src/mame/video/sprcros2.c index c5e8a582058..f06a1b6b19f 100644 --- a/src/mame/video/sprcros2.c +++ b/src/mame/video/sprcros2.c @@ -174,12 +174,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transmask(bitmap,cliprect,machine->gfx[1], sprcros2_spriteram[offs], color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); } } diff --git a/src/mame/video/sprint2.c b/src/mame/video/sprint2.c index ee3ec74c788..f802afbc080 100644 --- a/src/mame/video/sprint2.c +++ b/src/mame/video/sprint2.c @@ -131,13 +131,12 @@ VIDEO_UPDATE( sprint2 ) for (i = 0; i < 4; i++) { - drawgfx(bitmap, screen->machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], get_sprite_code(i), i, 0, 0, get_sprite_x(i), - get_sprite_y(i), - cliprect, TRANSPARENCY_PEN, 0); + get_sprite_y(i), 0); } return 0; } @@ -179,13 +178,12 @@ VIDEO_EOF( sprint2 ) tilemap_draw(helper, &rect, bg_tilemap, 0, 0); - drawgfx(helper, machine->gfx[1], + drawgfx_transpen(helper, &rect, machine->gfx[1], get_sprite_code(i), 0, 0, 0, get_sprite_x(i), - get_sprite_y(i), - &rect, TRANSPARENCY_PEN, 1); + get_sprite_y(i), 1); collision[i] |= collision_check(machine->colortable, &rect); @@ -194,22 +192,20 @@ VIDEO_EOF( sprint2 ) for (j = 0; j < 4; j++) if (j != i) { - drawgfx(helper, machine->gfx[1], + drawgfx_transpen(helper, &rect, machine->gfx[1], get_sprite_code(j), 1, 0, 0, get_sprite_x(j), - get_sprite_y(j), - &rect, TRANSPARENCY_PEN, 0); + get_sprite_y(j), 0); } - drawgfx(helper, machine->gfx[1], + drawgfx_transpen(helper, &rect, machine->gfx[1], get_sprite_code(i), 0, 0, 0, get_sprite_x(i), - get_sprite_y(i), - &rect, TRANSPARENCY_PEN, 1); + get_sprite_y(i), 1); collision[i] |= collision_check(machine->colortable, &rect); } diff --git a/src/mame/video/sprint4.c b/src/mame/video/sprint4.c index f871548cf69..d18edbda096 100644 --- a/src/mame/video/sprint4.c +++ b/src/mame/video/sprint4.c @@ -77,13 +77,12 @@ VIDEO_UPDATE( sprint4 ) if (i & 1) bank = 32; - drawgfx(bitmap, screen->machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], (code >> 3) | bank, (attr & 0x80) ? 4 : i, 0, 0, horz - 15, - vert - 15, - cliprect, TRANSPARENCY_PEN, 0); + vert - 15, 0); } return 0; } @@ -122,13 +121,12 @@ VIDEO_EOF( sprint4 ) if (i & 1) bank = 32; - drawgfx(helper, machine->gfx[1], + drawgfx_transpen(helper, &rect, machine->gfx[1], (code >> 3) | bank, 4, 0, 0, horz - 15, - vert - 15, - &rect, TRANSPARENCY_PEN, 1); + vert - 15, 1); for (y = rect.min_y; y <= rect.max_y; y++) for (x = rect.min_x; x <= rect.max_x; x++) diff --git a/src/mame/video/sprint8.c b/src/mame/video/sprint8.c index a3435f04e12..79bc742f6bd 100644 --- a/src/mame/video/sprint8.c +++ b/src/mame/video/sprint8.c @@ -150,12 +150,11 @@ static void draw_sprites(running_machine *machine, bitmap_t* bitmap, const recta if (code & 0x80) x |= 0x100; - drawgfx(bitmap, machine->gfx[2], + drawgfx_transpen(bitmap, cliprect, machine->gfx[2], code ^ 7, i, !(code & 0x10), !(code & 0x08), - 496 - x, y - 31, - cliprect, TRANSPARENCY_PEN, 0); + 496 - x, y - 31, 0); } } diff --git a/src/mame/video/srmp2.c b/src/mame/video/srmp2.c index a389af8a056..f8bc9feb28a 100644 --- a/src/mame/video/srmp2.c +++ b/src/mame/video/srmp2.c @@ -107,13 +107,12 @@ static void srmp2_draw_sprites(running_machine *machine, bitmap_t *bitmap, const if (srmp2_color_bank) color |= 0x20; - drawgfx(bitmap, machine->gfx[0], + drawgfx_transpen(bitmap, cliprect, machine->gfx[0], code, color, flipx, flipy, (x + xoffs) & 0x1ff, - max_y - ((y + yoffs) & 0x0ff), - cliprect, TRANSPARENCY_PEN, 15); + max_y - ((y + yoffs) & 0x0ff), 15); } } @@ -173,12 +172,12 @@ static void srmp3_draw_sprites_map(running_machine *machine, bitmap_t *bitmap, c code = code & 0x1fff; #define DRAWTILE(_x_, _y_) \ - drawgfx(bitmap, machine->gfx[0], \ + drawgfx_transpen(bitmap, \ + cliprect, machine->gfx[0], \ code, \ color, \ flipx, flipy, \ - _x_, _y_, \ - cliprect, TRANSPARENCY_PEN, 0); + _x_, _y_, 0); DRAWTILE(sx - 0x000, sy + 0x000) DRAWTILE(sx - 0x200, sy + 0x000) @@ -264,13 +263,12 @@ static void srmp3_draw_sprites(running_machine *machine, bitmap_t *bitmap, const flipy = !flipy; } - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect, machine->gfx[0], code, color, flipx, flipy, (x + xoffs) & 0x1ff, - max_y - ((y + yoffs) & 0x0ff), - cliprect, TRANSPARENCY_PEN, 0); + max_y - ((y + yoffs) & 0x0ff), 0); } } @@ -337,12 +335,12 @@ static void mjyuugi_draw_sprites_map(running_machine *machine, bitmap_t *bitmap, code = (code & 0x3fff) + (gfxbank ? 0x4000 : 0); #define DRAWTILE(_x_, _y_) \ - drawgfx(bitmap, machine->gfx[0], \ + drawgfx_transpen(bitmap, \ + cliprect, machine->gfx[0], \ code, \ color, \ flipx, flipy, \ - _x_, _y_, \ - cliprect, TRANSPARENCY_PEN, 0); + _x_, _y_, 0); DRAWTILE(sx - 0x000, sy + 0x000) DRAWTILE(sx - 0x200, sy + 0x000) @@ -421,13 +419,12 @@ static void mjyuugi_draw_sprites(running_machine *machine, bitmap_t *bitmap, con flipy = !flipy; } - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect, machine->gfx[0], code, color, flipx, flipy, (x + xoffs) & 0x1ff, - max_y - ((y + yoffs) & 0x0ff), - cliprect, TRANSPARENCY_PEN, 0); + max_y - ((y + yoffs) & 0x0ff), 0); } } diff --git a/src/mame/video/srumbler.c b/src/mame/video/srumbler.c index 584d7d54b2d..702ed11c8e3 100644 --- a/src/mame/video/srumbler.c +++ b/src/mame/video/srumbler.c @@ -149,12 +149,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code, colour, flip_screen_get(machine),flipy, - sx, sy, - cliprect,TRANSPARENCY_PEN,15); + sx, sy,15); } } diff --git a/src/mame/video/sshangha.c b/src/mame/video/sshangha.c index 92845c13b4b..6ede42253a2 100644 --- a/src/mame/video/sshangha.c +++ b/src/mame/video/sshangha.c @@ -96,12 +96,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta while (multi >= 0) { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x,y + mult * multi,0); multi--; } diff --git a/src/mame/video/sslam.c b/src/mame/video/sslam.c index bd2081b8d8b..e19fc44893d 100644 --- a/src/mame/video/sslam.c +++ b/src/mame/video/sslam.c @@ -44,28 +44,28 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { if (flipx) { - drawgfx(bitmap,gfx,number, colr,1,0,xpos+8,ypos, cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,gfx,number+1,colr,1,0,xpos+8,ypos+8,cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,gfx,number+2,colr,1,0,xpos, ypos, cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,gfx,number+3,colr,1,0,xpos, ypos+8,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,number, colr,1,0,xpos+8,ypos,0); + drawgfx_transpen(bitmap,cliprect,gfx,number+1,colr,1,0,xpos+8,ypos+8,0); + drawgfx_transpen(bitmap,cliprect,gfx,number+2,colr,1,0,xpos, ypos,0); + drawgfx_transpen(bitmap,cliprect,gfx,number+3,colr,1,0,xpos, ypos+8,0); } else { - drawgfx(bitmap,gfx,number, colr,0,0,xpos, ypos, cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,gfx,number+1,colr,0,0,xpos, ypos+8,cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,gfx,number+2,colr,0,0,xpos+8,ypos, cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,gfx,number+3,colr,0,0,xpos+8,ypos+8,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,number, colr,0,0,xpos, ypos,0); + drawgfx_transpen(bitmap,cliprect,gfx,number+1,colr,0,0,xpos, ypos+8,0); + drawgfx_transpen(bitmap,cliprect,gfx,number+2,colr,0,0,xpos+8,ypos,0); + drawgfx_transpen(bitmap,cliprect,gfx,number+3,colr,0,0,xpos+8,ypos+8,0); } } else { if (flipx) { - drawgfx(bitmap,gfx,number ^ 2,colr,1,0,xpos,ypos,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,number ^ 2,colr,1,0,xpos,ypos,0); } else { - drawgfx(bitmap,gfx,number,colr,0,0,xpos,ypos,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,number,colr,0,0,xpos,ypos,0); } } diff --git a/src/mame/video/ssozumo.c b/src/mame/video/ssozumo.c index a47ba258a18..eb2adf27503 100644 --- a/src/mame/video/ssozumo.c +++ b/src/mame/video/ssozumo.c @@ -162,12 +162,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[2], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[2], code, color, flipx, flipy, - sx, sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx, sy, 0); } } } diff --git a/src/mame/video/sspeedr.c b/src/mame/video/sspeedr.c index f12139b836d..dfde6b44dd0 100644 --- a/src/mame/video/sspeedr.c +++ b/src/mame/video/sspeedr.c @@ -211,14 +211,13 @@ static void draw_drones(running_machine *machine, bitmap_t* bitmap, const rectan y = 0xf0 - drones_vert[i >> 1]; - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[1], code[i] ^ toggle, 0, 0, 0, x, - y, - cliprect, - TRANSPARENCY_PEN, 0); + y, 0); } } @@ -242,14 +241,13 @@ static void draw_driver(running_machine *machine, bitmap_t* bitmap, const rectan y = 0xf0 - driver_vert; - drawgfx(bitmap, machine->gfx[0], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[0], driver_pic, 0, 0, 0, x, - y, - cliprect, - TRANSPARENCY_PEN, 0); + y, 0); } diff --git a/src/mame/video/ssrj.c b/src/mame/video/ssrj.c index dbc05e4750e..77646ff259e 100644 --- a/src/mame/video/ssrj.c +++ b/src/mame/video/ssrj.c @@ -239,15 +239,14 @@ static void draw_objects(running_machine *machine, bitmap_t *bitmap, const recta { int code; code=ssrj_vram3[(i*5+k)*64+(31-j)*2]+256*ssrj_vram3[(i*5+k)*64+(31-j)*2+1]; - drawgfx(bitmap, - machine->gfx[0], + drawgfx_transpen(bitmap, + cliprect,machine->gfx[0], code&1023, ((code>>12)&0x3)+8, code&0x8000, code&0x4000, (247-(x+(j<<3)))&0xff, y, - cliprect,TRANSPARENCY_PEN, 0); } } diff --git a/src/mame/video/ssv.c b/src/mame/video/ssv.c index 41086e18205..2299a24349f 100644 --- a/src/mame/video/ssv.c +++ b/src/mame/video/ssv.c @@ -143,9 +143,9 @@ Note: press Z to show some info on each sprite (debug builds only) static int shadow_pen_mask, shadow_pen_shift; -static void ssv_drawgfx( bitmap_t *bitmap, const gfx_element *gfx, +static void ssv_drawgfx( bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,int x0,int y0, - const rectangle *cliprect, int shadow ) + int shadow ) { const UINT8 *addr, *source; UINT8 pen; @@ -701,12 +701,12 @@ static void draw_row(running_machine *machine, bitmap_t *bitmap, const rectangle { for (ty = ystart; ty != yend; ty += yinc) { - ssv_drawgfx( bitmap, machine->gfx[gfx], + ssv_drawgfx( bitmap, &clip, machine->gfx[gfx], code++, color, flipx, flipy, sx + tx * 16, sy + ty * 8, - &clip, shadow ); + shadow ); } /* ty */ } /* tx */ @@ -890,12 +890,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { for (y = ystart; y != yend; y += yinc) { - ssv_drawgfx( bitmap, machine->gfx[gfx], + ssv_drawgfx( bitmap, cliprect, machine->gfx[gfx], code++, color, flipx, flipy, sx + x * 16, sy + y * 8, - cliprect, shadow ); + shadow ); } } @@ -1067,13 +1067,12 @@ static void gdfs_draw_zooming_sprites(running_machine *machine, bitmap_t *bitmap { for (y = ystart; y != yend; y += yinc) { - drawgfxzoom( bitmap, machine->gfx[2], + drawgfxzoom_transpen( bitmap, cliprect, machine->gfx[2], code++, color, flipx, flipy, (sx + x * xdim) / 0x10000, (sy + y * ydim) / 0x10000, - cliprect, TRANSPARENCY_PEN, 0, - xscale, yscale + xscale, yscale, 0 ); } } diff --git a/src/mame/video/st0016.c b/src/mame/video/st0016.c index 92b4f71b54c..48351ab08b6 100644 --- a/src/mame/video/st0016.c +++ b/src/mame/video/st0016.c @@ -511,12 +511,11 @@ static void draw_bgmap(running_machine *machine, bitmap_t *bitmap,const rectangl if(priority) { - drawgfx(bitmap,gfx, + drawgfx_transpen(bitmap,cliprect,gfx, code, color, flipx,flipy, - x*8+spr_dx,y*8+spr_dy, - cliprect,TRANSPARENCY_PEN,0); + x*8+spr_dx,y*8+spr_dy,0); } else { diff --git a/src/mame/video/stadhero.c b/src/mame/video/stadhero.c index 19f98d45caa..13ab1e99a4d 100644 --- a/src/mame/video/stadhero.c +++ b/src/mame/video/stadhero.c @@ -72,12 +72,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan while (multi >= 0) { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x,y + mult * multi,0); multi--; } } diff --git a/src/mame/video/starcrus.c b/src/mame/video/starcrus.c index 95183acf8f9..b6cb92b527a 100644 --- a/src/mame/video/starcrus.c +++ b/src/mame/video/starcrus.c @@ -214,26 +214,22 @@ static int collision_check_s1s2(running_machine *machine) org_y = s1_y; /* Draw ship 1 */ - drawgfx(ship1_vid, + drawgfx_opaque(ship1_vid, + &clip, machine->gfx[8+((s1_sprite&0x04)>>2)], (s1_sprite&0x03)^0x03, 0, (s1_sprite&0x08)>>3,(s1_sprite&0x10)>>4, - s1_x-org_x,s1_y-org_y, - &clip, - TRANSPARENCY_NONE, - 0); + s1_x-org_x,s1_y-org_y); /* Draw ship 2 */ - drawgfx(ship2_vid, + drawgfx_opaque(ship2_vid, + &clip, machine->gfx[10+((s2_sprite&0x04)>>2)], (s2_sprite&0x03)^0x03, 0, (s2_sprite&0x08)>>3,(s2_sprite&0x10)>>4, - s2_x-org_x,s2_y-org_y, - &clip, - TRANSPARENCY_NONE, - 0); + s2_x-org_x,s2_y-org_y); /* Now check for collisions */ for (sy=0;sy<16;sy++) @@ -274,29 +270,25 @@ static int collision_check_p1p2(running_machine *machine) if (p1_sprite & 0x08) /* if p1 is a projectile */ { /* Draw score/projectile 1 */ - drawgfx(proj1_vid, + drawgfx_opaque(proj1_vid, + &clip, machine->gfx[(p1_sprite&0x0c)>>2], (p1_sprite&0x03)^0x03, 0, 0,0, - p1_x-org_x,p1_y-org_y, - &clip, - TRANSPARENCY_NONE, - 0); + p1_x-org_x,p1_y-org_y); } if (p2_sprite & 0x08) /* if p2 is a projectile */ { /* Draw score/projectile 2 */ - drawgfx(proj2_vid, + drawgfx_opaque(proj2_vid, + &clip, machine->gfx[4+((p2_sprite&0x0c)>>2)], (p2_sprite&0x03)^0x03, 0, 0,0, - p2_x-org_x,p2_y-org_y, - &clip, - TRANSPARENCY_NONE, - 0); + p2_x-org_x,p2_y-org_y); } /* Now check for collisions */ @@ -337,42 +329,36 @@ static int collision_check_s1p1p2(running_machine *machine) org_y = s1_y; /* Draw ship 1 */ - drawgfx(ship1_vid, + drawgfx_opaque(ship1_vid, + &clip, machine->gfx[8+((s1_sprite&0x04)>>2)], (s1_sprite&0x03)^0x03, 0, (s1_sprite&0x08)>>3,(s1_sprite&0x10)>>4, - s1_x-org_x,s1_y-org_y, - &clip, - TRANSPARENCY_NONE, - 0); + s1_x-org_x,s1_y-org_y); if (p1_sprite & 0x08) /* if p1 is a projectile */ { /* Draw projectile 1 */ - drawgfx(proj1_vid, + drawgfx_opaque(proj1_vid, + &clip, machine->gfx[(p1_sprite&0x0c)>>2], (p1_sprite&0x03)^0x03, 0, 0,0, - p1_x-org_x,p1_y-org_y, - &clip, - TRANSPARENCY_NONE, - 0); + p1_x-org_x,p1_y-org_y); } if (p2_sprite & 0x08) /* if p2 is a projectile */ { /* Draw projectile 2 */ - drawgfx(proj2_vid, + drawgfx_opaque(proj2_vid, + &clip, machine->gfx[4+((p2_sprite&0x0c)>>2)], (p2_sprite&0x03)^0x03, 0, 0,0, - p2_x-org_x,p2_y-org_y, - &clip, - TRANSPARENCY_NONE, - 0); + p2_x-org_x,p2_y-org_y); } /* Now check for collisions */ @@ -419,42 +405,36 @@ static int collision_check_s2p1p2(running_machine *machine) org_y = s2_y; /* Draw ship 2 */ - drawgfx(ship2_vid, + drawgfx_opaque(ship2_vid, + &clip, machine->gfx[10+((s2_sprite&0x04)>>2)], (s2_sprite&0x03)^0x03, 0, (s2_sprite&0x08)>>3,(s2_sprite&0x10)>>4, - s2_x-org_x,s2_y-org_y, - &clip, - TRANSPARENCY_NONE, - 0); + s2_x-org_x,s2_y-org_y); if (p1_sprite & 0x08) /* if p1 is a projectile */ { /* Draw projectile 1 */ - drawgfx(proj1_vid, + drawgfx_opaque(proj1_vid, + &clip, machine->gfx[(p1_sprite&0x0c)>>2], (p1_sprite&0x03)^0x03, 0, 0,0, - p1_x-org_x,p1_y-org_y, - &clip, - TRANSPARENCY_NONE, - 0); + p1_x-org_x,p1_y-org_y); } if (p2_sprite & 0x08) /* if p2 is a projectile */ { /* Draw projectile 2 */ - drawgfx(proj2_vid, + drawgfx_opaque(proj2_vid, + &clip, machine->gfx[4+((p2_sprite&0x0c)>>2)], (p2_sprite&0x03)^0x03, 0, 0,0, - p2_x-org_x,p2_y-org_y, - &clip, - TRANSPARENCY_NONE, - 0); + p2_x-org_x,p2_y-org_y); } /* Now check for collisions */ @@ -478,47 +458,43 @@ VIDEO_UPDATE( starcrus ) bitmap_fill(bitmap,cliprect,0); /* Draw ship 1 */ - drawgfx(bitmap, + drawgfx_transpen(bitmap, + cliprect, screen->machine->gfx[8+((s1_sprite&0x04)>>2)], (s1_sprite&0x03)^0x03, 0, (s1_sprite&0x08)>>3,(s1_sprite&0x10)>>4, s1_x,s1_y, - cliprect, - TRANSPARENCY_PEN, 0); /* Draw ship 2 */ - drawgfx(bitmap, + drawgfx_transpen(bitmap, + cliprect, screen->machine->gfx[10+((s2_sprite&0x04)>>2)], (s2_sprite&0x03)^0x03, 0, (s2_sprite&0x08)>>3,(s2_sprite&0x10)>>4, s2_x,s2_y, - cliprect, - TRANSPARENCY_PEN, 0); /* Draw score/projectile 1 */ - drawgfx(bitmap, + drawgfx_transpen(bitmap, + cliprect, screen->machine->gfx[(p1_sprite&0x0c)>>2], (p1_sprite&0x03)^0x03, 0, 0,0, p1_x,p1_y, - cliprect, - TRANSPARENCY_PEN, 0); /* Draw score/projectile 2 */ - drawgfx(bitmap, + drawgfx_transpen(bitmap, + cliprect, screen->machine->gfx[4+((p2_sprite&0x0c)>>2)], (p2_sprite&0x03)^0x03, 0, 0,0, p2_x,p2_y, - cliprect, - TRANSPARENCY_PEN, 0); /* Collision detection */ diff --git a/src/mame/video/starshp1.c b/src/mame/video/starshp1.c index cd01d966746..c5071848ec6 100644 --- a/src/mame/video/starshp1.c +++ b/src/mame/video/starshp1.c @@ -212,13 +212,12 @@ static void draw_sprites(running_machine *machine, bitmap_t* bitmap, const recta { int code = (starshp1_obj_ram[i] & 0xf) ^ 0xf; - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code % 8, code / 8, 0, 0, get_sprite_hpos(i), - get_sprite_vpos(i), - cliprect, TRANSPARENCY_PEN, 0); + get_sprite_vpos(i), 0); } } @@ -239,13 +238,12 @@ static void draw_spaceship(running_machine *machine, bitmap_t* bitmap, const rec if (y <= 0) y -= (yzoom * starshp1_ship_voffset) >> 16; - drawgfxzoom(bitmap, machine->gfx[2], + drawgfxzoom_transpen(bitmap, cliprect, machine->gfx[2], starshp1_ship_picture & 0x03, starshp1_ship_explode, starshp1_ship_picture & 0x80, 0, x, y, - cliprect, TRANSPARENCY_PEN, 0, - xzoom, yzoom); + xzoom, yzoom, 0); } diff --git a/src/mame/video/stfight.c b/src/mame/video/stfight.c index 09254669d04..2b3c5d524ee 100644 --- a/src/mame/video/stfight.c +++ b/src/mame/video/stfight.c @@ -281,13 +281,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta code = stfight_sprite_base + stfight_sprite_ram[offs]; - pdrawgfx(bitmap,machine->gfx[4], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[4], code, color, flipx,flip_screen_get(machine), sx,sy, - cliprect,TRANSPARENCY_PEN,0x0f, - pri ? 0x02 : 0); + priority_bitmap, + pri ? 0x02 : 0,0x0f); } } } diff --git a/src/mame/video/stlforce.c b/src/mame/video/stlforce.c index 94d32d1399f..3e9431f2f03 100644 --- a/src/mame/video/stlforce.c +++ b/src/mame/video/stlforce.c @@ -114,14 +114,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta ypos = 512-ypos; - drawgfx( bitmap, + drawgfx_transpen( bitmap, + cliprect, gfx, num, 64+attr, 0,0, - xpos+stlforce_sprxoffs,ypos, - cliprect, - TRANSPARENCY_PEN,0 ); + xpos+stlforce_sprxoffs,ypos,0 ); } source += 0x4; diff --git a/src/mame/video/strnskil.c b/src/mame/video/strnskil.c index 5d63c188a6c..6d3bd6b8706 100644 --- a/src/mame/video/strnskil.c +++ b/src/mame/video/strnskil.c @@ -111,12 +111,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (sx > 248) sx = sx - 256; - drawgfx(bitmap, machine->gfx[1], + drawgfx_transmask(bitmap, cliprect, + machine->gfx[1], code, color, flipx, flipy, px, py, - cliprect, - TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, 0)); } } diff --git a/src/mame/video/stvvdp2.c b/src/mame/video/stvvdp2.c index a4944bff660..06fe9bc7b7a 100644 --- a/src/mame/video/stvvdp2.c +++ b/src/mame/video/stvvdp2.c @@ -2392,10 +2392,10 @@ INLINE UINT16 stv_add_blend(UINT16 a, UINT16 b) } -static void stv_vdp2_drawgfxzoom( running_machine *machine, - bitmap_t *dest_bmp,const gfx_element *gfx, +static void stv_vdp2_drawgfxzoom( + bitmap_t *dest_bmp,const rectangle *clip,const gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, - const rectangle *clip,int transparency,int transparent_color,int scalex, int scaley, + int transparency,int transparent_color,int scalex, int scaley, int sprite_screen_width, int sprite_screen_height, int alpha) { rectangle myclip; @@ -2449,7 +2449,7 @@ static void stv_vdp2_drawgfxzoom( running_machine *machine, if( gfx ) { - const pen_t *pal = &machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; + const pen_t *pal = &gfx->machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; const UINT8 *source_base = gfx_element_get_data(gfx, code % gfx->total_elements); //int sprite_screen_height = (scaley*gfx->height+0x8000)>>16; @@ -2726,8 +2726,8 @@ static void stv_vdp2_compute_color_offset_RGB555_UINT16(UINT16 *rgb, int cor) *rgb = (_r << 10) | (_g << 5) | _b; } -static void stv_vdp2_drawgfx_rgb555( bitmap_t *dest_bmp, UINT32 code, int flipx, int flipy, - int sx, int sy, const rectangle *clip, int transparency, int alpha) +static void stv_vdp2_drawgfx_rgb555( bitmap_t *dest_bmp, const rectangle *clip, UINT32 code, int flipx, int flipy, + int sx, int sy, int transparency, int alpha) { rectangle myclip; UINT8* gfxdata; @@ -3711,15 +3711,15 @@ static void stv_vdp2_draw_basic_tilemap(running_machine *machine, bitmap_t *bitm if (stv2_current_tilemap.tile_size==1) { /* normal */ - stv_vdp2_drawgfxzoom(machine,bitmap,machine->gfx[gfx],tilecode+(0+(flipyx&1)+(flipyx&2))*tilecodespacing,pal,flipyx&1,flipyx&2,drawxpos >> 16, drawypos >> 16,cliprect,stv2_current_tilemap.transparency,0,scalex,scaley,SCR_TILESIZE_X, SCR_TILESIZE_Y,stv2_current_tilemap.alpha); - stv_vdp2_drawgfxzoom(machine,bitmap,machine->gfx[gfx],tilecode+(1-(flipyx&1)+(flipyx&2))*tilecodespacing,pal,flipyx&1,flipyx&2,(drawxpos+tilesizex) >> 16,drawypos >> 16,cliprect,stv2_current_tilemap.transparency,0,scalex,scaley,SCR_TILESIZE_X1(tilesizex), SCR_TILESIZE_Y,stv2_current_tilemap.alpha); - stv_vdp2_drawgfxzoom(machine,bitmap,machine->gfx[gfx],tilecode+(2+(flipyx&1)-(flipyx&2))*tilecodespacing,pal,flipyx&1,flipyx&2,drawxpos >> 16,(drawypos+tilesizey) >> 16,cliprect,stv2_current_tilemap.transparency,0,scalex,scaley,SCR_TILESIZE_X, SCR_TILESIZE_Y1(tilesizey),stv2_current_tilemap.alpha); - stv_vdp2_drawgfxzoom(machine,bitmap,machine->gfx[gfx],tilecode+(3-(flipyx&1)-(flipyx&2))*tilecodespacing,pal,flipyx&1,flipyx&2,(drawxpos+tilesizex)>> 16,(drawypos+tilesizey) >> 16,cliprect,stv2_current_tilemap.transparency,0,scalex,scaley,SCR_TILESIZE_X1(tilesizex), SCR_TILESIZE_Y1(tilesizey),stv2_current_tilemap.alpha); + stv_vdp2_drawgfxzoom(bitmap,cliprect,machine->gfx[gfx],tilecode+(0+(flipyx&1)+(flipyx&2))*tilecodespacing,pal,flipyx&1,flipyx&2,drawxpos >> 16, drawypos >> 16,stv2_current_tilemap.transparency,0,scalex,scaley,SCR_TILESIZE_X, SCR_TILESIZE_Y,stv2_current_tilemap.alpha); + stv_vdp2_drawgfxzoom(bitmap,cliprect,machine->gfx[gfx],tilecode+(1-(flipyx&1)+(flipyx&2))*tilecodespacing,pal,flipyx&1,flipyx&2,(drawxpos+tilesizex) >> 16,drawypos >> 16,stv2_current_tilemap.transparency,0,scalex,scaley,SCR_TILESIZE_X1(tilesizex), SCR_TILESIZE_Y,stv2_current_tilemap.alpha); + stv_vdp2_drawgfxzoom(bitmap,cliprect,machine->gfx[gfx],tilecode+(2+(flipyx&1)-(flipyx&2))*tilecodespacing,pal,flipyx&1,flipyx&2,drawxpos >> 16,(drawypos+tilesizey) >> 16,stv2_current_tilemap.transparency,0,scalex,scaley,SCR_TILESIZE_X, SCR_TILESIZE_Y1(tilesizey),stv2_current_tilemap.alpha); + stv_vdp2_drawgfxzoom(bitmap,cliprect,machine->gfx[gfx],tilecode+(3-(flipyx&1)-(flipyx&2))*tilecodespacing,pal,flipyx&1,flipyx&2,(drawxpos+tilesizex)>> 16,(drawypos+tilesizey) >> 16,stv2_current_tilemap.transparency,0,scalex,scaley,SCR_TILESIZE_X1(tilesizex), SCR_TILESIZE_Y1(tilesizey),stv2_current_tilemap.alpha); } else { - stv_vdp2_drawgfxzoom(machine,bitmap,machine->gfx[gfx],tilecode,pal,flipyx&1,flipyx&2, drawxpos >> 16, drawypos >> 16,cliprect,stv2_current_tilemap.transparency,0,scalex,scaley,SCR_TILESIZE_X,SCR_TILESIZE_Y,stv2_current_tilemap.alpha); + stv_vdp2_drawgfxzoom(bitmap,cliprect,machine->gfx[gfx],tilecode,pal,flipyx&1,flipyx&2, drawxpos >> 16, drawypos >> 16,stv2_current_tilemap.transparency,0,scalex,scaley,SCR_TILESIZE_X,SCR_TILESIZE_Y,stv2_current_tilemap.alpha); } } else @@ -3732,10 +3732,10 @@ static void stv_vdp2_draw_basic_tilemap(running_machine *machine, bitmap_t *bitm if ( stv2_current_tilemap.colour_depth == 3 ) { /* normal */ - stv_vdp2_drawgfx_rgb555(bitmap,tilecode+(0+(flipyx&1)+(flipyx&2))*4,flipyx&1,flipyx&2,drawxpos, drawypos,cliprect,stv2_current_tilemap.transparency,stv2_current_tilemap.alpha); - stv_vdp2_drawgfx_rgb555(bitmap,tilecode+(1-(flipyx&1)+(flipyx&2))*4,flipyx&1,flipyx&2,drawxpos+8,drawypos,cliprect,stv2_current_tilemap.transparency,stv2_current_tilemap.alpha); - stv_vdp2_drawgfx_rgb555(bitmap,tilecode+(2+(flipyx&1)-(flipyx&2))*4,flipyx&1,flipyx&2,drawxpos,drawypos+8,cliprect,stv2_current_tilemap.transparency,stv2_current_tilemap.alpha); - stv_vdp2_drawgfx_rgb555(bitmap,tilecode+(3-(flipyx&1)-(flipyx&2))*4,flipyx&1,flipyx&2,drawxpos+8,drawypos+8,cliprect,stv2_current_tilemap.transparency,stv2_current_tilemap.alpha); + stv_vdp2_drawgfx_rgb555(bitmap,cliprect,tilecode+(0+(flipyx&1)+(flipyx&2))*4,flipyx&1,flipyx&2,drawxpos, drawypos,stv2_current_tilemap.transparency,stv2_current_tilemap.alpha); + stv_vdp2_drawgfx_rgb555(bitmap,cliprect,tilecode+(1-(flipyx&1)+(flipyx&2))*4,flipyx&1,flipyx&2,drawxpos+8,drawypos,stv2_current_tilemap.transparency,stv2_current_tilemap.alpha); + stv_vdp2_drawgfx_rgb555(bitmap,cliprect,tilecode+(2+(flipyx&1)-(flipyx&2))*4,flipyx&1,flipyx&2,drawxpos,drawypos+8,stv2_current_tilemap.transparency,stv2_current_tilemap.alpha); + stv_vdp2_drawgfx_rgb555(bitmap,cliprect,tilecode+(3-(flipyx&1)-(flipyx&2))*4,flipyx&1,flipyx&2,drawxpos+8,drawypos+8,stv2_current_tilemap.transparency,stv2_current_tilemap.alpha); } else if (stv2_current_tilemap.transparency == STV_TRANSPARENCY_ALPHA) @@ -3761,7 +3761,7 @@ static void stv_vdp2_draw_basic_tilemap(running_machine *machine, bitmap_t *bitm { if ( stv2_current_tilemap.colour_depth == 3 ) { - stv_vdp2_drawgfx_rgb555(bitmap,tilecode,flipyx&1,flipyx&2,drawxpos,drawypos,cliprect,stv2_current_tilemap.transparency,stv2_current_tilemap.alpha); + stv_vdp2_drawgfx_rgb555(bitmap,cliprect,tilecode,flipyx&1,flipyx&2,drawxpos,drawypos,stv2_current_tilemap.transparency,stv2_current_tilemap.alpha); } else { diff --git a/src/mame/video/subs.c b/src/mame/video/subs.c index bb6e836b36f..d7e9fc67a8d 100644 --- a/src/mame/video/subs.c +++ b/src/mame/video/subs.c @@ -78,30 +78,26 @@ VIDEO_UPDATE( subs ) if (screen == left_screen) { if ((left_enable || left_sonar_window) && (!right_sonar_window)) - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0], charcode, 1, - 0,0,sx,sy, - cliprect,TRANSPARENCY_NONE,0); + 0,0,sx,sy); else - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0], 0, 1, - 0,0,sx,sy, - cliprect,TRANSPARENCY_NONE,0); + 0,0,sx,sy); } /* draw the right screen */ if (screen == right_screen) { if ((right_enable || right_sonar_window) && (!left_sonar_window)) - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0], charcode, 0, - 0,0,sx,sy, - cliprect,TRANSPARENCY_NONE,0); + 0,0,sx,sy); else - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0], 0, 0, - 0,0,sx,sy, - cliprect,TRANSPARENCY_NONE,0); + 0,0,sx,sy); } } @@ -128,11 +124,10 @@ VIDEO_UPDATE( subs ) if (screen == left_screen) { if ((offs!=0) || (sub_enable)) - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], charcode + 32 * prom_set, 0, - 0,0,sx,sy, - cliprect,TRANSPARENCY_PEN,0); + 0,0,sx,sy,0); } @@ -140,11 +135,10 @@ VIDEO_UPDATE( subs ) if (screen == right_screen) { if ((offs!=1) || (sub_enable)) - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], charcode + 32 * prom_set, 0, - 0,0,sx,sy, - cliprect,TRANSPARENCY_PEN,0); + 0,0,sx,sy,0); } } diff --git a/src/mame/video/suna16.c b/src/mame/video/suna16.c index 98cae9e3a88..008dee9eca1 100644 --- a/src/mame/video/suna16.c +++ b/src/mame/video/suna16.c @@ -190,12 +190,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta tile_flipy = !tile_flipy; } - drawgfx( bitmap, machine->gfx[gfx], + drawgfx_transpen( bitmap, cliprect,machine->gfx[gfx], (tile & 0x3fff) + bank*0x4000, attr + (color_bank << 4), tile_flipx, tile_flipy, - sx, sy, - cliprect,TRANSPARENCY_PEN,15 ); + sx, sy,15 ); tile_x += tile_xinc; } diff --git a/src/mame/video/suna8.c b/src/mame/video/suna8.c index e4112e95a4b..d803c3ac81d 100644 --- a/src/mame/video/suna8.c +++ b/src/mame/video/suna8.c @@ -322,12 +322,11 @@ static void draw_normal_sprites(running_machine *machine, bitmap_t *bitmap,const { sx = max_x - sx; tile_flipx = !tile_flipx; sy = max_y - sy; tile_flipy = !tile_flipy; } - drawgfx( bitmap,machine->gfx[0], + drawgfx_transpen( bitmap,cliprect,machine->gfx[0], tile + (attr & 0x3)*0x100 + gfxbank, ((attr >> 2) & 0xf) | colorbank, // hardhea2 player2 tile_flipx, tile_flipy, - sx, sy, - cliprect,TRANSPARENCY_PEN,15); + sx, sy,15); } } @@ -387,12 +386,11 @@ static void draw_text_sprites(running_machine *machine, bitmap_t *bitmap,const r { sx = max_x - sx; flipx = !flipx; sy = max_y - sy; flipy = !flipy; } - drawgfx( bitmap,machine->gfx[0], + drawgfx_transpen( bitmap,cliprect,machine->gfx[0], tile + (attr & 0x3)*0x100 + bank, (attr >> 2) & 0xf, flipx, flipy, - sx, sy, - cliprect,TRANSPARENCY_PEN,15); + sx, sy,15); } } diff --git a/src/mame/video/supbtime.c b/src/mame/video/supbtime.c index eaa7c18e391..026f4f1808a 100644 --- a/src/mame/video/supbtime.c +++ b/src/mame/video/supbtime.c @@ -69,12 +69,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan while (multi >= 0) { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x,y + mult * multi,0); multi--; } diff --git a/src/mame/video/superchs.c b/src/mame/video/superchs.c index 1749c564a1c..f3d77cfb0ec 100644 --- a/src/mame/video/superchs.c +++ b/src/mame/video/superchs.c @@ -176,13 +176,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan } else { - drawgfxzoom(bitmap,machine->gfx[sprite_ptr->gfx], + drawgfxzoom_transpen(bitmap,cliprect,machine->gfx[sprite_ptr->gfx], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0, - sprite_ptr->zoomx,sprite_ptr->zoomy); + sprite_ptr->zoomx,sprite_ptr->zoomy,0); } } } @@ -196,14 +195,13 @@ logerror("Sprite number %04x had %02x invalid chunks\n",tilenum,bad_chunks); { sprite_ptr--; - pdrawgfxzoom(bitmap,machine->gfx[sprite_ptr->gfx], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[sprite_ptr->gfx], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0, sprite_ptr->zoomx,sprite_ptr->zoomy, - sprite_ptr->primask); + priority_bitmap,sprite_ptr->primask,0); } } diff --git a/src/mame/video/superqix.c b/src/mame/video/superqix.c index b23c43af639..afa0fe19bc0 100644 --- a/src/mame/video/superqix.c +++ b/src/mame/video/superqix.c @@ -186,12 +186,11 @@ static void pbillian_draw_sprites(running_machine *machine, bitmap_t *bitmap, co sy = 240 - sy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect, machine->gfx[1], code, color, flip_screen_get(machine), flip_screen_get(machine), - sx, sy, - cliprect, TRANSPARENCY_PEN, 0); + sx, sy, 0); } } @@ -217,12 +216,11 @@ static void superqix_draw_sprites(running_machine *machine, bitmap_t *bitmap,con flipy = !flipy; } - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect, machine->gfx[2], code, color, flipx, flipy, - sx, sy, - cliprect, TRANSPARENCY_PEN, 0); + sx, sy, 0); } } diff --git a/src/mame/video/suprridr.c b/src/mame/video/suprridr.c index 13840c01914..d4dff415c1c 100644 --- a/src/mame/video/suprridr.c +++ b/src/mame/video/suprridr.c @@ -213,7 +213,7 @@ VIDEO_UPDATE( suprridr ) fy = !fy; y = 240 - y; } - drawgfx(bitmap, screen->machine->gfx[2], code, color, fx, fy, x, y, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[2], code, color, fx, fy, x, y, 0); } return 0; } diff --git a/src/mame/video/suprslam.c b/src/mame/video/suprslam.c index edfbc538687..53c4fd56728 100644 --- a/src/mame/video/suprslam.c +++ b/src/mame/video/suprslam.c @@ -75,15 +75,15 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (!flipx) { for (xcnt = 0; xcnt < wide+1; xcnt ++) { int tileno = suprslam_sp_videoram[word_offset+loopno]; - drawgfxzoom(bitmap, gfx, tileno, col, 0, 0,xpos + xcnt * xzoom/2, ypos + ycnt * yzoom/2, cliprect, TRANSPARENCY_PEN, 15,xzoom << 11, yzoom << 11); - drawgfxzoom(bitmap, gfx, tileno, col, 0, 0,-0x200+xpos + xcnt * xzoom/2, ypos + ycnt * yzoom/2, cliprect, TRANSPARENCY_PEN, 15,xzoom << 11, yzoom << 11); + drawgfxzoom_transpen(bitmap, cliprect, gfx, tileno, col, 0, 0,xpos + xcnt * xzoom/2, ypos + ycnt * yzoom/2,xzoom << 11, yzoom << 11, 15); + drawgfxzoom_transpen(bitmap, cliprect, gfx, tileno, col, 0, 0,-0x200+xpos + xcnt * xzoom/2, ypos + ycnt * yzoom/2,xzoom << 11, yzoom << 11, 15); loopno ++; } } else { for (xcnt = wide; xcnt >= 0; xcnt --) { int tileno = suprslam_sp_videoram[word_offset+loopno]; - drawgfxzoom(bitmap, gfx, tileno, col, 1, 0,xpos + xcnt * xzoom/2, ypos + ycnt * yzoom/2, cliprect, TRANSPARENCY_PEN, 15,xzoom << 11, yzoom << 11); - drawgfxzoom(bitmap, gfx, tileno, col, 1, 0,-0x200+xpos + xcnt * xzoom/2, ypos + ycnt * yzoom/2, cliprect, TRANSPARENCY_PEN, 15,xzoom << 11, yzoom << 11); + drawgfxzoom_transpen(bitmap, cliprect, gfx, tileno, col, 1, 0,xpos + xcnt * xzoom/2, ypos + ycnt * yzoom/2,xzoom << 11, yzoom << 11, 15); + drawgfxzoom_transpen(bitmap, cliprect, gfx, tileno, col, 1, 0,-0x200+xpos + xcnt * xzoom/2, ypos + ycnt * yzoom/2,xzoom << 11, yzoom << 11, 15); loopno ++; } } diff --git a/src/mame/video/tagteam.c b/src/mame/video/tagteam.c index 16612dff0bb..7780ac169b3 100644 --- a/src/mame/video/tagteam.c +++ b/src/mame/video/tagteam.c @@ -157,12 +157,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[1], code, color, flipx, flipy, - sx, sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx, sy, 0); /* Wrap around */ @@ -170,12 +169,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta color = palettebank; sy += (flip_screen_get(machine) ? -256 : 256); - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[1], code, color, flipx, flipy, - sx, sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx, sy, 0); } } diff --git a/src/mame/video/tail2nos.c b/src/mame/video/tail2nos.c index ec92b6f8a6a..9a0ff4c3dae 100644 --- a/src/mame/video/tail2nos.c +++ b/src/mame/video/tail2nos.c @@ -145,12 +145,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan flipx = spriteram16[offs + 2] & 0x1000; flipy = spriteram16[offs + 2] & 0x0800; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,/* placement relative to zoom layer verified on the real thing */ + cliprect,machine->gfx[1], code, 40 + color, flipx,flipy, - sx+3,sy+1, /* placement relative to zoom layer verified on the real thing */ - cliprect,TRANSPARENCY_PEN,15); + sx+3,sy+1,15); } } diff --git a/src/mame/video/taito_f2.c b/src/mame/video/taito_f2.c index 4dab4477eb6..935055987e3 100644 --- a/src/mame/video/taito_f2.c +++ b/src/mame/video/taito_f2.c @@ -367,9 +367,9 @@ WRITE16_HANDLER( koshien_spritebank_w ) spritebank_buffered[7] = spritebank_buffered[6] + 0x400; } -static void taito_f2_tc360_spritemixdraw( bitmap_t *dest_bmp,const gfx_element *gfx, +static void taito_f2_tc360_spritemixdraw( bitmap_t *dest_bmp,const rectangle *clip,const gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, - const rectangle *clip,int scalex, int scaley) + int scalex, int scaley) { int pal_base = gfx->color_base + gfx->color_granularity * (color % gfx->total_colors); const UINT8 *source_base = gfx_element_get_data(gfx, code % gfx->total_elements); @@ -857,13 +857,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan } else { - drawgfxzoom(bitmap,machine->gfx[0], + drawgfxzoom_transpen(bitmap,cliprect,machine->gfx[0], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0, - sprite_ptr->zoomx,sprite_ptr->zoomy); + sprite_ptr->zoomx,sprite_ptr->zoomy,0); } } } @@ -875,21 +874,19 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan sprite_ptr--; if (!uses_tc360_mixer) - pdrawgfxzoom(bitmap,machine->gfx[0], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[0], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0, sprite_ptr->zoomx,sprite_ptr->zoomy, - sprite_ptr->primask); + priority_bitmap,sprite_ptr->primask,0); else - taito_f2_tc360_spritemixdraw(bitmap,machine->gfx[0], + taito_f2_tc360_spritemixdraw(bitmap,cliprect,machine->gfx[0], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect, sprite_ptr->zoomx,sprite_ptr->zoomy); } } diff --git a/src/mame/video/taito_f3.c b/src/mame/video/taito_f3.c index 8724733fbe6..bce9a26626c 100644 --- a/src/mame/video/taito_f3.c +++ b/src/mame/video/taito_f3.c @@ -2619,13 +2619,12 @@ static void scanline_draw(running_machine *machine, bitmap_t *bitmap, const rect dest++; \ pri++; -INLINE void f3_drawgfx( running_machine *machine, - bitmap_t *dest_bmp,const gfx_element *gfx, +INLINE void f3_drawgfx( + bitmap_t *dest_bmp,const rectangle *clip,const gfx_element *gfx, UINT32 code, UINT32 color, int flipx,int flipy, int sx,int sy, - const rectangle *clip, UINT8 pri_dst) { rectangle myclip; @@ -2651,7 +2650,7 @@ INLINE void f3_drawgfx( running_machine *machine, if( gfx ) { - const pen_t *pal = &machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; + const pen_t *pal = &gfx->machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; const UINT8 *code_base = gfx_element_get_data(gfx, code % gfx->total_elements); { @@ -2783,13 +2782,12 @@ INLINE void f3_drawgfx( running_machine *machine, #undef NEXT_P -INLINE void f3_drawgfxzoom(running_machine *machine, - bitmap_t *dest_bmp,const gfx_element *gfx, +INLINE void f3_drawgfxzoom( + bitmap_t *dest_bmp,const rectangle *clip,const gfx_element *gfx, UINT32 code, UINT32 color, int flipx,int flipy, int sx,int sy, - const rectangle *clip, int scalex, int scaley, UINT8 pri_dst) { @@ -2816,7 +2814,7 @@ INLINE void f3_drawgfxzoom(running_machine *machine, if( gfx ) { - const pen_t *pal = &machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; + const pen_t *pal = &gfx->machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; const UINT8 *code_base = gfx_element_get_data(gfx, code % gfx->total_elements); { @@ -3206,22 +3204,20 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta sprite_pri_usage|=1<<pri; if(sprite_ptr->zoomx==16 && sprite_ptr->zoomy==16) - f3_drawgfx(machine, - bitmap,sprite_gfx, + f3_drawgfx( + bitmap,cliprect,sprite_gfx, sprite_ptr->code, sprite_ptr->color & (~sprite_extra_planes), sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect, pri); else - f3_drawgfxzoom(machine, - bitmap,sprite_gfx, + f3_drawgfxzoom( + bitmap,cliprect,sprite_gfx, sprite_ptr->code, sprite_ptr->color & (~sprite_extra_planes), sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect, sprite_ptr->zoomx,sprite_ptr->zoomy, pri); } diff --git a/src/mame/video/taito_h.c b/src/mame/video/taito_h.c index 40c1022e834..1bd7a031051 100644 --- a/src/mame/video/taito_h.c +++ b/src/mame/video/taito_h.c @@ -164,14 +164,13 @@ static void syvalion_draw_sprites(running_machine *machine,bitmap_t *bitmap,cons flipy ^= 0x0080; } - drawgfxzoom( bitmap, machine -> gfx[0], + drawgfxzoom_transpen( bitmap, cliprect, + machine -> gfx[0], tile, color, flipx, flipy, x, y, - cliprect, - TRANSPARENCY_PEN, 0, - zx, zx + zx, zx, 0 ); } tile_offs ++; @@ -276,14 +275,13 @@ static void recordbr_draw_sprites(running_machine *machine, bitmap_t *bitmap, co flipy ^= 0x0080; } - drawgfxzoom( bitmap, machine -> gfx[0], + drawgfxzoom_transpen( bitmap, cliprect, + machine -> gfx[0], tile, color, flipx, flipy, x, y, - cliprect, - TRANSPARENCY_PEN, 0, - zx, zy + zx, zy, 0 ); } tile_offs ++; @@ -377,14 +375,13 @@ static void dleague_draw_sprites(running_machine *machine, bitmap_t *bitmap, con flipy ^= 0x0080; } - drawgfxzoom( bitmap, machine -> gfx[0], + drawgfxzoom_transpen( bitmap, cliprect, + machine -> gfx[0], tile, color, flipx, flipy, x, y, - cliprect, - TRANSPARENCY_PEN, 0, - zx, zx + zx, zx, 0 ); } tile_offs ++; diff --git a/src/mame/video/taito_l.c b/src/mame/video/taito_l.c index fe2c2d94726..30e0a650f66 100644 --- a/src/mame/video/taito_l.c +++ b/src/mame/video/taito_l.c @@ -277,13 +277,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan flipy = !flipy; } - pdrawgfx(bitmap,machine->gfx[1], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PEN,0, - (color & 0x08) ? 0xaa : 0x00); + priority_bitmap, + (color & 0x08) ? 0xaa : 0x00,0); } } diff --git a/src/mame/video/taito_o.c b/src/mame/video/taito_o.c index 41c3e0c65e9..0eec53fec2d 100644 --- a/src/mame/video/taito_o.c +++ b/src/mame/video/taito_o.c @@ -122,14 +122,13 @@ static void parentj_draw_sprites(running_machine *machine, bitmap_t *bitmap, con flipy ^= 0x0080; } - drawgfxzoom( bitmap, machine -> gfx[0], + drawgfxzoom_transpen( bitmap, cliprect, + machine -> gfx[0], tile, color, flipx, flipy, x, y, - cliprect, - TRANSPARENCY_PEN, 0, - zx, zy + zx, zy, 0 ); } tile_offs ++; diff --git a/src/mame/video/taito_z.c b/src/mame/video/taito_z.c index 5adcb30c693..88d41b7f257 100644 --- a/src/mame/video/taito_z.c +++ b/src/mame/video/taito_z.c @@ -243,13 +243,12 @@ static void contcirc_draw_sprites_16x8(running_machine *machine, bitmap_t *bitma flipy = !flipy; } - pdrawgfxzoom(bitmap,machine->gfx[0], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[0], code, color, flipx,flipy, curx,cury, - cliprect,TRANSPARENCY_PEN,0, - zx<<12,zy<<13,primasks[priority]); + zx<<12,zy<<13,priority_bitmap,primasks[priority],0); } if (bad_chunks) @@ -338,14 +337,13 @@ static void chasehq_draw_sprites_16x16(running_machine *machine, bitmap_t *bitma flipy = !flipy; } - pdrawgfxzoom(bitmap,machine->gfx[0], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[0], code, color, flipx,flipy, curx,cury, - cliprect,TRANSPARENCY_PEN,0, zx<<12,zy<<12, - primasks[priority]); + priority_bitmap,primasks[priority],0); } } else if ((zoomx-1) & 0x20) /* 64x128 sprites, $40000-$5ffff in spritemap rom, OBJB */ @@ -382,14 +380,13 @@ static void chasehq_draw_sprites_16x16(running_machine *machine, bitmap_t *bitma flipy = !flipy; } - pdrawgfxzoom(bitmap,machine->gfx[2], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[2], code, color, flipx,flipy, curx,cury, - cliprect,TRANSPARENCY_PEN,0, zx<<12,zy<<12, - primasks[priority]); + priority_bitmap,primasks[priority],0); } } else if (!((zoomx-1) & 0x60)) /* 32x128 sprites, $60000-$7ffff in spritemap rom, OBJB */ @@ -426,14 +423,13 @@ static void chasehq_draw_sprites_16x16(running_machine *machine, bitmap_t *bitma flipy = !flipy; } - pdrawgfxzoom(bitmap,machine->gfx[2], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[2], code, color, flipx,flipy, curx,cury, - cliprect,TRANSPARENCY_PEN,0, zx<<12,zy<<12, - primasks[priority]); + priority_bitmap,primasks[priority],0); } } @@ -520,14 +516,13 @@ static void bshark_draw_sprites_16x8(running_machine *machine, bitmap_t *bitmap, flipy = !flipy; } - pdrawgfxzoom(bitmap,machine->gfx[0], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[0], code, color, flipx,flipy, curx,cury, - cliprect,TRANSPARENCY_PEN,0, zx<<12,zy<<13, - primasks[priority]); + priority_bitmap,primasks[priority],0); } if (bad_chunks) @@ -622,14 +617,13 @@ static void sci_draw_sprites_16x8(running_machine *machine, bitmap_t *bitmap,con flipy = !flipy; } - pdrawgfxzoom(bitmap,machine->gfx[0], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[0], code, color, flipx,flipy, curx,cury, - cliprect,TRANSPARENCY_PEN,0, zx<<12,zy<<13, - primasks[priority]); + priority_bitmap,primasks[priority],0); } if (bad_chunks) @@ -714,14 +708,13 @@ static void aquajack_draw_sprites_16x8(running_machine *machine, bitmap_t *bitma flipy = !flipy; } - pdrawgfxzoom(bitmap,machine->gfx[0], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[0], code, color, flipx,flipy, curx,cury, - cliprect,TRANSPARENCY_PEN,0, zx<<12,zy<<13, - primasks[priority]); + priority_bitmap,primasks[priority],0); } if (bad_chunks) @@ -806,14 +799,13 @@ static void spacegun_draw_sprites_16x8(running_machine *machine, bitmap_t *bitma flipy = !flipy; } - pdrawgfxzoom(bitmap,machine->gfx[0], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[0], code, color, flipx,flipy, curx,cury, - cliprect,TRANSPARENCY_PEN,0, zx<<12,zy<<13, - primasks[priority]); + priority_bitmap,primasks[priority],0); } if (bad_chunks) diff --git a/src/mame/video/taitoair.c b/src/mame/video/taitoair.c index 3439d6307d1..5a317567e46 100644 --- a/src/mame/video/taitoair.c +++ b/src/mame/video/taitoair.c @@ -173,14 +173,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy ^= 0x0080; } - drawgfxzoom( bitmap, machine -> gfx[0], + drawgfxzoom_transpen( bitmap, cliprect, + machine -> gfx[0], tile, color, flipx, flipy, x, y, - cliprect, - TRANSPARENCY_PEN, 0, - zx, zy + zx, zy, 0 ); } tile_offs ++; diff --git a/src/mame/video/taitoic.c b/src/mame/video/taitoic.c index dfd1a69b1ee..4eaedf57c63 100644 --- a/src/mame/video/taitoic.c +++ b/src/mame/video/taitoic.c @@ -1320,13 +1320,13 @@ void PC090OJ_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rect x += PC090OJ_xoffs; y += PC090OJ_yoffs; - pdrawgfx(bitmap,machine->gfx[PC090OJ_gfxnum], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[PC090OJ_gfxnum], code, color, flipx,flipy, x,y, - cliprect,TRANSPARENCY_PEN,0, - priority ? 0xfc : 0xf0); + priority_bitmap, + priority ? 0xfc : 0xf0,0); } } diff --git a/src/mame/video/taitosj.c b/src/mame/video/taitosj.c index 387345ecf23..4dc8630adf7 100644 --- a/src/mame/video/taitosj.c +++ b/src/mame/video/taitosj.c @@ -325,22 +325,20 @@ static int check_sprite_sprite_bitpattern(running_machine *machine, /* draw the sprites into seperate bitmaps and check overlapping region */ bitmap_fill(sprite_layer_collbitmap1, NULL, TRANSPARENT_PEN); - drawgfx(sprite_sprite_collbitmap1, get_sprite_gfx_element(machine, which1), + drawgfx_transpen(sprite_sprite_collbitmap1, 0, get_sprite_gfx_element(machine, which1), taitosj_spriteram[SPRITE_RAM_PAGE_OFFSET + offs1 + 3] & 0x3f, 0, taitosj_spriteram[SPRITE_RAM_PAGE_OFFSET + offs1 + 2] & 0x01, taitosj_spriteram[SPRITE_RAM_PAGE_OFFSET + offs1 + 2] & 0x02, - sx1, sy1, - 0, TRANSPARENCY_PEN, 0); + sx1, sy1, 0); bitmap_fill(sprite_sprite_collbitmap2, NULL, TRANSPARENT_PEN); - drawgfx(sprite_sprite_collbitmap2, get_sprite_gfx_element(machine, which2), + drawgfx_transpen(sprite_sprite_collbitmap2, 0, get_sprite_gfx_element(machine, which2), taitosj_spriteram[SPRITE_RAM_PAGE_OFFSET + offs2 + 3] & 0x3f, 0, taitosj_spriteram[SPRITE_RAM_PAGE_OFFSET + offs2 + 2] & 0x01, taitosj_spriteram[SPRITE_RAM_PAGE_OFFSET + offs2 + 2] & 0x02, - sx2, sy2, - 0, TRANSPARENCY_PEN, 0); + sx2, sy2, 0); for (y = miny; y < maxy; y++) for (x = minx; x < maxx; x++) @@ -481,12 +479,11 @@ static int check_sprite_layer_bitpattern(running_machine *machine, int which, re /* draw sprite into a bitmap and check if layers collide */ bitmap_fill(sprite_layer_collbitmap1, NULL, TRANSPARENT_PEN); - drawgfx(sprite_layer_collbitmap1, get_sprite_gfx_element(machine, which), + drawgfx_transpen(sprite_layer_collbitmap1, 0,get_sprite_gfx_element(machine, which), taitosj_spriteram[SPRITE_RAM_PAGE_OFFSET + offs + 3] & 0x3f, 0, flip_x, flip_y, - 0,0, - 0,TRANSPARENCY_PEN,0); + 0,0,0); for (y = miny; y < maxy; y++) for (x = minx; x < maxx; x++) @@ -540,26 +537,23 @@ static void draw_layers(running_machine *machine) if (GLOBAL_FLIP_X) sx = 31 - sx; if (GLOBAL_FLIP_Y) sy = 31 - sy; - drawgfx(taitosj_layer_bitmap[0],machine->gfx[taitosj_colorbank[0] & 0x08 ? 2 : 0], + drawgfx_transpen(taitosj_layer_bitmap[0],0,machine->gfx[taitosj_colorbank[0] & 0x08 ? 2 : 0], taitosj_videoram_1[offs], taitosj_colorbank[0] & 0x07, GLOBAL_FLIP_X,GLOBAL_FLIP_Y, - 8*sx,8*sy, - 0,TRANSPARENCY_PEN,0); + 8*sx,8*sy,0); - drawgfx(taitosj_layer_bitmap[1],machine->gfx[taitosj_colorbank[0] & 0x80 ? 2 : 0], + drawgfx_transpen(taitosj_layer_bitmap[1],0,machine->gfx[taitosj_colorbank[0] & 0x80 ? 2 : 0], taitosj_videoram_2[offs], (taitosj_colorbank[0] >> 4) & 0x07, GLOBAL_FLIP_X,GLOBAL_FLIP_Y, - 8*sx,8*sy, - 0,TRANSPARENCY_PEN,0); + 8*sx,8*sy,0); - drawgfx(taitosj_layer_bitmap[2],machine->gfx[taitosj_colorbank[1] & 0x08 ? 2 : 0], + drawgfx_transpen(taitosj_layer_bitmap[2],0,machine->gfx[taitosj_colorbank[1] & 0x08 ? 2 : 0], taitosj_videoram_3[offs], taitosj_colorbank[1] & 0x07, GLOBAL_FLIP_X,GLOBAL_FLIP_Y, - 8*sx,8*sy, - 0,TRANSPARENCY_PEN,0); + 8*sx,8*sy,0); } } @@ -616,14 +610,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap) flip_y = !flip_y; } - drawgfx(bitmap, get_sprite_gfx_element(machine, which), code, color, - flip_x, flip_y, sx, sy, - GLOBAL_FLIP_X ? &spritevisibleareaflip : &spritevisiblearea,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap, GLOBAL_FLIP_X ? &spritevisibleareaflip : &spritevisiblearea,get_sprite_gfx_element(machine, which), code, color, + flip_x, flip_y, sx, sy,0); /* draw with wrap around. The horizontal games (eg. sfposeid) need this */ - drawgfx(bitmap, get_sprite_gfx_element(machine, which), code, color, - flip_x, flip_y, sx - 0x100, sy, - GLOBAL_FLIP_X ? &spritevisibleareaflip : &spritevisiblearea,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap, GLOBAL_FLIP_X ? &spritevisibleareaflip : &spritevisiblearea,get_sprite_gfx_element(machine, which), code, color, + flip_x, flip_y, sx - 0x100, sy,0); } } } diff --git a/src/mame/video/tank8.c b/src/mame/video/tank8.c index 54b96793f65..dd5df9bef7c 100644 --- a/src/mame/video/tank8.c +++ b/src/mame/video/tank8.c @@ -150,14 +150,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int x = get_x_pos(i); int y = get_y_pos(i); - drawgfx(bitmap, machine->gfx[(code & 0x04) ? 2 : 3], + drawgfx_transpen(bitmap, cliprect, machine->gfx[(code & 0x04) ? 2 : 3], code & 0x03, i, code & 0x10, code & 0x08, x, - y, - cliprect, TRANSPARENCY_PEN, 0); + y, 0); } } diff --git a/src/mame/video/tankbatt.c b/src/mame/video/tankbatt.c index 940bd90caac..0e75313a7e0 100644 --- a/src/mame/video/tankbatt.c +++ b/src/mame/video/tankbatt.c @@ -90,12 +90,11 @@ static void draw_bullets(running_machine *machine, bitmap_t *bitmap, const recta int x = tankbatt_bulletsram[offs + 1]; int y = 255 - tankbatt_bulletsram[offs] - 2; - drawgfx(bitmap,machine->gfx[1], + drawgfx_opaque(bitmap,cliprect,machine->gfx[1], 0, /* this is just a square, generated by the hardware */ color, 0,0, - x,y, - cliprect,TRANSPARENCY_NONE,0); + x,y); } } diff --git a/src/mame/video/tankbust.c b/src/mame/video/tankbust.c index 48dab689f3e..601550ed473 100644 --- a/src/mame/video/tankbust.c +++ b/src/mame/video/tankbust.c @@ -218,11 +218,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if ((spriteram[offs+1]!=4)) //otherwise - ghost sprites { - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } } diff --git a/src/mame/video/taotaido.c b/src/mame/video/taotaido.c index 76c77cb5b67..fa9100a9a5d 100644 --- a/src/mame/video/taotaido.c +++ b/src/mame/video/taotaido.c @@ -105,13 +105,12 @@ static void draw_sprite(running_machine *machine, UINT16 spriteno, bitmap_t *bit else sx = ((xpos + xzoom * x / 2 + 16) & 0x1ff) - 16; - drawgfxzoom(bitmap,gfx, + drawgfxzoom_transpen(bitmap,cliprect,gfx, realtile, color, xflip,yflip, sx,sy, - cliprect,TRANSPARENCY_PEN,15, - xzoom << 11, yzoom << 11); + xzoom << 11, yzoom << 11,15); tile++; diff --git a/src/mame/video/targeth.c b/src/mame/video/targeth.c index 5a15a6cde40..2d4abe12573 100644 --- a/src/mame/video/targeth.c +++ b/src/mame/video/targeth.c @@ -121,10 +121,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int xflip = attr & 0x20; int yflip = attr & 0x40; - drawgfx(bitmap,gfx,number, + drawgfx_transpen(bitmap,cliprect,gfx,number, 0x20 + color,xflip,yflip, - sx - 0x0f,sy, - cliprect,TRANSPARENCY_PEN,0); + sx - 0x0f,sy,0); } } diff --git a/src/mame/video/tatsumi.c b/src/mame/video/tatsumi.c index 425f3460026..c81634801df 100644 --- a/src/mame/video/tatsumi.c +++ b/src/mame/video/tatsumi.c @@ -247,10 +247,10 @@ VIDEO_START( bigfight ) /********************************************************************/ -INLINE void roundupt_drawgfxzoomrotate( running_machine *machine, - bitmap_t *dest_bmp,const gfx_element *gfx, +INLINE void roundupt_drawgfxzoomrotate( + bitmap_t *dest_bmp, const rectangle *clip, const gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,UINT32 ssx,UINT32 ssy, - const rectangle *clip, int scalex, int scaley, int rotate, int write_priority_only ) + int scalex, int scaley, int rotate, int write_priority_only ) { rectangle myclip; @@ -282,7 +282,7 @@ INLINE void roundupt_drawgfxzoomrotate( running_machine *machine, { if( gfx ) { - const pen_t *pal = &machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; + const pen_t *pal = &gfx->machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)]; const UINT8 *shadow_pens = shadow_pen_array + (gfx->color_granularity * (color % gfx->total_colors)); const UINT8 *code_base = gfx_element_get_data(gfx, code % gfx->total_elements); @@ -643,17 +643,17 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta for (w=0; w<x_width; w++) { if (rotate) - roundupt_drawgfxzoomrotate(machine, - temp_bitmap,machine->gfx[0], + roundupt_drawgfxzoomrotate( + temp_bitmap,cliprect,machine->gfx[0], base, color,fx,0,x_pos,render_y, - cliprect,scale,scale,0,write_priority_only); + scale,scale,0,write_priority_only); else - roundupt_drawgfxzoomrotate(machine, - bitmap,machine->gfx[0], + roundupt_drawgfxzoomrotate( + bitmap,cliprect,machine->gfx[0], base, color,fx,0,x_pos,render_y, - cliprect,scale,scale,0,write_priority_only); + scale,scale,0,write_priority_only); base++; if (fx) diff --git a/src/mame/video/taxidrvr.c b/src/mame/video/taxidrvr.c index 7143122b2a7..6641b8d4bca 100644 --- a/src/mame/video/taxidrvr.c +++ b/src/mame/video/taxidrvr.c @@ -38,12 +38,11 @@ VIDEO_UPDATE( taxidrvr ) sx = offs % 32; sy = offs / 32; - drawgfx(bitmap,screen->machine->gfx[3], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[3], taxidrvr_vram3[offs], 0, 0,0, - (sx*8-taxidrvr_scroll[0])&0xff,(sy*8-taxidrvr_scroll[1])&0xff, - cliprect,TRANSPARENCY_NONE,0); + (sx*8-taxidrvr_scroll[0])&0xff,(sy*8-taxidrvr_scroll[1])&0xff); } for (offs = 0;offs < 0x400;offs++) @@ -51,12 +50,11 @@ VIDEO_UPDATE( taxidrvr ) sx = offs % 32; sy = offs / 32; - drawgfx(bitmap,screen->machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[2], taxidrvr_vram2[offs]+256*taxidrvr_vram2[offs+0x400], 0, 0,0, - (sx*8-taxidrvr_scroll[2])&0xff,(sy*8-taxidrvr_scroll[3])&0xff, - cliprect,TRANSPARENCY_PEN,0); + (sx*8-taxidrvr_scroll[2])&0xff,(sy*8-taxidrvr_scroll[3])&0xff,0); } if (spritectrl[2] & 4) @@ -118,12 +116,11 @@ VIDEO_UPDATE( taxidrvr ) sx = offs % 32; sy = offs / 32; - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1], taxidrvr_vram1[offs], 0, 0,0, - sx*8,sy*8, - cliprect,TRANSPARENCY_PEN,0); + sx*8,sy*8,0); } for (offs = 0;offs < 0x2000;offs++) @@ -146,12 +143,11 @@ VIDEO_UPDATE( taxidrvr ) sx = offs % 32; sy = offs / 32; - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[0], taxidrvr_vram0[offs], 0, 0,0, - sx*8,sy*8, - cliprect,TRANSPARENCY_PEN,0); + sx*8,sy*8,0); } return 0; } diff --git a/src/mame/video/tbowl.c b/src/mame/video/tbowl.c index 4877d1cae27..bf66a30fc90 100644 --- a/src/mame/video/tbowl.c +++ b/src/mame/video/tbowl.c @@ -159,36 +159,32 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan sx -= xscroll; - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code + layout[y][x], color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0 ); + sx,sy,0 ); /* wraparound */ - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code + layout[y][x], color, flipx,flipy, - sx,sy-0x200, - cliprect,TRANSPARENCY_PEN,0 ); + sx,sy-0x200,0 ); /* wraparound */ - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code + layout[y][x], color, flipx,flipy, - sx-0x400,sy, - cliprect,TRANSPARENCY_PEN,0 ); + sx-0x400,sy,0 ); /* wraparound */ - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], code + layout[y][x], color, flipx,flipy, - sx-0x400,sy-0x200, - cliprect,TRANSPARENCY_PEN,0 ); + sx-0x400,sy-0x200,0 ); diff --git a/src/mame/video/tceptor.c b/src/mame/video/tceptor.c index 8433a185892..cbcb2e62a86 100644 --- a/src/mame/video/tceptor.c +++ b/src/mame/video/tceptor.c @@ -501,17 +501,16 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta x -= 64; y -= 78; - drawgfxzoom(bitmap, + drawgfxzoom_transmask(bitmap, + cliprect, machine->gfx[gfx], code, color, flipx, flipy, x, y, - cliprect, - TRANSPARENCY_PENS, - colortable_get_transpen_mask(machine->colortable, machine->gfx[gfx], color, SPR_TRANS_COLOR), scalex, - scaley); + scaley, + colortable_get_transpen_mask(machine->colortable, machine->gfx[gfx], color, SPR_TRANS_COLOR)); } } diff --git a/src/mame/video/tecmo.c b/src/mame/video/tecmo.c index ce8285dc133..5aa184acb80 100644 --- a/src/mame/video/tecmo.c +++ b/src/mame/video/tecmo.c @@ -225,13 +225,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan { int sx = xpos + 8*(flipx?(size-1-x):x); int sy = ypos + 8*(flipy?(size-1-y):y); - pdrawgfx(bitmap,machine->gfx[1], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[1], code + layout[y][x], flags & 0xf, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PEN,0, - priority_mask); + priority_bitmap, + priority_mask,0); } } } diff --git a/src/mame/video/tehkanwc.c b/src/mame/video/tehkanwc.c index c889955d931..b9f822c0726 100644 --- a/src/mame/video/tehkanwc.c +++ b/src/mame/video/tehkanwc.c @@ -151,9 +151,8 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[1], - code, color, flipx, flipy, sx, sy, - cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], + code, color, flipx, flipy, sx, sy, 0); } } diff --git a/src/mame/video/terracre.c b/src/mame/video/terracre.c index 7646fd2e1bf..585c1caf706 100644 --- a/src/mame/video/terracre.c +++ b/src/mame/video/terracre.c @@ -86,8 +86,8 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx( - bitmap,pGfx,tile, color,flipx,flipy,sx,sy,cliprect,TRANSPARENCY_PEN,transparent_pen ); + drawgfx_transpen( + bitmap,cliprect,pGfx,tile, color,flipx,flipy,sx,sy,transparent_pen ); pSource += 4; } diff --git a/src/mame/video/tetrisp2.c b/src/mame/video/tetrisp2.c index 32e3f628772..f07e73711f7 100644 --- a/src/mame/video/tetrisp2.c +++ b/src/mame/video/tetrisp2.c @@ -473,13 +473,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { for (x = xstart; x != xend; x += xinc) { - pdrawgfx(bitmap, machine->gfx[gfxnum], + pdrawgfx_transpen(bitmap, &clip, + machine->gfx[gfxnum], code++, color, flipx, flipy, sx + x * 8, sy + y * 8, - &clip, - TRANSPARENCY_PEN, 0, primask); + priority_bitmap, primask, 0); } code += (0x100/8) - xnum; } diff --git a/src/mame/video/thedeep.c b/src/mame/video/thedeep.c index f4731c77c10..abf15e29014 100644 --- a/src/mame/video/thedeep.c +++ b/src/mame/video/thedeep.c @@ -195,12 +195,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta for (y = 0; y < ny; y++) { - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code + (flipy ? (ny - y - 1) : y), color, flipx,flipy, - sx + x * (flipx ? 16 : -16), sy + y * 16, - cliprect,TRANSPARENCY_PEN,0 ); + sx + x * (flipx ? 16 : -16), sy + y * 16,0 ); } } } diff --git a/src/mame/video/thepit.c b/src/mame/video/thepit.c index fe87b612683..cc9e19e315c 100644 --- a/src/mame/video/thepit.c +++ b/src/mame/video/thepit.c @@ -287,12 +287,11 @@ static void draw_sprites(running_machine *machine, /* sprites 0-3 are drawn one pixel down */ if (offs < 16) y++; - drawgfx(bitmap, machine->gfx[2 * graphics_bank + 1], + drawgfx_transpen(bitmap, thepit_flip_screen_x ? &spritevisibleareaflipx : &spritevisiblearea, + machine->gfx[2 * graphics_bank + 1], thepit_spriteram[offs + 1] & 0x3f, thepit_spriteram[offs + 2], - flipx, flipy, x, y, - thepit_flip_screen_x ? &spritevisibleareaflipx : &spritevisiblearea, - TRANSPARENCY_PEN, 0); + flipx, flipy, x, y, 0); } } } diff --git a/src/mame/video/thoop2.c b/src/mame/video/thoop2.c index 505025c4d57..233b522af6b 100644 --- a/src/mame/video/thoop2.c +++ b/src/mame/video/thoop2.c @@ -186,10 +186,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta ex = xflip ? (spr_size-1-x) : x; ey = yflip ? (spr_size-1-y) : y; - drawgfx(bitmap,gfx,number + x_offset[ex] + y_offset[ey], + drawgfx_transpen(bitmap,cliprect,gfx,number + x_offset[ex] + y_offset[ey], color,xflip,yflip, - sx-0x0f+x*8,sy+y*8, - cliprect,TRANSPARENCY_PEN,0); + sx-0x0f+x*8,sy+y*8,0); } } } diff --git a/src/mame/video/tiamc1.c b/src/mame/video/tiamc1.c index fbb039b664b..1cbfd35162e 100644 --- a/src/mame/video/tiamc1.c +++ b/src/mame/video/tiamc1.c @@ -177,12 +177,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta spritecode = tiamc1_spriteram_n[offs] ^ 0xff; if (!(tiamc1_spriteram_a[offs] & 0x01)) - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], spritecode, 0, flipx, flipy, - sx, sy, - cliprect, TRANSPARENCY_PEN, 15); + sx, sy, 15); } } diff --git a/src/mame/video/tigeroad.c b/src/mame/video/tigeroad.c index 311bacd740d..b713f542d28 100644 --- a/src/mame/video/tigeroad.c +++ b/src/mame/video/tigeroad.c @@ -96,13 +96,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[2], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[2], tile_number, color, flipx, flipy, - sx, 240 - sy, - cliprect, - TRANSPARENCY_PEN, 15); + sx, 240 - sy, 15); } source -= 4; diff --git a/src/mame/video/timelimt.c b/src/mame/video/timelimt.c index a55a67f5890..8ae61f9c1a4 100644 --- a/src/mame/video/timelimt.c +++ b/src/mame/video/timelimt.c @@ -129,12 +129,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta code += ( attr & 0x80 ) ? 0x40 : 0x00; code += ( attr & 0x40 ) ? 0x80 : 0x00; - drawgfx( bitmap, machine->gfx[2], + drawgfx_transpen( bitmap, cliprect,machine->gfx[2], code, attr & 7, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/timeplt.c b/src/mame/video/timeplt.c index 821e2e0f46a..f6307d5d6f1 100644 --- a/src/mame/video/timeplt.c +++ b/src/mame/video/timeplt.c @@ -171,12 +171,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan int flipx = ~spriteram_2[offs] & 0x40; int flipy = spriteram_2[offs] & 0x80; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/tnzs.c b/src/mame/video/tnzs.c index 5c00d6b75bc..09206b20eff 100644 --- a/src/mame/video/tnzs.c +++ b/src/mame/video/tnzs.c @@ -172,20 +172,18 @@ static void draw_foreground(running_machine *machine, if ((sy == 0) && (code == 0)) sy += 240; } - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code, color, flipx,flipy, - sx,sy+2, - cliprect,TRANSPARENCY_PEN,0); + sx,sy+2,0); /* wrap around x */ - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code, color, flipx,flipy, - sx + 512,sy+2, - cliprect,TRANSPARENCY_PEN,0); + sx + 512,sy+2,0); } } diff --git a/src/mame/video/toaplan1.c b/src/mame/video/toaplan1.c index b708dec0f47..7aa58c04667 100644 --- a/src/mame/video/toaplan1.c +++ b/src/mame/video/toaplan1.c @@ -929,9 +929,9 @@ static void toaplan1_log_vram(void) ***************************************************************************/ // custom function to draw a single sprite. needed to keep correct sprites - sprites and sprites - tilemaps priorities -static void toaplan1_draw_sprite_custom(bitmap_t *dest_bmp,const gfx_element *gfx, +static void toaplan1_draw_sprite_custom(bitmap_t *dest_bmp,const rectangle *clip,const gfx_element *gfx, UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy, - const rectangle *clip,int priority) + int priority) { int pal_base = gfx->color_base + gfx->color_granularity * (color % gfx->total_colors); const UINT8 *source_base = gfx_element_get_data(gfx, code % gfx->total_elements); @@ -1080,11 +1080,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if (fcu_flipscreen) sx = sx_base - dim_x; else sx = sx_base + dim_x; - toaplan1_draw_sprite_custom(bitmap,machine->gfx[1], + toaplan1_draw_sprite_custom(bitmap,cliprect,machine->gfx[1], sprite,color, fcu_flipscreen,fcu_flipscreen, sx,sy, - cliprect,priority); + priority); sprite++ ; } @@ -1115,12 +1115,11 @@ static void rallybik_draw_sprites(running_machine *machine, bitmap_t *bitmap, co flipx = attrib & 0x100; if (flipx) sx -= 15; flipy = attrib & 0x200; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite, color, flipx,flipy, - sx-31,sy-16, - cliprect,TRANSPARENCY_PEN,0); + sx-31,sy-16,0); } } } diff --git a/src/mame/video/toaplan2.c b/src/mame/video/toaplan2.c index ad3e5bf82a5..d25a830348d 100644 --- a/src/mame/video/toaplan2.c +++ b/src/mame/video/toaplan2.c @@ -1416,11 +1416,10 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rect if (flipx) sx = sx_base - dim_x; else sx = sx_base + dim_x; - drawgfx(bitmap,gfx,sprite, + drawgfx_transpen(bitmap,cliprect,gfx,sprite, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); sprite++ ; } diff --git a/src/mame/video/toki.c b/src/mame/video/toki.c index 2984759607c..24eb8b173ae 100644 --- a/src/mame/video/toki.c +++ b/src/mame/video/toki.c @@ -208,12 +208,11 @@ static void toki_draw_sprites(running_machine *machine, bitmap_t *bitmap,const r flipy=1; } - drawgfx (bitmap,machine->gfx[1], + drawgfx_transpen (bitmap,cliprect,machine->gfx[1], tile, color, flipx,flipy, - x,y, - cliprect,TRANSPARENCY_PEN,15); + x,y,15); } } } @@ -247,12 +246,11 @@ static void tokib_draw_sprites(running_machine *machine, bitmap_t *bitmap,const tile = sprite_word[1] & 0x1fff; color = sprite_word[2] >> 12; - drawgfx (bitmap,machine->gfx[1], + drawgfx_transpen (bitmap,cliprect,machine->gfx[1], tile, color, flipx,0, - x,y-1, - cliprect,TRANSPARENCY_PEN,15); + x,y-1,15); } } } diff --git a/src/mame/video/topspeed.c b/src/mame/video/topspeed.c index f52507d0ced..4c2b2edafba 100644 --- a/src/mame/video/topspeed.c +++ b/src/mame/video/topspeed.c @@ -99,14 +99,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan zx = x + (((k+1)*zoomx)/8) - curx; zy = y + (((j+1)*zoomy)/16) - cury; - pdrawgfxzoom(bitmap,machine->gfx[0], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[0], code, color, flipx,flipy, curx,cury, - cliprect,TRANSPARENCY_PEN,0, zx<<12,zy<<13, - primasks[priority]); + priority_bitmap,primasks[priority],0); } if (bad_chunks) diff --git a/src/mame/video/tp84.c b/src/mame/video/tp84.c index afe959a0549..d5498cb04c6 100644 --- a/src/mame/video/tp84.c +++ b/src/mame/video/tp84.c @@ -173,7 +173,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int flip_x = ~tp84_spriteram[offs + 2] & 0x40; int flip_y = tp84_spriteram[offs + 2] & 0x80; - drawgfx(bitmap, machine->gfx[1], code, color, flip_x, flip_y, x, y, cliprect, TRANSPARENCY_PENS, + drawgfx_transmask(bitmap, cliprect, machine->gfx[1], code, color, flip_x, flip_y, x, y, colortable_get_transpen_mask(machine->colortable, machine->gfx[1], color, palette_base)); } diff --git a/src/mame/video/trackfld.c b/src/mame/video/trackfld.c index 0b2369428e3..ff423329196 100644 --- a/src/mame/video/trackfld.c +++ b/src/mame/video/trackfld.c @@ -213,21 +213,19 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta /* proving that this is a hardware related "feature" */ sy += 1; - drawgfx(bitmap, machine->gfx[0], + drawgfx_transmask(bitmap, cliprect, + machine->gfx[0], code + sprite_bank1 + sprite_bank2, color, flipx, flipy, sx, sy, - cliprect, - TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[0], color, 0)); /* redraw with wraparound */ - drawgfx(bitmap,machine->gfx[0], + drawgfx_transmask(bitmap,cliprect, + machine->gfx[0], code + sprite_bank1 + sprite_bank2, color, flipx, flipy, sx - 256, sy, - cliprect, - TRANSPARENCY_PENS, colortable_get_transpen_mask(machine->colortable, machine->gfx[0], color, 0)); } } diff --git a/src/mame/video/travrusa.c b/src/mame/video/travrusa.c index e94ee0670f6..598ca6e38f2 100644 --- a/src/mame/video/travrusa.c +++ b/src/mame/video/travrusa.c @@ -327,12 +327,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,&clip,machine->gfx[1], code, attr & 0x0f, flipx,flipy, - sx,sy, - &clip,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/triplhnt.c b/src/mame/video/triplhnt.c index dd7ca645264..51c357123a6 100644 --- a/src/mame/video/triplhnt.c +++ b/src/mame/video/triplhnt.c @@ -84,9 +84,9 @@ static void draw_sprites(running_machine *machine, bitmap_t* bitmap, const recta /* render sprite to auxiliary bitmap */ - drawgfx(helper, machine->gfx[triplhnt_sprite_zoom], + drawgfx_opaque(helper, cliprect, machine->gfx[triplhnt_sprite_zoom], 2 * code + triplhnt_sprite_bank, 0, code & 8, 0, - rect.min_x, rect.min_y, cliprect, TRANSPARENCY_NONE, 0); + rect.min_x, rect.min_y); if (rect.min_x < cliprect->min_x) rect.min_x = cliprect->min_x; diff --git a/src/mame/video/tryout.c b/src/mame/video/tryout.c index 725068059d1..776ddc5576b 100644 --- a/src/mame/video/tryout.c +++ b/src/mame/video/tryout.c @@ -207,22 +207,19 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan /* Double Height */ if(spriteram[offs] & 0x10) { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite, - color,fx,fy,x,y + inc, - cliprect,TRANSPARENCY_PEN,0); + color,fx,fy,x,y + inc,0); - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite+1, - color,fx,fy,x,y, - cliprect,TRANSPARENCY_PEN,0); + color,fx,fy,x,y,0); } else { - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], sprite, - color,fx,fy,x,y, - cliprect,TRANSPARENCY_PEN,0); + color,fx,fy,x,y,0); } } } diff --git a/src/mame/video/tsamurai.c b/src/mame/video/tsamurai.c index 6bb56533199..90ce8a6ff44 100644 --- a/src/mame/video/tsamurai.c +++ b/src/mame/video/tsamurai.c @@ -175,21 +175,19 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta if( flip_screen_get(machine) ) { - drawgfx( bitmap,gfx, + drawgfx_transpen( bitmap,cliprect,gfx, sprite_number&0x7f, color, 1,(sprite_number&0x80)?0:1, - 256-32-sx,256-32-sy, - cliprect,TRANSPARENCY_PEN,0 ); + 256-32-sx,256-32-sy,0 ); } else { - drawgfx( bitmap,gfx, + drawgfx_transpen( bitmap,cliprect,gfx, sprite_number&0x7f, color, 0,sprite_number&0x80, - sx,sy, - cliprect,TRANSPARENCY_PEN,0 ); + sx,sy,0 ); } source -= 4; diff --git a/src/mame/video/tumbleb.c b/src/mame/video/tumbleb.c index 7e8829aaa7e..f43bdb7cefb 100644 --- a/src/mame/video/tumbleb.c +++ b/src/mame/video/tumbleb.c @@ -79,12 +79,11 @@ static void tumblepb_draw_sprites(running_machine *machine, bitmap_t *bitmap,con while (multi >= 0) { - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], sprite - multi * inc, colour, fx,fy, - sprite_xoffset + x,sprite_yoffset + y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + sprite_xoffset + x,sprite_yoffset + y + mult * multi,0); multi--; } @@ -141,12 +140,12 @@ static void jumpkids_draw_sprites(running_machine *machine, bitmap_t *bitmap,con while (multi >= 0) { - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,// x-1 for bcstory .. realign other layers? + cliprect,machine->gfx[3], sprite - multi * inc, colour, fx,fy, - sprite_xoffset+x,sprite_yoffset + y + mult * multi, // x-1 for bcstory .. realign other layers? - cliprect,TRANSPARENCY_PEN,0); + sprite_xoffset+x,sprite_yoffset + y + mult * multi,0); multi--; } @@ -203,12 +202,11 @@ static void fncywld_draw_sprites(running_machine *machine, bitmap_t *bitmap,cons while (multi >= 0) { - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], sprite - multi * inc, colour, fx,fy, - sprite_xoffset+x,sprite_yoffset+ y + mult * multi, - cliprect,TRANSPARENCY_PEN,15); + sprite_xoffset+x,sprite_yoffset+ y + mult * multi,15); multi--; } diff --git a/src/mame/video/tumblep.c b/src/mame/video/tumblep.c index 25612da4dcf..30b9c61df52 100644 --- a/src/mame/video/tumblep.c +++ b/src/mame/video/tumblep.c @@ -68,12 +68,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan while (multi >= 0) { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x,y + mult * multi,0); multi--; } diff --git a/src/mame/video/tunhunt.c b/src/mame/video/tunhunt.c index 81f88d0bcf0..959b351bc2b 100644 --- a/src/mame/video/tunhunt.c +++ b/src/mame/video/tunhunt.c @@ -332,13 +332,12 @@ static void draw_shell(running_machine *machine, { for( sy=0; sy<256; sy+=16 ) { - drawgfx( bitmap, machine->gfx[1], + drawgfx_transpen( bitmap, cliprect, + machine->gfx[1], picture_code, 0, /* color */ 0,0, /* flip */ - sx,sy, - cliprect, - TRANSPARENCY_PEN,0 ); + sx,sy,0 ); } } } @@ -358,13 +357,12 @@ static void draw_shell(running_machine *machine, vstop = 0x00 */ - drawgfx( bitmap, machine->gfx[1], + drawgfx_transpen( bitmap, cliprect, + machine->gfx[1], picture_code, 0, /* color */ 0,0, /* flip */ - 255-hposition-16,vstart-32, - cliprect, - TRANSPARENCY_PEN,0 ); + 255-hposition-16,vstart-32,0 ); } VIDEO_UPDATE( tunhunt ) diff --git a/src/mame/video/twincobr.c b/src/mame/video/twincobr.c index 1e7a20b6010..2cd3b8406a7 100644 --- a/src/mame/video/twincobr.c +++ b/src/mame/video/twincobr.c @@ -470,12 +470,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipx = attribute & 0x100; if (flipx) sx -= 14; /* should really be 15 */ flipy = attribute & 0x200; - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], sprite, color, flipx,flipy, - sx-32,sy-16, - cliprect,TRANSPARENCY_PEN,0); + sx-32,sy-16,0); } } } diff --git a/src/mame/video/ultratnk.c b/src/mame/video/ultratnk.c index e09565c04ae..24f98474db7 100644 --- a/src/mame/video/ultratnk.c +++ b/src/mame/video/ultratnk.c @@ -78,13 +78,12 @@ VIDEO_UPDATE( ultratnk ) if (!(attr & 0x80)) { - drawgfx(bitmap, screen->machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[1], (code >> 3) | bank, i, 0, 0, horz - 15, - vert - 15, - cliprect, TRANSPARENCY_PEN, 0); + vert - 15, 0); } } @@ -125,13 +124,12 @@ VIDEO_EOF( ultratnk ) if (code & 4) bank = 32; - drawgfx(helper, machine->gfx[1], + drawgfx_transpen(helper, &rect, machine->gfx[1], (code >> 3) | bank, 4, 0, 0, horz - 15, - vert - 15, - &rect, TRANSPARENCY_PEN, 1); + vert - 15, 1); for (y = rect.min_y; y <= rect.max_y; y++) for (x = rect.min_x; x <= rect.max_x; x++) diff --git a/src/mame/video/undrfire.c b/src/mame/video/undrfire.c index e169faaaa58..23dca2cc867 100644 --- a/src/mame/video/undrfire.c +++ b/src/mame/video/undrfire.c @@ -192,13 +192,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan } else { - drawgfxzoom(bitmap,machine->gfx[sprite_ptr->gfx], + drawgfxzoom_transpen(bitmap,cliprect,machine->gfx[sprite_ptr->gfx], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0, - sprite_ptr->zoomx,sprite_ptr->zoomy); + sprite_ptr->zoomx,sprite_ptr->zoomy,0); } } } @@ -212,14 +211,13 @@ logerror("Sprite number %04x had %02x invalid chunks\n",tilenum,bad_chunks); { sprite_ptr--; - pdrawgfxzoom(bitmap,machine->gfx[sprite_ptr->gfx], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[sprite_ptr->gfx], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0, sprite_ptr->zoomx,sprite_ptr->zoomy, - sprite_ptr->primask); + priority_bitmap,sprite_ptr->primask,0); } } @@ -331,13 +329,12 @@ static void draw_sprites_cbombers(running_machine *machine, bitmap_t *bitmap,con } else { - drawgfxzoom(bitmap,machine->gfx[sprite_ptr->gfx], + drawgfxzoom_transpen(bitmap,cliprect,machine->gfx[sprite_ptr->gfx], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0, - sprite_ptr->zoomx,sprite_ptr->zoomy); + sprite_ptr->zoomx,sprite_ptr->zoomy,0); } } } @@ -347,14 +344,13 @@ static void draw_sprites_cbombers(running_machine *machine, bitmap_t *bitmap,con { sprite_ptr--; - pdrawgfxzoom(bitmap,machine->gfx[sprite_ptr->gfx], + pdrawgfxzoom_transpen(bitmap,cliprect,machine->gfx[sprite_ptr->gfx], sprite_ptr->code, sprite_ptr->color, sprite_ptr->flipx,sprite_ptr->flipy, sprite_ptr->x,sprite_ptr->y, - cliprect,TRANSPARENCY_PEN,0, sprite_ptr->zoomx,sprite_ptr->zoomy, - sprite_ptr->primask); + priority_bitmap,sprite_ptr->primask,0); } } diff --git a/src/mame/video/unico.c b/src/mame/video/unico.c index d832797469d..dbb3df41c70 100644 --- a/src/mame/video/unico.c +++ b/src/mame/video/unico.c @@ -258,13 +258,13 @@ static void unico_draw_sprites(running_machine *machine, bitmap_t *bitmap,const for (x = startx ; x != endx ; x += incx) { - pdrawgfx( bitmap, machine->gfx[0], + pdrawgfx_transpen( bitmap, cliprect, machine->gfx[0], code++, attr & 0x1f, flipx, flipy, x, sy, - cliprect, TRANSPARENCY_PEN,0x00, - pri_mask ); + priority_bitmap, + pri_mask,0x00 ); } } } @@ -311,13 +311,13 @@ static void zeropnt2_draw_sprites(running_machine *machine, bitmap_t *bitmap,con for (x = startx ; x != endx ; x += incx) { - pdrawgfx( bitmap, machine->gfx[0], + pdrawgfx_transpen( bitmap, cliprect, machine->gfx[0], code++, attr & 0x1f, flipx, flipy, x, sy, - cliprect, TRANSPARENCY_PEN,0x00, - pri_mask ); + priority_bitmap, + pri_mask,0x00 ); } } } diff --git a/src/mame/video/vaportra.c b/src/mame/video/vaportra.c index 357202ddd8c..cabcc069390 100644 --- a/src/mame/video/vaportra.c +++ b/src/mame/video/vaportra.c @@ -133,12 +133,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta while (multi >= 0) { - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], sprite - multi * inc, colour, fx,fy, - x,y + mult * multi, - cliprect,TRANSPARENCY_PEN,0); + x,y + mult * multi,0); multi--; } diff --git a/src/mame/video/vastar.c b/src/mame/video/vastar.c index 9707825e40f..9d55d0368c6 100644 --- a/src/mame/video/vastar.c +++ b/src/mame/video/vastar.c @@ -157,31 +157,28 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan if (!flip_screen_get(machine)) sy = 224 - sy; - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code/2, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); /* redraw with wraparound */ - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code/2, color, flipx,flipy, - sx,sy+256, - cliprect,TRANSPARENCY_PEN,0); + sx,sy+256,0); } else { if (!flip_screen_get(machine)) sy = 240 - sy; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], code, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } } diff --git a/src/mame/video/vball.c b/src/mame/video/vball.c index db46d08ec76..28beaba7aae 100644 --- a/src/mame/video/vball.c +++ b/src/mame/video/vball.c @@ -111,9 +111,9 @@ void vb_mark_all_dirty( void ) tilemap_mark_all_tiles_dirty(bg_tilemap); } -#define DRAW_SPRITE( order, sx, sy ) drawgfx( bitmap, gfx, \ - (which+order),color,flipx,flipy,sx,sy, \ - cliprect,TRANSPARENCY_PEN,0); +#define DRAW_SPRITE( order, sx, sy ) drawgfx_transpen( bitmap, \ + cliprect,gfx, \ + (which+order),color,flipx,flipy,sx,sy,0); static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) { diff --git a/src/mame/video/videopin.c b/src/mame/video/videopin.c index 4ff5cae5b68..b9f493c6a71 100644 --- a/src/mame/video/videopin.c +++ b/src/mame/video/videopin.c @@ -85,12 +85,11 @@ VIDEO_UPDATE( videopin ) { for (j = 0; j < 2; j++) { - drawgfx(bitmap, screen->machine->gfx[1], + drawgfx_transpen(bitmap, &rect, screen->machine->gfx[1], 0, 0, 0, 0, x + 16 * i, - y + 16 * j, - &rect, TRANSPARENCY_PEN, 0); + y + 16 * j, 0); } } diff --git a/src/mame/video/vigilant.c b/src/mame/video/vigilant.c index 23510d3cfb2..1815d70d7b0 100644 --- a/src/mame/video/vigilant.c +++ b/src/mame/video/vigilant.c @@ -77,13 +77,12 @@ static void update_background(running_machine *machine) { for( col=0; col<512; col+=32 ) { - drawgfx(bg_bitmap, - machine->gfx[2], + drawgfx_opaque(bg_bitmap, + 0,machine->gfx[2], charcode, row < 128 ? 0 : 1, 0,0, - 512*page + col,row, - 0,TRANSPARENCY_NONE,0); + 512*page + col,row); charcode++; } } @@ -202,12 +201,11 @@ static void draw_foreground(running_machine *machine, bitmap_t *bitmap, const re { sx = (sx + scroll) & 0x1ff; - drawgfx(bitmap,machine->gfx[0], + drawgfx_transmask(bitmap,&bottomvisiblearea,machine->gfx[0], tile_number, color, 0,0, - sx,sy, - &bottomvisiblearea,TRANSPARENCY_PENS,0x00ff); + sx,sy,0x00ff); } } } @@ -269,12 +267,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan if (flipy) c += h-1-y; else c += y; - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], c, color, flipx,flipy, - sx,sy + 16*y, - cliprect,TRANSPARENCY_PEN,0); + sx,sy + 16*y,0); } } } @@ -331,12 +328,11 @@ VIDEO_UPDATE( kikcubic ) int color = (attributes & 0xF0) >> 4; int tile_number = videoram[offs] | ((attributes & 0x0F) << 8); - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0], tile_number, color, 0,0, - sx,sy, - cliprect,TRANSPARENCY_NONE,0); + sx,sy); } draw_sprites(screen->machine,bitmap,cliprect); diff --git a/src/mame/video/vulgus.c b/src/mame/video/vulgus.c index d04754405b5..5999ce06fa8 100644 --- a/src/mame/video/vulgus.c +++ b/src/mame/video/vulgus.c @@ -197,20 +197,18 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan do { - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code + i, col, flip_screen_get(machine),flip_screen_get(machine), - sx, sy + 16 * i * dir, - cliprect,TRANSPARENCY_PEN,15); + sx, sy + 16 * i * dir,15); /* draw again with wraparound */ - drawgfx(bitmap,machine->gfx[2], + drawgfx_transpen(bitmap,cliprect,machine->gfx[2], code + i, col, flip_screen_get(machine),flip_screen_get(machine), - sx, sy + 16 * i * dir - dir * 256, - cliprect,TRANSPARENCY_PEN,15); + sx, sy + 16 * i * dir - dir * 256,15); i--; } while (i >= 0); } diff --git a/src/mame/video/warriorb.c b/src/mame/video/warriorb.c index 1475dbf5772..5cc81dbd2f4 100644 --- a/src/mame/video/warriorb.c +++ b/src/mame/video/warriorb.c @@ -88,12 +88,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan if (x>0x3c0) x -= 0x400; if (y>0x180) y -= 0x200; - pdrawgfx(bitmap,machine->gfx[0], + pdrawgfx_transpen(bitmap,cliprect,machine->gfx[0], tilenum, color, flipx,flipy, x,y, - cliprect,TRANSPARENCY_PEN,0,pri_mask); + priority_bitmap,pri_mask,0); } #ifdef MAME_DEBUG diff --git a/src/mame/video/wc90b.c b/src/mame/video/wc90b.c index 3bb237008b8..0c3fd8bf5d7 100644 --- a/src/mame/video/wc90b.c +++ b/src/mame/video/wc90b.c @@ -127,13 +127,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta sy = 240 - spriteram[offs + 1]; - drawgfx( bitmap, machine->gfx[17], code, + drawgfx_transpen( bitmap, cliprect,machine->gfx[17], code, flags >> 4, /* color */ bank & 1, /* flipx */ bank & 2, /* flipy */ sx, - sy, - cliprect,TRANSPARENCY_PEN,15 ); + sy,15 ); } } } diff --git a/src/mame/video/wecleman.c b/src/mame/video/wecleman.c index 50dcae9c7c6..e37ed54c570 100644 --- a/src/mame/video/wecleman.c +++ b/src/mame/video/wecleman.c @@ -670,8 +670,8 @@ static void wecleman_draw_road(running_machine *machine, bitmap_t *bitmap, const ------------------------------------------------------------------------*/ // blends two 8x8x16bpp direct RGB tilemaps -static void draw_cloud(running_machine *machine, bitmap_t *bitmap, - gfx_element *gfx, +static void draw_cloud(bitmap_t *bitmap, + const gfx_element *gfx, UINT16 *tm_base, int x0, int y0, // target coordinate int xcount, int ycount, // number of tiles to draw in x and y @@ -707,7 +707,7 @@ static void draw_cloud(running_machine *machine, bitmap_t *bitmap, dst_base = BITMAP_ADDR32(bitmap, y0+dy, x0+dx); - pal_base = machine->pens + pal_offset * gfx->color_granularity; + pal_base = gfx->machine->pens + pal_offset * gfx->color_granularity; alpha <<= 6; @@ -827,12 +827,11 @@ static void hotchase_draw_road(running_machine *machine, bitmap_t *bitmap, const for (sx=0; sx<2*XSIZE; sx+=64) { - drawgfx(bitmap,machine->gfx[0], + drawgfx_transpen(bitmap,cliprect,machine->gfx[0], code++, color, 0,0, - ((sx-scrollx)&0x3ff)-(384-32),sy, - cliprect,TRANSPARENCY_PEN,0); + ((sx-scrollx)&0x3ff)-(384-32),sy,0); } } @@ -1098,7 +1097,7 @@ VIDEO_UPDATE ( wecleman ) ((pen_t *)mrct)[0] = ((pen_t *)mrct)[0x40] = ((pen_t *)mrct)[0x200] = ((pen_t *)mrct)[0x205]; if (video_on) - draw_cloud(screen->machine, + draw_cloud( bitmap, screen->machine->gfx[0], wecleman_pageram+0x1800, diff --git a/src/mame/video/welltris.c b/src/mame/video/welltris.c index 7d44287ba6a..272032c7da8 100644 --- a/src/mame/video/welltris.c +++ b/src/mame/video/welltris.c @@ -80,12 +80,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan for (yt = 0; yt < ytiles; yt++) { for (xt = 0; xt < xtiles; xt++, code++) { if (!zoomed) - drawgfx(bitmap, machine->gfx[1], code, color, 0, 0, - x + xt * 16, y + yt * 16, cliprect, TRANSPARENCY_PEN, 15); + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code, color, 0, 0, + x + xt * 16, y + yt * 16, 15); else - drawgfxzoom(bitmap, machine->gfx[1], code, color, 0, 0, - x + xt * xzoom, y + yt * yzoom, cliprect, TRANSPARENCY_PEN, 15, - 0x1000 * xzoom, 0x1000 * yzoom); + drawgfxzoom_transpen(bitmap, cliprect, machine->gfx[1], code, color, 0, 0, + x + xt * xzoom, y + yt * yzoom, + 0x1000 * xzoom, 0x1000 * yzoom, 15); } if (xtiles == 3) code += 1; if (xtiles == 5) code += 3; @@ -99,12 +99,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan for (yt = 0; yt < ytiles; yt++) { for (xt = 0; xt < xtiles; xt++, code++) { if (!zoomed) - drawgfx(bitmap, machine->gfx[1], code, color, 1, 0, - x + (xtiles - 1 - xt) * 16, y + yt * 16, cliprect, TRANSPARENCY_PEN, 15); + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code, color, 1, 0, + x + (xtiles - 1 - xt) * 16, y + yt * 16, 15); else - drawgfxzoom(bitmap, machine->gfx[1], code, color, 1, 0, - x + (xtiles - 1 - xt) * xzoom, y + yt * yzoom, cliprect, TRANSPARENCY_PEN, 15, - 0x1000 * xzoom, 0x1000 * yzoom); + drawgfxzoom_transpen(bitmap, cliprect, machine->gfx[1], code, color, 1, 0, + x + (xtiles - 1 - xt) * xzoom, y + yt * yzoom, + 0x1000 * xzoom, 0x1000 * yzoom, 15); } if (xtiles == 3) code += 1; if (xtiles == 5) code += 3; @@ -118,12 +118,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan for (yt = 0; yt < ytiles; yt++) { for (xt = 0; xt < xtiles; xt++, code++) { if (!zoomed) - drawgfx(bitmap, machine->gfx[1], code, color, 0, 1, - x + xt * 16, y + (ytiles - 1 - yt) * 16, cliprect, TRANSPARENCY_PEN, 15); + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code, color, 0, 1, + x + xt * 16, y + (ytiles - 1 - yt) * 16, 15); else - drawgfxzoom(bitmap, machine->gfx[1], code, color, 0, 1, - x + xt * xzoom, y + (ytiles - 1 - yt) * yzoom, cliprect, TRANSPARENCY_PEN, 15, - 0x1000 * xzoom, 0x1000 * yzoom); + drawgfxzoom_transpen(bitmap, cliprect, machine->gfx[1], code, color, 0, 1, + x + xt * xzoom, y + (ytiles - 1 - yt) * yzoom, + 0x1000 * xzoom, 0x1000 * yzoom, 15); } if (xtiles == 3) code += 1; if (xtiles == 5) code += 3; @@ -137,12 +137,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan for (yt = 0; yt < ytiles; yt++) { for (xt = 0; xt < xtiles; xt++, code++) { if (!zoomed) - drawgfx(bitmap, machine->gfx[1], code, color, 1, 1, - x + (xtiles - 1 - xt) * 16, y + (ytiles - 1 - yt) * 16, cliprect, TRANSPARENCY_PEN, 15); + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code, color, 1, 1, + x + (xtiles - 1 - xt) * 16, y + (ytiles - 1 - yt) * 16, 15); else - drawgfxzoom(bitmap, machine->gfx[1], code, color, 1, 1, - x + (xtiles - 1 - xt) * xzoom, y + (ytiles - 1 - yt) * yzoom, cliprect, TRANSPARENCY_PEN, 15, - 0x1000 * xzoom, 0x1000 * yzoom); + drawgfxzoom_transpen(bitmap, cliprect, machine->gfx[1], code, color, 1, 1, + x + (xtiles - 1 - xt) * xzoom, y + (ytiles - 1 - yt) * yzoom, + 0x1000 * xzoom, 0x1000 * yzoom, 15); } if (xtiles == 3) code += 1; if (xtiles == 5) code += 3; diff --git a/src/mame/video/wgp.c b/src/mame/video/wgp.c index abc244356e1..0b4fa1e62ef 100644 --- a/src/mame/video/wgp.c +++ b/src/mame/video/wgp.c @@ -435,14 +435,13 @@ if (((spriteram16[i + 4]!=0xf800) && (spriteram16[i + 4]!=0xfff6)) zx = x + (((k+1)*zoomx)/2) - curx; zy = y + (((j+1)*zoomy)/2) - cury; - pdrawgfxzoom(bitmap, machine->gfx[0], + pdrawgfxzoom_transpen(bitmap, cliprect,machine->gfx[0], code, col, flipx, flipy, curx,cury, - cliprect,TRANSPARENCY_PEN,0, zx << 12, zy << 12, - primasks[((priority >> 1) &1)]); /* maybe >> 2 or 0...? */ + priority_bitmap,primasks[((priority >> 1) &1)],0); /* maybe >> 2 or 0...? */ } } else @@ -467,14 +466,13 @@ if (((spriteram16[i + 4]!=0xf800) && (spriteram16[i + 4]!=0xfff6)) zx = x + (((k+1)*zoomx)/4) - curx; zy = y + (((j+1)*zoomy)/4) - cury; - pdrawgfxzoom(bitmap, machine->gfx[0], + pdrawgfxzoom_transpen(bitmap, cliprect,machine->gfx[0], code, col, flipx, flipy, curx,cury, - cliprect,TRANSPARENCY_PEN,0, zx << 12, zy << 12, - primasks[((priority >> 1) &1)]); /* maybe >> 2 or 0...? */ + priority_bitmap,primasks[((priority >> 1) &1)],0); /* maybe >> 2 or 0...? */ } } } diff --git a/src/mame/video/wiping.c b/src/mame/video/wiping.c index b518d92a26d..7d8331846a3 100644 --- a/src/mame/video/wiping.c +++ b/src/mame/video/wiping.c @@ -121,12 +121,11 @@ VIDEO_UPDATE( wiping ) sy = 27 - sy; } - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0], videoram[offs], colorram[offs] & 0x3f, flipscreen,flipscreen, - sx*8,sy*8, - cliprect,TRANSPARENCY_NONE,0); + sx*8,sy*8); } /* Note, we're counting up on purpose ! */ @@ -150,12 +149,11 @@ VIDEO_UPDATE( wiping ) flipy = !flipy; } - drawgfx(bitmap,screen->machine->gfx[1], + drawgfx_transmask(bitmap,cliprect,screen->machine->gfx[1], (spriteram[offs] & 0x3f) + 64 * otherbank, color, flipx,flipy, sx,sy, - cliprect,TRANSPARENCY_PENS, colortable_get_transpen_mask(screen->machine->colortable, screen->machine->gfx[1], color, 0x1f)); } @@ -191,12 +189,11 @@ VIDEO_UPDATE( wiping ) sy = 27 - sy; } - drawgfx(bitmap,screen->machine->gfx[0], + drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0], videoram[offs], colorram[offs] & 0x3f, flipscreen,flipscreen, - sx*8,sy*8, - cliprect,TRANSPARENCY_NONE,0); + sx*8,sy*8); } } diff --git a/src/mame/video/wiz.c b/src/mame/video/wiz.c index c82ae264cb2..07047493746 100644 --- a/src/mame/video/wiz.c +++ b/src/mame/video/wiz.c @@ -147,12 +147,11 @@ static void draw_background(running_machine *machine, bitmap_t *bitmap, const re if (flipx) sx = 31 - sx; - drawgfx(bitmap,machine->gfx[bank], + drawgfx_transpen(bitmap,cliprect,machine->gfx[bank], videoram[offs], col + 8 * palette_bank, flipx,flipy, - 8*sx,scroll, - cliprect,TRANSPARENCY_PEN,0); + 8*sx,scroll,0); } } @@ -186,12 +185,11 @@ static void draw_foreground(running_machine *machine, bitmap_t *bitmap, const re if (flipx) sx = 31 - sx; - drawgfx(bitmap,machine->gfx[char_bank[1]], + drawgfx_transpen(bitmap,cliprect,machine->gfx[char_bank[1]], wiz_videoram2[offs], col + 8 * palette_bank, flipx,flipy, - 8*sx,scroll, - cliprect,TRANSPARENCY_PEN,0); + 8*sx,scroll,0); } } @@ -214,12 +212,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, if ( flipx) sx = 240 - sx; if (!flipy) sy = 240 - sy; - drawgfx(bitmap,machine->gfx[bank], + drawgfx_transpen(bitmap,cliprect,machine->gfx[bank], sprite_ram[offs + 1], (sprite_ram[offs + 2] & 0x07) + 8 * palette_bank, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/wolfpack.c b/src/mame/video/wolfpack.c index cfcd0533d5e..ee3598d61fb 100644 --- a/src/mame/video/wolfpack.c +++ b/src/mame/video/wolfpack.c @@ -164,15 +164,14 @@ static void draw_ship(running_machine *machine, bitmap_t* bitmap, const rectangl int chop = (scaler[wolfpack_ship_size >> 2] * wolfpack_ship_h_precess) >> 16; - drawgfxzoom(bitmap, machine->gfx[1], + drawgfxzoom_transpen(bitmap, cliprect, + machine->gfx[1], wolfpack_ship_pic, 0, wolfpack_ship_reflect, 0, 2 * (wolfpack_ship_h - chop), 128, - cliprect, - TRANSPARENCY_PEN, 0, - 2 * scaler[wolfpack_ship_size >> 2], scaler[wolfpack_ship_size >> 2]); + 2 * scaler[wolfpack_ship_size >> 2], scaler[wolfpack_ship_size >> 2], 0); } @@ -183,14 +182,13 @@ static void draw_torpedo(running_machine *machine, bitmap_t* bitmap, const recta int x; int y; - drawgfx(bitmap, machine->gfx[3], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[3], wolfpack_torpedo_pic, 0, 0, 0, 2 * (244 - wolfpack_torpedo_h), - 224 - wolfpack_torpedo_v, - cliprect, - TRANSPARENCY_PEN, 0); + 224 - wolfpack_torpedo_v, 0); for (y = 16; y < 224 - wolfpack_torpedo_v; y++) { @@ -220,23 +218,21 @@ static void draw_pt(running_machine *machine, bitmap_t* bitmap, const rectangle* if (!(wolfpack_pt_pic & 0x10)) rect.max_x = 255; - drawgfx(bitmap, machine->gfx[2], + drawgfx_transpen(bitmap, &rect, + machine->gfx[2], wolfpack_pt_pic, 0, 0, 0, 2 * wolfpack_pt_horz, - wolfpack_pt_pos_select ? 0x70 : 0xA0, - &rect, - TRANSPARENCY_PEN, 0); + wolfpack_pt_pos_select ? 0x70 : 0xA0, 0); - drawgfx(bitmap, machine->gfx[2], + drawgfx_transpen(bitmap, &rect, + machine->gfx[2], wolfpack_pt_pic, 0, 0, 0, 2 * wolfpack_pt_horz - 512, - wolfpack_pt_pos_select ? 0x70 : 0xA0, - &rect, - TRANSPARENCY_PEN, 0); + wolfpack_pt_pos_select ? 0x70 : 0xA0, 0); } @@ -283,14 +279,13 @@ VIDEO_UPDATE( wolfpack ) { int code = wolfpack_alpha_num_ram[32 * i + j]; - drawgfx(bitmap, screen->machine->gfx[0], + drawgfx_opaque(bitmap, cliprect, + screen->machine->gfx[0], code, wolfpack_video_invert, 0, 0, 16 * j, - 192 + 8 * i, - cliprect, - TRANSPARENCY_NONE, 0); + 192 + 8 * i); } draw_pt(screen->machine, bitmap, cliprect); diff --git a/src/mame/video/wrally.c b/src/mame/video/wrally.c index 45454911797..4d5e2939856 100644 --- a/src/mame/video/wrally.c +++ b/src/mame/video/wrally.c @@ -131,10 +131,9 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta } if (!color_effect) { - drawgfx(bitmap,gfx,number, + drawgfx_transpen(bitmap,cliprect,gfx,number, 0x20 + color,xflip,yflip, - sx - 0x0f,sy, - cliprect,TRANSPARENCY_PEN,0); + sx - 0x0f,sy,0); } else { /* get a pointer to the current sprite's gfx data */ const UINT8 *gfx_src = gfx_element_get_data(gfx, number % gfx->total_elements); diff --git a/src/mame/video/wwfsstar.c b/src/mame/video/wwfsstar.c index 9e3c28c72ff..b8061078b54 100644 --- a/src/mame/video/wwfsstar.c +++ b/src/mame/video/wwfsstar.c @@ -168,22 +168,22 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { if (!flipy) { - drawgfx(bitmap,gfx,number+count,colourbank,flipx,flipy,xpos,ypos+16*count,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,number+count,colourbank,flipx,flipy,xpos,ypos+16*count,0); } else { - drawgfx(bitmap,gfx,number+count,colourbank,flipx,flipy,xpos,ypos+(16*(chain-1))-(16*count),cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,number+count,colourbank,flipx,flipy,xpos,ypos+(16*(chain-1))-(16*count),0); } } else { if (!flipy) { - drawgfx(bitmap,gfx,number+count,colourbank,flipx,flipy,xpos,ypos-(16*(chain-1))+(16*count),cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,number+count,colourbank,flipx,flipy,xpos,ypos-(16*(chain-1))+(16*count),0); } else { - drawgfx(bitmap,gfx,number+count,colourbank,flipx,flipy,xpos,ypos-16*count,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,number+count,colourbank,flipx,flipy,xpos,ypos-16*count,0); } } } diff --git a/src/mame/video/wwfwfest.c b/src/mame/video/wwfwfest.c index 76e0e251a69..64d936d253b 100644 --- a/src/mame/video/wwfwfest.c +++ b/src/mame/video/wwfwfest.c @@ -199,15 +199,15 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta for (count=0;count<chain;count++) { if (flip_screen_get(machine)) { if (!flipy) { - drawgfx(bitmap,gfx,number+count,colourbank,flipx,flipy,xpos,ypos+(16*(chain-1))-(16*count),cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,number+count,colourbank,flipx,flipy,xpos,ypos+(16*(chain-1))-(16*count),0); } else { - drawgfx(bitmap,gfx,number+count,colourbank,flipx,flipy,xpos,ypos+16*count,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,number+count,colourbank,flipx,flipy,xpos,ypos+16*count,0); } } else { if (flipy) { - drawgfx(bitmap,gfx,number+count,colourbank,flipx,flipy,xpos,ypos-(16*(chain-1))+(16*count),cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,number+count,colourbank,flipx,flipy,xpos,ypos-(16*(chain-1))+(16*count),0); } else { - drawgfx(bitmap,gfx,number+count,colourbank,flipx,flipy,xpos,ypos-16*count,cliprect,TRANSPARENCY_PEN,0); + drawgfx_transpen(bitmap,cliprect,gfx,number+count,colourbank,flipx,flipy,xpos,ypos-16*count,0); } } } diff --git a/src/mame/video/xain.c b/src/mame/video/xain.c index 02cb1e05edf..c263855ed17 100644 --- a/src/mame/video/xain.c +++ b/src/mame/video/xain.c @@ -195,27 +195,24 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan if (attr & 0x80) /* double height */ { - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], numtile, color, flipx,flipy, - sx,flipy ? sy+16:sy-16, - cliprect,TRANSPARENCY_PEN,0); - drawgfx(bitmap,machine->gfx[3], + sx,flipy ? sy+16:sy-16,0); + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], numtile+1, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } else { - drawgfx(bitmap,machine->gfx[3], + drawgfx_transpen(bitmap,cliprect,machine->gfx[3], numtile, color, flipx,flipy, - sx,sy, - cliprect,TRANSPARENCY_PEN,0); + sx,sy,0); } } } diff --git a/src/mame/video/xevious.c b/src/mame/video/xevious.c index 16f92442425..8c62eb3e0e3 100644 --- a/src/mame/video/xevious.c +++ b/src/mame/video/xevious.c @@ -468,42 +468,35 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan if (spriteram_3[offs] & 1) /* double width, double height */ { code &= ~3; - drawgfx(bitmap,machine->gfx[bank], + drawgfx_transmask(bitmap,cliprect,machine->gfx[bank], code+3,color,flipx,flipy, - flipx ? sx : sx+16,flipy ? sy-16 : sy, - cliprect,TRANSPARENCY_PENS,transmask); - drawgfx(bitmap,machine->gfx[bank], + flipx ? sx : sx+16,flipy ? sy-16 : sy,transmask); + drawgfx_transmask(bitmap,cliprect,machine->gfx[bank], code+1,color,flipx,flipy, - flipx ? sx : sx+16,flipy ? sy : sy-16, - cliprect,TRANSPARENCY_PENS,transmask); + flipx ? sx : sx+16,flipy ? sy : sy-16,transmask); } code &= ~2; - drawgfx(bitmap,machine->gfx[bank], + drawgfx_transmask(bitmap,cliprect,machine->gfx[bank], code+2,color,flipx,flipy, - flipx ? sx+16 : sx,flipy ? sy-16 : sy, - cliprect,TRANSPARENCY_PENS,transmask); - drawgfx(bitmap,machine->gfx[bank], + flipx ? sx+16 : sx,flipy ? sy-16 : sy,transmask); + drawgfx_transmask(bitmap,cliprect,machine->gfx[bank], code,color,flipx,flipy, - flipx ? sx+16 : sx,flipy ? sy : sy-16, - cliprect,TRANSPARENCY_PENS,transmask); + flipx ? sx+16 : sx,flipy ? sy : sy-16,transmask); } else if (spriteram_3[offs] & 1) /* double width */ { code &= ~1; - drawgfx(bitmap,machine->gfx[bank], + drawgfx_transmask(bitmap,cliprect,machine->gfx[bank], code,color,flipx,flipy, - flipx ? sx+16 : sx,flipy ? sy-16 : sy, - cliprect,TRANSPARENCY_PENS,transmask); - drawgfx(bitmap,machine->gfx[bank], + flipx ? sx+16 : sx,flipy ? sy-16 : sy,transmask); + drawgfx_transmask(bitmap,cliprect,machine->gfx[bank], code+1,color,flipx,flipy, - flipx ? sx : sx+16,flipy ? sy-16 : sy, - cliprect,TRANSPARENCY_PENS,transmask); + flipx ? sx : sx+16,flipy ? sy-16 : sy,transmask); } else /* normal */ { - drawgfx(bitmap,machine->gfx[bank], - code,color,flipx,flipy,sx,sy, - cliprect,TRANSPARENCY_PENS,transmask); + drawgfx_transmask(bitmap,cliprect,machine->gfx[bank], + code,color,flipx,flipy,sx,sy,transmask); } } } diff --git a/src/mame/video/xorworld.c b/src/mame/video/xorworld.c index 02a639fae04..665d4dcae79 100644 --- a/src/mame/video/xorworld.c +++ b/src/mame/video/xorworld.c @@ -102,8 +102,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int code = (spriteram16[i+1] & 0x0ffc) >> 2; int color = (spriteram16[i+1] & 0xf000) >> 12; - drawgfx(bitmap, machine->gfx[1], code, color, 0, 0, sx, sy, - cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code, color, 0, 0, sx, sy, 0); } } diff --git a/src/mame/video/xxmissio.c b/src/mame/video/xxmissio.c index 603aa3cf268..ddebaa646bf 100644 --- a/src/mame/video/xxmissio.c +++ b/src/mame/video/xxmissio.c @@ -86,7 +86,7 @@ VIDEO_START( xxmissio ) } -static void draw_sprites(bitmap_t *bitmap, gfx_element **gfx, const rectangle *cliprect) +static void draw_sprites(bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx) { int offs; int chr,col; @@ -119,20 +119,18 @@ static void draw_sprites(bitmap_t *bitmap, gfx_element **gfx, const rectangle *c px &= 0x1ff; - drawgfx(bitmap,gfx[1], + drawgfx_transpen(bitmap,cliprect,gfx, chr, col, fx,fy, - px,py, - cliprect,TRANSPARENCY_PEN,0); + px,py,0); if (px>0x1e0) - drawgfx(bitmap,gfx[1], + drawgfx_transpen(bitmap,cliprect,gfx, chr, col, fx,fy, - px-0x200,py, - cliprect,TRANSPARENCY_PEN,0); + px-0x200,py,0); } } @@ -147,7 +145,7 @@ VIDEO_UPDATE( xxmissio ) tilemap_set_scrolly(bg_tilemap, 0, yscroll); tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); - draw_sprites(bitmap, screen->machine->gfx, cliprect); + draw_sprites(bitmap, cliprect, screen->machine->gfx[1]); tilemap_draw(bitmap, cliprect, fg_tilemap, 0, 0); return 0; diff --git a/src/mame/video/ygv608.c b/src/mame/video/ygv608.c index c8c8d3009f7..432002ff143 100644 --- a/src/mame/video/ygv608.c +++ b/src/mame/video/ygv608.c @@ -590,27 +590,24 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta logerror( "SZ_8X8: sprite=%d\n", code ); code = 0; } - drawgfx( bitmap, machine->gfx[GFX_8X8_4BIT], + drawgfx_transpen( bitmap, &spriteClip,machine->gfx[GFX_8X8_4BIT], code+namcond1_gfxbank*0x10000, color, flipx,flipy, - sx,sy, - &spriteClip,TRANSPARENCY_PEN,0x00); + sx,sy,0x00); // redraw with wrap-around if( sx > 512-8 ) - drawgfx( bitmap, machine->gfx[GFX_8X8_4BIT], + drawgfx_transpen( bitmap, &spriteClip,machine->gfx[GFX_8X8_4BIT], code+namcond1_gfxbank*0x10000, color, flipx,flipy, - sx-512,sy, - &spriteClip,TRANSPARENCY_PEN,0x00); + sx-512,sy,0x00); if( sy > 512-8 ) - drawgfx( bitmap, machine->gfx[GFX_8X8_4BIT], + drawgfx_transpen( bitmap, &spriteClip,machine->gfx[GFX_8X8_4BIT], code+namcond1_gfxbank*0x10000, color, flipx,flipy, - sx,sy-512, - &spriteClip,TRANSPARENCY_PEN,0x00); + sx,sy-512,0x00); // really should draw again for both wrapped! // - ignore until someone thinks it's required break; @@ -623,27 +620,24 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta logerror( "SZ_8X8: sprite=%d\n", code ); code = 0; } - drawgfx( bitmap, machine->gfx[GFX_16X16_4BIT], + drawgfx_transpen( bitmap, &spriteClip,machine->gfx[GFX_16X16_4BIT], code+namcond1_gfxbank*0x4000, color, flipx,flipy, - sx,sy, - &spriteClip,TRANSPARENCY_PEN,0x00); + sx,sy,0x00); // redraw with wrap-around if( sx > 512-16 ) - drawgfx( bitmap, machine->gfx[GFX_16X16_4BIT], + drawgfx_transpen( bitmap, &spriteClip,machine->gfx[GFX_16X16_4BIT], code+namcond1_gfxbank*0x4000, color, flipx,flipy, - sx-512,sy, - &spriteClip,TRANSPARENCY_PEN,0x00); + sx-512,sy,0x00); if( sy > 512-16 ) - drawgfx( bitmap, machine->gfx[GFX_16X16_4BIT], + drawgfx_transpen( bitmap, &spriteClip,machine->gfx[GFX_16X16_4BIT], code+namcond1_gfxbank*0x4000, color, flipx,flipy, - sx,sy-512, - &spriteClip,TRANSPARENCY_PEN,0x00); + sx,sy-512,0x00); // really should draw again for both wrapped! // - ignore until someone thinks it's required break; @@ -656,27 +650,24 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta logerror( "SZ_32X32: sprite=%d\n", code ); code = 0; } - drawgfx( bitmap, machine->gfx[GFX_32X32_4BIT], + drawgfx_transpen( bitmap, &spriteClip,machine->gfx[GFX_32X32_4BIT], code+namcond1_gfxbank*0x1000, color, flipx,flipy, - sx,sy, - &spriteClip,TRANSPARENCY_PEN,0x00); + sx,sy,0x00); // redraw with wrap-around if( sx > 512-32 ) - drawgfx( bitmap, machine->gfx[GFX_32X32_4BIT], + drawgfx_transpen( bitmap, &spriteClip,machine->gfx[GFX_32X32_4BIT], code+namcond1_gfxbank*0x1000, color, flipx,flipy, - sx-512,sy, - &spriteClip,TRANSPARENCY_PEN,0x00); + sx-512,sy,0x00); if( sy > 512-32 ) - drawgfx( bitmap, machine->gfx[GFX_32X32_4BIT], + drawgfx_transpen( bitmap, &spriteClip,machine->gfx[GFX_32X32_4BIT], code+namcond1_gfxbank*0x1000, color, flipx,flipy, - sx,sy-512, - &spriteClip,TRANSPARENCY_PEN,0x00); + sx,sy-512,0x00); // really should draw again for both wrapped! // - ignore until someone thinks it's required break; @@ -689,27 +680,24 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta logerror( "SZ_64X64: sprite=%d\n", code ); code = 0; } - drawgfx( bitmap, machine->gfx[GFX_64X64_4BIT], + drawgfx_transpen( bitmap, &spriteClip,machine->gfx[GFX_64X64_4BIT], code+namcond1_gfxbank*0x400, color, flipx,flipy, - sx,sy, - &spriteClip,TRANSPARENCY_PEN,0x00); + sx,sy,0x00); // redraw with wrap-around if( sx > 512-64 ) - drawgfx( bitmap, machine->gfx[GFX_64X64_4BIT], + drawgfx_transpen( bitmap, &spriteClip,machine->gfx[GFX_64X64_4BIT], code+namcond1_gfxbank*0x400, color, flipx,flipy, - sx-512,sy, - &spriteClip,TRANSPARENCY_PEN,0x00); + sx-512,sy,0x00); if( sy > 512-64 ) - drawgfx( bitmap, machine->gfx[GFX_64X64_4BIT], + drawgfx_transpen( bitmap, &spriteClip,machine->gfx[GFX_64X64_4BIT], code+namcond1_gfxbank*0x400, color, flipx,flipy, - sx,sy-512, - &spriteClip,TRANSPARENCY_PEN,0x00); + sx,sy-512,0x00); // really should draw again for both wrapped! // - ignore until someone thinks it's required break; diff --git a/src/mame/video/yiear.c b/src/mame/video/yiear.c index 74e3881462d..d6021613838 100644 --- a/src/mame/video/yiear.c +++ b/src/mame/video/yiear.c @@ -133,12 +133,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta sy++; /* fix title screen & garbage at the bottom of the screen */ } - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap, cliprect, + machine->gfx[1], code, color, flipx, flipy, - sx, sy, - cliprect, - TRANSPARENCY_PEN, 0); + sx, sy, 0); } } diff --git a/src/mame/video/yunsun16.c b/src/mame/video/yunsun16.c index 783c8df3b53..938d1d290f8 100644 --- a/src/mame/video/yunsun16.c +++ b/src/mame/video/yunsun16.c @@ -182,13 +182,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan flipy = !flipy; y = max_y - y - 16; } - pdrawgfx( bitmap,machine->gfx[1], + pdrawgfx_transpen( bitmap,cliprect,machine->gfx[1], code, attr & 0x1f, flipx, flipy, x,y, - cliprect,TRANSPARENCY_PEN,15, - pri_mask ); + priority_bitmap, + pri_mask,15 ); } } diff --git a/src/mame/video/zac2650.c b/src/mame/video/zac2650.c index c0cf786a931..3a0e9e819f2 100644 --- a/src/mame/video/zac2650.c +++ b/src/mame/video/zac2650.c @@ -65,12 +65,11 @@ static int SpriteCollision(running_machine *machine, int first,int second) /* Draw first sprite */ - drawgfx(spritebitmap,machine->gfx[expand], + drawgfx_opaque(spritebitmap,0, machine->gfx[expand], first * 2, 0, 0,0, - fx,fy, - 0, TRANSPARENCY_NONE, 0); + fx,fy); /* Get fingerprint */ @@ -92,12 +91,11 @@ static int SpriteCollision(running_machine *machine, int first,int second) /* Blackout second sprite */ - drawgfx(spritebitmap,machine->gfx[1], + drawgfx_transpen(spritebitmap,0, machine->gfx[1], second * 2, 1, 0,0, - (zac2650_s2636_0_ram[second * 0x10 + 10] * 4)-22,(zac2650_s2636_0_ram[second * 0x10 + 12] * 3) + 3, - 0, TRANSPARENCY_PEN, 0); + (zac2650_s2636_0_ram[second * 0x10 + 10] * 4)-22,(zac2650_s2636_0_ram[second * 0x10 + 12] * 3) + 3, 0); /* Remove fingerprint */ @@ -119,12 +117,11 @@ static int SpriteCollision(running_machine *machine, int first,int second) /* Zero bitmap */ - drawgfx(spritebitmap,machine->gfx[expand], + drawgfx_opaque(spritebitmap,0, machine->gfx[expand], first * 2, 1, 0,0, - fx,fy, - 0, TRANSPARENCY_NONE, 0); + fx,fy); } return Checksum; @@ -181,12 +178,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap) int x,y; /* Sprite->Background collision detection */ - drawgfx(bitmap,machine->gfx[expand], + drawgfx_transpen(bitmap,0, machine->gfx[expand], spriteno, 1, 0,0, - bx,by, - 0, TRANSPARENCY_PEN, 0); + bx,by, 0); for (x = bx; x < bx + machine->gfx[expand]->width; x++) { @@ -208,12 +204,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap) } } - drawgfx(bitmap,machine->gfx[expand], + drawgfx_transpen(bitmap,0, machine->gfx[expand], spriteno, 0, 0,0, - bx,by, - 0, TRANSPARENCY_PEN, 0); + bx,by, 0); } } diff --git a/src/mame/video/zaccaria.c b/src/mame/video/zaccaria.c index a2befba31fb..2d889103025 100644 --- a/src/mame/video/zaccaria.c +++ b/src/mame/video/zaccaria.c @@ -246,12 +246,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,&clip,machine->gfx[1], (spriteram_2[offs + 2] & 0x3f) + (spriteram_2[offs + 1] & 0xc0), 4 * (spriteram_2[offs + 1] & 0x07), flipx,flipy, - sx,sy, - &clip,TRANSPARENCY_PEN,0); + sx,sy,0); } for (offs = 0;offs < spriteram_size;offs += 4) @@ -272,12 +271,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx_transpen(bitmap,&clip,machine->gfx[1], (spriteram[offs + 1] & 0x3f) + (spriteram[offs + 2] & 0xc0), 4 * (spriteram[offs + 2] & 0x07), flipx,flipy, - sx,sy, - &clip,TRANSPARENCY_PEN,0); + sx,sy,0); } } diff --git a/src/mame/video/zaxxon.c b/src/mame/video/zaxxon.c index 7bd5b3ca72d..b92ed16d496 100644 --- a/src/mame/video/zaxxon.c +++ b/src/mame/video/zaxxon.c @@ -437,10 +437,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int sx = find_minimum_x(spriteram[offs + 3], flip); /* draw with 256 pixel offsets to ensure we wrap properly */ - drawgfx(bitmap, machine->gfx[2], code, color, flipx, flipy, sx, sy, cliprect, TRANSPARENCY_PEN, 0); - drawgfx(bitmap, machine->gfx[2], code, color, flipx, flipy, sx, sy - 0x100, cliprect, TRANSPARENCY_PEN, 0); - drawgfx(bitmap, machine->gfx[2], code, color, flipx, flipy, sx - 0x100, sy, cliprect, TRANSPARENCY_PEN, 0); - drawgfx(bitmap, machine->gfx[2], code, color, flipx, flipy, sx - 0x100, sy - 0x100, cliprect, TRANSPARENCY_PEN, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[2], code, color, flipx, flipy, sx, sy, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[2], code, color, flipx, flipy, sx, sy - 0x100, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[2], code, color, flipx, flipy, sx - 0x100, sy, 0); + drawgfx_transpen(bitmap, cliprect, machine->gfx[2], code, color, flipx, flipy, sx - 0x100, sy - 0x100, 0); } } diff --git a/src/mame/video/zodiack.c b/src/mame/video/zodiack.c index 5b547b822b6..b041fb9ca5d 100644 --- a/src/mame/video/zodiack.c +++ b/src/mame/video/zodiack.c @@ -150,14 +150,13 @@ static void draw_bullets(running_machine *machine, bitmap_t *bitmap, const recta y = 255 - y; } - drawgfx( + drawgfx_transpen( bitmap, - machine->gfx[2], + cliprect,machine->gfx[2], 0, /* this is just a dot, generated by the hardware */ 0, 0,0, - x,y, - cliprect,TRANSPARENCY_PEN,0); + x,y,0); } } @@ -181,14 +180,12 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap, machine->gfx[1], + drawgfx_transpen(bitmap,cliprect,machine->gfx[1], spritecode, spriteram[offs + 2] & 0x07, flipx, flipy, sx, sy, - //flip_screen[0] ? &spritevisibleareaflipx : &spritevisiblearea,TRANSPARENCY_PEN,0); - //&spritevisiblearea,TRANSPARENCY_PEN,0); - cliprect, TRANSPARENCY_PEN, 0); + 0); } } |