Ejemplo n.º 1
0
void pal_fade_to(unsigned to)
{
	if(!to) music_stop();

	while(bright!=to)
	{
		delay(4);
		if(bright<to) ++bright; else --bright;
		pal_bright(bright);
	}

	if(!bright)
	{
		ppu_off();
		set_vram_update(0,0);
		scroll(0,0);
	}
}
Ejemplo n.º 2
0
void main(void) {
	bank_spr (1);
	bank_bg (0);

	ppu_off ();
	first_game = 1;
	ntsc = ppu_system ();

	// Main loop

	while (1) {	

		//title ();

#ifdef MULTI_LEVEL		
		level = 0;
#endif
		plife = PLAYER_LIFE;

		// Game loop

		while (1) {
			scroll (0, SCROLL_Y);
			game_init (); 
			game_loop ();

			if (game_over) {
				// game_over ();
				break;
			} else {
#ifdef MULTI_LEVEL
				level ++;
				if (level == MAX_LEVELS) 
#endif
				{
					// game_ending ();
					break;
				}
			}
		}

		first_game = 0;
	}
}
Ejemplo n.º 3
0
void main(void) {
	bank_spr (1);
	bank_bg (0);

	ppu_off ();
	first_game = 1;

	// Main loop

	while (1) {	
		pres (palts0, scr_title);

#ifdef MULTI_LEVEL		
		level = 0;
#endif
		plife = PLAYER_LIFE;

		// Game loop

		while (1) {
			scroll (0, SCROLL_Y);
			game_init (); 
			game_loop ();

			if (game_over) {
				pres (palts0, scr_game_over);
				break;
			} else {
#ifdef MULTI_LEVEL
				level ++;
				if (level == MAX_LEVELS) 
#endif
				{
					pres (palts0, scr_the_end);
					break;
				}
			}
		}

		first_game = 0;
	}
}