home *** CD-ROM | disk | FTP | other *** search
/ Inside Multimedia 1995 July / IMM0795.ISO / demo / optix / optxfpac.set / RANDDRAW.OPT < prev    next >
Text File  |  1995-05-05  |  2KB  |  101 lines

  1. def(flg)
  2. def(c,1)
  3. def(i)
  4. def(j)
  5. def(k)
  6. def(taste)
  7. def(r)
  8. def(m,25)
  9. def(x,160)
  10. def(y,120)
  11. procedure colors
  12.   gradation(  1, 36,63, 0, 0,63,63, 0)
  13.   gradation(  1, 36,63, 0, 0,63,63, 0)
  14.   gradation( 37, 72,63,63, 0, 0,63, 0)
  15.   gradation( 73,110, 0,63, 0,63,63,63)
  16.   gradation(111,147,63,63,63, 0, 0,63)
  17.   gradation(148,184, 0, 0,63,63, 0,63)
  18.   gradation(185,220,63, 0,63, 0, 0, 0)
  19.   gradation(221,255, 0, 0, 0,63, 0, 0)
  20. return
  21. begin
  22.   sysfont(2,1)
  23.   curson(x,y)
  24.   cursoff
  25.   m:=m/2*2
  26.   key(on)
  27.   keycol(0)
  28.   colors
  29.   printc(320,240,'Bitte Maustaste drücken...')
  30.   printc(320,270,'(dann Hilfe mit <F1>)')
  31.   repeat
  32.     rotpal(1,255)
  33.   until mousek<>0
  34.   clearscreen(0)
  35.   repeat
  36.      repeat
  37.       rotpal(1,255)
  38.      until keypressed<>mousek
  39.      taste:=readkey
  40.      if taste:=f1
  41.        scrtobuf
  42.        setcolor(0)
  43.        viewport(140,130,500,320)
  44.        cbox(0,55,0)
  45.        printc(320,170,'<Space>      =    Zufalls-Generator')
  46.        printc(320,210,'<+> <->      =     Punktgröße + / -')
  47.        printc(320,240,'< k >        = Kaleidoskop-Funktion')
  48.        printc(320,270,'< p >        =      Palettenwechsel')
  49.        printc(320,300,'<Maustaste>  =    Freihandzeichnung')
  50.        repeat
  51.          rotpal(1,255)
  52.        until keypressed<>mousek
  53.        loadpic(0,0)
  54.      endif
  55.      if taste:=107
  56.        copywin(0,0,xmax,ymax)
  57.        loadsprite(  0,  0,320,240,winx/2,winy/2)
  58.        loadsprite(320,  0,  0,240,winx/2,winy/2)
  59.        loadsprite(  0,240,320,  0,winx/2,winy/2)
  60.        loadsprite(320,240,  0,  0,winx/2,winy/2)
  61.      endif
  62.      if taste=112
  63.        if flg=1
  64.          flg:=0
  65.          colors
  66.        else
  67.          flg:=1
  68.          gradation(1,255,0,0,0,0,0,0)
  69.          gradation(1,15,0,0,0,63,0,32)
  70.          gradation(85,100,0,0,0,63,63,0)
  71.          gradation(170,185,0,63,0,0,0,63)
  72.        endif
  73.      endif
  74.      if taste:=43
  75.        inc(r,1)
  76.      endif
  77.      if taste:=45
  78.        dec(r,1)
  79.      endif
  80.      bound(r,1,20)
  81.      random(m,i)
  82.      inc(x,i-m/2)
  83.      bound(x,0,xmax-r/2)
  84.      random(m,j)
  85.      inc(y,j-m/2)
  86.      bound(y,0,ymax-r/2)
  87.      inc(c,1)
  88.      if c=256
  89.        c:=1
  90.      endif
  91.      if mousek=1
  92.        x:=mousex
  93.        y:=mousey
  94.      endif
  95.      disk(x,y,r,c)
  96.      disk(xmax-x,y,r,c)
  97.      disk(x,ymax-y,r,c)
  98.      disk(xmax-x,ymax-y,r,c)
  99.   until taste=27
  100. end
  101.