Exemplo n.º 1
0
static TILE_GET_INFO( get_tile_info )
{
	nycaptor_state *state = machine.driver_data<nycaptor_state>();
	int pal = state->m_videoram[tile_index * 2 + 1] & 0x0f;
	tileinfo->category = (state->m_videoram[tile_index * 2 + 1] & 0x30) >> 4;

	tileinfo->group = 0;

	if ((!nycaptor_spot(machine)) && (pal == 6))
		tileinfo->group = 1;

	if (((nycaptor_spot(machine) == 3) && (pal == 8)) || ((nycaptor_spot(machine) == 1) && (pal == 0xc)))
		tileinfo->group = 2;

	if ((nycaptor_spot(machine) == 1) && (tileinfo->category == 2))
		tileinfo->group = 3;

#if NYCAPTOR_DEBUG
	if (state->m_mask & (1 << tileinfo->category))
	{
		if (nycaptor_spot(machine))
			pal = 0xe;
		else
			pal = 4;
	}
#endif

	SET_TILE_INFO(
			0,
			state->m_videoram[tile_index * 2] + ((state->m_videoram[tile_index * 2 + 1] & 0xc0) << 2) + 0x400 * state->m_char_bank,
			pal, 0
			);
}
Exemplo n.º 2
0
UINT32 nycaptor_state::screen_update_nycaptor(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
#if NYCAPTOR_DEBUG
	nycaptor_setmask(machine());
	if (m_mask & 0x1000)
	{
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 3, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 3, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 2, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 2, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 1, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 0);
		draw_sprites(machine(), bitmap, cliprect, 0);
		draw_sprites(machine(), bitmap, cliprect, 1);
		draw_sprites(machine(), bitmap, cliprect, 2);
		draw_sprites(machine(), bitmap, cliprect, 3);
		draw_sprites(machine(), bitmap, cliprect, 4);
		draw_sprites(machine(), bitmap, cliprect, 5);
		draw_sprites(machine(), bitmap, cliprect, 6);
		draw_sprites(machine(), bitmap, cliprect, 7);
	}
	else
#endif
	switch (nycaptor_spot() & 3)
	{
	case 0:
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 3, 0);
		draw_sprites(bitmap, cliprect, 6);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 3, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 2, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 2, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 1, 0);
		draw_sprites(bitmap, cliprect, 3);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1, 0);
		draw_sprites(bitmap, cliprect, 0);
		draw_sprites(bitmap, cliprect, 2);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0, 0);
		draw_sprites(bitmap, cliprect, 1);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 0);
		break;

	case 1:
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 3, 0);
		draw_sprites(bitmap, cliprect, 3);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 3, 0);
		draw_sprites(bitmap, cliprect, 2);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 2, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 1, 0);
		draw_sprites(bitmap, cliprect, 1);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 2, 0);
		draw_sprites(bitmap, cliprect, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 0);
		break;

	case 2:
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 3, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 3, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 1, 0);
		draw_sprites(bitmap, cliprect, 1);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 2, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 2, 0);
		draw_sprites(bitmap, cliprect, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 0);
		break;

	case 3:
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 1, 0);
		draw_sprites(bitmap, cliprect, 1);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1, 0);
		draw_sprites(bitmap, cliprect, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0, 0);
		m_bg_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 0);
		break;
	}

	return 0;
}