Exemple #1
0
neosplash(){
    disp_off();
    cls();
    load_palette(16,neosprpal,1);
    load_vram(0x5000,neospr,0x400);
    load_palette(0,badge1pal,1);
    set_tile_data(neotiles);
    load_tile(0x1000);
    for(j=0;j<14;j++){
        for(i=0;i<14;i++){
            put_tile(j*14+i,i+1,j);
        }
    }

    for(i=0;i<8;i++){
        spr_set(i);
        spr_pal(0);
        spr_pri(1);
        spr_ctrl(SIZE_MAS,SZ_32x16);
        spr_pattern(0x5000+0x80*i);
        spr_y(224-24);
        spr_x(i*32);
    }
    disp_on();
    t=0;
    for(;;){
        t++;

        vsync();
        joy0=joy(0);
        satb_update();
        if(joy0&JOY_STRT){
            break;
        }
        if(t>144)break;
    }
    psgPlay(0);
    disp_off();
    for(i=0;i<8;i++){
        spr_set(i);
        spr_hide();
    }
    satb_update();
    cls();
    set_color(0,0);
    set_color(256,0);
    disp_on();

    while(joy0&JOY_STRT){
        vsync();
        joy0=joy(0);
    }


}
void RedrawMain()
{
	ResetVideo();
	setupFont();

#ifndef CDROM1
	set_tile_data(MB_bg);
	load_tile(0x1000);
	load_palette(0, MB_pal, 1);  
	set_map_data(MB_map, 40, 30);
	load_map(0, 0, 0, 0, 40, 30);	
#ifdef SGFX
	if(sgx_detect())
	{
		vpc_win_size(VPC_WIN_A, 0x01ff);
		vpc_win_size(VPC_WIN_B, 0x01ff);
		vpc_win_reg(VPC_WIN_A, VDC_ON+VPC_NORM);
		vpc_win_reg(VPC_WIN_B, VDC_ON+VPC_NORM);
		vpc_win_reg(VPC_WIN_AB, VDC_ON+VPC_NORM);
		vpc_win_reg(VPC_WIN_NONE, VDC_ON+VPC_NORM);

		sgx_set_screen_size(SCR_SIZE_32x32);
		sgx_disp_off();
		
		sgx_set_tile_data(SMPTE75_bg);
		sgx_load_tile(0x1000);		
		sgx_set_map_data(SMPTE75_map, 40, 30);
		sgx_load_map(0, 0, 0, 0, 40, 30);	
		//load_palette(0, SMPTE75_pal, 16);
		sgx_disp_on();
		sgx_scroll(40, 40);
	}
#endif
#else
	set_screen_size(SCR_SIZE_64x32); 
	cd_loaddata(GPHX_OVERLAY, OFS_mainbg_PAL_bin, palCD, SIZE_mainbg_PAL_bin); 
	load_palette(0, palCD, 1); 
	cd_loadvram(GPHX_OVERLAY, OFS_mainbg_DATA_bin, 0x1000, SIZE_mainbg_DATA_bin);
	cd_loadvram(GPHX_OVERLAY, OFS_mainbg_BAT_bin, 0x0000, SIZE_mainbg_BAT_bin);
#endif
   
	init_satb();
	DrawSP();
	satb_update();
	
	Center224in240();
	DisplaySystemInfo();		
}
void DrawCredits()
{
	unsigned char end = 0;
	int counter = 0;

	redraw = 1;
	refresh = 1;
    while(!end)
    {   
		vsync();
		
        if(redraw)
        {
			ResetVideo();
			setupFont();
			
			SetFontColors(15, RGB(3, 3, 3), RGB(0, 6, 0), 0);
			SetFontColors(13, RGB(3, 3, 3), RGB(1, 6, 6), 0);

			set_xres(512, xres_flags);
			
#ifndef CDROM1			
			set_map_data(MB512_map, 64, 30);
			set_tile_data(MB512_bg);
			load_tile(0x1000);
			load_map(0, 0, 0, 0, 64, 30);
			load_palette(0, MB512_pal, 1);  
#else		
			set_screen_size(SCR_SIZE_64x32); 
			cd_loaddata(GPHX_OVERLAY, OFS_back512_PAL_bin, palCD, SIZE_back512_PAL_bin); 
			load_palette(0, palCD, 1);
			cd_loadvram(GPHX_OVERLAY, OFS_back512_DATA_bin, 0x1000, SIZE_back512_DATA_bin);			
			cd_loadvram(GPHX_OVERLAY, OFS_back512_BAT_bin, 0, SIZE_back512_BAT_bin);
#endif
			
			Center224in240();
			
            redraw = 0;
			refresh = 1;
			disp_on();
        }
		
		if(refresh)
		{
			RefreshCredits();

			refresh = 0;
		}
		
		set_font_pal(14);
		if(counter == 1)
			put_string("Artemio Urbina      ", HPOS+2, 8);
		if(counter == 60*4)
			put_string("@Artemio (twitter)  ", HPOS+2, 8);
		if(counter == 60*8)
			put_string("*****@*****.**", HPOS+2, 8);
		if(counter == 60*16)
			counter = 0;
			
		counter++;

        controller = joytrg(0);
        
		if (controller & JOY_II)
			end = 1;
			
		if (controller & JOY_SEL)
		{
			DrawN();
			redraw = 1;
		}
    }	
}
Exemple #4
0
title(){
    psgPlay(2);
    cls();

    set_tile_data(title_tiles);
    load_tile(0x1000);
    load_palette(15,title_pal,1);
    for(i=0;i<16;i++){
        for(j=0;j<4;j++){
            put_tile(j*16+i,i,j+1);
        }
    }

    for(i=0;i<8;i++){
        set_color_rgb(241+i,0,7-i,0);
        set_color_rgb(248+i,i,7,i);
        if(248+7+i<256)set_color_rgb(248+7+i,7,i,7);
    }

    draw_win(1,21,30,6);
    put_string(" HI-SCORE       00         LV 0",0,1);
    put_number(hiscore,5,11,1);
    put_number(hilevel,1,30,1);
    put_string("PC Engine version by cabbage",2,22);
    put_string(" NEO Retro Coding Compo 2013",2,24);
    put_string("  http://www.neoflash.com/  ",2,25);
    put_string("PUSH RUN BUTTON !",8,15);

    foo=1;
    t=0;
    while(1){
        rs++;
        lastjoy0=joy0;
        vsync();
        joy0=joy(0);
        t++;
        if(t>30){
            if(foo==0){
                put_string("                 ",8,15);
                foo=1;
                t=0;
            }else{
                put_string("PUSH RUN BUTTON !",8,15);
                foo=0;
                t=0;
            }
        }

        if(joy0&JOY_STRT){
            break;
        }

        title_color_cycle();

    }

    while(joy0&JOY_STRT){
        vsync(); joy0=joy(0);
    }

    put_string("                 ",8,15);
    srand(rs);
    config();

}