Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   Болталка (https://forum.antichat.xyz/forumdisplay.php?f=46)
-   -   Free Pascal (проблема с InitGraph) (https://forum.antichat.xyz/showthread.php?t=202672)

Ssidit 08.05.2010 21:42

Free Pascal (проблема с InitGraph)
 
Вообщем сейчас иду по самоучителю Turbo Pascal, пользуюсь Free Pascal. Сейчас возникла проблема при InitGraph (активация граф. режима)

Цитата:

Почти наверняка для вас графический драйвер представлен файлом egavga.bgi, расположенном в каталоге BGI. Если сам Паскаль расположен в каталоге TP диска c, то строка вашей программы будет выглядеть так:
InitGraph(Device, Mode, ‘c:\TP\BGI’)
Это текст из самоучителя, но дело в том, что в Free Pascale нету даже папки BGI... И вот я оказался в тупике - не знаю как включить графический режим в Free Pascal... Ещё вот юзал доки и что нарыл:

Цитата:

18.13.38 InitGraph
Synopsis: Initialize grpahical system
Declaration: procedure InitGraph(var GraphDriver: SmallInt;var GraphMode: SmallInt;
const PathToDriver: String)
Visibility: default
Description: InitGraph initializes the graph package. GraphDriver has two valid values: GraphDriver=0
which performs an auto detect and initializes the highest possible mode with the most colors. 1024x768x64K
is the highest possible resolution supported by the driver, if you need a higher resolution, you must
edit MODES.PPI. If you need another mode, then set GraphDriver to a value different from
zero and graphmode to the mode you wish (VESA modes where 640x480x256 is 101h etc.).
PathToDriver is only needed, if you use the BGI fonts from Borland. Free Pascal does not offer
BGI fonts like Borland, these must be obtained separately.
Example code:
var
gd,gm : integer;
PathToDriver : string;
begin
gd:=detect; { highest possible resolution }
gm:=0; { not needed, auto detection }
PathToDriver:=’C:\PP\BGI’; { path to BGI fonts,
drivers aren’t needed }
InitGraph(gd,gm,PathToDriver);
if GraphResult<>grok then
halt; ..... { whatever you need }
CloseGraph; { restores the old graphics mode }
end.
412
Здесь говорится, что можно обойтись и без указания пути к BGI (сам BGi нужен только для каких-то BGI шрифтов, как в борланде). Вообщем тупик и точка =\

Вопрос - какими командами включить InitGraph в Free Pascal?

lukmus 08.05.2010 21:49

дарю bgi
http://www.sendspace.com/file/1rhcct

diehard 08.05.2010 22:19

тс ты отстал на 20 лет, еще б Фортран изучил.

Linkus 08.05.2010 22:55

Цитата:

Free Pascal (проблема ...)
pascal- это ваще одна большая проблема )))) free, не free, разницы нет)))

patty 09.05.2010 07:54

usesgraph;


Время: 21:59