Ejemplo n.º 1
0
static void robotbwl_draw_scoreboard( mame_bitmap *bitmap )
{
	int offs;

	/* The sync generator hardware is used to   */
	/* draw the bowling alley & scorecards      */

	for(offs=15;offs<=63;offs+=24)
	{
		draw_robot_box(bitmap, offs, 31);
		draw_robot_box(bitmap, offs, 63);
		draw_robot_box(bitmap, offs, 95);

		draw_robot_box(bitmap, offs+152, 31);
		draw_robot_box(bitmap, offs+152, 63);
		draw_robot_box(bitmap, offs+152, 95);
	}

	draw_robot_box(bitmap, 39, 127);                  /* 10th Frame */
	draw_line(bitmap, 39,137,47,137,0);          /* Extra digit box */

	draw_robot_box(bitmap, 39+152, 127);
	draw_line(bitmap, 39+152,137,47+152,137,0);
}
Ejemplo n.º 2
0
void robotbowl_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh)
{
	int offs;
	int sx,sy;

	if (full_refresh)
	{
		memset(dirtybuffer, 1, videoram_size);
	}

	/* for every character in the Video RAM,  */
	/* check if it has been modified since    */
	/* last time and update it accordingly.   */

	for (offs = videoram_size - 1;offs >= 0;offs--)
	{
		if (dirtybuffer[offs])
		{
			dirtybuffer[offs] = 0;

			sx = offs % 32;
			sy = offs / 32;

			drawgfx(bitmap,Machine->gfx[0],
					videoram[offs],
					0,
					0,0,
					8*sx,8*sy,
					&Machine->visible_area,TRANSPARENCY_NONE,0);
		}
	}

    /* The sync generator hardware is used to   */
    /* draw the bowling alley & scorecards      */

    /* Scoreboards */

    for(offs=15;offs<=63;offs+=24)
    {
        draw_robot_box(bitmap, offs, 31);
        draw_robot_box(bitmap, offs, 63);
        draw_robot_box(bitmap, offs, 95);

        draw_robot_box(bitmap, offs+152, 31);
        draw_robot_box(bitmap, offs+152, 63);
        draw_robot_box(bitmap, offs+152, 95);
    }

    draw_robot_box(bitmap, 39, 127);                  /* 10th Frame */
    draw_line(bitmap, 39,137,47,137,0);          /* Extra digit box */

    draw_robot_box(bitmap, 39+152, 127);
    draw_line(bitmap, 39+152,137,47+152,137,0);

    /* Bowling Alley */

    draw_line(bitmap, 103,17,103,205,0);
    draw_line(bitmap, 111,17,111,203,1);
    draw_line(bitmap, 152,17,152,205,0);
    draw_line(bitmap, 144,17,144,203,1);

	/* Draw the Ball */

	drawgfx(bitmap,Machine->gfx[1],
			clown_z,
			0,
			0,0,
			clown_y+8,clown_x+8, /* Y is horizontal position */
			&Machine->visible_area,TRANSPARENCY_PEN,0);

	/* mark tiles underneath as dirty */
	sx = clown_y >> 3;
	sy = clown_x >> 3;

	{
		int max_x = 2;
		int max_y = 2;
		int x2, y2;

		if (clown_y & 0x0f) max_x ++;
		if (clown_x & 0x0f) max_y ++;

		for (y2 = sy; y2 < sy + max_y; y2 ++)
		{
			for (x2 = sx; x2 < sx + max_x; x2 ++)
			{
				if ((x2 < 32) && (y2 < 32) && (x2 >= 0) && (y2 >= 0))
					dirtybuffer[x2 + 32*y2] = 1;
			}
		}
	}

}