⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 第09题.c

📁 C语言源代码
💻 C
📖 第 1 页 / 共 2 页
字号:
   setfillstyle(SOLID_FILL,4);arc(x+50,y+i+60,90,180,50);
   arc(x,y+i+10,-90,0,50);
   arc(x-50,y+i+60,0,90,50);
   arc(x,y+i+10,180,270,50);
   floodfill(x-40,y+i+29,12);
   floodfill(x+40,y+i+29,12);
   floodfill(x-40,y+i+32,12);
   floodfill(x+40,y+i+32,12);

  }
   for(k=0;k<40;k++)
      delay(22000);
 }
}





void cachuhuakai(int x,int y)                                                   /*擦除开花*/
{ setcolor(0);
  setfillstyle(SOLID_FILL,0);
  rectangle(x-70,y-10,x+70,y+97);
  floodfill(x,y,10);
}





void pause (int time)                                                           /*声音函数*/
{int t1,t2;
union REGS in,out;
in.h.ah=0x2c;
int86(0x21,&in,&out);
t1=t2=100*out.h.dh+out.h.dl;
while(t2-t1<time)
{int86(0x21,&in,&out);
t2=100*out.h.dh+out.h.dl;
if(t2<t1) t2+=6000;
}
}



void sound1(int freq,int time)
{union{
long divisor;
unsigned char c[4];
}count;
 unsigned char ch;
 count.divisor=1193280/freq;
 outp(67,182);
 outp(66,count.c[0]);
 outp(66,count.c[1]);
 ch=inp(97);
 outp(97,ch|3);
 pause(time);
 outp(97,ch);
 }



void shengyin()
{int i,freq;
int time=1.5*SPEED;
char *qiu="iddgwwwqqgfffddddfghhhgggddgwwwqqgfff\
     ddgghjqqqqqqiwipigigjhgddggqqqhhqwwqjjjggg\
     ddgwwwqqgffddgghjqqqqqq";
char y;
while((y=*qiu++)!=' '){
i=1;
switch(y){
case 'k':time=1*SPEED;    i=0;
case 'l':time=2*SPEED;    i=0;
case 'i':time=4*SPEED;    i=0;
case 'o':time=6*SPEED;    i=0;

case 'a':freq=523;   break;
case 's':freq=587;   break;
case 'd':freq=659;   break;
case 'f':freq=698;   break;
case 'g':freq=784;   break;
case 'h':freq=880;   break;
case 'j':freq=988;   break;
case 'z':freq=262;   break;
case 'x':freq=294;   break;
case 'c':freq=330;   break;
case 'v':freq=349;   break;
case 'b':freq=392;   break;
case 'n':freq=440;   break;
case 'm':freq=494;   break;
case 'q':freq=1047;   break;
case 'w':freq=1175;   break;
case 'e':freq=1319;   break;
case 'r':freq=1397;   break;
case 't':freq=1568;   break;
case 'y':freq=1760;   break;
case 'u':freq=1976;   break;
default:i=0;         break;
}
if (i) sound1(freq,time);
}
}


void HZK_32(int x,int y,int color)                                              /*文字函数*/
{int i,j;

int HZ32_C[32][32]={
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,
0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,
0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,
0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,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,1,1,0,1,1,0,0,0,1,1,0,0,0,0,
0,0,1,1,0,0,1,1,0,0,0,0,1,1,1,0,0,0,1,1,0,1,1,0,0,0,1,1,0,0,0,0,
0,0,1,1,0,0,1,1,0,0,0,1,1,1,0,0,0,0,1,1,0,1,1,0,0,0,1,1,0,0,0,0,
0,0,1,1,1,1,1,1,0,0,1,1,1,0,0,0,0,0,1,1,0,1,1,0,0,0,1,1,0,0,0,0,
0,0,1,1,1,1,1,1,0,1,1,1,0,0,1,1,0,0,1,1,0,1,1,0,0,0,1,1,0,0,0,0,
0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,0,0,0,
0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                      };


for(i=0;i<32;i++)
   for(j=0;j<32;j++)
    if(HZ32_C[i][j])putpixel(x+j,y+i,color);


for(x+=32,i=0;i<32;i++)
   for(j=0;j<32;j++)
    if(HZ32_YU[i][j])putpixel(x+j,y+i,color);

for(x+=32,i=0;i<32;i++)
   for(j=0;j<32;j++)
    if(HZ32_CA[i][j])putpixel(x+j,y+i,color);

for(x+=32,i=0;i<32;i++)
   for(j=0;j<32;j++)
    if(HZ32_YAN[i][j])putpixel(x+j,y+i,color);
}




wenjian()                                                                       /*文件*/
{int i,j;
 int graphdriver=DETECT,graphmode;
 initgraph(&graphdriver,&graphmode,"");
 cleardevice();

 setcolor(10);
 rectangle(0,0,639,479);                                                        /*框*/

 HZK_32(40,70,13);                                                              /*汉字*/

 hua(320,280);                                                                  /*花*/

 shengyin();                                                                    /*声音*/

 huabao(320,165);                                                               /*花苞*/

 tuheihaubao();

 setcolor(4);
 setfillstyle(SOLID_FILL,4);
 ellipse(320,202,0,360,30,36);
 floodfill(320,210,4);

                                                                                /*开花*/
 huakai(320,155);                                                               /*擦除开花*/
 cachuhuakai(320,155);

 HZK_32(40,70,13);

   setcolor(12);                                                                /*盛开的花*/
   setfillstyle(SOLID_FILL,4);
   arc(320+50,155+60,90,180,50);
   arc(320,155+10,-90,0,50);
   arc(320-50,155+60,0,90,50);
   arc(320,155+10,180,270,50);
   floodfill(320-40,155+29,12);
   floodfill(320+40,155+29,12);
   floodfill(320-40,155+32,12);
   floodfill(320+40,155+32,12);

 for(i=0;i<50;i++)
   {setcolor(10);
   setfillstyle(SOLID_FILL,2);
   ellipse(320,290-80-5,230,310,43,50);
   ellipse(320,280,45,135,40,50);
   floodfill(320,240,10);

   hua2(320,155);
   hua3(375,215);
   hua4(265,215);
   hua1(320,224);

   delay(10000);

  }

 feng();

 luoye1(320,280);                                                               /*风*/
 luoye2(320,280);
 luoye3(320,280);

 xiaohuabaoxie(320,280);                                                        /*小花苞谢*/

 luohua3(375,215);
 luohua4(265,215);                                                              /*落花*/
 luohua2(320,155);

 setcolor(0);
 setfillstyle(SOLID_FILL,0);
 arc(320,217,0,360,8);
 floodfill(320,217,0);

 setfillstyle(SOLID_FILL,BLACK);
 bar(265,150,375,260);

 setcolor(6);
 line(320,280-80+45,320,280+250);                                               /*黄杆*/
 line(320+1,280-80+45,320+1,280+250);
 line(320-1,280-80+45,320-1,280+250);
 arc(320+50,280-80-40,188,251,150);
 ellipse(320-100,280-80-35,140,390,17,20);
 ellipse(320-105,280-80-60,205,340,10,30);
 ellipse(320-90,280-80-60,195,340,5,30);
 setfillstyle(SOLID_FILL,6);
 floodfill(320-100,280-80-28,6);
 ellipse(320,280-80,225,315,30,50);
 ellipse(320,280-80,240,300,43,40);
 setfillstyle(SOLID_FILL,6);
 floodfill(320,280-38,6);


 getch();
 closegraph();
}



void Open()                                                                     /*打开文件*/
   {
    wenjian();
    getch();
   }

                                                                                /*重复文件*/
void Repeat()
   { wenjian();}


void Exit()                                                                     /*退出文件*/
 {
     window(20,20,79,20);
     gotoxy(20,20);
     cprintf("Bye--Bye!");
     getchar();
     textbackground(0);
     clrscr();
     exit(1);
 }



int get_key()
{                                                                               /*读键函数,返回按键扫描码*/
     union REGS reg;
     reg.h.ah=0;
     int86(0x16,&reg,&reg);
     return reg.h.ah;
}


void upbar(int y)
{                                                                               /*光标上移*/
      int i;
      struct
            {char ch;
             char attr;
             }
            buf;
      for(i=9;i<=17;i++)
         {gettext(i,y,i,y,&buf);
          buf.attr=0x1f;
          puttext(i,y,i,y,&buf);
          gettext(i,y+1,i,y+1,&buf);
          buf.attr=0x4f;
          puttext(i,y+1,i,y+1,&buf);
          }
          gotoxy(3,y+1);
      }




void downbar(int y)                                                             /*光标下移*/
{
 int i;
 struct
 {
  char ch;
  char attr;
  }
  buf;
    for(i=9;i<=17;i++)
    {
    gettext(i,y,i,y,&buf);
    buf.attr=0x1f;
    puttext(i,y,i,y,&buf);
    gettext(i,y-1,i,y-1,&buf);
    buf.attr=0x4f;
    puttext(i,y-1,i,y-1,&buf);
    }
    gotoxy(3,y-1);
    }







void main()
{                                                                               /*主函数*/
   int key,y;
   char ch;
   textbackground(0);
   clrscr();                                                                    /*背景黑色*/
   do
     {
      textbackground(13);
      textcolor(RED);
      window(7,8,19,14);
      clrscr();
      textbackground(1);
      textcolor(RED);
      window(8,9,18,13);
      clrscr();
      gotoxy(3,2);cprintf("Open\r");
      gotoxy(3,3);cprintf("Repeat\r");
      gotoxy(3,4);cprintf("Exit\r");
      y=10;
      upbar(y-1);
      do
      {
       key=get_key();
       switch(key)
        {
         case key_open:y=10,key=key_enter;break;                                /*执行键盘上获取的信息*/
         case key_Repeat:y=11,key=key_enter;break;
         case key_exit:y=12,key=key_enter;break;
         case key_down:if(y<12)
         {upbar(y);y++;}break;
         case key_up:if(y>10)
         {downbar(y);y--;}break;
        }
      }
      while(key!=key_enter);
      textcolor(WHITE);
      switch(y)
       {case 10:Open();break;
        case 11:Repeat();break;
        case 12:Exit();break;
        }
      }while(1);
      }



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -