Class C draws a small person

xiaoxiao2021-03-06  105

I wrote in the early days, didn't add any comments, I was proud of myself, ^ _ ^!

#include void bike (); main () {int i, graphdrive = DETECT, graphmode; registerbgidriver (EGAVGA_driver); registerbgifont (TRIPLEX_FONT); initgraph (& graphdrive, & graphmode, "f: // tc"); For (i = 0; i <= 519; i = 1) {setViewPort (519-i, 120, 639-i, 360, 0); Bike (60, 120, i); ClearviewPort ();}} void Bike (int MIDX, INT MIDY, INT I) {Int Y, DX, DY, X1, X2, Y1, Y2; setBkcolor (LightGreen); setFillStyle (0, lightgreen); setColor (red); y = I% 30; setLinesTyle (0,0 , 1); Circle (MIDX, MIDY, 5); Circle (MIDX-35, Midy, 22); Circle (MIDX 35, MIDY, 22); Circle (MIDX 35, MIDY, 3); PIESLICE (MIDX, Midy, 0, 360, 1); LINE (MIDX 1, Midy 5, MIDX 35, MIDY 3); LINE (MIDX 1, MIDY-5, MIDX 35, MIDY-3); PIESLICE (MIDX-35 , MIDY, I, I 60, 22); PIESLICE (MIDX-35, MIDY, I 120, I 180, 22); PIESLICE (MIDX-35, MIDY, I 240, I 300, 22); Pieslice (MIDX 35, MIDY, I, I 60, 22); Piemelice (MIDX 35, MIDY, I 120, I 180, 22); Piemelice (MIDX 35, MIDY, I 240, I 300, 22); X1 = MIDX-30; Y1 = MIDY-32; X2 = MIDX 20; Y2 = MIDY-30; MoveTo (x2, y2); LineRel (0, -3); Moveto (x2, y2) Lineeel (30, 0); Moveto (x2 30, y2); LINETO (MIDX 35, MIDY); MoveTo (x2 10, y2); Lineto (MIDX 35, MIDY) SetColor (Blue); LINE (X2, Y2-7, X2, Y2-44); Circle (x2, y2-52, 8); if (Y <15) {line (x2, y2-7, midx-5 , MIDY-25); LINE (X2, Y2-7, MIDX 5, MIDY-35); LINE (MIDX-5, MIDY-25, MIDX-5, MIDY 5); LINE (MIDX 5, Midy- 35, MIDX 5, MIDY-5); LINE (MIDX-6, Midy 5, MIDX-2, Midy 5); LINE (MIDX 2, MIDY-5, MIDX 6, MIDY-5);} Else {Line (x2, y2-7, midx-5, midy-35); line (x2, y2-7, midx 5, midy-25); line (MIDX-5, MIDY-35, MIDX-5, MIDY-5); LINE (MIDX 5, MIDY-25, MIDX 5, MIDY 5); LINE (MIDX-6, MIDY-5, MIDX-2, MIDY-5); LINE (MIDX 2, MIDY 5, MIDX 6, MIDY 5);

转载请注明原文地址:https://www.9cbs.com/read-126136.html

New Post(0)