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


C++ bitmap_rgb32::format方法代码示例

本文整理汇总了C++中bitmap_rgb32::format方法的典型用法代码示例。如果您正苦于以下问题:C++ bitmap_rgb32::format方法的具体用法?C++ bitmap_rgb32::format怎么用?C++ bitmap_rgb32::format使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在bitmap_rgb32的用法示例。


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

示例1: drawgfx_alphastore

/*-------------------------------------------------
    drawgfx_alphastore - render a gfx element with
    a single transparent pen, storing the alpha value
    in alpha field of ARGB32, negative alpha implies alphatable
-------------------------------------------------*/
static void drawgfx_alphastore(bitmap_rgb32 &dest, const rectangle &cliprect, gfx_element *gfx,
		UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
		int fixedalpha)
{
	psikyosh_state *state = gfx->machine().driver_data<psikyosh_state>();
	UINT8 *alphatable = state->m_alphatable;
	DECLARE_NO_PRIORITY;
	const pen_t *paldata;

	assert(dest.bpp() == 32);
	assert(dest.format() == BITMAP_FORMAT_ARGB32);
	assert(gfx != NULL);
	assert(alphatable != NULL);

	/* if we have a fixed alpha, call the standard drawgfx_transpen */
	if (fixedalpha == 0xff)
	{
		drawgfx_transpen(dest, cliprect, gfx, code, color, flipx, flipy, destx, desty, 0);
		return;
	}

	/* get final code and color, and grab lookup tables */
	code %= gfx->elements();
	color %= gfx->colors();
	paldata = &gfx->machine().pens[gfx->colorbase() + gfx->granularity() * color];

	/* early out if completely transparent */
	if (gfx->has_pen_usage() && (gfx->pen_usage(code) & ~(1 << 0)) == 0)
		return;

	if (fixedalpha >= 0)
	{
		UINT8 alpha = fixedalpha;
		DRAWGFX_CORE(UINT32, PIXEL_OP_REMAP_TRANS0_ALPHASTORE32, NO_PRIORITY);
	}
	else
	{
		DRAWGFX_CORE(UINT32, PIXEL_OP_REMAP_TRANS0_ALPHATABLESTORE32, NO_PRIORITY);
	}
}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:45,代码来源:psikyosh.c


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