Cleaned out remaining generic drawgfx usage. Removed the

TRANSPARENCY_* constants, cleaning up vestigial usages.
This commit is contained in:
Aaron Giles 2009-07-02 05:45:07 +00:00
parent f174883581
commit 35f7dd5c6d
25 changed files with 168 additions and 334 deletions

View File

@ -401,36 +401,6 @@ void decodegfx(gfx_element *gfx, UINT32 first, UINT32 count)
DRAWGFX IMPLEMENTATIONS
***************************************************************************/
/*-------------------------------------------------
drawgfx - generic drawgfx with legacy
interface
-------------------------------------------------*/
void drawgfx(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy,
INT32 sx, INT32 sy, int transparency, UINT32 transparent_color)
{
switch (transparency)
{
case TRANSPARENCY_NONE:
drawgfx_opaque(dest, cliprect, gfx, code, color, flipx, flipy, sx, sy);
break;
case TRANSPARENCY_PEN:
drawgfx_transpen(dest, cliprect, gfx, code, color, flipx, flipy, sx, sy, transparent_color);
break;
case TRANSPARENCY_PENS:
drawgfx_transmask(dest, cliprect, gfx, code, color, flipx, flipy, sx, sy, transparent_color);
break;
default:
fatalerror("Invalid transparency specified for drawgfx (%d)", transparency);
break;
}
}
/*-------------------------------------------------
drawgfx_opaque - render a gfx element with
no transparency
@ -674,37 +644,6 @@ void drawgfx_alpha(bitmap_t *dest, const rectangle *cliprect, const gfx_element
DRAWGFXZOOM IMPLEMENTATIONS
***************************************************************************/
/*-------------------------------------------------
drawgfxzoom - generic drawgfxzoom with legacy
interface
-------------------------------------------------*/
void drawgfxzoom(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy,
INT32 sx, INT32 sy, int transparency, UINT32 transparent_color,
UINT32 scalex, UINT32 scaley)
{
switch (transparency)
{
case TRANSPARENCY_NONE:
drawgfxzoom_opaque(dest, cliprect, gfx, code, color, flipx, flipy, sx, sy, scalex, scaley);
break;
case TRANSPARENCY_PEN:
drawgfxzoom_transpen(dest, cliprect, gfx, code, color, flipx, flipy, sx, sy, scalex, scaley, transparent_color);
break;
case TRANSPARENCY_PENS:
drawgfxzoom_transmask(dest, cliprect, gfx, code, color, flipx, flipy, sx, sy, scalex, scaley, transparent_color);
break;
default:
fatalerror("Invalid transparency specified for drawgfxzoom (%d)", transparency);
break;
}
}
/*-------------------------------------------------
drawgfxzoom_opaque - render a scaled gfx
element with no transparency
@ -991,37 +930,6 @@ void drawgfxzoom_alpha(bitmap_t *dest, const rectangle *cliprect, const gfx_elem
PDRAWGFX IMPLEMENTATIONS
***************************************************************************/
/*-------------------------------------------------
pdrawgfx - generic pdrawgfx with legacy
interface
-------------------------------------------------*/
void pdrawgfx(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy,
INT32 sx, INT32 sy, int transparency, UINT32 transparent_color,
UINT32 priority_mask)
{
switch (transparency)
{
case TRANSPARENCY_NONE:
pdrawgfx_opaque(dest, cliprect, gfx, code, color, flipx, flipy, sx, sy, priority_bitmap, priority_mask);
break;
case TRANSPARENCY_PEN:
pdrawgfx_transpen(dest, cliprect, gfx, code, color, flipx, flipy, sx, sy, priority_bitmap, priority_mask, transparent_color);
break;
case TRANSPARENCY_PENS:
pdrawgfx_transmask(dest, cliprect, gfx, code, color, flipx, flipy, sx, sy, priority_bitmap, priority_mask, transparent_color);
break;
default:
fatalerror("Invalid transparency specified for pdrawgfx (%d)", transparency);
break;
}
}
/*-------------------------------------------------
pdrawgfx_opaque - render a gfx element with
no transparency, checking against the priority
@ -1281,37 +1189,6 @@ void pdrawgfx_alpha(bitmap_t *dest, const rectangle *cliprect, const gfx_element
PDRAWGFXZOOM IMPLEMENTATIONS
***************************************************************************/
/*-------------------------------------------------
pdrawgfxzoom - generic pdrawgfxzoom with
legacy interface
-------------------------------------------------*/
void pdrawgfxzoom(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy,
INT32 sx, INT32 sy, int transparency, UINT32 transparent_color,
UINT32 scalex, UINT32 scaley, UINT32 priority_mask)
{
switch (transparency)
{
case TRANSPARENCY_NONE:
pdrawgfxzoom_opaque(dest, cliprect, gfx, code, color, flipx, flipy, sx, sy, scalex, scaley, priority_bitmap, priority_mask);
break;
case TRANSPARENCY_PEN:
pdrawgfxzoom_transpen(dest, cliprect, gfx, code, color, flipx, flipy, sx, sy, scalex, scaley, priority_bitmap, priority_mask, transparent_color);
break;
case TRANSPARENCY_PENS:
pdrawgfxzoom_transmask(dest, cliprect, gfx, code, color, flipx, flipy, sx, sy, scalex, scaley, priority_bitmap, priority_mask, transparent_color);
break;
default:
fatalerror("Invalid transparency specified for pdrawgfxzoom (%d)", transparency);
break;
}
}
/*-------------------------------------------------
pdrawgfxzoom_opaque - render a scaled gfx
element with no transparency, checking against

View File

@ -46,15 +46,6 @@
8x8 and 16x16; cps.c has 8x8, 16x16 and 32x32 tiles all fetched from the same ROMs).
*/
enum
{
TRANSPARENCY_NONE, /* opaque with remapping */
TRANSPARENCY_PEN, /* single pen transparency with remapping */
TRANSPARENCY_PENS, /* multiple pen transparency with remapping */
TRANSPARENCY_MODES /* total number of modes; must be last */
};
enum
{
DRAWMODE_NONE,
@ -192,9 +183,6 @@ void gfx_element_build_temporary(gfx_element *gfx, running_machine *machine, UIN
/* ----- core graphics drawing ----- */
/* generic drawgfx with legacy interface */
void drawgfx(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, int transparency, UINT32 transparent_color);
/* specific drawgfx implementations for each transparency type */
void drawgfx_opaque(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty);
void drawgfx_transpen(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen);
@ -207,9 +195,6 @@ void drawgfx_alpha(bitmap_t *dest, const rectangle *cliprect, const gfx_element
/* ----- zoomed graphics drawing ----- */
/* generic drawgfxzoom with legacy interface */
void drawgfxzoom(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, int transparency, UINT32 transparent_color, UINT32 scalex, UINT32 scaley);
/* specific drawgfxzoom implementations for each transparency type */
void drawgfxzoom_opaque(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley);
void drawgfxzoom_transpen(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen);
@ -222,9 +207,6 @@ void drawgfxzoom_alpha(bitmap_t *dest, const rectangle *cliprect, const gfx_elem
/* ----- priority masked graphics drawing ----- */
/* generic pdrawgfx with legacy interface */
void pdrawgfx(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, int transparency, UINT32 transparent_color, UINT32 pmask);
/* specific pdrawgfx implementations for each transparency type */
void pdrawgfx_opaque(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t *priority, UINT32 pmask);
void pdrawgfx_transpen(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t *priority, UINT32 pmask, UINT32 transpen);
@ -237,9 +219,6 @@ void pdrawgfx_alpha(bitmap_t *dest, const rectangle *cliprect, const gfx_element
/* ----- priority masked zoomed graphics drawing ----- */
/* generic pdrawgfxzoom with legacy interface */
void pdrawgfxzoom(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, int transparency, UINT32 transparent_color, UINT32 scalex, UINT32 scaley, UINT32 pmask);
/* specific pdrawgfxzoom implementations for each transparency type */
void pdrawgfxzoom_opaque(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask);
void pdrawgfxzoom_transpen(bitmap_t *dest, const rectangle *cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask, UINT32 transpen);

View File

@ -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
// there are surely also shadows (see gametngk) but how they're enabled we don't know
if (flipscreen)
{

View File

@ -24,12 +24,12 @@
static int cardline_video;
#define DRAW_TILE(offset, transparency) drawgfx(bitmap, cliprect, screen->machine->gfx[0],\
#define DRAW_TILE(offset, transparency) drawgfx_transpen(bitmap, cliprect, screen->machine->gfx[0],\
(videoram[index+offset] | (colorram[index+offset]<<8))&0x3fff,\
(colorram[index+offset]&0x80)>>7,\
0,0,\
x<<3, y<<3,\
transparency?TRANSPARENCY_PEN:TRANSPARENCY_NONE,transparency);
transparency?transparency:-1);
static VIDEO_UPDATE( cardline )
{

View File

@ -499,7 +499,7 @@ INLINE void cps3_drawgfxzoom(bitmap_t *dest_bmp,const rectangle *clip,const gfx_
{ /* skip if inner loop doesn't draw anything */
int y;
/* case 0: TRANSPARENCY_NONE */
/* case 0: no transparency */
if (transparency == CPS3_TRANSPARENCY_NONE)
{
{

View File

@ -422,7 +422,7 @@ wouldnt like to say its the most effective way though...
tileno|=(bank<<8);
color=((dderby_vidattribs[count])&0x1f);
drawgfx(bitmap,cliprect,gfx,tileno,color,0,0,x*8,y*8,(tileno == 0x38) ? TRANSPARENCY_PEN : TRANSPARENCY_NONE,0);
drawgfx_transpen(bitmap,cliprect,gfx,tileno,color,0,0,x*8,y*8,(tileno == 0x38) ? 0 : -1);
count++;
}

View File

@ -70,7 +70,7 @@ static VIDEO_UPDATE(jackpool)
/*might just be sloppy coding,colors are enabled as 0x20-0x3f*/
int t_pen = (sc0_vram[count+0x800] & 0x2000);
//int colour = tile>>12;
drawgfx(bitmap,cliprect,gfx,tile,attr,0,0,x*8,y*8,(t_pen) ? TRANSPARENCY_NONE : TRANSPARENCY_PEN,0);
drawgfx_transpen(bitmap,cliprect,gfx,tile,attr,0,0,x*8,y*8,(t_pen) ? -1 : 0);
count++;
}
}
@ -103,7 +103,7 @@ static VIDEO_UPDATE(jackpool)
/*might just be sloppy coding,colors are enabled as 0x20-0x3f*/
int t_pen = (sc3_vram[count+0x800] & 0x2000);
//int colour = tile>>12;
drawgfx(bitmap,cliprect,gfx,tile,attr,0,0,x*8,y*8,(t_pen) ? TRANSPARENCY_NONE : TRANSPARENCY_PEN,0);
drawgfx_transpen(bitmap,cliprect,gfx,tile,attr,0,0,x*8,y*8,(t_pen) ? -1 : 0);
count++;
}
}

View File

@ -268,7 +268,6 @@ WRITE32_HANDLER( namco_tilemapvideoram32_le_w )
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,
int transparency,int transparent_color,
int scalex, int scaley, int zpos )
{
if (!scalex || !scaley) return;
@ -342,68 +341,65 @@ static void zdrawgfxzoom(
if( ex>sx )
{ /* skip if inner loop doesn't draw anything */
int y;
if (transparency == TRANSPARENCY_PEN)
if( priority_bitmap )
{
if( priority_bitmap )
for( y=sy; y<ey; y++ )
{
for( y=sy; y<ey; y++ )
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
UINT16 *dest = BITMAP_ADDR16(dest_bmp, y, 0);
UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0);
int x, x_index = x_index_base;
if( mPalXOR )
{
const UINT8 *source = source_base + (y_index>>16) * gfx->line_modulo;
UINT16 *dest = BITMAP_ADDR16(dest_bmp, y, 0);
UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0);
int x, x_index = x_index_base;
if( mPalXOR )
for( x=sx; x<ex; x++ )
{
for( x=sx; x<ex; x++ )
int c = source[x_index>>16];
if( c != 0xff )
{
int c = source[x_index>>16];
if( c != transparent_color )
if( pri[x]<=zpos )
{
if( pri[x]<=zpos )
switch( c )
{
switch( c )
{
case 0:
dest[x] = 0x4000|(dest[x]&0x1fff);
break;
case 1:
dest[x] = 0x6000|(dest[x]&0x1fff);
break;
default:
dest[x] = pal[c];
break;
}
pri[x] = zpos;
case 0:
dest[x] = 0x4000|(dest[x]&0x1fff);
break;
case 1:
dest[x] = 0x6000|(dest[x]&0x1fff);
break;
default:
dest[x] = pal[c];
break;
}
pri[x] = zpos;
}
x_index += dx;
}
y_index += dy;
x_index += dx;
}
else
y_index += dy;
}
else
{
for( x=sx; x<ex; x++ )
{
for( x=sx; x<ex; x++ )
int c = source[x_index>>16];
if( c != 0xff )
{
int c = source[x_index>>16];
if( c != transparent_color )
if( pri[x]<=zpos )
{
if( pri[x]<=zpos )
if( color == 0xf && c==0xfe && shadow_offset )
{
if( color == 0xf && c==0xfe && shadow_offset )
{
dest[x] |= shadow_offset;
}
else
{
dest[x] = pal[c];
}
pri[x] = zpos;
dest[x] |= shadow_offset;
}
else
{
dest[x] = pal[c];
}
pri[x] = zpos;
}
x_index += dx;
}
y_index += dy;
x_index += dx;
}
y_index += dy;
}
}
}
@ -485,7 +481,6 @@ namcos2_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle
color,
flipx,flipy,
xpos,ypos,
TRANSPARENCY_PEN,0xff,
scalex,scaley,
loop );
}
@ -619,7 +614,6 @@ namcos2_draw_sprites_metalhawk(running_machine *machine, bitmap_t *bitmap, const
sprn, color,
flipx,flipy,
sx,sy,
TRANSPARENCY_PEN,0xff,
scalex, scaley,
loop );
}
@ -885,7 +879,6 @@ draw_spriteC355(running_machine *machine, bitmap_t *bitmap, const rectangle *cli
color,
flipx,flipy,
sx,sy,
TRANSPARENCY_PEN,0xff,
zoomx, zoomy, zpos );
}
if( !flipx )

View File

@ -192,12 +192,12 @@ static void cga_alphanumeric_tilemap(running_machine *machine, bitmap_t *bitmap,
int tile = vga_vram[offs] & 0xff;
int color = vga_vram[offs+1] & 0xff;
drawgfx(bitmap,cliprect,machine->gfx[gfx_num],
drawgfx_transpen(bitmap,cliprect,machine->gfx[gfx_num],
tile,
color,
0,0,
x*8,y*8,
((color & 0xf0) != 0) ? TRANSPARENCY_NONE : TRANSPARENCY_PEN,0);
((color & 0xf0) != 0) ? -1 : 0);
offs+=2;
}

View File

@ -102,12 +102,12 @@ static void draw_tilemap(running_machine *machine, bitmap_t *bitmap,const rectan
rgn = gfx1;
}
drawgfx(bitmap,cliprect,machine->gfx[rgn],
drawgfx_transpen(bitmap,cliprect,machine->gfx[rgn],
code,
color,
0,0,
8*x,8*y,
transparency,7);
transparency ? 7 : -1);
addr = (addr & 0xfc00) | ((addr + 1) & 0x03ff);
}
@ -120,8 +120,8 @@ static VIDEO_UPDATE( tugboat )
int startaddr1 = hd46505_1_reg[0x0c]*256 + hd46505_1_reg[0x0d];
draw_tilemap(screen->machine, bitmap,cliprect,startaddr0,0,1,TRANSPARENCY_NONE);
draw_tilemap(screen->machine, bitmap,cliprect,startaddr1,2,3,TRANSPARENCY_PEN);
draw_tilemap(screen->machine, bitmap,cliprect,startaddr0,0,1,FALSE);
draw_tilemap(screen->machine, bitmap,cliprect,startaddr1,2,3,TRUE);
return 0;
}

View File

@ -51,10 +51,10 @@ PALETTE_INIT( ambush )
static void draw_chars(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int priority)
{
int offs, transparency;
int offs, transpen;
transparency = (priority == 0) ? TRANSPARENCY_NONE : TRANSPARENCY_PEN;
transpen = (priority == 0) ? -1 : 0;
for (offs = 0; offs < videoram_size; offs++)
{
@ -80,12 +80,12 @@ static void draw_chars(running_machine *machine, bitmap_t *bitmap, const rectang
scroll = ~scroll - 1;
}
drawgfx(bitmap,cliprect,machine->gfx[0],
drawgfx_transpen(bitmap,cliprect,machine->gfx[0],
code,
(col & 0x0f) | ((*ambush_colorbank & 0x03) << 4),
flip_screen_get(machine),flip_screen_get(machine),
8*sx, (8*sy + scroll) & 0xff,
transparency,0);
transpen);
}
}

View File

@ -330,12 +330,12 @@ static void draw_chars(running_machine *machine, bitmap_t *bitmap, const rectang
y = 33 - y;
}
drawgfx(bitmap,cliprect,machine->gfx[0],
drawgfx_transpen(bitmap,cliprect,machine->gfx[0],
code,
color,
flip_screen_get(machine),flip_screen_get(machine),
8*x,8*y,
transparency,0);
transparency ? 0 : -1);
}
}
@ -447,10 +447,10 @@ VIDEO_UPDATE( btime )
}
draw_background(screen->machine, bitmap, cliprect, btime_tilemap, 0);
draw_chars(screen->machine, bitmap, cliprect, TRANSPARENCY_PEN, 0, -1);
draw_chars(screen->machine, bitmap, cliprect, TRUE, 0, -1);
}
else
draw_chars(screen->machine, bitmap, cliprect, TRANSPARENCY_NONE, 0, -1);
draw_chars(screen->machine, bitmap, cliprect, FALSE, 0, -1);
draw_sprites(screen->machine, bitmap, cliprect, 0, 1, 0, btime_videoram, 0x20);
@ -460,7 +460,7 @@ VIDEO_UPDATE( btime )
VIDEO_UPDATE( eggs )
{
draw_chars(screen->machine, bitmap, cliprect, TRANSPARENCY_NONE, 0, -1);
draw_chars(screen->machine, bitmap, cliprect, FALSE, 0, -1);
draw_sprites(screen->machine, bitmap, cliprect, 0, 0, 0, btime_videoram, 0x20);
return 0;
@ -469,7 +469,7 @@ VIDEO_UPDATE( eggs )
VIDEO_UPDATE( lnc )
{
draw_chars(screen->machine, bitmap, cliprect, TRANSPARENCY_NONE, 0, -1);
draw_chars(screen->machine, bitmap, cliprect, FALSE, 0, -1);
draw_sprites(screen->machine, bitmap, cliprect, 0, 1, 2, btime_videoram, 0x20);
return 0;
@ -481,10 +481,10 @@ VIDEO_UPDATE( zoar )
if (bnj_scroll1 & 0x04)
{
draw_background(screen->machine, bitmap, cliprect, zoar_scrollram, btime_palette);
draw_chars(screen->machine, bitmap, cliprect, TRANSPARENCY_PEN, btime_palette + 1, -1);
draw_chars(screen->machine, bitmap, cliprect, TRUE, btime_palette + 1, -1);
}
else
draw_chars(screen->machine, bitmap, cliprect, TRANSPARENCY_NONE, btime_palette + 1, -1);
draw_chars(screen->machine, bitmap, cliprect, FALSE, btime_palette + 1, -1);
/* The order is important for correct priorities */
draw_sprites(screen->machine, bitmap, cliprect, btime_palette + 1, 1, 2, btime_videoram + 0x1f, 0x20);
@ -529,13 +529,13 @@ VIDEO_UPDATE( bnj )
/* copy the low priority characters followed by the sprites
then the high priority characters */
draw_chars(screen->machine, bitmap, cliprect, TRANSPARENCY_PEN, 0, 1);
draw_chars(screen->machine, bitmap, cliprect, TRUE, 0, 1);
draw_sprites(screen->machine, bitmap, cliprect, 0, 0, 0, btime_videoram, 0x20);
draw_chars(screen->machine, bitmap, cliprect, TRANSPARENCY_PEN, 0, 0);
draw_chars(screen->machine, bitmap, cliprect, TRUE, 0, 0);
}
else
{
draw_chars(screen->machine, bitmap, cliprect, TRANSPARENCY_NONE, 0, -1);
draw_chars(screen->machine, bitmap, cliprect, FALSE, 0, -1);
draw_sprites(screen->machine, bitmap, cliprect, 0, 0, 0, btime_videoram, 0x20);
}
@ -567,7 +567,7 @@ VIDEO_UPDATE( cookrace )
8*sx,8*sy);
}
draw_chars(screen->machine, bitmap, cliprect, TRANSPARENCY_PEN, 0, -1);
draw_chars(screen->machine, bitmap, cliprect, TRUE, 0, -1);
draw_sprites(screen->machine, bitmap, cliprect, 0, 1, 0, btime_videoram, 0x20);
return 0;
@ -576,7 +576,7 @@ VIDEO_UPDATE( cookrace )
VIDEO_UPDATE( disco )
{
draw_chars(screen->machine, bitmap, cliprect, TRANSPARENCY_NONE, btime_palette, -1);
draw_chars(screen->machine, bitmap, cliprect, FALSE, btime_palette, -1);
draw_sprites(screen->machine, bitmap, cliprect, btime_palette, 0, 0, spriteram, 1);
return 0;

View File

@ -144,19 +144,19 @@ static void draw_fg(running_machine *machine, bitmap_t *bitmap, const rectangle
int flipx = flip_screen_x_get(machine);
int flipy = flip_screen_y_get(machine);
/* the following line is most likely wrong */
int transp = (bg_on && sx >= 22) ? TRANSPARENCY_NONE : TRANSPARENCY_PEN;
int transpen = (bg_on && sx >= 22) ? -1 : 0;
int code = videoram[offs];
if (flipx) sx = 31 - sx;
if (flipy) sy = 31 - sy;
drawgfx(bitmap,cliprect,machine->gfx[0],
drawgfx_transpen(bitmap,cliprect,machine->gfx[0],
code,
0,
flipx,flipy,
8*sx,8*sy,
transp,0);
transpen);
}
}

View File

@ -664,12 +664,12 @@ static void cischeat_draw_road(running_machine *machine, bitmap_t *bitmap, const
for (sx = -(xscroll%TILE_SIZE) ; sx <= max_x ; sx +=TILE_SIZE)
{
drawgfx(bitmap,&rect,gfx,
drawgfx_transpen(bitmap,&rect,gfx,
curr_code++,
attr,
0,0,
sx,sy,
transparency,15);
transparency ? 15 : -1);
/* wrap around */
if (curr_code%(X_SIZE/TILE_SIZE)==0) curr_code = code;
@ -770,13 +770,13 @@ static void f1gpstar_draw_road(running_machine *machine, bitmap_t *bitmap, const
/* Draw the line */
for (sx = xstart ; sx <= max_x ; sx += xdim)
{
drawgfxzoom(bitmap,&rect,gfx,
drawgfxzoom_transpen(bitmap,&rect,gfx,
code++,
attr >> 8,
0,0,
sx / 0x10000, sy,
transparency,15,
xscale, 1 << 16);
xscale, 1 << 16,
transparency ? 15 : -1);
/* stop when the end of the line of gfx is reached */
if ((code % (X_SIZE/TILE_SIZE)) == 0) break;
@ -1170,8 +1170,8 @@ VIDEO_UPDATE( bigrun )
for (i = 7; i >= 4; i--)
{ /* bitmap, road, min_priority, max_priority, transparency */
if (megasys1_active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,i,i,TRANSPARENCY_NONE);
if (megasys1_active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,i,i,TRANSPARENCY_PEN);
if (megasys1_active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,i,i,FALSE);
if (megasys1_active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,i,i,TRUE);
}
flag = 0;
@ -1180,8 +1180,8 @@ VIDEO_UPDATE( bigrun )
for (i = 3; i >= 0; i--)
{ /* bitmap, road, min_priority, max_priority, transparency */
if (megasys1_active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,i,i,TRANSPARENCY_PEN);
if (megasys1_active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,i,i,TRANSPARENCY_PEN);
if (megasys1_active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,i,i,TRUE);
if (megasys1_active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,i,i,TRUE);
}
if (megasys1_active_layers & 0x08) bigrun_draw_sprites(screen->machine,bitmap,cliprect,15,0);
@ -1222,8 +1222,8 @@ VIDEO_UPDATE( cischeat )
bitmap_fill(bitmap,cliprect,0);
/* bitmap, road, priority, transparency */
if (megasys1_active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,7,5,TRANSPARENCY_NONE);
if (megasys1_active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,7,5,TRANSPARENCY_PEN);
if (megasys1_active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,7,5,FALSE);
if (megasys1_active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,7,5,TRUE);
flag = 0;
cischeat_tmap_DRAW(0)
@ -1231,11 +1231,11 @@ VIDEO_UPDATE( cischeat )
cischeat_tmap_DRAW(1)
if (megasys1_active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,15,3);
if (megasys1_active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,4,1,TRANSPARENCY_PEN);
if (megasys1_active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,4,1,TRANSPARENCY_PEN);
if (megasys1_active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,4,1,TRUE);
if (megasys1_active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,4,1,TRUE);
if (megasys1_active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,2,2);
if (megasys1_active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,0,0,TRANSPARENCY_PEN);
if (megasys1_active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,0,0,TRANSPARENCY_PEN);
if (megasys1_active_layers & 0x10) cischeat_draw_road(screen->machine,bitmap,cliprect,0,0,0,TRUE);
if (megasys1_active_layers & 0x20) cischeat_draw_road(screen->machine,bitmap,cliprect,1,0,0,TRUE);
if (megasys1_active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,1,0);
cischeat_tmap_DRAW(2)
@ -1280,8 +1280,8 @@ VIDEO_UPDATE( f1gpstar )
/* 1: clouds 5, grad 7, road 0 2: clouds 5, grad 7, road 0, tunnel roof 0 */
/* road 1!! 0!! */ /* bitmap, road, min_priority, max_priority, transparency */
if (megasys1_active_layers & 0x20) f1gpstar_draw_road(screen->machine,bitmap,cliprect,1,6,7,TRANSPARENCY_PEN);
if (megasys1_active_layers & 0x10) f1gpstar_draw_road(screen->machine,bitmap,cliprect,0,6,7,TRANSPARENCY_PEN);
if (megasys1_active_layers & 0x20) f1gpstar_draw_road(screen->machine,bitmap,cliprect,1,6,7,TRUE);
if (megasys1_active_layers & 0x10) f1gpstar_draw_road(screen->machine,bitmap,cliprect,0,6,7,TRUE);
flag = 0;
cischeat_tmap_DRAW(0)
@ -1289,14 +1289,14 @@ VIDEO_UPDATE( f1gpstar )
cischeat_tmap_DRAW(1)
/* road 1!! 0!! */ /* bitmap, road, min_priority, max_priority, transparency */
if (megasys1_active_layers & 0x20) f1gpstar_draw_road(screen->machine,bitmap,cliprect,1,1,5,TRANSPARENCY_PEN);
if (megasys1_active_layers & 0x10) f1gpstar_draw_road(screen->machine,bitmap,cliprect,0,1,5,TRANSPARENCY_PEN);
if (megasys1_active_layers & 0x20) f1gpstar_draw_road(screen->machine,bitmap,cliprect,1,1,5,TRUE);
if (megasys1_active_layers & 0x10) f1gpstar_draw_road(screen->machine,bitmap,cliprect,0,1,5,TRUE);
if (megasys1_active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,15,2);
/* road 1!! 0!! */ /* bitmap, road, min_priority, max_priority, transparency */
if (megasys1_active_layers & 0x20) f1gpstar_draw_road(screen->machine,bitmap,cliprect,1,0,0,TRANSPARENCY_PEN);
if (megasys1_active_layers & 0x10) f1gpstar_draw_road(screen->machine,bitmap,cliprect,0,0,0,TRANSPARENCY_PEN);
if (megasys1_active_layers & 0x20) f1gpstar_draw_road(screen->machine,bitmap,cliprect,1,0,0,TRUE);
if (megasys1_active_layers & 0x10) f1gpstar_draw_road(screen->machine,bitmap,cliprect,0,0,0,TRUE);
if (megasys1_active_layers & 0x08) cischeat_draw_sprites(screen->machine,bitmap,cliprect,1,1);
cischeat_tmap_DRAW(2)

View File

@ -574,7 +574,7 @@ INLINE void dragngun_drawgfxzoom(
{ /* skip if inner loop doesn't draw anything */
int y;
/* case 1: TRANSPARENCY_PEN */
/* case 1: no alpha */
if (alpha == 0xff)
{
if (pri_buffer)

View File

@ -169,7 +169,7 @@ static void mlc_drawgfxzoom(
{ /* skip if inner loop doesn't draw anything */
int y;
/* case 1: TRANSPARENCY_PEN */
/* case 1: no alpha */
if (alpha == 0xff)
{
{

View File

@ -33,12 +33,12 @@ static void draw_sprites(running_machine* machine, bitmap_t *bitmap, const recta
if (!flash || (video_screen_get_frame_number(machine->primary_screen) & 1))
{
drawgfx(bitmap,cliprect,machine->gfx[bank],
drawgfx_transpen(bitmap,cliprect,machine->gfx[bank],
number,
colr,
0,0,
xpos,ypos,
(source[1] & 0x0008) ? TRANSPARENCY_NONE : TRANSPARENCY_PEN,0);
(source[1] & 0x0008) ? -1 : 0);
}
source+=8;

View File

@ -1298,7 +1298,7 @@ void K007121_sprites_draw(int chip,bitmap_t *bitmap,const rectangle *cliprect, g
{
const gfx_element *gfx = gfxs[chip];
int flipscreen = K007121_flipscreen[chip];
int i,num,inc,offs[5],trans;
int i,num,inc,offs[5];
int is_flakatck = (ctable == NULL);
#if 0
@ -1329,9 +1329,6 @@ if (input_code_pressed(KEYCODE_D))
offs[2] = 0x06;
offs[3] = 0x04;
offs[4] = 0x08;
/* Flak Attack doesn't use a lookup PROM, it maps the color code directly */
/* to a palette entry */
trans = TRANSPARENCY_PEN;
}
else /* all others */
{
@ -1344,7 +1341,6 @@ if (input_code_pressed(KEYCODE_D))
offs[2] = 0x02;
offs[3] = 0x03;
offs[4] = 0x04;
trans = TRANSPARENCY_PENS;
/* when using priority buffer, draw front to back */
if (pri_mask != -1)
{
@ -1364,7 +1360,7 @@ if (input_code_pressed(KEYCODE_D))
int yflip = source[offs[4]] & 0x20; /* flip y */
int color = base_color + ((source[offs[1]] & 0xf0) >> 4);
int width,height;
int transparent_color;
int transparent_mask;
static const int x_offset[4] = {0x0,0x1,0x4,0x5};
static const int y_offset[4] = {0x0,0x2,0x8,0xa};
int x,y, ex, ey, flipx, flipy, destx, desty;
@ -1376,10 +1372,12 @@ if (input_code_pressed(KEYCODE_D))
number = number << 2;
number += (sprite_bank >> 2) & 3;
if (trans == TRANSPARENCY_PEN)
transparent_color = 0;
/* Flak Attack doesn't use a lookup PROM, it maps the color code directly */
/* to a palette entry */
if (is_flakatck)
transparent_mask = 1 << 0;
else
transparent_color = colortable_get_transpen_mask(ctable, gfx, color, 0);
transparent_mask = colortable_get_transpen_mask(ctable, gfx, color, 0);
if (!is_flakatck || source[0x00]) /* Flak Attack needs this */
{
@ -1413,27 +1411,27 @@ if (input_code_pressed(KEYCODE_D))
}
else
{
flipx = !xflip;
flipy = !yflip;
flipx = xflip;
flipy = yflip;
destx = global_x_offset+sx+x*8;
desty = sy+y*8;
}
if (pri_mask != -1)
pdrawgfx(bitmap,cliprect,gfx,
pdrawgfx_transmask(bitmap,cliprect,gfx,
number + x_offset[ex] + y_offset[ey],
color,
flipx,flipy,
destx,desty,
trans,transparent_color,
pri_mask);
priority_bitmap,pri_mask,
transparent_mask);
else
drawgfx(bitmap,cliprect,gfx,
drawgfx_transmask(bitmap,cliprect,gfx,
number + x_offset[ex] + y_offset[ey],
color,
flipx,flipy,
destx,desty,
trans,transparent_color);
transparent_mask);
}
}
}

View File

@ -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
// there are surely also shadows (see gametngk) but how they're enabled we don't know
if (flipscreen)
{

View File

@ -521,7 +521,7 @@ static void psikyosh_drawgfxzoom(
{ /* skip if inner loop doesn't draw anything */
int y;
/* case 1: TRANSPARENCY_PEN */
/* case 1: no alpha */
if (alpha == 0xff)
{
if( z > 0 )
@ -792,7 +792,7 @@ static void psikyosh_drawgfxzoom(
{ /* skip if inner loop doesn't draw anything */
int y;
/* case 1: TRANSPARENCY_PEN */
/* case 1: no alpha */
/* Note: adjusted to >>10 and draws from zoom_bitmap not gfx */
if (alpha == 0xff)
{

View File

@ -220,8 +220,6 @@ static void dynamski_draw_background(running_machine *machine, bitmap_t *bitmap,
int attr;
int temp;
int transparency = pri?TRANSPARENCY_PEN:TRANSPARENCY_NONE;
for( i=0; i<0x400; i++ )
{
sx = (i%32)*8;
@ -253,7 +251,7 @@ static void dynamski_draw_background(running_machine *machine, bitmap_t *bitmap,
if( pri==0 || (attr>>7)==pri )
{
tile += ((attr>>5)&0x3)*256;
drawgfx(
drawgfx_transpen(
bitmap,
cliprect,
machine->gfx[0],
@ -261,7 +259,7 @@ static void dynamski_draw_background(running_machine *machine, bitmap_t *bitmap,
attr & 0x0f,
0,0,//xflip,yflip,
sx,sy,
transparency,3 );
pri?3:-1 );
}
}
}

View File

@ -133,10 +133,10 @@ static bitmap_t *stv_vdp2_roz_bitmap[2];
enum
{
STV_TRANSPARENCY_NONE = TRANSPARENCY_NONE,
STV_TRANSPARENCY_PEN = TRANSPARENCY_PEN,
STV_TRANSPARENCY_ADD_BLEND = TRANSPARENCY_MODES,
STV_TRANSPARENCY_ALPHA = TRANSPARENCY_MODES + 1
STV_TRANSPARENCY_NONE,
STV_TRANSPARENCY_PEN,
STV_TRANSPARENCY_ADD_BLEND,
STV_TRANSPARENCY_ALPHA
};
#if DEBUG_MODE
@ -2402,25 +2402,18 @@ static void stv_vdp2_drawgfxzoom(
if (!scalex || !scaley) return;
if (gfx->pen_usage && (transparency == TRANSPARENCY_PEN || transparency == TRANSPARENCY_PENS))
if (gfx->pen_usage && transparency == STV_TRANSPARENCY_PEN)
{
int transmask = 0;
if (transparency == TRANSPARENCY_PEN)
{
transmask = 1 << (transparent_color & 0xff);
}
else /* transparency == TRANSPARENCY_PENS */
{
transmask = transparent_color;
}
transmask = 1 << (transparent_color & 0xff);
if ((gfx->pen_usage[code] & ~transmask) == 0)
/* character is totally transparent, no need to draw */
return;
else if ((gfx->pen_usage[code] & transmask) == 0)
/* character is totally opaque, can disable transparency */
transparency = TRANSPARENCY_NONE;
transparency = STV_TRANSPARENCY_NONE;
}
/*
@ -2520,8 +2513,8 @@ static void stv_vdp2_drawgfxzoom(
{ /* skip if inner loop doesn't draw anything */
int y;
/* case 0: TRANSPARENCY_NONE */
if (transparency == TRANSPARENCY_NONE)
/* case 0: STV_TRANSPARENCY_NONE */
if (transparency == STV_TRANSPARENCY_NONE)
{
if (gfx->flags & GFX_ELEMENT_PACKED)
{
@ -2559,8 +2552,8 @@ static void stv_vdp2_drawgfxzoom(
}
}
/* case 1: TRANSPARENCY_PEN */
if (transparency == TRANSPARENCY_PEN)
/* case 1: STV_TRANSPARENCY_PEN */
if (transparency == STV_TRANSPARENCY_PEN)
{
if (gfx->flags & GFX_ELEMENT_PACKED)
{
@ -2825,7 +2818,7 @@ static void stv_vdp2_drawgfx_rgb555( bitmap_t *dest_bmp, const rectangle *clip,
int r,g,b;
data = (source[(x_index>>16)*2] << 8) | source[(x_index>>16)*2+1];
t_pen = (data & 0x8000) || ( transparency == TRANSPARENCY_NONE );
t_pen = (data & 0x8000) || ( transparency == STV_TRANSPARENCY_NONE );
if (t_pen)
{
b = (data & 0x7c00) >> 10;
@ -2929,7 +2922,7 @@ static void stv_vdp2_draw_basic_bitmap(running_machine *machine, bitmap_t *bitma
if(tw == 0)
{
t_pen = (((gfxdata[0] & 0x0f) >> 0) != 0) ? (1) : (0);
if(stv2_current_tilemap.transparency == TRANSPARENCY_NONE) t_pen = 1;
if(stv2_current_tilemap.transparency == STV_TRANSPARENCY_NONE) t_pen = 1;
if(t_pen)
{
if ( stv2_current_tilemap.colour_calculation_enabled == 0 )
@ -2942,7 +2935,7 @@ static void stv_vdp2_draw_basic_bitmap(running_machine *machine, bitmap_t *bitma
if(tw == 0)
{
t_pen = (((gfxdata[0] & 0xf0) >> 4) != 0) ? (1) : (0);
if(stv2_current_tilemap.transparency == TRANSPARENCY_NONE) t_pen = 1;
if(stv2_current_tilemap.transparency == STV_TRANSPARENCY_NONE) t_pen = 1;
if(t_pen)
{
if ( stv2_current_tilemap.colour_calculation_enabled == 0 )
@ -2974,7 +2967,7 @@ static void stv_vdp2_draw_basic_bitmap(running_machine *machine, bitmap_t *bitma
{
//60aee2c = $0013 at @605d838
t_pen = ((gfxdata[xs] & 0xff) != 0) ? (1) : (0);
if(stv2_current_tilemap.transparency == TRANSPARENCY_NONE) t_pen = 1;
if(stv2_current_tilemap.transparency == STV_TRANSPARENCY_NONE) t_pen = 1;
if(t_pen)
{
if ( stv2_current_tilemap.colour_calculation_enabled == 0 )
@ -3017,7 +3010,7 @@ static void stv_vdp2_draw_basic_bitmap(running_machine *machine, bitmap_t *bitma
if(tw == 0)
{
t_pen = ((gfxdata[xs] & 0xff) != 0) ? 1 : 0;
if(stv2_current_tilemap.transparency == TRANSPARENCY_NONE) t_pen = 1;
if(stv2_current_tilemap.transparency == STV_TRANSPARENCY_NONE) t_pen = 1;
if(t_pen)
{
if ( stv2_current_tilemap.colour_calculation_enabled == 0 )
@ -3042,7 +3035,7 @@ static void stv_vdp2_draw_basic_bitmap(running_machine *machine, bitmap_t *bitma
if(tw == 0)
{
t_pen = ((((gfxdata[0] & 0x07) * 0x100) | (gfxdata[1] & 0xff)) != 0) ? (1) : (0);
if(stv2_current_tilemap.transparency == TRANSPARENCY_NONE) t_pen = 1;
if(stv2_current_tilemap.transparency == STV_TRANSPARENCY_NONE) t_pen = 1;
if(t_pen)
{
if ( stv2_current_tilemap.colour_calculation_enabled == 0 )
@ -3079,7 +3072,7 @@ static void stv_vdp2_draw_basic_bitmap(running_machine *machine, bitmap_t *bitma
int r,g,b;
int xs = xcnt & xsizemask;
t_pen = ((gfxdata[2*xs] & 0x80) >> 7) || (stv2_current_tilemap.transparency == TRANSPARENCY_NONE);
t_pen = ((gfxdata[2*xs] & 0x80) >> 7) || (stv2_current_tilemap.transparency == STV_TRANSPARENCY_NONE);
if (!t_pen) continue;
b = ((gfxdata[2*xs] & 0x7c) >> 2);
g = ((gfxdata[2*xs] & 0x03) << 3) | ((gfxdata[2*xs+1] & 0xe0) >> 5);
@ -3120,7 +3113,7 @@ static void stv_vdp2_draw_basic_bitmap(running_machine *machine, bitmap_t *bitma
xs = xx >> 16;
t_pen = ((gfxdata[2*xs] & 0x80) >> 7);
if(stv2_current_tilemap.transparency == TRANSPARENCY_NONE) t_pen = 1;
if(stv2_current_tilemap.transparency == STV_TRANSPARENCY_NONE) t_pen = 1;
b = ((gfxdata[2*xs] & 0x7c) >> 2);
g = ((gfxdata[2*xs] & 0x03) << 3) | ((gfxdata[2*xs+1] & 0xe0) >> 5);
r = ((gfxdata[2*xs+1] & 0x1f));
@ -3164,7 +3157,7 @@ static void stv_vdp2_draw_basic_bitmap(running_machine *machine, bitmap_t *bitma
int r,g,b;
t_pen = ((gfxdata[0] & 0x80) >> 7);
if(stv2_current_tilemap.transparency == TRANSPARENCY_NONE) t_pen = 1;
if(stv2_current_tilemap.transparency == STV_TRANSPARENCY_NONE) t_pen = 1;
/*TODO: 8bpp*/
b = (gfxdata[1] & 0xf8) >> 3;
@ -3562,7 +3555,7 @@ static void stv_vdp2_draw_basic_tilemap(running_machine *machine, bitmap_t *bitm
}
/* other bits */
//stv2_current_tilemap.trans_enabled = stv2_current_tilemap.trans_enabled ? TRANSPARENCY_NONE : TRANSPARENCY_PEN;
//stv2_current_tilemap.trans_enabled = stv2_current_tilemap.trans_enabled ? STV_TRANSPARENCY_NONE : STV_TRANSPARENCY_PEN;
stv2_current_tilemap.scrollx &= mppixels_x-1;
stv2_current_tilemap.scrolly &= mppixels_y-1;
@ -3750,10 +3743,10 @@ static void stv_vdp2_draw_basic_tilemap(running_machine *machine, bitmap_t *bitm
else
{
/* normal */
drawgfx(bitmap,cliprect,machine->gfx[gfx],tilecode+(0+(flipyx&1)+(flipyx&2))*tilecodespacing,pal,flipyx&1,flipyx&2,drawxpos, drawypos,stv2_current_tilemap.transparency,0);
drawgfx(bitmap,cliprect,machine->gfx[gfx],tilecode+(1-(flipyx&1)+(flipyx&2))*tilecodespacing,pal,flipyx&1,flipyx&2,drawxpos+8,drawypos,stv2_current_tilemap.transparency,0);
drawgfx(bitmap,cliprect,machine->gfx[gfx],tilecode+(2+(flipyx&1)-(flipyx&2))*tilecodespacing,pal,flipyx&1,flipyx&2,drawxpos,drawypos+8,stv2_current_tilemap.transparency,0);
drawgfx(bitmap,cliprect,machine->gfx[gfx],tilecode+(3-(flipyx&1)-(flipyx&2))*tilecodespacing,pal,flipyx&1,flipyx&2,drawxpos+8,drawypos+8,stv2_current_tilemap.transparency,0);
drawgfx_transpen(bitmap,cliprect,machine->gfx[gfx],tilecode+(0+(flipyx&1)+(flipyx&2))*tilecodespacing,pal,flipyx&1,flipyx&2,drawxpos, drawypos,(stv2_current_tilemap.transparency==STV_TRANSPARENCY_PEN)?0:-1);
drawgfx_transpen(bitmap,cliprect,machine->gfx[gfx],tilecode+(1-(flipyx&1)+(flipyx&2))*tilecodespacing,pal,flipyx&1,flipyx&2,drawxpos+8,drawypos,(stv2_current_tilemap.transparency==STV_TRANSPARENCY_PEN)?0:-1);
drawgfx_transpen(bitmap,cliprect,machine->gfx[gfx],tilecode+(2+(flipyx&1)-(flipyx&2))*tilecodespacing,pal,flipyx&1,flipyx&2,drawxpos,drawypos+8,(stv2_current_tilemap.transparency==STV_TRANSPARENCY_PEN)?0:-1);
drawgfx_transpen(bitmap,cliprect,machine->gfx[gfx],tilecode+(3-(flipyx&1)-(flipyx&2))*tilecodespacing,pal,flipyx&1,flipyx&2,drawxpos+8,drawypos+8,(stv2_current_tilemap.transparency==STV_TRANSPARENCY_PEN)?0:-1);
}
}
@ -3768,7 +3761,7 @@ static void stv_vdp2_draw_basic_tilemap(running_machine *machine, bitmap_t *bitm
if (stv2_current_tilemap.transparency == STV_TRANSPARENCY_ALPHA)
drawgfx_alpha(bitmap,cliprect,machine->gfx[gfx],tilecode,pal,flipyx&1,flipyx&2, drawxpos, drawypos,0,stv2_current_tilemap.alpha);
else
drawgfx(bitmap,cliprect,machine->gfx[gfx],tilecode,pal,flipyx&1,flipyx&2, drawxpos, drawypos,stv2_current_tilemap.transparency,0);
drawgfx_transpen(bitmap,cliprect,machine->gfx[gfx],tilecode,pal,flipyx&1,flipyx&2, drawxpos, drawypos,(stv2_current_tilemap.transparency==STV_TRANSPARENCY_PEN)?0:-1);
}
}
drawxpos = olddrawxpos;
@ -4265,10 +4258,10 @@ static void stv_vdp2_copy_roz_bitmap(bitmap_t *bitmap,
stv_vdp2_compute_color_offset_RGB555_UINT16(&pix,stv2_current_tilemap.fade_control & 2);
switch( stv2_current_tilemap.transparency )
{
case TRANSPARENCY_PEN:
case STV_TRANSPARENCY_PEN:
if ( pix != 0x0000 ) line[hcnt] = pix;
break;
case TRANSPARENCY_NONE:
case STV_TRANSPARENCY_NONE:
line[hcnt] = pix;
break;
case STV_TRANSPARENCY_ALPHA:
@ -4357,10 +4350,10 @@ static void stv_vdp2_copy_roz_bitmap(bitmap_t *bitmap,
stv_vdp2_compute_color_offset_RGB555_UINT16(&pix,stv2_current_tilemap.fade_control & 2);
switch( stv2_current_tilemap.transparency )
{
case TRANSPARENCY_PEN:
case STV_TRANSPARENCY_PEN:
if ( pix != 0x0000 ) line[hcnt] = pix;
break;
case TRANSPARENCY_NONE:
case STV_TRANSPARENCY_NONE:
line[hcnt] = pix;
break;
case STV_TRANSPARENCY_ALPHA:
@ -4407,11 +4400,11 @@ static void stv_vdp2_draw_NBG0(running_machine *machine, bitmap_t *bitmap, const
}
if ( STV_VDP2_N0TPON == 0 )
{
stv2_current_tilemap.transparency = TRANSPARENCY_PEN;
stv2_current_tilemap.transparency = STV_TRANSPARENCY_PEN;
}
else
{
stv2_current_tilemap.transparency = TRANSPARENCY_NONE;
stv2_current_tilemap.transparency = STV_TRANSPARENCY_NONE;
}
stv2_current_tilemap.colour_depth = STV_VDP2_N0CHCN;
stv2_current_tilemap.tile_size = STV_VDP2_N0CHSZ;
@ -4497,11 +4490,11 @@ static void stv_vdp2_draw_NBG1(running_machine *machine, bitmap_t *bitmap, const
}
if ( STV_VDP2_N1TPON == 0 )
{
stv2_current_tilemap.transparency = TRANSPARENCY_PEN;
stv2_current_tilemap.transparency = STV_TRANSPARENCY_PEN;
}
else
{
stv2_current_tilemap.transparency = TRANSPARENCY_NONE;
stv2_current_tilemap.transparency = STV_TRANSPARENCY_NONE;
}
stv2_current_tilemap.colour_depth = STV_VDP2_N1CHCN;
stv2_current_tilemap.tile_size = STV_VDP2_N1CHSZ;
@ -4594,11 +4587,11 @@ static void stv_vdp2_draw_NBG2(running_machine *machine, bitmap_t *bitmap, const
}
if ( STV_VDP2_N2TPON == 0 )
{
stv2_current_tilemap.transparency = TRANSPARENCY_PEN;
stv2_current_tilemap.transparency = STV_TRANSPARENCY_PEN;
}
else
{
stv2_current_tilemap.transparency = TRANSPARENCY_NONE;
stv2_current_tilemap.transparency = STV_TRANSPARENCY_NONE;
}
stv2_current_tilemap.colour_depth = STV_VDP2_N2CHCN;
stv2_current_tilemap.tile_size = STV_VDP2_N2CHSZ;
@ -4694,11 +4687,11 @@ static void stv_vdp2_draw_NBG3(running_machine *machine, bitmap_t *bitmap, const
}
if ( STV_VDP2_N3TPON == 0 )
{
stv2_current_tilemap.transparency = TRANSPARENCY_PEN;
stv2_current_tilemap.transparency = STV_TRANSPARENCY_PEN;
}
else
{
stv2_current_tilemap.transparency = TRANSPARENCY_NONE;
stv2_current_tilemap.transparency = STV_TRANSPARENCY_NONE;
}
stv2_current_tilemap.colour_depth = STV_VDP2_N3CHCN;
stv2_current_tilemap.tile_size = STV_VDP2_N3CHSZ;
@ -4972,11 +4965,11 @@ static void stv_vdp2_draw_RBG0(running_machine *machine, bitmap_t *bitmap, const
}
if ( STV_VDP2_R0TPON == 0 )
{
stv2_current_tilemap.transparency = TRANSPARENCY_PEN;
stv2_current_tilemap.transparency = STV_TRANSPARENCY_PEN;
}
else
{
stv2_current_tilemap.transparency = TRANSPARENCY_NONE;
stv2_current_tilemap.transparency = STV_TRANSPARENCY_NONE;
}
stv2_current_tilemap.colour_depth = STV_VDP2_R0CHCN;
stv2_current_tilemap.tile_size = STV_VDP2_R0CHSZ;

View File

@ -375,8 +375,6 @@ INLINE void roundupt_drawgfxzoomrotate(
{ /* skip if inner loop doesn't draw anything */
int y;
#if 0
/* case 1: TRANSPARENCY_PEN */
if (transparency == TRANSPARENCY_PEN)
{
{
int startx=0;
@ -429,7 +427,6 @@ INLINE void roundupt_drawgfxzoomrotate(
}
#endif
#if 1 // old
//if (transparency == TRANSPARENCY_PEN)
{
{
for( y=sy; y<ey; y++ )
@ -466,7 +463,7 @@ INLINE void roundupt_drawgfxzoomrotate(
static void mycopyrozbitmap_core(bitmap_t *bitmap,bitmap_t *srcbitmap,
int dstx,int dsty, int srcwidth, int srcheight,int incxx,int incxy,int incyx,int incyy,
const rectangle *clip,int transparency,int transparent_color)
const rectangle *clip,int transparent_color)
{
UINT32 cx;
UINT32 cy;
@ -693,8 +690,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
extent_x=extent_x>>16;
extent_y=extent_y>>16;
if (extent_x>2 && extent_y>2)
mycopyrozbitmap_core(bitmap, temp_bitmap, x/* + (extent_x/2)*/, y /*+ (extent_y/2)*/, extent_x, extent_y, incxx, incxy, incyx, incyy, cliprect,
TRANSPARENCY_PEN, 0);
mycopyrozbitmap_core(bitmap, temp_bitmap, x/* + (extent_x/2)*/, y /*+ (extent_y/2)*/, extent_x, extent_y, incxx, incxy, incyx, incyy, cliprect, 0);
}
}
}

View File

@ -47,7 +47,7 @@ PALETTE_INIT( arknoid2 )
static void draw_background(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *m)
{
int x,y,column,tot,trans;
int x,y,column,tot,transpen;
int scrollx, scrolly;
UINT32 upperbits;
int ctrl2 = tnzs_objctrl[1];
@ -59,9 +59,9 @@ static void draw_background(running_machine *machine, bitmap_t *bitmap, const re
}
if(tnzs_bg_flag[0] & 0x80)
trans = TRANSPARENCY_NONE;
transpen = -1;
else
trans = TRANSPARENCY_PEN;
transpen = 0;
/* The byte at f200 is the y-scroll value for the first column.
@ -107,20 +107,20 @@ static void draw_background(running_machine *machine, bitmap_t *bitmap, const re
flipy = !flipy;
}
drawgfx(bitmap,cliprect,machine->gfx[0],
drawgfx_transpen(bitmap,cliprect,machine->gfx[0],
code,
color,
flipx,flipy,
sx + scrollx,(sy + scrolly) & 0xff,
trans,0);
transpen);
/* wrap around x */
drawgfx(bitmap,cliprect,machine->gfx[0],
drawgfx_transpen(bitmap,cliprect,machine->gfx[0],
code,
color,
flipx,flipy,
sx + 512 + scrollx,(sy + scrolly) & 0xff,
trans,0);
transpen);
}
}

View File

@ -214,12 +214,12 @@ static void draw_foreground(running_machine *machine, bitmap_t *bitmap, const re
if (sy >= 48)
sx = (sx + scroll) & 0x1ff;
drawgfx(bitmap,cliprect,machine->gfx[0],
drawgfx_transpen(bitmap,cliprect,machine->gfx[0],
tile_number,
color,
0,0,
sx,sy,
(opaque || color >= 4) ? TRANSPARENCY_NONE : TRANSPARENCY_PEN,0);
(opaque || color >= 4) ? -1 : 0);
}
}
}