home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / blitzbasic / riblitzlibs.lha / riblitzlibs / fx / FX_Library.DOC < prev    next >
Encoding:
Text File  |  1994-06-14  |  7.5 KB  |  182 lines

  1. Reflective Images Effects Library
  2. =================================
  3.  
  4. By Stephen McNamara, with help from Steve Matty
  5. (c)1994 Reflective Images
  6.  
  7. Note: The commands that follow only work on LOW RES BITMAPS at the
  8.       moment.  Any attempt to use any other size bitmap with them will
  9.       cause graphics corruption and possibly a guru - you have been
  10.       warned....
  11.       None of the commands in this library use the blitter chip, any
  12.       blitter source code that anybody has please send to me.
  13.  
  14. Command list:
  15.         FadeInBitmap source#,dest#,delay[,offset1,offset2,height]
  16.         ClearBitmap source#,delay[,offset,height]
  17.         ZoomX2 source#,dest#,add_source,add_dest,width,height
  18.         ZoomX4 source#,dest#,add_source,add_dest,width,height
  19.         ZoomX8 source#,dest#,add_source,add_dest,width,height
  20.         addval.w=ADDValue(bitmap#,x,y)
  21.         InitZoomXY source#,dest#,add_source,add_dest
  22.         ZoomXY xzoom_value,yzoom_value,height
  23.         Derez source#,dest#,add_source,add_dest,derez_value,height
  24. (Slow)        PlanarToChunky bitmap_addr,dest_address,width,height,depth
  25. (Slow)        ChunkyToPlanar source_address,bitmap_addr,width,height,depth
  26.  
  27.  
  28. No instructions for the planar<>chunky commands since their not really that
  29. useful at the moment.  What I'm going to try and do is put some faster
  30. conversion routines in this library to do the jobs of these commands.
  31.  
  32.  
  33. Statement: FadeInBitmap
  34. ========================================================================
  35. Modes : Amiga/Blitz
  36. Syntax: FadeInBitmap source#,dest#,delay[,offset1,offset2,height]
  37.  
  38.   This is used to make a low rez, any height, bitmap appear on another
  39.   one in a nice way.  Source# and dest# should be bitmap object numbers
  40.    and delay is the 'slow-down' value for the fade.  This is necessary
  41.   because this routine works very fast - at full speed it looks just like
  42.   a slow screen copy.  You should note that the delay is taken as being a
  43.   word, thus don't pass 0 or you'll actually get a delay of 65535.  This
  44.   routine will adjust itself to take into account the depth of the bitmap,
  45.   WARNING: the depth of the destination bitmap should be AT   LEAST as big
  46.   as the depth of the source# bitmap because the depth of the fade is taken
  47.   from the source# bitmap.
  48.   The optional parameters in this command allow you to set respectively:
  49.   the source bitmap y offset, the destination bitmap y offset and the
  50.   height of the fade (in pixels).  If these parameters are left out then
  51.   the fade automatically occurs across the full size of the bitmap.
  52.   
  53.   See: ClearBitmap
  54.  
  55. Statement: ClearBitmap
  56. ========================================================================
  57. Modes : Amiga/Blitz
  58. Syntax: ClearBitmap source#,delay[,offset,height]
  59.  
  60.   This is used to clear a low res, any height, bitmap in a very pleasant
  61.   way.  The parameters are the same as for FadeInBitmap except that
  62.   only one bitmap is needed.  The delay parameter i used for the same
  63.   reason as in FadeInBitmap - to slow down the effect.  The optional
  64.   parameters allow you to set a y start value for the clear and the
  65.   height (in pixels) of the clear.
  66.  
  67.   See: FadeInBitmap
  68.  
  69. Statement: ZoomX2
  70. ========================================================================
  71. Modes : Amiga/Blitz
  72. Syntax: ZoomX2 source#,dest#,add_source,add_dest,width,height
  73.  
  74.   This command does a very fast X2 zoom.  It works with two bitmaps - one
  75.   source and one dest (note: these can be the same bitmap but you should
  76.   be careful that the zoom is not done over the source data).  The two
  77.   parameters add_source and add_dest allow you to specify the position of
  78.   the start of the zoom, they specified as byte offsets from the top left
  79.   corner of the bitmaps (byte 0).  These values can be calculated by the
  80.   following method:
  81.  
  82.         add_source=(Y x BITMAP_WIDTH (in bytes) + (X / 8)
  83.  
  84.   or by using the built in command ADDValue.  Width and height are both
  85.   specified in pixels.
  86.  
  87.   NOTE: There is no clipping on this command - be careful not to zoom off
  88.         the edges of bitmaps.
  89.  
  90.   See: ZoomX4, ZoomX8 and ADDValue
  91.  
  92. Statement: ZoomX4
  93. ========================================================================
  94. Modes : Amiga/Blitz
  95. Syntax: ZoomX4 source#,dest#,add_source,add_dest,width,height
  96.  
  97.   This is exactly the same as ZoomX2 except that a times 4 zoom is done
  98.   by this command.
  99.  
  100.   See: ZoomX2, ADDValue
  101.  
  102. Statement: ZoomX8
  103. ========================================================================
  104. Modes : Amiga/Blitz
  105. Syntax: ZoomX8 source#,dest#,add_source,add_dest,width,height
  106.  
  107.   This is exactly the same as ZoomX2 except that a times 8 zoom is done
  108.   by this command
  109.  
  110.   See: ZoomX2, ADDValue
  111.  
  112. Function: ADDValue
  113. ========================================================================
  114. Modes : Amiga/Blitz
  115. Syntax: addval.w=ADDValue(bitmap#,x,y)
  116.  
  117.   This function can be used the calculate the add_source and add_dest
  118.   values used in all the zoom commands.  Just give the bitmap number, x
  119.   co-ordinate and the y co-ordinate and you'll get an answer back that can
  120.   be used straight in the ZoomXn commands.
  121.  
  122.   See: ZoomX2, ZoomX4, ZoomX8 and ZoomXY
  123.  
  124. Statement: InitZoomXY
  125. ========================================================================
  126. Modes : Amiga/Blitz
  127. Syntax: InitZoomXY source#,dest#,add_source,add_dest
  128.  
  129.   This command initialises the ZoomXY routine to the bitmaps you want it
  130.   to work on.  You MUST use this routine before calling ZoomXY.  The
  131.   parameters are the same as the first four parameter for the ZoomXn
  132.   commands - source and dest bitmaps and add_source/dest values.
  133.  
  134.   See: ZoomXY
  135.  
  136. Statement: ZoomXY
  137. ========================================================================
  138. Modes : Amiga/Blitz
  139. Syntax: ZoomXY xzoom_value,yzoom_value,height
  140.  
  141.   This command does a zoom based on the values you give it.  You should
  142.   note, though, that zoom values should be integer values (no fractional
  143.   part).  The height is the height in pixels that the source data should be
  144.   zomed to.  Please note that this command is different to the other zoom
  145.   commands in that the output of it is clipped to fit inside 320 pixels.
  146.  
  147.   This command should only be used after InitZoomXY has been called.
  148.   This routine has an extra feature in that if you give both zoom values
  149.   as 1 then a bitmap copy is done from the source to the dest using the
  150.   offsets given and the height.
  151.  
  152.   See: InitZoomXY
  153.  
  154. Statement: Derez
  155. ========================================================================
  156. Modes : Amiga/Blitz
  157. Syntax: Derez source#,dest#,add_source,add_dest,derez_value,height
  158.  
  159.   This command is used to derez a low resolution bitmap onto another one.
  160.   The bitmaps are source# and dest#, add_source and add_dest are used to
  161.   control the start position of the derez (see ZoomX2 and ADDValue to see
  162.   how these are calculated).  The derez value if obviously the amount that
  163.   each pixel will be derezed to in both the x and y directions, the height
  164.   is the height of the derez - the derez is clipped to fit inside this in 
  165.   the y direction and inside 320 pixels in the x direction.
  166.   This routine has an extra feature in that if you give derez_value as 1
  167.   then a bitmap copy is done from the source to the dest using the offsets
  168.   given and the height.
  169.  
  170. Statement: ReduceX2
  171. ========================================================================
  172. Modes : Amiga/Blitz
  173. Syntax: ReduceX2 source#,dest#,add_source,add_dest,width,height
  174.  
  175.   This command halves the given rectangle of one bitmap and pastes it onto
  176. the destination bitmap.  Width should be a multiple of 16, width and height
  177. should describe a rectangular area that will be reduced (these values
  178. should be in pixels).
  179.  
  180.   See ZoomX2 and other commands for more information about the syntax of
  181. this command.
  182.