home *** CD-ROM | disk | FTP | other *** search
- Program MCGATest;
-
- uses
- Crt,Dos,MCGA07,Palette;
-
- var
- Stop,
- Start : LongInt;
- Regs : Registers;
- PicBuf,
- StorageBuf : Pointer;
- FileLength : Word;
- Pal,
- BlackPal : array [1..768] of Byte;
-
- const
- NumTimes = 100;
-
- Procedure LoadBuffer (S:String;Buf:Pointer);
- var
- F : File;
- BlocksRead : Word;
- begin
- Assign (F,S);
- Reset (F,1);
- BlockRead (F,Buf^,65000,FileLength);
- Close (F);
- end;
-
- Procedure Pause;
- var
- Ch : Char;
- begin
- Repeat Until Keypressed;
- While Keypressed do Ch := Readkey;
- end;
-
- Procedure Control;
- begin
- SetGraphMode ($13);
-
- LoadBuffer ('E:\NAVAJO.PCX',PicBuf);
-
- GetPCXPaletteAsm (PicBuf,@Pal,FileLength-768);
- WritePalettePas (0,255,@Pal);
- DisplayPCX (0,0,PicBuf);
-
- FillChar (BlackPal,SizeOf(BlackPal),0);
- Pause;
-
- SetupFade (0,255,@BlackPal,20);
- Repeat FadePalette Until DoneFade;
- Pause;
-
- SetupFade (0,255,@Pal,20);
- Repeat FadePalette Until DoneFade;
- Pause;
-
- Oreo (0,255);
- Pause;
-
- SetupFade (0,255,@Pal,20);
- Repeat FadePalette Until DoneFade;
- Pause;
- SetGraphMode (3);
- end;
-
- Procedure Init;
- begin
- GetMem (PicBuf,65500);
- end;
-
- Begin
- Init;
- Control;
- End.