Example #1
0
/**
**Splash init function
**/
void Splash::init(){

	PA_SetBrightness(0, 31); // all White
	PA_SetBrightness(1, 31); // all White	
	
	// Load splash while hidden
	PA_LoadGif(	1, (void*)splash_top); // Gif File
	PA_LoadGif(	0, (void*)splash_bottom); // Gif File
	
	//Give backgrounds time to load
	for(uint i = -5; i <= 0; i++){
		PA_WaitForVBL();		   
	}   
}
Example #2
0
/**
**Splash init function
**/
void Menu::init(){
	PA_Init8bitBg(0,0); //Init backgrounds
	PA_InitBgTrans(0);
	
	PA_LoadGif(	0, (void*)main_image); // Gif File
	
	//Give backgrounds time to load
	for(uint i = -5; i <= 0; i++){
		PA_WaitForVBL();		   
	}  

}
Example #3
0
// Function: main()
int main(int argc, char ** argv)
{
	PA_Init();    // Initializes PA_Lib
	PA_InitVBL(); // Initializes a standard VBL
	
	PA_InitText(1, 0);
	
	PA_SetBrightness(0, 31);
	
	PA_Init8bitBg(0, 3);
	PA_LoadGif(0, (void*)test);
	


	irqSet(IRQ_HBLANK, HBL_function);
	irqEnable(IRQ_HBLANK);
	
	u8 i;
	level = 0; 
	while(1){
	   PA_OutputText(1, 8, 10, "Fading in, white  ");
		for(level = 0; level < 80; level++) PA_WaitForVBL();
		for(i = 0; i < 60; i++) PA_WaitForVBL(); // Wait 1 second
		
		black = 1;
		PA_OutputText(1, 8, 10, "Fading out, black ");
		for(level = 80; level > 0; level--) PA_WaitForVBL();	
		for(i = 0; i < 60; i++) PA_WaitForVBL(); // Wait 1 second
		
	   PA_OutputText(1, 8, 10, "Fading in, black  ");
		for(level = 0; level < 80; level++) PA_WaitForVBL();
		for(i = 0; i < 60; i++) PA_WaitForVBL(); // Wait 1 second				
		
		black = 0;		
		PA_OutputText(1, 8, 10, "Fading out, white ");
		for(level = 80; level > 0; level--) PA_WaitForVBL();
		for(i = 0; i < 60; i++) PA_WaitForVBL(); // Wait 1 second		
	}		

	return 0;
} // End of main()
Example #4
0
// Function: main()
int main(int argc, char ** argv){

	PA_Init();    // PA Init...
	PA_InitVBL();	// VBL Init...
	
	PA_Init8bitBg(1, 3); 	// Init a 8 bit Bg on screen 1	
	
	
	PA_InitText(0, 0); // Text on bottom screen
		
	PA_OutputSimpleText(0, 1, 6, "Press Start to pause/unpause");
	PA_OutputSimpleText(0, 1, 7, "Press Up/Down to change speed");
	PA_OutputSimpleText(0, 1, 8, "Press A/B to change StartFrame");
	PA_OutputSimpleText(0, 1, 9, "Press X/Y to change EndFrame");	
	PA_VBLFunctionInit(MyCustomVBL); // start the function to play during gif file !

  while(1)  {
 		PA_LoadGif(	1, (void*)bartman); // Gif File to play over and over again
 		PA_Clear8bitBg(1); // Clear the screen after use
		PA_WaitForVBL();
	}
		
	return 0;
} // End of main()