Ejemplo n.º 1
0
/*******************************************************************************
* Function Name  : dis_circle
* Description    : display the picture as the type of circle
* author         :zhangxianyuan
* Input          : - file: pointer to the source file name
*                  - line: assert_param error line source number
* Output         : None
* Return         : None
*******************************************************************************/
void dis_circle(void)
{
	int i;
	for(i = 1; i < 200; i++)
	{
		LCD_DrawCircle1(120, 160, i);
		if(i > 20 && i < 140)
		LCD_DrawCircle2(120, 160, i - 20);
		if(i > 40 && i < 160)
		LCD_DrawCircle1(120, 160, i - 40);
		if(i > 60 && i < 180)
	    LCD_DrawCircle2(120, 160, i - 60);	
		if(i > 80)
	    LCD_DrawCircle1(120, 160, i - 80);
		if(i > 100)
	    LCD_DrawCircle2(120, 160, i - 100);
		if(i > 120)
	    LCD_DrawCircle1(120, 160, i - 120);
		if(i > 140)
	    LCD_DrawCircle2(120, 160, i - 140);
		if(i > 160)
	    LCD_DrawCircle1(120, 160, i - 160);
		if(i > 180)
	    LCD_DrawCircle2(120, 160, i - 180);
	}
}
void ShowSpecial2(void)
{
	unsigned int  dd,i,m;
	int k ,l;
	u16 fill3;
//	u16 fill1,fill2	
//	unsigned int color[] = {White,Black,Grey,Blue,Blue2,Red,Magenta,Green,Cyan,Yellow };
	int color[10] = {0xFFFF,0x0000,0xF7DE,0x001F,0x051F,0xF800,0xF81F,0x07E0,0x7FFF,0xFFE0};
	
	address_set(0,0,239,319);
	for(i = 0; i < 76800; i++)
    {
		dd=(0x00|girl_1[i*2 + 1])<<8;
		dd=dd|girl_1[i*2];  	
	    LCD_WriteRAM(dd);
	}

	   for(k = 1; k < 7; k++)
	   {
		 for(i = 1; i < 120 ; i++)
		 {
//		 	if(i > 0 && i <= 10)  {fill1 = White; fill2 = Black;}
//			if(i > 10 && i <= 40) {fill1 = Black; fill2 = White;}
//			if(i > 40 && i <= 50) {fill1 = White; fill2 = Black;}
//			if(i > 50 && i <= 80) {fill1 = Black; fill2 = White;}
//			if(i > 80 && i <= 90) {fill1 = White; fill2 = Black;}
//			if(i > 90 && i <= 120){fill1 = Black; fill2 = White;}

		 	if(i == 1)  {fill3 = rand()%10;}
			if(i == 11) {fill3 = rand()%10;}
			if(i == 41) {fill3 = rand()%10;}
			if(i ==51) {fill3 = rand()%10;}
			if(i == 81) {fill3 = rand()%10;}
			if(i == 91){fill3 = rand()%10;}
//			if(k & 1 == 1)  
//				fill3 = fill1;
//			else  
//				fill3 = fill2;
			LCD_DrawCircle1(120, 160, i, color[fill3]);
		 }
	}
		 
	 for(l = 1; l <= 16; l++)
	 {
	// 	for(i=0; i < 20; i++)
	//	{
			for(k = 1; k <= 12; k++)
			{
				if((k&1) == 0)
				{
					address_set((k-1)*20, 0, k*20, l*20);
		//			fill1 = Black ;
		//			fill1 = color[rand()%10];
		//			fill2 = Green ;
		//			fill2 = color[rand()%10];
				}
				if((k&1) == 1)
				{											 
					address_set((k-1)*20, (320-l*20), k*20, 320);
		//			fill1 = color[rand()%10];
		//			fill2 = color[rand()%10];
				}
				fill3 = color[rand()%10];
				for(m = 0; m < 20*l*20; m++)  
				{
			//		if((l&1) == 1)
			//		{
			//			fill3 = fill1;
			//		}
			//		if((l&1) == 0)
			//		{
			//			fill3 = fill2;
			//		}					
					LCD_WriteRAM(fill3);	   
				}
			}
		//}
	 }
	for(i = 24; i > 0; i--)
    {	
		address_set((i-1)*10, 0, 239, 319);   //设置坐标   
		for(k=0; k < (25-i)*3200; k++)		 
		{
			dd=(0x00|girl_1[k*2 + 1])<<8;
	        dd=dd|girl_1[k*2];  	
	        LCD_WriteRAM(dd);
	   	}
	}
}