本文整理汇总了C++中required_device::black_pen方法的典型用法代码示例。如果您正苦于以下问题:C++ required_device::black_pen方法的具体用法?C++ required_device::black_pen怎么用?C++ required_device::black_pen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类required_device
的用法示例。
在下文中一共展示了required_device::black_pen方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
UINT32 m20_state::screen_update_m20(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
int x,y,i;
UINT8 pen;
UINT32 count;
bitmap.fill(m_palette->black_pen(), cliprect);
count = (0);
for(y=0; y<256; y++)
{
for(x=0; x<512; x+=16)
{
for (i = 0; i < 16; i++)
{
pen = (m_p_videoram[count]) >> (15 - i) & 1;
if (screen.visible_area().contains(x + i, y))
bitmap.pix32(y, x + i) = m_palette->pen(pen);
}
count++;
}
}
return 0;
}
示例2: screen_update
UINT32 joystand_state::screen_update( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect )
{
int layers_ctrl = -1;
#ifdef MAME_DEBUG
if (machine().input().code_pressed(KEYCODE_Z))
{
int msk = 0;
if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1;
if (machine().input().code_pressed(KEYCODE_W)) msk |= 2;
if (machine().input().code_pressed(KEYCODE_A)) msk |= 4;
if (machine().input().code_pressed(KEYCODE_S)) msk |= 8;
if (msk != 0) layers_ctrl &= msk;
}
#endif
m_bg1_tmap->set_scrollx(0, 0);
m_bg1_tmap->set_scrolly(0, 0);
m_bg2_tmap->set_scrollx(0, m_scroll[0] - 0xa);
m_bg2_tmap->set_scrolly(0, m_scroll[1]);
draw_bg15_tilemap();
bitmap.fill(m_palette->black_pen(), cliprect);
if (layers_ctrl & 4) copybitmap_trans(bitmap, m_bg15_bitmap[0], 0, 0, 1, 0, cliprect, BG15_TRANSPARENT);
if (layers_ctrl & 8) copybitmap_trans(bitmap, m_bg15_bitmap[1], 0, 0, 0, 0, cliprect, BG15_TRANSPARENT);
if (layers_ctrl & 1) m_bg1_tmap->draw(screen, bitmap, cliprect, 0, 0);
if (layers_ctrl & 2) m_bg2_tmap->draw(screen, bitmap, cliprect, 0, 0);
popmessage("S0: %04X S1: %04X EN: %04X OUT: %04X", m_scroll[0], m_scroll[1], m_enable[0], m_outputs[0]);
return 0;
}
示例3: screen_update_intrscti
UINT32 intrscti_state::screen_update_intrscti(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int y,x;
int count;
bitmap.fill(m_palette->black_pen(), cliprect);
count = 0;
for (y=0;y<32;y++)
{
for (x=0;x<32;x++)
{
int dat;
dat = m_vram[count];
m_gfxdecode->gfx(0)->transpen(m_palette,bitmap,cliprect,dat/*+0x100*/,0,0,0,x*8,y*8,0);
count++;
}
}
count = 0x400;
for (y=0;y<32;y++)
{
for (x=0;x<32;x++)
{
int dat;
dat = m_vram[count];
m_gfxdecode->gfx(0)->transpen(m_palette,bitmap,cliprect,dat+0x100,0,0,0,x*8,y*8,0);
count++;
}
}
return 0;
}
示例4:
uint32_t quizpun2_state::screen_update_quizpun2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int layers_ctrl = -1;
#ifdef MAME_DEBUG
if (machine().input().code_pressed(KEYCODE_Z))
{
int msk = 0;
if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1;
if (machine().input().code_pressed(KEYCODE_W)) msk |= 2;
if (msk != 0) layers_ctrl &= msk;
}
#endif
int bg_scroll = (m_scroll & 0x3) >> 0;
int fg_scroll = (m_scroll & 0xc) >> 2;
m_bg_tmap->set_scrolly(0, bg_scroll * 0x100);
m_fg_tmap->set_scrolly(0, fg_scroll * 0x100);
if (layers_ctrl & 1) m_bg_tmap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
else bitmap.fill(m_palette->black_pen(), cliprect);
if (layers_ctrl & 2) m_fg_tmap->draw(screen, bitmap, cliprect, 0, 0);
// popmessage("BG: %x FG: %x", bg_scroll, fg_scroll);
return 0;
}
示例5: screen_update_dunhuang
UINT32 dunhuang_state::screen_update_dunhuang(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int layers_ctrl = -1;
#if DUNHUANG_DEBUG
if (machine().input().code_pressed(KEYCODE_Z))
{
int msk = 0;
if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1;
if (machine().input().code_pressed(KEYCODE_W)) msk |= 2;
if (msk != 0) layers_ctrl &= msk;
}
#endif
bitmap.fill(m_palette->black_pen(), cliprect);
switch (m_layers)
{
case 0x04: // girl select: bg over fg
if (layers_ctrl & 2) m_tmap2->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
if (layers_ctrl & 1) m_tmap->draw(screen, bitmap, cliprect, 0, 0);
break;
case 0x05: // dips: must hide fg
if (layers_ctrl & 1) m_tmap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
break;
case 0x07: // game,demo: fg over bg
default:
if (layers_ctrl & 1) m_tmap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
if (layers_ctrl & 2) m_tmap2->draw(screen, bitmap, cliprect, 0, 0);
break;
}
return 0;
}
示例6: screen_update_spider
uint32_t twins_state::screen_update_spider(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int y,x,count;
static const int xxx=320,yyy=204;
bitmap.fill(m_palette->black_pen());
count=0;
uint8_t *videoram = (uint8_t*)m_videoram;
for (y=0;y<yyy;y++)
{
for(x=0;x<xxx;x++)
{
bitmap.pix16(y, x) = videoram[BYTE_XOR_LE(count)];
count++;
}
}
count = 0;
videoram = (uint8_t*)m_videoram2;
for (y=0;y<yyy;y++)
{
for(x=0;x<xxx;x++)
{
uint8_t pixel = videoram[BYTE_XOR_LE(count)];
if (pixel) bitmap.pix16(y, x) = pixel;
count++;
}
}
return 0;
}
示例7: screen_update_galaxi
UINT32 galaxi_state::screen_update_galaxi(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_bg3_tmap->set_scrollx(m_bg3_xscroll);
m_bg3_tmap->set_scrolly(m_bg3_yscroll);
int layers_ctrl = -1;
#ifdef MAME_DEBUG
if (machine().input().code_pressed(KEYCODE_R)) // remapped due to inputs changes.
{
int msk = 0;
if (machine().input().code_pressed(KEYCODE_T)) msk |= 1;
if (machine().input().code_pressed(KEYCODE_Y)) msk |= 2;
if (machine().input().code_pressed(KEYCODE_U)) msk |= 4;
if (machine().input().code_pressed(KEYCODE_I)) msk |= 8;
if (machine().input().code_pressed(KEYCODE_O)) msk |= 16;
if (msk != 0) layers_ctrl &= msk;
}
#endif
if (layers_ctrl & 1) m_bg1_tmap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
else bitmap.fill(m_palette->black_pen(), cliprect);
if (layers_ctrl & 2) m_bg2_tmap->draw(screen, bitmap, cliprect, 0, 0);
if (layers_ctrl & 4) m_bg3_tmap->draw(screen, bitmap, cliprect, 0, 0);
if (layers_ctrl & 8) m_bg4_tmap->draw(screen, bitmap, cliprect, 0, 0);
if (layers_ctrl & 16) m_fg_tmap->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
示例8: screen_update_taitowlf
UINT32 taitowlf_state::screen_update_taitowlf(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
int x,y,count;
bitmap.fill(m_palette->black_pen(), cliprect);
count = (0);
for(y=0;y<256;y++)
{
for(x=0;x<512;x++)
{
UINT32 color;
color = (m_bootscreen_rom[count] & 0xff);
if(cliprect.contains(x+0, y))
bitmap.pix32(y, x+0) = m_palette->pen(color);
count++;
}
}
return 0;
}
示例9: screen_update_guab
uint32_t guab_state::screen_update_guab(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_tms34061->get_display_state();
/* If blanked, fill with black */
if (m_tms34061->m_display.blanked)
{
bitmap.fill(m_palette->black_pen(), cliprect);
return 0;
}
for (int y = cliprect.min_y; y <= cliprect.max_y; ++y)
{
uint8_t *src = &m_tms34061->m_display.vram[256 * y];
uint16_t *dest = &bitmap.pix16(y);
for (int x = cliprect.min_x; x <= cliprect.max_x; x += 2)
{
uint8_t pen = src[x >> 1];
/* Draw two 4-bit pixels */
*dest++ = m_palette->pen(pen >> 4);
*dest++ = m_palette->pen(pen & 0x0f);
}
}
return 0;
}
示例10: screen_update_astrocorp
UINT32 astrocorp_state::screen_update_astrocorp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
if (m_screen_enable & 1)
copybitmap(bitmap, m_bitmap, 0,0,0,0, cliprect);
else
bitmap.fill(m_palette->black_pen(), cliprect);
return 0;
}
示例11: screen_update
UINT32 apc_state::screen_update( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect )
{
bitmap.fill(m_palette->black_pen(), cliprect);
/* graphics */
m_hgdc2->screen_update(screen, bitmap, cliprect);
m_hgdc1->screen_update(screen, bitmap, cliprect);
return 0;
}
示例12: screen_update_cabaret
uint32_t cabaret_state::screen_update_cabaret(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
bitmap.fill(m_palette->black_pen(), cliprect);
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
示例13: screen_update
uint32_t supduck_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
bitmap.fill(m_palette->black_pen(), cliprect);
m_back_tilemap->draw(screen, bitmap, cliprect, 0, 0);
m_fore_tilemap->draw(screen, bitmap, cliprect, 0, 0);
m_spritegen->draw_sprites(bitmap, cliprect, m_gfxdecode, 3, m_spriteram->buffer(), m_spriteram->bytes(), flip_screen(), 1 );
m_text_tilemap->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
示例14: screen_update
UINT32 jchan_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int x,y;
UINT16* src1;
UINT16* src2;
UINT16* dst;
UINT16 pixdata1;
UINT16 pixdata2;
bitmap.fill(m_palette->black_pen(), cliprect);
screen.priority().fill(0, cliprect);
m_view2_0->kaneko16_prepare(bitmap, cliprect);
for ( int i = 0; i < 8; i++ )
{
m_view2_0->render_tilemap_chip(screen,bitmap,cliprect,i);
}
m_sprite_bitmap_1->fill(0x0000, cliprect);
m_sprite_bitmap_2->fill(0x0000, cliprect);
m_spritegen1->skns_draw_sprites(*m_sprite_bitmap_1, cliprect, m_sprite_ram32_1, 0x4000, memregion("gfx1")->base(), memregion ("gfx1")->bytes(), m_sprite_regs32_1 );
m_spritegen2->skns_draw_sprites(*m_sprite_bitmap_2, cliprect, m_sprite_ram32_2, 0x4000, memregion("gfx2")->base(), memregion ("gfx2")->bytes(), m_sprite_regs32_2 );
// ignoring priority bits for now - might use alpha too, check 0x8000 of palette writes
for (y=0;y<240;y++)
{
src1 = &m_sprite_bitmap_1->pix16(y);
src2 = &m_sprite_bitmap_2->pix16(y);
dst = &bitmap.pix16(y);
for (x=0;x<320;x++)
{
pixdata1 = src1[x];
pixdata2 = src2[x];
if (pixdata2 & 0x3fff)
{
dst[x] = (pixdata2 & 0x3fff)|0x4000;
}
if (pixdata1 & 0x3fff)
{
dst[x] = (pixdata1 & 0x3fff)|0x4000;
}
}
}
return 0;
}
示例15: screen_update
UINT32 hvyunit_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
#define SX_POS 96
#define SY_POS 0
m_bg_tilemap->set_scrollx(0, ((m_port0_data & 0x40) << 2) + m_scrollx + SX_POS); // TODO
m_bg_tilemap->set_scrolly(0, ((m_port0_data & 0x80) << 1) + m_scrolly + SY_POS); // TODO
bitmap.fill(m_palette->black_pen(), cliprect);
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
m_pandora->update(bitmap, cliprect);
return 0;
}