分类:
2008-10-15 16:41:02
#include
#include
#include \"stdio.h\"
#include \"graphics.h\"
#include \"math.h\"
donghua()
{int graphdriver=VGA;
int graphmode=VGAHI;
int i,j;
initgraph(&graphdriver,&graphmode,\"\");
cleardevice();
/************wan nian li*************************/
for(i=0;i<=150;i+=5)
{setcolor(i);
textbackground(RED);
settextstyle(0,0,5);
outtextxy(100,i+140,\"Wan Nian Li\");
delay(10000000);
cleardevice();
}
setcolor(RED);
outtextxy(50,200,\"Loading\");
delay(100000000000);
outtextxy(50,200,\"Loading.\");
delay(100000000000);
outtextxy(50,200,\"Loading..\");
delay(100000000000);
outtextxy(50,200,\"Loading...\");
delay(100000000000);
outtextxy(50,200,\"Loading....\");
delay(100000000000);
outtextxy(50,200,\"Loading.....\");
delay(100000000000);
outtextxy(50,200,\"Loading......\");
delay(100000000000);
outtextxy(50,200,\"Loading.......\");
delay(100000000000);
outtextxy(50,200,\"Loading........\");
delay(100000000000);
outtextxy(50,200,\"Loading.........\");
delay(100000000000);
outtextxy(50,200,\"Loading..........\");
delay(100000000000);
outtextxy(50,200,\"Loading...........\");
outtextxy(50,200,\"Loading............\");
delay(100000000000);
for(i=0;i<=10;i++)
delay(100000000000);
cleardevice();
/*********************printf color*************************/
for(i=0;i<=15;i++) /*15 color of kind*/
{
setbkcolor(i+1);
setcolor(i);
setfillstyle(1,i+1);
for(j=0;j<=600;j++)
{delay(1000);
circle(320,240,j);
floodfill(320,240,i);
}
}
}
/*************menu**********************/
void menu()
{int i,j;
cleardevice();
setbkcolor(GREEN);
for(i=0;i<=100;i++)
{delay(1000);
for(j=0;j<=10;j++)
{setfillstyle(1,LIGHTGREEN);
setcolor(BROWN);
circle(320,240,i);
floodfill(320,240,BROWN);}
}
for(i=0;i<=70;i++)
{delay(1000);
for(j=0;j<=20;j++)
{setfillstyle(1,RED);
setcolor(RED);
circle(220,100,i);
floodfill(220,100,RED);}
}
setcolor(YELLOW);
settextstyle(3,0,5);
outtextxy(190,75,\"Run\");
for(i=0;i<=70;i++)
{delay(1000);
for(j=0;j<=20;j++)
{setfillstyle(1,BLUE);
setcolor(BLUE);
circle(420,100,i);
floodfill(420,100,BLUE);}
}
setcolor(RED);
settextstyle(3,0,5);
outtextxy(375,75,\"Game\");
for(i=0;i<=70;i++)
{delay(1000);
for(j=0;j<=20;j++)
{setfillstyle(1,LIGHTBLUE);
setcolor(LIGHTBLUE);
circle(220,380,i);
floodfill(220,380,LIGHTBLUE);}
}
setcolor(RED);
settextstyle(3,0,5);
outtextxy(165,360,\"Me\");
for(i=0;i<=70;i++)
{delay(1000);
for(j=0;j<=20;j++)
{setfillstyle(1,LIGHTRED);
setcolor(LIGHTRED);
circle(420,380,i);
floodfill(420,380,LIGHTRED);}
}
setcolor(YELLOW);
settextstyle(3,0,5);
outtextxy(390,360,\"Exit\");
setcolor(BLUE);
settextstyle(3,0,6);
delay(1500000);
outtextxy(280,210,\"Help\");
/***********draw line*******************/
for(i=130;i<=500;i++)
{for(j=0;j<=100;j++)
delay(10);
setcolor(BLUE);
line(130,20,i,20);
delay(10);
line(128,18,i+2,18);
}
for(i=20;i<=460;i++)
{for(j=0;j<=100;j++)
delay(10);
setcolor(BLUE);
line(500,20,500,i);
delay(10);
line(502,18,502,i+2);
}
for(i=500;i>=130;i--)
{for(j=100;j>=0;j--)
delay(10);
setcolor(BLUE);
line(500,460,i,460);
delay(10);
line(502,462,i-2,462);
}
for(i=460;i>=20;i--)
{for(j=100;j>=0;j--)
delay(10);
setcolor(BLUE);
line(130,460,130,i);
delay(10);
line(128,462,128,i-2);
}
[1]