home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 1B / DATAFILE_PDCD1B.iso / _pocketbk / pocketbook / 003 / stereo_zip / STEREO_1.OPL < prev   
Text File  |  1994-04-07  |  933b  |  66 lines

  1. PROC ster:
  2.     LOCAL x%,y%,same%(249),colour%(240)
  3.     LOCAL sep%,i%,j%,s%
  4.     LOCAL a%,b%,c%
  5.     x%=1 :y%=1
  6.     
  7.     WHILE y%<=80
  8.         x%=1
  9.         WHILE x%<=240
  10.             same%(x%)=x%
  11.           x%=x%+1
  12.         ENDWH
  13.         x%=1
  14.         WHILE x%<=240
  15.             sep%=square%:(x%,y%)
  16.             i%=x%-(sep%+(sep% AND y% AND 1))/2
  17.             j%=i%+sep%
  18.  
  19.             IF ((1 <= i%) AND (j% < 240))
  20.                 s%=same%(i%)
  21.                 WHILE ((s% <> i%) AND (s% <> j%))
  22.                     IF s% > j%
  23.                         same%(i%)=j%
  24.                         i%=j%
  25.                         j%=s%
  26.                     ELSE
  27.                         i%=s%
  28.                     ENDIF
  29.                     s%=same%(i%)
  30.                 ENDWH        
  31.                 same%(i%)=j%
  32.             ENDIF
  33.           x%=x%+1
  34.         ENDWH
  35.  
  36.     x%=240
  37.     WHILE x%>0
  38.         IF same%(x%)=x%
  39.             colour%(x%)=iabs(rnd*10)/6
  40.         ELSE
  41.             colour%(x%)=colour%(same%(x%))
  42.         ENDIF
  43.         IF colour%(x%) = 1
  44.             gAT x%,y%
  45.             gLINEBY 0,0
  46.         ENDIF
  47.         x%=x%-1
  48.     ENDWH
  49.         y%=y%+1
  50.     ENDWH
  51.  
  52.     GET
  53.     
  54. ENDP
  55.  
  56. PROC square%:(x%,y%)
  57.     IF (y%>20) AND (y%<60)
  58.         IF (x%>80) AND (x%<140)
  59.             RETURN 45
  60.         ENDIF
  61.     ENDIF
  62.     RETURN 50
  63. ENDP
  64.  
  65.  
  66.