Beispiel #1
0
static SCREEN_UPDATE(gal3)
{
	gal3_state *state = screen->machine().driver_data<gal3_state>();
	int i;
	char mst[18], slv[18];
	static int pivot = 15;
	int pri;

	update_palette(screen->machine());

	if( screen->machine().input().code_pressed_once(KEYCODE_H)&&(pivot<15) )	pivot+=1;
	if( screen->machine().input().code_pressed_once(KEYCODE_J)&&(pivot>0) )	pivot-=1;

	for( pri=0; pri<pivot; pri++ )
	{
		namco_obj_draw(screen->machine(), bitmap, cliprect, pri );
	}

/*  CopyVisiblePolyFrameBuffer( bitmap, cliprect,0,0x7fbf );

    for( pri=pivot; pri<15; pri++ )
    {
        namco_obj_draw(screen->machine(), bitmap, cliprect, pri );
    }*/

	// CPU Diag LEDs
	mst[17]='\0', slv[17]='\0';
/// printf("mst=0x%x\tslv=0x%x\n", state->m_led_mst, state->m_led_slv);
	for(i=16;i<32;i++)
	{
		int t;
		if(i<24)
			t=i;
		else
			t=i+1;
		mst[8]=' '; slv[8]=' ';

		if(state->m_led_mst&(1<<i))
			mst[t-16]='*';
		else
			mst[t-16]='O';

		if(state->m_led_slv&(1<<i))
			slv[t-16]='*';
		else
			slv[t-16]='O';
	}

	popmessage("LED_MST:  %s\nLED_SLV:  %s\n2D Layer: 0-%d (Press H for +, J for -)\n", mst, slv, pivot);

	return 0;
}
static void
video_update_common( struct mame_bitmap *bitmap, const struct rectangle *cliprect, int bROZ )
{
	const int xadjust[4] = { 0,2,3,4 };
	int i,pri;

	handle_mcu();
	namconb1_install_palette();
	fillbitmap(priority_bitmap,0,NULL); /* not actually used (yet) */

	/* I have no idea what the background color should be, but I doubt it ever pokes through. */
	fillbitmap( bitmap, 0, 0 );

	for( i=0; i<6; i++ )
	{
		int tilemap_color = nth_word32( &namconb1_scrollram32[0x30/4], i )&7;
		if( tilemap_palette_bank[i]!= tilemap_color )
		{
			tilemap_palette_bank[i] = tilemap_color;
			tilemap_mark_all_tiles_dirty( background[i] );
		}
		if( i<4 )
		{
			tilemap_set_scrollx( background[i],0,namconb1_scrollram32[i*2]+48-xadjust[i] );
			tilemap_set_scrolly( background[i],0,namconb1_scrollram32[i*2+1]+24 );
		}
	}

	for( pri=0; pri<8; pri++ )
	{
		if( bROZ )
		{
			namco_roz_draw( bitmap,cliprect,pri );
		}

		for( i=0; i<6; i++ )
		{
			if( nth_word32( &namconb1_scrollram32[0x20/4],i ) == pri )
			{
				tilemap_draw( bitmap,cliprect,background[i],0,0/*1<<pri*/ );
			}
		}
		namco_obj_draw( bitmap, cliprect, pri );
	}
} /* video_update_common */