Язык:
Русский
English
{ Пример программы для функции DetectGraph }
uses Graph;
var
GraphDriver, GraphMode : Integer;
begin
DetectGraph(GraphDriver, GraphMode);
if (GraphDriver = EGA) or (GraphDriver = EGA64) then
begin
GraphDriver := CGA;
GraphMode := CGAHi;
end;
InitGraph(GraphDriver, GraphMode, 'X:\BP'); { Путь к BGI драйверам }
if GraphResult <> grOk then
Halt(1);
Line(0, 0, GetMaxX, GetMaxY);
ReadLn;
CloseGraph;
end.
var
GraphDriver, GraphMode : Integer;
begin
DetectGraph(GraphDriver, GraphMode);
if (GraphDriver = EGA) or (GraphDriver = EGA64) then
begin
GraphDriver := CGA;
GraphMode := CGAHi;
end;
InitGraph(GraphDriver, GraphMode, 'X:\BP'); { Путь к BGI драйверам }
if GraphResult <> grOk then
Halt(1);
Line(0, 0, GetMaxX, GetMaxY);
ReadLn;
CloseGraph;
end.