void contra_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int bank ) { device_t *k007121 = bank ? m_k007121_2 : m_k007121_1; address_space &space = machine().driver_data()->generic_space(); int base_color = (k007121_ctrlram_r(k007121, space, 6) & 0x30) * 2; const UINT8 *source; if (bank == 0) source = m_buffered_spriteram; else source = m_buffered_spriteram_2; k007121_sprites_draw(k007121, bitmap, cliprect, machine().gfx[bank], machine().colortable, source, base_color, 40, 0, (UINT32)-1); }
UINT32 flkatck_state::screen_update_flkatck(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { rectangle clip[2]; const rectangle &visarea = screen.visible_area(); address_space &space = machine().driver_data()->generic_space(); if (m_flipscreen) { clip[0] = visarea; clip[0].max_x -= 40; clip[1] = visarea; clip[1].min_x = clip[1].max_x - 40; m_k007121_tilemap[0]->set_scrollx(0, k007121_ctrlram_r(m_k007121, space, 0) - 56 ); m_k007121_tilemap[0]->set_scrolly(0, k007121_ctrlram_r(m_k007121, space, 2)); m_k007121_tilemap[1]->set_scrollx(0, -16); } else { clip[0] = visarea; clip[0].min_x += 40; clip[1] = visarea; clip[1].max_x = 39; clip[1].min_x = 0; m_k007121_tilemap[0]->set_scrollx(0, k007121_ctrlram_r(m_k007121, space, 0) - 40 ); m_k007121_tilemap[0]->set_scrolly(0, k007121_ctrlram_r(m_k007121, space, 2)); m_k007121_tilemap[1]->set_scrollx(0, 0); } /* compute clipping */ clip[0] &= cliprect; clip[1] &= cliprect; /* draw the graphics */ m_k007121_tilemap[0]->draw(bitmap, clip[0], 0, 0); k007121_sprites_draw(m_k007121, bitmap, cliprect, machine().gfx[0], NULL, &m_k007121_ram[0x1000], 0, 40, 0, (UINT32)-1); m_k007121_tilemap[1]->draw(bitmap, clip[1], 0, 0); return 0; }
UINT32 fastlane_state::screen_update_fastlane(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { rectangle finalclip0 = m_clip0, finalclip1 = m_clip1; int i, xoffs; finalclip0 &= cliprect; finalclip1 &= cliprect; set_pens(machine()); /* set scroll registers */ address_space &space = machine().driver_data()->generic_space(); xoffs = k007121_ctrlram_r(m_k007121, space, 0); for (i = 0; i < 32; i++) m_layer0->set_scrollx(i, m_k007121_regs[0x20 + i] + xoffs - 40); m_layer0->set_scrolly(0, k007121_ctrlram_r(m_k007121, space, 2)); m_layer0->draw(bitmap, finalclip0, 0, 0); k007121_sprites_draw(m_k007121, bitmap, cliprect, machine().gfx[0], machine().colortable, m_spriteram, 0, 40, 0, (UINT32)-1); m_layer1->draw(bitmap, finalclip1, 0, 0); return 0; }