-
Notifications
You must be signed in to change notification settings - Fork 0
/
INTRO.PAS
executable file
·88 lines (76 loc) · 2.57 KB
/
INTRO.PAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{****************************************************************************}
{* EE 4524 Artificall Intelligence - Term Project *}
{* CUPID Version 1.0 *}
{* *}
{* Ray Zeisz *}
{* December 4, 1990 *}
{****************************************************************************}
{* Module: INTRO.PAS *}
{* Date: December 2, 1990 *}
{* Function: Displays the introduction screen for the CUPID system. *}
{****************************************************************************}
program CupidIntro;
uses
Fonts,
Drivers,
Graph,
Crt;
var
x,y : integer;
Ch : char;
Gd, Gm : integer;
procedure InitializeGraphics;
begin
{ Register the drivers }
if RegisterBGIdriver(@CGADriverProc) < 0 then Halt(99);
if RegisterBGIdriver(@EGAVGADriverProc) < 0 then Halt(99);
{ Register all the fonts }
if RegisterBGIfont(@GothicFontProc) < 0 then Halt(98);
if RegisterBGIfont(@SansSerifFontProc) < 0 then Halt(98);
if RegisterBGIfont(@SmallFontProc) < 0 then Halt(98);
if RegisterBGIfont(@TriplexFontProc) < 0 then Halt(98);
Gd:= Detect; { autodetect the hardware }
InitGraph(Gd, Gm, ''); { activate graphics }
if GraphResult <> grOk then { any errors? }
begin
Writeln('Graphics init error: ', GraphErrorMsg(Gd));
Halt(1);
end;
end;
begin { main }
InitializeGraphics;
ClearViewPort;
SetTextStyle(1,0,7);
OutTextXY(0,10,' Cupid');
SetTextStyle(2,0,8);
OutTextXY(0,450,' Computer Programmed Intelligent Dating');
SetTextStyle(2,0,6);
OutTextXY(440,50,'by Ray Zeisz');
x := 100;
y := 0;
repeat
circle(x,240+y,100);
line(x+60, 160+y,x+60+60, 80+y);
line(x+60+60,80+y, x+60+60, 100+y);
line(x+60+60,80+y, x+60+45, 80+y);
circle(639-x,240+y,100);
line(639-x,340+y,639-x,400+y);
line(639-x-15,380+y,639-x+15,380+y);
x := x + 20;
y := y + 5;
if KeyPressed then begin
CloseGraph;
ClrScr;
Ch := ReadKey;
Halt(1);
end;
until x >= 250;
x := 0;
repeat
Delay(100);
Inc(x);
until KeyPressed or (x > 40);
if KeyPressed then Ch := ReadKey;
ClearViewPort;
CloseGraph;
end.