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


C++ screen_device::vpos方法代码示例

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


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

示例1: blstroid_scanline_update

void blstroid_scanline_update(screen_device &screen, int scanline)
{
	blstroid_state *state = screen.machine->driver_data<blstroid_state>();
	int offset = (scanline / 8) * 64 + 40;

	/* check for interrupts */
	if (offset < 0x1000)
		if (state->playfield[offset] & 0x8000)
		{
			int width, vpos;
			attotime period_on;
			attotime period_off;

			/* FIXME: - the only thing this IRQ does it tweak the starting MO link */
			/* unfortunately, it does it too early for the given MOs! */
			/* perhaps it is not actually hooked up on the real PCB... */
			return;

			/* set a timer to turn the interrupt on at HBLANK of the 7th scanline */
			/* and another to turn it off one scanline later */
			width = screen.width();
			vpos  = screen.vpos();
			period_on  = screen.time_until_pos(vpos + 7, width * 0.9);
			period_off = screen.time_until_pos(vpos + 8, width * 0.9);

			timer_set(screen.machine, period_on, NULL,  0, irq_on);
			timer_set(screen.machine, period_off, NULL, 0, irq_off);
		}
}
开发者ID:DarrenBranford,项目名称:MAME4iOS,代码行数:29,代码来源:blstroid.c

示例2: scanline_update

void skullxbo_state::scanline_update(screen_device &screen, int scanline)
{
	/* check for interrupts in the alpha ram */
	/* the interrupt occurs on the HBLANK of the 6th scanline following */
	int offset = (scanline / 8) * 64 + 42;
	if (offset < 0x7c0 && (m_alpha_tilemap->basemem_read(offset) & 0x8000))
	{
		int width = screen.width();
		attotime period = screen.time_until_pos(screen.vpos() + 6, width * 0.9);
		m_scanline_timer->adjust(period);
	}

	/* update the playfield and motion objects */
	skullxbo_scanline_update(scanline);
}
开发者ID:felipesanches,项目名称:ume,代码行数:15,代码来源:skullxbo.c

示例3: alpha_row_update

static void alpha_row_update(screen_device &screen, int scanline)
{
	skullxbo_state *state = screen.machine().driver_data<skullxbo_state>();
	UINT16 *check = &state->m_alpha[(scanline / 8) * 64 + 42];

	/* check for interrupts in the alpha ram */
	/* the interrupt occurs on the HBLANK of the 6th scanline following */
	if (check < &state->m_alpha[0x7c0] && (*check & 0x8000))
	{
		int	width = screen.width();
		attotime period = screen.time_until_pos(screen.vpos() + 6, width * 0.9);
		screen.machine().scheduler().timer_set(period, FUNC(irq_gen));
	}

	/* update the playfield and motion objects */
	skullxbo_scanline_update(screen.machine(), scanline);
}
开发者ID:cdenix,项目名称:psmame,代码行数:17,代码来源:skullxbo.c


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