Example #1
0
void MidiModule::draw()
{
	PA_Clear8bitBg(BOTTOM_SCREEN);
	PA_8bitText(BOTTOM_SCREEN, 2, 2, 255, 40,(char*)"Midi Settings",WHITE,1,1,130);
	
	if (this->status == MIDI_STATUS_DISCONNECTED)
	{
		PA_8bitText(BOTTOM_SCREEN, 2, 15, 255, 40,(char*)"Press [A] to connect to MIDI...",WHITE,1,1,130);
	}
	else
	{
		PA_8bitText(BOTTOM_SCREEN, 2, 15, 255, 40,(char*)"Status: -- Connected --",WHITE,1,1,130);
	}		   	
}
Example #2
0
void FileSelector::draw()
{
	int i;
	int y_pos = 0;
	
	PA_Clear8bitBg(this->screen);

	// Draw grid border
	PA_Draw8bitLine(this->screen,7,7,231,7,WHITE);
	PA_Draw8bitLine(this->screen,7,183,231,183,WHITE);
	PA_Draw8bitLine(this->screen,7,7,7,183,WHITE);	
	PA_Draw8bitLine(this->screen,231,7,231,183,WHITE);

	// Draw white background box on bottom
   draw8bitRectEx(7, 168, 225, 15, 0, WHITE);	

	PA_8bitText(this->screen, 14, 173, 255, 40,(char*)"UP/DOWN - select engine   |   A - load",DARK_BLUE,1,1,130);		         

	int text_x_offset = 14;

	for(i = this->file_offset; i < (this->file_offset + 9); i++)
	{
		if ((y_pos < 4) && (i>=0) && (i<=number_of_files))
		{   
	   	PA_8bitText(this->screen, text_x_offset, (y_pos * 12)+35, 255, 40,(char*)this->filenames[i].c_str(),1,0,0,100);
		} 
		
	   if (y_pos == 4)
	   {
	      PA_8bitText(this->screen, text_x_offset, 90, 255, 40,(char*)this->filenames[i].c_str(),WHITE,2,0,100);
		} 

		if ((y_pos > 4) && (i >= 0) && (i <= this->number_of_files))
		{   
	   	PA_8bitText(this->screen, text_x_offset, (y_pos * 12)+55, 255, 40,(char*)this->filenames[i].c_str(),1,0,0,100);
		}		
		 
		y_pos++;
	}

	engine_swatches.draw();
  
}
Example #3
0
void MidiModule::midi_connect()
{
	PA_Clear8bitBg(BOTTOM_SCREEN);
	   
	PA_8bitText(BOTTOM_SCREEN, 3, 3, 255, 40,"Searching for WIFI-MIDI...",1,1,0,100);

	dsmi_setup_wifi_support();

	int res = dsmi_connect();

	if (res == 0)
	{
		PA_8bitText(BOTTOM_SCREEN, 3, 15, 255, 40,"No WIFI-MIDI detected.",1,1,0,100);
		this->status = MIDI_STATUS_DISCONNECTED;
	}		
	else
	{
	   PA_8bitText(0, 3, 15, 255, 40,"Connected to WIFI-MIDI!",1,1,0,100);
		this->status = MIDI_STATUS_CONNECTED;
	}   
}
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()