Category : Pascal Source Code
Archive   : VPAL10.ZIP
Filename : VPALDEMO.PAS

 
Output of file : VPALDEMO.PAS contained in archive : VPAL10.ZIP
Program VpalDemo;

Uses
Dos, Crt, Graph, VGAPal70;
{Replace 'VGAPal70' with 'VGAPal60' for Turbo Pascal 6.0 }

Var
AutoDetectPointer : Pointer;
BPointer : Pointer;
GraphDriver, Mode : Integer;
ErrorCode : Integer;
X,Y : Integer;
Size : Word;

{$F+}
Function DetectVGA256 : integer;
var
DetectedDriver : integer;
SuggestedMode : integer;
begin
DetectGraph(DetectedDriver, SuggestedMode);
if (DetectedDriver = VGA) or (DetectedDriver = MCGA) then
DetectVGA256 := 0
else
DetectVGA256 := grError;
end;
{$F-}

Begin
ClrScr;
DirectVideo := false;
AutoDetectPointer := @DetectVGA256;
GraphDriver := InstallUserDriver('VGA256', AutoDetectPointer);
begin
AutoDetectPointer := @DetectVGA256;
GraphDriver := InstallUserDriver('VGA256',AutoDetectPointer);
end;
GraphDriver := Detect;
InitGraph(GraphDriver, Mode,'C:\TP\VGA256');

Size := ImageSize(0,0,199,7);
GetMem(BPointer,Size);
SetPalBlack;
Read256PCX('FROGMEAT.PCX');
GetImage(119,170,318,177,BPointer^);
OutTextXY(119,170,'Fade in from black...');
FadeInPalBlack(15);
SavePal;
Delay(3000);
PutImage(119,170,BPointer^,NormalPut);
OutTextXY(119,170,'...and out to white! ');
FadeOutPalWhite(99);
PutImage(119,170,BPointer^,NormalPut);
OutTextXY(119,170,'Fade back from white!');
FadeInPalWhite(15);
Delay(3000);
PutImage(119,170,BPointer^,NormalPut);
OutTextXY(119,170,'Fade a color from... ');
Delay(3000);
PutImage(119,170,BPointer^,NormalPut);
OutTextXY(119,170,'... one to another...');
SaveColorFrom(05);
FadeColorTo(00,24);
Delay(3000);
PutImage(119,170,BPointer^,NormalPut);
OutTextXY(119,170,'... and back again! ');
SColor[0] := 0;
SColor[1] := 0;
SColor[2] := 0;
FadeColorTo(00,24);
Delay(3000);
PutImage(119,170,BPointer^,NormalPut);
OutTextXY(119,170,'Fade out to black... ');
FadeOutPalBlack(99);
SetPalBlack;
Read256PCX('CPANEL.PCX');
GetImage(119,160,318,167,BPointer^);
OutTextXY(119,160,'...load a new file! ');
FadeInPalBlack(15);
Delay(3000);
PutImage(119,160,BPointer^,NormalPut);
OutTextXY(119,160,'Switch two colors... ');
SwitchCol(0,12);
Delay(3000);
PutImage(119,160,BPointer^,NormalPut);
OutTextXY(119,160,'...back and forth! ');
SwitchCol(0,12);
Delay(3000);
PutImage(119,160,BPointer^,NormalPut);
OutTextXY(119,160,'Scroll palette ahead.');
For X := 0 To 255 Do
Begin
CyclePalAhead;
End;
Delay(3000);
PutImage(119,160,BPointer^,NormalPut);
OutTextXY(119,160,'Scroll palette back! ');
For X := 0 To 255 Do
Begin
CyclePalBack;
End;
Delay(3000);
PutImage(119,160,BPointer^,NormalPut);
OutTextXY(119,160,'Scroll parts ahead...');
For Y := 0 To 15 Do
Begin
For X := 0 To 15 Do
Begin
CycleColAhead(Y*16,Y*16+15);
End;
End;
Delay(3000);
PutImage(119,160,BPointer^,NormalPut);
OutTextXY(119,160,'and backwards! ');
For Y := 0 To 15 Do
Begin
For X := 0 To 15 Do
Begin
CycleColBack(Y*16,Y*16+15);
End;
End;
PutImage(119,160,BPointer^,NormalPut);
OutTextXY(119,160,'The End!!! ');
Delay(3000);
FadeOutPalBlack(99);

TextMode(LastMode);
End.


  3 Responses to “Category : Pascal Source Code
Archive   : VPAL10.ZIP
Filename : VPALDEMO.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/