Metropoli BBS
VIEWER: geftals.pas MODE: TEXT (ASCII)
Program Geftals;
uses crt;

{$L VGAKIT1.OBJ}
procedure Set320by400Mode;external;
procedure Setcolor(col:word);external;
procedure Rectangle(x0,y0,x1,y1:word);external;
procedure Putpixel(xk,yk,col,tcol:word);external;
function  Getpixel(xk,yk:word):byte;external;
procedure Showpage(page:word);external;
procedure Procpage(page:word);external;
procedure Cline(x0,y0,x1,y1,col:word);external;
procedure Cbar(x0,y0,x1,y1,col:word);external;
procedure Txy(x0,y0,col:word);external;
procedure Tpd(x0,y0,digit,col:word);external;
procedure Textmode;external;
procedure StartAdd(Y:word);external;
procedure setRGBpalette(col,Red,Green,Blue:word);external;
procedure Xpan(pixels:word);external;
procedure RotateRGB(speed:word);external;
procedure Fade(acol,lcol:word);external;

function r(x:real):integer;
begin
     r:=round(x);
end;
var
Sint:array[0..399]of byte;
Cost:array[0..399]of byte;
ch:char;
apu1,x,y:word;
speed,c,tulos:byte;
begin
     for apu1:=0 to 399 do begin
     Sint[apu1]:=r(127*sin(apu1/57.3));
     Cost[apu1]:=r(255*cos(apu1/57.3));end;
     set320by400mode;
     for c:=0 to 63 do begin
     setRGBpalette(c    ,c,0,c);
     setRGBpalette(c+64 ,63-c,0,63-c);
     setRGBpalette(c+128,c,c,0);
     setRGBpalette(c+192,63-c,63-c,0);
     end;
     for y:=0 to 399 do begin for x:=0 to 319 do begin
     tulos:=((Sint[x]+y)-(Cost[y]+(x-y))); (* try different values *)
     if tulos=0 then tulos:=1;
     putpixel(x,y,tulos,0);
     end;end;
     y:=0;speed:=3;
     repeat repeat
     rotateRGB(speed);
     (*y:=y+1;if y>=360 then y:=0;
     startadd(round(200+199*sin(y/57.3)));*)
     until keypressed;ch:=readkey;
     startadd(y);
     if (ch='2')and(y<400)then y:=y+1;
     if (ch='8')and(y>0)then y:=y-1;
     if ch='+'then speed:=speed+3;
     if (ch='-')and(speed>3)then speed:=speed-3;
     until (ch=chr(27))or(ch='f');if ch='f'then fade(1,255);
end.
[ RETURN TO DIRECTORY ]