Exemple #1
0
UINT32 jchan_state::screen_update_jchan(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	int x,y;
	UINT16* src1;
	UINT16* src2;
	UINT16* dst;
	UINT16 pixdata1;
	UINT16 pixdata2;

	bitmap.fill(get_black_pen(machine()), cliprect);

	machine().priority_bitmap.fill(0, cliprect);

	m_view2_0->kaneko16_prepare(bitmap, cliprect);

	for ( int i = 0; i < 8; i++ )
	{
		m_view2_0->render_tilemap_chip(bitmap,cliprect,i);
	}

	m_sprite_bitmap_1->fill(0x0000, cliprect);
	m_sprite_bitmap_2->fill(0x0000, cliprect);

	m_spritegen1->skns_draw_sprites(machine(), *m_sprite_bitmap_1, cliprect, m_sprite_ram32_1, 0x4000, machine().root_device().memregion("gfx1")->base(), machine().root_device().memregion ("gfx1")->bytes(), m_sprite_regs32_1 );
	m_spritegen2->skns_draw_sprites(machine(), *m_sprite_bitmap_2, cliprect, m_sprite_ram32_2, 0x4000, machine().root_device().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;
}
Exemple #2
0
void galpani3_state::video_start()
{
	/* so we can use suprnova.c */

	m_spritegen = machine().device<sknsspr_device>("spritegen");
	m_spritegen->skns_sprite_kludge(0,0);
}
Exemple #3
0
void jchan_state::video_start()
{
	/* so we can use suprnova.c */
	m_sprite_ram32_1 = auto_alloc_array(machine(), UINT32, 0x4000/4);
	m_sprite_ram32_2 = auto_alloc_array(machine(), UINT32, 0x4000/4);

	m_sprite_regs32_1 = auto_alloc_array(machine(), UINT32, 0x40/4);
	m_sprite_regs32_2 = auto_alloc_array(machine(), UINT32, 0x40/4);

	m_sprite_bitmap_1 = auto_bitmap_ind16_alloc(machine(),1024,1024);
	m_sprite_bitmap_2 = auto_bitmap_ind16_alloc(machine(),1024,1024);

	m_spritegen1 = machine().device<sknsspr_device>("spritegen1");
	m_spritegen2 = machine().device<sknsspr_device>("spritegen2");


	m_spritegen1->skns_sprite_kludge(0,0);
	m_spritegen2->skns_sprite_kludge(0,0);
}