2
0

modes.inc 24 KB

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