本文整理汇总了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);
}
}
示例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);
}
示例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);
}