ext);
outtextxy (202,165, text);
putimage (100,240, bor ^, xorput);
text: = 'Options';
outtextxy (220,235, text);
outtextxy (222,235, text);
putimage (100,310, bor ^, xorput);
text: = 'Help';
outtextxy (240,305, text);
outtextxy (242,3055, text);
putimage (100,380, bor ^, xorput);
text: = 'Exit';
outtextxy (240,375, text);
outtextxy (242,375, text);
end;
end;
procedure menu;
var ch: char;
begin
repeat
cartinka;
getmem (men0, imagesize (10,10,620,170));
getimage (10,10,620,170, men0 ^);
getmem (men1, imagesize (10,170,550,230));
getimage (10,170,550,230, men1 ^);
getmem (men2, imagesize (10,230,550,460));
getimage (10,230,550,460, men2 ^);
repeat
cleardevice;
putimage (10,10, men0 ^, 0);
putimage (10,170, men1 ^, 0);
putimage (10,230, men2 ^, 0);
repeat
setlinestyle (0,0,3);
setcolor (3);
rectangle (a +2, d +2, a +398, d +48);
setlinestyle (0,0,3);
setlinestyle (0,0,3);
setcolor (3);
ch: = readkey;
key1 (ch);
until ord (ch) = 13;
if d = 240 then sd: = option;
if d = 310 then begin closegraph; pravila;
begin
q: = detect; initgraph (q, r,'');
e: = GraphResult;
If e <> grok then
writeln (GraphErrorMsg (e))
else
begin
end;
end;
end;
until (d = 170) or (d = 380);
freemem (men0, imagesize (10,10,620,170)); freemem (men1, imagesize (10,170,550,230));
freemem (men2, imagesize (10,230,550,460));
if d = 170 then begin if sd = false then game (false) else game (true);
end;
until d = 380;
closegraph;
end;
begin
end.
Модуль Option
unit options;
interface
uses crt, graph;
function option: boolean;
procedure key (ch: char);
procedure tex;
implementation
var ch: char;
a, d: integer;
text: string;
opt: pointer;
procedure tex;
begin
setcolor (13);
settextstyle (1,0,9);
text: = 'S o u n d';
outtextxy (100,5, text);
outtextxy (102,5, text);
outtextxy (104,5, text);
setcolor (0);
text: = 'on';
setfillstyle (1, red);
settextstyle (1,0,5);
bar (100,170,500,220);
outtextxy (260,165, text);
text: = 'off';
setfillstyle (1, red);
settextstyle (1,0,5);
bar (100,240,500,290);
outtextxy (260,235, text);
end;
procedure key (ch: char);
begin
if ord (ch) = 80 then begin if d = 240 then
begin
begin
setcolor (red);
rectangle (a +2, d +2, a +398, d +48);
setcolor (3);
end;
d: = 100;
end;
d: = d +70;
if d <> 170 then begin
setcolor (red);
rectangle (a +2, d +2-70, a +398, d +48-70);
setcolor (3);
end;
end;
if ord (ch) = 72 then begin if d <240 then
begin
begin
setcolor (red);
rectangle (a +2, d +2, a +398, d +48);
setcolor (3);
end;
d: = 310;
end;
d: = d-70;
if d <> 240 then begin
setcolor (red);
rectangle (a +2, d +2 +70, a +398, d +48 +70);
setcolor (3); end;
end;
end;
function option: boolean;
begin
a: = 100;
d: = 170;
cleardevice;
tex;
option: = false;
repeat
setlinestyle (0,0,3);
setcolor (3);
rectangle (a +2, d +2, a +398, d +48);
setlinestyle (0,0,3);
setcolor (3);
ch: = readkey;
key (ch);
setlinestyle (0,0,1);
until ord (ch) = 13;
if d = 170 then option: = true;
end;
begin
end.
Модуль Help
unit help;
interface
uses crt;
procedure pravila;
implementation
procedure pravila;
var ch: char;
begin
clrscr;
textcolor (red);
Writeln (' ПРАВИЛА ГРИ ');
textcolor (Green);
Writeln ('Ви керуєте вертольотом "А-308" на борту якого знаходяться вибухові ');
Write ('речовини. Ваша мета перевести їх у пункт призначення не врізавшись в перешкоди. '); p> Write ('На початку гри у вас є 70 бонусів, за допомогою яких ви можете проле...