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
This commit is contained in:
Aaron Giles 2009-06-25 07:56:56 +00:00
parent 51d2e24a30
commit f7ce2a786a
527 changed files with 2333 additions and 3101 deletions

View File

@ -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++;
}

View File

@ -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]);

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 )
{

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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;
}
}

View File

@ -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);
}
}
}

View File

@ -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--;
}

View File

@ -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);
}
}

View File

@ -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);
}
}
}

View File

@ -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++;
}

View File

@ -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 */
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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++;
}
}

View File

@ -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;
}

View File

@ -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);
}
}
}

View File

@ -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++;
}
}

View File

@ -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;
}
}

View File

@ -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);
}
}

View File

@ -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++;
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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--;

View File

@ -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;

View File

@ -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);
}
}
}

View File

@ -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--;
}

View File

@ -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;
}
}

View File

@ -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;

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -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++;
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}

View File

@ -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;

View File

@ -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 );
}
}
}

View File

@ -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++;
}

View File

@ -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++;
}
}

View File

@ -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;
}

View File

@ -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);
}
}
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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)

View File

@ -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++;
}
}

View File

@ -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);
}
}

View File

@ -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++;
}

View File

@ -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;

View File

@ -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);
}
}
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);

View File

@ -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;

View File

@ -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++;
}
}

View File

@ -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;
}

View File

@ -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 );
}
}
}

View File

@ -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--;
}

View File

@ -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++;

View File

@ -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);
}
}

View File

@ -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
{

View File

@ -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++;
}

View File

@ -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);
}
}

View File

@ -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++;

View File

@ -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++;
}

View File

@ -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 );
}
}

View File

@ -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 );
}

View File

@ -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);
}
}
}

View File

@ -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++;
}

View File

@ -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);
}
}

View File

@ -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));
}
}

View File

@ -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++;
}

View File

@ -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);
}
}

View File

@ -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++;
}

View File

@ -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);

View File

@ -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);
}
}

View File

@ -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;

View File

@ -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++;
}

View File

@ -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++;
}
}

View File

@ -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;
}

View File

@ -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);
}
}
}

View File

@ -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;
}

View File

@ -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++;
}

View File

@ -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);
}
}
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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);

View File

@ -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,

View File

@ -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);

View File

@ -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);
}
}
}

View File

@ -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);
}
}

View File

@ -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--;
}
}

View File

@ -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);
}
}

Some files were not shown because too many files have changed in this diff Show More