예제 #1
0
파일: jchan.c 프로젝트: coinhelper/jsmess
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;
}
예제 #2
0
파일: sandscrp.c 프로젝트: dinkc64/mame
UINT32 sandscrp_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	bitmap.fill(0, cliprect);

	screen.priority().fill(0, cliprect);

	m_view2_0->kaneko16_prepare(bitmap, cliprect);

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

	// copy sprite bitmap to screen
	m_pandora->update(bitmap, cliprect);
	return 0;
}
예제 #3
0
UINT32 sandscrp_state::screen_update_sandscrp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
    device_t *pandora = machine().device("pandora");
    bitmap.fill(0, cliprect);

    int i;

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

    m_view2_0->kaneko16_prepare(bitmap, cliprect);

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

    // copy sprite bitmap to screen
    pandora_update(pandora, bitmap, cliprect);
    return 0;
}