当前位置: 首页>>代码示例>>C++>>正文


C++ drawgfx_opaque函数代码示例

本文整理汇总了C++中drawgfx_opaque函数的典型用法代码示例。如果您正苦于以下问题:C++ drawgfx_opaque函数的具体用法?C++ drawgfx_opaque怎么用?C++ drawgfx_opaque使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了drawgfx_opaque函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: drawgfx_opaque

UINT32 pv1000_state::screen_update_pv1000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	int x, y;

	bitmap.fill(m_border_col); // TODO: might be either black or colored by this register

	for ( y = 0; y < 24; y++ )
	{
		for ( x = 2; x < 30; x++ ) // left-right most columns are definitely masked by the border color
		{
			UINT16 tile = m_p_videoram[ y * 32 + x ];

			if ( tile < 0xe0 || m_force_pattern )
			{
				tile += ( m_pcg_bank << 8);
				drawgfx_opaque( bitmap, cliprect, machine().gfx[0], tile, 0, 0, 0, x*8, y*8 );
			}
			else
			{
				tile -= 0xe0;
				drawgfx_opaque( bitmap, cliprect, machine().gfx[1], tile, 0, 0, 0, x*8, y*8 );
			}
		}
	}

	return 0;
}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:27,代码来源:pv1000.c

示例2: drawgfx_opaque

UINT32 pv1000_state::screen_update_pv1000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	int x, y;

	for ( y = 0; y < 24; y++ )
	{
		for ( x = 0; x < 32; x++ )
		{
			UINT16 tile = m_p_videoram[ y * 32 + x ];

			if ( tile < 0xe0 )
			{
				tile += ( m_io_regs[7] * 8 );
				drawgfx_opaque( bitmap, cliprect, machine().gfx[0], tile, 0, 0, 0, x*8, y*8 );
			}
			else
			{
				tile -= 0xe0;
				drawgfx_opaque( bitmap, cliprect, machine().gfx[1], tile, 0, 0, 0, x*8, y*8 );
			}
		}
	}

	return 0;
}
开发者ID:coinhelper,项目名称:jsmess,代码行数:25,代码来源:pv1000.c

示例3: draw_background

static void draw_background( running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect )
{
	karnov_state *state = (karnov_state *)machine->driver_data;
	int my, mx, offs, color, tile, fx, fy;
	int scrollx = state->scroll[0];
	int scrolly = state->scroll[1];

	if (state->flipscreen)
		fx = fy = 1;
	else
		fx = fy = 0;

	mx = -1;
	my = 0;

	for (offs = 0; offs < 0x400; offs ++)
	{
		mx++;
		if (mx == 32)
		{
			mx=0;
			my++;
		}

		tile = state->pf_data[offs];
		color = tile >> 12;
		tile = tile & 0x7ff;
		if (state->flipscreen)
			drawgfx_opaque(state->bitmap_f, 0, machine->gfx[1],tile,
				color, fx, fy, 496-16*mx,496-16*my);
		else
			drawgfx_opaque(state->bitmap_f, 0, machine->gfx[1],tile,
				color, fx, fy, 16*mx,16*my);
	}

	if (!state->flipscreen)
	{
		scrolly = -scrolly;
		scrollx = -scrollx;
	}
	else
	{
		scrolly = scrolly + 256;
		scrollx = scrollx + 256;
	}

	copyscrollbitmap(bitmap, state->bitmap_f, 1, &scrollx, 1, &scrolly, cliprect);
}
开发者ID:hstampfl,项目名称:mame2010-libretro,代码行数:48,代码来源:karnov.c

示例4: draw_background

static void draw_background( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
{
	karnov_state *state = machine.driver_data<karnov_state>();
	int my, mx, offs, color, tile, fx, fy;
	int scrollx = state->m_scroll[0];
	int scrolly = state->m_scroll[1];

	if (state->m_flipscreen)
		fx = fy = 1;
	else
		fx = fy = 0;

	mx = -1;
	my = 0;

	for (offs = 0; offs < 0x400; offs ++)
	{
		mx++;
		if (mx == 32)
		{
			mx=0;
			my++;
		}

		tile = state->m_pf_data[offs];
		color = tile >> 12;
		tile = tile & 0x7ff;
		if (state->m_flipscreen)
			drawgfx_opaque(*state->m_bitmap_f, state->m_bitmap_f->cliprect(), machine.gfx[1],tile,
				color, fx, fy, 496-16*mx,496-16*my);
		else
			drawgfx_opaque(*state->m_bitmap_f, state->m_bitmap_f->cliprect(), machine.gfx[1],tile,
				color, fx, fy, 16*mx,16*my);
	}

	if (!state->m_flipscreen)
	{
		scrolly = -scrolly;
		scrollx = -scrollx;
	}
	else
	{
		scrolly = scrolly + 256;
		scrollx = scrollx + 256;
	}

	copyscrollbitmap(bitmap, *state->m_bitmap_f, 1, &scrollx, 1, &scrolly, cliprect);
}
开发者ID:j4y4r,项目名称:j4ymame,代码行数:48,代码来源:karnov.c

示例5: drawgfx_opaque

UINT32 poker72_state::screen_update_poker72(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	int x,y,count;

	count = 0;

	for (y=0;y<32;y++)
	{
		for (x=0;x<64;x++)
		{
			int tile = ((m_vram[count+1] & 0x0f) << 8 ) | (m_vram[count+0] & 0xff); //TODO: tile bank
			int fx = (m_vram[count+1] & 0x10);
			int fy = (m_vram[count+1] & 0x20);
			int color = (m_vram[count+1] & 0xc0) >> 6;

			tile|= m_tile_bank << 12;

			drawgfx_opaque(bitmap,cliprect,machine().gfx[0],tile,color,fx,fy,x*8,y*8);

			count+=2;
		}
	}

	return 0;
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:25,代码来源:poker72.c

示例6: SCREEN_UPDATE

static SCREEN_UPDATE(ti99_2)
{
	ti99_2_state *state = screen->machine().driver_data<ti99_2_state>();
	UINT8 *videoram = state->m_videoram;
	int i, sx, sy;


	sx = sy = 0;

	for (i = 0; i < 768; i++)
	{
		/* Is the char code masked or not ??? */
		drawgfx_opaque(bitmap, cliprect, screen->machine().gfx[0], videoram[i] & 0x7F, 0,
			0, 0, sx, sy);

		sx += 8;
		if (sx == 256)
		{
			sx = 0;
			sy += 8;
		}
	}

	return 0;
}
开发者ID:poliva,项目名称:mame-rr,代码行数:25,代码来源:ti99_2.c

示例7: draw_background

static void draw_background( running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect )
{
	mrflea_state *state = machine.driver_data<mrflea_state>();
	const UINT8 *source = state->m_videoram;
	const gfx_element *gfx = machine.gfx[1];
	int sx, sy;
	int base = 0;

	if (BIT(state->m_gfx_bank, 2))
		base |= 0x400;

	if (BIT(state->m_gfx_bank, 4))
		base |= 0x200;

	for (sy = 0; sy < 256; sy += 8)
	{
		for (sx = 0; sx < 256; sx += 8)
		{
			int tile_number = base + source[0] + source[0x400] * 0x100;
			source++;
			drawgfx_opaque( bitmap, cliprect,
				gfx,
				tile_number,
				0, /* color */
				0,0, /* no flip */
				sx,sy );
		}
	}
}
开发者ID:kkalmaz,项目名称:psmame,代码行数:29,代码来源:mrflea.c

示例8: SCREEN_UPDATE_IND16

static SCREEN_UPDATE_IND16(poker72)
{
	poker72_state *state = screen.machine().driver_data<poker72_state>();
	int x,y,count;

	count = 0;

	for (y=0;y<32;y++)
	{
		for (x=0;x<64;x++)
		{
			int tile = ((state->m_vram[count+1] & 0x0f) << 8 ) | (state->m_vram[count+0] & 0xff); //TODO: tile bank
			int fx = (state->m_vram[count+1] & 0x10);
			int fy = (state->m_vram[count+1] & 0x20);
			int color = (state->m_vram[count+1] & 0xc0) >> 6;

			tile|= state->m_tile_bank << 12;

			drawgfx_opaque(bitmap,cliprect,screen.machine().gfx[0],tile,color,fx,fy,x*8,y*8);

			count+=2;
		}
	}

	return 0;
}
开发者ID:risico,项目名称:jsmess,代码行数:26,代码来源:poker72.c

示例9: draw_status

static void draw_status(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
{
	const gfx_element *gfx = machine->gfx[0];
	int row;

	for( row=0; row<4; row++ )
	{
		int sy,sx = (row&1)*8;
		const UINT8 *source = mnchmobl_status_vram + (~row&1)*32;
		if( row<=1 )
		{
			source+=2*32;
			sx+=256+32+16;
		}
		for( sy=0; sy<256; sy+=8 )
		{
			drawgfx_opaque( bitmap, cliprect,
				gfx,
				*source++,
				0, /* color */
				0,0, /* no flip */
				sx,sy );
		}
	}
}
开发者ID:Paulodx,项目名称:sdl-mame-wii,代码行数:25,代码来源:munchmo.c

示例10: draw_bg

static void draw_bg(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
{
	int offs;
	int scroll[256];

	for (offs = 0;offs < 0x400;offs++)
	{
		int code = videoram[0x400+offs];

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

		if (flip_screen_x_get(machine)) sx = 31 - sx;
		if (flip_screen_y_get(machine)) sy = 31 - sy;

		drawgfx_opaque(tmpbitmap1,NULL,machine->gfx[0],
				code,
				2,
				flip_screen_x_get(machine),flip_screen_y_get(machine),
				8*sx,8*sy);
	}

	/* first copy to a temp bitmap doing column scroll */
	for (offs = 0;offs < 256;offs++)
		scroll[offs] = -buggychl_scrollv[offs/8];

	copyscrollbitmap(tmpbitmap2,tmpbitmap1,1,&bg_scrollx,256,scroll,NULL);

	/* then copy to the screen doing row scroll */
	for (offs = 0;offs < 256;offs++)
		scroll[offs] = -buggychl_scrollh[offs];

	copyscrollbitmap_trans(bitmap,tmpbitmap2,256,scroll,0,0,cliprect,32);
}
开发者ID:Paulodx,项目名称:sdl-mame-wii,代码行数:34,代码来源:buggychl.c

示例11: SCREEN_UPDATE_IND16

static SCREEN_UPDATE_IND16(hitpoker)
{
	hitpoker_state *state = screen.machine().driver_data<hitpoker_state>();
	int count = 0;
	int y,x;

	bitmap.fill(0, cliprect);

	for (y=0;y<31;y++)
	{
		for (x=0;x<81;x++) //it's probably 80 + 1 global line attribute at the start of each line
		{
			int tile,color,gfx_bpp;

			tile = (((state->m_videoram[count]<<8)|(state->m_videoram[count+1])) & 0x3fff);
			gfx_bpp = (state->m_colorram[count] & 0x80)>>7; //flag between 4 and 8 bpp
			color = gfx_bpp ? ((state->m_colorram[count] & 0x70)>>4) : (state->m_colorram[count] & 0xf);

			drawgfx_opaque(bitmap,cliprect,screen.machine().gfx[gfx_bpp],tile,color,0,0,x*8,y*8);

			count+=2;
		}
	}

	return 0;
}
开发者ID:j4y4r,项目名称:j4ymame,代码行数:26,代码来源:hitpoker.c

示例12: WRITE32_HANDLER

/* this looks like an exotic I/O-based tilemap / sprite blitter, very unusual from Sega... */
static WRITE32_HANDLER( sysh1_txt_blit_w )
{
	coolridr_state *state = space->machine().driver_data<coolridr_state>();

	COMBINE_DATA(&state->m_sysh1_txt_blit[offset]);

	switch(offset)
	{
		case 0x10/4: //state->m_cmd + state->m_param?
			state->m_cmd = (state->m_sysh1_txt_blit[offset] & 0xffff0000) >> 16;
			state->m_param = (state->m_sysh1_txt_blit[offset] & 0x0000ffff) >> 0;
			state->m_dst_addr = 0x3f40000;
			state->m_txt_index = 0;
			state->m_attr_index = 0;
			break;
		case 0x14/4: //data
			/*  "THIS MACHINE IS STAND-ALONE." / disclaimer written with this CMD */
			if((state->m_cmd & 0xff) == 0xf4)
			{
				state->m_txt_buff[state->m_txt_index++] = data;

				//printf("CMD = %04x PARAM = %04x | %c%c%c%c\n",state->m_cmd,state->m_param,(data >> 24) & 0xff,(data >> 16) & 0xff,(data >> 8) & 0xff,(data >> 0) & 0xff);
			}
			else if((state->m_cmd & 0xff) == 0x90 || (state->m_cmd & 0xff) == 0x30)
			{
				state->m_attr_buff[state->m_attr_index++] = data;

				if(state->m_attr_index == 0xa)
				{
					UINT16 x,y;

					y = (state->m_attr_buff[9] & 0x01f00000) >> 20;
					x = (state->m_attr_buff[9] & 0x1f0) >> 4;
					state->m_dst_addr = 0x3f40000 | y*0x40 | x;

					{
						int x2,y2;
						const gfx_element *gfx = space->machine().gfx[1];
						rectangle clip;

						y2 = (state->m_attr_buff[9] & 0x01ff0000) >> 16;
						x2 = (state->m_attr_buff[9] & 0x000001ff);
						clip = state->m_temp_bitmap_sprites.cliprect();

						drawgfx_opaque(state->m_temp_bitmap_sprites,clip,gfx,1,1,0,0,x2,y2);
					}
				}
				if(state->m_attr_index == 0xc)
				{
					UINT8 size;

					size = (state->m_attr_buff[6] / 4)+1;
					for(state->m_txt_index = 0;state->m_txt_index < size; state->m_txt_index++)
					{
						space->write_dword((state->m_dst_addr),state->m_txt_buff[state->m_txt_index]);
						state->m_dst_addr+=4;
					}
				}
			}
开发者ID:LibXenonProject,项目名称:mame-lx,代码行数:60,代码来源:coolridr.c

示例13: VIDEO_START_MEMBER

VIDEO_START_MEMBER(madalien_state,madalien)
{
	int i;

	static const tilemap_mapper_delegate scan_functions[4] =
	{
		tilemap_mapper_delegate(FUNC(madalien_state::scan_mode0),this),
		tilemap_mapper_delegate(FUNC(madalien_state::scan_mode1),this),
		tilemap_mapper_delegate(FUNC(madalien_state::scan_mode2),this),
		tilemap_mapper_delegate(FUNC(madalien_state::scan_mode3),this)
	};

	static const int tilemap_cols[4] =
	{
		16, 16, 32, 32
	};

	m_tilemap_fg = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(madalien_state::get_tile_info_FG),this), TILEMAP_SCAN_COLS_FLIP_X, 8, 8, 32, 32);
	m_tilemap_fg->set_transparent_pen(0);
	m_tilemap_fg->set_scrolldx(0, 0x50);
	m_tilemap_fg->set_scrolldy(0, 0x20);

	for (i = 0; i < 4; i++)
	{
		m_tilemap_edge1[i] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(madalien_state::get_tile_info_BG_1),this), scan_functions[i], 16, 16, tilemap_cols[i], 8);
		m_tilemap_edge1[i]->set_scrolldx(0, 0x50);
		m_tilemap_edge1[i]->set_scrolldy(0, 0x20);

		m_tilemap_edge2[i] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(madalien_state::get_tile_info_BG_2),this), scan_functions[i], 16, 16, tilemap_cols[i], 8);
		m_tilemap_edge2[i]->set_scrolldx(0, 0x50);
		m_tilemap_edge2[i]->set_scrolldy(0, machine().primary_screen->height() - 256);
	}

	m_headlight_bitmap = auto_bitmap_ind16_alloc(machine(), 128, 128);

	machine().gfx[0]->set_source(m_charram);

	drawgfx_opaque(*m_headlight_bitmap, m_headlight_bitmap->cliprect(), machine().gfx[2], 0, 0, 0, 0, 0x00, 0x00);
	drawgfx_opaque(*m_headlight_bitmap, m_headlight_bitmap->cliprect(), machine().gfx[2], 0, 0, 0, 1, 0x00, 0x40);
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:40,代码来源:madalien.c

示例14: SCREEN_UPDATE_IND16

static SCREEN_UPDATE_IND16(kongambl)
{
	#if CUSTOM_DRAW
	kongambl_state *state = screen.machine().driver_data<kongambl_state>();
	const gfx_element *gfx = screen.machine().gfx[0];
	UINT32 count;

	count = 0;

	for (int y=0;y<64;y++)
	{
		for (int x=0;x<128;x++)
		{
			UINT32 tile = state->m_vram[count] & 0xffff;

			if(screen.machine().primary_screen->visible_area().contains(x*8, y*8))
				drawgfx_opaque(bitmap,cliprect,gfx,tile,0,0,0,x*8,y*8);

			count++;
		}
	}

	count = 0x8000/4;

	for (int y=0;y<64;y++)
	{
		for (int x=0;x<128;x++)
		{
			UINT32 tile = state->m_vram[count] & 0xffff;

			if(screen.machine().primary_screen->visible_area().contains(x*8, y*8))
				drawgfx_transpen(bitmap,cliprect,gfx,tile,0,0,0,x*8,y*8,0);

			count++;
		}
	}


	#else
	device_t *k056832 = screen.machine().device("k056832");

	bitmap.fill(0, cliprect);
	screen.machine().priority_bitmap.fill(0, cliprect);

	k056832_tilemap_draw(k056832, bitmap, cliprect, 3, 0, 0);
	k056832_tilemap_draw(k056832, bitmap, cliprect, 2, 0, 0);
	k056832_tilemap_draw(k056832, bitmap, cliprect, 1, 0, 0);
	k056832_tilemap_draw(k056832, bitmap, cliprect, 0, 0, 0);
	#endif
	return 0;
}
开发者ID:kleopatra999,项目名称:mess-svn,代码行数:51,代码来源:tasman.c

示例15: drawgfx_opaque

UINT32 nascom1_state::screen_update_nascom2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	UINT8 *videoram = m_videoram;
	int sy, sx;

	for (sx = 0; sx < 48; sx++)
	{
		drawgfx_opaque (bitmap, cliprect,
			machine().gfx[0], videoram[0x03ca + sx],
			1, 0, 0, sx * 8, 0);
	}

	for (sy = 0; sy < 15; sy++)
	{
		for (sx = 0; sx < 48; sx++)
		{
			drawgfx_opaque (bitmap, cliprect,
				machine().gfx[0], videoram[0x000a + (sy * 64) + sx],
				1, 0, 0, sx * 8, (sy + 1) * 14);
		}
	}
	return 0;
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:23,代码来源:nascom1.c


注:本文中的drawgfx_opaque函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。