MGDEMO.LST 108 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423
  1. Listing:
  2. 1 MODULE MGdemo;
  3. 2
  4. 3 IMPORT Graph, IO, Lib, SYSTEM, Storage;
  5. 4
  6. 5 TYPE
  7. 6 PieInfo = RECORD
  8. 7 state: CARDINAL;
  9. 8 x1, y1, x2, y2: CARDINAL;
  10. 9 startx, starty: CARDINAL;
  11. 10 CurrentX: CARDINAL;
  12. 11 CurrentY: CARDINAL;
  13. 12 fill: BOOLEAN;
  14. 13 color: CARDINAL;
  15. 14 END;
  16. ***** ^ not supported yet
  17. 15 PieHandle = POINTER TO PieInfo;
  18. ***** ^ not supported yet
  19. 16
  20. 17 TYPE
  21. 18 ColorArray = ARRAY [0..15] OF LONGCARD;
  22. ***** ^ not supported yet
  23. ***** ^ undeclared identifier
  24. 19 SmallColorArray = ARRAY [0..3] OF CARDINAL;
  25. ***** ^ not supported yet
  26. ***** ^ not supported yet
  27. 20 CONST
  28. 21 Colors = ColorArray( Graph._BLACK, Graph._BLUE, Graph._GREEN, Graph._CYAN, Graph._RED, Graph._MAGENTA, Graph._BROWN,
  29. ***** ^ not supported yet
  30. ***** ^ not supported yet
  31. ***** ^ not supported yet
  32. ***** ^ not supported yet
  33. ***** ^ not supported yet
  34. ***** ^ not supported yet
  35. ***** ^ not supported yet
  36. ***** ^ not supported yet
  37. ***** ^ not supported yet
  38. ***** ^ not supported yet
  39. ***** ^ not supported yet
  40. ***** ^ not supported yet
  41. ***** ^ not supported yet
  42. ***** ^ not supported yet
  43. 22 Graph._WHITE, Graph._GRAY, Graph._LIGHTBLUE, Graph._LIGHTGREEN, Graph._LIGHTCYAN,
  44. ***** ^ not supported yet
  45. ***** ^ not supported yet
  46. ***** ^ not supported yet
  47. ***** ^ not supported yet
  48. ***** ^ not supported yet
  49. ***** ^ not supported yet
  50. ***** ^ not supported yet
  51. ***** ^ not supported yet
  52. ***** ^ not supported yet
  53. ***** ^ not supported yet
  54. 23 Graph._LIGHTRED, Graph._LIGHTMAGENTA, Graph._LIGHTYELLOW, Graph._BRIGHTWHITE);
  55. ***** ^ not supported yet
  56. ***** ^ not supported yet
  57. ***** ^ not supported yet
  58. ***** ^ not supported yet
  59. ***** ^ not supported yet
  60. ***** ^ not supported yet
  61. ***** ^ not supported yet
  62. ***** ^ not supported yet
  63. 24
  64. 25 VAR
  65. 26 Mono: BOOLEAN;
  66. 27 XValues: ARRAY [0..3] OF CARDINAL;
  67. ***** ^ not supported yet
  68. ***** ^ not supported yet
  69. 28 YValues: ARRAY [0..3] OF CARDINAL;
  70. ***** ^ not supported yet
  71. ***** ^ not supported yet
  72. 29 cv: Graph.VideoConfig;
  73. ***** ^ not supported yet
  74. 30 Patterns: ARRAY [0..4] OF Graph.FillMaskType;
  75. ***** ^ not supported yet
  76. ***** ^ not supported yet
  77. 31
  78. 32 PROCEDURE Max(V1, V2: CARDINAL): CARDINAL;
  79. 33
  80. 34 BEGIN
  81. 35 IF V1 > V2 THEN
  82. 36 RETURN V1;
  83. 37 ELSE
  84. 38 RETURN V2;
  85. 39 END;
  86. 40 END Max;
  87. ***** ^ not supported yet
  88. 41
  89. 42
  90. 43 PROCEDURE TestKey;
  91. 44 BEGIN
  92. 45 IF CAP(IO.RdKey()) = 'X' THEN
  93. ***** ^ undeclared identifier
  94. ***** ^ not supported yet
  95. ***** ^ not supported yet
  96. ***** ^ not supported yet
  97. 46 SYSTEM.Eval(Graph.SetVideoMode(Graph._DEFAULTMODE));
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. ***** ^ not supported yet
  101. ***** ^ not supported yet
  102. ***** ^ not supported yet
  103. ***** ^ not supported yet
  104. 47 HALT;
  105. ***** ^ undeclared identifier
  106. 48 END; (*IF*)
  107. 49 END TestKey;
  108. ***** ^ not supported yet
  109. 50
  110. 51 PROCEDURE InitPalette();
  111. 52
  112. 53 VAR
  113. 54 i: CARDINAL;
  114. 55 red, green, blue: CARDINAL;
  115. 56 color: LONGCARD;
  116. ***** ^ undeclared identifier
  117. 57 colors: ARRAY [0..255] OF LONGCARD;
  118. ***** ^ not supported yet
  119. ***** ^ undeclared identifier
  120. 58 BEGIN
  121. 59 i:=0;
  122. 60 SYSTEM.Eval(Graph.SetVideoMode(Graph._MRES256COLOR));
  123. ***** ^ not supported yet
  124. ***** ^ not supported yet
  125. ***** ^ not supported yet
  126. ***** ^ not supported yet
  127. ***** ^ not supported yet
  128. ***** ^ not supported yet
  129. 61 WHILE i < 256 DO
  130. 62 red :=CARDINAL(BITSET(i)* BITSET(0E0H))>>2;
  131. ***** ^ undeclared identifier
  132. ***** ^ not supported yet
  133. ***** ^ undeclared identifier
  134. ***** ^ not supported yet
  135. ***** ^ arithmetic operand must be numeric
  136. 63 green:=CARDINAL(BITSET(i) * BITSET(01CH))<<1;
  137. ***** ^ undeclared identifier
  138. ***** ^ not supported yet
  139. ***** ^ undeclared identifier
  140. ***** ^ not supported yet
  141. ***** ^ arithmetic operand must be numeric
  142. 64 blue :=CARDINAL(BITSET(i) * BITSET(3))<<4;
  143. ***** ^ undeclared identifier
  144. ***** ^ not supported yet
  145. ***** ^ undeclared identifier
  146. ***** ^ not supported yet
  147. ***** ^ arithmetic operand must be numeric
  148. 65 color:= (LONGCARD(blue)<<16) + (LONGCARD(green)<<8) + LONGCARD(red);
  149. ***** ^ not supported yet
  150. ***** ^ undeclared identifier
  151. ***** ^ not supported yet
  152. ***** ^ arithmetic operand must be numeric
  153. ***** ^ undeclared identifier
  154. ***** ^ not supported yet
  155. ***** ^ arithmetic operand must be numeric
  156. ***** ^ undeclared identifier
  157. ***** ^ not supported yet
  158. 66 colors[i]:=color;
  159. ***** ^ not supported yet
  160. ***** ^ not supported yet
  161. ***** ^ not supported yet
  162. 67 INC(i);
  163. ***** ^ undeclared identifier
  164. ***** ^ not supported yet
  165. 68 END;
  166. 69 SYSTEM.Eval(Graph.RemapAllPalette(colors));
  167. ***** ^ not supported yet
  168. ***** ^ not supported yet
  169. ***** ^ not supported yet
  170. ***** ^ not supported yet
  171. ***** ^ not supported yet
  172. 70 END InitPalette;
  173. ***** ^ not supported yet
  174. 71
  175. 72 PROCEDURE AdjustRGB(VAR red, green, blue: CARDINAL);
  176. 73
  177. 74 VAR
  178. 75 nr, nb, ng: CARDINAL;
  179. 76 BEGIN
  180. 77 IF (red >= blue) AND (red >= green) THEN
  181. 78 nr:=255;
  182. 79 ng:=(green*255) DIV red;
  183. 80 nb:=(blue*255) DIV red;
  184. 81 ELSIF (green >= red) AND (green >= blue) THEN
  185. 82 ng:=255;
  186. 83 nr:=(red*255) DIV green;
  187. 84 nb:=(blue*255) DIV green;
  188. 85 ELSE
  189. 86 nb:=255;
  190. 87 ng:=(green*255) DIV blue;
  191. 88 nr:=(red*255) DIV blue;
  192. 89 END;
  193. 90 red:=nr;
  194. 91 blue:=nb;
  195. 92 green:=ng;
  196. 93 END AdjustRGB;
  197. ***** ^ not supported yet
  198. 94
  199. 95 PROCEDURE PlotRGB(x, y, red, green, blue: CARDINAL);
  200. 96
  201. 97 VAR
  202. 98 r, g, b, color: CARDINAL;
  203. 99 BEGIN
  204. 100 r:=CARDINAL(BITSET(red) * BITSET(0E0H));
  205. ***** ^ undeclared identifier
  206. ***** ^ not supported yet
  207. ***** ^ undeclared identifier
  208. ***** ^ not supported yet
  209. 101 g:=CARDINAL(BITSET(green) * BITSET(0E0H))>>3;
  210. ***** ^ undeclared identifier
  211. ***** ^ not supported yet
  212. ***** ^ undeclared identifier
  213. ***** ^ not supported yet
  214. ***** ^ arithmetic operand must be numeric
  215. 102 b:=CARDINAL(BITSET(blue) * BITSET(0C0H))>>6;
  216. ***** ^ undeclared identifier
  217. ***** ^ not supported yet
  218. ***** ^ undeclared identifier
  219. ***** ^ not supported yet
  220. ***** ^ arithmetic operand must be numeric
  221. 103 color:= CARDINAL(BITSET(r) + BITSET(g) + BITSET(b));
  222. ***** ^ undeclared identifier
  223. ***** ^ not supported yet
  224. ***** ^ undeclared identifier
  225. ***** ^ not supported yet
  226. ***** ^ undeclared identifier
  227. ***** ^ not supported yet
  228. 104 Graph.Plot(x+20, y, color);
  229. ***** ^ not supported yet
  230. ***** ^ not supported yet
  231. ***** ^ not supported yet
  232. 105 END PlotRGB;
  233. ***** ^ not supported yet
  234. 106
  235. 107 PROCEDURE VGATriangle();
  236. 108
  237. 109 VAR
  238. 110 x, y: CARDINAL;
  239. 111 red, green, blue: CARDINAL;
  240. 112 BEGIN
  241. 113 InitPalette();
  242. ***** ^ not supported yet
  243. ***** ^ not supported yet
  244. 114 x:=0;
  245. 115 WHILE x < 256 DO
  246. 116 y:=0;
  247. 117 WHILE y < 200 DO
  248. 118 red:=x;
  249. 119 green:=(y*255) DIV 200;
  250. 120 IF (red+green) < 255 THEN
  251. 121 blue:=255-(red+green);
  252. 122 AdjustRGB(red, green, blue);
  253. ***** ^ not supported yet
  254. ***** ^ not supported yet
  255. 123 PlotRGB(x, y, red, green, blue);
  256. ***** ^ not supported yet
  257. ***** ^ not supported yet
  258. 124 END;
  259. 125 INC(y);
  260. ***** ^ undeclared identifier
  261. ***** ^ not supported yet
  262. 126 END;
  263. 127 INC(x);
  264. ***** ^ undeclared identifier
  265. ***** ^ not supported yet
  266. 128 END;
  267. 129 SYSTEM.Eval(Graph.SetTextColor(10));
  268. ***** ^ not supported yet
  269. ***** ^ not supported yet
  270. ***** ^ not supported yet
  271. ***** ^ not supported yet
  272. ***** ^ not supported yet
  273. 130 SYSTEM.Eval(Graph.SetTextPosition(25, 5));
  274. ***** ^ not supported yet
  275. ***** ^ not supported yet
  276. ***** ^ not supported yet
  277. ***** ^ not supported yet
  278. ***** ^ not supported yet
  279. 131 Graph.OutText('Hit Any Key To Continue,X To Exit.');
  280. ***** ^ not supported yet
  281. ***** ^ not supported yet
  282. ***** ^ not supported yet
  283. 132 TestKey;
  284. ***** ^ not supported yet
  285. 133 SYSTEM.Eval(Graph.SetVideoMode(Graph._ERESCOLOR));
  286. ***** ^ not supported yet
  287. ***** ^ not supported yet
  288. ***** ^ not supported yet
  289. ***** ^ not supported yet
  290. ***** ^ not supported yet
  291. ***** ^ not supported yet
  292. 134 END VGATriangle;
  293. ***** ^ not supported yet
  294. 135
  295. 136
  296. 137 PROCEDURE DrawEllipses();
  297. 138
  298. 139 VAR
  299. 140 n: INTEGER;
  300. 141 f: BOOLEAN;
  301. 142 x1, x2, y1, y2: CARDINAL;
  302. 143 c: CARDINAL;
  303. 144 BEGIN
  304. 145 n:=0;
  305. 146 c:=1;
  306. 147 f:=Graph._GFILLINTERIOR;
  307. ***** ^ not supported yet
  308. ***** ^ not supported yet
  309. 148 Patterns[0] := Graph.FillMaskType(88H, 44H, 22H, 11H, 88H, 44H, 22H, 11H);
  310. ***** ^ not supported yet
  311. ***** ^ not supported yet
  312. ***** ^ not supported yet
  313. ***** ^ not supported yet
  314. ***** ^ not supported yet
  315. 149 Patterns[1] := Graph.FillMaskType(0AAH, 0AAH, 0AAH, 0AAH, 0AAH, 0AAH, 0AAH, 0AAH);
  316. ***** ^ not supported yet
  317. ***** ^ not supported yet
  318. ***** ^ not supported yet
  319. ***** ^ not supported yet
  320. ***** ^ not supported yet
  321. 150 Patterns[2] := Graph.FillMaskType(0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH);
  322. ***** ^ not supported yet
  323. ***** ^ not supported yet
  324. ***** ^ not supported yet
  325. ***** ^ not supported yet
  326. ***** ^ not supported yet
  327. 151 Patterns[3] := Graph.FillMaskType(0FFH, 40H, 0FFH, 40H, 0FFH, 40H, 0FFH, 40H);
  328. ***** ^ not supported yet
  329. ***** ^ not supported yet
  330. ***** ^ not supported yet
  331. ***** ^ not supported yet
  332. ***** ^ not supported yet
  333. 152 Patterns[4] := Graph.FillMaskType(80H, 40H, 20H, 10H, 08H, 04H, 02H, 01H);
  334. ***** ^ not supported yet
  335. ***** ^ not supported yet
  336. ***** ^ not supported yet
  337. ***** ^ not supported yet
  338. ***** ^ not supported yet
  339. 153 LOOP
  340. 154 IF n = 100 THEN
  341. 155 EXIT;
  342. 156 END;
  343. 157 INC(n);
  344. ***** ^ undeclared identifier
  345. ***** ^ not supported yet
  346. 158 IF IO.KeyPressed() THEN
  347. ***** ^ not supported yet
  348. ***** ^ not supported yet
  349. ***** ^ not supported yet
  350. 159 EXIT;
  351. 160 END;
  352. 161 Graph.SetFillMask(Patterns[Lib.RANDOM(5)]);
  353. ***** ^ not supported yet
  354. ***** ^ not supported yet
  355. ***** ^ not supported yet
  356. ***** ^ not supported yet
  357. ***** ^ not supported yet
  358. ***** ^ not supported yet
  359. 162 x1:=Lib.RANDOM(cv.numxpixels-1);
  360. ***** ^ not supported yet
  361. ***** ^ not supported yet
  362. ***** ^ not supported yet
  363. ***** ^ not supported yet
  364. ***** ^ not supported yet
  365. 163 y1:=Lib.RANDOM(cv.numypixels-1);
  366. ***** ^ not supported yet
  367. ***** ^ not supported yet
  368. ***** ^ not supported yet
  369. ***** ^ not supported yet
  370. ***** ^ not supported yet
  371. 164 x2:=Lib.RANDOM(cv.numxpixels-x1);
  372. ***** ^ not supported yet
  373. ***** ^ not supported yet
  374. ***** ^ not supported yet
  375. ***** ^ not supported yet
  376. ***** ^ not supported yet
  377. 165 y2:=Lib.RANDOM(cv.numypixels-y1);
  378. ***** ^ not supported yet
  379. ***** ^ not supported yet
  380. ***** ^ not supported yet
  381. ***** ^ not supported yet
  382. ***** ^ not supported yet
  383. 166 IF f = Graph._GFILLINTERIOR THEN
  384. ***** ^ not supported yet
  385. ***** ^ not supported yet
  386. 167 f:=Graph._GBORDER;
  387. ***** ^ not supported yet
  388. ***** ^ not supported yet
  389. 168 ELSE
  390. 169 f:=Graph._GFILLINTERIOR;
  391. ***** ^ not supported yet
  392. ***** ^ not supported yet
  393. 170 END;
  394. 171 Graph.Ellipse(x1, y1, x2, y2, c, f);
  395. ***** ^ not supported yet
  396. ***** ^ not supported yet
  397. ***** ^ not supported yet
  398. 172 INC(c);
  399. ***** ^ undeclared identifier
  400. ***** ^ not supported yet
  401. 173 IF c = cv.numcolors THEN
  402. ***** ^ not supported yet
  403. ***** ^ not supported yet
  404. 174 c:=1;
  405. 175 END;
  406. 176 END;
  407. 177 IF NOT Mono THEN
  408. 178 SYSTEM.Eval(Graph.SetTextPosition(25, 1));
  409. ***** ^ not supported yet
  410. ***** ^ not supported yet
  411. ***** ^ not supported yet
  412. ***** ^ not supported yet
  413. ***** ^ not supported yet
  414. 179 Graph.OutText('Press Any Key To Continue, X To Exit');
  415. ***** ^ not supported yet
  416. ***** ^ not supported yet
  417. ***** ^ not supported yet
  418. 180 END;
  419. 181 TestKey;
  420. ***** ^ not supported yet
  421. 182 END DrawEllipses;
  422. ***** ^ not supported yet
  423. 183
  424. 184 PROCEDURE Ellipses(scale: CARDINAL);
  425. 185
  426. 186 BEGIN
  427. 187 Graph.SetClipRgn(0, 0, cv.numxpixels-1, cv.numypixels-1);
  428. ***** ^ not supported yet
  429. ***** ^ not supported yet
  430. ***** ^ not supported yet
  431. ***** ^ not supported yet
  432. ***** ^ not supported yet
  433. ***** ^ not supported yet
  434. ***** ^ not supported yet
  435. 188 Graph.ClearScreen(Graph._GCLEARSCREEN);
  436. ***** ^ not supported yet
  437. ***** ^ not supported yet
  438. ***** ^ not supported yet
  439. ***** ^ not supported yet
  440. 189 DrawEllipses();
  441. ***** ^ not supported yet
  442. ***** ^ not supported yet
  443. 190 Graph.ClearScreen(Graph._GCLEARSCREEN);
  444. ***** ^ not supported yet
  445. ***** ^ not supported yet
  446. ***** ^ not supported yet
  447. ***** ^ not supported yet
  448. 191 Graph.Rectangle(49 DIV scale, 24 DIV scale, 501 DIV scale, 291 DIV scale, 3, Graph._GBORDER);
  449. ***** ^ not supported yet
  450. ***** ^ not supported yet
  451. ***** ^ not supported yet
  452. ***** ^ not supported yet
  453. 192 Graph.SetClipRgn(50 DIV scale, 25 DIV scale, 500 DIV scale, 290 DIV scale);
  454. ***** ^ not supported yet
  455. ***** ^ not supported yet
  456. ***** ^ not supported yet
  457. 193 DrawEllipses();
  458. ***** ^ not supported yet
  459. ***** ^ not supported yet
  460. 194 Graph.SetClipRgn(0, 0, cv.numxpixels-1, cv.numypixels-1);
  461. ***** ^ not supported yet
  462. ***** ^ not supported yet
  463. ***** ^ not supported yet
  464. ***** ^ not supported yet
  465. ***** ^ not supported yet
  466. ***** ^ not supported yet
  467. ***** ^ not supported yet
  468. 195 END Ellipses;
  469. ***** ^ not supported yet
  470. 196
  471. 197 PROCEDURE InitPie(x1, y1, x2, y2: CARDINAL; InitState, scale: CARDINAL; fill: BOOLEAN): PieHandle;
  472. 198
  473. 199 VAR
  474. 200 p: PieHandle;
  475. ***** ^ not supported yet
  476. 201 BEGIN
  477. 202 Storage.ALLOCATE(p, SIZE(PieInfo));
  478. ***** ^ not supported yet
  479. ***** ^ not supported yet
  480. ***** ^ not supported yet
  481. ***** ^ undeclared identifier
  482. ***** ^ not supported yet
  483. 203 p^.x1:=x1 DIV scale;
  484. ***** ^ not supported yet
  485. ***** ^ not supported yet
  486. 204 p^.y1:=y1 DIV scale;
  487. ***** ^ not supported yet
  488. ***** ^ not supported yet
  489. 205 p^.x2:=x2 DIV scale;
  490. ***** ^ not supported yet
  491. ***** ^ not supported yet
  492. 206 p^.y2:=y2 DIV scale;
  493. ***** ^ not supported yet
  494. ***** ^ not supported yet
  495. 207 p^.CurrentX:=XValues[InitState];
  496. ***** ^ not supported yet
  497. ***** ^ not supported yet
  498. ***** ^ not supported yet
  499. ***** ^ not supported yet
  500. 208 p^.CurrentY:=YValues[InitState];
  501. ***** ^ not supported yet
  502. ***** ^ not supported yet
  503. ***** ^ not supported yet
  504. ***** ^ not supported yet
  505. 209 p^.startx:=XValues[InitState];
  506. ***** ^ not supported yet
  507. ***** ^ not supported yet
  508. ***** ^ not supported yet
  509. ***** ^ not supported yet
  510. 210 p^.starty:=YValues[InitState];
  511. ***** ^ not supported yet
  512. ***** ^ not supported yet
  513. ***** ^ not supported yet
  514. ***** ^ not supported yet
  515. 211 p^.state:=InitState;
  516. ***** ^ not supported yet
  517. ***** ^ not supported yet
  518. 212 p^.fill:=fill;
  519. ***** ^ not supported yet
  520. ***** ^ not supported yet
  521. 213 IF Mono THEN
  522. 214 p^.color:=1;
  523. ***** ^ not supported yet
  524. ***** ^ not supported yet
  525. 215 ELSE
  526. 216 p^.color:=Lib.RANDOM(cv.numcolors-2)+1;
  527. ***** ^ not supported yet
  528. ***** ^ not supported yet
  529. ***** ^ not supported yet
  530. ***** ^ not supported yet
  531. ***** ^ not supported yet
  532. ***** ^ not supported yet
  533. ***** ^ not supported yet
  534. 217 END;
  535. 218 Graph.Pie(p^.x1, p^.y1, p^.x2, p^.y2, p^.CurrentX, p^.CurrentY, p^.CurrentX, p^.CurrentY, p^.color, fill);
  536. ***** ^ not supported yet
  537. ***** ^ not supported yet
  538. ***** ^ not supported yet
  539. ***** ^ not supported yet
  540. ***** ^ not supported yet
  541. ***** ^ not supported yet
  542. ***** ^ not supported yet
  543. ***** ^ not supported yet
  544. ***** ^ not supported yet
  545. ***** ^ not supported yet
  546. ***** ^ not supported yet
  547. ***** ^ not supported yet
  548. ***** ^ not supported yet
  549. ***** ^ not supported yet
  550. ***** ^ not supported yet
  551. ***** ^ not supported yet
  552. ***** ^ not supported yet
  553. ***** ^ not supported yet
  554. ***** ^ not supported yet
  555. ***** ^ not supported yet
  556. ***** ^ not supported yet
  557. 219 RETURN p;
  558. ***** ^ not supported yet
  559. 220 END InitPie;
  560. ***** ^ not supported yet
  561. 221
  562. 222 PROCEDURE DisposePie(p: PieHandle);
  563. 223
  564. 224 BEGIN
  565. 225 Storage.DEALLOCATE(p, SIZE(PieInfo));
  566. ***** ^ not supported yet
  567. ***** ^ not supported yet
  568. ***** ^ not supported yet
  569. ***** ^ undeclared identifier
  570. ***** ^ not supported yet
  571. 226 END DisposePie;
  572. ***** ^ not supported yet
  573. 227
  574. 228 PROCEDURE Circulate(p: PieHandle);
  575. 229
  576. 230 BEGIN
  577. 231 Graph.SetFillMask(Patterns[2]);
  578. ***** ^ not supported yet
  579. ***** ^ not supported yet
  580. ***** ^ not supported yet
  581. ***** ^ not supported yet
  582. 232 Graph.Rectangle(p^.x1-p^.x2, p^.y1-p^.y2, p^.x1+p^.x2, p^.y1+p^.y2, 0, Graph._GFILLINTERIOR);
  583. ***** ^ not supported yet
  584. ***** ^ not supported yet
  585. ***** ^ not supported yet
  586. ***** ^ not supported yet
  587. ***** ^ not supported yet
  588. ***** ^ not supported yet
  589. ***** ^ not supported yet
  590. ***** ^ not supported yet
  591. ***** ^ not supported yet
  592. ***** ^ not supported yet
  593. ***** ^ not supported yet
  594. ***** ^ not supported yet
  595. ***** ^ not supported yet
  596. ***** ^ not supported yet
  597. ***** ^ not supported yet
  598. ***** ^ not supported yet
  599. ***** ^ not supported yet
  600. ***** ^ not supported yet
  601. ***** ^ not supported yet
  602. ***** ^ not supported yet
  603. 233 IF p^.state = 0 THEN
  604. ***** ^ not supported yet
  605. ***** ^ not supported yet
  606. 234 IF p^.CurrentY > 0 THEN
  607. ***** ^ not supported yet
  608. ***** ^ not supported yet
  609. 235 DEC(p^.CurrentY, 4);
  610. ***** ^ undeclared identifier
  611. ***** ^ not supported yet
  612. ***** ^ not supported yet
  613. ***** ^ not supported yet
  614. 236 ELSE
  615. 237 INC(p^.state);
  616. ***** ^ undeclared identifier
  617. ***** ^ not supported yet
  618. ***** ^ not supported yet
  619. 238 END;
  620. 239 END;
  621. 240 IF p^.state = 1 THEN
  622. ***** ^ not supported yet
  623. ***** ^ not supported yet
  624. 241 IF p^.CurrentX > 0 THEN
  625. ***** ^ not supported yet
  626. ***** ^ not supported yet
  627. 242 DEC(p^.CurrentX, 8);
  628. ***** ^ undeclared identifier
  629. ***** ^ not supported yet
  630. ***** ^ not supported yet
  631. ***** ^ not supported yet
  632. 243 ELSE
  633. 244 INC(p^.state);
  634. ***** ^ undeclared identifier
  635. ***** ^ not supported yet
  636. ***** ^ not supported yet
  637. 245 END;
  638. 246 END;
  639. 247 IF p^.state = 2 THEN
  640. ***** ^ not supported yet
  641. ***** ^ not supported yet
  642. 248 IF p^.CurrentY < cv.numypixels THEN
  643. ***** ^ not supported yet
  644. ***** ^ not supported yet
  645. ***** ^ not supported yet
  646. ***** ^ not supported yet
  647. 249 INC(p^.CurrentY, 4);
  648. ***** ^ undeclared identifier
  649. ***** ^ not supported yet
  650. ***** ^ not supported yet
  651. ***** ^ not supported yet
  652. 250 ELSE
  653. 251 INC(p^.state);
  654. ***** ^ undeclared identifier
  655. ***** ^ not supported yet
  656. ***** ^ not supported yet
  657. 252 END;
  658. 253 END;
  659. 254 IF p^.state = 3 THEN
  660. ***** ^ not supported yet
  661. ***** ^ not supported yet
  662. 255 IF p^.CurrentX < cv.numxpixels THEN
  663. ***** ^ not supported yet
  664. ***** ^ not supported yet
  665. ***** ^ not supported yet
  666. ***** ^ not supported yet
  667. 256 INC(p^.CurrentX, 8);
  668. ***** ^ undeclared identifier
  669. ***** ^ not supported yet
  670. ***** ^ not supported yet
  671. ***** ^ not supported yet
  672. 257 ELSE
  673. 258 p^.state:=0;
  674. ***** ^ not supported yet
  675. ***** ^ not supported yet
  676. 259 END;
  677. 260 END;
  678. 261 IF p^.fill = Graph._GFILLINTERIOR THEN
  679. ***** ^ not supported yet
  680. ***** ^ not supported yet
  681. ***** ^ not supported yet
  682. ***** ^ not supported yet
  683. 262 Graph.SetFillMask(Patterns[Lib.RANDOM(5)]);
  684. ***** ^ not supported yet
  685. ***** ^ not supported yet
  686. ***** ^ not supported yet
  687. ***** ^ not supported yet
  688. ***** ^ not supported yet
  689. ***** ^ not supported yet
  690. 263 END;
  691. 264 Graph.Pie(p^.x1, p^.y1, p^.x2, p^.y2, p^.CurrentX, p^.CurrentY,
  692. ***** ^ not supported yet
  693. ***** ^ not supported yet
  694. ***** ^ not supported yet
  695. ***** ^ not supported yet
  696. ***** ^ not supported yet
  697. ***** ^ not supported yet
  698. ***** ^ not supported yet
  699. ***** ^ not supported yet
  700. ***** ^ not supported yet
  701. ***** ^ not supported yet
  702. ***** ^ not supported yet
  703. ***** ^ not supported yet
  704. ***** ^ not supported yet
  705. ***** ^ not supported yet
  706. 265 p^.startx, p^.starty, p^.color, p^.fill);
  707. ***** ^ not supported yet
  708. ***** ^ not supported yet
  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. 266 END Circulate;
  716. ***** ^ not supported yet
  717. 267
  718. 268 PROCEDURE Pies(scale: INTEGER);
  719. 269
  720. 270 VAR
  721. 271 p: ARRAY [0..4] OF PieHandle;
  722. ***** ^ not supported yet
  723. ***** ^ not supported yet
  724. 272 n: INTEGER;
  725. 273 BEGIN
  726. 274 n:=0;
  727. 275 XValues[0]:=cv.numxpixels-1;
  728. ***** ^ not supported yet
  729. ***** ^ not supported yet
  730. ***** ^ not supported yet
  731. ***** ^ not supported yet
  732. 276 XValues[1]:=cv.numxpixels-1;
  733. ***** ^ not supported yet
  734. ***** ^ not supported yet
  735. ***** ^ not supported yet
  736. ***** ^ not supported yet
  737. 277 XValues[2]:=0;
  738. ***** ^ not supported yet
  739. ***** ^ not supported yet
  740. 278 XValues[3]:=0;
  741. ***** ^ not supported yet
  742. ***** ^ not supported yet
  743. 279 YValues[0]:=cv.numypixels-1;
  744. ***** ^ not supported yet
  745. ***** ^ not supported yet
  746. ***** ^ not supported yet
  747. ***** ^ not supported yet
  748. 280 YValues[1]:=0;
  749. ***** ^ not supported yet
  750. ***** ^ not supported yet
  751. 281 YValues[2]:=0;
  752. ***** ^ not supported yet
  753. ***** ^ not supported yet
  754. 282 YValues[3]:=cv.numypixels-1;
  755. ***** ^ not supported yet
  756. ***** ^ not supported yet
  757. ***** ^ not supported yet
  758. ***** ^ not supported yet
  759. 283 Graph.ClearScreen(Graph._GCLEARSCREEN);
  760. ***** ^ not supported yet
  761. ***** ^ not supported yet
  762. ***** ^ not supported yet
  763. ***** ^ not supported yet
  764. 284 Graph.SetClipRgn(0, 0, cv.numxpixels-1, cv.numypixels-1);
  765. ***** ^ not supported yet
  766. ***** ^ not supported yet
  767. ***** ^ not supported yet
  768. ***** ^ not supported yet
  769. ***** ^ not supported yet
  770. ***** ^ not supported yet
  771. ***** ^ not supported yet
  772. 285 p[0]:=InitPie(80, 60, 50, 30, 0, scale, Graph._GBORDER);
  773. ***** ^ not supported yet
  774. ***** ^ not supported yet
  775. ***** ^ not supported yet
  776. ***** ^ not supported yet
  777. ***** ^ not supported yet
  778. 286 p[1]:=InitPie(510, 70, 60, 60, 1, scale, Graph._GFILLINTERIOR);
  779. ***** ^ not supported yet
  780. ***** ^ not supported yet
  781. ***** ^ not supported yet
  782. ***** ^ not supported yet
  783. ***** ^ not supported yet
  784. 287 p[2]:=InitPie(70, 255, 30, 55, 2, scale, Graph._GFILLINTERIOR);
  785. ***** ^ not supported yet
  786. ***** ^ not supported yet
  787. ***** ^ not supported yet
  788. ***** ^ not supported yet
  789. ***** ^ not supported yet
  790. 288 p[3]:=InitPie(450, 200, 55, 35, 3, scale, Graph._GBORDER);
  791. ***** ^ not supported yet
  792. ***** ^ not supported yet
  793. ***** ^ not supported yet
  794. ***** ^ not supported yet
  795. ***** ^ not supported yet
  796. 289 p[4]:=InitPie(320, 160, 45, 45, 0, scale, Graph._GFILLINTERIOR);
  797. ***** ^ not supported yet
  798. ***** ^ not supported yet
  799. ***** ^ not supported yet
  800. ***** ^ not supported yet
  801. ***** ^ not supported yet
  802. 290
  803. 291 IF NOT Mono THEN
  804. 292 SYSTEM.Eval(Graph.SetTextPosition(25, 1));
  805. ***** ^ not supported yet
  806. ***** ^ not supported yet
  807. ***** ^ not supported yet
  808. ***** ^ not supported yet
  809. ***** ^ not supported yet
  810. 293 Graph.OutText('Press Any Key To Continue, X To Exit');
  811. ***** ^ not supported yet
  812. ***** ^ not supported yet
  813. ***** ^ not supported yet
  814. 294 END;
  815. 295 WHILE NOT IO.KeyPressed() DO
  816. ***** ^ not supported yet
  817. ***** ^ not supported yet
  818. ***** ^ not supported yet
  819. 296 IF n = 5 THEN
  820. 297 n:=0;
  821. 298 END;
  822. 299 Circulate(p[n]);
  823. ***** ^ not supported yet
  824. ***** ^ not supported yet
  825. ***** ^ not supported yet
  826. 300 INC(n);
  827. ***** ^ undeclared identifier
  828. ***** ^ not supported yet
  829. 301 END;
  830. 302 TestKey;
  831. ***** ^ not supported yet
  832. 303 n:=0;
  833. 304 WHILE n < 5 DO
  834. 305 DisposePie(p[n]);
  835. ***** ^ not supported yet
  836. ***** ^ not supported yet
  837. ***** ^ not supported yet
  838. 306 INC(n);
  839. ***** ^ undeclared identifier
  840. ***** ^ not supported yet
  841. 307 END;
  842. 308 Graph.ClearScreen(Graph._GCLEARSCREEN);
  843. ***** ^ not supported yet
  844. ***** ^ not supported yet
  845. ***** ^ not supported yet
  846. ***** ^ not supported yet
  847. 309 Graph.SetFillMask(Patterns[2]);
  848. ***** ^ not supported yet
  849. ***** ^ not supported yet
  850. ***** ^ not supported yet
  851. ***** ^ not supported yet
  852. 310 END Pies;
  853. ***** ^ not supported yet
  854. 311
  855. 312
  856. 313
  857. 314 VAR
  858. 315 spotlist: ARRAY [0..5] OF ARRAY [0..5] OF Graph.GraphCoords;
  859. ***** ^ not supported yet
  860. ***** ^ not supported yet
  861. ***** ^ not supported yet
  862. 316
  863. 317 PROCEDURE DrawCircles(patnum, start, depth, width: INTEGER);
  864. 318
  865. 319 VAR
  866. 320 n: INTEGER;
  867. 321 x, y, xpos, ypos: CARDINAL;
  868. 322 BEGIN
  869. 323 n:=0;
  870. 324 LOOP
  871. 325 x:=spotlist[patnum-1][n].xcoord;
  872. ***** ^ not supported yet
  873. ***** ^ not supported yet
  874. ***** ^ not supported yet
  875. ***** ^ not supported yet
  876. 326 IF x = 0 THEN EXIT END;
  877. 327 xpos:=CARDINAL(width>>2)*x;
  878. ***** ^ not supported yet
  879. 328 y:=spotlist[patnum-1][n].ycoord;
  880. ***** ^ not supported yet
  881. ***** ^ not supported yet
  882. ***** ^ not supported yet
  883. ***** ^ not supported yet
  884. 329 ypos:=CARDINAL(depth>>3)*y+CARDINAL(start);
  885. ***** ^ not supported yet
  886. ***** ^ not supported yet
  887. 330 Graph.Ellipse(xpos, ypos, 4, 4, cv.numcolors-1, Graph._GFILLINTERIOR);
  888. ***** ^ not supported yet
  889. ***** ^ not supported yet
  890. ***** ^ not supported yet
  891. ***** ^ not supported yet
  892. ***** ^ not supported yet
  893. ***** ^ not supported yet
  894. 331 INC(n);
  895. ***** ^ undeclared identifier
  896. ***** ^ not supported yet
  897. 332 IF n = 6 THEN
  898. 333 EXIT;
  899. 334 END;
  900. 335 END;
  901. 336 END DrawCircles;
  902. ***** ^ not supported yet
  903. 337
  904. 338
  905. 339 PROCEDURE MoveSideways(image: ADDRESS; pos: ARRAY OF CARDINAL;
  906. ***** ^ undeclared identifier
  907. ***** ^ not supported yet
  908. 340 limit: CARDINAL; incr: INTEGER): CARDINAL;
  909. 341
  910. 342 VAR
  911. 343 x, y: CARDINAL;
  912. 344 ret: INTEGER;
  913. 345 BEGIN
  914. 346 x:=0;
  915. 347 y:=0;
  916. 348 ret:=0;
  917. 349 LOOP
  918. 350 IF x = pos[limit] THEN EXIT END;
  919. ***** ^ not supported yet
  920. ***** ^ not supported yet
  921. 351 Graph.PutImage(x, y, image, Graph._GXOR);
  922. ***** ^ not supported yet
  923. ***** ^ not supported yet
  924. ***** ^ not supported yet
  925. ***** ^ not supported yet
  926. ***** ^ not supported yet
  927. 352 INC(x, incr);
  928. ***** ^ undeclared identifier
  929. ***** ^ not supported yet
  930. 353 Graph.PutImage(x, y, image, Graph._GPSET);
  931. ***** ^ not supported yet
  932. ***** ^ not supported yet
  933. ***** ^ not supported yet
  934. ***** ^ not supported yet
  935. ***** ^ not supported yet
  936. 354 IF IO.KeyPressed() THEN
  937. ***** ^ not supported yet
  938. ***** ^ not supported yet
  939. ***** ^ not supported yet
  940. 355 TestKey;
  941. ***** ^ not supported yet
  942. 356 ret:=1;
  943. 357 EXIT;
  944. 358 END;
  945. 359 END;
  946. 360 RETURN ret;
  947. 361 END MoveSideways;
  948. ***** ^ not supported yet
  949. 362
  950. 363 PROCEDURE MoveDown(image: ADDRESS; pos: ARRAY OF CARDINAL;
  951. ***** ^ undeclared identifier
  952. ***** ^ not supported yet
  953. 364 limit: CARDINAL; xpos: CARDINAL; incr: INTEGER): INTEGER;
  954. 365
  955. 366 VAR
  956. 367 y: CARDINAL;
  957. 368 ret: INTEGER;
  958. 369 BEGIN
  959. 370 y:=0;
  960. 371 ret:=0;
  961. 372 LOOP
  962. 373 IF y = pos[limit] THEN EXIT END;
  963. ***** ^ not supported yet
  964. ***** ^ not supported yet
  965. 374 Graph.PutImage(xpos, y, image, Graph._GXOR);
  966. ***** ^ not supported yet
  967. ***** ^ not supported yet
  968. ***** ^ not supported yet
  969. ***** ^ not supported yet
  970. ***** ^ not supported yet
  971. 375 INC(y, incr);
  972. ***** ^ undeclared identifier
  973. ***** ^ not supported yet
  974. 376 Graph.PutImage(xpos, y, image, Graph._GPSET);
  975. ***** ^ not supported yet
  976. ***** ^ not supported yet
  977. ***** ^ not supported yet
  978. ***** ^ not supported yet
  979. ***** ^ not supported yet
  980. 377 IF IO.KeyPressed() THEN
  981. ***** ^ not supported yet
  982. ***** ^ not supported yet
  983. ***** ^ not supported yet
  984. 378 TestKey;
  985. ***** ^ not supported yet
  986. 379 ret:=1;
  987. 380 EXIT;
  988. 381 END;
  989. 382 END;
  990. 383 RETURN ret;
  991. 384 END MoveDown;
  992. ***** ^ not supported yet
  993. 385
  994. 386 PROCEDURE DrawSpots(number, start, depth, width: INTEGER);
  995. 387
  996. 388 VAR
  997. 389 pattern: ARRAY [0..2] OF CARDINAL;
  998. ***** ^ not supported yet
  999. ***** ^ not supported yet
  1000. 390 n: CARDINAL;
  1001. 391 BEGIN
  1002. 392 IF number = 0 THEN RETURN END;
  1003. 393 CASE number OF
  1004. 394 | 1:
  1005. 395 pattern[0]:=1;
  1006. ***** ^ not supported yet
  1007. ***** ^ not supported yet
  1008. 396 pattern[1]:=0;
  1009. ***** ^ not supported yet
  1010. ***** ^ not supported yet
  1011. 397 | 2:
  1012. 398 pattern[0]:=2;
  1013. ***** ^ not supported yet
  1014. ***** ^ not supported yet
  1015. 399 pattern[1]:=0;
  1016. ***** ^ not supported yet
  1017. ***** ^ not supported yet
  1018. 400 | 3:
  1019. 401 pattern[0]:=2;
  1020. ***** ^ not supported yet
  1021. ***** ^ not supported yet
  1022. 402 pattern[1]:=1;
  1023. ***** ^ not supported yet
  1024. ***** ^ not supported yet
  1025. 403 pattern[2]:=0;
  1026. ***** ^ not supported yet
  1027. ***** ^ not supported yet
  1028. 404 | 4:
  1029. 405 pattern[0]:=4;
  1030. ***** ^ not supported yet
  1031. ***** ^ not supported yet
  1032. 406 pattern[1]:=0;
  1033. ***** ^ not supported yet
  1034. ***** ^ not supported yet
  1035. 407 | 5:
  1036. 408 pattern[0]:=4;
  1037. ***** ^ not supported yet
  1038. ***** ^ not supported yet
  1039. 409 pattern[1]:=1;
  1040. ***** ^ not supported yet
  1041. ***** ^ not supported yet
  1042. 410 pattern[2]:=0;
  1043. ***** ^ not supported yet
  1044. ***** ^ not supported yet
  1045. 411 | 6:
  1046. 412 pattern[0]:=6;
  1047. ***** ^ not supported yet
  1048. ***** ^ not supported yet
  1049. 413 pattern[1]:=0;
  1050. ***** ^ not supported yet
  1051. ***** ^ not supported yet
  1052. 414 END;
  1053. 415 n:=0;
  1054. 416 WHILE pattern[n] # 0 DO
  1055. ***** ^ not supported yet
  1056. ***** ^ not supported yet
  1057. 417 DrawCircles(pattern[n], start, depth, width);
  1058. ***** ^ not supported yet
  1059. ***** ^ not supported yet
  1060. ***** ^ not supported yet
  1061. ***** ^ not supported yet
  1062. 418 INC(n);
  1063. ***** ^ undeclared identifier
  1064. ***** ^ not supported yet
  1065. 419 END;
  1066. 420 END DrawSpots;
  1067. ***** ^ not supported yet
  1068. 421
  1069. 422 PROCEDURE DrawDomino(depth, width: INTEGER);
  1070. 423
  1071. 424 VAR
  1072. 425 spots: INTEGER;
  1073. 426 BEGIN
  1074. 427 Graph.Rectangle(0, 0, width, depth, cv.numcolors-1, Graph._GBORDER);
  1075. ***** ^ not supported yet
  1076. ***** ^ not supported yet
  1077. ***** ^ not supported yet
  1078. ***** ^ not supported yet
  1079. ***** ^ not supported yet
  1080. ***** ^ not supported yet
  1081. 428 Graph.Line(0, depth DIV 2, width, depth DIV 2, cv.numcolors-1);
  1082. ***** ^ not supported yet
  1083. ***** ^ not supported yet
  1084. ***** ^ not supported yet
  1085. ***** ^ not supported yet
  1086. ***** ^ not supported yet
  1087. 429 spots:=Lib.RANDOM(7);
  1088. ***** ^ not supported yet
  1089. ***** ^ not supported yet
  1090. ***** ^ not supported yet
  1091. 430 DrawSpots(spots, 0, depth, width);
  1092. ***** ^ not supported yet
  1093. ***** ^ not supported yet
  1094. 431 spots:=Lib.RANDOM(7);
  1095. ***** ^ not supported yet
  1096. ***** ^ not supported yet
  1097. ***** ^ not supported yet
  1098. 432 DrawSpots(spots, depth DIV 2, depth, width);
  1099. ***** ^ not supported yet
  1100. ***** ^ not supported yet
  1101. 433 END DrawDomino;
  1102. ***** ^ not supported yet
  1103. 434
  1104. 435
  1105. 436 PROCEDURE MakeDomino(depth, width: INTEGER): ADDRESS;
  1106. ***** ^ undeclared identifier
  1107. 437
  1108. 438 VAR
  1109. 439 Buffer: ADDRESS;
  1110. ***** ^ undeclared identifier
  1111. 440 size: LONGCARD;
  1112. ***** ^ undeclared identifier
  1113. 441 BEGIN
  1114. 442 size:=Graph.ImageSize(0, 0, width, depth);
  1115. ***** ^ not supported yet
  1116. ***** ^ not supported yet
  1117. ***** ^ not supported yet
  1118. ***** ^ not supported yet
  1119. 443 Storage.ALLOCATE(Buffer, CARDINAL(size));
  1120. ***** ^ not supported yet
  1121. ***** ^ not supported yet
  1122. ***** ^ not supported yet
  1123. ***** ^ not supported yet
  1124. 444 DrawDomino(depth, width);
  1125. ***** ^ not supported yet
  1126. ***** ^ not supported yet
  1127. 445 Graph.GetImage(0, 0, width, depth, Buffer);
  1128. ***** ^ not supported yet
  1129. ***** ^ not supported yet
  1130. ***** ^ not supported yet
  1131. 446 RETURN Buffer;
  1132. ***** ^ not supported yet
  1133. 447 END MakeDomino;
  1134. ***** ^ not supported yet
  1135. 448
  1136. 449 PROCEDURE Animation(adapter: CARDINAL);
  1137. 450
  1138. 451 VAR
  1139. 452 ColPosition: ARRAY [0..10] OF CARDINAL;
  1140. ***** ^ not supported yet
  1141. ***** ^ not supported yet
  1142. 453 RowPosition: ARRAY [0..2] OF CARDINAL;
  1143. ***** ^ not supported yet
  1144. ***** ^ not supported yet
  1145. 454 count, width, depth, incr: INTEGER;
  1146. 455 MaxRow, MaxCol, clear: INTEGER;
  1147. 456 CurrentRow, CurrentCol: INTEGER;
  1148. 457 image: ADDRESS;
  1149. ***** ^ undeclared identifier
  1150. 458 BEGIN
  1151. 459 spotlist[0][0]:= Graph.GraphCoords(2, 2);
  1152. ***** ^ not supported yet
  1153. ***** ^ not supported yet
  1154. ***** ^ not supported yet
  1155. ***** ^ not supported yet
  1156. ***** ^ not supported yet
  1157. ***** ^ not supported yet
  1158. 460 spotlist[1][0]:= Graph.GraphCoords(1, 1);
  1159. ***** ^ not supported yet
  1160. ***** ^ not supported yet
  1161. ***** ^ not supported yet
  1162. ***** ^ not supported yet
  1163. ***** ^ not supported yet
  1164. ***** ^ not supported yet
  1165. 461 spotlist[1][1]:= Graph.GraphCoords(3, 3);
  1166. ***** ^ not supported yet
  1167. ***** ^ not supported yet
  1168. ***** ^ not supported yet
  1169. ***** ^ not supported yet
  1170. ***** ^ not supported yet
  1171. ***** ^ not supported yet
  1172. 462 spotlist[2][0]:= Graph.GraphCoords(0, 0);
  1173. ***** ^ not supported yet
  1174. ***** ^ not supported yet
  1175. ***** ^ not supported yet
  1176. ***** ^ not supported yet
  1177. ***** ^ not supported yet
  1178. ***** ^ not supported yet
  1179. 463 spotlist[3][0]:= Graph.GraphCoords(1, 1);
  1180. ***** ^ not supported yet
  1181. ***** ^ not supported yet
  1182. ***** ^ not supported yet
  1183. ***** ^ not supported yet
  1184. ***** ^ not supported yet
  1185. ***** ^ not supported yet
  1186. 464 spotlist[3][1]:= Graph.GraphCoords(3, 1);
  1187. ***** ^ not supported yet
  1188. ***** ^ not supported yet
  1189. ***** ^ not supported yet
  1190. ***** ^ not supported yet
  1191. ***** ^ not supported yet
  1192. ***** ^ not supported yet
  1193. 465 spotlist[3][2]:= Graph.GraphCoords(1, 3);
  1194. ***** ^ not supported yet
  1195. ***** ^ not supported yet
  1196. ***** ^ not supported yet
  1197. ***** ^ not supported yet
  1198. ***** ^ not supported yet
  1199. ***** ^ not supported yet
  1200. 466 spotlist[3][3]:= Graph.GraphCoords(3, 3);
  1201. ***** ^ not supported yet
  1202. ***** ^ not supported yet
  1203. ***** ^ not supported yet
  1204. ***** ^ not supported yet
  1205. ***** ^ not supported yet
  1206. ***** ^ not supported yet
  1207. 467 spotlist[4][0]:= Graph.GraphCoords(0, 0);
  1208. ***** ^ not supported yet
  1209. ***** ^ not supported yet
  1210. ***** ^ not supported yet
  1211. ***** ^ not supported yet
  1212. ***** ^ not supported yet
  1213. ***** ^ not supported yet
  1214. 468 spotlist[5][0]:= Graph.GraphCoords(1, 1);
  1215. ***** ^ not supported yet
  1216. ***** ^ not supported yet
  1217. ***** ^ not supported yet
  1218. ***** ^ not supported yet
  1219. ***** ^ not supported yet
  1220. ***** ^ not supported yet
  1221. 469 spotlist[5][1]:= Graph.GraphCoords(3, 1);
  1222. ***** ^ not supported yet
  1223. ***** ^ not supported yet
  1224. ***** ^ not supported yet
  1225. ***** ^ not supported yet
  1226. ***** ^ not supported yet
  1227. ***** ^ not supported yet
  1228. 470 spotlist[5][2]:= Graph.GraphCoords(1, 2);
  1229. ***** ^ not supported yet
  1230. ***** ^ not supported yet
  1231. ***** ^ not supported yet
  1232. ***** ^ not supported yet
  1233. ***** ^ not supported yet
  1234. ***** ^ not supported yet
  1235. 471 spotlist[5][3]:= Graph.GraphCoords(3, 2);
  1236. ***** ^ not supported yet
  1237. ***** ^ not supported yet
  1238. ***** ^ not supported yet
  1239. ***** ^ not supported yet
  1240. ***** ^ not supported yet
  1241. ***** ^ not supported yet
  1242. 472 spotlist[5][4]:= Graph.GraphCoords(1, 3);
  1243. ***** ^ not supported yet
  1244. ***** ^ not supported yet
  1245. ***** ^ not supported yet
  1246. ***** ^ not supported yet
  1247. ***** ^ not supported yet
  1248. ***** ^ not supported yet
  1249. 473 spotlist[5][5]:= Graph.GraphCoords(3, 3);
  1250. ***** ^ not supported yet
  1251. ***** ^ not supported yet
  1252. ***** ^ not supported yet
  1253. ***** ^ not supported yet
  1254. ***** ^ not supported yet
  1255. ***** ^ not supported yet
  1256. 474 Graph.ClearScreen(Graph._GCLEARSCREEN);
  1257. ***** ^ not supported yet
  1258. ***** ^ not supported yet
  1259. ***** ^ not supported yet
  1260. ***** ^ not supported yet
  1261. 475 Graph.SetFillMask(Patterns[2]);
  1262. ***** ^ not supported yet
  1263. ***** ^ not supported yet
  1264. ***** ^ not supported yet
  1265. ***** ^ not supported yet
  1266. 476 IF (adapter = Graph._EGA) OR (adapter = Graph._HGC) THEN
  1267. ***** ^ not supported yet
  1268. ***** ^ not supported yet
  1269. ***** ^ not supported yet
  1270. ***** ^ not supported yet
  1271. 477 width:=50;
  1272. 478 depth:=100;
  1273. 479 MaxRow:=2;
  1274. 480 MaxCol:=9;
  1275. 481 clear:=20;
  1276. 482 incr:=10;
  1277. 483 ELSE
  1278. 484 width:=50;
  1279. 485 depth:=90;
  1280. 486 MaxRow:=1;
  1281. 487 MaxCol:=4;
  1282. 488 clear:=10;
  1283. 489 incr:=5;
  1284. 490 END;
  1285. 491 count:=0;
  1286. 492 WHILE count <= MaxCol DO
  1287. 493 ColPosition[count]:=count*(width+10);
  1288. ***** ^ not supported yet
  1289. ***** ^ not supported yet
  1290. 494 INC(count);
  1291. ***** ^ undeclared identifier
  1292. ***** ^ not supported yet
  1293. 495 END;
  1294. 496 count:=0;
  1295. 497 WHILE count <= MaxRow DO
  1296. 498 RowPosition[count]:=count*(depth+clear);
  1297. ***** ^ not supported yet
  1298. ***** ^ not supported yet
  1299. 499 INC(count);
  1300. ***** ^ undeclared identifier
  1301. ***** ^ not supported yet
  1302. 500 END;
  1303. 501 CurrentCol:=MaxCol;
  1304. 502 CurrentRow:=MaxRow;
  1305. 503
  1306. 504 LOOP
  1307. 505 IF CurrentCol < 0 THEN EXIT END;
  1308. 506 image:=MakeDomino(depth, width);
  1309. ***** ^ not supported yet
  1310. ***** ^ not supported yet
  1311. ***** ^ not supported yet
  1312. 507 IF CurrentCol > 0 THEN
  1313. 508 IF MoveSideways(image, ColPosition, CurrentCol, incr) # 0 THEN
  1314. ***** ^ not supported yet
  1315. ***** ^ not supported yet
  1316. ***** ^ not supported yet
  1317. ***** ^ not supported yet
  1318. 509 EXIT;
  1319. 510 END;
  1320. 511 END;
  1321. 512 IF CurrentRow > 0 THEN
  1322. 513 IF MoveDown(image, RowPosition, CurrentRow, ColPosition[CurrentCol], incr) # 0 THEN
  1323. ***** ^ not supported yet
  1324. ***** ^ not supported yet
  1325. ***** ^ not supported yet
  1326. ***** ^ not supported yet
  1327. ***** ^ not supported yet
  1328. ***** ^ not supported yet
  1329. 514 EXIT;
  1330. 515 END;
  1331. 516 DEC(CurrentRow);
  1332. ***** ^ undeclared identifier
  1333. ***** ^ not supported yet
  1334. 517 ELSE
  1335. 518 DEC(CurrentCol);
  1336. ***** ^ undeclared identifier
  1337. ***** ^ not supported yet
  1338. 519 CurrentRow:=MaxRow;
  1339. 520 END;
  1340. 521 Storage.DEALLOCATE(image, CARDINAL(Graph.ImageSize(0, 0, width, depth)));
  1341. ***** ^ not supported yet
  1342. ***** ^ not supported yet
  1343. ***** ^ not supported yet
  1344. ***** ^ not supported yet
  1345. ***** ^ not supported yet
  1346. ***** ^ not supported yet
  1347. 522 IF IO.KeyPressed() THEN
  1348. ***** ^ not supported yet
  1349. ***** ^ not supported yet
  1350. ***** ^ not supported yet
  1351. 523 EXIT;
  1352. 524 END;
  1353. 525 END;
  1354. 526 IF NOT Mono THEN
  1355. 527 SYSTEM.Eval(Graph.SetTextPosition(25, 1));
  1356. ***** ^ not supported yet
  1357. ***** ^ not supported yet
  1358. ***** ^ not supported yet
  1359. ***** ^ not supported yet
  1360. ***** ^ not supported yet
  1361. 528 Graph.OutText('Press Any Key To Continue, X To Exit.');
  1362. ***** ^ not supported yet
  1363. ***** ^ not supported yet
  1364. ***** ^ not supported yet
  1365. 529 END;
  1366. 530 TestKey;
  1367. ***** ^ not supported yet
  1368. 531 END Animation;
  1369. ***** ^ not supported yet
  1370. 532
  1371. 533
  1372. 534
  1373. 535
  1374. 536 PROCEDURE Bars(scale: INTEGER);
  1375. 537
  1376. 538 VAR
  1377. 539 x1, y1,x2, y2, x3, y3, x4, y4: CARDINAL;
  1378. 540 NewMask: Graph.FillMaskType;
  1379. ***** ^ not supported yet
  1380. 541 BEGIN
  1381. 542 Graph.SetClipRgn(0, 0, cv.numxpixels-1, cv.numypixels-1);
  1382. ***** ^ not supported yet
  1383. ***** ^ not supported yet
  1384. ***** ^ not supported yet
  1385. ***** ^ not supported yet
  1386. ***** ^ not supported yet
  1387. ***** ^ not supported yet
  1388. ***** ^ not supported yet
  1389. 543 Graph.ClearScreen(Graph._GCLEARSCREEN);
  1390. ***** ^ not supported yet
  1391. ***** ^ not supported yet
  1392. ***** ^ not supported yet
  1393. ***** ^ not supported yet
  1394. 544 x1:=460 DIV scale;
  1395. 545 y1:=150 DIV scale;
  1396. 546 x2:=140 DIV scale;
  1397. 547 y2:=130 DIV scale;
  1398. 548 x4:=300 DIV scale;
  1399. 549 y4:=260 DIV scale;
  1400. 550 x3:=620 DIV scale;
  1401. 551 y3:=260 DIV scale;
  1402. 552 Graph.Pie(x1, y1, x2, y2, x3, y3, x4, y4, Max(4 MOD cv.numcolors, 1), Graph._GFILLINTERIOR);
  1403. ***** ^ not supported yet
  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. 553
  1412. 554 x1:=460 DIV scale;
  1413. 555 y1:=170 DIV scale;
  1414. 556 x2:=140 DIV scale;
  1415. 557 y2:=130 DIV scale;
  1416. 558 x3:=300 DIV scale;
  1417. 559 y3:=280 DIV scale;
  1418. 560 x4:=620 DIV scale;
  1419. 561 y4:=280 DIV scale;
  1420. 562 Graph.Pie(x1, y1, x2, y2, x3, y3, x4, y4, Max(3 MOD cv.numcolors, 1), Graph._GBORDER);
  1421. ***** ^ not supported yet
  1422. ***** ^ not supported yet
  1423. ***** ^ not supported yet
  1424. ***** ^ not supported yet
  1425. ***** ^ not supported yet
  1426. ***** ^ not supported yet
  1427. ***** ^ not supported yet
  1428. ***** ^ not supported yet
  1429. 563
  1430. 564
  1431. 565 NewMask[0]:=88H;
  1432. ***** ^ not supported yet
  1433. ***** ^ not supported yet
  1434. 566 NewMask[1]:=44H;
  1435. ***** ^ not supported yet
  1436. ***** ^ not supported yet
  1437. 567 NewMask[2]:=22H;
  1438. ***** ^ not supported yet
  1439. ***** ^ not supported yet
  1440. 568 NewMask[3]:=11H;
  1441. ***** ^ not supported yet
  1442. ***** ^ not supported yet
  1443. 569 NewMask[4]:=88H;
  1444. ***** ^ not supported yet
  1445. ***** ^ not supported yet
  1446. 570 NewMask[5]:=44H;
  1447. ***** ^ not supported yet
  1448. ***** ^ not supported yet
  1449. 571 NewMask[6]:=22H;
  1450. ***** ^ not supported yet
  1451. ***** ^ not supported yet
  1452. 572 NewMask[7]:=11H;
  1453. ***** ^ not supported yet
  1454. ***** ^ not supported yet
  1455. 573 Graph.SetFillMask(NewMask);
  1456. ***** ^ not supported yet
  1457. ***** ^ not supported yet
  1458. ***** ^ not supported yet
  1459. 574 x1:=19 DIV scale;
  1460. 575 y1:=10 DIV scale;
  1461. 576 x2:=x1;
  1462. 577 y2:=321 DIV scale;
  1463. 578 x3:=600 DIV scale;
  1464. 579 y3:=y2;
  1465. 580
  1466. 581 Graph.Line(x1, y1, x2, y2, cv.numcolors-1);
  1467. ***** ^ not supported yet
  1468. ***** ^ not supported yet
  1469. ***** ^ not supported yet
  1470. ***** ^ not supported yet
  1471. ***** ^ not supported yet
  1472. 582 Graph.Line(x2, y2, x3, y3, cv.numcolors-1);
  1473. ***** ^ not supported yet
  1474. ***** ^ not supported yet
  1475. ***** ^ not supported yet
  1476. ***** ^ not supported yet
  1477. ***** ^ not supported yet
  1478. 583 IF NOT Mono THEN
  1479. 584 SYSTEM.Eval(Graph.SetTextPosition(25, 13 DIV scale));
  1480. ***** ^ not supported yet
  1481. ***** ^ not supported yet
  1482. ***** ^ not supported yet
  1483. ***** ^ not supported yet
  1484. ***** ^ not supported yet
  1485. 585 Graph.OutText('Bar Graphs and Pie Charts');
  1486. ***** ^ not supported yet
  1487. ***** ^ not supported yet
  1488. ***** ^ not supported yet
  1489. 586 END;
  1490. 587 x1:=20 DIV scale;
  1491. 588 y1:=20 DIV scale;
  1492. 589 x2:=59 DIV scale;
  1493. 590 y2:=320 DIV scale;
  1494. 591 Graph.Cube(Graph._GTOP, x1, y1, x2, y2, 20 DIV scale, Max(1 MOD cv.numcolors, 1), Graph._GFILLINTERIOR);
  1495. ***** ^ not supported yet
  1496. ***** ^ not supported yet
  1497. ***** ^ not supported yet
  1498. ***** ^ not supported yet
  1499. ***** ^ not supported yet
  1500. ***** ^ not supported yet
  1501. ***** ^ not supported yet
  1502. ***** ^ not supported yet
  1503. ***** ^ not supported yet
  1504. ***** ^ not supported yet
  1505. 592
  1506. 593
  1507. 594 x1:=60 DIV scale;
  1508. 595 y1:=120 DIV scale;
  1509. 596 x2:=99 DIV scale;
  1510. 597 y2:=320 DIV scale;
  1511. 598 Graph.Cube(Graph._GTOP, x1, y1, x2, y2, 20 DIV scale, Max(2 MOD cv.numcolors, 1),Graph._GFILLINTERIOR);
  1512. ***** ^ not supported yet
  1513. ***** ^ not supported yet
  1514. ***** ^ not supported yet
  1515. ***** ^ not supported yet
  1516. ***** ^ not supported yet
  1517. ***** ^ not supported yet
  1518. ***** ^ not supported yet
  1519. ***** ^ not supported yet
  1520. ***** ^ not supported yet
  1521. ***** ^ not supported yet
  1522. 599
  1523. 600
  1524. 601 x1:=100 DIV scale;
  1525. 602 y1:=80 DIV scale;
  1526. 603 x2:=139 DIV scale;
  1527. 604 y2:=320 DIV scale;
  1528. 605 Graph.Cube(Graph._GTOP, x1, y1, x2, y2, 20 DIV scale, Max(3 MOD cv.numcolors, 1), Graph._GFILLINTERIOR );
  1529. ***** ^ not supported yet
  1530. ***** ^ not supported yet
  1531. ***** ^ not supported yet
  1532. ***** ^ not supported yet
  1533. ***** ^ not supported yet
  1534. ***** ^ not supported yet
  1535. ***** ^ not supported yet
  1536. ***** ^ not supported yet
  1537. ***** ^ not supported yet
  1538. ***** ^ not supported yet
  1539. 606
  1540. 607
  1541. 608 x1:=140 DIV scale;
  1542. 609 y1:=200 DIV scale;
  1543. 610 x2:=179 DIV scale;
  1544. 611 y2:=320 DIV scale;
  1545. 612 Graph.Cube(Graph._GTOP, x1, y1, x2, y2, 20 DIV scale, Max(4 MOD cv.numcolors, 1), Graph._GFILLINTERIOR);
  1546. ***** ^ not supported yet
  1547. ***** ^ not supported yet
  1548. ***** ^ not supported yet
  1549. ***** ^ not supported yet
  1550. ***** ^ not supported yet
  1551. ***** ^ not supported yet
  1552. ***** ^ not supported yet
  1553. ***** ^ not supported yet
  1554. ***** ^ not supported yet
  1555. ***** ^ not supported yet
  1556. 613
  1557. 614 SYSTEM.Eval(IO.RdKey());
  1558. ***** ^ not supported yet
  1559. ***** ^ not supported yet
  1560. ***** ^ not supported yet
  1561. ***** ^ not supported yet
  1562. ***** ^ not supported yet
  1563. 615 END Bars;
  1564. ***** ^ not supported yet
  1565. 616
  1566. 617
  1567. 618 PROCEDURE RandColor(): CARDINAL;
  1568. 619
  1569. 620 VAR
  1570. 621 color: CARDINAL;
  1571. 622 BEGIN
  1572. 623 color:=Lib.RANDOM(cv.numcolors);
  1573. ***** ^ not supported yet
  1574. ***** ^ not supported yet
  1575. ***** ^ not supported yet
  1576. ***** ^ not supported yet
  1577. 624 IF color = 0 THEN
  1578. 625 color:=cv.numcolors-1;
  1579. ***** ^ not supported yet
  1580. ***** ^ not supported yet
  1581. 626 END;
  1582. 627 RETURN color;
  1583. 628 END RandColor;
  1584. ***** ^ not supported yet
  1585. 629
  1586. 630
  1587. 631 PROCEDURE DrawLines();
  1588. 632
  1589. 633 VAR
  1590. 634 x, y, col: CARDINAL;
  1591. 635 MaxX, MaxY: CARDINAL;
  1592. 636 top, left, bottom, right: CARDINAL;
  1593. 637 i, limit: INTEGER;
  1594. 638 BEGIN
  1595. 639 Graph.ClearScreen(Graph._GCLEARSCREEN);
  1596. ***** ^ not supported yet
  1597. ***** ^ not supported yet
  1598. ***** ^ not supported yet
  1599. ***** ^ not supported yet
  1600. 640 top:=0;
  1601. 641 left:=0;
  1602. 642 bottom:=cv.numypixels - 1;
  1603. ***** ^ not supported yet
  1604. ***** ^ not supported yet
  1605. 643 right :=cv.numxpixels - 1;
  1606. ***** ^ not supported yet
  1607. ***** ^ not supported yet
  1608. 644 MaxX:=cv.numxpixels - 1;
  1609. ***** ^ not supported yet
  1610. ***** ^ not supported yet
  1611. 645 MaxY:=cv.numypixels - 1;
  1612. ***** ^ not supported yet
  1613. ***** ^ not supported yet
  1614. 646 limit:=cv.numcolors-1;
  1615. ***** ^ not supported yet
  1616. ***** ^ not supported yet
  1617. 647 col:=0;
  1618. 648 i := 0;
  1619. 649 WHILE (i <= limit) & ~IO.KeyPressed() DO
  1620. ***** ^ not supported yet
  1621. ***** ^ not supported yet
  1622. ***** ^ not supported yet
  1623. 650 INC(col);
  1624. ***** ^ undeclared identifier
  1625. ***** ^ not supported yet
  1626. 651 Graph.SetClipRgn(left, top, right, bottom);
  1627. ***** ^ not supported yet
  1628. ***** ^ not supported yet
  1629. ***** ^ not supported yet
  1630. 652 INC(top, 4);
  1631. ***** ^ undeclared identifier
  1632. ***** ^ not supported yet
  1633. 653 INC(left, 4);
  1634. ***** ^ undeclared identifier
  1635. ***** ^ not supported yet
  1636. 654 DEC(bottom, 4);
  1637. ***** ^ undeclared identifier
  1638. ***** ^ not supported yet
  1639. 655 DEC(right, 4);
  1640. ***** ^ undeclared identifier
  1641. ***** ^ not supported yet
  1642. 656 x := 0;
  1643. 657 WHILE x <= MaxX DO
  1644. 658 Graph.Line(x, 0, MaxX - x,MaxY, col);
  1645. ***** ^ not supported yet
  1646. ***** ^ not supported yet
  1647. ***** ^ not supported yet
  1648. 659 INC(x, 4);
  1649. ***** ^ undeclared identifier
  1650. ***** ^ not supported yet
  1651. 660 END;
  1652. 661 y := 0;
  1653. 662 WHILE y <= MaxY DO
  1654. 663 Graph.Line(MaxX, y, 0, MaxY - y, col);
  1655. ***** ^ not supported yet
  1656. ***** ^ not supported yet
  1657. ***** ^ not supported yet
  1658. 664 INC(y, 2);
  1659. ***** ^ undeclared identifier
  1660. ***** ^ not supported yet
  1661. 665 END;
  1662. 666 INC(i);
  1663. ***** ^ undeclared identifier
  1664. ***** ^ not supported yet
  1665. 667 END;
  1666. 668 SYSTEM.Eval(Graph.SetTextPosition(25, 1));
  1667. ***** ^ not supported yet
  1668. ***** ^ not supported yet
  1669. ***** ^ not supported yet
  1670. ***** ^ not supported yet
  1671. ***** ^ not supported yet
  1672. 669 Graph.SetClipRgn(0, 0, cv.numxpixels-1, cv.numypixels-1);
  1673. ***** ^ not supported yet
  1674. ***** ^ not supported yet
  1675. ***** ^ not supported yet
  1676. ***** ^ not supported yet
  1677. ***** ^ not supported yet
  1678. ***** ^ not supported yet
  1679. ***** ^ not supported yet
  1680. 670 IF NOT Mono THEN
  1681. 671 Graph.OutText('Press Any Key To Continue, X To Exit.');
  1682. ***** ^ not supported yet
  1683. ***** ^ not supported yet
  1684. ***** ^ not supported yet
  1685. 672 END;
  1686. 673 TestKey;
  1687. ***** ^ not supported yet
  1688. 674 Graph.ClearScreen(Graph._GCLEARSCREEN);
  1689. ***** ^ not supported yet
  1690. ***** ^ not supported yet
  1691. ***** ^ not supported yet
  1692. ***** ^ not supported yet
  1693. 675 END DrawLines;
  1694. ***** ^ not supported yet
  1695. 676
  1696. 677 PROCEDURE DrawLogo(scale: INTEGER; Cols: SmallColorArray);
  1697. 678
  1698. 679 VAR
  1699. 680 mode: BOOLEAN;
  1700. 681 BEGIN
  1701. 682 IF Mono THEN
  1702. 683 mode:=Graph._GBORDER;
  1703. ***** ^ not supported yet
  1704. ***** ^ not supported yet
  1705. 684 ELSE
  1706. 685 mode:=Graph._GFILLINTERIOR;
  1707. ***** ^ not supported yet
  1708. ***** ^ not supported yet
  1709. 686 END;
  1710. 687 Graph.Rectangle(140 DIV scale, 20 DIV scale, 500 DIV scale, 330 DIV scale, Cols[0], mode);
  1711. ***** ^ not supported yet
  1712. ***** ^ not supported yet
  1713. ***** ^ not supported yet
  1714. ***** ^ not supported yet
  1715. ***** ^ not supported yet
  1716. 688 Graph.Line(225 DIV scale, 110 DIV scale, 320 DIV scale, 140 DIV scale, Cols[1]);
  1717. ***** ^ not supported yet
  1718. ***** ^ not supported yet
  1719. ***** ^ not supported yet
  1720. ***** ^ not supported yet
  1721. 689 Graph.Line(320 DIV scale, 140 DIV scale, 415 DIV scale, 110 DIV scale, Cols[1]);
  1722. ***** ^ not supported yet
  1723. ***** ^ not supported yet
  1724. ***** ^ not supported yet
  1725. ***** ^ not supported yet
  1726. 690 Graph.Line(415 DIV scale, 110 DIV scale, 460 DIV scale, 125 DIV scale, Cols[1]);
  1727. ***** ^ not supported yet
  1728. ***** ^ not supported yet
  1729. ***** ^ not supported yet
  1730. ***** ^ not supported yet
  1731. 691 Graph.Line(460 DIV scale, 125 DIV scale, 460 DIV scale, 225 DIV scale, Cols[1]);
  1732. ***** ^ not supported yet
  1733. ***** ^ not supported yet
  1734. ***** ^ not supported yet
  1735. ***** ^ not supported yet
  1736. 692 Graph.Line(460 DIV scale, 225 DIV scale, 365 DIV scale, 255 DIV scale, Cols[1]);
  1737. ***** ^ not supported yet
  1738. ***** ^ not supported yet
  1739. ***** ^ not supported yet
  1740. ***** ^ not supported yet
  1741. 693 Graph.Line(365 DIV scale, 255 DIV scale, 365 DIV scale, 285 DIV scale, Cols[1]);
  1742. ***** ^ not supported yet
  1743. ***** ^ not supported yet
  1744. ***** ^ not supported yet
  1745. ***** ^ not supported yet
  1746. 694 Graph.Line(365 DIV scale, 285 DIV scale, 320 DIV scale, 300 DIV scale, Cols[1]);
  1747. ***** ^ not supported yet
  1748. ***** ^ not supported yet
  1749. ***** ^ not supported yet
  1750. ***** ^ not supported yet
  1751. 695 Graph.Line(320 DIV scale, 300 DIV scale, 180 DIV scale, 255 DIV scale, Cols[1]);
  1752. ***** ^ not supported yet
  1753. ***** ^ not supported yet
  1754. ***** ^ not supported yet
  1755. ***** ^ not supported yet
  1756. 696 Graph.Line(180 DIV scale, 255 DIV scale, 180 DIV scale, 190 DIV scale, Cols[1]);
  1757. ***** ^ not supported yet
  1758. ***** ^ not supported yet
  1759. ***** ^ not supported yet
  1760. ***** ^ not supported yet
  1761. 697 Graph.Line(180 DIV scale, 190 DIV scale, 225 DIV scale, 205 DIV scale, Cols[1]);
  1762. ***** ^ not supported yet
  1763. ***** ^ not supported yet
  1764. ***** ^ not supported yet
  1765. ***** ^ not supported yet
  1766. 698 Graph.Line(225 DIV scale, 205 DIV scale, 225 DIV scale, 235 DIV scale, Cols[1]);
  1767. ***** ^ not supported yet
  1768. ***** ^ not supported yet
  1769. ***** ^ not supported yet
  1770. ***** ^ not supported yet
  1771. 699 Graph.Line(225 DIV scale, 235 DIV scale, 270 DIV scale, 250 DIV scale, Cols[1]);
  1772. ***** ^ not supported yet
  1773. ***** ^ not supported yet
  1774. ***** ^ not supported yet
  1775. ***** ^ not supported yet
  1776. 700 Graph.Line(270 DIV scale, 250 DIV scale, 270 DIV scale, 190 DIV scale, Cols[1]);
  1777. ***** ^ not supported yet
  1778. ***** ^ not supported yet
  1779. ***** ^ not supported yet
  1780. ***** ^ not supported yet
  1781. 701 Graph.Line(270 DIV scale, 190 DIV scale, 180 DIV scale, 160 DIV scale, Cols[1]);
  1782. ***** ^ not supported yet
  1783. ***** ^ not supported yet
  1784. ***** ^ not supported yet
  1785. ***** ^ not supported yet
  1786. 702 Graph.Line(180 DIV scale, 160 DIV scale, 180 DIV scale, 125 DIV scale, Cols[1]);
  1787. ***** ^ not supported yet
  1788. ***** ^ not supported yet
  1789. ***** ^ not supported yet
  1790. ***** ^ not supported yet
  1791. 703 Graph.Line(180 DIV scale, 125 DIV scale, 225 DIV scale, 110 DIV scale, Cols[1]);
  1792. ***** ^ not supported yet
  1793. ***** ^ not supported yet
  1794. ***** ^ not supported yet
  1795. ***** ^ not supported yet
  1796. 704
  1797. 705 Graph.Line(180 DIV scale, 125 DIV scale, 320 DIV scale, 170 DIV scale, Cols[1]);
  1798. ***** ^ not supported yet
  1799. ***** ^ not supported yet
  1800. ***** ^ not supported yet
  1801. ***** ^ not supported yet
  1802. 706 Graph.Line(320 DIV scale, 170 DIV scale, 460 DIV scale, 125 DIV scale, Cols[1]);
  1803. ***** ^ not supported yet
  1804. ***** ^ not supported yet
  1805. ***** ^ not supported yet
  1806. ***** ^ not supported yet
  1807. 707 Graph.Line(320 DIV scale, 170 DIV scale, 320 DIV scale, 300 DIV scale, Cols[1]);
  1808. ***** ^ not supported yet
  1809. ***** ^ not supported yet
  1810. ***** ^ not supported yet
  1811. ***** ^ not supported yet
  1812. 708
  1813. 709 Graph.Line(365 DIV scale, 190 DIV scale, 415 DIV scale, 175 DIV scale, Cols[1]);
  1814. ***** ^ not supported yet
  1815. ***** ^ not supported yet
  1816. ***** ^ not supported yet
  1817. ***** ^ not supported yet
  1818. 710 Graph.Line(415 DIV scale, 175 DIV scale, 415 DIV scale, 210 DIV scale, Cols[1]);
  1819. ***** ^ not supported yet
  1820. ***** ^ not supported yet
  1821. ***** ^ not supported yet
  1822. ***** ^ not supported yet
  1823. 711 Graph.Line(415 DIV scale, 210 DIV scale, 365 DIV scale, 225 DIV scale, Cols[1]);
  1824. ***** ^ not supported yet
  1825. ***** ^ not supported yet
  1826. ***** ^ not supported yet
  1827. ***** ^ not supported yet
  1828. 712 Graph.Line(365 DIV scale, 225 DIV scale, 365 DIV scale, 190 DIV scale, Cols[1]);
  1829. ***** ^ not supported yet
  1830. ***** ^ not supported yet
  1831. ***** ^ not supported yet
  1832. ***** ^ not supported yet
  1833. 713 Graph.Line(365 DIV scale, 190 DIV scale, 415 DIV scale, 210 DIV scale, Cols[1]);
  1834. ***** ^ not supported yet
  1835. ***** ^ not supported yet
  1836. ***** ^ not supported yet
  1837. ***** ^ not supported yet
  1838. 714
  1839. 715 Graph.Line(225 DIV scale, 205 DIV scale, 270 DIV scale, 190 DIV scale, Cols[1]);
  1840. ***** ^ not supported yet
  1841. ***** ^ not supported yet
  1842. ***** ^ not supported yet
  1843. ***** ^ not supported yet
  1844. 716 Graph.Line(225 DIV scale, 235 DIV scale, 270 DIV scale, 220 DIV scale, Cols[1]);
  1845. ***** ^ not supported yet
  1846. ***** ^ not supported yet
  1847. ***** ^ not supported yet
  1848. ***** ^ not supported yet
  1849. 717 Graph.Line(180 DIV scale, 190 DIV scale, 225 DIV scale, 175 DIV scale, Cols[1]);
  1850. ***** ^ not supported yet
  1851. ***** ^ not supported yet
  1852. ***** ^ not supported yet
  1853. ***** ^ not supported yet
  1854. 718
  1855. 719 IF NOT Mono THEN
  1856. 720 Graph.FloodFill(250 DIV scale, 130 DIV scale, Cols[1], Cols[1]);
  1857. ***** ^ not supported yet
  1858. ***** ^ not supported yet
  1859. ***** ^ not supported yet
  1860. ***** ^ not supported yet
  1861. ***** ^ not supported yet
  1862. ***** ^ not supported yet
  1863. 721 Graph.FloodFill(230 DIV scale, 180 DIV scale, Cols[1], Cols[1]);
  1864. ***** ^ not supported yet
  1865. ***** ^ not supported yet
  1866. ***** ^ not supported yet
  1867. ***** ^ not supported yet
  1868. ***** ^ not supported yet
  1869. ***** ^ not supported yet
  1870. 722 Graph.FloodFill(260 DIV scale, 240 DIV scale, Cols[1], Cols[1]);
  1871. ***** ^ not supported yet
  1872. ***** ^ not supported yet
  1873. ***** ^ not supported yet
  1874. ***** ^ not supported yet
  1875. ***** ^ not supported yet
  1876. ***** ^ not supported yet
  1877. 723 Graph.FloodFill(380 DIV scale, 210 DIV scale, Cols[1], Cols[1]);
  1878. ***** ^ not supported yet
  1879. ***** ^ not supported yet
  1880. ***** ^ not supported yet
  1881. ***** ^ not supported yet
  1882. ***** ^ not supported yet
  1883. ***** ^ not supported yet
  1884. 724
  1885. 725 Graph.FloodFill(200 DIV scale, 230 DIV scale, Cols[2], Cols[1]);
  1886. ***** ^ not supported yet
  1887. ***** ^ not supported yet
  1888. ***** ^ not supported yet
  1889. ***** ^ not supported yet
  1890. ***** ^ not supported yet
  1891. ***** ^ not supported yet
  1892. 726 Graph.FloodFill(250 DIV scale, 220 DIV scale, Cols[2], Cols[1]);
  1893. ***** ^ not supported yet
  1894. ***** ^ not supported yet
  1895. ***** ^ not supported yet
  1896. ***** ^ not supported yet
  1897. ***** ^ not supported yet
  1898. ***** ^ not supported yet
  1899. 727 Graph.FloodFill(400 DIV scale, 190 DIV scale, Cols[2], Cols[1]);
  1900. ***** ^ not supported yet
  1901. ***** ^ not supported yet
  1902. ***** ^ not supported yet
  1903. ***** ^ not supported yet
  1904. ***** ^ not supported yet
  1905. ***** ^ not supported yet
  1906. 728 Graph.FloodFill(440 DIV scale, 190 DIV scale, Cols[2], Cols[1]);
  1907. ***** ^ not supported yet
  1908. ***** ^ not supported yet
  1909. ***** ^ not supported yet
  1910. ***** ^ not supported yet
  1911. ***** ^ not supported yet
  1912. ***** ^ not supported yet
  1913. 729 END;
  1914. 730 END DrawLogo;
  1915. ***** ^ not supported yet
  1916. 731
  1917. 732 PROCEDURE Rotate(Colors: ARRAY OF LONGCARD);
  1918. ***** ^ undeclared identifier
  1919. 733
  1920. 734 VAR
  1921. 735 n: CARDINAL;
  1922. 736 BEGIN
  1923. 737 n:=0;
  1924. 738 Colors[15]:=Colors[0];
  1925. ***** ^ not supported yet
  1926. ***** ^ not supported yet
  1927. ***** ^ not supported yet
  1928. ***** ^ not supported yet
  1929. 739 WHILE n < 15 DO
  1930. 740 Colors[n]:=Colors[n+1];
  1931. ***** ^ not supported yet
  1932. ***** ^ not supported yet
  1933. ***** ^ not supported yet
  1934. ***** ^ not supported yet
  1935. 741 INC(n);
  1936. ***** ^ undeclared identifier
  1937. ***** ^ not supported yet
  1938. 742 END;
  1939. 743 END Rotate;
  1940. ***** ^ not supported yet
  1941. 744
  1942. 745 PROCEDURE CGAIntro();
  1943. 746
  1944. 747 VAR
  1945. 748 c: SmallColorArray;
  1946. ***** ^ not supported yet
  1947. 749 BEGIN
  1948. 750 c:=SmallColorArray(1,2,3,4);
  1949. ***** ^ not supported yet
  1950. ***** ^ not supported yet
  1951. 751 Graph.ClearScreen(Graph._GCLEARSCREEN);
  1952. ***** ^ not supported yet
  1953. ***** ^ not supported yet
  1954. ***** ^ not supported yet
  1955. ***** ^ not supported yet
  1956. 752 DrawLogo(2, c);
  1957. ***** ^ not supported yet
  1958. ***** ^ not supported yet
  1959. 753 SYSTEM.Eval(Graph.SetTextPosition(4, 9));
  1960. ***** ^ not supported yet
  1961. ***** ^ not supported yet
  1962. ***** ^ not supported yet
  1963. ***** ^ not supported yet
  1964. ***** ^ not supported yet
  1965. 754 SYSTEM.Eval(Graph.SetTextColor(2));
  1966. ***** ^ not supported yet
  1967. ***** ^ not supported yet
  1968. ***** ^ not supported yet
  1969. ***** ^ not supported yet
  1970. ***** ^ not supported yet
  1971. 755 Graph.OutText('TopSpeed Modula-2 Graphics');
  1972. ***** ^ not supported yet
  1973. ***** ^ not supported yet
  1974. ***** ^ not supported yet
  1975. 756 SYSTEM.Eval(Graph.SetTextPosition(25, 1));
  1976. ***** ^ not supported yet
  1977. ***** ^ not supported yet
  1978. ***** ^ not supported yet
  1979. ***** ^ not supported yet
  1980. ***** ^ not supported yet
  1981. 757 Graph.OutText('Press Any Key To Continue, X To Exit.');
  1982. ***** ^ not supported yet
  1983. ***** ^ not supported yet
  1984. ***** ^ not supported yet
  1985. 758 TestKey;
  1986. ***** ^ not supported yet
  1987. 759 END CGAIntro;
  1988. ***** ^ not supported yet
  1989. 760
  1990. 761 PROCEDURE EGAIntro();
  1991. 762
  1992. 763 VAR
  1993. 764 n : INTEGER;
  1994. 765 c : SmallColorArray;
  1995. ***** ^ not supported yet
  1996. 766
  1997. 767 PROCEDURE GetKey():CHAR;
  1998. 768 VAR
  1999. 769 c : CHAR;
  2000. 770 BEGIN
  2001. 771 c := IO.RdKey();
  2002. ***** ^ not supported yet
  2003. ***** ^ not supported yet
  2004. ***** ^ not supported yet
  2005. 772 IF CAP(c) = 'X' THEN
  2006. ***** ^ undeclared identifier
  2007. ***** ^ not supported yet
  2008. 773 SYSTEM.Eval(Graph.SetVideoMode(Graph._DEFAULTMODE));
  2009. ***** ^ not supported yet
  2010. ***** ^ not supported yet
  2011. ***** ^ not supported yet
  2012. ***** ^ not supported yet
  2013. ***** ^ not supported yet
  2014. ***** ^ not supported yet
  2015. 774 HALT;
  2016. ***** ^ undeclared identifier
  2017. 775 END; (*IF*)
  2018. 776 RETURN c;
  2019. 777 END GetKey;
  2020. ***** ^ not supported yet
  2021. 778
  2022. 779 BEGIN
  2023. 780 c:=SmallColorArray(9, 8, 15, 6);
  2024. ***** ^ not supported yet
  2025. ***** ^ not supported yet
  2026. 781 Graph.OutText('TopSpeed Modula-2 Graphics');
  2027. ***** ^ not supported yet
  2028. ***** ^ not supported yet
  2029. ***** ^ not supported yet
  2030. 782 SYSTEM.Eval(Graph.SetActivePage(1));
  2031. ***** ^ not supported yet
  2032. ***** ^ not supported yet
  2033. ***** ^ not supported yet
  2034. ***** ^ not supported yet
  2035. ***** ^ not supported yet
  2036. 783 Graph.ClearScreen(Graph._GCLEARSCREEN);
  2037. ***** ^ not supported yet
  2038. ***** ^ not supported yet
  2039. ***** ^ not supported yet
  2040. ***** ^ not supported yet
  2041. 784 DrawLogo(1, c);
  2042. ***** ^ not supported yet
  2043. ***** ^ not supported yet
  2044. 785 SYSTEM.Eval(Graph.SetTextPosition(4, 20));
  2045. ***** ^ not supported yet
  2046. ***** ^ not supported yet
  2047. ***** ^ not supported yet
  2048. ***** ^ not supported yet
  2049. ***** ^ not supported yet
  2050. 786 SYSTEM.Eval(Graph.SetTextColor(4));
  2051. ***** ^ not supported yet
  2052. ***** ^ not supported yet
  2053. ***** ^ not supported yet
  2054. ***** ^ not supported yet
  2055. ***** ^ not supported yet
  2056. 787 Graph.OutText('TopSpeed Modula-2 Graphics Library Demo');
  2057. ***** ^ not supported yet
  2058. ***** ^ not supported yet
  2059. ***** ^ not supported yet
  2060. 788 SYSTEM.Eval(Graph.SetVisualPage(1));
  2061. ***** ^ not supported yet
  2062. ***** ^ not supported yet
  2063. ***** ^ not supported yet
  2064. ***** ^ not supported yet
  2065. ***** ^ not supported yet
  2066. 789 SYSTEM.Eval(Graph.SetTextColor(10));
  2067. ***** ^ not supported yet
  2068. ***** ^ not supported yet
  2069. ***** ^ not supported yet
  2070. ***** ^ not supported yet
  2071. ***** ^ not supported yet
  2072. 790 SYSTEM.Eval(Graph.SetTextPosition(25, 23));
  2073. ***** ^ not supported yet
  2074. ***** ^ not supported yet
  2075. ***** ^ not supported yet
  2076. ***** ^ not supported yet
  2077. ***** ^ not supported yet
  2078. 791 Graph.OutText('Press Any Key To Continue, X To Exit');
  2079. ***** ^ not supported yet
  2080. ***** ^ not supported yet
  2081. ***** ^ not supported yet
  2082. 792 IF CAP(GetKey()) = 'C' THEN
  2083. ***** ^ undeclared identifier
  2084. ***** ^ not supported yet
  2085. ***** ^ not supported yet
  2086. 793 n:=1;
  2087. 794 WHILE NOT IO.KeyPressed() DO
  2088. ***** ^ not supported yet
  2089. ***** ^ not supported yet
  2090. ***** ^ not supported yet
  2091. 795 SYSTEM.Eval(Graph.RemapPalette(6, Colors[(6+n) MOD 16]));
  2092. ***** ^ not supported yet
  2093. ***** ^ not supported yet
  2094. ***** ^ not supported yet
  2095. ***** ^ not supported yet
  2096. ***** ^ not supported yet
  2097. 796 SYSTEM.Eval(Graph.RemapPalette(8, Colors[(8+n) MOD 16]));
  2098. ***** ^ not supported yet
  2099. ***** ^ not supported yet
  2100. ***** ^ not supported yet
  2101. ***** ^ not supported yet
  2102. ***** ^ not supported yet
  2103. 797 SYSTEM.Eval(Graph.RemapPalette(9, Colors[(9+n) MOD 16]));
  2104. ***** ^ not supported yet
  2105. ***** ^ not supported yet
  2106. ***** ^ not supported yet
  2107. ***** ^ not supported yet
  2108. ***** ^ not supported yet
  2109. 798 SYSTEM.Eval(Graph.RemapPalette(15, Colors[(15+n) MOD 16]));
  2110. ***** ^ not supported yet
  2111. ***** ^ not supported yet
  2112. ***** ^ not supported yet
  2113. ***** ^ not supported yet
  2114. ***** ^ not supported yet
  2115. 799 Lib.Delay(100);
  2116. ***** ^ not supported yet
  2117. ***** ^ not supported yet
  2118. ***** ^ not supported yet
  2119. 800 INC(n);
  2120. ***** ^ undeclared identifier
  2121. ***** ^ not supported yet
  2122. 801 END;
  2123. 802 SYSTEM.Eval(IO.RdKey());
  2124. ***** ^ not supported yet
  2125. ***** ^ not supported yet
  2126. ***** ^ not supported yet
  2127. ***** ^ not supported yet
  2128. ***** ^ not supported yet
  2129. 803 WHILE NOT IO.KeyPressed() DO
  2130. ***** ^ not supported yet
  2131. ***** ^ not supported yet
  2132. ***** ^ not supported yet
  2133. 804 SYSTEM.Eval(Graph.RemapAllPalette(Colors));
  2134. ***** ^ not supported yet
  2135. ***** ^ not supported yet
  2136. ***** ^ not supported yet
  2137. ***** ^ not supported yet
  2138. ***** ^ not supported yet
  2139. 805 Lib.Delay(1000);
  2140. ***** ^ not supported yet
  2141. ***** ^ not supported yet
  2142. ***** ^ not supported yet
  2143. 806 Rotate(Colors);
  2144. ***** ^ not supported yet
  2145. ***** ^ not supported yet
  2146. 807 END;
  2147. 808 SYSTEM.Eval(IO.RdKey());
  2148. ***** ^ not supported yet
  2149. ***** ^ not supported yet
  2150. ***** ^ not supported yet
  2151. ***** ^ not supported yet
  2152. ***** ^ not supported yet
  2153. 809 END;
  2154. 810 SYSTEM.Eval(Graph.SetActivePage(0));
  2155. ***** ^ not supported yet
  2156. ***** ^ not supported yet
  2157. ***** ^ not supported yet
  2158. ***** ^ not supported yet
  2159. ***** ^ not supported yet
  2160. 811 SYSTEM.Eval(Graph.SetVisualPage(0));
  2161. ***** ^ not supported yet
  2162. ***** ^ not supported yet
  2163. ***** ^ not supported yet
  2164. ***** ^ not supported yet
  2165. ***** ^ not supported yet
  2166. 812 Graph.ClearScreen(Graph._GCLEARSCREEN);
  2167. ***** ^ not supported yet
  2168. ***** ^ not supported yet
  2169. ***** ^ not supported yet
  2170. ***** ^ not supported yet
  2171. 813 END EGAIntro;
  2172. ***** ^ not supported yet
  2173. 814
  2174. 815 PROCEDURE HercIntro();
  2175. 816
  2176. 817 VAR
  2177. 818 c: SmallColorArray;
  2178. ***** ^ not supported yet
  2179. 819 BEGIN
  2180. 820 c:=SmallColorArray(1, 1, 1, 1);
  2181. ***** ^ not supported yet
  2182. ***** ^ not supported yet
  2183. 821 Graph.ClearScreen(Graph._GCLEARSCREEN);
  2184. ***** ^ not supported yet
  2185. ***** ^ not supported yet
  2186. ***** ^ not supported yet
  2187. ***** ^ not supported yet
  2188. 822 DrawLogo(1, c);
  2189. ***** ^ not supported yet
  2190. ***** ^ not supported yet
  2191. 823 TestKey;
  2192. ***** ^ not supported yet
  2193. 824 Graph.ClearScreen(Graph._GCLEARSCREEN);
  2194. ***** ^ not supported yet
  2195. ***** ^ not supported yet
  2196. ***** ^ not supported yet
  2197. ***** ^ not supported yet
  2198. 825 END HercIntro;
  2199. ***** ^ not supported yet
  2200. 826
  2201. 827 PROCEDURE HercDemo();
  2202. 828
  2203. 829
  2204. 830 BEGIN
  2205. 831 SYSTEM.Eval(Graph.SetVideoMode(Graph._HERCMONO));
  2206. ***** ^ not supported yet
  2207. ***** ^ not supported yet
  2208. ***** ^ not supported yet
  2209. ***** ^ not supported yet
  2210. ***** ^ not supported yet
  2211. ***** ^ not supported yet
  2212. 832 Graph.GetVideoConfig(cv);
  2213. ***** ^ not supported yet
  2214. ***** ^ not supported yet
  2215. ***** ^ not supported yet
  2216. 833 HercIntro();
  2217. ***** ^ not supported yet
  2218. ***** ^ not supported yet
  2219. 834 Ellipses(1);
  2220. ***** ^ not supported yet
  2221. ***** ^ not supported yet
  2222. 835 DrawLines();
  2223. ***** ^ not supported yet
  2224. ***** ^ not supported yet
  2225. 836 Animation(Graph._HGC);
  2226. ***** ^ not supported yet
  2227. ***** ^ not supported yet
  2228. ***** ^ not supported yet
  2229. 837 Pies(1);
  2230. ***** ^ not supported yet
  2231. ***** ^ not supported yet
  2232. 838 Bars(1);
  2233. ***** ^ not supported yet
  2234. ***** ^ not supported yet
  2235. 839 END HercDemo;
  2236. ***** ^ not supported yet
  2237. 840
  2238. 841 PROCEDURE EGADemo();
  2239. 842
  2240. 843 BEGIN
  2241. 844 SYSTEM.Eval(Graph.SetVideoMode(Graph._ERESCOLOR));
  2242. ***** ^ not supported yet
  2243. ***** ^ not supported yet
  2244. ***** ^ not supported yet
  2245. ***** ^ not supported yet
  2246. ***** ^ not supported yet
  2247. ***** ^ not supported yet
  2248. 845 Graph.GetVideoConfig(cv);
  2249. ***** ^ not supported yet
  2250. ***** ^ not supported yet
  2251. ***** ^ not supported yet
  2252. 846 EGAIntro();
  2253. ***** ^ not supported yet
  2254. ***** ^ not supported yet
  2255. 847 Ellipses(1);
  2256. ***** ^ not supported yet
  2257. ***** ^ not supported yet
  2258. 848 DrawLines();
  2259. ***** ^ not supported yet
  2260. ***** ^ not supported yet
  2261. 849 Animation(Graph._EGA);
  2262. ***** ^ not supported yet
  2263. ***** ^ not supported yet
  2264. ***** ^ not supported yet
  2265. 850 Pies(1);
  2266. ***** ^ not supported yet
  2267. ***** ^ not supported yet
  2268. 851 Bars(1);
  2269. ***** ^ not supported yet
  2270. ***** ^ not supported yet
  2271. 852 END EGADemo;
  2272. ***** ^ not supported yet
  2273. 853
  2274. 854 PROCEDURE VGADemo();
  2275. 855
  2276. 856 BEGIN
  2277. 857 SYSTEM.Eval(Graph.SetVideoMode(Graph._ERESCOLOR));
  2278. ***** ^ not supported yet
  2279. ***** ^ not supported yet
  2280. ***** ^ not supported yet
  2281. ***** ^ not supported yet
  2282. ***** ^ not supported yet
  2283. ***** ^ not supported yet
  2284. 858 Graph.GetVideoConfig(cv);
  2285. ***** ^ not supported yet
  2286. ***** ^ not supported yet
  2287. ***** ^ not supported yet
  2288. 859 EGAIntro();
  2289. ***** ^ not supported yet
  2290. ***** ^ not supported yet
  2291. 860 VGATriangle();
  2292. ***** ^ not supported yet
  2293. ***** ^ not supported yet
  2294. 861 Ellipses(1);
  2295. ***** ^ not supported yet
  2296. ***** ^ not supported yet
  2297. 862 DrawLines();
  2298. ***** ^ not supported yet
  2299. ***** ^ not supported yet
  2300. 863 Animation(Graph._EGA);
  2301. ***** ^ not supported yet
  2302. ***** ^ not supported yet
  2303. ***** ^ not supported yet
  2304. 864 Pies(1);
  2305. ***** ^ not supported yet
  2306. ***** ^ not supported yet
  2307. 865 Bars(1);
  2308. ***** ^ not supported yet
  2309. ***** ^ not supported yet
  2310. 866 END VGADemo;
  2311. ***** ^ not supported yet
  2312. 867
  2313. 868 PROCEDURE CGADemo();
  2314. 869
  2315. 870 BEGIN
  2316. 871 SYSTEM.Eval(Graph.SetVideoMode(Graph._MRES4COLOR));
  2317. ***** ^ not supported yet
  2318. ***** ^ not supported yet
  2319. ***** ^ not supported yet
  2320. ***** ^ not supported yet
  2321. ***** ^ not supported yet
  2322. ***** ^ not supported yet
  2323. 872 Graph.GetVideoConfig(cv);
  2324. ***** ^ not supported yet
  2325. ***** ^ not supported yet
  2326. ***** ^ not supported yet
  2327. 873 CGAIntro();
  2328. ***** ^ not supported yet
  2329. ***** ^ not supported yet
  2330. 874 Ellipses(2);
  2331. ***** ^ not supported yet
  2332. ***** ^ not supported yet
  2333. 875 DrawLines();
  2334. ***** ^ not supported yet
  2335. ***** ^ not supported yet
  2336. 876 Animation(Graph._CGA);
  2337. ***** ^ not supported yet
  2338. ***** ^ not supported yet
  2339. ***** ^ not supported yet
  2340. 877 Pies(2);
  2341. ***** ^ not supported yet
  2342. ***** ^ not supported yet
  2343. 878 Bars(2);
  2344. ***** ^ not supported yet
  2345. ***** ^ not supported yet
  2346. 879 END CGADemo;
  2347. ***** ^ not supported yet
  2348. 880
  2349. 881
  2350. 882 BEGIN
  2351. 883 Mono := FALSE;
  2352. 884 Graph.GetVideoConfig(cv);
  2353. ***** ^ not supported yet
  2354. ***** ^ not supported yet
  2355. ***** ^ not supported yet
  2356. 885 CASE cv.adapter OF
  2357. ***** ^ not supported yet
  2358. ***** ^ not supported yet
  2359. 886 | Graph._HGC :
  2360. ***** ^ not supported yet
  2361. ***** ^ not supported yet
  2362. 887 Mono:= TRUE;
  2363. 888 HercDemo();
  2364. ***** ^ not supported yet
  2365. ***** ^ not supported yet
  2366. 889 | Graph._MDPA :
  2367. ***** ^ not supported yet
  2368. ***** ^ not supported yet
  2369. 890 IO.WrStr('A Color Graphics Card Is Not Installed');
  2370. ***** ^ not supported yet
  2371. ***** ^ not supported yet
  2372. ***** ^ not supported yet
  2373. 891 IO.WrLn();
  2374. ***** ^ not supported yet
  2375. ***** ^ not supported yet
  2376. ***** ^ not supported yet
  2377. 892 HALT;
  2378. ***** ^ undeclared identifier
  2379. 893 | Graph._CGA, Graph._MCGA :
  2380. ***** ^ not supported yet
  2381. ***** ^ not supported yet
  2382. ***** ^ not supported yet
  2383. ***** ^ not supported yet
  2384. 894 CGADemo();
  2385. ***** ^ not supported yet
  2386. ***** ^ not supported yet
  2387. 895 | Graph._VGA :
  2388. ***** ^ not supported yet
  2389. ***** ^ not supported yet
  2390. 896 VGADemo();
  2391. ***** ^ not supported yet
  2392. ***** ^ not supported yet
  2393. 897 | Graph._EGA :
  2394. ***** ^ not supported yet
  2395. ***** ^ not supported yet
  2396. 898 EGADemo();
  2397. ***** ^ not supported yet
  2398. ***** ^ not supported yet
  2399. 899 ELSE
  2400. 900 IO.WrStr('Graphics Card Not Supported');
  2401. ***** ^ not supported yet
  2402. ***** ^ not supported yet
  2403. ***** ^ not supported yet
  2404. 901 IO.WrLn();
  2405. ***** ^ not supported yet
  2406. ***** ^ not supported yet
  2407. ***** ^ not supported yet
  2408. 902 HALT;
  2409. ***** ^ undeclared identifier
  2410. 903 END;
  2411. 904 SYSTEM.Eval(Graph.SetVideoMode(Graph._DEFAULTMODE));
  2412. ***** ^ not supported yet
  2413. ***** ^ not supported yet
  2414. ***** ^ not supported yet
  2415. ***** ^ not supported yet
  2416. ***** ^ not supported yet
  2417. ***** ^ not supported yet
  2418. 905 END MGdemo.
  2419. 1512 errors