COLORPAL.LST 70 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754
  1. Listing:
  2. 1 (******************************************************************************)
  3. 2 (* COLORPAL.MOD *)
  4. 3 (* *)
  5. 4 (* MetaWINDOW HOWTO: program series. Demonstrates usage of Read / Write / *)
  6. 5 (* LoadPalette. *)
  7. 6 (* Transcribed from COLORPAL.C METAGRAPHICS SOFTWARE CORPORATION (c) 1987-1989*)
  8. 7 (* *)
  9. 8 (* PSW 06/28/91 08:30am *)
  10. 9 (******************************************************************************)
  11. 10
  12. 11 MODULE ColorPal;
  13. 12 (*
  14. 13 * Graphix
  15. 14 * Release 3.7
  16. 15 * (c) Copyright 1986-1992 PMI
  17. 16 * Green Bay, Wisconsin
  18. 17 * (414) 468-6040
  19. 18 * All rights reserved
  20. 19 *
  21. 20 *)
  22. 21
  23. 22 IMPORT GrConst;
  24. 23 IMPORT GrPorts;
  25. 24 IMPORT GrFonts;
  26. 25 IMPORT Meta;
  27. 26 IMPORT GrQry;
  28. 27 IMPORT IO;
  29. 28 IMPORT Str;
  30. 29 IMPORT Lib;
  31. 30
  32. 31 FROM GrConst IMPORT rect, point, event, palData;
  33. ***** ^ duplicate identifier
  34. 32 FROM GrPorts IMPORT adsPort;
  35. ***** ^ duplicate identifier
  36. 33 FROM GrFonts IMPORT adsFont;
  37. ***** ^ duplicate identifier
  38. 34 FROM Storage IMPORT ALLOCATE, DEALLOCATE;
  39. 35
  40. 36 CONST
  41. 37 MOUSE_RIGHT = 0100H;
  42. 38 MOUSE_LEFT = 0400H;
  43. 39 EGAADJUST = 4000H;
  44. 40
  45. 41
  46. 42 VAR
  47. 43 GrafixCard,
  48. 44 CommPort: INTEGER;
  49. 45 control: ARRAY [0..3] OF LONGINT;
  50. ***** ^ not supported yet
  51. ***** ^ not supported yet
  52. 46 paltype: INTEGER;
  53. 47 palColors: ARRAY[0..1] OF palData;
  54. ***** ^ not supported yet
  55. ***** ^ not supported yet
  56. 48 max_colors,
  57. 49 colors: INTEGER;
  58. 50 OK: BOOLEAN;
  59. 51 i,
  60. 52 selPalEntry,
  61. 53 curs, buttons,
  62. 54 x, y, speed: INTEGER;
  63. 55 scrnR: rect;
  64. 56 myevent: event;
  65. 57 cursor_pt: point;
  66. 58 thePort: adsPort; (* pointer to default MetaWINDOW port *)
  67. 59 buf, fntpath: ARRAY [0..25] OF CHAR;
  68. ***** ^ not supported yet
  69. ***** ^ not supported yet
  70. 60 val: ARRAY[0..10] OF CHAR;
  71. ***** ^ not supported yet
  72. ***** ^ not supported yet
  73. 61 fontbuf: adsFont;
  74. 62
  75. 63 (* default EGA style palette *)
  76. 64
  77. 65 palette: ARRAY [0..15] OF WORD;
  78. ***** ^ not supported yet
  79. ***** ^ undeclared identifier
  80. 66
  81. 67 (*** Draw a screen full of boxes, one for each color combination. ***)
  82. 68
  83. 69 PROCEDURE draw_palette();
  84. 70 VAR
  85. 71 color: INTEGER;
  86. 72 r: rect;
  87. 73 BEGIN
  88. 74
  89. 75 Meta.MoveTo(0, 0);
  90. ***** ^ not supported yet
  91. ***** ^ not supported yet
  92. ***** ^ not supported yet
  93. 76
  94. 77 IF max_colors > 16 THEN
  95. 78 Meta.SetRect(r, 0, 0, 30, 40);
  96. ***** ^ not supported yet
  97. ***** ^ not supported yet
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. 79
  101. 80 FOR color := 0 TO max_colors DO
  102. 81 Meta.PenColor(color);
  103. ***** ^ not supported yet
  104. ***** ^ not supported yet
  105. ***** ^ not supported yet
  106. 82 Meta.PaintRect(r);
  107. ***** ^ not supported yet
  108. ***** ^ not supported yet
  109. ***** ^ not supported yet
  110. 83 Meta.PenColor(GrConst.White);
  111. ***** ^ not supported yet
  112. ***** ^ not supported yet
  113. ***** ^ not supported yet
  114. ***** ^ not supported yet
  115. 84 Meta.FrameRect(r);
  116. ***** ^ not supported yet
  117. ***** ^ not supported yet
  118. ***** ^ not supported yet
  119. 85
  120. 86 Meta.OffsetRect(r, 40, 0);
  121. ***** ^ not supported yet
  122. ***** ^ not supported yet
  123. ***** ^ not supported yet
  124. ***** ^ not supported yet
  125. 87
  126. 88 IF r.Xmax > 640 THEN
  127. ***** ^ not supported yet
  128. ***** ^ not supported yet
  129. 89 r.Xmin := 0;
  130. ***** ^ not supported yet
  131. ***** ^ not supported yet
  132. 90 r.Xmax := 30;
  133. ***** ^ not supported yet
  134. ***** ^ not supported yet
  135. 91 Meta.OffsetRect(r, 0, 50);
  136. ***** ^ not supported yet
  137. ***** ^ not supported yet
  138. ***** ^ not supported yet
  139. ***** ^ not supported yet
  140. 92 END;
  141. 93 END;
  142. 94 ELSE
  143. 95 Meta.SetRect(r, 0, 0, 100, 100);
  144. ***** ^ not supported yet
  145. ***** ^ not supported yet
  146. ***** ^ not supported yet
  147. ***** ^ not supported yet
  148. 96
  149. 97 FOR color := 0 TO max_colors DO
  150. 98 Meta.PenColor(color);
  151. ***** ^ not supported yet
  152. ***** ^ not supported yet
  153. ***** ^ not supported yet
  154. 99 Meta.PaintRect(r);
  155. ***** ^ not supported yet
  156. ***** ^ not supported yet
  157. ***** ^ not supported yet
  158. 100 Meta.PenColor(GrConst.White);
  159. ***** ^ not supported yet
  160. ***** ^ not supported yet
  161. ***** ^ not supported yet
  162. ***** ^ not supported yet
  163. 101 Meta.FrameRect(r);
  164. ***** ^ not supported yet
  165. ***** ^ not supported yet
  166. ***** ^ not supported yet
  167. 102
  168. 103 Meta.MoveTo(r.Xmin + 49, r.Ymax + 35);
  169. ***** ^ not supported yet
  170. ***** ^ not supported yet
  171. ***** ^ not supported yet
  172. ***** ^ not supported yet
  173. ***** ^ not supported yet
  174. ***** ^ not supported yet
  175. ***** ^ not supported yet
  176. 104 Str.IntToStr(LONGINT(color), val, 10, OK);
  177. ***** ^ not supported yet
  178. ***** ^ not supported yet
  179. ***** ^ not supported yet
  180. ***** ^ not supported yet
  181. ***** ^ not supported yet
  182. 105 Meta.DrawString(val);
  183. ***** ^ not supported yet
  184. ***** ^ not supported yet
  185. ***** ^ not supported yet
  186. 106
  187. 107 Meta.OffsetRect(r, 150, 0);
  188. ***** ^ not supported yet
  189. ***** ^ not supported yet
  190. ***** ^ not supported yet
  191. ***** ^ not supported yet
  192. 108
  193. 109 IF r.Xmax > 599 THEN
  194. ***** ^ not supported yet
  195. ***** ^ not supported yet
  196. 110 r.Xmin := 0;
  197. ***** ^ not supported yet
  198. ***** ^ not supported yet
  199. 111 r.Xmax := 100;
  200. ***** ^ not supported yet
  201. ***** ^ not supported yet
  202. 112 Meta.OffsetRect(r, 0, 200);
  203. ***** ^ not supported yet
  204. ***** ^ not supported yet
  205. ***** ^ not supported yet
  206. ***** ^ not supported yet
  207. 113 END
  208. 114 END
  209. 115 END
  210. 116 END draw_palette;
  211. ***** ^ not supported yet
  212. 117
  213. 118
  214. 119 (*** Check to see if thepoint is in one of the palette display boxes. ***)
  215. 120 (*** Returns the palette entry corresponding to that box, or -1 if not ***)
  216. 121 (*** in any box ***)
  217. 122
  218. 123 PROCEDURE check_palette(VAR thepoint: point): INTEGER;
  219. 124 VAR
  220. 125 color: INTEGER;
  221. 126 r: rect;
  222. 127 BEGIN
  223. 128
  224. 129 Meta.MoveTo(0, 0);
  225. ***** ^ not supported yet
  226. ***** ^ not supported yet
  227. ***** ^ not supported yet
  228. 130
  229. 131 IF max_colors > 16 THEN
  230. 132 Meta.SetRect(r, 0, 0, 30, 40);
  231. ***** ^ not supported yet
  232. ***** ^ not supported yet
  233. ***** ^ not supported yet
  234. ***** ^ not supported yet
  235. 133
  236. 134 FOR color := 0 TO max_colors DO
  237. 135 IF Meta.PtInRect(thepoint, r) THEN
  238. ***** ^ not supported yet
  239. ***** ^ not supported yet
  240. ***** ^ not supported yet
  241. ***** ^ not supported yet
  242. 136 RETURN color;
  243. 137 END;
  244. 138
  245. 139 Meta.OffsetRect(r, 40, 0);
  246. ***** ^ not supported yet
  247. ***** ^ not supported yet
  248. ***** ^ not supported yet
  249. ***** ^ not supported yet
  250. 140
  251. 141 IF r.Xmax > 640 THEN
  252. ***** ^ not supported yet
  253. ***** ^ not supported yet
  254. 142 r.Xmin := 0;
  255. ***** ^ not supported yet
  256. ***** ^ not supported yet
  257. 143 r.Xmax := 30;
  258. ***** ^ not supported yet
  259. ***** ^ not supported yet
  260. 144 Meta.OffsetRect(r, 0, 50);
  261. ***** ^ not supported yet
  262. ***** ^ not supported yet
  263. ***** ^ not supported yet
  264. ***** ^ not supported yet
  265. 145 END
  266. 146 END
  267. 147 ELSE
  268. 148 Meta.SetRect(r, 0, 0, 100, 100);
  269. ***** ^ not supported yet
  270. ***** ^ not supported yet
  271. ***** ^ not supported yet
  272. ***** ^ not supported yet
  273. 149
  274. 150 FOR color := 0 TO max_colors DO
  275. 151 IF Meta.PtInRect(thepoint, r) THEN
  276. ***** ^ not supported yet
  277. ***** ^ not supported yet
  278. ***** ^ not supported yet
  279. ***** ^ not supported yet
  280. 152 RETURN color;
  281. 153 END;
  282. 154
  283. 155 Meta.OffsetRect(r, 150, 0);
  284. ***** ^ not supported yet
  285. ***** ^ not supported yet
  286. ***** ^ not supported yet
  287. ***** ^ not supported yet
  288. 156 IF r.Xmax > 599 THEN
  289. ***** ^ not supported yet
  290. ***** ^ not supported yet
  291. 157 r.Xmin := 0;
  292. ***** ^ not supported yet
  293. ***** ^ not supported yet
  294. 158 r.Xmax := 100;
  295. ***** ^ not supported yet
  296. ***** ^ not supported yet
  297. 159 Meta.OffsetRect(r, 0, 200);
  298. ***** ^ not supported yet
  299. ***** ^ not supported yet
  300. ***** ^ not supported yet
  301. ***** ^ not supported yet
  302. 160 END
  303. 161 END
  304. 162 END;
  305. 163
  306. 164 RETURN -1;
  307. 165 END check_palette;
  308. ***** ^ not supported yet
  309. 166
  310. 167
  311. 168 PROCEDURE Insert(VAR S1: ARRAY OF CHAR; S2: ARRAY OF CHAR; Pos, Width: CARDINAL);
  312. ***** ^ not supported yet
  313. ***** ^ not supported yet
  314. 169 VAR
  315. 170 L1, L2, i: CARDINAL;
  316. 171 BEGIN
  317. 172 L1 := HIGH(S1);
  318. ***** ^ undeclared identifier
  319. ***** ^ not supported yet
  320. 173 L2 := Str.Length(S2);
  321. ***** ^ not supported yet
  322. ***** ^ not supported yet
  323. ***** ^ not supported yet
  324. 174
  325. 175 IF (Pos + Width) > L1 THEN
  326. 176 RETURN
  327. 177 END;
  328. 178
  329. 179 IF L2 > Width THEN
  330. 180 RETURN
  331. 181 END;
  332. 182
  333. 183 FOR i := 0 TO L2 DO
  334. 184 S1[Pos + i] := S2[i];
  335. ***** ^ not supported yet
  336. ***** ^ not supported yet
  337. ***** ^ not supported yet
  338. ***** ^ not supported yet
  339. 185 END;
  340. 186
  341. 187 FOR i := Pos + L2 TO Pos + Width DO
  342. 188 S1[i] := ' ';
  343. ***** ^ not supported yet
  344. ***** ^ not supported yet
  345. 189 END;
  346. 190 END Insert;
  347. ***** ^ not supported yet
  348. 191
  349. 192 (*** Fill the color mixing rectangle with color 'palval'. ***)
  350. 193
  351. 194 PROCEDURE draw_clr_rect(palval: CARDINAL);
  352. 195 VAR
  353. 196 color_rect: rect;
  354. 197 BEGIN
  355. 198 Meta.SetRect(color_rect, 0, 0, 100, 100);
  356. ***** ^ not supported yet
  357. ***** ^ not supported yet
  358. ***** ^ not supported yet
  359. ***** ^ not supported yet
  360. 199 Meta.OffsetRect(color_rect, 725, 100);
  361. ***** ^ not supported yet
  362. ***** ^ not supported yet
  363. ***** ^ not supported yet
  364. ***** ^ not supported yet
  365. 200 Meta.PenColor(palval);
  366. ***** ^ not supported yet
  367. ***** ^ not supported yet
  368. ***** ^ not supported yet
  369. 201 Meta.ProtectRect(color_rect);
  370. ***** ^ not supported yet
  371. ***** ^ not supported yet
  372. ***** ^ not supported yet
  373. 202 Meta.PaintRect(color_rect);
  374. ***** ^ not supported yet
  375. ***** ^ not supported yet
  376. ***** ^ not supported yet
  377. 203 Meta.PenColor(GrConst.White);
  378. ***** ^ not supported yet
  379. ***** ^ not supported yet
  380. ***** ^ not supported yet
  381. ***** ^ not supported yet
  382. 204 Meta.FrameRect(color_rect);
  383. ***** ^ not supported yet
  384. ***** ^ not supported yet
  385. ***** ^ not supported yet
  386. 205 Meta.ProtectOff();
  387. ***** ^ not supported yet
  388. ***** ^ not supported yet
  389. ***** ^ not supported yet
  390. 206
  391. 207 Str.IntToStr(LONGINT(palval), val, 16, OK);
  392. ***** ^ not supported yet
  393. ***** ^ not supported yet
  394. ***** ^ not supported yet
  395. ***** ^ not supported yet
  396. ***** ^ not supported yet
  397. 208 Str.Append(val, ':');
  398. ***** ^ not supported yet
  399. ***** ^ not supported yet
  400. ***** ^ not supported yet
  401. ***** ^ not supported yet
  402. 209 Insert(buf, val, 0, 24);
  403. ***** ^ not supported yet
  404. ***** ^ not supported yet
  405. ***** ^ not supported yet
  406. ***** ^ not supported yet
  407. 210
  408. 211 IF paltype = 1 THEN (* analog palette *)
  409. 212 Str.IntToStr(LONGINT(palColors[0].palRed), val, 16, OK);
  410. ***** ^ not supported yet
  411. ***** ^ not supported yet
  412. ***** ^ not supported yet
  413. ***** ^ not supported yet
  414. ***** ^ not supported yet
  415. ***** ^ not supported yet
  416. ***** ^ not supported yet
  417. 213 Insert(buf, val, 6, 6);
  418. ***** ^ not supported yet
  419. ***** ^ not supported yet
  420. ***** ^ not supported yet
  421. ***** ^ not supported yet
  422. 214 Str.IntToStr(LONGINT(palColors[0].palGreen), val, 16, OK);
  423. ***** ^ not supported yet
  424. ***** ^ not supported yet
  425. ***** ^ not supported yet
  426. ***** ^ not supported yet
  427. ***** ^ not supported yet
  428. ***** ^ not supported yet
  429. ***** ^ not supported yet
  430. 215 Insert(buf, val, 12, 6);
  431. ***** ^ not supported yet
  432. ***** ^ not supported yet
  433. ***** ^ not supported yet
  434. ***** ^ not supported yet
  435. 216 Str.IntToStr(LONGINT(palColors[0].palBlue), val, 16, OK);
  436. ***** ^ not supported yet
  437. ***** ^ not supported yet
  438. ***** ^ not supported yet
  439. ***** ^ not supported yet
  440. ***** ^ not supported yet
  441. ***** ^ not supported yet
  442. ***** ^ not supported yet
  443. 217 Insert(buf, val, 18, 6);
  444. ***** ^ not supported yet
  445. ***** ^ not supported yet
  446. ***** ^ not supported yet
  447. ***** ^ not supported yet
  448. 218 ELSE
  449. 219 Insert(buf, val, 0, 6);
  450. ***** ^ not supported yet
  451. ***** ^ not supported yet
  452. ***** ^ not supported yet
  453. ***** ^ not supported yet
  454. 220 Str.IntToStr(LONGINT(palette[palval]), val, 16, OK);
  455. ***** ^ not supported yet
  456. ***** ^ not supported yet
  457. ***** ^ not supported yet
  458. ***** ^ not supported yet
  459. ***** ^ not supported yet
  460. ***** ^ not supported yet
  461. 221 Insert(buf, val, 6, 6);
  462. ***** ^ not supported yet
  463. ***** ^ not supported yet
  464. ***** ^ not supported yet
  465. ***** ^ not supported yet
  466. 222 END;
  467. 223
  468. 224 buf[24] := CHR(0);
  469. ***** ^ not supported yet
  470. ***** ^ not supported yet
  471. ***** ^ undeclared identifier
  472. ***** ^ not supported yet
  473. 225
  474. 226 Meta.MoveTo(650, 100 - 40);
  475. ***** ^ not supported yet
  476. ***** ^ not supported yet
  477. ***** ^ not supported yet
  478. 227 Meta.DrawString(buf);
  479. ***** ^ not supported yet
  480. ***** ^ not supported yet
  481. ***** ^ not supported yet
  482. 228 END draw_clr_rect;
  483. ***** ^ not supported yet
  484. 229
  485. 230
  486. 231 PROCEDURE draw_control(num:INTEGER);
  487. 232 VAR
  488. 233 r: rect;
  489. 234 i, x, y: INTEGER;
  490. 235 color: CHAR;
  491. 236 BEGIN
  492. 237
  493. 238 CASE num OF
  494. 239 | 0: x := 670; color := 'R';
  495. 240 | 1: x := 770; color := 'G';
  496. 241 | 2: x := 870; color := 'B';
  497. 242 ELSE
  498. 243 RETURN;
  499. 244 END;
  500. 245
  501. 246 y := 300;
  502. 247
  503. 248 (* draw scale *)
  504. 249 Meta.PenColor(GrConst.White);
  505. ***** ^ not supported yet
  506. ***** ^ not supported yet
  507. ***** ^ not supported yet
  508. ***** ^ not supported yet
  509. 250 Meta.MoveTo(x, y);
  510. ***** ^ not supported yet
  511. ***** ^ not supported yet
  512. ***** ^ not supported yet
  513. 251 Meta.LineRel(0, 500);
  514. ***** ^ not supported yet
  515. ***** ^ not supported yet
  516. ***** ^ not supported yet
  517. 252
  518. 253 Meta.MoveTo(x, y);
  519. ***** ^ not supported yet
  520. ***** ^ not supported yet
  521. ***** ^ not supported yet
  522. 254 Meta.LineTo(x - 20, y);
  523. ***** ^ not supported yet
  524. ***** ^ not supported yet
  525. ***** ^ not supported yet
  526. 255
  527. 256 Meta.MoveTo(x, y + 500);
  528. ***** ^ not supported yet
  529. ***** ^ not supported yet
  530. ***** ^ not supported yet
  531. 257 Meta.LineTo(x - 20, y + 500);
  532. ***** ^ not supported yet
  533. ***** ^ not supported yet
  534. ***** ^ not supported yet
  535. 258
  536. 259 FOR i := y TO y + 500 BY 20 DO
  537. 260 Meta.MoveTo(x, i);
  538. ***** ^ not supported yet
  539. ***** ^ not supported yet
  540. ***** ^ not supported yet
  541. 261 Meta.LineTo(x - 10, i);
  542. ***** ^ not supported yet
  543. ***** ^ not supported yet
  544. ***** ^ not supported yet
  545. 262 END;
  546. 263
  547. 264 (* draw 'R' 'G' or 'B' *)
  548. 265 Meta.MoveTo(x, y - 30);
  549. ***** ^ not supported yet
  550. ***** ^ not supported yet
  551. ***** ^ not supported yet
  552. 266 Meta.DrawChar(color);
  553. ***** ^ not supported yet
  554. ***** ^ not supported yet
  555. ***** ^ not supported yet
  556. 267
  557. 268 (* draw '+/-' control *)
  558. 269 INC(y, 520);
  559. ***** ^ undeclared identifier
  560. ***** ^ not supported yet
  561. 270 Meta.SetRect(r, x - 30, y, x + 30, y + 50);
  562. ***** ^ not supported yet
  563. ***** ^ not supported yet
  564. ***** ^ not supported yet
  565. ***** ^ not supported yet
  566. 271 Meta.FrameRect(r);
  567. ***** ^ not supported yet
  568. ***** ^ not supported yet
  569. ***** ^ not supported yet
  570. 272 Meta.MoveTo(x, y);
  571. ***** ^ not supported yet
  572. ***** ^ not supported yet
  573. ***** ^ not supported yet
  574. 273 Meta.LineTo(x, y + 50);
  575. ***** ^ not supported yet
  576. ***** ^ not supported yet
  577. ***** ^ not supported yet
  578. 274
  579. 275 Meta.MoveTo(r.Xmin + 5, y + 40);
  580. ***** ^ not supported yet
  581. ***** ^ not supported yet
  582. ***** ^ not supported yet
  583. ***** ^ not supported yet
  584. ***** ^ not supported yet
  585. 276 Meta.DrawChar('+');
  586. ***** ^ not supported yet
  587. ***** ^ not supported yet
  588. ***** ^ not supported yet
  589. 277
  590. 278 Meta.MoveTo(x + 5, y + 40);
  591. ***** ^ not supported yet
  592. ***** ^ not supported yet
  593. ***** ^ not supported yet
  594. 279 Meta.DrawChar('-');
  595. ***** ^ not supported yet
  596. ***** ^ not supported yet
  597. ***** ^ not supported yet
  598. 280 END draw_control;
  599. ***** ^ not supported yet
  600. 281
  601. 282 (*** Draw the control panel ***)
  602. 283
  603. 284 PROCEDURE draw_panel();
  604. 285 BEGIN
  605. 286 Meta.PenColor(GrConst.White);
  606. ***** ^ not supported yet
  607. ***** ^ not supported yet
  608. ***** ^ not supported yet
  609. ***** ^ not supported yet
  610. 287
  611. 288 draw_control(0);
  612. ***** ^ not supported yet
  613. ***** ^ not supported yet
  614. 289 draw_control(1);
  615. ***** ^ not supported yet
  616. ***** ^ not supported yet
  617. 290 draw_control(2);
  618. ***** ^ not supported yet
  619. ***** ^ not supported yet
  620. 291 draw_clr_rect(0);
  621. ***** ^ not supported yet
  622. ***** ^ not supported yet
  623. 292 END draw_panel;
  624. ***** ^ not supported yet
  625. 293
  626. 294
  627. 295 (*** Draw a thermometer type indicator bar for control 'num'. ***)
  628. 296
  629. 297 PROCEDURE draw_indicator(num: CARDINAL);
  630. 298 VAR
  631. 299 x, y, i: CARDINAL;
  632. 300 r: rect;
  633. 301 BEGIN
  634. 302
  635. 303 x := 670 + 100 * num;
  636. 304 y := 300;
  637. 305
  638. 306 (* compute scale factor *)
  639. 307 i := CARDINAL(control[num] DIV 131); (* 0xFFFF / 500 appx := 131 *)
  640. ***** ^ not supported yet
  641. ***** ^ not supported yet
  642. ***** ^ not supported yet
  643. 308
  644. 309 (* fill on part *)
  645. 310 Meta.SetRect(r, x + 1, y + 500 - i, x + 10, y + 500);
  646. ***** ^ not supported yet
  647. ***** ^ not supported yet
  648. ***** ^ not supported yet
  649. ***** ^ not supported yet
  650. 311 Meta.ProtectRect(r);
  651. ***** ^ not supported yet
  652. ***** ^ not supported yet
  653. ***** ^ not supported yet
  654. 312 Meta.PaintRect(r);
  655. ***** ^ not supported yet
  656. ***** ^ not supported yet
  657. ***** ^ not supported yet
  658. 313 Meta.ProtectOff();
  659. ***** ^ not supported yet
  660. ***** ^ not supported yet
  661. ***** ^ not supported yet
  662. 314
  663. 315 (* erase off part *)
  664. 316 Meta.SetRect(r, x + 1, y, x + 10, y + 500 - i);
  665. ***** ^ not supported yet
  666. ***** ^ not supported yet
  667. ***** ^ not supported yet
  668. ***** ^ not supported yet
  669. 317 Meta.ProtectRect(r);
  670. ***** ^ not supported yet
  671. ***** ^ not supported yet
  672. ***** ^ not supported yet
  673. 318 Meta.EraseRect(r);
  674. ***** ^ not supported yet
  675. ***** ^ not supported yet
  676. ***** ^ not supported yet
  677. 319 Meta.ProtectOff();
  678. ***** ^ not supported yet
  679. ***** ^ not supported yet
  680. ***** ^ not supported yet
  681. 320 END draw_indicator;
  682. ***** ^ not supported yet
  683. 321
  684. 322 (*** Check to see if thepoint is in one of the control knobs. Returns knob ***)
  685. 323 (*** number or -1 if not in any knob. ***)
  686. 324
  687. 325 PROCEDURE check_panel(VAR thepoint: point): INTEGER;
  688. 326 VAR
  689. 327 knob, x, y: INTEGER;
  690. 328 r: rect;
  691. 329 BEGIN
  692. 330 y := 300 + 520;
  693. 331
  694. 332 FOR knob := 0 TO 2 DO
  695. 333 x := 670 + 100 * knob;
  696. 334
  697. 335 Meta.SetRect(r, x - 30, y, x + 30, y + 50);
  698. ***** ^ not supported yet
  699. ***** ^ not supported yet
  700. ***** ^ not supported yet
  701. ***** ^ not supported yet
  702. 336
  703. 337 IF (Meta.PtInRect(thepoint, r)) THEN
  704. ***** ^ not supported yet
  705. ***** ^ not supported yet
  706. ***** ^ not supported yet
  707. ***** ^ not supported yet
  708. 338 r.Xmin := (r.Xmax + r.Xmin) DIV 2;
  709. ***** ^ not supported yet
  710. ***** ^ not supported yet
  711. ***** ^ not supported yet
  712. ***** ^ not supported yet
  713. ***** ^ not supported yet
  714. ***** ^ not supported yet
  715. 339
  716. 340 IF Meta.PtInRect(thepoint, r) THEN
  717. ***** ^ not supported yet
  718. ***** ^ not supported yet
  719. ***** ^ not supported yet
  720. ***** ^ not supported yet
  721. 341 RETURN (knob * 2 + 1);
  722. 342 END;
  723. 343
  724. 344 RETURN (knob * 2);
  725. 345 END;
  726. 346 END;
  727. 347
  728. 348 RETURN -1;
  729. 349 END check_panel;
  730. ***** ^ not supported yet
  731. 350
  732. 351 (*** Analog palette version ***)
  733. 352
  734. 353 (*** For color number entry 'palval' change color register entry. ***)
  735. 354
  736. 355 PROCEDURE ANmix_color(palval: CARDINAL);
  737. 356 VAR
  738. 357 BEGIN
  739. 358 palColors[0].palRed := WORD(control[0]);
  740. ***** ^ not supported yet
  741. ***** ^ not supported yet
  742. ***** ^ not supported yet
  743. ***** ^ undeclared identifier
  744. ***** ^ not supported yet
  745. ***** ^ not supported yet
  746. 359 palColors[0].palGreen := WORD(control[1]);
  747. ***** ^ not supported yet
  748. ***** ^ not supported yet
  749. ***** ^ not supported yet
  750. ***** ^ undeclared identifier
  751. ***** ^ not supported yet
  752. ***** ^ not supported yet
  753. 360 palColors[0].palBlue := WORD(control[2]);
  754. ***** ^ not supported yet
  755. ***** ^ not supported yet
  756. ***** ^ not supported yet
  757. ***** ^ undeclared identifier
  758. ***** ^ not supported yet
  759. ***** ^ not supported yet
  760. 361
  761. 362 Meta.WritePalette(0, palval, palval, palColors);
  762. ***** ^ not supported yet
  763. ***** ^ not supported yet
  764. ***** ^ not supported yet
  765. 363
  766. 364 Str.IntToStr(LONGINT(palval), val, 16, OK);
  767. ***** ^ not supported yet
  768. ***** ^ not supported yet
  769. ***** ^ not supported yet
  770. ***** ^ not supported yet
  771. ***** ^ not supported yet
  772. 365 Str.Append(val, ':');
  773. ***** ^ not supported yet
  774. ***** ^ not supported yet
  775. ***** ^ not supported yet
  776. ***** ^ not supported yet
  777. 366 Insert(buf, val, 0, 24);
  778. ***** ^ not supported yet
  779. ***** ^ not supported yet
  780. ***** ^ not supported yet
  781. ***** ^ not supported yet
  782. 367 Str.IntToStr(LONGINT(palColors[0].palRed), val, 16, OK);
  783. ***** ^ not supported yet
  784. ***** ^ not supported yet
  785. ***** ^ not supported yet
  786. ***** ^ not supported yet
  787. ***** ^ not supported yet
  788. ***** ^ not supported yet
  789. ***** ^ not supported yet
  790. 368 Insert(buf, val, 6, 6);
  791. ***** ^ not supported yet
  792. ***** ^ not supported yet
  793. ***** ^ not supported yet
  794. ***** ^ not supported yet
  795. 369 Str.IntToStr(LONGINT(palColors[0].palGreen), val, 16, OK);
  796. ***** ^ not supported yet
  797. ***** ^ not supported yet
  798. ***** ^ not supported yet
  799. ***** ^ not supported yet
  800. ***** ^ not supported yet
  801. ***** ^ not supported yet
  802. ***** ^ not supported yet
  803. 370 Insert(buf, val, 12, 6);
  804. ***** ^ not supported yet
  805. ***** ^ not supported yet
  806. ***** ^ not supported yet
  807. ***** ^ not supported yet
  808. 371 Str.IntToStr(LONGINT(palColors[0].palBlue), val, 16, OK);
  809. ***** ^ not supported yet
  810. ***** ^ not supported yet
  811. ***** ^ not supported yet
  812. ***** ^ not supported yet
  813. ***** ^ not supported yet
  814. ***** ^ not supported yet
  815. ***** ^ not supported yet
  816. 372 Insert(buf, val, 18, 6);
  817. ***** ^ not supported yet
  818. ***** ^ not supported yet
  819. ***** ^ not supported yet
  820. ***** ^ not supported yet
  821. 373 buf[24] := CHR(0);
  822. ***** ^ not supported yet
  823. ***** ^ not supported yet
  824. ***** ^ undeclared identifier
  825. ***** ^ not supported yet
  826. 374
  827. 375 Meta.MoveTo(650, 100 - 40);
  828. ***** ^ not supported yet
  829. ***** ^ not supported yet
  830. ***** ^ not supported yet
  831. 376 Meta.DrawString(buf);
  832. ***** ^ not supported yet
  833. ***** ^ not supported yet
  834. ***** ^ not supported yet
  835. 377 END ANmix_color;
  836. ***** ^ not supported yet
  837. 378
  838. 379 (*** Get color value of palval and set controls. ***)
  839. 380
  840. 381 PROCEDURE ANunmix_color(palval: CARDINAL);
  841. 382 BEGIN
  842. 383 Meta.ReadPalette(0, palval, palval, palColors);
  843. ***** ^ not supported yet
  844. ***** ^ not supported yet
  845. ***** ^ not supported yet
  846. 384 control[0] := LONGINT(palColors[0].palRed);
  847. ***** ^ not supported yet
  848. ***** ^ not supported yet
  849. ***** ^ not supported yet
  850. ***** ^ not supported yet
  851. ***** ^ not supported yet
  852. 385 control[1] := LONGINT(palColors[0].palGreen);
  853. ***** ^ not supported yet
  854. ***** ^ not supported yet
  855. ***** ^ not supported yet
  856. ***** ^ not supported yet
  857. ***** ^ not supported yet
  858. 386 control[2] := LONGINT(palColors[0].palBlue);
  859. ***** ^ not supported yet
  860. ***** ^ not supported yet
  861. ***** ^ not supported yet
  862. ***** ^ not supported yet
  863. ***** ^ not supported yet
  864. 387 END ANunmix_color;
  865. ***** ^ not supported yet
  866. 388
  867. 389 (* digital palette version *)
  868. 390
  869. 391 (*** For palette entry 'palval', mix the current control values per EGA, ***)
  870. 392 (*** store in palette array, and change hardware palette entry. ***)
  871. 393
  872. 394 PROCEDURE EGAmix_color(palval: CARDINAL);
  873. 395 VAR
  874. 396 red, green, blue, mix: WORD;
  875. ***** ^ undeclared identifier
  876. 397 paletteVals: ARRAY [0..0] OF WORD;
  877. ***** ^ not supported yet
  878. ***** ^ undeclared identifier
  879. 398 BEGIN
  880. 399 red := WORD(control[0] DIV EGAADJUST);
  881. ***** ^ not supported yet
  882. ***** ^ undeclared identifier
  883. ***** ^ not supported yet
  884. ***** ^ not supported yet
  885. ***** ^ not supported yet
  886. 400 green := WORD(control[1] DIV EGAADJUST);
  887. ***** ^ not supported yet
  888. ***** ^ undeclared identifier
  889. ***** ^ not supported yet
  890. ***** ^ not supported yet
  891. ***** ^ not supported yet
  892. 401 blue := WORD(control[2] DIV EGAADJUST);
  893. ***** ^ not supported yet
  894. ***** ^ undeclared identifier
  895. ***** ^ not supported yet
  896. ***** ^ not supported yet
  897. ***** ^ not supported yet
  898. 402
  899. 403 mix := 0;
  900. ***** ^ not supported yet
  901. 404
  902. 405 IF INTEGER(BITSET(blue) * BITSET(0001H)) # 0 THEN
  903. ***** ^ undeclared identifier
  904. ***** ^ not supported yet
  905. ***** ^ undeclared identifier
  906. ***** ^ not supported yet
  907. 406 mix := BITSET(mix) + BITSET(0008H);
  908. ***** ^ not supported yet
  909. ***** ^ undeclared identifier
  910. ***** ^ not supported yet
  911. ***** ^ undeclared identifier
  912. ***** ^ not supported yet
  913. 407 END;
  914. 408 IF INTEGER(BITSET(blue) * BITSET(0002H)) # 0 THEN
  915. ***** ^ undeclared identifier
  916. ***** ^ not supported yet
  917. ***** ^ undeclared identifier
  918. ***** ^ not supported yet
  919. 409 mix := BITSET(mix) + BITSET(0001H);
  920. ***** ^ not supported yet
  921. ***** ^ undeclared identifier
  922. ***** ^ not supported yet
  923. ***** ^ undeclared identifier
  924. ***** ^ not supported yet
  925. 410 END;
  926. 411
  927. 412 IF INTEGER(BITSET(green) * BITSET(0001H)) # 0 THEN
  928. ***** ^ undeclared identifier
  929. ***** ^ not supported yet
  930. ***** ^ undeclared identifier
  931. ***** ^ not supported yet
  932. 413 mix := BITSET(mix) + BITSET(0010H);
  933. ***** ^ not supported yet
  934. ***** ^ undeclared identifier
  935. ***** ^ not supported yet
  936. ***** ^ undeclared identifier
  937. ***** ^ not supported yet
  938. 414 END;
  939. 415 IF INTEGER(BITSET(green) * BITSET(0002H)) # 0 THEN
  940. ***** ^ undeclared identifier
  941. ***** ^ not supported yet
  942. ***** ^ undeclared identifier
  943. ***** ^ not supported yet
  944. 416 mix := BITSET(mix) + BITSET(0002H);
  945. ***** ^ not supported yet
  946. ***** ^ undeclared identifier
  947. ***** ^ not supported yet
  948. ***** ^ undeclared identifier
  949. ***** ^ not supported yet
  950. 417 END;
  951. 418
  952. 419 IF INTEGER(BITSET(red) * BITSET(0001H)) # 0 THEN
  953. ***** ^ undeclared identifier
  954. ***** ^ not supported yet
  955. ***** ^ undeclared identifier
  956. ***** ^ not supported yet
  957. 420 mix := BITSET(mix) + BITSET(0020H);
  958. ***** ^ not supported yet
  959. ***** ^ undeclared identifier
  960. ***** ^ not supported yet
  961. ***** ^ undeclared identifier
  962. ***** ^ not supported yet
  963. 421 END;
  964. 422 IF INTEGER(BITSET(red) * BITSET(0002H)) # 0 THEN
  965. ***** ^ undeclared identifier
  966. ***** ^ not supported yet
  967. ***** ^ undeclared identifier
  968. ***** ^ not supported yet
  969. 423 mix := BITSET(mix) + BITSET(0004H);
  970. ***** ^ not supported yet
  971. ***** ^ undeclared identifier
  972. ***** ^ not supported yet
  973. ***** ^ undeclared identifier
  974. ***** ^ not supported yet
  975. 424 END;
  976. 425
  977. 426 Str.IntToStr(LONGINT(palval), val, 16, OK);
  978. ***** ^ not supported yet
  979. ***** ^ not supported yet
  980. ***** ^ not supported yet
  981. ***** ^ not supported yet
  982. ***** ^ not supported yet
  983. 427 Str.Append(val, ':');
  984. ***** ^ not supported yet
  985. ***** ^ not supported yet
  986. ***** ^ not supported yet
  987. ***** ^ not supported yet
  988. 428 Insert(buf, val, 0, 24);
  989. ***** ^ not supported yet
  990. ***** ^ not supported yet
  991. ***** ^ not supported yet
  992. ***** ^ not supported yet
  993. 429 Str.IntToStr(LONGINT(mix), val, 16, OK);
  994. ***** ^ not supported yet
  995. ***** ^ not supported yet
  996. ***** ^ not supported yet
  997. ***** ^ not supported yet
  998. ***** ^ not supported yet
  999. 430 Insert(buf, val, 6, 6);
  1000. ***** ^ not supported yet
  1001. ***** ^ not supported yet
  1002. ***** ^ not supported yet
  1003. ***** ^ not supported yet
  1004. 431 buf[24] := CHR(0);
  1005. ***** ^ not supported yet
  1006. ***** ^ not supported yet
  1007. ***** ^ undeclared identifier
  1008. ***** ^ not supported yet
  1009. 432
  1010. 433 Meta.MoveTo(650, 100 - 40);
  1011. ***** ^ not supported yet
  1012. ***** ^ not supported yet
  1013. ***** ^ not supported yet
  1014. 434 Meta.DrawString(buf);
  1015. ***** ^ not supported yet
  1016. ***** ^ not supported yet
  1017. ***** ^ not supported yet
  1018. 435
  1019. 436 paletteVals[0] := mix;
  1020. ***** ^ not supported yet
  1021. ***** ^ not supported yet
  1022. ***** ^ not supported yet
  1023. 437 Meta.LoadPalette(palval, palval, paletteVals);
  1024. ***** ^ not supported yet
  1025. ***** ^ not supported yet
  1026. ***** ^ not supported yet
  1027. 438 END EGAmix_color;
  1028. ***** ^ not supported yet
  1029. 439
  1030. 440 (*** Take color value of palval apart per EGA and set global control array ***)
  1031. 441 (*** to its components. ***)
  1032. 442
  1033. 443 PROCEDURE EGAunmix_color(palval: CARDINAL);
  1034. 444 VAR
  1035. 445 red, green, blue, mix: WORD;
  1036. ***** ^ undeclared identifier
  1037. 446 BEGIN
  1038. 447
  1039. 448 red := 0;
  1040. ***** ^ not supported yet
  1041. 449 green := 0;
  1042. ***** ^ not supported yet
  1043. 450 blue := 0;
  1044. ***** ^ not supported yet
  1045. 451
  1046. 452 mix := WORD(palette[palval]);
  1047. ***** ^ not supported yet
  1048. ***** ^ undeclared identifier
  1049. ***** ^ not supported yet
  1050. ***** ^ not supported yet
  1051. 453
  1052. 454 IF INTEGER(BITSET(mix) * BITSET(0008H)) # 0 THEN
  1053. ***** ^ undeclared identifier
  1054. ***** ^ not supported yet
  1055. ***** ^ undeclared identifier
  1056. ***** ^ not supported yet
  1057. 455 blue := BITSET(blue) + BITSET(0001H);
  1058. ***** ^ not supported yet
  1059. ***** ^ undeclared identifier
  1060. ***** ^ not supported yet
  1061. ***** ^ undeclared identifier
  1062. ***** ^ not supported yet
  1063. 456 END;
  1064. 457 IF INTEGER(BITSET(mix) * BITSET(0001H)) # 0 THEN
  1065. ***** ^ undeclared identifier
  1066. ***** ^ not supported yet
  1067. ***** ^ undeclared identifier
  1068. ***** ^ not supported yet
  1069. 458 blue := BITSET(blue) + BITSET(0002H);
  1070. ***** ^ not supported yet
  1071. ***** ^ undeclared identifier
  1072. ***** ^ not supported yet
  1073. ***** ^ undeclared identifier
  1074. ***** ^ not supported yet
  1075. 459 END;
  1076. 460
  1077. 461 IF INTEGER(BITSET(mix) * BITSET(0010H)) # 0 THEN
  1078. ***** ^ undeclared identifier
  1079. ***** ^ not supported yet
  1080. ***** ^ undeclared identifier
  1081. ***** ^ not supported yet
  1082. 462 green := BITSET(green) + BITSET(0001H);
  1083. ***** ^ not supported yet
  1084. ***** ^ undeclared identifier
  1085. ***** ^ not supported yet
  1086. ***** ^ undeclared identifier
  1087. ***** ^ not supported yet
  1088. 463 END;
  1089. 464 IF INTEGER(BITSET(mix) * BITSET(0002H)) # 0 THEN
  1090. ***** ^ undeclared identifier
  1091. ***** ^ not supported yet
  1092. ***** ^ undeclared identifier
  1093. ***** ^ not supported yet
  1094. 465 green := BITSET(green) + BITSET(0002H);
  1095. ***** ^ not supported yet
  1096. ***** ^ undeclared identifier
  1097. ***** ^ not supported yet
  1098. ***** ^ undeclared identifier
  1099. ***** ^ not supported yet
  1100. 466 END;
  1101. 467
  1102. 468 IF INTEGER(BITSET(mix) * BITSET(0020H)) # 0 THEN
  1103. ***** ^ undeclared identifier
  1104. ***** ^ not supported yet
  1105. ***** ^ undeclared identifier
  1106. ***** ^ not supported yet
  1107. 469 red := BITSET(red) + BITSET(0001H);
  1108. ***** ^ not supported yet
  1109. ***** ^ undeclared identifier
  1110. ***** ^ not supported yet
  1111. ***** ^ undeclared identifier
  1112. ***** ^ not supported yet
  1113. 470 END;
  1114. 471 IF INTEGER(BITSET(mix) * BITSET(0004H)) # 0 THEN
  1115. ***** ^ undeclared identifier
  1116. ***** ^ not supported yet
  1117. ***** ^ undeclared identifier
  1118. ***** ^ not supported yet
  1119. 472 red := BITSET(red) + BITSET(0002H);
  1120. ***** ^ not supported yet
  1121. ***** ^ undeclared identifier
  1122. ***** ^ not supported yet
  1123. ***** ^ undeclared identifier
  1124. ***** ^ not supported yet
  1125. 473 END;
  1126. 474
  1127. 475 control[0] := LONGINT(red) * EGAADJUST;
  1128. ***** ^ not supported yet
  1129. ***** ^ not supported yet
  1130. ***** ^ not supported yet
  1131. 476 control[1] := LONGINT(green) * EGAADJUST;
  1132. ***** ^ not supported yet
  1133. ***** ^ not supported yet
  1134. ***** ^ not supported yet
  1135. 477 control[2] := LONGINT(blue) * EGAADJUST;
  1136. ***** ^ not supported yet
  1137. ***** ^ not supported yet
  1138. ***** ^ not supported yet
  1139. 478 END EGAunmix_color;
  1140. ***** ^ not supported yet
  1141. 479
  1142. 480
  1143. 481 PROCEDURE mix_color(palval: CARDINAL);
  1144. 482 BEGIN
  1145. 483 CASE paltype OF
  1146. 484 | 1: ANmix_color(palval);
  1147. ***** ^ not supported yet
  1148. ***** ^ not supported yet
  1149. 485 | 2: EGAmix_color(palval);
  1150. ***** ^ not supported yet
  1151. ***** ^ not supported yet
  1152. 486 ELSE
  1153. 487 GrQry.GrQuit('Device does not support a changeable color set', 1);
  1154. ***** ^ not supported yet
  1155. ***** ^ not supported yet
  1156. ***** ^ not supported yet
  1157. ***** ^ not supported yet
  1158. 488 END;
  1159. 489 END mix_color;
  1160. ***** ^ not supported yet
  1161. 490
  1162. 491
  1163. 492 PROCEDURE unmix_color(palval: CARDINAL);
  1164. 493 BEGIN
  1165. 494 CASE paltype OF
  1166. 495 | 1: ANunmix_color(palval);
  1167. ***** ^ not supported yet
  1168. ***** ^ not supported yet
  1169. 496 | 2: EGAunmix_color(palval);
  1170. ***** ^ not supported yet
  1171. ***** ^ not supported yet
  1172. 497 ELSE
  1173. 498 GrQry.GrQuit('Device does not support a changeable color set', 1);
  1174. ***** ^ not supported yet
  1175. ***** ^ not supported yet
  1176. ***** ^ not supported yet
  1177. ***** ^ not supported yet
  1178. 499 END;
  1179. 500 END unmix_color;
  1180. ***** ^ not supported yet
  1181. 501
  1182. 502 (*** Load the specified font. ***)
  1183. 503
  1184. 504 PROCEDURE LoadFont(VAR fontName: ARRAY OF CHAR);
  1185. ***** ^ not supported yet
  1186. 505 VAR
  1187. 506 Dir: GrConst.dirRec;
  1188. ***** ^ not supported yet
  1189. 507 qErr,
  1190. 508 loadErr: INTEGER;
  1191. 509 path: ARRAY[0..80] OF CHAR;
  1192. ***** ^ not supported yet
  1193. ***** ^ not supported yet
  1194. 510 fontBuf: GrFonts.adsFont;
  1195. ***** ^ not supported yet
  1196. 511 BEGIN
  1197. 512 Str.Copy(path, fontName);
  1198. ***** ^ not supported yet
  1199. ***** ^ not supported yet
  1200. ***** ^ not supported yet
  1201. ***** ^ not supported yet
  1202. 513 loadErr := -1; (* Preempt Error *)
  1203. 514 qErr := Meta.FileQuery(path, Dir, 1);
  1204. ***** ^ not supported yet
  1205. ***** ^ not supported yet
  1206. ***** ^ not supported yet
  1207. ***** ^ not supported yet
  1208. ***** ^ not supported yet
  1209. 515
  1210. 516 IF (qErr # 1) THEN
  1211. 517 (* No font file in default dir, try environment variable *)
  1212. 518 Lib.EnvironmentFind("METAPATH", path);
  1213. ***** ^ not supported yet
  1214. ***** ^ not supported yet
  1215. ***** ^ not supported yet
  1216. ***** ^ not supported yet
  1217. 519
  1218. 520 IF (path[0] # CHR(0)) THEN
  1219. ***** ^ not supported yet
  1220. ***** ^ not supported yet
  1221. ***** ^ undeclared identifier
  1222. ***** ^ not supported yet
  1223. 521 (* found the env parm, try using the path listed there *)
  1224. 522
  1225. 523 IF (path[Str.Length(path)] # '\') THEN
  1226. ***** ^ not supported yet
  1227. ***** ^ not supported yet
  1228. ***** ^ not supported yet
  1229. ***** ^ not supported yet
  1230. 524 (* If no trailing slash, add one *)
  1231. 525 Str.Append(path, '\');
  1232. ***** ^ not supported yet
  1233. ***** ^ not supported yet
  1234. ***** ^ not supported yet
  1235. ***** ^ not supported yet
  1236. 526 END;
  1237. 527
  1238. 528 Str.Append(path, fontName);
  1239. ***** ^ not supported yet
  1240. ***** ^ not supported yet
  1241. ***** ^ not supported yet
  1242. ***** ^ not supported yet
  1243. 529 qErr := Meta.FileQuery(path, Dir, 1);
  1244. ***** ^ not supported yet
  1245. ***** ^ not supported yet
  1246. ***** ^ not supported yet
  1247. ***** ^ not supported yet
  1248. ***** ^ not supported yet
  1249. 530 END;
  1250. 531 END;
  1251. 532
  1252. 533 IF (qErr = 1) THEN
  1253. 534 (* we got our file *)
  1254. 535 ALLOCATE(ADDRESS(fontBuf), VAL(CARDINAL, Dir.fileSize + 1));
  1255. ***** ^ not supported yet
  1256. ***** ^ undeclared identifier
  1257. ***** ^ not supported yet
  1258. ***** ^ undeclared identifier
  1259. ***** ^ not supported yet
  1260. ***** ^ not supported yet
  1261. ***** ^ not supported yet
  1262. 536
  1263. 537 IF (fontBuf # NIL) THEN
  1264. ***** ^ not supported yet
  1265. 538 (* We got our memory *)
  1266. 539 loadErr := Meta.FileLoad(path, ADDRESS(fontBuf), VAL(CARDINAL, Dir.fileSize+1));
  1267. ***** ^ not supported yet
  1268. ***** ^ not supported yet
  1269. ***** ^ not supported yet
  1270. ***** ^ undeclared identifier
  1271. ***** ^ not supported yet
  1272. ***** ^ undeclared identifier
  1273. ***** ^ not supported yet
  1274. ***** ^ not supported yet
  1275. ***** ^ not supported yet
  1276. 540 IF loadErr <= 0 THEN
  1277. 541 DEALLOCATE(ADDRESS(fontBuf), VAL(CARDINAL, Dir.fileSize + 1));
  1278. ***** ^ not supported yet
  1279. ***** ^ undeclared identifier
  1280. ***** ^ not supported yet
  1281. ***** ^ undeclared identifier
  1282. ***** ^ not supported yet
  1283. ***** ^ not supported yet
  1284. ***** ^ not supported yet
  1285. 542 END;
  1286. 543 Meta.SetFont(ADDRESS(fontBuf));
  1287. ***** ^ not supported yet
  1288. ***** ^ not supported yet
  1289. ***** ^ undeclared identifier
  1290. ***** ^ not supported yet
  1291. 544 END;
  1292. 545 END;
  1293. 546
  1294. 547 IF (loadErr > 0) THEN
  1295. 548 (* clear out system load error *)
  1296. 549 qErr := Meta.QueryError();
  1297. ***** ^ not supported yet
  1298. ***** ^ not supported yet
  1299. ***** ^ not supported yet
  1300. 550 ELSE
  1301. 551 (* beep if font load probs *)
  1302. 552 IO.WrChar(CHR(7));
  1303. ***** ^ not supported yet
  1304. ***** ^ not supported yet
  1305. ***** ^ undeclared identifier
  1306. ***** ^ not supported yet
  1307. 553 Str.Copy(fontName, 'Using internal SYSTEM08.FNT');
  1308. ***** ^ not supported yet
  1309. ***** ^ not supported yet
  1310. ***** ^ not supported yet
  1311. ***** ^ not supported yet
  1312. 554 END;
  1313. 555 END LoadFont;
  1314. ***** ^ not supported yet
  1315. 556
  1316. 557
  1317. 558 BEGIN
  1318. 559
  1319. 560 (* init the system *)
  1320. 561
  1321. 562 GrQry.GrQuery(GrafixCard, CommPort);
  1322. ***** ^ not supported yet
  1323. ***** ^ not supported yet
  1324. ***** ^ not supported yet
  1325. 563
  1326. 564 i := Meta.InitGrafix(-GrafixCard);
  1327. ***** ^ not supported yet
  1328. ***** ^ not supported yet
  1329. ***** ^ not supported yet
  1330. 565
  1331. 566 IF (i # 0) THEN
  1332. 567 (* Display reason for no go *)
  1333. 568 GrQry.GrInitErr(GrafixCard, CommPort, i);
  1334. ***** ^ not supported yet
  1335. ***** ^ not supported yet
  1336. ***** ^ not supported yet
  1337. 569 END;
  1338. 570
  1339. 571 (* Default EGA palette. *)
  1340. 572
  1341. 573 palette[0] := 0;
  1342. ***** ^ not supported yet
  1343. ***** ^ not supported yet
  1344. 574 palette[1] := 1;
  1345. ***** ^ not supported yet
  1346. ***** ^ not supported yet
  1347. 575 palette[2] := 2;
  1348. ***** ^ not supported yet
  1349. ***** ^ not supported yet
  1350. 576 palette[3] := 3;
  1351. ***** ^ not supported yet
  1352. ***** ^ not supported yet
  1353. 577 palette[4] := 4;
  1354. ***** ^ not supported yet
  1355. ***** ^ not supported yet
  1356. 578 palette[5] := 5;
  1357. ***** ^ not supported yet
  1358. ***** ^ not supported yet
  1359. 579 palette[6] := 14H;
  1360. ***** ^ not supported yet
  1361. ***** ^ not supported yet
  1362. 580 palette[7] := 7;
  1363. ***** ^ not supported yet
  1364. ***** ^ not supported yet
  1365. 581 palette[8] := 38H;
  1366. ***** ^ not supported yet
  1367. ***** ^ not supported yet
  1368. 582 palette[9] := 39H;
  1369. ***** ^ not supported yet
  1370. ***** ^ not supported yet
  1371. 583 palette[10] := 3AH;
  1372. ***** ^ not supported yet
  1373. ***** ^ not supported yet
  1374. 584 palette[11] := 3BH;
  1375. ***** ^ not supported yet
  1376. ***** ^ not supported yet
  1377. 585 palette[12] := 3CH;
  1378. ***** ^ not supported yet
  1379. ***** ^ not supported yet
  1380. 586 palette[13] := 3DH;
  1381. ***** ^ not supported yet
  1382. ***** ^ not supported yet
  1383. 587 palette[14] := 3EH;
  1384. ***** ^ not supported yet
  1385. ***** ^ not supported yet
  1386. 588 palette[15] := 3FH;
  1387. ***** ^ not supported yet
  1388. ***** ^ not supported yet
  1389. 589
  1390. 590 Meta.SetDisplay(GrConst.GrafPg0);
  1391. ***** ^ not supported yet
  1392. ***** ^ not supported yet
  1393. ***** ^ not supported yet
  1394. ***** ^ not supported yet
  1395. 591 Meta.InitMouse(CommPort);
  1396. ***** ^ not supported yet
  1397. ***** ^ not supported yet
  1398. ***** ^ not supported yet
  1399. 592 Meta.ScreenRect(scrnR);
  1400. ***** ^ not supported yet
  1401. ***** ^ not supported yet
  1402. ***** ^ not supported yet
  1403. 593 Meta.LimitMouse(scrnR.Xmin, scrnR.Ymin, scrnR.Xmax, scrnR.Ymax);
  1404. ***** ^ not supported yet
  1405. ***** ^ not supported yet
  1406. ***** ^ not supported yet
  1407. ***** ^ not supported yet
  1408. ***** ^ not supported yet
  1409. ***** ^ not supported yet
  1410. ***** ^ not supported yet
  1411. ***** ^ not supported yet
  1412. ***** ^ not supported yet
  1413. ***** ^ not supported yet
  1414. 594
  1415. 595 Meta.SetRect(scrnR, 0, 0, 1000, 1000);
  1416. ***** ^ not supported yet
  1417. ***** ^ not supported yet
  1418. ***** ^ not supported yet
  1419. ***** ^ not supported yet
  1420. 596 Meta.VirtualRect(scrnR);
  1421. ***** ^ not supported yet
  1422. ***** ^ not supported yet
  1423. ***** ^ not supported yet
  1424. 597 Meta.EraseRect(scrnR);
  1425. ***** ^ not supported yet
  1426. ***** ^ not supported yet
  1427. ***** ^ not supported yet
  1428. 598
  1429. 599 (* load the font *)
  1430. 600 Meta.GetPort(thePort);
  1431. ***** ^ not supported yet
  1432. ***** ^ not supported yet
  1433. ***** ^ not supported yet
  1434. 601 i := thePort^.portBMap^.devClass;
  1435. ***** ^ not supported yet
  1436. ***** ^ not supported yet
  1437. ***** ^ not supported yet
  1438. 602
  1439. 603 IF thePort^.portBMap^.pixPlanes > 1 THEN
  1440. ***** ^ not supported yet
  1441. ***** ^ not supported yet
  1442. ***** ^ not supported yet
  1443. 604 i := INTEGER(BITSET(i) * BITSET(0FFF8H));
  1444. ***** ^ undeclared identifier
  1445. ***** ^ not supported yet
  1446. ***** ^ undeclared identifier
  1447. ***** ^ not supported yet
  1448. 605 END;
  1449. 606
  1450. 607 Str.Copy(fntpath, 'SYSTEM');
  1451. ***** ^ not supported yet
  1452. ***** ^ not supported yet
  1453. ***** ^ not supported yet
  1454. ***** ^ not supported yet
  1455. 608 Str.IntToStr(LONGINT(i), val, 10, OK);
  1456. ***** ^ not supported yet
  1457. ***** ^ not supported yet
  1458. ***** ^ not supported yet
  1459. ***** ^ not supported yet
  1460. ***** ^ not supported yet
  1461. 609 Str.Append(fntpath, val);
  1462. ***** ^ not supported yet
  1463. ***** ^ not supported yet
  1464. ***** ^ not supported yet
  1465. ***** ^ not supported yet
  1466. 610 Str.Append(fntpath, '.FNT');
  1467. ***** ^ not supported yet
  1468. ***** ^ not supported yet
  1469. ***** ^ not supported yet
  1470. ***** ^ not supported yet
  1471. 611
  1472. 612 LoadFont(fntpath);
  1473. ***** ^ not supported yet
  1474. ***** ^ not supported yet
  1475. 613
  1476. 614 max_colors := Meta.QueryColors();
  1477. ***** ^ not supported yet
  1478. ***** ^ not supported yet
  1479. ***** ^ not supported yet
  1480. 615
  1481. 616 paltype := 0;
  1482. 617
  1483. 618 IF max_colors = 255 THEN
  1484. 619 paltype := 1; (* Use analog palette routines *)
  1485. 620 ELSIF GrafixCard = GrConst.EGA640x480 THEN (* this is a vga in 16 color modes *)
  1486. ***** ^ not supported yet
  1487. ***** ^ not supported yet
  1488. 621 (* Use VGA 640x480 in analog mode *)
  1489. 622 FOR i := 0 TO 15 DO
  1490. 623 palette[i] := i; (* set array for vga stuff *)
  1491. ***** ^ not supported yet
  1492. ***** ^ not supported yet
  1493. 624 END;
  1494. 625
  1495. 626 Meta.LoadPalette(0, 15, palette); (* set digital palette *)
  1496. ***** ^ not supported yet
  1497. ***** ^ not supported yet
  1498. ***** ^ not supported yet
  1499. 627
  1500. 628 palColors[0].palRed := 0FFFFH;
  1501. ***** ^ not supported yet
  1502. ***** ^ not supported yet
  1503. ***** ^ not supported yet
  1504. 629 palColors[0].palGreen := 0FFFFH;
  1505. ***** ^ not supported yet
  1506. ***** ^ not supported yet
  1507. ***** ^ not supported yet
  1508. 630 palColors[0].palBlue := 0FFFFH;
  1509. ***** ^ not supported yet
  1510. ***** ^ not supported yet
  1511. ***** ^ not supported yet
  1512. 631
  1513. 632 Meta.WritePalette(0, 0FH, 0FH, palColors[0]); (* make sure white is set *)
  1514. ***** ^ not supported yet
  1515. ***** ^ not supported yet
  1516. ***** ^ not supported yet
  1517. ***** ^ not supported yet
  1518. 633 paltype := 1; (* Use anlog palette routines *)
  1519. 634 ELSIF thePort^.portBMap^.devType = 1 THEN (* EGA ?, not 640x480 *)
  1520. ***** ^ not supported yet
  1521. ***** ^ not supported yet
  1522. ***** ^ not supported yet
  1523. 635 paltype := 2; (* Use EGA palette routines *)
  1524. 636 END;
  1525. 637
  1526. 638 (* draw the palette *)
  1527. 639 draw_palette();
  1528. ***** ^ not supported yet
  1529. ***** ^ not supported yet
  1530. 640
  1531. 641 (* draw the control panel *)
  1532. 642 draw_panel();
  1533. ***** ^ not supported yet
  1534. ***** ^ not supported yet
  1535. 643
  1536. 644 (* turn on cursor tracking *)
  1537. 645 Meta.TrackCursor(TRUE);
  1538. ***** ^ not supported yet
  1539. ***** ^ not supported yet
  1540. ***** ^ not supported yet
  1541. 646 Meta.ShowCursor();
  1542. ***** ^ not supported yet
  1543. ***** ^ not supported yet
  1544. ***** ^ not supported yet
  1545. 647
  1546. 648 (* turn on event system *)
  1547. 649 Meta.EventQueue(TRUE);
  1548. ***** ^ not supported yet
  1549. ***** ^ not supported yet
  1550. ***** ^ not supported yet
  1551. 650
  1552. 651 (* start with palette entry 0 *)
  1553. 652 selPalEntry := 0;
  1554. 653 unmix_color(selPalEntry);
  1555. ***** ^ not supported yet
  1556. ***** ^ not supported yet
  1557. 654 draw_indicator(0);
  1558. ***** ^ not supported yet
  1559. ***** ^ not supported yet
  1560. 655 draw_indicator(1);
  1561. ***** ^ not supported yet
  1562. ***** ^ not supported yet
  1563. 656 draw_indicator(2);
  1564. ***** ^ not supported yet
  1565. ***** ^ not supported yet
  1566. 657 draw_clr_rect(selPalEntry);
  1567. ***** ^ not supported yet
  1568. ***** ^ not supported yet
  1569. 658
  1570. 659 speed := 1; (* initialize the control speed *)
  1571. 660 (* process events *)
  1572. 661 LOOP
  1573. 662 (* get an event *)
  1574. 663 OK := Meta.KeyEvent(FALSE, myevent);
  1575. ***** ^ not supported yet
  1576. ***** ^ not supported yet
  1577. ***** ^ not supported yet
  1578. 664 cursor_pt.X := myevent.CursorX;
  1579. ***** ^ not supported yet
  1580. ***** ^ not supported yet
  1581. ***** ^ not supported yet
  1582. ***** ^ not supported yet
  1583. 665 cursor_pt.Y := myevent.CursorY;
  1584. ***** ^ not supported yet
  1585. ***** ^ not supported yet
  1586. ***** ^ not supported yet
  1587. ***** ^ not supported yet
  1588. 666
  1589. 667 (* if we had a mouse event *)
  1590. 668 IF OK & (myevent.ASCII = CHR(0)) & (myevent.ScanCode = BYTE(0)) THEN
  1591. ***** ^ not supported yet
  1592. ***** ^ not supported yet
  1593. ***** ^ undeclared identifier
  1594. ***** ^ not supported yet
  1595. ***** ^ not supported yet
  1596. ***** ^ not supported yet
  1597. ***** ^ undeclared identifier
  1598. ***** ^ not supported yet
  1599. 669 (* right button is exit *)
  1600. 670 IF INTEGER(BITSET(myevent.State) * BITSET(MOUSE_RIGHT)) # 0 THEN
  1601. ***** ^ undeclared identifier
  1602. ***** ^ not supported yet
  1603. ***** ^ not supported yet
  1604. ***** ^ undeclared identifier
  1605. ***** ^ not supported yet
  1606. 671 EXIT;
  1607. 672 END;
  1608. 673
  1609. 674 (* left button is select *)
  1610. 675 IF INTEGER(BITSET(myevent.State) * BITSET(MOUSE_LEFT)) # 0 THEN
  1611. ***** ^ undeclared identifier
  1612. ***** ^ not supported yet
  1613. ***** ^ not supported yet
  1614. ***** ^ undeclared identifier
  1615. ***** ^ not supported yet
  1616. 676 (* clicked a palette box ? *)
  1617. 677 i := check_palette(cursor_pt);
  1618. ***** ^ not supported yet
  1619. ***** ^ not supported yet
  1620. 678 IF (i >= 0) THEN
  1621. 679 (* select palette entry for editing *)
  1622. 680 selPalEntry := i;
  1623. 681 unmix_color(selPalEntry);
  1624. ***** ^ not supported yet
  1625. ***** ^ not supported yet
  1626. 682 draw_indicator(0);
  1627. ***** ^ not supported yet
  1628. ***** ^ not supported yet
  1629. 683 draw_indicator(1);
  1630. ***** ^ not supported yet
  1631. ***** ^ not supported yet
  1632. 684 draw_indicator(2);
  1633. ***** ^ not supported yet
  1634. ***** ^ not supported yet
  1635. 685 draw_clr_rect(selPalEntry);
  1636. ***** ^ not supported yet
  1637. ***** ^ not supported yet
  1638. 686 ELSE
  1639. 687 (* clicked a control ? *)
  1640. 688 buttons := 1;
  1641. 689
  1642. 690 LOOP
  1643. 691 i := check_panel(cursor_pt);
  1644. ***** ^ not supported yet
  1645. ***** ^ not supported yet
  1646. 692
  1647. 693 IF (i < 0) OR (buttons = 0) THEN
  1648. 694 EXIT;
  1649. 695 END;
  1650. 696 (* adjust selected control *)
  1651. 697 CASE i OF
  1652. 698 | 0: INC(control[0], LONGINT(speed)); i := 0;
  1653. ***** ^ undeclared identifier
  1654. ***** ^ not supported yet
  1655. ***** ^ not supported yet
  1656. ***** ^ not supported yet
  1657. 699 | 1: DEC(control[0], LONGINT(speed)); i := 0;
  1658. ***** ^ undeclared identifier
  1659. ***** ^ not supported yet
  1660. ***** ^ not supported yet
  1661. ***** ^ not supported yet
  1662. 700 | 2: INC(control[1], LONGINT(speed)); i := 1;
  1663. ***** ^ undeclared identifier
  1664. ***** ^ not supported yet
  1665. ***** ^ not supported yet
  1666. ***** ^ not supported yet
  1667. 701 | 3: DEC(control[1], LONGINT(speed)); i := 1;
  1668. ***** ^ undeclared identifier
  1669. ***** ^ not supported yet
  1670. ***** ^ not supported yet
  1671. ***** ^ not supported yet
  1672. 702 | 4: INC(control[2], LONGINT(speed)); i := 2;
  1673. ***** ^ undeclared identifier
  1674. ***** ^ not supported yet
  1675. ***** ^ not supported yet
  1676. ***** ^ not supported yet
  1677. 703 | 5: DEC(control[2], LONGINT(speed)); i := 2;
  1678. ***** ^ undeclared identifier
  1679. ***** ^ not supported yet
  1680. ***** ^ not supported yet
  1681. ***** ^ not supported yet
  1682. 704 ELSE
  1683. 705 i := 0;
  1684. 706 END;
  1685. 707
  1686. 708 (* move fast or slow *)
  1687. 709 IF speed < 7FFH THEN
  1688. 710 INC(speed, 3FH);
  1689. ***** ^ undeclared identifier
  1690. ***** ^ not supported yet
  1691. 711 ELSE
  1692. 712 speed := 7FFH; (* fast slow move *)
  1693. 713 END;
  1694. 714
  1695. 715 (* keep in range *)
  1696. 716 IF (control[i] > 0FFFFH) THEN
  1697. ***** ^ not supported yet
  1698. ***** ^ not supported yet
  1699. 717 control[i] := 0FFFFH;
  1700. ***** ^ not supported yet
  1701. ***** ^ not supported yet
  1702. 718 END;
  1703. 719 IF (control[i] < 0) THEN
  1704. ***** ^ not supported yet
  1705. ***** ^ not supported yet
  1706. 720 control[i] := 0H;
  1707. ***** ^ not supported yet
  1708. ***** ^ not supported yet
  1709. 721 END;
  1710. 722
  1711. 723 (* update control indicator *)
  1712. 724 draw_indicator(i);
  1713. ***** ^ not supported yet
  1714. ***** ^ not supported yet
  1715. 725
  1716. 726 (* update the palette *)
  1717. 727 mix_color(selPalEntry);
  1718. ***** ^ not supported yet
  1719. ***** ^ not supported yet
  1720. 728
  1721. 729 (* read current cursor position *)
  1722. 730 Meta.QueryCursor(x, y, curs, buttons);
  1723. ***** ^ not supported yet
  1724. ***** ^ not supported yet
  1725. ***** ^ not supported yet
  1726. 731 cursor_pt.X := x;
  1727. ***** ^ not supported yet
  1728. ***** ^ not supported yet
  1729. 732 cursor_pt.Y := y;
  1730. ***** ^ not supported yet
  1731. ***** ^ not supported yet
  1732. 733 END; (* end of while on a control *)
  1733. 734 END;
  1734. 735 END; (* end of if left button *)
  1735. 736 END; (* end of if mouse event *)
  1736. 737 IF (speed > 80H) THEN
  1737. 738 DEC(speed, 7FH);
  1738. ***** ^ undeclared identifier
  1739. ***** ^ not supported yet
  1740. 739 ELSE
  1741. 740 speed := 1; (* slow move *)
  1742. 741 END;
  1743. 742 END; (* end of while(True) *)
  1744. 743
  1745. 744 GrQry.GrQuit('', 0);
  1746. ***** ^ not supported yet
  1747. ***** ^ not supported yet
  1748. ***** ^ not supported yet
  1749. 745 END ColorPal.
  1750. 1003 errors