machine->pens lookup removal

This commit is contained in:
Zsolt Vasvari 2008-02-22 01:51:36 +00:00
parent 8c409c07df
commit bc69380af9
24 changed files with 185 additions and 216 deletions

View File

@ -1525,7 +1525,7 @@ VIDEO_UPDATE( cave )
cave_sprite_check(machine, cliprect); cave_sprite_check(machine, cliprect);
fillbitmap(bitmap,machine->pens[background_color],cliprect); fillbitmap(bitmap,background_color,cliprect);
/* /*
Tiles and sprites are ordered by priority (0 back, 3 front) with Tiles and sprites are ordered by priority (0 back, 3 front) with

View File

@ -176,7 +176,7 @@ VIDEO_UPDATE( cbasebal )
if (bg_on) if (bg_on)
tilemap_draw(bitmap,cliprect,bg_tilemap,0,0); tilemap_draw(bitmap,cliprect,bg_tilemap,0,0);
else else
fillbitmap(bitmap,machine->pens[768],cliprect); fillbitmap(bitmap,768,cliprect);
if (obj_on) if (obj_on)
draw_sprites(machine, bitmap,cliprect); draw_sprites(machine, bitmap,cliprect);

View File

@ -125,7 +125,7 @@ static void draw_obj0(mame_bitmap *bitmap, int sy)
Obj 1 - Text Layer Obj 1 - Text Layer
***************************************************************************/ ***************************************************************************/
static void draw_obj1(running_machine *machine, mame_bitmap *bitmap) static void draw_obj1(mame_bitmap *bitmap)
{ {
int sx, sy; int sx, sy;
@ -178,7 +178,7 @@ static void draw_obj1(running_machine *machine, mame_bitmap *bitmap)
col = c0 | (c1 << 1) | ((attrib & 0xc0) >> 4); col = c0 | (c1 << 1) | ((attrib & 0xc0) >> 4);
if((col & 0x07) != 0x07) if((col & 0x07) != 0x07)
*BITMAP_ADDR16(bitmap, sy, sx) = machine->pens[col | 0x20]; *BITMAP_ADDR16(bitmap, sy, sx) = col | 0x20;
} }
} }
} }
@ -687,21 +687,21 @@ static TIMER_CALLBACK( changela_scanline_callback )
{ {
int riv_col, prev_col; int riv_col, prev_col;
if((*BITMAP_ADDR16(river_bitmap, sy, sx) == machine->pens[0x08]) if((*BITMAP_ADDR16(river_bitmap, sy, sx) == 0x08)
|| (*BITMAP_ADDR16(river_bitmap, sy, sx) == machine->pens[0x09]) || (*BITMAP_ADDR16(river_bitmap, sy, sx) == 0x09)
|| (*BITMAP_ADDR16(river_bitmap, sy, sx) == machine->pens[0x0a])) || (*BITMAP_ADDR16(river_bitmap, sy, sx) == 0x0a))
riv_col = 1; riv_col = 1;
else else
riv_col = 0; riv_col = 0;
if((*BITMAP_ADDR16(river_bitmap, sy, sx-1) == machine->pens[0x08]) if((*BITMAP_ADDR16(river_bitmap, sy, sx-1) == 0x08)
|| (*BITMAP_ADDR16(river_bitmap, sy, sx-1) == machine->pens[0x09]) || (*BITMAP_ADDR16(river_bitmap, sy, sx-1) == 0x09)
|| (*BITMAP_ADDR16(river_bitmap, sy, sx-1) == machine->pens[0x0a])) || (*BITMAP_ADDR16(river_bitmap, sy, sx-1) == 0x0a))
prev_col = 1; prev_col = 1;
else else
prev_col = 0; prev_col = 0;
if(*BITMAP_ADDR16(obj0_bitmap, sy, sx) == machine->pens[0x14]) /* Car Outline Color */ if(*BITMAP_ADDR16(obj0_bitmap, sy, sx) == 0x14) /* Car Outline Color */
{ {
/* Tree 0 Collision */ /* Tree 0 Collision */
if(*BITMAP_ADDR16(tree0_bitmap, sy, sx) != 0) if(*BITMAP_ADDR16(tree0_bitmap, sy, sx) != 0)
@ -747,7 +747,7 @@ VIDEO_UPDATE( changela )
copybitmap_trans(bitmap, obj0_bitmap, 0, 0, 0, 0, cliprect, 0); copybitmap_trans(bitmap, obj0_bitmap, 0, 0, 0, 0, cliprect, 0);
copybitmap_trans(bitmap, tree0_bitmap, 0, 0, 0, 0, cliprect, 0); copybitmap_trans(bitmap, tree0_bitmap, 0, 0, 0, 0, cliprect, 0);
copybitmap_trans(bitmap, tree1_bitmap, 0, 0, 0, 0, cliprect, 0); copybitmap_trans(bitmap, tree1_bitmap, 0, 0, 0, 0, cliprect, 0);
draw_obj1(machine, bitmap); draw_obj1(bitmap);
return 0; return 0;
} }

View File

@ -86,7 +86,7 @@ VIDEO_UPDATE( cheekyms )
int offs; int offs;
fillbitmap(bitmap,machine->pens[0],cliprect); fillbitmap(bitmap,0,cliprect);
/* Draw the sprites first, because they're supposed to appear below /* Draw the sprites first, because they're supposed to appear below
the characters */ the characters */
@ -106,9 +106,7 @@ VIDEO_UPDATE( cheekyms )
if (v1 & 0x80) if (v1 & 0x80)
{ {
if (!flip_screen) if (!flip_screen)
{
code++; code++;
}
drawgfx(bitmap,machine->gfx[1], drawgfx(bitmap,machine->gfx[1],
code, code,

View File

@ -76,7 +76,7 @@ VIDEO_START( chqflag )
VIDEO_UPDATE( chqflag ) VIDEO_UPDATE( chqflag )
{ {
fillbitmap(bitmap,machine->pens[0],cliprect); fillbitmap(bitmap,0,cliprect);
K051316_zoom_draw_1(bitmap,cliprect,TILEMAP_DRAW_LAYER1,0); K051316_zoom_draw_1(bitmap,cliprect,TILEMAP_DRAW_LAYER1,0);
K051960_sprites_draw(bitmap,cliprect,0,0); K051960_sprites_draw(bitmap,cliprect,0,0);

View File

@ -51,7 +51,7 @@ VIDEO_START( circus )
8, 8, 32, 32); 8, 8, 32, 32);
} }
static void draw_line(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int x1, int y1, int x2, int y2, int dotted) static void draw_line(mame_bitmap *bitmap, const rectangle *cliprect, int x1, int y1, int x2, int y2, int dotted)
{ {
/* Draws horizontal and Vertical lines only! */ /* Draws horizontal and Vertical lines only! */
@ -66,30 +66,30 @@ static void draw_line(running_machine *machine, mame_bitmap *bitmap, const recta
if (x1 == x2) if (x1 == x2)
for (count = y2; count >= y1; count -= skip) for (count = y2; count >= y1; count -= skip)
*BITMAP_ADDR16(bitmap, count, x1) = machine->pens[1]; *BITMAP_ADDR16(bitmap, count, x1) = 1;
else else
for (count = x2; count >= x1; count -= skip) for (count = x2; count >= x1; count -= skip)
*BITMAP_ADDR16(bitmap, y1, count) = machine->pens[1]; *BITMAP_ADDR16(bitmap, y1, count) = 1;
} }
static void draw_robot_box (running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int x, int y) static void draw_robot_box(mame_bitmap *bitmap, const rectangle *cliprect, int x, int y)
{ {
/* Box */ /* Box */
int ex = x + 24; int ex = x + 24;
int ey = y + 26; int ey = y + 26;
draw_line(machine,bitmap,cliprect,x,y,ex,y,0); /* Top */ draw_line(bitmap,cliprect,x,y,ex,y,0); /* Top */
draw_line(machine,bitmap,cliprect,x,ey,ex,ey,0); /* Bottom */ draw_line(bitmap,cliprect,x,ey,ex,ey,0); /* Bottom */
draw_line(machine,bitmap,cliprect,x,y,x,ey,0); /* Left */ draw_line(bitmap,cliprect,x,y,x,ey,0); /* Left */
draw_line(machine,bitmap,cliprect,ex,y,ex,ey,0); /* Right */ draw_line(bitmap,cliprect,ex,y,ex,ey,0); /* Right */
/* Score Grid */ /* Score Grid */
ey = y + 10; ey = y + 10;
draw_line(machine,bitmap,cliprect,x+8,ey,ex,ey,0); /* Horizontal Divide Line */ draw_line(bitmap,cliprect,x+8,ey,ex,ey,0); /* Horizontal Divide Line */
draw_line(machine,bitmap,cliprect,x+8,y,x+8,ey,0); draw_line(bitmap,cliprect,x+8,y,x+8,ey,0);
draw_line(machine,bitmap,cliprect,x+16,y,x+16,ey,0); draw_line(bitmap,cliprect,x+16,y,x+16,ey,0);
} }
static void circus_draw_fg(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) static void circus_draw_fg(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
@ -97,15 +97,15 @@ static void circus_draw_fg(running_machine *machine, mame_bitmap *bitmap, const
/* The sync generator hardware is used to */ /* The sync generator hardware is used to */
/* draw the border and diving boards */ /* draw the border and diving boards */
draw_line (machine,bitmap,cliprect,0,18,255,18,0); draw_line (bitmap,cliprect,0,18,255,18,0);
draw_line (machine,bitmap,cliprect,0,249,255,249,1); draw_line (bitmap,cliprect,0,249,255,249,1);
draw_line (machine,bitmap,cliprect,0,18,0,248,0); draw_line (bitmap,cliprect,0,18,0,248,0);
draw_line (machine,bitmap,cliprect,247,18,247,248,0); draw_line (bitmap,cliprect,247,18,247,248,0);
draw_line (machine,bitmap,cliprect,0,137,17,137,0); draw_line (bitmap,cliprect,0,137,17,137,0);
draw_line (machine,bitmap,cliprect,231,137,248,137,0); draw_line (bitmap,cliprect,231,137,248,137,0);
draw_line (machine,bitmap,cliprect,0,193,17,193,0); draw_line (bitmap,cliprect,0,193,17,193,0);
draw_line (machine,bitmap,cliprect,231,193,248,193,0); draw_line (bitmap,cliprect,231,193,248,193,0);
drawgfx(bitmap,machine->gfx[1], drawgfx(bitmap,machine->gfx[1],
clown_z, clown_z,
@ -122,7 +122,7 @@ VIDEO_UPDATE( circus )
return 0; return 0;
} }
static void robotbwl_draw_scoreboard(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) static void robotbwl_draw_scoreboard(mame_bitmap *bitmap, const rectangle *cliprect)
{ {
int offs; int offs;
@ -131,28 +131,28 @@ static void robotbwl_draw_scoreboard(running_machine *machine, mame_bitmap *bitm
for(offs=15;offs<=63;offs+=24) for(offs=15;offs<=63;offs+=24)
{ {
draw_robot_box(machine, bitmap, cliprect, offs, 31); draw_robot_box(bitmap, cliprect, offs, 31);
draw_robot_box(machine, bitmap, cliprect, offs, 63); draw_robot_box(bitmap, cliprect, offs, 63);
draw_robot_box(machine, bitmap, cliprect, offs, 95); draw_robot_box(bitmap, cliprect, offs, 95);
draw_robot_box(machine, bitmap, cliprect, offs+152, 31); draw_robot_box(bitmap, cliprect, offs+152, 31);
draw_robot_box(machine, bitmap, cliprect, offs+152, 63); draw_robot_box(bitmap, cliprect, offs+152, 63);
draw_robot_box(machine, bitmap, cliprect, offs+152, 95); draw_robot_box(bitmap, cliprect, offs+152, 95);
} }
draw_robot_box(machine, bitmap, cliprect, 39, 127); /* 10th Frame */ draw_robot_box(bitmap, cliprect, 39, 127); /* 10th Frame */
draw_line(machine,bitmap, cliprect, 39,137,47,137,0); /* Extra digit box */ draw_line(bitmap, cliprect, 39,137,47,137,0); /* Extra digit box */
draw_robot_box(machine, bitmap, cliprect, 39+152, 127); draw_robot_box(bitmap, cliprect, 39+152, 127);
draw_line(machine,bitmap, cliprect, 39+152,137,47+152,137,0); draw_line(bitmap, cliprect, 39+152,137,47+152,137,0);
} }
static void robotbwl_draw_bowling_alley(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) static void robotbwl_draw_bowling_alley(mame_bitmap *bitmap, const rectangle *cliprect)
{ {
draw_line(machine,bitmap, cliprect, 103,17,103,205,0); draw_line(bitmap, cliprect, 103,17,103,205,0);
draw_line(machine,bitmap, cliprect, 111,17,111,203,1); draw_line(bitmap, cliprect, 111,17,111,203,1);
draw_line(machine,bitmap, cliprect, 152,17,152,205,0); draw_line(bitmap, cliprect, 152,17,152,205,0);
draw_line(machine,bitmap, cliprect, 144,17,144,203,1); draw_line(bitmap, cliprect, 144,17,144,203,1);
} }
static void robotbwl_draw_ball(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) static void robotbwl_draw_ball(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
@ -168,8 +168,8 @@ static void robotbwl_draw_ball(running_machine *machine, mame_bitmap *bitmap, co
VIDEO_UPDATE( robotbwl ) VIDEO_UPDATE( robotbwl )
{ {
tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
robotbwl_draw_scoreboard(machine, bitmap, cliprect); robotbwl_draw_scoreboard(bitmap, cliprect);
robotbwl_draw_bowling_alley(machine, bitmap, cliprect); robotbwl_draw_bowling_alley(bitmap, cliprect);
robotbwl_draw_ball(machine, bitmap, cliprect); robotbwl_draw_ball(machine, bitmap, cliprect);
return 0; return 0;
} }

View File

@ -212,7 +212,7 @@ VIDEO_UPDATE( circusc )
for (i = 10;i < 32;i++) for (i = 10;i < 32;i++)
tilemap_set_scrolly(bg_tilemap,i,*circusc_scroll); tilemap_set_scrolly(bg_tilemap,i,*circusc_scroll);
fillbitmap(bitmap, machine->pens[0], cliprect); fillbitmap(bitmap, 0, cliprect);
tilemap_draw(bitmap,cliprect,bg_tilemap,1,0); tilemap_draw(bitmap,cliprect,bg_tilemap,1,0);
draw_sprites(machine,bitmap,cliprect); draw_sprites(machine,bitmap,cliprect);
tilemap_draw(bitmap,cliprect,bg_tilemap,0,0); tilemap_draw(bitmap,cliprect,bg_tilemap,0,0);

View File

@ -1173,7 +1173,7 @@ VIDEO_UPDATE( bigrun )
cischeat_tmap_SET_SCROLL(1) cischeat_tmap_SET_SCROLL(1)
cischeat_tmap_SET_SCROLL(2) cischeat_tmap_SET_SCROLL(2)
fillbitmap(bitmap,machine->pens[0],cliprect); fillbitmap(bitmap,0,cliprect);
for (i = 7; i >= 4; i--) for (i = 7; i >= 4; i--)
{ /* bitmap, road, min_priority, max_priority, transparency */ { /* bitmap, road, min_priority, max_priority, transparency */
@ -1226,7 +1226,7 @@ VIDEO_UPDATE( cischeat )
cischeat_tmap_SET_SCROLL(1) cischeat_tmap_SET_SCROLL(1)
cischeat_tmap_SET_SCROLL(2) cischeat_tmap_SET_SCROLL(2)
fillbitmap(bitmap,machine->pens[0],cliprect); fillbitmap(bitmap,0,cliprect);
/* bitmap, road, priority, transparency */ /* bitmap, road, priority, transparency */
if (megasys1_active_layers & 0x10) cischeat_draw_road(machine,bitmap,cliprect,0,7,5,TRANSPARENCY_NONE); if (megasys1_active_layers & 0x10) cischeat_draw_road(machine,bitmap,cliprect,0,7,5,TRANSPARENCY_NONE);
@ -1234,7 +1234,7 @@ VIDEO_UPDATE( cischeat )
flag = 0; flag = 0;
cischeat_tmap_DRAW(0) cischeat_tmap_DRAW(0)
// else fillbitmap(bitmap,machine->pens[0],cliprect); // else fillbitmap(bitmap,0,cliprect);
cischeat_tmap_DRAW(1) cischeat_tmap_DRAW(1)
if (megasys1_active_layers & 0x08) cischeat_draw_sprites(machine,bitmap,cliprect,15,3); if (megasys1_active_layers & 0x08) cischeat_draw_sprites(machine,bitmap,cliprect,15,3);
@ -1282,7 +1282,7 @@ VIDEO_UPDATE( f1gpstar )
cischeat_tmap_SET_SCROLL(1) cischeat_tmap_SET_SCROLL(1)
cischeat_tmap_SET_SCROLL(2) cischeat_tmap_SET_SCROLL(2)
fillbitmap(bitmap,machine->pens[0],cliprect); fillbitmap(bitmap,0,cliprect);
/* 1: clouds 5, grad 7, road 0 2: clouds 5, grad 7, road 0, tunnel roof 0 */ /* 1: clouds 5, grad 7, road 0 2: clouds 5, grad 7, road 0, tunnel roof 0 */
@ -1292,7 +1292,7 @@ VIDEO_UPDATE( f1gpstar )
flag = 0; flag = 0;
cischeat_tmap_DRAW(0) cischeat_tmap_DRAW(0)
// else fillbitmap(bitmap,machine->pens[0],cliprect); // else fillbitmap(bitmap,0,cliprect);
cischeat_tmap_DRAW(1) cischeat_tmap_DRAW(1)
/* road 1!! 0!! */ /* bitmap, road, min_priority, max_priority, transparency */ /* road 1!! 0!! */ /* bitmap, road, min_priority, max_priority, transparency */
@ -1361,11 +1361,11 @@ if ( input_code_pressed(KEYCODE_Z) || input_code_pressed(KEYCODE_X) )
// cischeat_tmap_SET_SCROLL(1) // cischeat_tmap_SET_SCROLL(1)
cischeat_tmap_SET_SCROLL(2) cischeat_tmap_SET_SCROLL(2)
fillbitmap(bitmap,machine->pens[0],cliprect); fillbitmap(bitmap,0,cliprect);
flag = 0; flag = 0;
cischeat_tmap_DRAW(0) cischeat_tmap_DRAW(0)
// else fillbitmap(bitmap,machine->pens[0],cliprect); // else fillbitmap(bitmap,0,cliprect);
// cischeat_tmap_DRAW(1) // cischeat_tmap_DRAW(1)
if (megasys1_active_layers & 0x08) cischeat_draw_sprites(machine,bitmap,cliprect,0,15); if (megasys1_active_layers & 0x08) cischeat_draw_sprites(machine,bitmap,cliprect,0,15);
cischeat_tmap_DRAW(2) cischeat_tmap_DRAW(2)

View File

@ -404,7 +404,7 @@ VIDEO_UPDATE( cninja )
/* Draw playfields */ /* Draw playfields */
fillbitmap(priority_bitmap,0,cliprect); fillbitmap(priority_bitmap,0,cliprect);
fillbitmap(bitmap,machine->pens[512],cliprect); fillbitmap(bitmap,512,cliprect);
deco16_tilemap_4_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE,1); deco16_tilemap_4_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE,1);
deco16_tilemap_3_draw(bitmap,cliprect,0,2); deco16_tilemap_3_draw(bitmap,cliprect,0,2);
deco16_tilemap_2_draw(bitmap,cliprect,TILEMAP_DRAW_LAYER1,2); deco16_tilemap_2_draw(bitmap,cliprect,TILEMAP_DRAW_LAYER1,2);
@ -421,7 +421,7 @@ VIDEO_UPDATE( edrandy )
deco16_pf34_update(deco16_pf3_rowscroll,deco16_pf4_rowscroll); deco16_pf34_update(deco16_pf3_rowscroll,deco16_pf4_rowscroll);
fillbitmap(priority_bitmap,0,cliprect); fillbitmap(priority_bitmap,0,cliprect);
fillbitmap(bitmap,machine->pens[0],cliprect); fillbitmap(bitmap,0,cliprect);
deco16_tilemap_4_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE,1); deco16_tilemap_4_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE,1);
if (deco16_raster_display_position) if (deco16_raster_display_position)
raster_pf3_draw(bitmap,cliprect,0,2); raster_pf3_draw(bitmap,cliprect,0,2);
@ -453,7 +453,7 @@ VIDEO_UPDATE( robocop2 )
/* Draw playfields */ /* Draw playfields */
fillbitmap(priority_bitmap,0,cliprect); fillbitmap(priority_bitmap,0,cliprect);
fillbitmap(bitmap,machine->pens[0x200],cliprect); fillbitmap(bitmap,0x200,cliprect);
if ((deco16_priority&4)==0) if ((deco16_priority&4)==0)
deco16_tilemap_4_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE,1); deco16_tilemap_4_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE,1);
@ -488,7 +488,7 @@ VIDEO_UPDATE( mutantf )
deco16_pf34_update(deco16_pf3_rowscroll,deco16_pf4_rowscroll); deco16_pf34_update(deco16_pf3_rowscroll,deco16_pf4_rowscroll);
/* Draw playfields */ /* Draw playfields */
fillbitmap(bitmap,machine->pens[0x400],cliprect); /* Confirmed */ fillbitmap(bitmap,0x400,cliprect); /* Confirmed */
/* There is no priority prom on this board, but there is a /* There is no priority prom on this board, but there is a
priority control word, the only values used in game appear priority control word, the only values used in game appear

View File

@ -563,11 +563,11 @@ VIDEO_UPDATE( combasc )
clip = *cliprect; clip = *cliprect;
clip.max_x = clip.min_x + 7; clip.max_x = clip.min_x + 7;
fillbitmap(bitmap,machine->pens[0],&clip); fillbitmap(bitmap,0,&clip);
clip = *cliprect; clip = *cliprect;
clip.min_x = clip.max_x - 7; clip.min_x = clip.max_x - 7;
fillbitmap(bitmap,machine->pens[0],&clip); fillbitmap(bitmap,0,&clip);
} }
return 0; return 0;
} }

View File

@ -38,40 +38,32 @@ VIDEO_UPDATE( copsnrob )
/* Draw the cars. Positioning was based on a screen shot */ /* Draw the cars. Positioning was based on a screen shot */
if (copsnrob_cary[0]) if (copsnrob_cary[0])
{
drawgfx(bitmap,machine->gfx[1], drawgfx(bitmap,machine->gfx[1],
copsnrob_carimage[0],0, copsnrob_carimage[0],0,
1,0, 1,0,
0xe4,256-copsnrob_cary[0], 0xe4,256-copsnrob_cary[0],
cliprect,TRANSPARENCY_PEN,0); cliprect,TRANSPARENCY_PEN,0);
}
if (copsnrob_cary[1]) if (copsnrob_cary[1])
{
drawgfx(bitmap,machine->gfx[1], drawgfx(bitmap,machine->gfx[1],
copsnrob_carimage[1],0, copsnrob_carimage[1],0,
1,0, 1,0,
0xc4,256-copsnrob_cary[1], 0xc4,256-copsnrob_cary[1],
cliprect,TRANSPARENCY_PEN,0); cliprect,TRANSPARENCY_PEN,0);
}
if (copsnrob_cary[2]) if (copsnrob_cary[2])
{
drawgfx(bitmap,machine->gfx[1], drawgfx(bitmap,machine->gfx[1],
copsnrob_carimage[2],0, copsnrob_carimage[2],0,
0,0, 0,0,
0x24,256-copsnrob_cary[2], 0x24,256-copsnrob_cary[2],
cliprect,TRANSPARENCY_PEN,0); cliprect,TRANSPARENCY_PEN,0);
}
if (copsnrob_cary[3]) if (copsnrob_cary[3])
{
drawgfx(bitmap,machine->gfx[1], drawgfx(bitmap,machine->gfx[1],
copsnrob_carimage[3],0, copsnrob_carimage[3],0,
0,0, 0,0,
0x04,256-copsnrob_cary[3], 0x04,256-copsnrob_cary[3],
cliprect,TRANSPARENCY_PEN,0); cliprect,TRANSPARENCY_PEN,0);
}
/* Draw the beer truck. Positioning was based on a screen shot. /* Draw the beer truck. Positioning was based on a screen shot.
@ -143,12 +135,8 @@ VIDEO_UPDATE( copsnrob )
if (val & mask1) if (val & mask1)
{ {
for (y = 0; y <= machine->screen[0].visarea.max_y; y++) for (y = 0; y <= machine->screen[0].visarea.max_y; y++)
{
if (copsnrob_bulletsram[y] & mask2) if (copsnrob_bulletsram[y] & mask2)
{ *BITMAP_ADDR16(bitmap, y, 256-x) = 1;
*BITMAP_ADDR16(bitmap, y, 256-x) = machine->pens[1];
}
}
} }
mask1 <<= 1; mask1 <<= 1;

View File

@ -249,7 +249,7 @@ WRITE8_HANDLER( cosmic_background_enable_w )
} }
static void draw_bitmap(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) static void draw_bitmap(mame_bitmap *bitmap, const rectangle *cliprect)
{ {
offs_t offs; offs_t offs;
@ -261,7 +261,7 @@ static void draw_bitmap(running_machine *machine, mame_bitmap *bitmap, const rec
UINT8 x = offs << 3; UINT8 x = offs << 3;
UINT8 y = offs >> 5; UINT8 y = offs >> 5;
pen_t pen = machine->pens[map_color(x, y)]; pen_t pen = map_color(x, y);
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
{ {
@ -315,7 +315,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
} }
static void cosmica_draw_starfield(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) static void cosmica_draw_starfield(mame_bitmap *bitmap, const rectangle *cliprect)
{ {
UINT8 y = 0; UINT8 y = 0;
UINT8 map = 0; UINT8 map = 0;
@ -351,7 +351,7 @@ static void cosmica_draw_starfield(running_machine *machine, mame_bitmap *bitmap
/* RGB order is reversed -- bit 7=R, 6=G, 5=B */ /* RGB order is reversed -- bit 7=R, 6=G, 5=B */
int col = (map >> 7) | ((map >> 5) & 0x02) | ((map >> 3) & 0x04); int col = (map >> 7) | ((map >> 5) & 0x02) | ((map >> 3) & 0x04);
*BITMAP_ADDR16(bitmap, y, x) = machine->pens[col]; *BITMAP_ADDR16(bitmap, y, x) = col;
} }
x++; x++;
@ -364,7 +364,7 @@ static void cosmica_draw_starfield(running_machine *machine, mame_bitmap *bitmap
} }
static void devzone_draw_grid(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) static void devzone_draw_grid(mame_bitmap *bitmap, const rectangle *cliprect)
{ {
UINT8 y; UINT8 y;
UINT8 *horz_PROM = memory_region(REGION_USER2); UINT8 *horz_PROM = memory_region(REGION_USER2);
@ -403,12 +403,11 @@ static void devzone_draw_grid(running_machine *machine, mame_bitmap *bitmap, con
{ {
if (!(vert_data & horz_data & 0x80)) /* NAND gate */ if (!(vert_data & horz_data & 0x80)) /* NAND gate */
{ {
pen_t pen = machine->pens[4]; /* blue */ /* blue */
if (flip_screen) if (flip_screen)
*BITMAP_ADDR16(bitmap, 255-y, 255-x) = pen; *BITMAP_ADDR16(bitmap, 255-y, 255-x) = 4;
else else
*BITMAP_ADDR16(bitmap, y, x) = pen; *BITMAP_ADDR16(bitmap, y, x) = 4;
} }
horz_data = (horz_data << 1) | 0x01; horz_data = (horz_data << 1) | 0x01;
@ -423,7 +422,7 @@ static void devzone_draw_grid(running_machine *machine, mame_bitmap *bitmap, con
} }
static void nomnlnd_draw_background(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) static void nomnlnd_draw_background(mame_bitmap *bitmap, const rectangle *cliprect)
{ {
UINT8 y = 0; UINT8 y = 0;
UINT8 water = cpu_getcurrentframe(); UINT8 water = cpu_getcurrentframe();
@ -524,12 +523,10 @@ static void nomnlnd_draw_background(running_machine *machine, mame_bitmap *bitma
if (color != 0) if (color != 0)
{ {
pen_t pen = machine->pens[color];
if (flip_screen) if (flip_screen)
*BITMAP_ADDR16(bitmap, 255-y, 255-x) = pen; *BITMAP_ADDR16(bitmap, 255-y, 255-x) = color;
else else
*BITMAP_ADDR16(bitmap, y, x) = pen; *BITMAP_ADDR16(bitmap, y, x) = color;
} }
x++; x++;
@ -549,19 +546,16 @@ static void nomnlnd_draw_background(running_machine *machine, mame_bitmap *bitma
VIDEO_UPDATE( cosmicg ) VIDEO_UPDATE( cosmicg )
{ {
fillbitmap(bitmap, machine->pens[0], cliprect); fillbitmap(bitmap, 0, cliprect);
draw_bitmap(bitmap, cliprect);
draw_bitmap(machine, bitmap, cliprect);
return 0; return 0;
} }
VIDEO_UPDATE( panic ) VIDEO_UPDATE( panic )
{ {
fillbitmap(bitmap, machine->pens[0], cliprect); fillbitmap(bitmap, 0, cliprect);
draw_bitmap(bitmap, cliprect);
draw_bitmap(machine, bitmap, cliprect);
draw_sprites(machine, bitmap, cliprect, 0x07, 1); draw_sprites(machine, bitmap, cliprect, 0x07, 1);
return 0; return 0;
} }
@ -569,12 +563,9 @@ VIDEO_UPDATE( panic )
VIDEO_UPDATE( cosmica ) VIDEO_UPDATE( cosmica )
{ {
fillbitmap(bitmap, machine->pens[0], cliprect); fillbitmap(bitmap, 0, cliprect);
cosmica_draw_starfield(bitmap, cliprect);
cosmica_draw_starfield(machine, bitmap, cliprect); draw_bitmap(bitmap, cliprect);
draw_bitmap(machine, bitmap, cliprect);
draw_sprites(machine, bitmap, cliprect, 0x0f, 0); draw_sprites(machine, bitmap, cliprect, 0x0f, 0);
return 0; return 0;
} }
@ -582,10 +573,8 @@ VIDEO_UPDATE( cosmica )
VIDEO_UPDATE( magspot ) VIDEO_UPDATE( magspot )
{ {
fillbitmap(bitmap, machine->pens[0], cliprect); fillbitmap(bitmap, 0, cliprect);
draw_bitmap(bitmap, cliprect);
draw_bitmap(machine, bitmap, cliprect);
draw_sprites(machine, bitmap, cliprect, 0x07, 0); draw_sprites(machine, bitmap, cliprect, 0x07, 0);
return 0; return 0;
} }
@ -593,13 +582,12 @@ VIDEO_UPDATE( magspot )
VIDEO_UPDATE( devzone ) VIDEO_UPDATE( devzone )
{ {
fillbitmap(bitmap, machine->pens[0], cliprect); fillbitmap(bitmap, 0, cliprect);
if (background_enable) if (background_enable)
devzone_draw_grid(machine, bitmap, cliprect); devzone_draw_grid(bitmap, cliprect);
draw_bitmap(machine, bitmap, cliprect);
draw_bitmap(bitmap, cliprect);
draw_sprites(machine, bitmap, cliprect, 0x07, 0); draw_sprites(machine, bitmap, cliprect, 0x07, 0);
return 0; return 0;
} }
@ -610,14 +598,12 @@ VIDEO_UPDATE( nomnlnd )
/* according to the video summation logic on pg4, the trees and river /* according to the video summation logic on pg4, the trees and river
have the highest priority */ have the highest priority */
fillbitmap(bitmap, machine->pens[0], cliprect); fillbitmap(bitmap, 0, cliprect);
draw_bitmap(bitmap, cliprect);
draw_bitmap(machine, bitmap, cliprect);
draw_sprites(machine, bitmap, cliprect, 0x07, 0); draw_sprites(machine, bitmap, cliprect, 0x07, 0);
if (background_enable) if (background_enable)
nomnlnd_draw_background(machine, bitmap, cliprect); nomnlnd_draw_background(bitmap, cliprect);
return 0; return 0;
} }

View File

@ -1692,7 +1692,7 @@ static void cps2_render_sprites(running_machine *machine, mame_bitmap *bitmap,co
static void cps1_render_stars(running_machine *machine,mame_bitmap *bitmap,const rectangle *cliprect) static void cps1_render_stars(mame_bitmap *bitmap,const rectangle *cliprect)
{ {
int offs; int offs;
UINT8 *stars_rom = memory_region(REGION_GFX2); UINT8 *stars_rom = memory_region(REGION_GFX2);
@ -1726,7 +1726,7 @@ static void cps1_render_stars(running_machine *machine,mame_bitmap *bitmap,const
if (sx >= cliprect->min_x && sx <= cliprect->max_x && if (sx >= cliprect->min_x && sx <= cliprect->max_x &&
sy >= cliprect->min_y && sy <= cliprect->max_y) sy >= cliprect->min_y && sy <= cliprect->max_y)
*BITMAP_ADDR16(bitmap, sy, sx) = machine->pens[0xa00+col]; *BITMAP_ADDR16(bitmap, sy, sx) = 0xa00 + col;
} }
} }
} }
@ -1752,7 +1752,7 @@ static void cps1_render_stars(running_machine *machine,mame_bitmap *bitmap,const
if (sx >= cliprect->min_x && sx <= cliprect->max_x && if (sx >= cliprect->min_x && sx <= cliprect->max_x &&
sy >= cliprect->min_y && sy <= cliprect->max_y) sy >= cliprect->min_y && sy <= cliprect->max_y)
*BITMAP_ADDR16(bitmap, sy, sx) = machine->pens[0x800+col]; *BITMAP_ADDR16(bitmap, sy, sx) = 0x800 + col;
} }
} }
} }
@ -1846,9 +1846,9 @@ VIDEO_UPDATE( cps1 )
/* Blank screen */ /* Blank screen */
fillbitmap(bitmap,machine->pens[4095],cliprect); fillbitmap(bitmap,4095,cliprect);
cps1_render_stars(machine,bitmap,cliprect); cps1_render_stars(bitmap,cliprect);
/* Draw layers (0 = sprites, 1-3 = tilemaps) */ /* Draw layers (0 = sprites, 1-3 = tilemaps) */
l0 = (layercontrol >> 0x06) & 03; l0 = (layercontrol >> 0x06) & 03;

View File

@ -191,7 +191,7 @@ VIDEO_UPDATE( crshrace )
return 0; return 0;
} }
fillbitmap(bitmap,machine->pens[0x1ff],cliprect); fillbitmap(bitmap,0x1ff,cliprect);
switch (gfxctrl & 0xfb) switch (gfxctrl & 0xfb)
{ {

View File

@ -304,7 +304,7 @@ VIDEO_UPDATE( cvs )
if (colortable_entry_get_value(machine->colortable, *BITMAP_ADDR16(scrolled_collision_background, offs, bx))) if (colortable_entry_get_value(machine->colortable, *BITMAP_ADDR16(scrolled_collision_background, offs, bx)))
cvs_collision_register |= 0x80; cvs_collision_register |= 0x80;
*BITMAP_ADDR16(bitmap, offs, bx) = machine->pens[BULLET_STAR_PEN]; *BITMAP_ADDR16(bitmap, offs, bx) = BULLET_STAR_PEN;
} }
} }
} }
@ -328,7 +328,7 @@ VIDEO_UPDATE( cvs )
if (S2636_IS_PIXEL_DRAWN(pixel)) if (S2636_IS_PIXEL_DRAWN(pixel))
{ {
*BITMAP_ADDR16(bitmap, y, x) = machine->pens[SPRITE_PEN_BASE + S2636_PIXEL_COLOR(pixel)]; *BITMAP_ADDR16(bitmap, y, x) = SPRITE_PEN_BASE + S2636_PIXEL_COLOR(pixel);
/* S2636 vs. S2636 collision detection */ /* S2636 vs. S2636 collision detection */
if (S2636_IS_PIXEL_DRAWN(pixel0) && S2636_IS_PIXEL_DRAWN(pixel1)) cvs_collision_register |= 0x01; if (S2636_IS_PIXEL_DRAWN(pixel0) && S2636_IS_PIXEL_DRAWN(pixel1)) cvs_collision_register |= 0x01;
@ -369,7 +369,7 @@ VIDEO_UPDATE( cvs )
y = ~y; y = ~y;
if (colortable_entry_get_value(machine->colortable, *BITMAP_ADDR16(bitmap, y, x)) == 0) if (colortable_entry_get_value(machine->colortable, *BITMAP_ADDR16(bitmap, y, x)) == 0)
*BITMAP_ADDR16(bitmap, y, x) = machine->pens[BULLET_STAR_PEN]; *BITMAP_ADDR16(bitmap, y, x) = BULLET_STAR_PEN;
} }
} }
} }

View File

@ -282,7 +282,7 @@ VIDEO_UPDATE( dcon )
if ((dcon_enable&1)!=1) if ((dcon_enable&1)!=1)
tilemap_draw(bitmap,cliprect,background_layer,0,0); tilemap_draw(bitmap,cliprect,background_layer,0,0);
else else
fillbitmap(bitmap,machine->pens[15],cliprect); /* Should always be black, not pen 15 */ fillbitmap(bitmap,15,cliprect); /* Should always be black, not pen 15 */
tilemap_draw(bitmap,cliprect,midground_layer,0,1); tilemap_draw(bitmap,cliprect,midground_layer,0,1);
tilemap_draw(bitmap,cliprect,foreground_layer,0,2); tilemap_draw(bitmap,cliprect,foreground_layer,0,2);
@ -318,7 +318,7 @@ VIDEO_UPDATE( sdgndmps )
if ((dcon_enable&1)!=1) if ((dcon_enable&1)!=1)
tilemap_draw(bitmap,cliprect,background_layer,0,0); tilemap_draw(bitmap,cliprect,background_layer,0,0);
else else
fillbitmap(bitmap,machine->pens[15],cliprect); /* Should always be black, not pen 15 */ fillbitmap(bitmap,15,cliprect); /* Should always be black, not pen 15 */
tilemap_draw(bitmap,cliprect,midground_layer,0,1); tilemap_draw(bitmap,cliprect,midground_layer,0,1);
tilemap_draw(bitmap,cliprect,foreground_layer,0,2); tilemap_draw(bitmap,cliprect,foreground_layer,0,2);

View File

@ -216,8 +216,7 @@ static void draw_sprites(running_machine* machine, mame_bitmap *bitmap,const rec
/******************************************************************************/ /******************************************************************************/
static void custom_tilemap_draw(running_machine* machine, static void custom_tilemap_draw(mame_bitmap *bitmap,
mame_bitmap *bitmap,
const rectangle *cliprect, const rectangle *cliprect,
tilemap *tilemap_ptr, tilemap *tilemap_ptr,
const UINT16 *rowscroll_ptr, const UINT16 *rowscroll_ptr,
@ -284,12 +283,10 @@ static void custom_tilemap_draw(running_machine* machine,
{ {
/* Top 8 pens of top 8 palettes only */ /* Top 8 pens of top 8 palettes only */
if ((p&0x88)==0x88) if ((p&0x88)==0x88)
*BITMAP_ADDR16(bitmap, y, x) = machine->pens[p]; *BITMAP_ADDR16(bitmap, y, x) = p;
} }
else else
{ *BITMAP_ADDR16(bitmap, y, x) = p;
*BITMAP_ADDR16(bitmap, y, x) = machine->pens[p];
}
} }
} }
src_y++; src_y++;
@ -298,50 +295,50 @@ static void custom_tilemap_draw(running_machine* machine,
/******************************************************************************/ /******************************************************************************/
static void dec0_pf1_draw(running_machine* machine,mame_bitmap *bitmap,const rectangle *cliprect,int flags) static void dec0_pf1_draw(mame_bitmap *bitmap,const rectangle *cliprect,int flags)
{ {
switch (dec0_pf1_control_0[3]&0x3) { switch (dec0_pf1_control_0[3]&0x3) {
case 0: /* 4x1 */ case 0: /* 4x1 */
custom_tilemap_draw(machine,bitmap,cliprect,pf1_tilemap_0,dec0_pf1_rowscroll,dec0_pf1_colscroll,dec0_pf1_control_0,dec0_pf1_control_1,flags); custom_tilemap_draw(bitmap,cliprect,pf1_tilemap_0,dec0_pf1_rowscroll,dec0_pf1_colscroll,dec0_pf1_control_0,dec0_pf1_control_1,flags);
break; break;
case 1: /* 2x2 */ case 1: /* 2x2 */
default: default:
custom_tilemap_draw(machine,bitmap,cliprect,pf1_tilemap_1,dec0_pf1_rowscroll,dec0_pf1_colscroll,dec0_pf1_control_0,dec0_pf1_control_1,flags); custom_tilemap_draw(bitmap,cliprect,pf1_tilemap_1,dec0_pf1_rowscroll,dec0_pf1_colscroll,dec0_pf1_control_0,dec0_pf1_control_1,flags);
break; break;
case 2: /* 1x4 */ case 2: /* 1x4 */
custom_tilemap_draw(machine,bitmap,cliprect,pf1_tilemap_2,dec0_pf1_rowscroll,dec0_pf1_colscroll,dec0_pf1_control_0,dec0_pf1_control_1,flags); custom_tilemap_draw(bitmap,cliprect,pf1_tilemap_2,dec0_pf1_rowscroll,dec0_pf1_colscroll,dec0_pf1_control_0,dec0_pf1_control_1,flags);
break; break;
}; };
} }
static void dec0_pf2_draw(running_machine* machine,mame_bitmap *bitmap,const rectangle *cliprect,int flags) static void dec0_pf2_draw(mame_bitmap *bitmap,const rectangle *cliprect,int flags)
{ {
switch (dec0_pf2_control_0[3]&0x3) { switch (dec0_pf2_control_0[3]&0x3) {
case 0: /* 4x1 */ case 0: /* 4x1 */
custom_tilemap_draw(machine,bitmap,cliprect,pf2_tilemap_0,dec0_pf2_rowscroll,dec0_pf2_colscroll,dec0_pf2_control_0,dec0_pf2_control_1,flags); custom_tilemap_draw(bitmap,cliprect,pf2_tilemap_0,dec0_pf2_rowscroll,dec0_pf2_colscroll,dec0_pf2_control_0,dec0_pf2_control_1,flags);
break; break;
case 1: /* 2x2 */ case 1: /* 2x2 */
default: default:
custom_tilemap_draw(machine,bitmap,cliprect,pf2_tilemap_1,dec0_pf2_rowscroll,dec0_pf2_colscroll,dec0_pf2_control_0,dec0_pf2_control_1,flags); custom_tilemap_draw(bitmap,cliprect,pf2_tilemap_1,dec0_pf2_rowscroll,dec0_pf2_colscroll,dec0_pf2_control_0,dec0_pf2_control_1,flags);
break; break;
case 2: /* 1x4 */ case 2: /* 1x4 */
custom_tilemap_draw(machine,bitmap,cliprect,pf2_tilemap_2,dec0_pf2_rowscroll,dec0_pf2_colscroll,dec0_pf2_control_0,dec0_pf2_control_1,flags); custom_tilemap_draw(bitmap,cliprect,pf2_tilemap_2,dec0_pf2_rowscroll,dec0_pf2_colscroll,dec0_pf2_control_0,dec0_pf2_control_1,flags);
break; break;
}; };
} }
static void dec0_pf3_draw(running_machine* machine,mame_bitmap *bitmap,const rectangle *cliprect,int flags) static void dec0_pf3_draw(mame_bitmap *bitmap,const rectangle *cliprect,int flags)
{ {
switch (dec0_pf3_control_0[3]&0x3) { switch (dec0_pf3_control_0[3]&0x3) {
case 0: /* 4x1 */ case 0: /* 4x1 */
custom_tilemap_draw(machine,bitmap,cliprect,pf3_tilemap_0,dec0_pf3_rowscroll,dec0_pf3_colscroll,dec0_pf3_control_0,dec0_pf3_control_1,flags); custom_tilemap_draw(bitmap,cliprect,pf3_tilemap_0,dec0_pf3_rowscroll,dec0_pf3_colscroll,dec0_pf3_control_0,dec0_pf3_control_1,flags);
break; break;
case 1: /* 2x2 */ case 1: /* 2x2 */
default: default:
custom_tilemap_draw(machine,bitmap,cliprect,pf3_tilemap_1,dec0_pf3_rowscroll,dec0_pf3_colscroll,dec0_pf3_control_0,dec0_pf3_control_1,flags); custom_tilemap_draw(bitmap,cliprect,pf3_tilemap_1,dec0_pf3_rowscroll,dec0_pf3_colscroll,dec0_pf3_control_0,dec0_pf3_control_1,flags);
break; break;
case 2: /* 1x4 */ case 2: /* 1x4 */
custom_tilemap_draw(machine,bitmap,cliprect,pf3_tilemap_2,dec0_pf3_rowscroll,dec0_pf3_colscroll,dec0_pf3_control_0,dec0_pf3_control_1,flags); custom_tilemap_draw(bitmap,cliprect,pf3_tilemap_2,dec0_pf3_rowscroll,dec0_pf3_colscroll,dec0_pf3_control_0,dec0_pf3_control_1,flags);
break; break;
}; };
} }
@ -352,14 +349,14 @@ VIDEO_UPDATE( hbarrel )
{ {
flip_screen_set(dec0_pf1_control_0[0]&0x80); flip_screen_set(dec0_pf1_control_0[0]&0x80);
dec0_pf3_draw(machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE); dec0_pf3_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
draw_sprites(machine,bitmap,cliprect,0x08,0x08); draw_sprites(machine,bitmap,cliprect,0x08,0x08);
dec0_pf2_draw(machine,bitmap,cliprect,0); dec0_pf2_draw(bitmap,cliprect,0);
/* HB always keeps pf2 on top of pf3, no need explicitly support priority register */ /* HB always keeps pf2 on top of pf3, no need explicitly support priority register */
draw_sprites(machine,bitmap,cliprect,0x08,0x00); draw_sprites(machine,bitmap,cliprect,0x08,0x00);
dec0_pf1_draw(machine,bitmap,cliprect,0); dec0_pf1_draw(bitmap,cliprect,0);
return 0; return 0;
} }
@ -372,32 +369,32 @@ VIDEO_UPDATE( baddudes )
/* WARNING: inverted wrt Midnight Resistance */ /* WARNING: inverted wrt Midnight Resistance */
if ((dec0_pri & 0x01) == 0) if ((dec0_pri & 0x01) == 0)
{ {
dec0_pf2_draw(machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE); dec0_pf2_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
dec0_pf3_draw(machine,bitmap,cliprect,0); dec0_pf3_draw(bitmap,cliprect,0);
if (dec0_pri & 2) if (dec0_pri & 2)
dec0_pf2_draw(machine,bitmap,cliprect,TILEMAP_DRAW_LAYER0); /* Foreground pens only */ dec0_pf2_draw(bitmap,cliprect,TILEMAP_DRAW_LAYER0); /* Foreground pens only */
draw_sprites(machine,bitmap,cliprect,0x00,0x00); draw_sprites(machine,bitmap,cliprect,0x00,0x00);
if (dec0_pri & 4) if (dec0_pri & 4)
dec0_pf3_draw(machine,bitmap,cliprect,TILEMAP_DRAW_LAYER0); /* Foreground pens only */ dec0_pf3_draw(bitmap,cliprect,TILEMAP_DRAW_LAYER0); /* Foreground pens only */
} }
else else
{ {
dec0_pf3_draw(machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE); dec0_pf3_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
dec0_pf2_draw(machine,bitmap,cliprect,0); dec0_pf2_draw(bitmap,cliprect,0);
if (dec0_pri & 2) if (dec0_pri & 2)
dec0_pf3_draw(machine,bitmap,cliprect,TILEMAP_DRAW_LAYER0); /* Foreground pens only */ dec0_pf3_draw(bitmap,cliprect,TILEMAP_DRAW_LAYER0); /* Foreground pens only */
draw_sprites(machine,bitmap,cliprect,0x00,0x00); draw_sprites(machine,bitmap,cliprect,0x00,0x00);
if (dec0_pri & 4) if (dec0_pri & 4)
dec0_pf2_draw(machine,bitmap,cliprect,TILEMAP_DRAW_LAYER0); /* Foreground pens only */ dec0_pf2_draw(bitmap,cliprect,TILEMAP_DRAW_LAYER0); /* Foreground pens only */
} }
dec0_pf1_draw(machine,bitmap,cliprect,0); dec0_pf1_draw(bitmap,cliprect,0);
return 0; return 0;
} }
@ -420,21 +417,21 @@ VIDEO_UPDATE( robocop )
/* Robocop uses it only for the title screen, so this might be just */ /* Robocop uses it only for the title screen, so this might be just */
/* completely wrong. The top 8 bits of the register might mean */ /* completely wrong. The top 8 bits of the register might mean */
/* something (they are 0x80 in midres, 0x00 here) */ /* something (they are 0x80 in midres, 0x00 here) */
dec0_pf2_draw(machine,bitmap,cliprect,TILEMAP_DRAW_LAYER1|TILEMAP_DRAW_OPAQUE); dec0_pf2_draw(bitmap,cliprect,TILEMAP_DRAW_LAYER1|TILEMAP_DRAW_OPAQUE);
if (dec0_pri & 0x02) if (dec0_pri & 0x02)
draw_sprites(machine,bitmap,cliprect,0x08,trans); draw_sprites(machine,bitmap,cliprect,0x08,trans);
dec0_pf3_draw(machine,bitmap,cliprect,0); dec0_pf3_draw(bitmap,cliprect,0);
} }
else else
{ {
dec0_pf3_draw(machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE); dec0_pf3_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
if (dec0_pri & 0x02) if (dec0_pri & 0x02)
draw_sprites(machine,bitmap,cliprect,0x08,trans); draw_sprites(machine,bitmap,cliprect,0x08,trans);
dec0_pf2_draw(machine,bitmap,cliprect,0); dec0_pf2_draw(bitmap,cliprect,0);
} }
if (dec0_pri & 0x02) if (dec0_pri & 0x02)
@ -442,7 +439,7 @@ VIDEO_UPDATE( robocop )
else else
draw_sprites(machine,bitmap,cliprect,0x00,0x00); draw_sprites(machine,bitmap,cliprect,0x00,0x00);
dec0_pf1_draw(machine,bitmap,cliprect,0); dec0_pf1_draw(bitmap,cliprect,0);
return 0; return 0;
} }
@ -455,9 +452,9 @@ VIDEO_UPDATE( birdtry )
/* This game doesn't have the extra playfield chip on the game board, but /* This game doesn't have the extra playfield chip on the game board, but
the palette does show through. */ the palette does show through. */
fillbitmap(bitmap,machine->pens[768],cliprect); fillbitmap(bitmap,machine->pens[768],cliprect);
dec0_pf2_draw(machine,bitmap,cliprect,0); dec0_pf2_draw(bitmap,cliprect,0);
draw_sprites(machine,bitmap,cliprect,0x00,0x00); draw_sprites(machine,bitmap,cliprect,0x00,0x00);
dec0_pf1_draw(machine,bitmap,cliprect,0); dec0_pf1_draw(bitmap,cliprect,0);
return 0; return 0;
} }
@ -469,17 +466,17 @@ VIDEO_UPDATE( hippodrm )
if (dec0_pri & 0x01) if (dec0_pri & 0x01)
{ {
dec0_pf2_draw(machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE); dec0_pf2_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
dec0_pf3_draw(machine,bitmap,cliprect,0); dec0_pf3_draw(bitmap,cliprect,0);
} }
else else
{ {
dec0_pf3_draw(machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE); dec0_pf3_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
dec0_pf2_draw(machine,bitmap,cliprect,0); dec0_pf2_draw(bitmap,cliprect,0);
} }
draw_sprites(machine,bitmap,cliprect,0x00,0x00); draw_sprites(machine,bitmap,cliprect,0x00,0x00);
dec0_pf1_draw(machine,bitmap,cliprect,0); dec0_pf1_draw(bitmap,cliprect,0);
return 0; return 0;
} }
@ -489,16 +486,16 @@ VIDEO_UPDATE( slyspy )
{ {
flip_screen_set(dec0_pf1_control_0[0]&0x80); flip_screen_set(dec0_pf1_control_0[0]&0x80);
dec0_pf3_draw(machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE); dec0_pf3_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
dec0_pf2_draw(machine,bitmap,cliprect,0); dec0_pf2_draw(bitmap,cliprect,0);
draw_sprites(machine,bitmap,cliprect,0x00,0x00); draw_sprites(machine,bitmap,cliprect,0x00,0x00);
/* Redraw top 8 pens of top 8 palettes over sprites */ /* Redraw top 8 pens of top 8 palettes over sprites */
if (dec0_pri&0x80) if (dec0_pri&0x80)
dec0_pf2_draw(machine,bitmap,cliprect,TILEMAP_DRAW_LAYER0); dec0_pf2_draw(bitmap,cliprect,TILEMAP_DRAW_LAYER0);
dec0_pf1_draw(machine,bitmap,cliprect,0); dec0_pf1_draw(bitmap,cliprect,0);
return 0; return 0;
} }
@ -516,21 +513,21 @@ VIDEO_UPDATE( midres )
if (dec0_pri & 0x01) if (dec0_pri & 0x01)
{ {
dec0_pf2_draw(machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE); dec0_pf2_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
if (dec0_pri & 0x02) if (dec0_pri & 0x02)
draw_sprites(machine,bitmap,cliprect,0x08,trans); draw_sprites(machine,bitmap,cliprect,0x08,trans);
dec0_pf3_draw(machine,bitmap,cliprect,0); dec0_pf3_draw(bitmap,cliprect,0);
} }
else else
{ {
dec0_pf3_draw(machine,bitmap,cliprect,TILEMAP_DRAW_OPAQUE); dec0_pf3_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE);
if (dec0_pri & 0x02) if (dec0_pri & 0x02)
draw_sprites(machine,bitmap,cliprect,0x08,trans); draw_sprites(machine,bitmap,cliprect,0x08,trans);
dec0_pf2_draw(machine,bitmap,cliprect,0); dec0_pf2_draw(bitmap,cliprect,0);
} }
if (dec0_pri & 0x02) if (dec0_pri & 0x02)
@ -538,7 +535,7 @@ VIDEO_UPDATE( midres )
else else
draw_sprites(machine,bitmap,cliprect,0x00,0x00); draw_sprites(machine,bitmap,cliprect,0x00,0x00);
dec0_pf1_draw(machine,bitmap,cliprect,0); dec0_pf1_draw(bitmap,cliprect,0);
return 0; return 0;
} }

View File

@ -171,7 +171,7 @@ static void draw_object(running_machine* machine, mame_bitmap *bitmap, const rec
drawgfx(bitmap, machine->gfx[3], 1, color, 0, 1, sx, sy - 64, cliprect, TRANSPARENCY_PEN, 0); drawgfx(bitmap, machine->gfx[3], 1, color, 0, 1, sx, sy - 64, cliprect, TRANSPARENCY_PEN, 0);
} }
static void draw_center(running_machine* machine, mame_bitmap *bitmap, const rectangle *cliprect) static void draw_center(mame_bitmap *bitmap, const rectangle *cliprect)
{ {
int sx, sy, x, y, color; int sx, sy, x, y, color;
@ -194,7 +194,7 @@ static void draw_center(running_machine* machine, mame_bitmap *bitmap, const rec
if (((sy + y) & color_center_bot & 3) == (sy & color_center_bot & 3)) if (((sy + y) & color_center_bot & 3) == (sy & color_center_bot & 3))
for (x = 0; x < 256; x++) for (x = 0; x < 256; x++)
if (0 != (x & 16) || 0 != (center_h_shift_space & 1)) if (0 != (x & 16) || 0 != (center_h_shift_space & 1))
*BITMAP_ADDR16(bitmap, sy + y, (sx + x) & 255) = machine->pens[color]; *BITMAP_ADDR16(bitmap, sy + y, (sx + x) & 255) = color;
} }
} }
@ -459,7 +459,7 @@ static void draw_sprites(running_machine* machine, mame_bitmap *bitmap, const re
} }
static void draw_missiles(running_machine* machine, mame_bitmap *bitmap, const rectangle *cliprect, static void draw_missiles(mame_bitmap *bitmap, const rectangle *cliprect,
int missile_y_adjust, int missile_y_adjust_flip_screen, int missile_y_adjust, int missile_y_adjust_flip_screen,
UINT8 *missile_ram, int interleave) UINT8 *missile_ram, int interleave)
{ {
@ -483,7 +483,7 @@ static void draw_missiles(running_machine* machine, mame_bitmap *bitmap, const r
for (x = 0; x < 4; x++) for (x = 0; x < 4; x++)
{ {
if (sx >= cliprect->min_x && sx <= cliprect->max_x) if (sx >= cliprect->min_x && sx <= cliprect->max_x)
*BITMAP_ADDR16(bitmap, sy, sx) = machine->pens[(color_missiles >> 4) & 7]; *BITMAP_ADDR16(bitmap, sy, sx) = (color_missiles >> 4) & 7;
sx++; sx++;
} }
@ -499,7 +499,7 @@ static void draw_missiles(running_machine* machine, mame_bitmap *bitmap, const r
for (x = 0; x < 4; x++) for (x = 0; x < 4; x++)
{ {
if (sx >= cliprect->min_x && sx <= cliprect->max_x) if (sx >= cliprect->min_x && sx <= cliprect->max_x)
*BITMAP_ADDR16(bitmap, sy, sx) = machine->pens[color_missiles & 7]; *BITMAP_ADDR16(bitmap, sy, sx) = color_missiles & 7;
sx++; sx++;
} }
} }
@ -690,12 +690,12 @@ VIDEO_UPDATE( decocass )
if (mode_set & 0x20) if (mode_set & 0x20)
{ {
draw_object(machine,bitmap,cliprect); draw_object(machine,bitmap,cliprect);
draw_center(machine,bitmap,cliprect); draw_center(bitmap,cliprect);
} }
else else
{ {
draw_object(machine,bitmap,cliprect); draw_object(machine,bitmap,cliprect);
draw_center(machine,bitmap,cliprect); draw_center(bitmap,cliprect);
if (mode_set & 0x08) /* bkg_ena on ? */ if (mode_set & 0x08) /* bkg_ena on ? */
{ {
clip = bg_tilemap_l_clip; clip = bg_tilemap_l_clip;
@ -709,7 +709,7 @@ VIDEO_UPDATE( decocass )
} }
tilemap_draw(bitmap,cliprect, fg_tilemap, 0, 0); tilemap_draw(bitmap,cliprect, fg_tilemap, 0, 0);
draw_sprites(machine,bitmap,cliprect, (color_center_bot >> 1) & 1, 0, 0, decocass_fgvideoram, 0x20); draw_sprites(machine,bitmap,cliprect, (color_center_bot >> 1) & 1, 0, 0, decocass_fgvideoram, 0x20);
draw_missiles(machine,bitmap,cliprect, 1, 0, decocass_colorram, 0x20); draw_missiles(bitmap,cliprect, 1, 0, decocass_colorram, 0x20);
return 0; return 0;
} }

View File

@ -202,7 +202,7 @@ WRITE16_HANDLER( deniam_coinctrl_w )
* c | ---------------- | zoomy like in System 16? * c | ---------------- | zoomy like in System 16?
* e | ---------------- | * e | ---------------- |
*/ */
static void draw_sprites(running_machine* machine, mame_bitmap *bitmap, const rectangle *cliprect) static void draw_sprites(mame_bitmap *bitmap, const rectangle *cliprect)
{ {
int offs; int offs;
@ -260,7 +260,7 @@ static void draw_sprites(running_machine* machine, mame_bitmap *bitmap, const re
y >= cliprect->min_y && y <= cliprect->max_y) y >= cliprect->min_y && y <= cliprect->max_y)
{ {
if ((*BITMAP_ADDR8(priority_bitmap, y, sx+x) & primask) == 0) if ((*BITMAP_ADDR8(priority_bitmap, y, sx+x) & primask) == 0)
*BITMAP_ADDR16(bitmap, y, sx+x) = machine->pens[color*16+(rom[i]&0x0f)]; *BITMAP_ADDR16(bitmap, y, sx+x) = color*16+(rom[i]&0x0f);
*BITMAP_ADDR8(priority_bitmap, y, sx+x) = 8; *BITMAP_ADDR8(priority_bitmap, y, sx+x) = 8;
} }
} }
@ -280,7 +280,7 @@ static void draw_sprites(running_machine* machine, mame_bitmap *bitmap, const re
y >= cliprect->min_y && y <= cliprect->max_y) y >= cliprect->min_y && y <= cliprect->max_y)
{ {
if ((*BITMAP_ADDR8(priority_bitmap, y, sx+x) & primask) == 0) if ((*BITMAP_ADDR8(priority_bitmap, y, sx+x) & primask) == 0)
*BITMAP_ADDR16(bitmap, y, sx+x) = machine->pens[color*16+(rom[i]>>4)]; *BITMAP_ADDR16(bitmap, y, sx+x) = color*16+(rom[i]>>4);
*BITMAP_ADDR8(priority_bitmap, y, sx+x) = 8; *BITMAP_ADDR8(priority_bitmap, y, sx+x) = 8;
} }
} }
@ -304,7 +304,7 @@ static void draw_sprites(running_machine* machine, mame_bitmap *bitmap, const re
y >= cliprect->min_y && y <= cliprect->max_y) y >= cliprect->min_y && y <= cliprect->max_y)
{ {
if ((*BITMAP_ADDR8(priority_bitmap, y, sx+x) & primask) == 0) if ((*BITMAP_ADDR8(priority_bitmap, y, sx+x) & primask) == 0)
*BITMAP_ADDR16(bitmap, y, sx+x) = machine->pens[color*16+(rom[i]>>4)]; *BITMAP_ADDR16(bitmap, y, sx+x) = color*16+(rom[i]>>4);
*BITMAP_ADDR8(priority_bitmap, y, sx+x) = 8; *BITMAP_ADDR8(priority_bitmap, y, sx+x) = 8;
} }
} }
@ -324,7 +324,7 @@ static void draw_sprites(running_machine* machine, mame_bitmap *bitmap, const re
y >= cliprect->min_y && y <= cliprect->max_y) y >= cliprect->min_y && y <= cliprect->max_y)
{ {
if ((*BITMAP_ADDR8(priority_bitmap, y, sx+x) & primask) == 0) if ((*BITMAP_ADDR8(priority_bitmap, y, sx+x) & primask) == 0)
*BITMAP_ADDR16(bitmap, y, sx+x) = machine->pens[color*16+(rom[i]&0x0f)]; *BITMAP_ADDR16(bitmap, y, sx+x) = color*16+(rom[i]&0x0f);
*BITMAP_ADDR8(priority_bitmap, y, sx+x) = 8; *BITMAP_ADDR8(priority_bitmap, y, sx+x) = 8;
} }
} }
@ -397,6 +397,6 @@ VIDEO_UPDATE( deniam )
tilemap_draw(bitmap,cliprect,fg_tilemap,0,2); tilemap_draw(bitmap,cliprect,fg_tilemap,0,2);
tilemap_draw(bitmap,cliprect,tx_tilemap,0,4); tilemap_draw(bitmap,cliprect,tx_tilemap,0,4);
draw_sprites(machine,bitmap,cliprect); draw_sprites(bitmap,cliprect);
return 0; return 0;
} }

View File

@ -19,7 +19,7 @@ VIDEO_UPDATE( destroyr )
int i; int i;
int j; int j;
fillbitmap(bitmap, machine->pens[0], cliprect); fillbitmap(bitmap, 0, cliprect);
/* draw major objects */ /* draw major objects */
@ -84,7 +84,7 @@ VIDEO_UPDATE( destroyr )
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
{ {
if (i & 4) if (i & 4)
*BITMAP_ADDR16(bitmap, destroyr_cursor ^ 0xff, i) = machine->pens[7]; *BITMAP_ADDR16(bitmap, destroyr_cursor ^ 0xff, i) = 7;
} }
return 0; return 0;
} }

View File

@ -84,7 +84,7 @@ VIDEO_UPDATE(dietgo)
flip_screen_set( deco16_pf12_control[0]&0x80 ); flip_screen_set( deco16_pf12_control[0]&0x80 );
deco16_pf12_update(deco16_pf1_rowscroll,deco16_pf2_rowscroll); deco16_pf12_update(deco16_pf1_rowscroll,deco16_pf2_rowscroll);
fillbitmap(bitmap,machine->pens[256],cliprect); /* not verified */ fillbitmap(bitmap,256,cliprect); /* not verified */
deco16_tilemap_2_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE,0); deco16_tilemap_2_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE,0);
deco16_tilemap_1_draw(bitmap,cliprect,0,0); deco16_tilemap_1_draw(bitmap,cliprect,0,0);

View File

@ -812,15 +812,15 @@ static TIMER_CALLBACK( scanline_callback )
if ((counter < table_len) && (x == 4 * (table[counter|offset] & 0x7f))) if ((counter < table_len) && (x == 4 * (table[counter|offset] & 0x7f)))
{ {
if ( state->star_ff && (table[counter|offset] & 0x80) ) /* star */ if ( state->star_ff && (table[counter|offset] & 0x80) ) /* star */
*pixel = machine->pens[RADARSCP_STAR_COL]; *pixel = RADARSCP_STAR_COL;
else if (state->grid_sig && !(table[counter|offset] & 0x80)) /* radar */ else if (state->grid_sig && !(table[counter|offset] & 0x80)) /* radar */
*pixel = machine->pens[RADARSCP_GRID_COL_OFFSET+state->grid_col]; *pixel = RADARSCP_GRID_COL_OFFSET+state->grid_col;
else else
*pixel = machine->pens[RADARSCP_BCK_COL_OFFSET + state->blue_level]; *pixel = RADARSCP_BCK_COL_OFFSET + state->blue_level;
counter++; counter++;
} }
else else
*pixel = machine->pens[RADARSCP_BCK_COL_OFFSET + state->blue_level]; *pixel = RADARSCP_BCK_COL_OFFSET + state->blue_level;
x++; x++;
} }
while ((counter < table_len) && ( x < 4 * (table[counter|offset] & 0x7f))) while ((counter < table_len) && ( x < 4 * (table[counter|offset] & 0x7f)))

View File

@ -238,6 +238,6 @@ VIDEO_UPDATE( dogfgt )
draw_sprites(machine, bitmap, cliprect); draw_sprites(machine, bitmap, cliprect);
copybitmap_trans(bitmap,pixbitmap,0,0,0,0,cliprect,machine->pens[PIXMAP_COLOR_BASE + 8*pixcolor]); copybitmap_trans(bitmap,pixbitmap,0,0,0,0,cliprect,PIXMAP_COLOR_BASE + 8*pixcolor);
return 0; return 0;
} }

View File

@ -1072,7 +1072,7 @@ static int debug_mask(void)
I,O - Change palette (-,+) I,O - Change palette (-,+)
J,K & N,M - Change "tile" (-,+, slow & fast) J,K & N,M - Change "tile" (-,+, slow & fast)
R - move "tile" to the next 1/8th of the gfx */ R - move "tile" to the next 1/8th of the gfx */
static int debug_viewer(running_machine *machine, mame_bitmap *bitmap,const rectangle *cliprect) static int debug_viewer(mame_bitmap *bitmap,const rectangle *cliprect)
{ {
#ifdef MAME_DEBUG #ifdef MAME_DEBUG
static int toggle; static int toggle;
@ -1093,7 +1093,7 @@ static int debug_viewer(running_machine *machine, mame_bitmap *bitmap,const rect
dynax_blit_palettes = (c & 0xf) * 0x111; dynax_blit_palettes = (c & 0xf) * 0x111;
dynax_blit_palbank = (c >> 4) & 1; dynax_blit_palbank = (c >> 4) & 1;
fillbitmap(bitmap,machine->pens[0],cliprect); fillbitmap(bitmap,0,cliprect);
memset(dynax_pixmap[0][0],0,sizeof(UINT8)*0x100*0x100); memset(dynax_pixmap[0][0],0,sizeof(UINT8)*0x100*0x100);
if (layer_layout != LAYOUT_MJDIALQ2) if (layer_layout != LAYOUT_MJDIALQ2)
memset(dynax_pixmap[0][1],0,sizeof(UINT8)*0x100*0x100); memset(dynax_pixmap[0][1],0,sizeof(UINT8)*0x100*0x100);
@ -1116,12 +1116,12 @@ VIDEO_UPDATE( hanamai )
int layers_ctrl = ~dynax_layer_enable; int layers_ctrl = ~dynax_layer_enable;
int lay[4]; int lay[4];
if (debug_viewer(machine,bitmap,cliprect)) return 0; if (debug_viewer(bitmap,cliprect)) return 0;
layers_ctrl &= debug_mask(); layers_ctrl &= debug_mask();
fillbitmap( fillbitmap(
bitmap, bitmap,
machine->pens[(dynax_blit_backpen & 0xff) + (dynax_blit_palbank & 1) * 256], (dynax_blit_backpen & 0xff) + (dynax_blit_palbank & 1) * 256,
cliprect); cliprect);
/* bit 4 = display enable? */ /* bit 4 = display enable? */
@ -1152,12 +1152,12 @@ VIDEO_UPDATE( hnoridur )
int lay[4]; int lay[4];
int pri; int pri;
if (debug_viewer(machine,bitmap,cliprect)) return 0; if (debug_viewer(bitmap,cliprect)) return 0;
layers_ctrl &= debug_mask(); layers_ctrl &= debug_mask();
fillbitmap( fillbitmap(
bitmap, bitmap,
machine->pens[(dynax_blit_backpen & 0xff) + (dynax_blit_palbank & 0x0f) * 256], (dynax_blit_backpen & 0xff) + (dynax_blit_palbank & 0x0f) * 256,
cliprect); cliprect);
pri = hanamai_priority >> 4; pri = hanamai_priority >> 4;
@ -1187,12 +1187,12 @@ VIDEO_UPDATE( sprtmtch )
{ {
int layers_ctrl = ~dynax_layer_enable; int layers_ctrl = ~dynax_layer_enable;
if (debug_viewer(machine,bitmap,cliprect)) return 0; if (debug_viewer(bitmap,cliprect)) return 0;
layers_ctrl &= debug_mask(); layers_ctrl &= debug_mask();
fillbitmap( fillbitmap(
bitmap, bitmap,
machine->pens[(dynax_blit_backpen & 0xff) + (dynax_blit_palbank & 1) * 256], (dynax_blit_backpen & 0xff) + (dynax_blit_palbank & 1) * 256,
cliprect); cliprect);
if (layers_ctrl & 1) hanamai_copylayer( bitmap, cliprect, 0 ); if (layers_ctrl & 1) hanamai_copylayer( bitmap, cliprect, 0 );
@ -1206,12 +1206,12 @@ VIDEO_UPDATE( jantouki )
int layers_ctrl = dynax_layer_enable; int layers_ctrl = dynax_layer_enable;
if (debug_viewer(machine,bitmap,cliprect)) return 0; if (debug_viewer(bitmap,cliprect)) return 0;
layers_ctrl &= debug_mask(); layers_ctrl &= debug_mask();
fillbitmap( fillbitmap(
bitmap, bitmap,
machine->pens[(dynax_blit_backpen & 0xff) + (dynax_blit_palbank & 1) * 256], (dynax_blit_backpen & 0xff) + (dynax_blit_palbank & 1) * 256,
cliprect); cliprect);
if (screen==0) if (screen==0)
@ -1237,12 +1237,12 @@ VIDEO_UPDATE( mjdialq2 )
{ {
int layers_ctrl = ~dynax_layer_enable; int layers_ctrl = ~dynax_layer_enable;
if (debug_viewer(machine,bitmap,cliprect)) return 0; if (debug_viewer(bitmap,cliprect)) return 0;
layers_ctrl &= debug_mask(); layers_ctrl &= debug_mask();
fillbitmap( fillbitmap(
bitmap, bitmap,
machine->pens[(dynax_blit_backpen & 0xff) + (dynax_blit_palbank & 1) * 256], (dynax_blit_backpen & 0xff) + (dynax_blit_palbank & 1) * 256,
cliprect); cliprect);
if (layers_ctrl & 1) mjdialq2_copylayer( bitmap, cliprect, 0 ); if (layers_ctrl & 1) mjdialq2_copylayer( bitmap, cliprect, 0 );