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


C++ palette_set_color_rgb函数代码示例

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


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

示例1: coinmstr_set_pal

static void coinmstr_set_pal(running_machine &machine, UINT32 paldat, int col)
{
	col = col *4;

	{
		int r0, r1, r2, r3;
		int g0, g1, g2, g3;
		int b0, b1, b2, b3;

		r0 = (paldat & 0x1000) >> 12 ;
		g0 = (paldat & 0x0800) >> 11 ;
		b0 = (paldat & 0x0400) >> 10 ;
		r1 = (paldat & 0x0200) >> 9 ;
		g1 = (paldat & 0x0100) >> 8 ;
		b1 = (paldat & 0x0080) >> 7 ;

		r2 = (paldat & 0x0020) >> 5 ;
		g2 = (paldat & 0x0010) >> 4 ;
		b2 = (paldat & 0x0008) >> 3 ;
		r3 = (paldat & 0x0004) >> 2 ;
		g3 = (paldat & 0x0002) >> 1 ;
		b3 = (paldat & 0x0001) >> 0 ;


		palette_set_color_rgb(machine, col+0, (b0 * 255) << 5, (g0 * 255) << 5, (r0 * 255) << 5);
		palette_set_color_rgb(machine, col+2, (b1 * 255) << 5, (g1 * 255) << 5, (r1 * 255) << 5);
		palette_set_color_rgb(machine, col+1, (b2 * 255) << 5, (g2 * 255) << 5, (r2 * 255) << 5);
		palette_set_color_rgb(machine, col+3, (b3 * 255) << 5, (g3 * 255) << 5, (r3 * 255) << 5);

	}
}
开发者ID:antervud,项目名称:MAMEHub,代码行数:31,代码来源:coinmstr.c

示例2: WRITE32_HANDLER

static WRITE32_HANDLER( paletteram32_xRRRRRGGGGGBBBBB_dword_w )
{
	if(ACCESSING_BITS_16_31)
	{
		int r,g,b;
		COMBINE_DATA(&paletteram32[offset]);

		r = (paletteram32[offset] & 0x7c000000) >> (10+16);
		g = (paletteram32[offset] & 0x03e00000) >> (5+16);
		b = (paletteram32[offset] & 0x001f0000) >> (0+16);

		palette_set_color_rgb(space->machine,offset*2,pal5bit(r),pal5bit(g),pal5bit(b));
	}

	if(ACCESSING_BITS_0_15)
	{
		int r,g,b;
		COMBINE_DATA(&paletteram32[offset]);

		r = (paletteram32[offset] & 0x00007c00) >> (10);
		g = (paletteram32[offset] & 0x000003e0) >> (5);
		b = (paletteram32[offset] & 0x0000001f) >> (0);

		palette_set_color_rgb(space->machine,offset*2+1,pal5bit(r),pal5bit(g),pal5bit(b));
	}
}
开发者ID:Paulodx,项目名称:sdl-mame-wii,代码行数:26,代码来源:fuukifg3.c

示例3: PALETTE_INIT_MEMBER

GFXDECODE_END

PALETTE_INIT_MEMBER( cdc721_state, cdc721 )
{
	palette_set_color_rgb( machine(), 0, 0, 0, 0 ); /* Black */
	palette_set_color_rgb( machine(), 1, 0, 255, 0 );   /* Full */
	palette_set_color_rgb( machine(), 2, 0, 128, 0 );   /* Dimmed */
}
开发者ID:antervud,项目名称:MAMEHub,代码行数:8,代码来源:cdc721.c

示例4: palette_set_color

GFXDECODE_END

void vta2000_state::palette_init()
{
	palette_set_color(machine(), 0, RGB_BLACK); // black
	palette_set_color_rgb(machine(), 1, 0x00, 0xc0, 0x00); // green
	palette_set_color_rgb(machine(), 2, 0x00, 0xff, 0x00); // highlight
}
开发者ID:coinhelper,项目名称:jsmess,代码行数:8,代码来源:vta2000.c

示例5: palette_set_color_rgb

INPUT_PORTS_END


void osbexec_state::palette_init()
{
	palette_set_color_rgb( machine(), 0, 0, 0, 0 ); /* Black */
	palette_set_color_rgb( machine(), 1, 0, 255, 0 );   /* Full */
	palette_set_color_rgb( machine(), 2, 0, 128, 0 );   /* Dimmed */
}
开发者ID:thomas41546,项目名称:mame4raspi,代码行数:9,代码来源:osbexec.c

示例6: PALETTE_INIT

INPUT_PORTS_END

/* Video */

static PALETTE_INIT( mm1 )
{
	palette_set_color(machine, 0, RGB_BLACK); /* black */
	palette_set_color_rgb(machine, 1, 0x00, 0xc0, 0x00); /* green */
	palette_set_color_rgb(machine, 2, 0x00, 0xff, 0x00); /* bright green */
}
开发者ID:rogerjowett,项目名称:ClientServerMAME,代码行数:10,代码来源:mikromik.c

示例7: PALETTE_INIT

//  PORT_START( "KO14" )
INPUT_PORTS_END


static PALETTE_INIT( cfx9850 )
{
	palette_set_color_rgb( machine, 0, 0xff, 0xff, 0xff );
	palette_set_color_rgb( machine, 1, 0x00, 0x00, 0xff );
	palette_set_color_rgb( machine, 2, 0x00, 0xff, 0x00 );
	palette_set_color_rgb( machine, 3, 0xff, 0x00, 0x00 );
}
开发者ID:cdenix,项目名称:psmame,代码行数:11,代码来源:cfx9850.c

示例8: palette_set_color_rgb

INPUT_PORTS_END

/***************************************************************************
    VIDEO
***************************************************************************/

void px8_state::palette_init()
{
	palette_set_color_rgb(machine(), 0, 0xa5, 0xad, 0xa5);
	palette_set_color_rgb(machine(), 1, 0x31, 0x39, 0x10);
}
开发者ID:antervud,项目名称:MAMEHub,代码行数:11,代码来源:px8.c

示例9: palette_set_color_rgb

void wangpc_tig_device::device_start()
{
	// initialize palette
	palette_set_color_rgb(machine(), 0, 0, 0, 0);
	palette_set_color_rgb(machine(), 1, 0, 0x80, 0);
	palette_set_color_rgb(machine(), 2, 0, 0xff, 0);

	// state saving
	save_item(NAME(m_option));
	save_item(NAME(m_attr));
	save_item(NAME(m_underline));
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:12,代码来源:wangpc_tig.c

示例10: PALETTE_INIT

static PALETTE_INIT( c128 )
{
	int i;

	for (i = 0; i < sizeof(vic2_palette) / 3; i++)
	{
		palette_set_color_rgb(machine, i, vic2_palette[i * 3], vic2_palette[i * 3 + 1], vic2_palette[i * 3 + 2]);
	}

	for (i = 0; i < sizeof(vdc8563_palette) / 3; i++)
	{
		palette_set_color_rgb(machine, i + sizeof(vic2_palette) / 3, vdc8563_palette[i * 3], vdc8563_palette[i * 3 + 1], vdc8563_palette[i * 3 + 2]);
	}
}
开发者ID:cdenix,项目名称:psmame,代码行数:14,代码来源:c128.c

示例11: set_isa_device

void isa8_pc1640_iga_device::device_start()
{
	astring tempstring;

	set_isa_device();

	for (int i = 0; i < 64; i++ )
	{
		UINT8 r = ( ( i & 0x04 ) ? 0xAA : 0x00 ) + ( ( i & 0x20 ) ? 0x55 : 0x00 );
		UINT8 g = ( ( i & 0x02 ) ? 0xAA : 0x00 ) + ( ( i & 0x10 ) ? 0x55 : 0x00 );
		UINT8 b = ( ( i & 0x01 ) ? 0xAA : 0x00 ) + ( ( i & 0x08 ) ? 0x55 : 0x00 );

		palette_set_color_rgb( machine(), i, r, g, b );
	}

	/* Install 256KB Video ram on our EGA card */
	m_vram = machine().memory().region_alloc(subtag(tempstring,"vram"), 256*1024, 1, ENDIANNESS_LITTLE);

	m_videoram = m_vram->base();
	m_plane[0] = m_videoram + 0x00000;
	memset(m_plane[0], 0, sizeof(UINT8) * 0x10000);
	m_plane[1] = m_videoram + 0x10000;
	memset(m_plane[1], 0, sizeof(UINT8) * 0x10000);
	m_plane[2] = m_videoram + 0x20000;
	memset(m_plane[2], 0, sizeof(UINT8) * 0x10000);
	m_plane[3] = m_videoram + 0x30000;
	memset(m_plane[3], 0, sizeof(UINT8) * 0x10000);

	m_crtc_ega = subdevice<crtc_ega_device>(EGA_CRTC_NAME);

	m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "ega", "iga");
	m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_w), this));
	m_isa->install_device(0x3c0, 0x3cf, 0, 0, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_w), this));
	m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3d0_w), this));
}
开发者ID:antervud,项目名称:MAMEHub,代码行数:35,代码来源:isa_pc1640_iga.c

示例12: memset

void ibm_vga_device::device_reset()
{
	m_misc_out_reg = 0;
	m_feature_ctrl = 0;

	m_seq_idx = 0;
	memset(m_seq_data,0xff,0x1f);

	m_attr_idx = 0;
	memset(m_attr_data,0xff,0x1f);
	m_attr_state = 0;

	m_gc_idx = 0;
	memset(m_gc_data,0xff,0x1f);

	m_dac_mask = 0;
	m_dac_write_idx = 0;
	m_dac_read_idx = 0;
	m_dac_read = 0;
	m_dac_state = 0;
	memset(m_dac_color,0,sizeof(m_dac_color));

	for (int i = 0; i < 0x100; i++)
		palette_set_color_rgb(machine(), i, 0, 0, 0);
}
开发者ID:poliva,项目名称:mame-rr,代码行数:25,代码来源:ibm_vga.c

示例13: palette_set_color_rgb

void ssrj_state::palette_init()
{
	int i, j;
	for(i=0; i<4*4; i++)
		for(j=0; j<8; j++)
			palette_set_color_rgb(machine(), i*8+j, fakecols[i][j][0], fakecols[i][j][1], fakecols[i][j][2]);
}
开发者ID:CJBass,项目名称:mame2013-libretro,代码行数:7,代码来源:ssrj.c

示例14: PALETTE_INIT

static PALETTE_INIT( wolfpack )
{
	int i;

	palette_set_color(machine, 0, MAKE_RGB(0x00, 0x00, 0x00));
	palette_set_color(machine, 1, MAKE_RGB(0xc1, 0xc1, 0xc1));
	palette_set_color(machine, 2, MAKE_RGB(0x81, 0x81, 0x81));
	palette_set_color(machine, 3, MAKE_RGB(0x48, 0x48, 0x48));

	for (i = 0; i < 4; i++)
	{
		rgb_t color = palette_get_color(machine, i);

		palette_set_color_rgb(machine, 4 + i,
			RGB_RED(color) < 0xb8   ? RGB_RED(color)   + 0x48 : 0xff,
			RGB_GREEN(color) < 0xb8 ? RGB_GREEN(color) + 0x48 : 0xff,
			RGB_BLUE(color) < 0xb8  ? RGB_BLUE(color)  + 0x48 : 0xff);
	}

	colortable[0] = 0;
	colortable[1] = 1;
	colortable[2] = 1;
	colortable[3] = 0;
	colortable[4] = 0;
	colortable[5] = 2;
	colortable[6] = 0;
	colortable[7] = 3;
}
开发者ID:broftkd,项目名称:historic-mame,代码行数:28,代码来源:wolfpack.c

示例15: namcofl_install_palette

static void namcofl_install_palette(running_machine &machine)
{
	int pen, page, dword_offset, byte_offset;
	UINT32 r,g,b;
	UINT32 *pSource;

	/* this is unnecessarily expensive.  Better would be to mark palette entries dirty as
     * they are modified, and only process those that have changed.
     */
	pen = 0;
	for( page=0; page<4; page++ )
	{
		pSource = &machine.generic.paletteram.u32[page*0x2000/4];
		for( dword_offset=0; dword_offset<0x800/4; dword_offset++ )
		{
			r = pSource[dword_offset+0x0000/4];
			g = pSource[dword_offset+0x0800/4];
			b = pSource[dword_offset+0x1000/4];

			for( byte_offset=0; byte_offset<4; byte_offset++ )
			{
				palette_set_color_rgb( machine, pen++, r&0xff, g&0xff, b&0xff);
				r>>=8; g>>=8; b>>=8;
			}
		}
	}
}
开发者ID:kkalmaz,项目名称:psmame,代码行数:27,代码来源:namcofl.c


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