home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 20 / AACD20.BIN / AACD / Graphics / PerfectPaint / rexx / Anim / Slim_Anim.rx < prev   
Text File  |  2001-03-08  |  823b  |  61 lines

  1. /* Slim_Anim
  2.     Ce script va :
  3.     - construire une animation de 10 images
  4.     - faire un warp sur chaque image.
  5.     - jouer l'animation
  6.     */
  7.  
  8.     options results
  9.     parse ARG Port b
  10.     
  11.     ADDRESS value Port
  12.  
  13.     pp_GetWidth
  14.     width=result
  15.  
  16.     pp_GetHeight
  17.     height=result
  18.  
  19.     IF width=0 & height=0 then DO
  20.         pp_Warn 'Load*a*picture*first'
  21.         EXIT
  22.     END
  23.  
  24.     pp_AnimGui 0
  25.     nbframe=result
  26.     if nbframe<0 then
  27.         do
  28.             EXIT
  29.         end
  30.                 
  31.     pp_MakeAnim nbframe
  32.     
  33.     radius=50
  34.  
  35.     do i=1 to nbframe
  36.         pp_SetJiffies i 2
  37.         do z=0 to width by 50
  38.             do zz=0 to height by 50
  39.                 Dx=random(0,5,time('S'))
  40.                 Dy=random(0,5,time('S'))
  41.                 a=random(0,5,time('S'))
  42.                 if a>2 then
  43.                     do
  44.                         Dx=Dx*-1
  45.                     end
  46.                 a=random(0,5,time('S'))
  47.                 if a>2 then
  48.                     do
  49.                         Dy=Dy*-1
  50.                     end                
  51.                 pp_Warp z zz radius Dx Dy
  52.             end
  53.         end
  54.         pp_NextFrame
  55.     end
  56.  
  57.     pp_PlayAnim 1
  58.  
  59.     EXIT
  60.  
  61.