WarmRebootFlag: = FALSE;
Init: = TRUE;
end;
end;
Procedure DoneButtons;
begin
if Init then
begin
SetIntVec ($ 9, OldKbdHandler);
WarmRebootFlag: = FALSE;
Init: = FALSE;
end;
end;
Function ButtonsInited;
begin
ButtonsInited: = Init;
end;
Function IsKeypressed;
Var
i: Byte;
f: Boolean;
begin
f: = false;
i: = 1;
While (i <= 128) and not f do
begin
f: = Key [i];
Inc (i);
end;
IsKeypressed: = f;
end;
Function Pressed;
begin
if WasPressed [Index] then
begin
WasPressed [Index]: = FALSE;
Pressed: = TRUE;
end else Pressed: = FALSE;
end;
Procedure ClearKeys;
begin
FillChar (Key, SizeOf (Key), false);
FillChar (WasPressed, SizeOf (WasPressed), false);
en d;
END.
UNIT LogoScreen;
INTERFACE
IMPLEMENTATION
uses graph, crt;
const
a = 'Vera & Yulya presents';
b = 'science game';
d = 'for kids';
e = 'Magnitogorsk - 2001';
t = 'Siege';
var driver, mode, x1, x, y,
color: integer; i, j: word;
x2, y2, o: array [1 .. 500] of integer; g, n: integer;
label 1;
begin
detectgraph (driver, mode);
initgraph (driver, mode, 'c: ');
if graphresult <> 0 then write ('Помилка!')
else for g: = 1 to 500 do
begin
n: = random (18);
case n of
1: o [g]: = 1;
2: o [g]: = 3;
3: o [g]: = 4;
4: o [g]: = 5;
5: o [g]: = 9;
6: o [g]: = 11;
7: o [g]: = 12;
8: o [g]: = 13;
9: o [g]: = 14;
10: o [g]: = 15
end;
x2 [g]: = random (640);
y2 [g]: = random (480);
putpixel (x2 [g], y2 [g], o [g])
end;
setcolor (9);
begin
j: = getmaxx-250;
i: = 1;
settextstyle (7,0,4);
while i <= getmaxx-length (a) -400 do
begin
setcolor (black);
outtextxy (i-length (a) -2,10, a);
outtextxy (j +2,50, b);
outtextxy (j +2,90, d);
setcolor (1 + random (14));
outtextxy (i-length (a), 10, a);
outtextxy (j, 50, b);
outtextxy (j, 90, d);
j: = j-2;
i: = i +2;
if keypressed then goto 1;
end;
color: = getcolor;
settextstyle (4,0,1);
for i: = 1 to 10 do
begin
setcolor (black);
outtextxy (230, getmaxy-20-i +1, e);
delay (100);
setcolor (color);
outtextxy (230, getmaxy-20-...