home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / aminet / proclib20.lha / Contents next >
Text File  |  1993-10-29  |  22KB  |  532 lines

  1. ==
  2. 3D
  3. ==
  4.  
  5. SPIN3D
  6.   Description   : Rotates a 3D object.
  7.   Calling format: ROTATE[YAW,PITCH]
  8.                       YAW   = degrees to rotate around Y-axis.    Y Z
  9.                       PITCH = degrees to rotate around X-axis.    |/
  10.                                                                   +-X
  11.   Return value  : None.
  12.   Special notes : The included procedure SETUP sets up the object.  Read
  13.                       its documentation for more information.
  14.                   This is more of a demonstration program than a procedure,
  15.                       but I've included it anyway because of its usefulness.
  16.   Author        : Scott Southurst
  17.                   maverick@deakin.edu.au
  18.  
  19.  
  20. ====
  21. AMAL
  22. ====
  23.  
  24. _AMAL_BOUNCING_BALLS
  25.   Description   : Creates bouncing balls with AMAL.  This only sets up the
  26.                       AMAL programs; you need to write the main loop
  27.                       yourself.
  28.   Calling format: _AMAL_BOUNCING_BALLS[NUM,GROUND,XLEFT,XRIGHT]
  29.                       NUM    = number of balls to create
  30.                       GROUND = Y-coordinate of "ground"
  31.                       XLEFT  = X-coordinate of left "wall"
  32.                       XRIGHT = X-coordinate of right "wall"
  33.   Return value  : None.
  34.   Special notes : The boundaries for the balls are not set in stone; they
  35.                       can be changed with the Amreg() function, as follows:
  36.                           GROUND = Amreg(2)
  37.                           XLEFT  = Amreg(0)
  38.                           XRIGHT = Amreg(1)
  39.                       So, if you use other AMAL routines in the same
  40.                       program, be sure not to use these three registers.
  41.   Author        : Mark Baker
  42.                   ukrbake@prl.philips.co.uk
  43.  
  44. _AMAL_FIREWORKS
  45.   Description   : Creates fireworks in AMAL.  The procedure includes the
  46.                       running loop; you can change or remove it if you need
  47.                       to.
  48.   Calling format: _AMAL_FIREWORKS[NUM]
  49.                       NUM = number of particles for explosion
  50.   Return value  : None.
  51.   Special notes : 8 particles are always created, even if you specify a
  52.                       number less than 8 in the procedure call.
  53.   Author        : Mark Baker
  54.                   ukrbake@prl.philips.co.uk
  55.  
  56.  
  57. ====
  58. Data
  59. ====
  60.  
  61. QUICKSORT
  62.   Description   : Performs a "Quick Sort" on an array.
  63.   Calling format: QUICKSORT[NO,ST]
  64.                       NO = Number of array elements.
  65.                       ST = First array element (0 or 1).
  66.   Return value  : None.
  67.   Special notes : The procedure needs to be modified somewhat to fit your
  68.                       specific program.  Places that need to be changed are
  69.                       so marked in the procedure.
  70.   Author        : ???
  71.  
  72.  
  73. ========
  74. Graphics
  75. ========
  76.  
  77. _FAST_ELLIPSE
  78.   Description   : Draws an ellipse using only fixed-point math.
  79.   Calling format: _FAST_ELLIPSE[XC,YC,RX,RY,_FILLED]
  80.                       XC,YC - center of ellipse
  81.                       RX,RY - X and Y radii (for a circle, RX=RY)
  82.                       _FILLED - whether ellipse should be filled or not
  83.   Return value  : None.
  84.   Special notes : Requires procedure _4WS (included in file).
  85.   Author        : Michael Sikorsky
  86.                   sikorsky@bode.ee.ualberta.ca
  87.  
  88. _FAST_LINE
  89.   Description   : Draws a line using only fixed-point math.
  90.   Calling format: _FAST_LINE[X1,Y1,X2,Y2]
  91.                       X1,Y1 - coordinates of the first point
  92.                       X2,Y2 - coordinates of the second point
  93.   Return value  : None.
  94.   Author        : Michael Sikorsky
  95.                   sikorsky@bode.ee.ualberta.ca
  96.  
  97. MULTI_LINE
  98.   Description   : Draws a multi-colour line.
  99.   Calling format: MULTI_LINE[X1,Y1,X2,Y2,NUM,LIM]
  100.                       X1,Y1 - starting coordinates
  101.                       X2,Y2 - ending coordinates
  102.                       NUM   - starting colour
  103.                       LIM   - ending colour
  104.   Return value  : None.
  105.   Special notes : When the colour number reaches LIM, it returns to 1.
  106.   Author        : Mark Baker
  107.                   ukrbake@prl.philips.co.uk
  108.  
  109. PALETTE_PROCS
  110.   Description   : Five procedures to store, set, and fade the colours of a
  111.                       screen.
  112.   Calling format: _PUTPAL[N,_START,_END] - store screen colours in palette
  113.                       N      = Palette number
  114.                       _START = First colour to store
  115.                       _END   = Last colour to store
  116.                   _GETPAL[N,_START,_END] - set screen colours from palette
  117.                       N      = Palette number
  118.                       _START = First colour to set
  119.                       _END   = Last colour to set
  120.                   _FADEPALxx[T,N] - fade first 8, 16, or 32 colours to
  121.                                     palette N (xx=8, 16, or 32)
  122.                       T = VBLs between colour changes
  123.                       N = Palette number
  124.   Return value  : None for all procedures.
  125.   Special notes : The procedures require that your program set up an array
  126.                       PAL() at the beginning of the program; read the file
  127.                       for details.
  128.   Author        : Seumas McNally
  129.                   sfmcnally@BIX.com
  130.  
  131. _PALETTE_TO_ANTIQUE
  132.   Description   : Converts palette to "antique photograph".  Hard to
  133.                       describe; you'll have to see it yourself.
  134.   Calling format: _PALETTE_TO_ANTIQUE[_SCREEN]
  135.                       _SCREEN - the screen number to affect.
  136.   Return value  : None.
  137.   Author        : Michael Sikorsky
  138.                   sikorsky@bode.ee.ualberta.ca
  139.  
  140. _PALETTE_TO_BW
  141.   Description   : Converts palette to black and white.
  142.   Calling format: _PALETTE_TO_BW[_SCREEN]
  143.                       _SCREEN - the screen number to affect.
  144.   Return value  : None.
  145.   Author        : Michael Sikorsky
  146.                   sikorsky@bode.ee.ualberta.ca
  147.  
  148. _PALETTE_TO_NEGATIVE
  149.   Description   : Converts palette to "negative" colours (e.g. black<->white)
  150.   Calling format: _PALETTE_TO_NEGATIVE[_SCREEN]
  151.                       _SCREEN - the screen number to affect.
  152.   Return value  : None.
  153.   Author        : Michael Sikorsky
  154.                   sikorsky@bode.ee.ualberta.ca
  155.  
  156. PICKCOLOURS
  157.   Description   : This procedure returns the numbers of the darkest, the mid
  158.                       brightest and brightest colour of the current screen.
  159.   Calling format: PICKCOLOURS
  160.   Return value  : A string. The string contains the numbers mentioned
  161.                       above, separated by colons (i.e. "1:21:10").
  162.   Special notes : The file contains a procedure called Brightness that this
  163.                       procedure needs, so do not remove.
  164.                       There's a test programme included.
  165.                       There's a guide included.
  166.   Author        : Branko Collin
  167.                   U249026@HNYKUN11.URC.KUN.NL
  168.  
  169. SBOX
  170.   Description   : Draws a 3D-looking box with rounded corners and a dark
  171.                       outline.  Good for drawing gadgets, particularly in
  172.                       conjunction with TBOX.
  173.   Calling format: SBOX[X1,Y1,X2,Y2,IN]
  174.                       (X1,Y1),(X2,Y2) = coordinates for the box
  175.                       IN = True if the box should be "depressed", False
  176.                                otherwise.
  177.   Return value  : None.
  178.   Special notes : To achieve the 3D-effect, the procedure uses colours 0 and
  179.                       N-1 (for an N-colour screen).  It assumes that colour
  180.                       0 will be dark and colour N-1 will be bright.  Also,
  181.                       the procedure draws a dotted line for the "inner
  182.                       outline"; you need to set the background ink colour
  183.                       to some colour different from 0 and N-1 in intensity.
  184.   Author        : Paul Hickman
  185.                   ph@doc.ic.ac.uk
  186.  
  187. _SEPARATE_RGB
  188.   Description   : Filters colours in picture.
  189.   Calling format: _SEPARATE_RGB[_SCREEN,X]
  190.                       _SCREEN - the screen number to affect.
  191.                       X       - the "filter" colour:
  192.                                   1 - Red
  193.                                   2 - Green
  194.                                   3 - Blue
  195.                                   4 - Magenta
  196.                                   5 - Yellow
  197.                                   6 - Purple
  198.   Return value  : None.
  199.   Author        : Michael Sikorsky
  200.                   sikorsky@bode.ee.ualberta.ca
  201.  
  202. TBOX
  203.   Description   : Draws a 3D-looking box.
  204.   Calling format: TBOX[X1,Y1,X2,Y2,IN]
  205.                       (X1,Y1),(X2,Y2) = coordinates for the box
  206.                       IN = True if the box should be "depressed", False
  207.                                otherwise.
  208.   Return value  : None.
  209.   Special notes : To achieve the 3D-effect, the procedure uses colours 0 and
  210.                       N-1 (for an N-colour screen).  It assumes that colour
  211.                       0 will be dark and colour N-1 will be bright.
  212.   Author        : Paul Hickman
  213.                   ph@doc.ic.ac.uk
  214.  
  215.  
  216. =====
  217. Icons
  218. =====
  219.  
  220. _MAKEMASK
  221.   Description   : Creates a mask for an icon, using a given colour as
  222.                       "transparent".
  223.   Calling format: _MAKEMASK[_SCREEN,_COLOUR,TEMP1,TEMP2,X1,Y1,X2,Y2,_ICON]
  224.                       _SCREEN     - Screen that icon is displayed on
  225.                       _COLOUR     - Colour to make transparent
  226.                       TEMP1,TEMP2 - Two temporary (unused) screens
  227.                       (X1,Y1)     - Upper-left corner of icon
  228.                       (X2,Y2)     - Lower-right corner of icon
  229.                       _ICON       - Icon number to create mask for
  230.   Return value  : None.
  231.   Special notes : Can be changed to work with bobs instead of icons; just
  232.                       just change "Icon Base" to "Sprite Base".
  233.                   Assumes that the icon exists and has a mask.  A typical
  234.                       calling sequence would be:
  235.  
  236.                       Get Icon N,X1,Y1 To X2,Y2
  237.                       Make Icon Mask N
  238.                       _MAKEMASK[Screen,_COLOUR,TEMP1,TEMP2,X1,Y1,X2,Y2,N]
  239.  
  240.   Author        : Michael Sikorsky
  241.                   sikorsky@bode.ee.ualberta.ca
  242.  
  243.  
  244. =====
  245. Other
  246. =====
  247.  
  248. _DATECONVERT
  249.   Description   : Converts a date in the format "YYMMDD" (e.g. "930911") into
  250.                       a more human-readable format.
  251.   Calling format: _DATECONVERT[DATE$,FORMAT]
  252.                       DATE$  = the date in YYMMDD format
  253.                       FORMAT = the format to return the date in.  See the
  254.                                    procedure's documentation for details.
  255.   Return value  : The date, as a string, in the specified format.
  256.   Author        : Geoffrey Carman
  257.                   cs922012@ariel.cs.yorku.ca
  258.  
  259. _TO_NTSC
  260.   Description   : Switches display to NTSC mode.
  261.   Calling format: _TO_PAL
  262.   Return value  : None.
  263.   Special notes : Requires ECS or better chipset.
  264.   Author        : Michael Sikorsky
  265.                   sikorsky@bode.ee.ualberta.ca
  266.  
  267. _TO_PAL
  268.   Description   : Switches display to PAL mode.
  269.   Calling format: _TO_PAL
  270.   Return value  : None.
  271.   Special notes : Requires ECS or better chipset.
  272.   Author        : Michael Sikorsky
  273.                   sikorsky@bode.ee.ualberta.ca
  274.  
  275.  
  276. ============
  277. ScreenEaters
  278. ============
  279.  
  280. [See the file ScreenEaters/SE.doc for more information.  Note that no screen]
  281. [eaters return any values.                                                  ]
  282.  
  283. SEB_4LEAFWIPE
  284.   Description   : Wipes the screen from the four sides inward.
  285.   Calling format: SEB_4LEAFWIPE[SCR,C]
  286.   Author        : Paul Hickman
  287.                   ph@doc.ic.ac.uk
  288.  
  289. SEB_DIAGONAL_WIPE
  290.   Description   : Wipes the screen in a circular pattern.
  291.   Calling format: SEB_DIAGONAL_WIPE[SCR,C]
  292.   Author        : Paul Hickman
  293.                   ph@doc.ic.ac.uk
  294.  
  295. SEB_HSTRIPS
  296.   Description   : Divides the screen into horizontal strips which then fold
  297.                       in on each other.
  298.   Calling format: SEB_HSTRIPS[SCR,C,N,D]
  299.                       N = Number of strips; must be a factor of Screen Height
  300.                       D = Delay in VBLs
  301.   Author        : Paul Hickman
  302.                   ph@doc.ic.ac.uk
  303.  
  304. SEB_PATTERN_WIPE
  305.   Description   : Uses a pattern to clear the screen.
  306.   Calling format: SEB_PATTERN_WIPE[SCR,C]
  307.   Author        : Paul Hickman
  308.                   ph@doc.ic.ac.uk
  309.  
  310. SEB_ROLL
  311.   Description   : "Rolls" the screen up, down, left, or right.
  312.   Calling format: SEB_ROLL[SCR,C,TMPSCR,RW,D]
  313.                       TMPSCR = Temporary screen number
  314.                       RW     = Width of "roll".  Should be less than 1/3 the
  315.                                    size of the screen in the direction of
  316.                                    the roll.  In other words, when rolling
  317.                                    left or right, RW should be less than
  318.                                    Screen Width/3; when rolling up or down,
  319.                                    should be less than Screen Height/3.
  320.                       D      = Roll direction: 0=up, 1=down, 2=left, 3=right
  321.   Special notes : The original submission consisted of four procedures,
  322.                       ROLLUP, ROLLDOWN, ROLLLEFT, and ROLLRIGHT.  For ease
  323.                       of use I wrote ROLL.  If you only need one or two
  324.                       directions of rolling, you can just copy the procedures
  325.                       you need and call them directly.
  326.   Author        : Paul Hickman, based on code from Seumas McNally
  327.                   PH - ph@doc.ic.ac.uk; SM - sfmcnally@BIX.com
  328.                   ROLL procedure by Andrew Church (95ACHURCH@vax.mbhs.edu)
  329.  
  330. SEB_TILES
  331.   Description   : Clears the screen by removing blocks.
  332.   Calling format: SEB_TILES[SCR,C,BS,SPEED]
  333.                       BS    = size of blocks (multiples of 8 work best)
  334.                       SPEED = Delay in VBLs
  335.   Author        : Derek Waters
  336.                   n1djwate@aelmg.adelaide.edu.au
  337.  
  338. SEB_TRICLEAR
  339.   Description   : Clears the screen by erasing triangular sections.
  340.   Calling format: SEB_TRICLEAR[SCR,C,N,D]
  341.                       N = size of triangles; must be a factor of both
  342.                               Screen Width and Screen Height
  343.                       D = Delay in VBLs
  344.   Author        : Paul Hickman
  345.                   ph@doc.ic.ac.uk
  346.  
  347. SEB_VSTRIPS
  348.   Description   : Divides the screen into vertical strips which then fold in
  349.                       on each other.
  350.   Calling format: SEB_VSTRIPS[SCR,C,N,D]
  351.                       N = Number of strips; must be a factor of Screen Width
  352.                       D = Delay in VBLs
  353.   Author        : Paul Hickman
  354.                   ph@doc.ic.ac.uk
  355.  
  356. SED_EATZOOM
  357.   Description   : Divides the screen into tiles which then collapse inward
  358.                       upon themselves.
  359.   Calling format: SED_EATZOOM[SCR,C,TMPSCR,TX,TY,ZMODE]
  360.                       TMPSCR = temporary screen number
  361.                       TX,TY  = size of tiles.  TX should be a factor of
  362.                                    Screen Width; TY, of Screen Height.
  363.                       ZMODE  = 1: tiles cleared from top to bottom
  364.                                2: tiles cleared randomly
  365.                                3: tiles cleared in a circular pattern.
  366.   Author        : Paul Hickman, based on code from Seumas McNally
  367.                   PH - ph@doc.ic.ac.uk; SM - sfmcnally@BIX.com
  368.  
  369. SES_ANGLEWIPE
  370.   [ The original version of this procedure had a bug that would ]
  371.   [ consistently crash the computer.  I fixed the bug.  --AC    ]
  372.   Description   : Wipes the screen in a quarter-circle pattern, using one
  373.                       corner as the center of the circle.
  374.   Calling format: SES_ANGLEWIPE[SCR,C,CORNER]
  375.                       CORNER = corner to start from: 1=TL, 2=BL, 3=BR, 4=TR
  376.   Author        : Derek Waters
  377.                   n1djwate@aelmg.adelaide.edu.au
  378.  
  379. SES_EATZOOM
  380.   Description   : Divides the screen into tiles which then collapse inward
  381.                       upon themselves.
  382.   Calling format: SED_EATZOOM[SCR,C,TMPSCR,TS,ZMODE]
  383.                       TMPSCR = temporary screen number
  384.                       TS     = size of tiles (X and Y).  Should be a factor
  385.                                    of Screen Width and Screen Height.
  386.                       ZMODE  = 1: tiles cleared from top to bottom
  387.                                2: tiles cleared randomly
  388.                                3: tiles cleared in a circular pattern.
  389.   Author        : Paul Hickman, based on code from Seumas McNally
  390.                   PH - ph@doc.ic.ac.uk; SM - sfmcnally@BIX.com
  391.  
  392. SES_SAND
  393.   Description   : This one is hard to describe.  It's (apparently) supposed
  394.                       to be a sandglass-effect, but it looks like a big
  395.                       triangle going up the screen.
  396.   Calling format: SES_SAND[SCR,C,SPEED]
  397.                       SPEED = Delay in VBLs
  398.   Author        : Derek Waters
  399.                   n1djwate@aelmg.adelaide.edu.au
  400.  
  401.  
  402. ========
  403. ScreenFX
  404. ========
  405.  
  406. MOVING_RAINBOWS
  407.   Description   : Creates moving rainbows.  This is actually a set of four
  408.                       procedures that set up, display, animate, and remove
  409.                       the rainbows.
  410.   Calling format: SET_MOVING_RAINBOWS[AMP,POS,SPC,AFFECTCOL,SPEED]
  411.                       AMP       = amplitude of movement (_RAIN_AMP)
  412.                       POS       = central rainbow position (_RAIN_POS)
  413.                       SPC       = spacing between rainbows (_RAIN_SPACE)
  414.                       AFFECTCOL = colour number to affect
  415.                       SPEED     = speed of rainbows (_RAIN_SPEED)
  416.                   _DISPLAY_RAINBOWS[SPEED,SPC]
  417.                       SPEED     = speed at which the rainbows appear
  418.                       SPC       = as above
  419.                   _ANIMATE_RAINBOWS
  420.                   _REMOVE_RAINBOWS[SPEED]
  421.                       SPEED     = speed at which the rainbows disappear
  422.   Return value  : None for all procedures.
  423.   Special notes : Due to the unusual nature of this submission, I have
  424.                       included an example program with the procedures.  The
  425.                       program includes the necessary variable initialization
  426.                       for the procedures.  Where I have listed a variable
  427.                       name in parentheses in the "Calling format" section,
  428.                       the variable of that name in the example program will
  429.                       have a comment providing more information about that
  430.                       variable.  DO NOT change the names of the variables;
  431.                       they are needed by the rainbow procedures!
  432.   Author        : Mark Baker
  433.                   ukrbake@prl.philips.co.uk
  434.  
  435.  
  436. =======
  437. Screens
  438. =======
  439.  
  440. RDZONE
  441.   Description   : Reads the coordinates of a screen zone into global
  442.                       variables X1,Y1,X2,Y2 without changing the current
  443.                       screen.  If the zone does not exist, the variables
  444.                       remain unchanged.
  445.   Calling format: RDZONE[SCRN,Z]
  446.                       SCRN = Screen number
  447.                       Z    = Zone number
  448.   Return value  : True if the zone existed, FALSE if it did not.
  449.   Author        : Paul Hickman
  450.                   ph@doc.ic.ac.uk
  451.  
  452. RDZONE2
  453.   Description   : Reads the coordinates of a screen zone into global
  454.                       variables X1,Y1,X2,Y2 without changing the current
  455.                       screen.  If the zone does not exist, an "Illegal
  456.                       function call" error is generated.
  457.   Calling format: RDZONE2[SCRN,Z]
  458.                       SCRN = Screen number
  459.                       Z    = Zone number
  460.   Return value  : None.
  461.   Author        : Paul Hickman
  462.                   ph@doc.ic.ac.uk
  463.  
  464.  
  465. ======
  466. System
  467. ======
  468.  
  469. _DOSERROR
  470.   Description   : Returns the AmigaDOS error message for an IoErr() error
  471.                       code.
  472.   Calling format: _DOSERROR[ERR]
  473.                       ERR - IoErr() (Doscall(-132)) return value.
  474.   Return value  : String that contains the error text.
  475.   Special notes : This procedure handles all errors for AmigaDOS 2.1.  Use
  476.                       of the AmigaDOS 2.04 Fault() function is not yet
  477.                       implemented.
  478.   Author        : Andrew Church
  479.                   95ACHURCH@vax.mbhs.edu
  480.  
  481. MAKE_RAM
  482.   Description   : Attempts to access the RAM disk.  This results in the RAM
  483.                       disk being initialised if it was not already.
  484.   Calling format: RAM_DISK
  485.   Return value  : None.
  486.   Author        : Paul Hickman
  487.                   ph@doc.ic.ac.uk
  488.  
  489.  
  490. ====
  491. Text
  492. ====
  493.  
  494. MESSAGEBOX
  495.   Description   : Creates a colourful message box.  This is actually two
  496.                       separate procedures, one to display the message box
  497.                       and one to clear it.
  498.   Calling format: M_DISP[CLR,MESSAGE$]
  499.                       CLR      = Basic colour to use.  This should be one
  500.                                      of $001,$010,$011,$100,$101,$110,$111.
  501.                       MESSAGE$ = Message to display.
  502.                   M_CLEAR
  503.   Return value  : None for both procedures.
  504.   Special notes : You must have a 32- or 64-colour screen opened before the
  505.                       message box is displayed.
  506.   Author        : Mark Baker
  507.                   ukrbake@prl.philips.co.uk
  508.  
  509. OPENFONT
  510.   Description   : Opens/closes a font.
  511.   Calling format: OPENFONT[NAME$,SIZE,_REM]
  512.                       NAME$ - Name of the font.  ".font" extension is
  513.                                 optional.
  514.                       SIZE  - Font size.
  515.                       _REM  - 0 to open the font, nonzero to close it.
  516.   Return value  : Font number (to be used with Set Font).
  517.   Author        : Andrew Church
  518.                   95ACHURCH@vax.mbhs.edu
  519.  
  520. _SHADOW_TXT
  521.   Description   : Writes shadowed text to the current screen.
  522.   Calling format: _SHADOW_TXT[X,Y,_FG,_BG,_TXT$]
  523.                       X,Y   - coordinates for text (like Text command)
  524.                       _FG   - foreground colour
  525.                       _BG   - background colour
  526.                       _TXT$ - text to write
  527.   Return value  : None.
  528.   Author        : Michael Sikorsky
  529.                   sikorsky@bode.ee.ualberta.ca
  530.  
  531.  
  532.