home *** CD-ROM | disk | FTP | other *** search
/ PC Underground / UNDERGROUND.ISO / graphic / fade_ove.pas < prev    next >
Pascal/Delphi Source File  |  1995-07-28  |  1KB  |  36 lines

  1. uses Crt,ModeXLib,gif,fade;
  2. Var pic1_pal,                   {palettes of both pictures}
  3.     pic2_pal:Array[0..767] of Byte;
  4.     pic1,                       {contains 1st picture}
  5.     pic2:Pointer;               {2nd picture, equals vscreen}
  6.  
  7. Begin
  8.   Init_Mode13;                  {Mode 13h on}
  9.   Screen_off;                   {screen off during loading}
  10.   LoadGif('chess');             {load first picture}
  11.   GetMem(pic1,64000);           {get memory for 1st picture}
  12.   Move(vscreen^,pic1^,64000);   {save in pic1}
  13.   Move(Palette,pic1_pal,768);   {and save the palette}
  14.   Show_Pic13;                   {this picture on screen}
  15.  
  16.   LoadGif('box');               {load next in vscreen^ }
  17.   pic2:=vscreen;                {pic2 used as a pointer to it}
  18.   Move(Palette,pic2_pal,768);   {save its palette}
  19.  
  20.   Move(pic1_pal,Palette,768);   {enable palette of picture 1}
  21.   SetPal;                       {and set}
  22.   Screen_on;                    {switch screen back on now}
  23.  
  24.   ReadLn;                       {wait}
  25.   Fade1(pic2,pic2_pal,0,0,200);
  26.                                 {and then fade in picture 2)}
  27.  
  28.   fade_ResetPic(0,200);         {prepare renewed fading}
  29.   ReadLn;
  30.   Fade1(pic1,pic1_pal,0,0,200);
  31.                                 {and fade in picture 1}
  32.  
  33.   ReadLn;
  34.   TextMode(3);
  35. End.
  36.