modes.inc 23 KB

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