home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 May / PCW596.iso / polskie / eduk / genfast / demo_12.pak / OKNO_NEO.DA_ < prev    next >
Text File  |  1996-03-16  |  19KB  |  990 lines

  1. ; PRZYK£ADOWY EDYTOR GRAFICZNY - GenPaint
  2.  
  3. ; Uwaga! To nie jest aplikacja skoñczona, a jedynie jej szkielet
  4. ; majåcy na celu wyÆåcznie pokazanie moºliwo₧ci pakietu GENFAST 2.0.
  5. ; Pewne funkcje så wyÆåczone lub okrojone z powodu mniejszych
  6. ; moºliwo₧ci wersji demonstracyjnej jæzyka EasyGEN (dotyczy to
  7. ; m.in. opcji zapisu i odczytu pliku graficznego)...
  8.  
  9. [procedure CZEKAJ]
  10. [180]
  11. @getmouseposition;
  12. @if (%Z <> 0) then goto:180
  13. @return;
  14.  
  15. [procedure OKNO_STAMP]
  16. ; w zmiennych a i b zdefiniowano staÆe ekranowe dla okna
  17. @a:=200
  18. @b:=150
  19. @uparea(%a,%b,%a+300,%b+200,3)
  20. @downarea(%a+10,%b+10,%a+290,%b+190,7)
  21. ;ikonki: np1->kasuj, np2->x, np3->lewo, np4->prawo, np5->dóÆ
  22. ;pierwsza
  23. @uparea(%a+11,%b+11,%a+31,%b+31,7)
  24. @setposition(%a+14,%b+15)
  25. @picture('np1.rbm')
  26. @setinvisiblebutton(%a+11,%b+11,%a+31,%b+31,999)
  27. ;druga
  28. @uparea(%a+32,%b+11,%a+52,%b+31,7)
  29. @setposition(%a+34,%b+13)
  30. @picture('np2.rbm')
  31. @setinvisiblebutton(%a+32,%b+11,%a+52,%b+31,999)
  32. ;trzecia
  33. @uparea(%a+53,%b+11,%a+289,%b+31,3)
  34. @setcolors(15,7)
  35. @setposition(%a+61,%b+19)
  36. @fastwrite('Okienko dialogowe')
  37. @setcolors(0,7)
  38. @setposition(%a+60,%b+18)
  39. @fastwrite('Okienko dialogowe')
  40. ;obszar pierwszy
  41. @downarea(%a+25,%b+50,%a+170,%b+160,7)
  42. @clear(%a+30,%b+48,%a+90,%b+53)
  43. @setposition(%a+35,%b+45)
  44. @fastwrite('Rysunek')
  45. @setcolors(15,7)
  46. @bar(%a+30,%b+55,%a+165,%b+155)
  47. @setcolors(0,7)
  48. ;przyciski
  49. @drawbutton(%a+180,%b+50,%a+280,%b+80,7,998,'AKCEPTUJ','')
  50. @drawbutton(%a+180,%b+90,%a+280,%b+120,7,999,'REZYGNUJ','')
  51. ;obszar drugi
  52. @downarea(%a+180,%b+130,%a+280,%b+185,7)
  53. @clear(%a+185,%b+128,%a+243,%b+133)
  54. @setposition(%a+190,%b+125)
  55. @fastwrite('Rodzaj')
  56. ;pull-down -> PCX<>RBM
  57. @downarea(%a+190,%b+150,%a+249,%b+170,9)
  58. @setposition(%a+210,%b+156)
  59. @fastwrite('PCX')
  60. @uparea(%a+250,%b+150,%a+270,%b+170,7)
  61. @setposition(%a+254,%b+152)
  62. @picture('np5.rbm')
  63. ; tæ proceduræ trzeba bædzie zdefiniowaì - na razie nie aktywna!
  64. @setinvisiblebutton(%a+250,%b+150,%a+270,%b+170,995)
  65. ;suwak
  66. @downarea(%a+25,%b+165,%a+170,%b+185,8)
  67. ;
  68. @uparea(%a+26,%b+166,%a+46,%b+184,7)
  69. @setposition(%a+28,%b+169)
  70. @picture('np3.rbm')
  71. @setinvisiblebutton(%a+26,%b+166,%a+46,%b+184,153)
  72. @uparea(%a+149,%b+166,%a+169,%b+184,7)
  73. @setposition(%a+152,%b+169)
  74. @picture('np4.rbm')
  75. @setinvisiblebutton(%a+149,%b+166,%a+169,%b+184,154)
  76. @Gosub:156
  77. @Gosub:154
  78. @Return;
  79.  
  80. [procedure KOLORY]
  81. @DownArea(4,170,66,370,8)
  82. @PushVariables;
  83. @A:=0
  84. @B:=0
  85. @Repeat:8
  86. @SetColors(%A,15)
  87. @Bar(6,172+%B,35,192+%B)
  88. @SetInvisibleButton(6,172+%B,35,192+%B,400+%A)
  89. @A:=%A+1
  90. @B:=%B+20
  91. @Next;
  92. @A:=8
  93. @B:=0
  94. @Repeat:8
  95. @SetColors(%A,15)
  96. @Bar(36,172+%B,64,192+%B)
  97. @SetInvisibleButton(36,172+%B,64,192+%B,400+%A)
  98. @A:=%A+1
  99. @B:=%B+20
  100. @Next;
  101. @PopVariables;
  102. @Gosub:420
  103. @GoSub:430
  104. @Return
  105.  
  106. [procedure LINIE]
  107. @DownArea(4,70,66,167,8)
  108. @setposition(16,76)
  109. @setcolors(0,7)
  110. @fastwrite('LINIA')
  111. @setcolors(15,7)
  112. @setposition(15,75)
  113. @fastwrite('LINIA')
  114. @setcolors(15,7)
  115. @bar(10,90,60,100)
  116. @setcolors(0,7)
  117. @line(15,95,55,95)
  118. @setinvisiblebutton(10,90,60,100,550)
  119. @setcolors(15,7)
  120. @bar(10,110,60,120)
  121. @setcolors(0,7)
  122. @bar(15,114,55,116)
  123. @setinvisiblebutton(10,110,60,120,551)
  124. @setcolors(15,7)
  125. @bar(10,130,60,140)
  126. @setcolors(0,7)
  127. @bar(15,133,55,137)
  128. @setinvisiblebutton(10,130,60,140,552)
  129. @setcolors(15,7)
  130. @bar(10,150,60,160)
  131. @setcolors(0,7)
  132. @bar(15,152,55,158)
  133. @setinvisiblebutton(10,150,60,160,553)
  134. @return
  135.  
  136. [procedure  PRZYCISKI]
  137. ;DEKLARACJE KLAWISZY RYSOWANIA
  138. @setcolors(7,15)
  139. @DrawButton(4,4,65,25,7,900,'OPCJE','Opcje programu')
  140. @drawbutton(66,4,126,25,7,910,'FONTY','Rodzaj fontu')
  141. @DrawButton(127,4,191,25,7,920,'POMOC','Jak korzystaì?')
  142. @DrawButton(4,27,44,68,7,300,'rysuj.rbm','Linie ciagÆe')
  143. @DrawButton(45,27,85,68,7,310,'rysuj2.rbm','Prostokty')
  144. @DrawButton(86,27,126,68,7,320,'rysuj3.rbm','Owale')
  145. @DrawButton(127,27,167,68,7,330,'pen.rbm','Flamaster')
  146. @DrawButton(168,27,208,68,7,340,'fill.rbm','WypeÆnienie')
  147. @DrawButton(209,27,249,68,7,350,'rysuj6.rbm','Gumka selektywna')
  148. @DrawButton(250,27,290,68,7,360,'rysuj7.rbm','Cofnij')
  149. @DrawButton(291,27,331,68,7,370,'rysuj8.rbm','Czy₧ì ekran')
  150. @DrawButton(332,27,372,68,7,380,'stamp.rbm','Pieczåtki')
  151. @DrawButton(373,27,415,68,7,390,'rysuj9.rbm','Linie wspólne')
  152. @DrawButton(416,27,458,68,7,700,'fonty.rbm','Teksty')
  153. @DrawButton(459,27,501,68,7,720,'rysuj10.rbm','Kropki')
  154. @DrawButton(502,27,547,68,7,710,'rysuj22.rbm','Prostokåty wypeÆnione')
  155. @DrawButton(548,27,591,68,7,730,'nozyczki.rbm','Przesuwanie fragmentów')
  156. @DrawButton(592,27,635,68,7,740,'rysuj31.rbm','Owal wypeÆniony')
  157. @return
  158.  
  159. [procedure STAMP]
  160. @DownArea(4,373,66,460,8)
  161. @setcolors(0,7)
  162. @setposition(16,380)
  163. @fastwrite('IKONA')
  164. @setcolors(15,7)
  165. @setposition(15,379)
  166. @fastwrite('IKONA')
  167. @Bar(8,392,62,455)
  168. @setposition(11,400)
  169. @picture('footblst.pcx')
  170. @setinvisiblebutton(8,392,62,455,800)
  171. @return
  172.  
  173. [1]
  174. ; Program GENPAINT wersja 1.0 beta
  175. ; Aplikacja przykÆadowa wykonana caÆkowicie w GENFAÿCIE 2.0
  176. ; Kodowanie #PWR, marzec 1996
  177. @defkeyboardhandler(703)
  178. @A:=150;
  179. @B:=150;
  180. @C:=1
  181. @E:=1;
  182. @G:=%X
  183. @H:=%Y
  184. @I:=%G
  185. @J:=%H
  186. ; kolor czarny
  187. @K:=0
  188. @L:=15
  189. @DisableStatusBar;
  190. @SetColors(3,8)
  191. @Bar(0,0,639,479)
  192. @DownArea(70,70,635,475,15)
  193. ;napis w górnym prawym rogu
  194. @SetColors(15,7)
  195. @SetPosition(446,13)
  196. @FastWrite('POZYCJA KURSORA:')
  197. @SetColors(0,7)
  198. @SetPosition(445,12)
  199. @FastWrite('POZYCJA KURSORA:')
  200. ; napis w dolnym lewym rogu
  201. @DownArea(573,8,637,22,15)
  202. @Uparea(4,462,66,475,0)
  203. @setcolors(15,7)
  204. @setposition(8,465)
  205. @fastwrite('GENFAST')
  206. ;@setcolors(15,7)
  207. @setposition(252,8)
  208. @picture('paint.cgv')
  209. @setcolors(0,7)
  210. @setposition(250,6)
  211. @picture('paint.cgv')
  212. @call:przyciski
  213. @call:Linie
  214. @Call:Stamp
  215. @Call:Kolory
  216. @DefIdleProc(2)
  217. @showscreen;
  218. @CheckEvents;
  219.  
  220. [2]
  221. @GetMousePosition;
  222. @If (%G <> %X) then begin
  223. @G:=%X
  224. @if (%G > 70) then gosub:100
  225. @if (%G < 70) then gosub:101
  226. @end
  227. @if (%h <> %Y) then begin
  228. @H:=%Y
  229. @if (%H > 70) then gosub:100
  230. @if (%h < 70) then gosub:101
  231. @end;
  232. @CheckEvents;
  233.  
  234. [100]
  235. @Clear(575,10,635,20)
  236. @Setcolors(0,7)
  237. @WriteString(575,10,635,20,'[%X-70:0]:[%Y-70:0]')
  238. @Return;
  239. [101]
  240. @Clear(575,10,635,20)
  241. @Return;
  242.  
  243. [153]
  244. @C:=%C-1
  245. @if (%C < 1) then begin
  246. @C:=1
  247. @end
  248. @Goto:155
  249. [154]
  250. @C:=%C+1
  251. @if (%C > 9) then begin
  252. @C:=9
  253. @end
  254. [155]
  255. ; wy₧wietlanie 'stampów'
  256. @setcolors(15,7)
  257. @bar(%a+30,%b+55,%a+165,%b+155)
  258. @setposition(%a+70,%b+80)
  259. @if (%C = 1) then begin
  260. @picture('footblst.pcx')
  261. @gosub:156
  262. @end
  263. @if (%C = 2) then begin
  264. @picture('reka.pcx')
  265. @gosub:156
  266. @end
  267. @if (%C = 3) then begin
  268. @picture('oko2.pcx')
  269. @gosub:156
  270. @end
  271. @if (%C = 4) then begin
  272. @picture('nos.pcx')
  273. @gosub:156
  274. @end
  275. @if (%C = 5) then begin
  276. @picture('noga.pcx')
  277. @gosub:156
  278. @end
  279. @if (%C = 6) then begin
  280. @picture('lisc.pcx')
  281. @gosub:156
  282. @end
  283. @if (%C = 7) then begin
  284. @picture('klaun.pcx')
  285. @gosub:156
  286. @end
  287. @if (%C = 8) then begin
  288. @picture('hat.pcx')
  289. @gosub:156
  290. @end
  291. @if (%C = 9) then begin
  292. @picture('eye1.pcx')
  293. @gosub:156
  294. @end
  295. @checkevents;
  296. [156]
  297. @setcolors(8,7)
  298. @bar(%a+47,%b+166,%a+148,%b+184)
  299. @uparea(%a+37+%C*10,%b+166,%a+57+%C*10,%b+184,7)
  300. @return
  301.  
  302. [300]
  303. ; rysowanie linii ciågÆych
  304. @SaveScreen;
  305. [301]
  306. @pushvariables;
  307. @getparam;
  308. @if (%F > 39) then begin
  309. @deletebutton
  310. @end
  311. @popvariables;
  312. @SetInvisibleButton(71,71,634,474,302)
  313. @CheckEvents;
  314. [302]
  315. @SetColors(%K,7);
  316. @if (%I = 0) then goto:303
  317. @gosub:500+%E
  318. [303]
  319. @I := %X;
  320. @J := %Y;
  321. @GoTo:301
  322. [501]
  323. @Line(%I,%J,%X,%Y);
  324. @return
  325. [503]
  326. @Line(%I,%J-1,%X,%Y-1);
  327. @Line(%I,%J,%X,%Y);
  328. @Line(%I,%J+1,%X,%Y+1);
  329. @return
  330. [505]
  331. @Line(%I,%J-2,%X,%Y-2);
  332. @Line(%I,%J-1,%X,%Y-1);
  333. @Line(%I,%J,%X,%Y);
  334. @Line(%I,%J+1,%X,%Y+1);
  335. @Line(%I,%J+2,%X,%Y+2);
  336. @return
  337. [507]
  338. @Line(%I,%J-3,%X,%Y-3);
  339. @Line(%I,%J-2,%X,%Y-2);
  340. @Line(%I,%J-1,%X,%Y-1);
  341. @Line(%I,%J,%X,%Y);
  342. @Line(%I,%J+1,%X,%Y+1);
  343. @Line(%I,%J+2,%X,%Y+2);
  344. @Line(%I,%J+3,%X,%Y+3);
  345. @return
  346.  
  347. [310]
  348. ; prostokåty
  349. @SaveScreen;
  350. [311]
  351. @pushvariables;
  352. @getparam;
  353. @if (%F > 39) then begin
  354. @deletebutton
  355. @end
  356. @popvariables;
  357. @SetInvisibleButton(71,71,634,474,312)
  358. @CheckEvents;
  359. [312]
  360. @SetColors(%K,7);
  361. @if (%I = 0) then goto:313
  362. @Rectangle(%I,%J,%X,%Y);
  363. [313]
  364. @I := %X;
  365. @J := %Y;
  366. @GoTo:311
  367.  
  368. [320]
  369. ; okrægi i elipsy
  370. @SaveScreen;
  371. [321]
  372. @pushvariables;
  373. @getparam;
  374. @if (%F > 39) then begin
  375. @deletebutton
  376. @end
  377. @popvariables;
  378. @SetInvisibleButton(71,71,634,474,322)
  379. @CheckEvents;
  380. [322]
  381. @SetColors(%K,%K);
  382. @if (%I = 0) then goto:323
  383. @if (%Y > %J) then begin
  384. @if (%X > %I) then begin
  385. @Ellipse(%I+ABS(%X-%I)/2,%J+ABS(%Y-%J)/2,ABS(%X-%I)/2,ABS(%Y-%J)/2);
  386. @goto:323
  387. @else
  388. @Ellipse(%I-ABS(%X-%I)/2,%J+ABS(%Y-%J)/2,ABS(%X-%I)/2,ABS(%Y-%J)/2);
  389. @goto:323
  390. @end
  391. @end
  392. @if (%Y < %J) then begin
  393. @if (%X > %I) then begin
  394. @Ellipse(%I+ABS(%X-%I)/2,%J-ABS(%Y-%J)/2,ABS(%X-%I)/2,ABS(%Y-%J)/2);
  395. @goto:323
  396. @else
  397. @Ellipse(%I-ABS(%X-%I)/2,%J-ABS(%Y-%J)/2,ABS(%X-%I)/2,ABS(%Y-%J)/2);
  398. @goto:323
  399. @end
  400. @end
  401. [323]
  402. @I := %X;
  403. @J := %Y;
  404. @GoTo:321
  405.  
  406. [330]
  407. ; flamaster
  408. @SaveScreen;
  409. [331]
  410. @pushvariables;
  411. @getparam;
  412. @if (%F > 39) then begin
  413. @deletebutton
  414. @end
  415. @popvariables;
  416. @SetInvisibleButton(71,71,634,474,332)
  417. @CheckEvents;
  418. [332]
  419. @I:=%X
  420. @J:=%Y
  421. @SetColors(%K,7);
  422. @Bar(%I-%E,%J-%E,%I+%E,%J+%E);
  423. @GoTo:331
  424.  
  425. [340]
  426. ;wypeÆnianie obszaru
  427. @savescreen
  428. [341]
  429. @pushvariables;
  430. @getparam;
  431. @if (%F > 39) then begin
  432. @deletebutton
  433. @end
  434. @popvariables;
  435. @SetInvisibleButton(71,71,634,474,342)
  436. @CheckEvents;
  437. [342]
  438. @I:=%X
  439. @J:=%Y
  440. @FillArea(%I,%J,%K);
  441. @setcolors(0,7)
  442. @rectangle(70,70,635,475)
  443. @GoTo:341
  444.  
  445. [350]
  446. ; gumka selektywna
  447. @SaveScreen;
  448. [351]
  449. @pushvariables;
  450. @getparam;
  451. @if (%F > 39) then begin
  452. @deletebutton
  453. @end
  454. @popvariables;
  455. @SetInvisibleButton(71,71,634,474,352)
  456. @CheckEvents;
  457. [352]
  458. @I:=%X
  459. @J:=%Y
  460. @SetColors(%K,%L);
  461. @reversearea(%I-%E-2,%J-%E-2,%I+%E+2,%J+%E+2);
  462. @GoTo:351
  463.  
  464. [360]
  465. ;@LoadPart(71,71,'ekran.scr')
  466. @LoadScreen;
  467. @CheckEvents;
  468.  
  469. [370]
  470. ;czyszczenie ekranu w wybranym kolorze
  471. @savescreen
  472. @pushvariables;
  473. @getparam;
  474. @if (%F > 39) then begin
  475. @deletebutton
  476. @end
  477. @popvariables;
  478. @setcolors(%K,7)
  479. @L:=%K
  480. @bar(72,72,633,473)
  481. @checkevents;
  482.  
  483. [380]
  484. ; pieczåtki
  485. @SaveScreen;
  486. [381]
  487. @pushvariables;
  488. @getparam;
  489. @if (%F > 39) then begin
  490. @deletebutton
  491. @end
  492. @popvariables;
  493. @SetInvisibleButton(71,71,634,474,382)
  494. @CheckEvents;
  495. [382]
  496. @I := %X;
  497. @J := %Y;
  498. @if (%X < 95) Then goto:381
  499. @if (%X > 605) Then goto:381
  500. @if (%Y < 95) Then goto:381
  501. @if (%Y > 450) Then goto:381
  502. @setposition(%I-20,%J-24)
  503. @if (%C = 1) then begin
  504. @picture('footblst.pcx')
  505. @end
  506. @if (%C = 2) then begin
  507. @picture('reka.pcx')
  508. @end
  509. @if (%C = 3) then begin
  510. @picture('oko2.pcx')
  511. @end
  512. @if (%C = 4) then begin
  513. @picture('nos.pcx')
  514. @end
  515. @if (%C = 5) then begin
  516. @picture('noga.pcx')
  517. @end
  518. @if (%C = 6) then begin
  519. @picture('lisc.pcx')
  520. @end
  521. @if (%C = 7) then begin
  522. @picture('klaun.pcx')
  523. @end
  524. @if (%C = 8) then begin
  525. @picture('hat.pcx')
  526. @end
  527. @if (%C = 9) then begin
  528. @picture('eye1.pcx')
  529. @end
  530. @goto:381
  531.  
  532. [390]
  533. ; linie wspólne ( jeden punkt poczåtkowy )
  534. @SaveScreen;
  535. [391]
  536. @pushvariables;
  537. @getparam;
  538. @if (%F > 39) then begin
  539. @deletebutton
  540. @end
  541. @popvariables;
  542. @SetInvisibleButton(71,71,634,474,392)
  543. @CheckEvents;
  544. [392]
  545. @SetColors(%K,7);
  546. @if (%I = 0) then goto:393
  547. @line(%I,%J,%X,%Y)
  548. [393]
  549. @GoTo:391
  550.  
  551. [400..415]
  552. ; procedury 400-415 to wybieranie kolorów
  553. ; Zmienna K okre₧la kolor 
  554. @GetCurrentPage(%K);
  555. @K:=%K-400;
  556. @sound(440,50)
  557. @GoSub:420
  558. @call:czekaj;
  559. @CheckEvents;
  560.  
  561. [420]
  562. @setcolors(0,7)
  563. @setposition(16,341)
  564. @fastwrite('KOLOR')
  565. @setcolors(15,7)
  566. @setposition(15,340)
  567. @fastwrite('KOLOR')
  568. @SetColors(%K,7)
  569. @Bar(8,355,62,365)
  570. @setcolors(0,7)
  571. @rectangle(7,354,63,366)
  572. @Return
  573.  
  574. [430]
  575. ; button na "rybke" zaraz bedzie skasowany!!!
  576. @SetInvisibleButton(0,0,10,10,431)
  577. @return
  578.  
  579. [550]
  580. @E:=1
  581. @sound(440,50)
  582. @checkevents;
  583. [551]
  584. @E:=3
  585. @sound(440,50)
  586. @checkevents;
  587. [552]
  588. @E:=5
  589. @sound(440,50)
  590. @checkevents;
  591. [553]
  592. @E:=7
  593. @sound(440,50)
  594. @checkevents;
  595.  
  596. [700]
  597. ; pisanie tekstu na ekranie
  598. @SaveScreen;
  599. [701]
  600. @pushvariables;
  601. @getparam;
  602. @if (%F > 39) then begin
  603. @deletebutton
  604. @end
  605. @popvariables;
  606. @SetInvisibleButton(71,71,634,474,702)
  607. @CheckEvents;
  608. [702]
  609. @getparam;
  610. @I:=%X
  611. @J:=%Y
  612. @goto:701
  613. [703]
  614. ; nacisniæcie ENTER
  615. @if (%Z = $1C0D) then goto:704;
  616. ; naci₧niæcie Backspace
  617. @if (%Z = $0E08) then goto:705;
  618. @SetColors(%K,7);
  619. @setposition(%I,%J)
  620. <#%z>
  621. @GetParam;
  622. @I:=%I+8
  623. @checkevents
  624. [704]
  625. @checkevents
  626. [705]
  627. @I:=%I-8
  628. @setcolors(%K,%L)
  629. @reversearea(%I,%J,%I+8,%J+16)
  630. @checkevents
  631.  
  632. [710]
  633. ; prostokåty wypeÆnione
  634. @SaveScreen;
  635. [711]
  636. @pushvariables;
  637. @getparam;
  638. @if (%F > 39) then begin
  639. @deletebutton
  640. @end
  641. @popvariables;
  642. @SetInvisibleButton(71,71,634,474,712)
  643. @CheckEvents;
  644. [712]
  645. @SetColors(%K,7);
  646. @if (%I = 0) then goto:713
  647. @Bar(%I,%J,%X,%Y);
  648. [713]
  649. @I := %X;
  650. @J := %Y;
  651. @GoTo:711
  652.  
  653. [720]
  654. ; kropki
  655. @SaveScreen;
  656. [721]
  657. @pushvariables;
  658. @getparam;
  659. @if (%F > 39) then begin
  660. @deletebutton
  661. @end
  662. @popvariables;
  663. @SetInvisibleButton(71,71,634,474,722)
  664. @CheckEvents;
  665. [722]
  666. @I:=%G
  667. @J:=%H
  668. @if (%I = 0) then goto:723
  669. @putpixel(%I,%J,%K)
  670. [723]
  671. @I := %X;
  672. @J := %Y;
  673. @GoTo:721
  674.  
  675. [730]
  676. ; noºyczki
  677. @SaveScreen;
  678. [731]
  679. @pushvariables;
  680. @getparam;
  681. @if (%F > 39) then begin
  682. @deletebutton
  683. @end
  684. @popvariables;
  685. @SetInvisibleButton(71,71,634,474,732)
  686. @CheckEvents;
  687. [732]
  688. @I := %X;
  689. @J := %Y;
  690. @DeleteButton;
  691. @SetInvisibleButton(71,71,634,474,733)
  692. @sound(200,100)
  693. @CheckEvents;
  694. [733]
  695. @if (%X-%I < 1) then begin
  696. @sound(440,500)
  697. @goto:731
  698. @else
  699. @GetPart(%I,%J,%X,%Y);
  700. @sound(200,100)
  701. @sound(200,100)
  702. @end
  703. [734]
  704. @setcolors(14,0)
  705. @rectangle(%I,%J,%X,%Y)
  706. @Deletebutton
  707. @SetInvisibleButton(71,71,634,474,735)
  708. @CheckEvents;
  709. [735]
  710. @putpart(%X,%Y)
  711. @repeat:3
  712. @sound(200,100)
  713. @next
  714. @goto:731
  715.  
  716. [740]
  717. ; okrægi i elipsy wypeÆnione
  718. @SaveScreen;
  719. [741]
  720. @pushvariables;
  721. @getparam;
  722. @if (%F > 39) then begin
  723. @deletebutton
  724. @end
  725. @popvariables;
  726. @SetInvisibleButton(71,71,634,474,742)
  727. @CheckEvents;
  728. [742]
  729. @SetColors(%K,%K);
  730. @if (%I = 0) then goto:743
  731. @if (%Y > %J) then begin
  732. @if (%X > %I) then begin
  733. @FillEllipse(%I+ABS(%X-%I)/2,%J+ABS(%Y-%J)/2,ABS(%X-%I)/2,ABS(%Y-%J)/2);
  734. @goto:743
  735. @else
  736. @FillEllipse(%I-ABS(%X-%I)/2,%J+ABS(%Y-%J)/2,ABS(%X-%I)/2,ABS(%Y-%J)/2);
  737. @goto:743
  738. @end
  739. @end
  740. @if (%Y < %J) then begin
  741. @if (%X > %I) then begin
  742. @FillEllipse(%I+ABS(%X-%I)/2,%J-ABS(%Y-%J)/2,ABS(%X-%I)/2,ABS(%Y-%J)/2);
  743. @goto:743
  744. @else
  745. @FillEllipse(%I-ABS(%X-%I)/2,%J-ABS(%Y-%J)/2,ABS(%X-%I)/2,ABS(%Y-%J)/2);
  746. @goto:743
  747. @end
  748. @end
  749. [743]
  750. @I := %X;
  751. @J := %Y;
  752. @GoTo:741
  753.  
  754. [800]
  755. @pushvariables;
  756. @getparam;
  757. @if (%F > 39) then begin
  758. @deletebutton
  759. @end
  760. @popvariables;
  761. @savescreen;
  762. @call:okno_stamp
  763. @checkevents;
  764.  
  765. [900]
  766. ; menu opcje
  767. @pushvariables;
  768. @getparam;
  769. @if (%F > 39) then begin
  770. @deletebutton
  771. @end
  772. @popvariables;
  773. @savescreen;
  774. @pushvariables
  775. @a:=4
  776. @b:=26
  777. @setcolors(0,7)
  778. @rectangle(%a,%b,%a+116,%b+84)
  779. @uparea(%a+1,%b+1,%A+115,%B+83,7)
  780. @setposition(15,42)
  781. @FastWrite('Odczytaj...')
  782. @setinvisiblebutton(10,37,114,52,901)
  783. @setposition(15,62)
  784. @FastWrite('Zapisz...')
  785. @setinvisiblebutton(10,57,114,72,902)
  786. @line(10,77,114,77)
  787. @setposition(15,87)
  788. @FastWrite('Zakoñczenie')
  789. @setinvisiblebutton(10,83,114,97,903)
  790. @popvariables
  791. @checkevents
  792. [901]
  793. @downarea(10,37,114,52,4)
  794. @setcolors(14,0)
  795. @setposition(15,42)
  796. @FastWrite('Odczytaj...')
  797. @openuserfile('Odczytaj rysunek','*.rys')
  798. @loadscreen
  799. @if (%Z <> 300) then begin
  800. @loadpart(71,71,'ekran_a.rys')
  801. @loadpart(352,71,'ekran_b.rys')
  802. @end
  803. @repeat:3
  804. @deletebutton
  805. @next
  806. @checkevents
  807. [902]
  808. @setcolors(14,7)
  809. @downarea(10,57,114,72,4)
  810. @setposition(15,62)
  811. @FastWrite('Zapisz...')
  812. @createuserfile('Zapisz rysunek','*.rys')
  813. @loadscreen
  814. @if (%Z <> 300) then begin
  815. @savepart(71,71,351,474,'ekran_a.rys')
  816. @savepart(352,71,643,474,'ekran_b.rys')
  817. @end
  818. @repeat:3
  819. @deletebutton
  820. @next
  821. @checkevents
  822. [903]
  823. @setcolors(14,7)
  824. @downarea(10,83,114,97,4)
  825. @setposition(15,87)
  826. @FastWrite('Zakoñczenie')
  827. @messagebox('ZAKOÑCZENIE','Koniec programu')
  828. @goto:0
  829.  
  830. [910]
  831. ; menu fonty
  832. @pushvariables;
  833. @getparam;
  834. @if (%F > 39) then begin
  835. @deletebutton
  836. @end
  837. @popvariables;
  838. @savescreen;
  839. @pushvariables
  840. @a:=66
  841. @b:=26
  842. @setcolors(0,7)
  843. @rectangle(%a,%b,%a+116,%b+136)
  844. @uparea(%a+1,%b+1,%A+115,%B+135,7)
  845. @setposition(%a+11,42)
  846. @FastWrite('ANTIQUE')
  847. @setinvisiblebutton(%a+6,37,%a+110,52,911)
  848. @setposition(%a+11,62)
  849. @FastWrite('BOLD')
  850. @setinvisiblebutton(%a+6,57,%a+110,72,912)
  851. @setposition(%a+11,82)
  852. @FastWrite('BROADWAY')
  853. @setinvisiblebutton(%a+6,77,%a+110,92,913)
  854. @setposition(%a+11,102)
  855. @FastWrite('COMPUTER')
  856. @setinvisiblebutton(%a+6,97,%a+110,112,914)
  857. @setposition(%a+11,122)
  858. @FastWrite('FUTURE')
  859. @setinvisiblebutton(%a+6,117,%a+110,132,915)
  860. @setposition(%a+11,142)
  861. @FastWrite('SYSTEM')
  862. @setinvisiblebutton(%a+6,137,%a+110,152,916)
  863. @checkevents
  864. [911]
  865. @downarea(%a+6,37,%a+110,52,4)
  866. @setcolors(14,0)
  867. @setposition(%a+11,42)
  868. @FastWrite('ANTIQUE')
  869. @LOADFONT('ANTIQUE.RSF')
  870. @popvariables
  871. @repeat:6
  872. @deletebutton
  873. @next
  874. @loadscreen
  875. @checkevents
  876. [912]
  877. @setcolors(14,7)
  878. @downarea(%a+6,57,%a+110,72,4)
  879. @setposition(%a+11,62)
  880. @FastWrite('BOLD')
  881. @LOADFONT('BOLD.RSF')
  882. @popvariables
  883. @repeat:6
  884. @deletebutton
  885. @next
  886. @loadscreen
  887. @checkevents
  888. [913]
  889. @setcolors(14,7)
  890. @downarea(%a+6,77,%a+110,92,4)
  891. @setposition(%a+11,82)
  892. @FastWrite('BROADWAY')
  893. @LOADFONT('BROADWAY.RSF')
  894. @popvariables
  895. @repeat:6
  896. @deletebutton
  897. @next
  898. @loadscreen
  899. @checkevents
  900. [914]
  901. @downarea(%a+6,97,%a+110,112,4)
  902. @setcolors(14,0)
  903. @setposition(%a+11,102)
  904. @FastWrite('COMPUTER')
  905. @LOADFONT('COMPUTER.RSF')
  906. @popvariables
  907. @repeat:6
  908. @deletebutton
  909. @next
  910. @loadscreen
  911. @checkevents
  912. [915]
  913. @setcolors(14,7)
  914. @downarea(%a+6,117,%a+110,132,4)
  915. @setposition(%a+11,122)
  916. @FastWrite('FUTURE')
  917. @LOADFONT('FUTURE.RSF')
  918. @popvariables
  919. @repeat:6
  920. @deletebutton
  921. @next
  922. @loadscreen
  923. @checkevents
  924. [916]
  925. @setcolors(14,7)
  926. @downarea(%a+6,137,%a+110,152,4)
  927. @setposition(%a+11,142)
  928. @FastWrite('SYSTEM')
  929. @LOADFONT('SYSTEM.RSF')
  930. @popvariables
  931. @repeat:6
  932. @deletebutton
  933. @next
  934. @loadscreen
  935. @checkevents
  936.  
  937. [920]
  938. ; help trzeba zrobiì!
  939. @Goto:995
  940. ;@ShowHelp('')
  941. @CheckEvents
  942.  
  943. [995]
  944. @messagebox('NIESTETY!','Opcja nie zrealizowana!')
  945. @CheckEvents;
  946.  
  947. [998]
  948. @repeat:7
  949. @deletebutton;
  950. @next
  951. @loadscreen
  952. @setcolors(15,7)
  953. @Bar(8,392,62,455)
  954. @setposition(11,400)
  955. @if (%C = 1) then begin
  956. @picture('footblst.pcx')
  957. @end
  958. @if (%C = 2) then begin
  959. @picture('reka.pcx')
  960. @end
  961. @if (%C = 3) then begin
  962. @picture('oko2.pcx')
  963. @end
  964. @if (%C = 4) then begin
  965. @picture('nos.pcx')
  966. @end
  967. @if (%C = 5) then begin
  968. @picture('noga.pcx')
  969. @end
  970. @if (%C = 6) then begin
  971. @picture('lisc.pcx')
  972. @end
  973. @if (%C = 7) then begin
  974. @picture('klaun.pcx')
  975. @end
  976. @if (%C = 8) then begin
  977. @picture('hat.pcx')
  978. @end
  979. @if (%C = 9) then begin
  980. @picture('eye1.pcx')
  981. @end
  982. ;@popvariables
  983. @checkevents
  984.  
  985. [999]
  986. @repeat:7
  987. @deletebutton;
  988. @next
  989. @loadscreen
  990. @checkevents