本文整理汇总了C++中tilemap_t::set_flip方法的典型用法代码示例。如果您正苦于以下问题:C++ tilemap_t::set_flip方法的具体用法?C++ tilemap_t::set_flip怎么用?C++ tilemap_t::set_flip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tilemap_t
的用法示例。
在下文中一共展示了tilemap_t::set_flip方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: screen_update_cultures
UINT32 cultures_state::screen_update_cultures(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int attr;
// tilemaps attributes
attr = (m_bg0_regs_x[3] & 1 ? TILEMAP_FLIPX : 0) | (m_bg0_regs_y[3] & 1 ? TILEMAP_FLIPY : 0);
m_bg0_tilemap->set_flip(attr);
attr = (m_bg1_regs_x[3] & 1 ? TILEMAP_FLIPX : 0) | (m_bg1_regs_y[3] & 1 ? TILEMAP_FLIPY : 0);
m_bg1_tilemap->set_flip(attr);
attr = (m_bg2_regs_x[3] & 1 ? TILEMAP_FLIPX : 0) | (m_bg2_regs_y[3] & 1 ? TILEMAP_FLIPY : 0);
m_bg2_tilemap->set_flip(attr);
// tilemaps scrolls
m_bg0_tilemap->set_scrollx(0, (m_bg0_regs_x[2] << 8) + m_bg0_regs_x[0]);
m_bg1_tilemap->set_scrollx(0, (m_bg1_regs_x[2] << 8) + m_bg1_regs_x[0]);
m_bg2_tilemap->set_scrollx(0, (m_bg2_regs_x[2] << 8) + m_bg2_regs_x[0]);
m_bg0_tilemap->set_scrolly(0, (m_bg0_regs_y[2] << 8) + m_bg0_regs_y[0]);
m_bg1_tilemap->set_scrolly(0, (m_bg1_regs_y[2] << 8) + m_bg1_regs_y[0]);
m_bg2_tilemap->set_scrolly(0, (m_bg2_regs_y[2] << 8) + m_bg2_regs_y[0]);
m_bg2_tilemap->draw(screen, bitmap, cliprect, 0, 0);
m_bg0_tilemap->draw(screen, bitmap, cliprect, 0, 0);
m_bg1_tilemap->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
示例2:
void chance32_state::video_start()
{
m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(chance32_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 8, 35, 29);
m_fg_tilemap->set_transparent_pen(0);
m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(chance32_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 8, 35, 29);
m_fg_tilemap->set_flip(TILE_FLIPX|TILE_FLIPY);
m_bg_tilemap->set_flip(TILE_FLIPX|TILE_FLIPY);
}
示例3: screen_update_majorpkr
UINT32 majorpkr_state::screen_update_majorpkr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
bitmap.fill(get_black_pen(machine()), cliprect);
rectangle custom_clip;
/* The following custom_clip is to exclude the last char column (unused)
form the render. We need more proof about how the video is working.
*/
custom_clip = cliprect;
custom_clip.max_x -= 16;
m_bg_tilemap->draw(screen, bitmap, custom_clip, 0, 0);
m_fg_tilemap->draw(screen, bitmap, custom_clip, 0, 0);
if (m_flip_state == 1)
{
m_bg_tilemap->set_flip(TILEMAP_FLIPX | TILEMAP_FLIPY);
m_fg_tilemap->set_flip(TILEMAP_FLIPX | TILEMAP_FLIPY);
}
return 0;
}