本文整理汇总了C++中screen_device::height方法的典型用法代码示例。如果您正苦于以下问题:C++ screen_device::height方法的具体用法?C++ screen_device::height怎么用?C++ screen_device::height使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类screen_device
的用法示例。
在下文中一共展示了screen_device::height方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: screen_update
bool nakajies_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
{
UINT8* lcd_memory_start = m_ram_base + (m_lcd_memory_start<<9);
int height = screen.height();
for (int y=0; y<height; y++)
for (int x=0; x<60; x++)
{
UINT8 data = lcd_memory_start[y*64 + x];
for (int px=0; px<8; px++)
{
*BITMAP_ADDR16(&bitmap, y, (x * 8) + px) = BIT(data, 7);
data <<= 1;
}
}
return 0;
}
示例2:
tc0780fpa_renderer::tc0780fpa_renderer(device_t &parent, screen_device &screen, const uint8_t *texture_ram)
: poly_manager<float, tc0780fpa_polydata, 6, 10000>(screen)
{
int width = screen.width();
int height = screen.height();
m_fb[0] = std::make_unique<bitmap_ind16>(width, height);
m_fb[1] = std::make_unique<bitmap_ind16>(width, height);
m_zb = std::make_unique<bitmap_ind16>(width, height);
m_texture = texture_ram;
m_cliprect = screen.cliprect();
m_current_fb = 0;
// save state
parent.save_item(NAME(*m_fb[0]));
parent.save_item(NAME(*m_fb[1]));
parent.save_item(NAME(*m_zb));
}
示例3:
// renders to 2 bitmaps, and mixes output
UINT32 toaplan2_state::screen_update_batsugun(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
// bitmap.fill(0, cliprect);
// gp9001_custom_priority_bitmap->fill(0, cliprect);
if (m_vdp0)
{
bitmap.fill(0, cliprect);
m_custom_priority_bitmap.fill(0, cliprect);
m_vdp0->gp9001_render_vdp(bitmap, cliprect);
}
if (m_vdp1)
{
m_secondary_render_bitmap.fill(0, cliprect);
m_custom_priority_bitmap.fill(0, cliprect);
m_vdp1->gp9001_render_vdp(m_secondary_render_bitmap, cliprect);
}
// key test places in batsugun
// level 2 - the two layers of clouds (will appear under background, or over ships if wrong)
// level 3 - the special effect 'layer' which should be under everything (will appear over background if wrong)
// level 4(?) - the large clouds (will obscure player if wrong)
// high score entry - letters will be missing if wrong
// end credits - various issues if wrong, clouds like level 2
//
// when implemented based directly on the PAL equation it doesn't work, however, my own equations roughly based
// on that do.
//
if (m_vdp0 && m_vdp1)
{
int width = screen.width();
int height = screen.height();
int y,x;
UINT16* src_vdp0; // output buffer of vdp0
UINT16* src_vdp1; // output buffer of vdp1
for (y=0;y<height;y++)
{
src_vdp0 = &bitmap.pix16(y);
src_vdp1 = &m_secondary_render_bitmap.pix16(y);
for (x=0;x<width;x++)
{
UINT16 GPU0_LUTaddr = src_vdp0[x];
UINT16 GPU1_LUTaddr = src_vdp1[x];
// these equations is derived from the PAL, but doesn't seem to work?
int COMPARISON = ((GPU0_LUTaddr & 0x0780) > (GPU1_LUTaddr & 0x0780));
// note: GPU1_LUTaddr & 0x000f - transparency check for vdp1? (gfx are 4bpp, the low 4 bits of the lookup would be the pixel data value)
#if 0
int result =
((GPU0_LUTaddr & 0x0008) & !COMPARISON)
| ((GPU0_LUTaddr & 0x0008) & !(GPU1_LUTaddr & 0x000f))
| ((GPU0_LUTaddr & 0x0004) & !COMPARISON)
| ((GPU0_LUTaddr & 0x0004) & !(GPU1_LUTaddr & 0x000f))
| ((GPU0_LUTaddr & 0x0002) & !COMPARISON)
| ((GPU0_LUTaddr & 0x0002) & !(GPU1_LUTaddr & 0x000f))
| ((GPU0_LUTaddr & 0x0001) & !COMPARISON)
| ((GPU0_LUTaddr & 0x0001) & !(GPU1_LUTaddr & 0x000f));
if (result) src_vdp0[x] = GPU0_LUTaddr;
else src_vdp0[x] = GPU1_LUTaddr;
#endif
// this seems to work tho?
if (!(GPU1_LUTaddr & 0x000f))
{
src_vdp0[x] = GPU0_LUTaddr;
}
else
{
if (!(GPU0_LUTaddr & 0x000f))
{
src_vdp0[x] = GPU1_LUTaddr; // bg pen
}
else
{
if (COMPARISON)
{
src_vdp0[x] = GPU1_LUTaddr;
}
else
{
src_vdp0[x] = GPU0_LUTaddr;
}
}
}
}
}
}
return 0;
}