Exemplo n.º 1
0
int nmk16_state::nmk16_bg_spr_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	m_bg_tilemap0->set_scrollx(0,-m_videoshift);

	m_bg_tilemap0->draw(screen, bitmap, cliprect, 0,0);

	nmk16_draw_sprites(bitmap,cliprect);
	return 0;
}
Exemplo n.º 2
0
int nmk16_state::nmk16_bioshipbg_sprflip_tx_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	UINT16 *tilerom = (UINT16 *)memregion("gfx5")->base();
	int scrollx=-(m_bioship_scroll[1] + m_bioship_scroll[0]*256);
	int scrolly=-(m_bioship_scroll[3] + m_bioship_scroll[2]*256);

	m_tx_tilemap->set_scrollx(0,-m_videoshift);

	if (m_redraw_bitmap)
	{
		int bank = m_bioship_background_bank * 0x2000;
		int sx=0, sy=0, offs;
		m_redraw_bitmap=0;

		/* Draw background from tile rom */
		for (offs = 0;offs <0x1000;offs++) {
				UINT16 data = tilerom[offs+bank];
				int numtile = data&0xfff;
				int color = (data&0xf000)>>12;

				m_gfxdecode->gfx(3)->opaque(*m_background_bitmap,m_background_bitmap->cliprect(),
						numtile,
						color,
						0,0,   /* no flip */
						16*sx,16*sy);

				data = tilerom[offs+0x1000+bank];
				numtile = data&0xfff;
				color = (data&0xf000)>>12;
				m_gfxdecode->gfx(3)->opaque(*m_background_bitmap,m_background_bitmap->cliprect(),
						numtile,
						color,
						0,0,   /* no flip */
						16*sx,(16*sy)+256);

				sy++;
				if (sy==16) {sy=0; sx++;}
		}
	}

	copyscrollbitmap(bitmap,*m_background_bitmap,1,&scrollx,1,&scrolly,cliprect);
	m_bg_tilemap0->draw(screen, bitmap, cliprect, 0,0);

	nmk16_draw_sprites(bitmap,cliprect);

	m_tx_tilemap->draw(screen, bitmap, cliprect, 0,0);
	return 0;
}