home *** CD-ROM | disk | FTP | other *** search
- /*
- * EOT_LensFlare.ifx
- * Written by Thomas Krehbiel
- *
- * Lens Flare Effect Over Time.
- *
- * Inputs:
- * Word(Arg(1),1) = Frame number (1 - N)
- * Word(Arg(1),2) = Main filename ("-" if not specified)
- * Word(Arg(1),3) = Swap filename ("-" if not specified)
- * Word(Arg(1),4) = Sequence number (?)
- * Word(Arg(1),5) = Total number of frames (N)
- *
- * Returns:
- * 0 if successful, non-zero on failure
- *
- */
-
- OPTIONS RESULTS
-
- framenum = Word(Arg(1),1)
- mainname = Word(Arg(1),2)
- swapname = Word(Arg(1),3)
- seqnum = Word(Arg(1),4)
- framemax = Word(Arg(1),5)
-
- base = 'Autofx_LensFlare_'
-
- x1 = GETCLIP(base||'x1')
- y1 = GETCLIP(base||'y1')
- x2 = GETCLIP(base||'x2')
- y2 = GETCLIP(base||'y2')
- name = GETCLIP(base||'style')
-
- /* linear interpolation */
- x = x1 + ((x2 - x1 + 1) * framenum % framemax)
- y = y1 + ((y2 - y1 + 1) * framenum % framemax)
-
- Hook LensFlare 'FILE="'name'"' CenterX x CenterY y
-
- EXIT
-