home *** CD-ROM | disk | FTP | other *** search
- Program Prllx03;
-
- Uses Mode13h,Crt;
-
- Var Xcloud1,Width1:Integer;
- Xcloud2,Width2:Integer;
-
- Var Xland,Width:Integer;
-
- Procedure ScrollUpLand;
- Begin
- WaitVbl;
- Move(Mem[Vp[2]:320],Mem[Vp[2]:0],63680);
-
- Line(0,199,319,199,2,Vp[2]);
-
- Line(Xland,199,Xland+Width,199,1,Vp[2]);
- Xland:=Xland+Random(5)-2;
- If Xland<0 Then Xland:=0;
- If Xland>319 Then Xland:=319;
- Width:=Width+Random(5)-2;
- If Width+Xland>319 Then Width:=319-Xland;
- End;
-
- Procedure ScrollUpClouds;
- Begin
- Move(Mem[Vp[1]:320],Mem[Vp[1]:0],63680);
-
- Line(0,199,319,199,0,Vp[1]);
-
- { Cloud number one }
- Line(Xcloud1,199,Xcloud1+Width1,199,3,Vp[1]);
- Xcloud1:=Xcloud1+Random(5)-2;
- If Xcloud1<0 Then Xcloud1:=0;
- If Xcloud1>319 Then Xcloud1:=319;
- Width1:=Width1+Random(5)-2;
- If Width1+Xcloud1>319 Then Width1:=319-Xcloud1;
- { Cloud number two }
- Line(Xcloud2,199,Xcloud2+Width2,199,3,Vp[1]);
- Xcloud2:=Xcloud2+Random(5)-2;
- If Xcloud2<0 Then Xcloud2:=0;
- If Xcloud2>319 Then Xcloud2:=319;
- Width2:=Width2+Random(5)-2;
- If Width2+Xcloud2>319 Then Width2:=319-Xcloud2;
- End;
-
- Procedure GlobalInit;
- Begin
- Randomize;
- Initgraph;
- InitVirt;
- End;
-
- Procedure GlobalClose;
- Begin
- Closegraph;
- Closevirt;
- End;
-
- Procedure CloudInit;
- Begin
- SetColor(0,0,0,0);
- SetColor(3,55,55,55);
- Width1:=50; Width2:=50;
- Xcloud1:=50; Xcloud2:=250;
- Cls(0,Vp[1]);
- End;
-
- Procedure LandInit;
- Begin
- SetColor(0,0,0,0);
- SetColor(1,0,50,0);
- SetColor(2,0,25,63);
- Width:=150;
- Xland:=50;
- Cls(0,Vp[2]);
- End;
-
- Procedure CopyPage_T(From,Too:Word);
- Var Offs:Word;
- Begin
- For Offs:=0 To 63999 Do
- If Mem[From:Offs]<>0 Then Mem[Too:Offs]:=Mem[From:Offs];
- End;
-
- Begin
- GlobalInit;
- CloudInit;
- LandInit;
-
- Repeat
- ScrollUpLand;
- CopyPage(Vp[2],Vp[3]);
- ScrollUpClouds;
- CopyPage_T(Vp[1],Vp[3]);
- CopyPage(Vp[3],Vga);
- CopyPage(Vp[2],Vp[3]);
- ScrollUpClouds;
- CopyPage_T(Vp[1],Vp[3]);
- CopyPage(Vp[3],Vga);
- Until Keypressed;
-
- GlobalClose;
- End.
-