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


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

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


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

示例1: drawgfx_alphatable

/*-------------------------------------------------
    drawgfx_alphatable - render a sprite with either
    a fixed alpha value, or if alpha==-1 then uses
    the per-pen alphatable[] array
 -------------------------------------------------*/
static void drawgfx_alphatable(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;

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

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

	/* 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;

	DRAWGFX_CORE(UINT32, PIXEL_OP_REMAP_TRANS0_ALPHATABLE32, NO_PRIORITY);
}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:37,代码来源:psikyosh.c


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