C language code simple animation program
Users questions: The past few days to practice, I started freshman year learning C language, practice the following topics: Fun animation program design in the graphics state, an animation programming design, animation can choose the specific content, such as the free fall exercise, Interested students have the ability to consider accompanied by appropriate sounds and scenes Make the animation look more lively. Now this ignorant and do not know how and animation link C (Class C school is under the DOS interface) hope master can give me help, introduction, how is started, how should I do or give me a better under study site, short help me out This topic can be
Experts answer: # include math.h # include stdio.h # include graphics.h # include dos.h # definepi3.1415926 535doubleca3mm1 (doublem1, doublem2); doubleca3fm1 (doublecosine, doublesine); doubleca5fm2 (doublea6m, Doubs intx,inty,intx1,inty1);charbuf();main(){doublem=3.0;doublexo=100.0,yo=200.0,a1=30.0,t1=pi;doublexc=x o+m*a1,yc=yo;doublea2=8.0,a3,a4=25.0,a5=30.0,a6=20.0,a7=35.0;doublet2,t3,t4,t5,t6,t7;doublexo1=xo+m* e(SOLID_FILL,DARKGRAY);bar(0,0,640,480);mybutton(10,10, BEGIN ,1,0);mybutton(500,10, EXIT ,1,0);line (0,69,640,69);mouseinit();changemousecross();setmousexy(320,20);mouseshow();setmousearea(0,0,640,60) ;do{if(inbox(10,10,70,26)&&button()==1){mousehide();mybutton(10,10, BEGIN ,0,0);mouseshow();mousehol d();mousehide();mybutton(10,10, BEGIN ,1,7);mouseshow();break;}if(inbox(500,10,555,26)&&button()==1) {mousehide();mybutton(500,10, EXIT ,0,0);mouseshow();mousehold();mousehide();mybutton(500,10, EXIT , 1,7);mouseshow();exit(0);}if(buf()==56)for(i=0;i 10000;i++){switch(buf()){case18:{mousehide();mybutt on(500,10, EXIT ,0,0);mouseshow();delay(4000);mousehide();mybutton(500,10, EXIT ,1,7);mouseshow();ex