Program Man; {Zagolovok programi}
Uses Graph,Crt; {Ima modula}
Var x,y: integer; {Obyvlenia peremenih}
Xman,Yman: Word; {Word - 0..65535 bezznakoviy,integer -32768..32768}
Procedure Zastavka;
begin
Clrscr; {Ochistaet aktivnoe okno i stavit kursor v verchniy leviy ugol}
Textbackground(3); {Ustanavlevaet cvet fona}
Window(10,5,70,20); {Opredelaet na ekran tekstovoe okno}
Clrscr; {Ochistaet aktivnoe okno i stavit kursor v verchniy leviy ugol}
GotoXY(24,25); {Peremechaet kursor v zadanau poziciu ekrana}
Write(' Житомирский кооперативный коледж бизнусу и прва '); {Vivod na ekran soobchenia}
GotoXY(20,10); {Peremechaet kursor v zadanau poziciu ekrana}
Write('Выполнил студент группы ТП-9_31'); {Vivod na ekran soobchenia}
GotoXY(20,12); {Peremechaet kursor v zadanau poziciu ekrana}
Write('ПВС'); {Vivod na ekran soobchenia}
GotoXY(29,15); {Peremechaet kursor v zadanau poziciu ekrana}
Write('2006'); {Vivod na ekran soobchenia}
Readln; {Chtenie}
Clrscr; {Ochistaet aktivnoe okno i stavit kursor v verchniy leviy ugol}
end;
Procedure Graf;
Var Gd,Gm: Integer; {Obavlenie peremenih}
Begin
Gd:=Detect; {Avtoopredelenie aparatnogo obespechenia}
InitGraph(Gd,Gm,'C:\Tp7\'); {Zagruzaet graficheskiy drayver}
If GraphResult<>grOk Then Begin {Vozvrachaet kod oshibki dla posledney graficheskoy operacii}
Writeln ('Error!'); {Vivod na ekran soobchenia}
Readln; {Chtenie}
Halt(1); {Ostanavlevaet programu i vuhodit v OS}
End;
End;
Procedure Hands;
Begin
{Pravaya Ruk }
Line (Xman+30,Yman+30,Xman+30,Yman+80);
Line (Xman+30,Yman+30,Xman+80+x,Yman+120-y);
Line (Xman+80+x,Yman+120-y,Xman+50+x,Yman+120-y);
Line (Xman+30,Yman+60,Xman+50+x,Yman+120-y);
{===========}
{Levaya Ruka}
Line (Xman-30,Yman+30,Xman-30,Yman+60);
Line (Xman-30,Yman+30,Xman-80-x,Yman+120-y);
Line (Xman-80-x,Yman+120-y,Xman-50-x,Yman+120-y);
Line (Xman-30,Yman+60,Xman-50-x,Yman+120-y);
{===========}
End;
Procedure Legs;
Begin
{Pravaya Nog }
Line (Xman,Yman+150,Xman+30,Yman+150);
Line (Xman+30,Yman+150,Xman+70+x,Yman+250-y);
Line (Xman+70+x,Yman+250-y,Xman+40+x,Yman+250-y);
Line (Xman+40+x,Yman+250-y,Xman,Yman+150);
{===========}
{Levaya Nog }
Line (Xman,Yman+150,Xman-30,Yman+150);
Line (Xman-30,Yman+150,Xman-70-x,Yman+250-y);
Line (Xman-70-x,Yman+250-y,Xman-40-x,Yman+250-y);
Line (Xman-40-x,Yman+250-y,Xman,Yman+150);
{==========}
End;
Procedure Glaza;
begin
Circle (Xman-10,Yman-3,5); {Glaz leviy}
Circle (Xman+10,Yman-3,5); {Glaz praviy}
End;
Begin
Zastavka;
Graf; {Procedura Graph}
Xman:=GetMaxx div 2; {Ichet max tochku po gorizontale}
Yman:=GetMaxy div 3; {Ichet max tochku po vertikale}
{’г«®ўЁйҐ}
Circle (Xman,Yman,30); {Golova}
Rectangle (Xman-10,Yman+15,Xman+10,Yman+20); {pramougolnik - Korpus celiy}
SetFillStyle (1,LightGray); {Styl i cvet zalivki golovi}
FloodFill (Xman,Yman,White); {Zakrashuet zamknutuu oblast(golovu)ispolzua tekuchiy stil i cvet zakraski}
Rectangle (Xman-30,Yman+30,Xman+30,Yman+150); {Pramougolnik - verhnaa chast korpusa}
SetFillStyle (1,Green); {Styl i cvet zalivki verhney chasti korpusa }
FloodFill (Xman,Yman+40,White); {Zakrashuet zamknutuu oblast(tulovihca)ispolzua tekuchiy stil i cvet zakraski}
Line (Xman-30,Yman+120,Xman+30,Yman+120); {Linia kotoray delit korpus}
SetFillStyle (1,Red); {Styl i cvet zalivki nizney chasti korpusa }
FloodFill (Xman,Yman+130,White); {Zakrashuet zamknutuu oblast(tulovihca)ispolzua tekuchiy stil i cvet zakraski}
{========}
Repeat
{Operatoru mezdu slovami REPEAT i UNTIL povtorayuca do teh por poka BULEVO virazenie TRUE}
x:=0; y:=0;
Setcolor (White); {Ustanavlevaet tekuchiy cvet, ispolzuy palitru}
SetFillStyle (1,Green); {Styl i cvet zalivki ruk kogda oni opuskautsa }
Hands; {Procedura Ruki}
Legs; {Procedura nogi}
Glaza; {Procedura Glaza}
SetFillStyle (1,Black); {Styl i cvet zalivki glaz}
FloodFill (Xman+10,Yman-3,White); {Zakrashuet zamknutuu oblast(Glaz pravy)ispolzua tekuchiy stil i cvet zakraski}
FloodFill (Xman-10,Yman-3,White); {Zakrashuet zamknutuu oblast(Glaz pravy)ispolzua tekuchiy stil i cvet zakraski}
SetFillStyle (1,Green); {Styl i cvet zalivki ruk kogda oni opuskautsa }
FloodFill (Xman+32,Yman+42,White); {Zakrashuet zamknutuu oblast(Ruka pravy)ispolzua tekuchiy stil i cvet zakraski}
FloodFill (Xman-32,Yman+42,White); {Zakrashuet zamknutuu oblast(Ruka levay)ispolzua tekuchiy stil i cvet zakraski}
SetFillStyle (1,Red); {Styl i cvet zalivki nog kogda oni opuskautsa }
FloodFill (Xman+10,Yman+152,White); {Zakrashuet zamknutuu oblast(noga pravy)ispolzua tekuchiy stil i cvet zakraski}
FloodFill (Xman-10,Yman+152,White); {Zakrashuet zamknutuu oblast(noga levay)ispolzua tekuchiy stil i cvet zakraski}
Sound (500); {Vkluchaet vnutreniy dinamik komputera}
Delay (50000); {Priostonavluet vupolnenie programi na zadanoe chislo milisikund}
Nosound; {Vikluchaet vnutreniy dinamik komputera}
Setcolor (Black); {Ustanavlevaet tekuchiy cvet, ispolzuy palitru}
SetFillStyle (1,Black); {Styl i cvet zalivki nog i ruk kogda oni opuskautsa}
Hands; {Procedura Ruki}
Legs; {Procedura Nogi}
Glaza; {Procedura Glaza}
FloodFill (Xman+10,Yman-3,Black); {Zakrashuet zamknutuu oblast(Glaz pravy)ispolzua tekuchiy stil i cvet zakraski}
FloodFill (Xman-10,Yman-3,Black); {Zakrashuet zamknutuu oblast(Glaz pravy)ispolzua tekuchiy stil i cvet zakraski}
FloodFill (Xman+32,Yman+42,Black); {Zakrashuet zamknutuu oblast(ruka levay)ispolzua tekuchiy stil i cvet zakraski}
FloodFill (Xman-32,Yman+42,Black); {Zakrashuet zamknutuu oblast(ruka pravy)ispolzua tekuchiy stil i cvet zakraski}
FloodFill (Xman+10,Yman+152,Black); {Zakrashuet zamknutuu oblast(noga levay)ispolzua tekuchiy stil i cvet zakraski}
FloodFill (Xman-10,Yman+152,Black); {Zakrashuet zamknutuu oblast(noga pravy)ispolzua tekuchiy stil i cvet zakraski}
x:=50; y:=30;
Setcolor (White); {Ustanavlevaet tekuchiy cvet, ispolzuy palitru}
{Styl i cvet zalivki ruk kogda oni podnimauca}
Hands; {Procedura Ruki}
Legs; {Procedura Nogi}
Glaza; {Procedura Glaza}
SetFillStyle (1,White); {Styl i cvet zalivki glaz }
FloodFill (Xman+10,Yman-3,White); {Zakrashuet zamknutuu oblast(Glaz pravy)ispolzua tekuchiy stil i cvet zakraski}
FloodFill (Xman-10,Yman-3,White); {Zakrashuet zamknutuu oblast(Glaz pravy)ispolzua tekuchiy stil i cvet zakraski}
SetFillStyle (1,Green); {Styl i cvet zalivki ruk kogda oni podnimauca}
FloodFill (Xman+32,Yman+42,White); {Zakrashuet zamknutuu oblast(ruka pravy)ispolzua tekuchiy stil i cvet zakraski}
FloodFill (Xman-32,Yman+42,White); {Zakrashuet zamknutuu oblast(ruka levay)ispolzua tekuchiy stil i cvet zakraski}
SetFillStyle (1,Red); {Styl i cvet zalivki nog kogda oni podnimauca}
FloodFill (Xman+10,Yman+152,White); {Zakrashuet zamknutuu oblast(noga levay)ispolzua tekuchiy stil i cvet zakraski}
FloodFill (Xman-10,Yman+152,White); {Zakrashuet zamknutuu oblast(noga pravy)ispolzua tekuchiy stil i cvet zakraski}
Sound (1000); {Vkluchaet vnutreniy dinamik komputera}
Delay (50000); {Priostonavluet vupolnenie programi na zadanoe chislo milisikund}
Nosound; {Vikluchaet vnutreniy dinamik komputera}
Setcolor (Black); {Ustanavlevaet tekuchiy cvet, ispolzuy palitru}
SetFillStyle (1,Black); {Styl i cvet zalivki nog i ruk kogda oni podnimauca}
Hands; {Procedura Ruki}
Legs; {Procedura Nogi}
Glaza; {Procedura Glaza}
FloodFill (Xman+10,Yman-3,Black); {Zakrashuet zamknutuu oblast(Glaz pravy)ispolzua tekuchiy stil i cvet zakraski}
FloodFill (Xman-10,Yman-3,Black); {Zakrashuet zamknutuu oblast(Glaz pravy)ispolzua tekuchiy stil i cvet zakraski}
FloodFill (Xman+32,Yman+42,Black); {Zakrashuet zamknutuu oblast(ruka pravy)ispolzua tekuchiy stil i cvet zakraski}
FloodFill (Xman-32,Yman+42,Black); {Zakrashuet zamknutuu oblast(ruka levay)ispolzua tekuchiy stil i cvet zakraski}
FloodFill (Xman+10,Yman+152,Black); {Zakrashuet zamknutuu oblast(noga pravy)ispolzua tekuchiy stil i cvet zakraski}
FloodFill (Xman-10,Yman+152,Black); {Zakrashuet zamknutuu oblast(noga levay)ispolzua tekuchiy stil i cvet zakraski}
Until Keypressed; {Opredelaet ili bila nazata klavisha na klaviature}
Readln; {Zcituet}
CloseGraph; {Zakrivaet Graficheskuu sistemu}
End.
Сообщение отредактировано: klem4 -