machine->pens lookup removal

This commit is contained in:
Zsolt Vasvari 2008-02-22 03:45:50 +00:00
parent bc69380af9
commit 5fa2c2c76c
55 changed files with 155 additions and 201 deletions

View File

@ -325,7 +325,7 @@ if ( input_code_pressed(KEYCODE_Z) )
#endif
if (layers_ctrl & 1) tilemap_draw(bitmap,cliprect,esdtilemap_0,0,0);
else fillbitmap(bitmap,machine->pens[0],cliprect);
else fillbitmap(bitmap,0,cliprect);
if (layers_ctrl & 2) tilemap_draw(bitmap,cliprect,esdtilemap_1,0,1);
@ -353,7 +353,7 @@ if ( input_code_pressed(KEYCODE_Z) )
#endif
if (layers_ctrl & 1) tilemap_draw(bitmap,cliprect,esdtilemap_0,0,0);
else fillbitmap(bitmap,machine->pens[0],cliprect);
else fillbitmap(bitmap,0,cliprect);
if (layers_ctrl & 2)
{

View File

@ -222,9 +222,7 @@ VIDEO_UPDATE( exedexes )
tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
}
else
{
fillbitmap(bitmap, machine->pens[0], cliprect);
}
fillbitmap(bitmap, 0, cliprect);
draw_sprites(machine, bitmap, cliprect, 1);

View File

@ -286,7 +286,7 @@ static TIMER_CALLBACK( collide_firq_callback )
*
*************************************/
static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int scroll_offset)
static void draw_sprites(mame_bitmap *bitmap, const rectangle *cliprect, int scroll_offset)
{
int i;
@ -351,7 +351,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
{
/* combine with the background */
pen = left | old[0];
*BITMAP_ADDR16(bitmap, yoffs, currx) = machine->pens[pen];
*BITMAP_ADDR16(bitmap, yoffs, currx) = pen;
/* check the collisions bit */
if ((palette[2 * pen] & 0x80) && count++ < 128)
@ -364,7 +364,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
{
/* combine with the background */
pen = right | old[1];
*BITMAP_ADDR16(bitmap, yoffs, currx) = machine->pens[pen];
*BITMAP_ADDR16(bitmap, yoffs, currx) = pen;
/* check the collisions bit */
if ((palette[2 * pen] & 0x80) && count++ < 128)
@ -404,7 +404,7 @@ static void update_screen(running_machine *machine, mame_bitmap *bitmap, const r
}
/* draw the sprites */
draw_sprites(machine, bitmap, cliprect, scroll_offset);
draw_sprites(bitmap, cliprect, scroll_offset);
}

View File

@ -83,7 +83,7 @@ VIDEO_UPDATE( exzisus )
int gfx_num, gfx_attr, gfx_offs;
/* Is this correct ? */
fillbitmap(bitmap, machine->pens[1023], cliprect);
fillbitmap(bitmap, 1023, cliprect);
/* ---------- 1st TC0010VCU ---------- */
sx = 0;

View File

@ -137,7 +137,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap,const rec
VIDEO_UPDATE( fantland )
{
fillbitmap(bitmap,machine->pens[0],cliprect);
fillbitmap(bitmap,0,cliprect);
draw_sprites(machine,bitmap,cliprect);
return 0;

View File

@ -79,17 +79,11 @@ VIDEO_UPDATE( flyball )
/* draw ball */
for (y = bally; y < bally + 2; y++)
{
for (x = ballx; x < ballx + 2; x++)
{
if (x >= machine->screen[0].visarea.min_x &&
x <= machine->screen[0].visarea.max_x &&
y >= machine->screen[0].visarea.min_y &&
y <= machine->screen[0].visarea.max_y)
{
*BITMAP_ADDR16(bitmap, y, x) = machine->pens[1];
}
}
}
*BITMAP_ADDR16(bitmap, y, x) = 1;
return 0;
}

View File

@ -83,7 +83,7 @@ VIDEO_UPDATE( funkyjet )
flip_screen_set( deco16_pf12_control[0]&0x80 );
deco16_pf12_update(deco16_pf1_rowscroll,deco16_pf2_rowscroll);
fillbitmap(bitmap,machine->pens[768],cliprect);
fillbitmap(bitmap,768,cliprect);
deco16_tilemap_2_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE,0);
deco16_tilemap_1_draw(bitmap,cliprect,0,0);
draw_sprites(machine,bitmap,cliprect);

View File

@ -196,7 +196,7 @@ VIDEO_UPDATE( maniacsq )
tilemap_set_scrollx(pant[1], 0, gaelco_vregs[3]);
fillbitmap(priority_bitmap,0,cliprect);
fillbitmap( bitmap, machine->pens[0], cliprect );
fillbitmap( bitmap, 0, cliprect );
tilemap_draw(bitmap,cliprect,pant[1],3,0);
tilemap_draw(bitmap,cliprect,pant[0],3,0);
@ -223,7 +223,7 @@ VIDEO_UPDATE( bigkarnk )
tilemap_set_scrollx(pant[1], 0, gaelco_vregs[3]);
fillbitmap(priority_bitmap,0,cliprect);
fillbitmap( bitmap, machine->pens[0], cliprect );
fillbitmap( bitmap, 0, cliprect );
tilemap_draw(bitmap,cliprect,pant[1],TILEMAP_DRAW_LAYER1 | 3,0);
tilemap_draw(bitmap,cliprect,pant[0],TILEMAP_DRAW_LAYER1 | 3,0);

View File

@ -456,7 +456,7 @@ VIDEO_UPDATE( gaelco2 )
}
/* draw screen */
fillbitmap(bitmap, machine->pens[0], cliprect);
fillbitmap(bitmap, 0, cliprect);
tilemap_draw(bitmap, cliprect, pant[1], 0, 0);
tilemap_draw(bitmap, cliprect, pant[0], 0, 0);
@ -485,7 +485,7 @@ VIDEO_UPDATE( gaelco2_dual )
}
/* draw screen */
fillbitmap(bitmap, machine->pens[0], cliprect);
fillbitmap(bitmap, 0, cliprect);
if (screen==1)
{

View File

@ -1421,7 +1421,7 @@ static void galaxian_draw_bullets(running_machine *machine, mame_bitmap *bitmap,
/* yellow missile, white shells (this is the terminology on the schematics) */
color = ((offs == 7*4) ? BULLETS_COLOR_BASE : BULLETS_COLOR_BASE + 1);
*BITMAP_ADDR16(bitmap, y, x) = machine->pens[color];
*BITMAP_ADDR16(bitmap, y, x) = color;
}
}
}
@ -1441,7 +1441,7 @@ static void scramble_draw_bullets(running_machine *machine, mame_bitmap *bitmap,
x <= machine->screen[0].visarea.max_x)
{
/* yellow bullets */
*BITMAP_ADDR16(bitmap, y, x) = machine->pens[BULLETS_COLOR_BASE];
*BITMAP_ADDR16(bitmap, y, x) = BULLETS_COLOR_BASE;
}
}
@ -1454,7 +1454,7 @@ static void darkplnt_draw_bullets(running_machine *machine, mame_bitmap *bitmap,
if (x >= machine->screen[0].visarea.min_x &&
x <= machine->screen[0].visarea.max_x)
{
*BITMAP_ADDR16(bitmap, y, x) = machine->pens[32 + darkplnt_bullet_color];
*BITMAP_ADDR16(bitmap, y, x) = 32 + darkplnt_bullet_color;
}
}
@ -1471,7 +1471,7 @@ static void theend_draw_bullets(running_machine *machine, mame_bitmap *bitmap, i
if (x >= machine->screen[0].visarea.min_x &&
x <= machine->screen[0].visarea.max_x)
{
*BITMAP_ADDR16(bitmap, y, x) = machine->pens[BULLETS_COLOR_BASE];
*BITMAP_ADDR16(bitmap, y, x) = BULLETS_COLOR_BASE;
}
}
}
@ -1500,7 +1500,7 @@ static void dambustr_draw_bullets(running_machine *machine, mame_bitmap *bitmap,
if (x >= machine->screen[0].visarea.min_x &&
x <= machine->screen[0].visarea.max_x)
{
*BITMAP_ADDR16(bitmap, y, x) = machine->pens[color];
*BITMAP_ADDR16(bitmap, y, x) = color;
}
}
}
@ -1512,26 +1512,22 @@ static void dambustr_draw_bullets(running_machine *machine, mame_bitmap *bitmap,
static void galaxian_draw_background(running_machine *machine, mame_bitmap *bitmap)
{
/* plain black background */
fillbitmap(bitmap,machine->pens[0],&machine->screen[0].visarea);
fillbitmap(bitmap,0,&machine->screen[0].visarea);
}
static void scramble_draw_background(running_machine *machine, mame_bitmap *bitmap)
{
if (background_enable)
{
fillbitmap(bitmap,machine->pens[BACKGROUND_COLOR_BASE],&machine->screen[0].visarea);
}
fillbitmap(bitmap,BACKGROUND_COLOR_BASE,&machine->screen[0].visarea);
else
{
fillbitmap(bitmap,machine->pens[0],&machine->screen[0].visarea);
}
fillbitmap(bitmap,0,&machine->screen[0].visarea);
}
static void turtles_draw_background(running_machine *machine, mame_bitmap *bitmap)
{
int color = (background_blue << 2) | (background_green << 1) | background_red;
fillbitmap(bitmap,machine->pens[BACKGROUND_COLOR_BASE + color],&machine->screen[0].visarea);
fillbitmap(bitmap,BACKGROUND_COLOR_BASE + color,&machine->screen[0].visarea);
}
static void frogger_draw_background(running_machine *machine, mame_bitmap *bitmap)
@ -1539,13 +1535,13 @@ static void frogger_draw_background(running_machine *machine, mame_bitmap *bitma
/* color split point verified on real machine */
if (flipscreen_x)
{
plot_box(bitmap, 0, 0, 128, 256, machine->pens[0]);
plot_box(bitmap, 128, 0, 128, 256, machine->pens[BACKGROUND_COLOR_BASE]);
plot_box(bitmap, 0, 0, 128, 256, 0);
plot_box(bitmap, 128, 0, 128, 256, BACKGROUND_COLOR_BASE);
}
else
{
plot_box(bitmap, 0, 0, 128, 256, machine->pens[BACKGROUND_COLOR_BASE]);
plot_box(bitmap, 128, 0, 128, 256, machine->pens[0]);
plot_box(bitmap, 0, 0, 128, 256, BACKGROUND_COLOR_BASE);
plot_box(bitmap, 128, 0, 128, 256, 0);
}
}
@ -1576,15 +1572,11 @@ static void stratgyx_draw_background(running_machine *machine, mame_bitmap *bitm
if ((~prom[x] & 0x01) && background_blue) color |= 0x04;
if (flipscreen_x)
{
sx = 8 * (31 - x);
}
else
{
sx = 8 * x;
}
plot_box(bitmap, sx, 0, 8, 256, machine->pens[BACKGROUND_COLOR_BASE + color]);
plot_box(bitmap, sx, 0, 8, 256, BACKGROUND_COLOR_BASE + color);
}
}
@ -1596,21 +1588,15 @@ static void minefld_draw_background(running_machine *machine, mame_bitmap *bitma
for (x = 0; x < 128; x++)
{
plot_box(bitmap, x, 0, 1, 256, machine->pens[BACKGROUND_COLOR_BASE + x]);
}
plot_box(bitmap, x, 0, 1, 256, BACKGROUND_COLOR_BASE + x);
for (x = 0; x < 120; x++)
{
plot_box(bitmap, x + 128, 0, 1, 256, machine->pens[BACKGROUND_COLOR_BASE + x + 128]);
}
plot_box(bitmap, x + 128, 0, 1, 256, BACKGROUND_COLOR_BASE + x + 128);
plot_box(bitmap, 248, 0, 16, 256, machine->pens[BACKGROUND_COLOR_BASE]);
plot_box(bitmap, 248, 0, 16, 256, BACKGROUND_COLOR_BASE);
}
else
{
fillbitmap(bitmap,machine->pens[0],&machine->screen[0].visarea);
}
fillbitmap(bitmap,0,&machine->screen[0].visarea);
}
static void rescue_draw_background(running_machine *machine, mame_bitmap *bitmap)
@ -1619,23 +1605,16 @@ static void rescue_draw_background(running_machine *machine, mame_bitmap *bitmap
{
int x;
for (x = 0; x < 128; x++)
{
plot_box(bitmap, x, 0, 1, 256, machine->pens[BACKGROUND_COLOR_BASE + x]);
}
plot_box(bitmap, x, 0, 1, 256, BACKGROUND_COLOR_BASE + x);
for (x = 0; x < 120; x++)
{
plot_box(bitmap, x + 128, 0, 1, 256, machine->pens[BACKGROUND_COLOR_BASE + x + 8]);
}
plot_box(bitmap, x + 128, 0, 1, 256, BACKGROUND_COLOR_BASE + x + 8);
plot_box(bitmap, 248, 0, 16, 256, machine->pens[BACKGROUND_COLOR_BASE]);
plot_box(bitmap, 248, 0, 16, 256, BACKGROUND_COLOR_BASE);
}
else
{
fillbitmap(bitmap,machine->pens[0],&machine->screen[0].visarea);
}
fillbitmap(bitmap,0,&machine->screen[0].visarea);
}
static void mariner_draw_background(running_machine *machine, mame_bitmap *bitmap)
@ -1656,13 +1635,12 @@ static void mariner_draw_background(running_machine *machine, mame_bitmap *bitma
{
int color;
if (x == 0)
color = 0;
else
color = prom[0x20 + x - 1];
plot_box(bitmap, 8 * (31 - x), 0, 8, 256, machine->pens[BACKGROUND_COLOR_BASE + color]);
plot_box(bitmap, 8 * (31 - x), 0, 8, 256, BACKGROUND_COLOR_BASE + color);
}
}
else
@ -1671,13 +1649,12 @@ static void mariner_draw_background(running_machine *machine, mame_bitmap *bitma
{
int color;
if (x == 31)
color = 0;
else
color = prom[x + 1];
plot_box(bitmap, 8 * x, 0, 8, 256, machine->pens[BACKGROUND_COLOR_BASE + color]);
plot_box(bitmap, 8 * x, 0, 8, 256, BACKGROUND_COLOR_BASE + color);
}
}
}
@ -1689,13 +1666,13 @@ static void dambustr_draw_background(running_machine *machine, mame_bitmap *bitm
if (flip_screen_x)
{
plot_box(bitmap, 0, 0, 256-dambustr_bg_split_line, 256, machine->pens[col2]);
plot_box(bitmap, 256-dambustr_bg_split_line, 0, dambustr_bg_split_line, 256, machine->pens[col1]);
plot_box(bitmap, 0, 0, 256-dambustr_bg_split_line, 256, col2);
plot_box(bitmap, 256-dambustr_bg_split_line, 0, dambustr_bg_split_line, 256, col1);
}
else
{
plot_box(bitmap, 0, 0, 256-dambustr_bg_split_line, 256, machine->pens[col1]);
plot_box(bitmap, 256-dambustr_bg_split_line, 0, dambustr_bg_split_line, 256, machine->pens[col2]);
plot_box(bitmap, 0, 0, 256-dambustr_bg_split_line, 256, col1);
plot_box(bitmap, 256-dambustr_bg_split_line, 0, dambustr_bg_split_line, 256, col2);
}
}
@ -1807,15 +1784,12 @@ static void plot_star(running_machine *machine, mame_bitmap *bitmap, int x, int
if (flipscreen_x)
{
x = 255 - x;
}
if (flipscreen_y)
{
y = 255 - y;
}
*BITMAP_ADDR16(bitmap, y, x) = machine->pens[stars_colors_start + color];
if (flipscreen_y)
y = 255 - y;
*BITMAP_ADDR16(bitmap, y, x) = stars_colors_start + color;
}
static void noop_draw_stars(running_machine *machine, mame_bitmap *bitmap)

View File

@ -392,7 +392,7 @@ VIDEO_UPDATE( galivan )
tilemap_set_scrolly(bg_tilemap,0,scrolly[0] + 256 * (scrolly[1] & 0x07));
if (layers & 0x40)
fillbitmap(bitmap,machine->pens[0],cliprect);
fillbitmap(bitmap,0,cliprect);
else
tilemap_draw(bitmap,cliprect,bg_tilemap,0,0);
@ -416,7 +416,7 @@ VIDEO_UPDATE( ninjemak )
tilemap_set_scrolly(bg_tilemap,0,scrolly[0] + 256 * (scrolly[1] & 0xff));
if (ninjemak_dispdisable)
fillbitmap(bitmap,machine->pens[0],cliprect);
fillbitmap(bitmap,0,cliprect);
else
tilemap_draw(bitmap,cliprect,bg_tilemap,0,0);

View File

@ -164,7 +164,7 @@ if (input_code_pressed(KEYCODE_Z))
if (msk != 0) layers_ctrl &= msk; }
#endif
fillbitmap(bitmap,machine->pens[0],cliprect);
fillbitmap(bitmap,0,cliprect);
fillbitmap(priority_bitmap,0,cliprect);
if (layers_ctrl & 0x1)
@ -173,7 +173,7 @@ if (input_code_pressed(KEYCODE_Z))
int y = 0;
copyscrollbitmap_trans(bitmap, galpani2_bg15_bitmap,
1, &x, 1, &y,
cliprect,machine->pens[0x4200 + 0]);
cliprect,0x4200 + 0);
}
/* test mode:
@ -188,7 +188,7 @@ if (input_code_pressed(KEYCODE_Z))
int y = - ( *galpani2_bg8_0_scrolly + 0x200 - 0x1be );
copyscrollbitmap_trans(bitmap, galpani2_bg8_bitmap_0,
1, &x, 1, &y,
cliprect,machine->pens[0x4000 + 0]);
cliprect,0x4000 + 0);
}
if (layers_ctrl & 0x4)
@ -197,7 +197,7 @@ if (input_code_pressed(KEYCODE_Z))
int y = - ( *galpani2_bg8_1_scrolly + 0x200 - 0x1be );
copyscrollbitmap_trans(bitmap, galpani2_bg8_bitmap_1,
1, &x, 1, &y,
cliprect,machine->pens[0x4000 + 0]);
cliprect,0x4000 + 0);
}
if (layers_ctrl & 0x8) kaneko16_draw_sprites(machine, bitmap, cliprect);

View File

@ -86,7 +86,7 @@ static void comad_draw_sprites(running_machine *machine, mame_bitmap *bitmap, co
}
}
static void draw_fgbitmap(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
static void draw_fgbitmap(mame_bitmap *bitmap, const rectangle *cliprect)
{
int offs;
@ -98,7 +98,7 @@ static void draw_fgbitmap(running_machine *machine, mame_bitmap *bitmap, const r
sy = offs / 256;
color = galpanic_fgvideoram[offs];
if (color)
*BITMAP_ADDR16(bitmap, sy, sx) = machine->pens[color];
*BITMAP_ADDR16(bitmap, sy, sx) = color;
}
}
@ -107,7 +107,7 @@ VIDEO_UPDATE( galpanic )
/* copy the temporary bitmap to the screen */
copybitmap(bitmap,tmpbitmap,0,0,0,0,cliprect);
draw_fgbitmap(machine, bitmap, cliprect);
draw_fgbitmap(bitmap, cliprect);
pandora_update(machine,bitmap,cliprect);
@ -119,7 +119,7 @@ VIDEO_UPDATE( comad )
/* copy the temporary bitmap to the screen */
copybitmap(bitmap,tmpbitmap,0,0,0,0,cliprect);
draw_fgbitmap(machine,bitmap,cliprect);
draw_fgbitmap(bitmap,cliprect);
// if(galpanic_clear_sprites)

View File

@ -172,7 +172,7 @@ static void starfield_init(running_machine *machine)
if ( color && total_stars < MAX_STARS ) {
stars[total_stars].x = x;
stars[total_stars].y = y;
stars[total_stars].col = machine->pens[color];
stars[total_stars].col = color;
stars[total_stars].set = set++;
if ( set == 3 )
@ -322,7 +322,7 @@ VIDEO_UPDATE( gaplus )
/* flip screen control is embedded in RAM */
flip_screen_set(gaplus_spriteram[0x1f7f-0x800] & 1);
fillbitmap(bitmap, machine->pens[0], cliprect);
fillbitmap(bitmap, 0, cliprect);
starfield_render(machine, bitmap);

View File

@ -318,7 +318,7 @@ VIDEO_UPDATE( gcpinbal )
}
fillbitmap(priority_bitmap,0,cliprect);
fillbitmap(bitmap, machine->pens[0], cliprect);
fillbitmap(bitmap, 0, cliprect);
layer[0] = 0;
layer[1] = 1;

View File

@ -280,7 +280,7 @@ if (input_code_pressed(KEYCODE_Z))
if (layers_ctrl1 & 1) tilemap_draw(bitmap,cliprect, bg_tilemap, 0,0);
else fillbitmap(bitmap,machine->pens[0],cliprect);
else fillbitmap(bitmap,0,cliprect);
if (layers_ctrl1 & 2) tilemap_draw(bitmap,cliprect, fg_tilemap, 0,0);
if (layers_ctrl1 & 8) draw_sprites(machine, bitmap,cliprect);

View File

@ -203,19 +203,14 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
VIDEO_UPDATE( gottlieb )
{
if (!background_priority)
{
tilemap_draw(bitmap, cliprect, bg_tilemap, TILEMAP_DRAW_OPAQUE, 0);
}
else
{
fillbitmap(bitmap, machine->pens[0], cliprect);
}
fillbitmap(bitmap, 0, cliprect);
draw_sprites(machine, bitmap, cliprect);
if (background_priority)
{
tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
}
return 0;
}

View File

@ -240,7 +240,7 @@ VIDEO_UPDATE( groundfx )
pivlayer[2] = 2;
fillbitmap(priority_bitmap,0,cliprect);
fillbitmap(bitmap,machine->pens[0],cliprect); /* wrong color? */
fillbitmap(bitmap,0,cliprect); /* wrong color? */
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,pivlayer[0],0,0);
TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,pivlayer[1],0,0);

View File

@ -635,7 +635,7 @@ VIDEO_UPDATE( hyprduel )
/* The background color is selected by a register */
fillbitmap(priority_bitmap,0,cliprect);
fillbitmap(bitmap,machine->pens[((hyprduel_videoregs[0x12/2] & 0x0fff) ^ 0x0ff) + 0x1000],cliprect);
fillbitmap(bitmap,((hyprduel_videoregs[0x12/2] & 0x0fff) ^ 0x0ff) + 0x1000,cliprect);
/* Screen Control Register:

View File

@ -278,7 +278,7 @@ VIDEO_START( berlwall )
if ((r & 0x10) && (b & 0x10))
g = (g - 1) & 0x1f; /* decrease with wraparound */
*BITMAP_ADDR16(kaneko16_bg15_bitmap, y, sx * 256 + x) = machine->pens[2048 + ((g << 10) | (r << 5) | b)];
*BITMAP_ADDR16(kaneko16_bg15_bitmap, y, sx * 256 + x) = 2048 + ((g << 10) | (r << 5) | b);
}
VIDEO_START_CALL(kaneko16_1xVIEW2);
@ -395,7 +395,7 @@ static void kaneko16_draw_sprites_custom(running_machine *machine, mame_bitmap *
UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,
const rectangle *clip,int priority)
{
const pen_t *pal = &machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)];
pen_t pen_base = gfx->color_base + gfx->color_granularity * (color % gfx->total_colors);
UINT8 *source_base = gfx->gfxdata + (code % gfx->total_elements) * gfx->char_modulo;
int sprite_screen_height = ((1<<16)*gfx->height+0x8000)>>16;
@ -477,7 +477,7 @@ static void kaneko16_draw_sprites_custom(running_machine *machine, mame_bitmap *
if( c != 0 )
{
if (pri[x] < priority)
dest[x] = pal[c];
dest[x] = pen_base + c;
pri[x] = 0xff; // mark it "already drawn"
}
x_index += dx;
@ -909,7 +909,7 @@ static void kaneko16_render_sprites(running_machine *machine, mame_bitmap *bitma
}
else
{
fillbitmap(sprites_bitmap,machine->pens[0],cliprect);
fillbitmap(sprites_bitmap,0,cliprect);
kaneko16_draw_sprites(machine,bitmap,cliprect);
}
}
@ -937,12 +937,12 @@ static void kaneko16_render_15bpp_bitmap(running_machine *machine, mame_bitmap *
static void kaneko16_fill_bitmap(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
{
if(kaneko16_sprite_type == 1)
fillbitmap(bitmap,machine->pens[0x7f00],cliprect);
fillbitmap(bitmap,0x7f00,cliprect);
else
/* Fill the bitmap with pen 0. This is wrong, but will work most of
the times. To do it right, each pixel should be drawn with pen 0
of the bottomost tile that covers it (which is pretty tricky to do) */
fillbitmap(bitmap,machine->pens[0],cliprect);
fillbitmap(bitmap,0,cliprect);
}
static VIDEO_UPDATE( common )
@ -1006,7 +1006,7 @@ VIDEO_UPDATE( galsnew )
{
UINT16 dat = (galsnew_fg_pixram[count] & 0xfffe)>>1;
dat+=2048;
dest[x] = machine->pens[dat];
dest[x] = dat;
count++;
}
}
@ -1021,9 +1021,8 @@ VIDEO_UPDATE( galsnew )
UINT16 dat = (galsnew_bg_pixram[count]);
//dat &=0x3ff;
if (dat)
{
dest[x] = machine->pens[dat];
}
dest[x] = dat;
count++;
}
}

View File

@ -107,7 +107,7 @@ VIDEO_START(ksayakyu)
VIDEO_UPDATE(ksayakyu)
{
fillbitmap(bitmap,machine->pens[0],cliprect);
fillbitmap(bitmap,0,cliprect);
if(video_ctrl&1)
tilemap_draw(bitmap,cliprect,ksayakyu_tilemap,0,0);
draw_sprites(machine,bitmap,cliprect);

View File

@ -17,7 +17,7 @@ UINT8 sraider_grid_color;
void redclash_set_stars_enable( UINT8 on );
void redclash_update_stars_state(void);
void redclash_set_stars_speed( UINT8 speed );
void redclash_draw_stars(const pen_t *pens, mame_bitmap *bitmap, const rectangle *cliprect, UINT8 palette_offset, UINT8 sraider, UINT8 firstx, UINT8 lastx);
void redclash_draw_stars(mame_bitmap *bitmap, const rectangle *cliprect, UINT8 palette_offset, UINT8 sraider, UINT8 firstx, UINT8 lastx);
static tilemap *bg_tilemap;
static tilemap *grid_tilemap;
@ -363,7 +363,7 @@ VIDEO_UPDATE( ladybug )
int offs;
// clear the bg bitmap
fillbitmap(bitmap,machine->pens[0],cliprect);
fillbitmap(bitmap,0,cliprect);
for (offs = 0; offs < 32; offs++)
{
@ -406,13 +406,13 @@ VIDEO_UPDATE( sraider )
}
// clear the bg bitmap
fillbitmap(bitmap,machine->pens[0],cliprect);
fillbitmap(bitmap,0,cliprect);
// draw the stars
if (flip_screen)
redclash_draw_stars(machine->pens,bitmap,cliprect,0x60,1,0x27,0xff);
redclash_draw_stars(bitmap,cliprect,0x60,1,0x27,0xff);
else
redclash_draw_stars(machine->pens,bitmap,cliprect,0x60,1,0x00,0xd8);
redclash_draw_stars(bitmap,cliprect,0x60,1,0x00,0xd8);
// draw the gridlines
colortable_palette_set_color(machine->colortable, 0x40, MAKE_RGB(sraider_grid_color & 0x40 ? 0xff : 0,
@ -431,7 +431,7 @@ VIDEO_UPDATE( sraider )
if (flip_screen)
x = ~x;
plot_box(bitmap, x, cliprect->min_y, 1, height, machine->pens[0x81]);
plot_box(bitmap, x, cliprect->min_y, 1, height, 0x81);
}
}

View File

@ -340,10 +340,10 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
}
static void draw_lasso(const pen_t *pens, mame_bitmap *bitmap, const rectangle *cliprect)
static void draw_lasso(mame_bitmap *bitmap, const rectangle *cliprect)
{
offs_t offs;
pen_t pen = pens[0x3f];
pen_t pen = 0x3f;
for (offs = 0; offs < 0x2000; offs++)
{
@ -383,10 +383,10 @@ static void draw_lasso(const pen_t *pens, mame_bitmap *bitmap, const rectangle *
VIDEO_UPDATE( lasso )
{
palette_set_color(machine, 0, get_color(*lasso_back_color));
fillbitmap(bitmap, machine->pens[0], cliprect);
fillbitmap(bitmap, 0, cliprect);
tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
draw_lasso(machine->pens, bitmap, cliprect);
draw_lasso(bitmap, cliprect);
draw_sprites(machine, bitmap, cliprect, 0);
return 0;
@ -395,7 +395,7 @@ VIDEO_UPDATE( lasso )
VIDEO_UPDATE( chameleo )
{
palette_set_color(machine, 0, get_color(*lasso_back_color));
fillbitmap(bitmap, machine->pens[0], cliprect);
fillbitmap(bitmap, 0, cliprect);
tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
draw_sprites(machine, bitmap, cliprect, 0);

View File

@ -367,7 +367,7 @@ VIDEO_UPDATE( prosoccr )
tilemap_set_scrollx(background_tilemap,0,-deco16_io_ram[0]);
if (background_disable)
fillbitmap(bitmap,machine->pens[32],cliprect);
fillbitmap(bitmap,32,cliprect);
else
tilemap_draw(bitmap,cliprect,background_tilemap,0,0);
boomrang_draw_sprites(machine,bitmap,cliprect,0);
@ -379,7 +379,7 @@ VIDEO_UPDATE( prosport )
{
int mx,my,tile,color,offs;
fillbitmap(bitmap,machine->pens[0],cliprect);
fillbitmap(bitmap,0,cliprect);
prosport_draw_sprites(machine,bitmap,cliprect);
@ -407,7 +407,7 @@ VIDEO_UPDATE( boomrang )
tilemap_set_scrollx(background_tilemap,0,-deco16_io_ram[0]);
if (background_disable)
fillbitmap(bitmap,machine->pens[32],cliprect);
fillbitmap(bitmap,32,cliprect);
else
tilemap_draw(bitmap,cliprect,background_tilemap,TILEMAP_DRAW_LAYER1,0);
@ -425,7 +425,7 @@ VIDEO_UPDATE( liberate )
tilemap_set_scrollx(background_tilemap,0,-deco16_io_ram[0]);
if (background_disable)
fillbitmap(bitmap,machine->pens[32],cliprect);
fillbitmap(bitmap,32,cliprect);
else
tilemap_draw(bitmap,cliprect,background_tilemap,0,0);

View File

@ -294,7 +294,7 @@ if (input_code_pressed(KEYCODE_Z))
tilemap_set_scrollx( tilemap_3, 0, *lordgun_scroll_x_3 );
tilemap_set_scrolly( tilemap_3, 0, *lordgun_scroll_y_3 );
fillbitmap( bitmap, machine->pens[0], cliprect );
fillbitmap( bitmap, 0, cliprect );
if (layers_ctrl & 4) tilemap_draw(bitmap, cliprect, tilemap_2, 0, 0);
if (layers_ctrl & 1) tilemap_draw(bitmap, cliprect, tilemap_0, 0, 0);

View File

@ -201,7 +201,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
VIDEO_UPDATE( lsasquad )
{
fillbitmap(bitmap,machine->pens[511],cliprect);
fillbitmap(bitmap,511,cliprect);
draw_layer(machine,bitmap,cliprect,lsasquad_scrollram + 0x000);
draw_layer(machine,bitmap,cliprect,lsasquad_scrollram + 0x080);
@ -213,7 +213,7 @@ VIDEO_UPDATE( lsasquad )
VIDEO_UPDATE( daikaiju )
{
fillbitmap(bitmap,machine->pens[511],cliprect);
fillbitmap(bitmap,511,cliprect);
drawbg(machine,bitmap,cliprect,0); // bottom
draw_sprites(machine,bitmap,cliprect);
drawbg(machine,bitmap,cliprect,1); // top = pallete $d ?

View File

@ -138,7 +138,7 @@ VIDEO_UPDATE( m10 )
static const int xpos[4] = { 4*8, 26*8, 7*8, 6*8};
int i;
fillbitmap(bitmap,machine->pens[0],cliprect);
fillbitmap(bitmap,0,cliprect);
decodegfx(back_gfx, state->chargen,0,4);
for (i=0;i<4;i++)

View File

@ -281,7 +281,7 @@ static void m107_screenrefresh(running_machine *machine, mame_bitmap *bitmap, co
tilemap_draw(bitmap, cliprect, pf_layer[3].tmap, 1, 0);
}
else
fillbitmap(bitmap, machine->pens[0], cliprect);
fillbitmap(bitmap, 0, cliprect);
tilemap_draw(bitmap, cliprect, pf_layer[2].tmap, 0, 0);
tilemap_draw(bitmap, cliprect, pf_layer[2].tmap, 1, 0);

View File

@ -345,7 +345,7 @@ static void draw_background(running_machine *machine, mame_bitmap *bitmap, const
rect.max_y = ypos + 2 * BGHEIGHT - 1;
}
fillbitmap(bitmap, machine->pens[machine->gfx[image]->color_base + 3], &rect);
fillbitmap(bitmap, machine->gfx[image]->color_base + 3, &rect);
}

View File

@ -228,7 +228,7 @@ VIDEO_UPDATE( m90 )
fillbitmap(priority_bitmap,0,cliprect);
if (!pf2_enable)
fillbitmap(bitmap,machine->pens[0],cliprect);
fillbitmap(bitmap,0,cliprect);
if (pf2_enable)
{

View File

@ -441,7 +441,7 @@ static void m92_screenrefresh(running_machine *machine, mame_bitmap *bitmap,cons
tilemap_draw(bitmap, cliprect, pf_layer[2].tmap, TILEMAP_DRAW_LAYER0, 1);
}
else
fillbitmap(bitmap, machine->pens[0], cliprect);
fillbitmap(bitmap, 0, cliprect);
tilemap_draw(bitmap, cliprect, pf_layer[1].wide_tmap, TILEMAP_DRAW_LAYER1, 0);
tilemap_draw(bitmap, cliprect, pf_layer[1].tmap, TILEMAP_DRAW_LAYER1, 0);

View File

@ -284,7 +284,7 @@ static VIDEO_UPDATE( madalien )
// mode 3 - transition from A to B
int scroll_mode = *madalien_scroll & 3;
fillbitmap(bitmap, machine->pens[0], cliprect);
fillbitmap(bitmap, 0, cliprect);
draw_edges(bitmap, cliprect, flip_screen, scroll_mode);
draw_foreground(machine, bitmap, cliprect, flip_screen);

View File

@ -98,7 +98,7 @@ VIDEO_UPDATE( magmax )
/* copy the background graphics */
if (*magmax_vreg & 0x40) /* background disable */
fillbitmap(bitmap, machine->pens[0], cliprect);
fillbitmap(bitmap, 0, cliprect);
else
{
int v;

View File

@ -237,10 +237,10 @@ VIDEO_UPDATE( malzak )
int pixel1 = *BITMAP_ADDR8(s2636_1_bitmap, y, x);
if (S2636_IS_PIXEL_DRAWN(pixel0))
*BITMAP_ADDR16(bitmap, y, x) = machine->pens[S2636_PIXEL_COLOR(pixel0)];
*BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel0);
if (S2636_IS_PIXEL_DRAWN(pixel1))
*BITMAP_ADDR16(bitmap, y, x) = machine->pens[S2636_PIXEL_COLOR(pixel1)];
*BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel1);
}
}
}

View File

@ -1001,7 +1001,7 @@ VIDEO_UPDATE( megasys1 )
if (flag != 0)
{
flag = 0;
fillbitmap(bitmap,machine->pens[0],cliprect);
fillbitmap(bitmap,0,cliprect);
}
if (megasys1_sprite_flag & 0x100) /* sprites are split */

View File

@ -237,7 +237,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap,const rec
VIDEO_UPDATE( metlclsh )
{
fillbitmap(bitmap,machine->pens[0x10],cliprect);
fillbitmap(bitmap,0x10,cliprect);
tilemap_draw(bitmap,cliprect,fg_tilemap,1,0); // low priority tiles of foreground
if (metlclsh_scrollx[0] & 0x08) // background (if enabled)

View File

@ -873,7 +873,7 @@ VIDEO_UPDATE( metro )
/* The background color is selected by a register */
fillbitmap(priority_bitmap,0,cliprect);
fillbitmap(bitmap,machine->pens[((metro_videoregs[0x12/2] & 0x0fff) ^ 0x0ff) + 0x1000],cliprect);
fillbitmap(bitmap,((metro_videoregs[0x12/2] & 0x0fff) ^ 0x0ff) + 0x1000,cliprect);
/* Screen Control Register:

View File

@ -32,7 +32,7 @@ VIDEO_UPDATE( mexico86 )
/* the background character columns is stored inthe area dd00-dd3f */
/* This clears & redraws the entire screen each pass */
fillbitmap(bitmap,machine->pens[255],&machine->screen[0].visarea);
fillbitmap(bitmap,255,&machine->screen[0].visarea);
sx = 0;
/* the score display seems to be outside of the main objectram. */
@ -113,7 +113,7 @@ VIDEO_UPDATE( kikikai )
/* the background character columns is stored inthe area dd00-dd3f */
/* This clears & redraws the entire screen each pass */
fillbitmap(bitmap,machine->pens[255],&machine->screen[0].visarea);
fillbitmap(bitmap,255,&machine->screen[0].visarea);
sx = 0;
/* the score display seems to be outside of the main objectram. */

View File

@ -281,7 +281,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap,const rec
VIDEO_UPDATE( pang )
{
fillbitmap(bitmap,machine->pens[0],cliprect);
fillbitmap(bitmap,0,cliprect);
tilemap_draw(bitmap,cliprect,bg_tilemap,0,0);
draw_sprites(machine, bitmap,cliprect);
return 0;

View File

@ -97,10 +97,8 @@ VIDEO_UPDATE( mjsister )
if (mjsister_video_enable)
{
for (i=0; i<256; i++)
{
for (j=0; j<4; j++)
*BITMAP_ADDR16(bitmap, i, 256+j) = machine->pens[mjsister_colorbank * 0x20];
}
*BITMAP_ADDR16(bitmap, i, 256+j) = mjsister_colorbank * 0x20;
copybitmap (bitmap,mjsister_tmpbitmap0,f,f,0,0,cliprect);
copybitmap_trans(bitmap,mjsister_tmpbitmap1,f,f,2,0,cliprect,0);

View File

@ -69,7 +69,7 @@ WRITE8_HANDLER( momoko_flipscreen_w )
}
/****************************************************************************/
static void momoko_draw_bg_pri(running_machine *machine, mame_bitmap *bitmap, int chr, int col, int flipx, int flipy, int x,int y, int pri)
static void momoko_draw_bg_pri(mame_bitmap *bitmap, int chr, int col, int flipx, int flipy, int x,int y, int pri)
{
int xx,sx,sy,px,py,dot;
UINT32 gfxadr;
@ -91,7 +91,7 @@ static void momoko_draw_bg_pri(running_machine *machine, mame_bitmap *bitmap, in
else py=7-sy + y;
if (dot>=pri)
*BITMAP_ADDR16(bitmap, py, px) = machine->pens[col*16+dot+256];
*BITMAP_ADDR16(bitmap, py, px) = col*16+dot+256;
d0 = d0 << 1;
d1 = d1 << 1;
}
@ -152,7 +152,7 @@ VIDEO_UPDATE( momoko )
}
}
else
fillbitmap(bitmap, machine->pens[256], 0);
fillbitmap(bitmap, 256, 0);
/* draw sprites (momoko) */
@ -213,7 +213,7 @@ VIDEO_UPDATE( momoko )
{
col = col & 0x0f;
chr = chr + momoko_bg_select * 512;
momoko_draw_bg_pri(machine, bitmap,chr,col,flip,flip,px,py,pri);
momoko_draw_bg_pri(bitmap,chr,col,flip,flip,px,py,pri);
}
}
}

View File

@ -245,7 +245,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap,const rec
VIDEO_UPDATE( mrdo )
{
fillbitmap(bitmap,machine->pens[0],cliprect);
fillbitmap(bitmap,0,cliprect);
tilemap_draw(bitmap,cliprect,bg_tilemap,0,0);
tilemap_draw(bitmap,cliprect,fg_tilemap,0,0);
draw_sprites(machine,bitmap,cliprect);

View File

@ -488,7 +488,7 @@ VIDEO_UPDATE( ms32 )
/* TODO: 0 is correct for gametngk, but break f1superb scrolling grid (text at
top and bottom of the screen becomes black on black) */
fillbitmap(bitmap,machine->pens[0],cliprect); /* bg color */
fillbitmap(bitmap,0,cliprect); /* bg color */
/* priority hack, we really need to figure out what priority ram is I think */

View File

@ -259,7 +259,7 @@ static void pdraw_masked_tile(running_machine *machine,
int bShadow )
{
const gfx_element *gfx,*mask;
const pen_t *paldata;
pen_t pen_base;
UINT8 *gfx_addr;
int gfx_pitch;
UINT8 *mask_addr;
@ -278,7 +278,7 @@ static void pdraw_masked_tile(running_machine *machine,
mask = machine->gfx[1];
code %= gfx->total_elements;
color %= gfx->total_colors;
paldata = &machine->pens[gfx->color_base + gfx->color_granularity * color];
pen_base = gfx->color_base + gfx->color_granularity * color;
gfx_addr = gfx->gfxdata + code * gfx->char_modulo;
gfx_pitch = gfx->line_modulo;
mask_addr = mask->gfxdata + code * mask->char_modulo;
@ -355,7 +355,7 @@ static void pdraw_masked_tile(running_machine *machine,
{ /* sprite pixel is opaque */
if( priority>=pri[-x] )
{
dest[-x] = paldata[gfx_addr[x]];
dest[-x] = pen_base + gfx_addr[x];
}
pri[-x] = 0xff;
}
@ -372,7 +372,7 @@ static void pdraw_masked_tile(running_machine *machine,
{ /* sprite pixel is opaque */
if( priority>=pri[x] )
{
dest[x] = paldata[gfx_addr[x]];
dest[x] = pen_base + gfx_addr[x];
}
pri[x] = 0xff;
}
@ -397,7 +397,7 @@ static void pdraw_opaque_tile(running_machine *machine,
int bShadow )
{
const gfx_element *gfx;
const pen_t *paldata;
pen_t pen_base;
UINT8 *gfx_addr;
int gfx_pitch;
int x,y;
@ -413,7 +413,7 @@ static void pdraw_opaque_tile(running_machine *machine,
gfx = machine->gfx[0];
code %= gfx->total_elements;
color %= gfx->total_colors;
paldata = &machine->pens[gfx->color_base + gfx->color_granularity * color];
pen_base = gfx->color_base + gfx->color_granularity * color;
gfx_addr = gfx->gfxdata + code * gfx->char_modulo;
gfx_pitch = gfx->line_modulo;
@ -433,7 +433,7 @@ static void pdraw_opaque_tile(running_machine *machine,
{
if( priority>=pri[-x] )
{
dest[-x] = paldata[gfx_addr[x]];
dest[-x] = pen_base + gfx_addr[x];
}
pri[-x] = 0xff;
}
@ -447,7 +447,7 @@ static void pdraw_opaque_tile(running_machine *machine,
{
if( priority>=pri[x] )
{
dest[x] = paldata[gfx_addr[x]];
dest[x] = pen_base + gfx_addr[x];
}
pri[x] = 0xff;
} /* next x */

View File

@ -138,10 +138,10 @@ VIDEO_START( namcos1 )
/* all palette entries are not affected by shadow sprites... */
for (i = 0;i < 0x2000;i++)
machine->shadow_table[machine->pens[i]] = machine->pens[i];
machine->shadow_table[i] = i;
/* ... except for tilemap colors */
for (i = 0x0800;i < 0x1000;i++)
machine->shadow_table[machine->pens[i]] = machine->pens[i + 0x0800];
machine->shadow_table[i] = i + 0x0800;
spriteram = &namcos1_spriteram[0x800];

View File

@ -360,7 +360,7 @@ VIDEO_UPDATE( namcos86 )
fillbitmap(priority_bitmap, 0, cliprect);
fillbitmap(bitmap,machine->pens[machine->gfx[0]->color_base + 8*backcolor+7],cliprect);
fillbitmap(bitmap,machine->gfx[0]->color_base + 8*backcolor+7,cliprect);
for (layer = 0;layer < 8;layer++)
{

View File

@ -701,9 +701,8 @@ VIDEO_UPDATE( mbmj8688 )
copybitmap(bitmap, mjsikaku_tmpbitmap, 0, 0, 0, scrolly - 256, cliprect);
}
else
{
fillbitmap(bitmap, machine->pens[0], 0);
}
fillbitmap(bitmap, 0, 0);
return 0;
}

View File

@ -555,13 +555,13 @@ VIDEO_UPDATE( nbmj8891 )
if (gfxdraw_mode)
{
copyscrollbitmap (bitmap, nbmj8891_tmpbitmap0, 0, 0, 0, 0, cliprect);
copyscrollbitmap_trans(bitmap, nbmj8891_tmpbitmap1, 0, 0, 1, &scrolly, cliprect, machine->pens[0xff]);
copyscrollbitmap_trans(bitmap, nbmj8891_tmpbitmap1, 0, 0, 1, &scrolly, cliprect, 0xff);
}
else
copyscrollbitmap(bitmap, nbmj8891_tmpbitmap0, 0, 0, 1, &scrolly, cliprect);
}
else
fillbitmap(bitmap, machine->pens[0xff], 0);
fillbitmap(bitmap, 0xff, 0);
return 0;
}

View File

@ -338,7 +338,7 @@ VIDEO_UPDATE( nbmj8991_type1 )
copyscrollbitmap(bitmap, nbmj8991_tmpbitmap, 1, &scrollx, 1, &scrolly, cliprect);
}
else
fillbitmap(bitmap, machine->pens[0x00], 0);
fillbitmap(bitmap, 0, 0);
return 0;
}
@ -378,7 +378,7 @@ VIDEO_UPDATE( nbmj8991_type2 )
copyscrollbitmap(bitmap, nbmj8991_tmpbitmap, 1, &scrollx, 1, &scrolly, cliprect);
}
else
fillbitmap(bitmap, machine->pens[0x00], 0);
fillbitmap(bitmap, 0, 0);
return 0;
}

View File

@ -504,17 +504,17 @@ VIDEO_UPDATE( nbmj9195 )
// nbmj9195 1layer
copyscrollbitmap(bitmap, nbmj9195_tmpbitmap[0], SCANLINE_MAX, nbmj9195_scrollx_raster[0], 1, &scrolly[0], cliprect);
else
fillbitmap(bitmap, machine->pens[0x0ff], 0);
fillbitmap(bitmap, 0x0ff, 0);
if (nbmj9195_dispflag[1])
{
if (gfxdraw_mode == 1)
// nbmj9195 2layer
copyscrollbitmap_trans(bitmap, nbmj9195_tmpbitmap[1], SCANLINE_MAX, nbmj9195_scrollx_raster[1], 1, &scrolly[1], cliprect, machine->pens[0x0ff]);
copyscrollbitmap_trans(bitmap, nbmj9195_tmpbitmap[1], SCANLINE_MAX, nbmj9195_scrollx_raster[1], 1, &scrolly[1], cliprect, 0x0ff);
if (gfxdraw_mode == 2)
// nbmj9195 nb22090 2layer
copyscrollbitmap_trans(bitmap, nbmj9195_tmpbitmap[1], SCANLINE_MAX, nbmj9195_scrollx_raster[1], 1, &scrolly[1], cliprect, machine->pens[0x1ff]);
copyscrollbitmap_trans(bitmap, nbmj9195_tmpbitmap[1], SCANLINE_MAX, nbmj9195_scrollx_raster[1], 1, &scrolly[1], cliprect, 0x1ff);
}
return 0;
}

View File

@ -388,7 +388,7 @@ VIDEO_UPDATE( nemesis )
update_gfx(machine);
fillbitmap(priority_bitmap,0,cliprect);
fillbitmap(bitmap,machine->pens[0],cliprect);
fillbitmap(bitmap,0,cliprect);
tilemap_set_scrolly( background, 0, (nemesis_yscroll[0x180] & 0xff) );
@ -417,7 +417,7 @@ VIDEO_UPDATE( salamand )
update_gfx(machine);
fillbitmap(priority_bitmap,0,cliprect);
fillbitmap(bitmap,machine->pens[0],cliprect);
fillbitmap(bitmap,0,cliprect);
clip.min_x = 0;
clip.max_x = 255;

View File

@ -464,7 +464,7 @@ static void erase_sprites(running_machine* const machine, mame_bitmap* const bit
VIDEO_UPDATE( ninjakd2 )
{
fillbitmap(bitmap, machine->pens[0], cliprect);
fillbitmap(bitmap, 0, cliprect);
tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
@ -477,7 +477,7 @@ VIDEO_UPDATE( ninjakd2 )
VIDEO_UPDATE( robokid )
{
fillbitmap(bitmap, machine->pens[0], cliprect);
fillbitmap(bitmap, 0, cliprect);
tilemap_draw(bitmap, cliprect, bg0_tilemap, 0, 0);
@ -494,7 +494,7 @@ VIDEO_UPDATE( robokid )
VIDEO_UPDATE( omegaf )
{
fillbitmap(bitmap, machine->pens[0], cliprect);
fillbitmap(bitmap, 0, cliprect);
tilemap_draw(bitmap, cliprect, bg0_tilemap, 0, 0);

View File

@ -36,27 +36,24 @@ static TILE_GET_INFO( get_bg_tile_info )
VIDEO_START( nitedrvr )
{
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
8, 8, 32, 32);
bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
}
static void draw_box(running_machine *machine, mame_bitmap *bitmap, int bx, int by, int ex, int ey )
static void draw_box(mame_bitmap *bitmap, int bx, int by, int ex, int ey )
{
int x, y;
for (y = by; y < ey; y++)
{
for (x = bx; x < ex; x++)
{
if ((y < 256) && (x < 256))
*BITMAP_ADDR16(bitmap, y, x) = machine->pens[1];
}
*BITMAP_ADDR16(bitmap, y, x) = 1;
}
return;
}
static void draw_roadway(running_machine *machine, mame_bitmap *bitmap)
static void draw_roadway(mame_bitmap *bitmap)
{
int roadway;
@ -69,13 +66,13 @@ static void draw_roadway(running_machine *machine, mame_bitmap *bitmap)
ex = bx + ((nitedrvr_hvc[roadway + 32] & 0xf0) >> 4);
ey = by + (16 - (nitedrvr_hvc[roadway + 32] & 0x0f));
draw_box(machine, bitmap, bx, by, ex, ey);
draw_box(bitmap, bx, by, ex, ey);
}
}
VIDEO_UPDATE( nitedrvr )
{
tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
draw_roadway(machine, bitmap);
draw_roadway(bitmap);
return 0;
}

View File

@ -436,13 +436,13 @@ VIDEO_UPDATE( niyanpai )
if (niyanpai_dispflag[0])
copyscrollbitmap(bitmap, niyanpai_tmpbitmap[0], 1, &scrollx[0], 1, &scrolly[0], cliprect);
else
fillbitmap(bitmap, machine->pens[0x00ff], 0);
fillbitmap(bitmap, 0x00ff, 0);
if (niyanpai_dispflag[1])
copyscrollbitmap_trans(bitmap, niyanpai_tmpbitmap[1], 1, &scrollx[1], 1, &scrolly[1], cliprect, machine->pens[0x01ff]);
copyscrollbitmap_trans(bitmap, niyanpai_tmpbitmap[1], 1, &scrollx[1], 1, &scrolly[1], cliprect, 0x01ff);
if (niyanpai_dispflag[2])
copyscrollbitmap_trans(bitmap, niyanpai_tmpbitmap[2], 1, &scrollx[2], 1, &scrolly[2], cliprect, machine->pens[0x02ff]);
copyscrollbitmap_trans(bitmap, niyanpai_tmpbitmap[2], 1, &scrollx[2], 1, &scrolly[2], cliprect, 0x02ff);
return 0;
}

View File

@ -260,7 +260,7 @@ popmessage("unknown sprite size 0");
}
}
static void draw_bullets(const pen_t *pens, mame_bitmap *bitmap, const rectangle *cliprect )
static void draw_bullets(mame_bitmap *bitmap, const rectangle *cliprect )
{
int offs;
@ -277,7 +277,7 @@ static void draw_bullets(const pen_t *pens, mame_bitmap *bitmap, const rectangle
if (sx >= cliprect->min_x && sx <= cliprect->max_x &&
sy >= cliprect->min_y && sy <= cliprect->max_y)
*BITMAP_ADDR16(bitmap, sy, sx) = pens[0x19];
*BITMAP_ADDR16(bitmap, sy, sx) = 0x19;
}
}
@ -357,7 +357,7 @@ void redclash_set_stars_speed( UINT8 speed )
/* Space Raider doesn't use the Va bit, and it is also set up to */
/* window the stars to a certain x range */
void redclash_draw_stars(const pen_t *pens, mame_bitmap *bitmap, const rectangle *cliprect, UINT8 palette_offset, UINT8 sraider, UINT8 firstx, UINT8 lastx)
void redclash_draw_stars(mame_bitmap *bitmap, const rectangle *cliprect, UINT8 palette_offset, UINT8 sraider, UINT8 firstx, UINT8 lastx)
{
int i;
UINT8 tempbit, feedback, star_color, xloc, yloc;
@ -403,7 +403,7 @@ void redclash_draw_stars(const pen_t *pens, mame_bitmap *bitmap, const rectangle
if ((xloc>=firstx) && (xloc<=lastx))
{
star_color = (state >> 9) & 0x1f;
*BITMAP_ADDR16(bitmap, yloc, xloc) = pens[palette_offset+star_color];
*BITMAP_ADDR16(bitmap, yloc, xloc) = palette_offset+star_color;
}
}
}
@ -422,9 +422,9 @@ VIDEO_EOF( redclash )
VIDEO_UPDATE( redclash )
{
fillbitmap(bitmap, get_black_pen(machine), cliprect);
redclash_draw_stars(machine->pens, bitmap, cliprect, 0x60, 0, 0x00, 0xff);
redclash_draw_stars(bitmap, cliprect, 0x60, 0, 0x00, 0xff);
draw_sprites(machine, bitmap, cliprect);
draw_bullets(machine->pens, bitmap, cliprect);
draw_bullets(bitmap, cliprect);
tilemap_draw(bitmap, cliprect, fg_tilemap, 0, 0);
return 0;
}