modes.inc 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 by the Free Pascal development team
  5. This include implements video mode management.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. {-----------------------------------------------------------------------}
  13. { Internal routines }
  14. {-----------------------------------------------------------------------}
  15. {$ifndef nonewmodes}
  16. procedure res2Mode(x, y, maxColor: longint; var driver,mode: smallInt);
  17. var
  18. l: longint;
  19. begin
  20. case maxColor of
  21. 2: driver := D1bit;
  22. 4: driver := D2bit;
  23. 16: driver := D4bit;
  24. 64: driver := D6bit;
  25. 256: driver := D8bit;
  26. 4096: driver := D12bit;
  27. 32768: driver := D15bit;
  28. 65536: driver := D16bit;
  29. { not yet supported
  30. 65536*256: driver := D24bit;
  31. 65536*65536: driver := D32bit;}
  32. else
  33. begin
  34. driver := maxsmallint;
  35. exit;
  36. end;
  37. end;
  38. { Check whether this is known/predefined mode }
  39. for l := lowNewMode to highNewMode do
  40. if (resolutions[l].x = x) and
  41. (resolutions[l].y = y) then
  42. begin
  43. { Found! }
  44. mode := l;
  45. exit;
  46. end;
  47. { Not Found }
  48. mode := maxsmallint;
  49. end;
  50. function mode2res(modeNr: smallInt; var x,y: longint): boolean;
  51. begin
  52. if (modeNr < lowNewMode) or
  53. (modeNr > highNewMode) then
  54. begin
  55. mode2res := false;
  56. exit;
  57. end;
  58. mode2res := true;
  59. x := resolutions[modeNr].x;
  60. y := resolutions[modeNr].y;
  61. end;
  62. {$endif nonewmodes}
  63. procedure addmode(const mode: TModeInfo);
  64. {********************************************************}
  65. { Procedure AddMode() }
  66. {--------------------------------------------------------}
  67. { This routine adds <mode> to the list of recognized }
  68. { modes. Duplicates are allowed. }
  69. {********************************************************}
  70. var
  71. {$ifndef nonewmodes}
  72. driverNr, modeNr: smallint;
  73. prev: PModeInfo;
  74. {$endif nonewmodes}
  75. list: PModeInfo;
  76. newlst : PModeInfo;
  77. begin
  78. {$ifndef nonewmodes}
  79. res2Mode(mode.maxx+1,mode.maxy+1,mode.maxColor,driverNr,ModeNr);
  80. { bitdepth supported? }
  81. if (driverNr <> maxsmallint) then
  82. { Yes, add the mode }
  83. if not assigned(newModeList.modeinfo[driverNr]) then
  84. begin
  85. {$ifdef logging}
  86. logln('Adding resolution '+strf(modenr)+' for drivernr '+strf(drivernr)+
  87. ' ('+strf(mode.maxx)+'x'+strf(mode.maxy)+')');
  88. {$endif logging}
  89. new(newModeList.modeinfo[driverNr]);
  90. newModeList.modeinfo[driverNr]^ := mode;
  91. with newModeList.modeinfo[driverNr]^ do
  92. begin
  93. internModeNumber := 1;
  94. next := nil;
  95. end;
  96. newModeList.loHiModeNr[driverNr].lo := 1;
  97. newModeList.loHiModeNr[driverNr].hi := 1;
  98. end
  99. else
  100. begin
  101. prev := nil;
  102. list := newModeList.modeinfo[driverNr];
  103. { sort first by x resolution, then by yresolution }
  104. while assigned(list) and
  105. ((list^.maxx < mode.maxx) or
  106. ((list^.maxx = mode.maxx) and
  107. (list^.maxy < mode.maxy))) do
  108. begin
  109. prev := list;
  110. list := list^.next;
  111. end;
  112. { mode already exists? -> replace (assume later added modes are }
  113. { better) }
  114. if assigned(list) and
  115. (list^.maxx = mode.maxx) and
  116. (list^.maxy = mode.maxy) then
  117. begin
  118. {$ifdef logging}
  119. logln('replacing resolution '+strf(modenr)+' for drivernr '+strf(drivernr)+
  120. ' ('+strf(mode.maxx)+'x'+strf(mode.maxy)+')');
  121. {$endif logging}
  122. { save/restore next, drivernr and drivermode in list }
  123. modeNr := list^.internModeNumber;
  124. prev := list^.next;
  125. list^ := mode;
  126. list^.internModeNumber := modeNr;
  127. list^.next := prev;
  128. end
  129. else
  130. begin
  131. new(newLst);
  132. { Increase the number of modes for this driver }
  133. inc(newModeList.loHiModeNr[driverNr].hi);
  134. newLst^ := mode;
  135. {$ifdef logging}
  136. logln('Adding resolution '+strf(modenr)+' for drivernr '+strf(drivernr)+
  137. ' ('+strf(mode.maxx)+'x'+strf(mode.maxy)+')');
  138. {$endif logging}
  139. if assigned(list) then
  140. newLst^.next := list^.next
  141. else
  142. newLst^.next := nil;
  143. if assigned(prev) then
  144. begin
  145. prev^.next := newLst;
  146. newLst^.internModeNumber := succ(prev^.internModeNumber)
  147. end
  148. else
  149. begin
  150. newModeList.modeinfo[driverNr] := newLst;
  151. newLst^.internModeNumber := 1;
  152. end;
  153. { Increase the modenumbers of all modes coming after this one }
  154. { with 1 }
  155. newLst := newLst^.next;
  156. while assigned(newLst) do
  157. begin
  158. inc(newLst^.internModeNumber);
  159. newLst := newLst^.next;
  160. end;
  161. end;
  162. end;
  163. {$endif nonewmodes}
  164. { TP-like mode stuff }
  165. if not assigned(ModeList) then
  166. begin
  167. new(ModeList);
  168. move(mode, ModeList^, sizeof(Mode));
  169. end
  170. else
  171. begin
  172. list := ModeList;
  173. { go to the end of the list }
  174. while assigned(list^.next) do
  175. list:=list^.next;
  176. new(NewLst);
  177. list^.next := NewLst;
  178. move(mode, NewLst^, sizeof(Mode));
  179. end;
  180. end;
  181. procedure initmode(var mode: TModeInfo);
  182. {********************************************************}
  183. { Procedure InitMode() }
  184. {--------------------------------------------------------}
  185. { This routine initialized the mode to default values. }
  186. {********************************************************}
  187. begin
  188. FillChar(mode,sizeof(Mode),#0);
  189. end;
  190. function searchmode(ReqDriver : smallint; var reqmode: smallint): PModeInfo;
  191. {********************************************************}
  192. { Procedure SearchMode() }
  193. {--------------------------------------------------------}
  194. { This routine searches the list of recognized modes, }
  195. { and tries to find the <reqmode> in the <reqdriver> }
  196. { return nil if not found, otherwise returns the found }
  197. { structure. }
  198. { note: if reqmode = -32768, the first mode available }
  199. { for reqdriver is returned (JM) }
  200. { if reqmode = -32767, the last mode available }
  201. { for reqdriver is returned (JM) }
  202. {********************************************************}
  203. var
  204. list, lastModeInfo: PModeInfo;
  205. {$ifndef nonewmodes}
  206. x,y: longint;
  207. {$endif}
  208. begin
  209. {$ifdef logging}
  210. LogLn('Searching for driver '+strf(reqdriver)+' and mode '+strf(reqmode));
  211. {$endif logging}
  212. {$ifndef nonewmodes}
  213. if (reqDriver >= lowNewDriver) and
  214. (reqDriver <= highNewDriver) then
  215. begin
  216. case reqMode of
  217. -32768:
  218. begin
  219. reqMode := newModeList.loHiModeNr[reqDriver].lo;
  220. searchMode := newModeList.modeinfo[reqDriver];
  221. end;
  222. -32767:
  223. begin
  224. reqMode := newModeList.loHiModeNr[reqDriver].hi;
  225. searchMode := nil;
  226. { Are there any modes available for this driver? }
  227. if reqMode <> -1 then
  228. begin
  229. list := newModeList.modeinfo[reqDriver];
  230. while assigned(list^.next) do
  231. list := list^.next;
  232. searchMode := list;
  233. end;
  234. end;
  235. else
  236. begin
  237. list := newModeList.modeinfo[reqDriver];
  238. searchMode := nil;
  239. if not assigned(list) then
  240. exit;
  241. if mode2res(reqMode,x,y) then
  242. begin
  243. x := pred(x);
  244. y := pred(y);
  245. while assigned(list) and
  246. ((list^.maxx < x) or
  247. ((list^.maxx = x) and
  248. (list^.maxy < y))) do
  249. list := list^.next;
  250. if not assigned(list) or
  251. (list^.maxx <> x) or
  252. (list^.maxy <> y) then
  253. list := nil;
  254. searchmode := list;
  255. end
  256. else
  257. begin
  258. while assigned(list) and
  259. (list^.internModeNumber <> reqMode) do
  260. list := list^.next;
  261. searchMode := list;
  262. end;
  263. end;
  264. end;
  265. exit;
  266. end;
  267. {$endif nonewmodes}
  268. searchmode := nil;
  269. list := ModeList;
  270. If assigned(list) then
  271. lastModeInfo := list;
  272. { go to the end of the list }
  273. while assigned(list) do
  274. begin
  275. {$ifdef logging}
  276. Log('Found driver '+strf(list^.DriverNumber)+
  277. ' and mode $'+hexstr(list^.ModeNumber,4)+'...');
  278. {$endif logging}
  279. if ((list^.DriverNumber = ReqDriver) and
  280. ((list^.ModeNumber = ReqMode) or
  281. { search for lowest mode }
  282. (reqMode = -32768))) or
  283. { search for highest mode }
  284. ((reqMode = -32767) and
  285. (lastModeInfo^.driverNumber = reqDriver) and
  286. ((list^.driverNumber <> lastModeInfo^.driverNumber) or
  287. not(assigned(list^.next)))) then
  288. begin
  289. {$ifdef logging}
  290. LogLn('Accepted!');
  291. {$endif logging}
  292. searchmode := list;
  293. If reqMode = -32768 then
  294. reqMode := list^.ModeNumber
  295. else if reqMode = -32767 then
  296. begin
  297. reqMode := lastModeInfo^.ModeNumber;
  298. searchMode := lastModeInfo;
  299. end;
  300. exit;
  301. end;
  302. {$ifdef logging}
  303. LogLn('Rejected.');
  304. {$endif logging}
  305. lastModeInfo := list;
  306. list:=list^.next;
  307. end;
  308. end;
  309. {-----------------------------------------------------------------------}
  310. { External routines }
  311. {-----------------------------------------------------------------------}
  312. function GetModeName(ModeNumber: smallint): string;
  313. {********************************************************}
  314. { Function GetModeName() }
  315. {--------------------------------------------------------}
  316. { Checks the known video list, and returns ModeName }
  317. { string. On error returns an empty string. }
  318. {********************************************************}
  319. var
  320. mode: PModeInfo;
  321. begin
  322. mode:=nil;
  323. GetModeName:='';
  324. { only search in the current driver modes ... }
  325. mode:=SearchMode(IntCurrentNewDriver,ModeNumber);
  326. if assigned(mode) then
  327. GetModeName:=Mode^.ModeName
  328. else
  329. _GraphResult := grInvalidMode;
  330. end;
  331. function GetGraphMode: smallint;
  332. begin
  333. GetGraphMode := IntCurrentMode;
  334. end;
  335. function GetMaxMode: word;
  336. { I know , i know, this routine is very slow, and it would }
  337. { be much easier to sort the linked list of possible modes }
  338. { instead of doing this, but I'm lazy!! And anyways, the }
  339. { speed of the routine here is not that important.... }
  340. var
  341. i: word;
  342. mode: PModeInfo;
  343. begin
  344. mode:=nil;
  345. i:=0;
  346. repeat
  347. inc(i);
  348. { mode 0 always exists... }
  349. { start search at 1.. }
  350. mode:=SearchMode(IntCurrentNewDriver,i);
  351. until not assigned(mode);
  352. GetMaxMode:=i;
  353. end;
  354. procedure GetModeRange(GraphDriver: smallint; var LoMode,
  355. HiMode: smallint);
  356. var
  357. mode : PModeInfo;
  358. begin
  359. {$ifdef logging}
  360. LogLn('GetModeRange : Enter ('+strf(GraphDriver)+')');
  361. {$endif}
  362. HiMode:=-1;
  363. mode := nil;
  364. { First search if the graphics driver is supported .. }
  365. { since mode zero is always supported.. if that driver }
  366. { is supported it should return something... }
  367. { not true, e.g. VESA doesn't have a mode 0. Changed so}
  368. { -32768 means "return lowest mode in second parameter }
  369. { also, under VESA some modes may not be supported }
  370. { (e.g. $108 here) while some with a higher number can }
  371. { be supported ($112 and onward), so I also added that }
  372. { -32767 means "return highest mode in second parameter}
  373. { This whole system should be overhauled though to work}
  374. { without such hacks (JM) }
  375. loMode := -32768;
  376. mode := SearchMode(GraphDriver, loMode);
  377. { driver not supported...}
  378. if not assigned(mode) then
  379. begin
  380. loMode := -1;
  381. exit;
  382. end;
  383. {$ifdef logging}
  384. LogLn('GetModeRange : Mode '+strf(lomode)+' found');
  385. {$endif}
  386. { now it exists... find highest available mode... }
  387. hiMode := -32767;
  388. mode:=SearchMode(GraphDriver,hiMode);
  389. end;
  390. procedure SetGraphMode(mode: smallint);
  391. var
  392. modeinfo: PModeInfo;
  393. begin
  394. { check if the mode exists... }
  395. modeinfo := searchmode(IntcurrentNewDriver,mode);
  396. if not assigned(modeinfo) then
  397. begin
  398. {$ifdef logging}
  399. LogLn('Mode setting failed in setgraphmode pos 1');
  400. {$endif logging}
  401. _GraphResult := grInvalidMode;
  402. exit;
  403. end;
  404. { reset all hooks...}
  405. DefaultHooks;
  406. { arccall not reset - tested against VGA BGI driver }
  407. { Setup all hooks if none, keep old defaults...}
  408. { required hooks - returns error if no hooks to these }
  409. { routines. }
  410. if assigned(modeinfo^.DirectPutPixel) then
  411. DirectPutPixel := modeinfo^.DirectPutPixel
  412. else
  413. begin
  414. {$ifdef logging}
  415. LogLn('Mode setting failed in setgraphmode pos 2');
  416. {$endif logging}
  417. _Graphresult := grInvalidMode;
  418. exit;
  419. end;
  420. if assigned(modeinfo^.PutPixel) then
  421. PutPixel := modeinfo^.PutPixel
  422. else
  423. begin
  424. {$ifdef logging}
  425. LogLn('Mode setting failed in setgraphmode pos 3');
  426. {$endif logging}
  427. _Graphresult := grInvalidMode;
  428. exit;
  429. end;
  430. if assigned(modeinfo^.GetPixel) then
  431. GetPixel := modeinfo^.GetPixel
  432. else
  433. begin
  434. {$ifdef logging}
  435. LogLn('Mode setting failed in setgraphmode pos 4');
  436. {$endif logging}
  437. _Graphresult := grInvalidMode;
  438. exit;
  439. end;
  440. if assigned(modeinfo^.SetRGBPalette) then
  441. SetRGBPalette := modeinfo^.SetRGBPalette
  442. else
  443. begin
  444. {$ifdef logging}
  445. LogLn('Mode setting failed in setgraphmode pos 5');
  446. {$endif logging}
  447. _Graphresult := grInvalidMode;
  448. exit;
  449. end;
  450. if assigned(modeinfo^.GetRGBPalette) then
  451. GetRGBPalette := modeinfo^.GetRGBPalette
  452. else
  453. begin
  454. {$ifdef logging}
  455. LogLn('Mode setting failed in setgraphmode pos 6');
  456. {$endif logging}
  457. _Graphresult := grInvalidMode;
  458. exit;
  459. end;
  460. { optional hooks. }
  461. if assigned(modeinfo^.ClearViewPort) then
  462. ClearViewPort := modeinfo^.ClearViewPort;
  463. if assigned(modeinfo^.PutImage) then
  464. PutImage := modeinfo^.PutImage;
  465. if assigned(modeinfo^.GetImage) then
  466. GetImage := modeinfo^.GetImage;
  467. if assigned(modeinfo^.ImageSize) then
  468. ImageSize := modeinfo^.ImageSize;
  469. if assigned(modeinfo^.GetScanLine) then
  470. GetScanLine := modeinfo^.GetScanLine;
  471. if assigned(modeinfo^.Line) then
  472. Line := modeinfo^.Line;
  473. if assigned(modeinfo^.InternalEllipse) then
  474. InternalEllipse := modeinfo^.InternalEllipse;
  475. if assigned(modeinfo^.PatternLine) then
  476. PatternLine := modeinfo^.PatternLine;
  477. if assigned(modeinfo^.HLine) then
  478. Hline := modeinfo^.Hline;
  479. if assigned(modeinfo^.Vline) then
  480. VLine := modeinfo^.VLine;
  481. if assigned(modeInfo^.SetVisualPage) then
  482. SetVisualPage := modeInfo^.SetVisualPage;
  483. if assigned(modeInfo^.SetActivePage) then
  484. SetActivePage := modeInfo^.SetActivePage;
  485. if assigned(modeInfo^.OutTextXY) then
  486. OutTextXY:=modeInfo^.OutTextXY;
  487. IntCurrentMode := modeinfo^.ModeNumber;
  488. IntCurrentDriver := modeinfo^.DriverNumber;
  489. {$ifdef logging}
  490. logln('Entering mode '+strf(intCurrentMode)+' of driver '+strf(intCurrentDriver));
  491. {$endif logging}
  492. XAspect := modeinfo^.XAspect;
  493. YAspect := modeinfo^.YAspect;
  494. MaxX := modeinfo^.MaxX;
  495. MaxY := modeinfo^.MaxY;
  496. {$ifdef logging}
  497. logln('maxx = '+strf(maxx)+', maxy = '+strf(maxy));
  498. {$endif logging}
  499. HardwarePages := modeInfo^.HardwarePages;
  500. MaxColor := modeinfo^.MaxColor;
  501. PaletteSize := modeinfo^.PaletteSize;
  502. { is this a direct color mode? }
  503. DirectColor := modeinfo^.DirectColor;
  504. { now actually initialize the video mode...}
  505. { check first if the routine exists }
  506. if not assigned(modeinfo^.InitMode) then
  507. begin
  508. {$ifdef logging}
  509. LogLn('Mode setting failed in setgraphmode pos 7');
  510. {$endif logging}
  511. _GraphResult := grInvalidMode;
  512. exit;
  513. end;
  514. modeinfo^.InitMode;
  515. if _GraphResult <> grOk then exit;
  516. isgraphmode := true;
  517. { It is very important that this call be made }
  518. { AFTER the other variables have been setup. }
  519. { Since it calls some routines which rely on }
  520. { those variables. }
  521. SetActivePage(0);
  522. SetVisualPage(0);
  523. SetViewPort(0,0,MaxX,MaxY,TRUE);
  524. GraphDefaults;
  525. end;
  526. procedure RestoreCrtMode;
  527. {********************************************************}
  528. { Procedure RestoreCRTMode() }
  529. {--------------------------------------------------------}
  530. { Returns to the video mode which was set before the }
  531. { InitGraph. Hardware state is set to the old values. }
  532. {--------------------------------------------------------}
  533. { NOTE: - }
  534. { - }
  535. {********************************************************}
  536. begin
  537. isgraphmode := false;
  538. RestoreVideoState;
  539. end;
  540. {
  541. $Log$
  542. Revision 1.31 2000-07-07 17:29:30 jonas
  543. * fixed setgraphmode together with the new graphdrivers
  544. Revision 1.30 2000/07/05 13:07:48 jonas
  545. * final fixes for linux support (graphdriver value of the modes
  546. is now also not modified anymore)
  547. Revision 1.29 2000/07/05 11:25:20 jonas
  548. * added internModeNumber to modeinfo type to fix Linux compatibility
  549. with -dnewmodes code
  550. Revision 1.28 2000/06/27 13:37:04 jonas
  551. * released -dnewmodes
  552. Revision 1.27 2000/06/23 19:56:38 jonas
  553. * setviewport was sometimes called with parameters from the previous
  554. active mode, either directly from setgraphmode or from
  555. setbkcolor
  556. Revision 1.26 2000/06/22 18:36:19 peter
  557. * removed notes
  558. Revision 1.25 2000/06/19 01:18:49 carl
  559. + added modes for Atari/Amiga and bit depth also
  560. Revision 1.24 2000/06/18 14:59:39 jonas
  561. * changed maxint -> maxsmallint (range error because of objpas mod
  562. somewhere)
  563. Revision 1.23 2000/06/17 19:09:23 jonas
  564. * new platform independent mode handling (between -dnewmodes)
  565. Revision 1.22 2000/04/02 12:13:37 florian
  566. * some more procedures can be now hooked by the OS specific implementation
  567. Revision 1.21 2000/03/24 18:16:33 florian
  568. * introduce a DrawBitmapCharHoriz procedure variable to accelerate output on
  569. win32
  570. Revision 1.20 2000/03/24 13:01:15 florian
  571. * ClearViewPort fixed
  572. Revision 1.19 2000/01/07 16:41:39 daniel
  573. * copyright 2000
  574. Revision 1.18 2000/01/07 16:32:26 daniel
  575. * copyright 2000 added
  576. Revision 1.17 2000/01/02 19:02:39 jonas
  577. * removed/commented out (inited but) unused vars and unused types
  578. Revision 1.16 1999/12/21 17:42:18 jonas
  579. * changed vesa.inc do it doesn't try to use linear modes anymore (doesn't work
  580. yet!!)
  581. * fixed mode detection so the low modenumber of a driver doesn't have to be zero
  582. anymore (so VESA autodetection now works)
  583. Revision 1.15 1999/12/20 11:22:36 peter
  584. * integer -> smallint to overcome -S2 switch needed for ggi version
  585. Revision 1.14 1999/12/04 21:20:04 michael
  586. + Additional logging
  587. Revision 1.13 1999/11/28 16:13:55 jonas
  588. * corrected misplacement of call to initvars in initgraph
  589. + some extra debugging commands (for -dlogging) in the mode functions
  590. Revision 1.12 1999/09/28 13:56:31 jonas
  591. * reordered some local variables (first 4 byte vars, then 2 byte vars
  592. etc)
  593. * font data is now disposed in exitproc, exitproc is now called
  594. GraphExitProc (was CleanModes) and resides in graph.pp instead of in
  595. modes.inc
  596. Revision 1.11 1999/09/26 13:31:07 jonas
  597. * changed name of modeinfo variable to vesamodeinfo and fixed
  598. associated errors (fillchar(modeinfo,sizeof(tmodeinfo),#0) instead
  599. of sizeof(TVesamodeinfo) etc)
  600. * changed several sizeof(type) to sizeof(varname) to avoid similar
  601. errors in the future
  602. Revision 1.10 1999/09/24 22:52:39 jonas
  603. * optimized patternline a bit (always use hline when possible)
  604. * isgraphmode stuff cleanup
  605. * vesainfo.modelist now gets disposed in cleanmode instead of in
  606. closegraph (required moving of some declarations from vesa.inc to
  607. new vesah.inc)
  608. * queryadapter gets no longer called from initgraph (is called from
  609. initialization of graph unit)
  610. * bugfix for notput in 32k and 64k vesa modes
  611. * a div replaced by / in fillpoly
  612. Revision 1.9 1999/09/22 13:13:36 jonas
  613. * renamed text.inc -> gtext.inc to avoid conflict with system unit
  614. * fixed textwidth
  615. * isgraphmode now gets properly updated, so mode restoring works
  616. again
  617. Revision 1.8 1999/09/18 22:21:11 jonas
  618. + hlinevesa256 and vlinevesa256
  619. + support for not/xor/or/andput in vesamodes with 32k/64k colors
  620. * lots of changes to avoid warnings under FPC
  621. Revision 1.7 1999/07/12 13:27:14 jonas
  622. + added Log and Id tags
  623. * added first FPC support, only VGA works to some extend for now
  624. * use -dasmgraph to use assembler routines, otherwise Pascal
  625. equivalents are used
  626. * use -dsupportVESA to support VESA (crashes under FPC for now)
  627. * only dispose vesainfo at closegrph if a vesa card was detected
  628. * changed int32 to longint (int32 is not declared under FPC)
  629. * changed the declaration of almost every procedure in graph.inc to
  630. "far;" becquse otherwise you can't assign them to procvars under TP
  631. real mode (but unexplainable "data segnment too large" errors prevent
  632. it from working under real mode anyway)
  633. }