home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / GFXFX2.ZIP / STRETCH.PAS < prev    next >
Pascal/Delphi Source File  |  1995-02-14  |  880b  |  35 lines

  1.  
  2. program stretch; { STRETCH.PAS }
  3. { Full Screen Hardware Stretch, by Bas van Gaalen }
  4. uses u_vga,u_ffpcx,u_pal,u_kb;
  5. var pcxpal:pal_type; pcxpic:pointer; i,j:word;
  6. begin
  7.   getmem(pcxpic,64000);
  8.   if pcx_load(paramstr(1),pcxpic,pcxpal)<>pcx_ok then begin
  9.     writeln('An error ocured: ',pcx_errstr); halt; end;
  10.   setvideo($13);
  11.   setpal(pcxpal);
  12.   portw[$3d4]:=$13+0 shl 8;
  13.   displaypic(0,0,pcxpic,320,200);
  14.   i:=0; waitkey(1);
  15.   repeat
  16.     vretrace;
  17.     portw[$3d4]:=$13+40 shl 8;
  18.     for j:=0 to i do hretrace;
  19.     portw[$3d4]:=$13+0 shl 8;
  20.     inc(i);
  21.   until keypressed or (i=399);
  22.   portw[$3d4]:=$13+40 shl 8;
  23.   waitkey(1);
  24.   repeat
  25.     vretrace;
  26.     portw[$3d4]:=$13+40 shl 8;
  27.     for j:=0 to i do hretrace;
  28.     portw[$3d4]:=$13+0 shl 8;
  29.     dec(i);
  30.   until keypressed or (i=0);
  31.   waitkey(1);
  32.   freemem(pcxpic,64000);
  33.   setvideo(u_lm);
  34. end.
  35.