home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / ADPro251-3.DMS / ADPro251-3.adf / FREDScripts.lha / FREDOperators / Mosaic.fred.pre < prev    next >
Encoding:
Text File  |  1994-01-31  |  1.5 KB  |  67 lines

  1. /*
  2. ** Mosaic.fred.pre
  3. **
  4. ** $VER: Mosaic.fred.pre 1.0.0 (23.10.93)
  5. **
  6. ** If the Mosaic.fred script appears in the Invoke ADPro list, this
  7. ** program will ask the user to enter the X & Y Size of the Mosaic 'tiles'
  8. ** and asks for the X & Y offsets of the 'tiles'.
  9. **
  10. ** Clips Exported:
  11. **     FREDMosaicXSize    -    Width value of Mosaic 'tile'.
  12. **    FREDMosaicYSize    -    Height value of Mosaic 'tile'.
  13. **    FREDMosaicXOff    -    X offset of Mosaic 'tile'.
  14. **    FREDMosaicYOff    -    Y offset of Mosaic 'tile'.
  15. **
  16. ** NOTE: Clip name are case sensitive.
  17. **
  18. ** This script requires FRED v1.4.0 (or higher) to run. Also required is
  19. ** ADPro v2.5.0 (or higher).
  20. **
  21. ** Copyright © 1993 ASDG, Incorporated
  22. ** All Rights Reserved.
  23. */
  24.  
  25.  
  26. ADDRESS "ADPro"
  27. OPTIONS RESULTS
  28.  
  29. PARSE ARG NumberOfCells NumberOfFrames
  30.  
  31. NL = '0A'X
  32. SQ = '27'X
  33. DQ = '22'X
  34. TRUE  = 1
  35. FALSE = 0
  36.  
  37.  
  38. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Tile Width"' 1 1 9999 TRUE
  39. IF (RESULT = (1-1)) THEN
  40.     EXIT 10
  41. ELSE DO
  42.     MosXSize = RESULT
  43.     SETCLIP( "FREDMosaicXSize", RESULT )
  44. END
  45.  
  46. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Tile Height"' 1 1 9999 TRUE
  47. IF (RESULT = (1-1)) THEN
  48.     EXIT 10
  49. ELSE DO
  50.     MosYSize = RESULT
  51.     SETCLIP( "FREDMosaicYSize", RESULT )
  52. END
  53.  
  54. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Width Offset"' 0 0 (MosXSize-1) TRUE
  55. IF (RESULT = (0-1)) THEN
  56.     EXIT 10
  57. ELSE
  58.     SETCLIP( "FREDMosaicXOff", RESULT )
  59.  
  60. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Height Offset"' 0 0 (MosYSize-1) TRUE
  61. IF (RESULT = (0-1)) THEN
  62.     EXIT 10
  63. ELSE
  64.     SETCLIP( "FREDMosaicYOff", RESULT )
  65.  
  66. EXIT 0
  67.