home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / grafik / dc / boot.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-10-21  |  2.8 KB  |  89 lines

  1. {
  2.   Copyright 1992 by Digital Crime.
  3.  
  4.   All rights reserved.
  5.  
  6.   Permission to use, copy, modify, and distribute this software and its
  7.   documentation for any purpose and without fee is hereby granted,
  8.   provided that the above copyright notice appear in all copies and that
  9.   both that copyright notice and this permission notice appear in
  10.   supporting documentation, and that the name of the Digital Crime
  11.   not be used in advertising or publicity pertaining to distribution
  12.   of the software without specific, written  prior permission.
  13.  
  14.   DIGITAL CRIME DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
  15.   SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  16.   AND FITNESS, IN NO EVENT SHALL DIGITAL CRIME BE LIABLE FOR ANY SPECIAL,
  17.   INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
  18.   FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
  19.   NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
  20.   WITH THE USE OR PERFORMANCE OF THIS  SOFTWARE.
  21.  
  22.   s924683@minyos.xx.rmit.OZ.AU   Chandi.
  23.   s924698@minyos.xx.rmit.OZ.AU   Ed.
  24.  
  25. }
  26. {$R-}
  27.  
  28. program Boot;
  29.  
  30. uses SVGA, Crt;
  31.  
  32. const    MaxX = 630;  MaxY = 470;
  33.          MinX = 10;   MinY = 80;
  34.  
  35. var  Vx1, Vy1, Vx2, Vy2, i, j, x1,y1,x2,y2,x3,y3,x4,y4 : integer;
  36.      Ch : char;
  37.  
  38. begin
  39.   i := 0; j := 128;
  40.   SetMode( SVGAMED );
  41.   LoadPalette( 'boot.pal' );
  42.   LoadFont( StandardFont );
  43.   repeat
  44.   Randomize;
  45.   Vx1 := 1; Vy1 := 1;
  46.   Vx2 := -1; Vy2 := -1;
  47.   x1 := Random( Random(GetMaxX) );
  48.   y1 := Random( Random(GetMaxY-80) +80);
  49.   x2 := Random( Random(GetMaxX) );
  50.   y2 := Random( Random(GetMaxY-80) +80);
  51.   x3 := Random( Random(GetMaxX) );
  52.   y3 := Random( Random(GetMaxY-80) +80);
  53.   x4 := Random( Random(GetMaxX) );
  54.   y4 := Random( Random(GetMaxY-80) +80);
  55.   SetFontColor( 64, 0, True );
  56.   OutTextXY( 10,10,'DIGITAL CRIME PRODUCTIONS 1992' );
  57.   repeat
  58.     if (x3 > MaxX) Or (x2 > MaxX) then Vx1 := -1;
  59.     if (x1 > MaxX) or (x4 > MaxX) then Vx2 := -1;
  60.     if (y3 > MaxY) Or (y2 > MaxY) then Vy1 := -1;
  61.     if (y1 > MaxY) or (y4 > MaxY) then Vy2 := -1;
  62.     if (x3 < MinX) Or (x2 < MinX) then Vx1 := 1;
  63.     if (x1 < MinX) or (x4 < MinX) then Vx2 := 1;
  64.     if (y3 < MinY) Or (y2 < MinY) then Vy1 := 1;
  65.     if (y1 < MinY) or (y4 < MinY) then Vy2 := 1;
  66.     x1 := x1+Vx2;
  67.     y1 := y1+Vy2;
  68.     x2 := x2+Vx1;
  69.     y2 := y2+Vy1;
  70.     x3 := x3+Vx1;
  71.     y3 := y3+Vy1;
  72.     x4 := x4+Vx2;
  73.     y4 := y4+Vy2;
  74.     if i <> 256 then i := i + 1
  75.       else i := 0;
  76.     if j <> 256 then j := j + 1
  77.       else j := 0;
  78.     Line( x1, y1, x2, y2, i );
  79.     Line( x3, y3, x4, y4, j );
  80.   until keypressed;
  81.     Ch := Readkey;
  82.     if Ch <> 'q' then
  83.       ClearPort( 0, 0, GetMaxX, GetMaxY );
  84.     OutTextXY( 10,10,'DIGITAL CRIME PRODUCTIONS 1992' );
  85.     i := 0;
  86.     j := 128;
  87.   until Ch = 'q';
  88.   ExitGraphics;
  89. end.