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; }
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); }
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; }