
                                ANISPRITE 2.0
                                *************

AniSprite is an advanced sprite library vor Microsoft Windows programs. It
has all the standard features that one expects in a sprite library,
such as flicker free/multi-layer animations. In addition, AniSprite supports:

o  alpha blending between sprites and the background image, which enables
   anti-aliased edges, translucent sprites and sprite fading
o  shadows and flare effects, in any colour
o  multiple animation areas
o  256 colour pictures, any palette
o  unlimited number of sprites
o  transparent boards, move sprites over the Windows desktop
o  screen grab, system palette grab
o  callbacks ("events") for custom painting or collision detection
o  high performance (critical routines in optimized assembler)
o  uses the "mmsystem" timer (higher resolution and more reliable than the
   standard Windows timer), but without the "mmsystem" callback function
   restrictions
o  16 bit and 32 bit implementations
o  each sprite has an origin (which may lie outside the sprite)
o  sprites can be linked, moving the master also moves the linked ones
o  many "utility" functions to crop sprites to the smallest bounding box,
   to create, convert or modify masks, to adjust images images to a specific
   palette, etc.
o  full source is available
o  Windows DLL interface, libraries/definition files for C/C++
o  integrates with EGI (frame animation engine)

See ANISPRI.TXT for the documentation.

This is an evaluation version. The evaluation version may be distributed in
its entirity. Commercial information is at the bottom of this file.

    ITB CompuPhase
    Brinklaan 74-b
    1404 GL  Bussum
    The Netherlands (Pays Bas)

    Voice:      +31 35 693 9261
    Fax:        +31 35 693 9293
    Compuserve: 100115,2074
    e-mail:     info@compuphase.com
    WWW:        http://www.compuphase.com


New in version 2.0
------------------
Several new functions; notably support for transparent boards and screen
grabs. Better performance through code tuning and optimization in assembler.

o  as_CreateBitmapInfoHeader() is a simple function that fills in a structure
   that other AniSprite functions require. You usually get a BIMAPINFO by
   loading a .BMP file, and the as_CreateBitmapInfoHeader() function comes
   handy when you want to start with an empty board, or when you create
   a "masked" board.

o  The new function as_FillBoard() fills the entire board image with a solid
   colour. You typically use this function when you start with an empty board.

o  A number of customers requested to be able to move sprites on top of the
   default Windows95 desktop image. This can be done by grabbing the screen
   when the display driver was in 256 colour mode. It is no solution, however,
   for those video cards that are set up in 16-bit or 24-bit RGB modes.
   Grabbing a 24-bit RGB image and converting it to 256 colours (as required
   by AniSprite) usually changed the colours of the original image.

   This new version of AniSprite allows you to set up a "masked board". The
   board and all sprites are still 256 colours, but the board itself is
   transparent. So what you get is 256 colour sprites on top of a 24-bit
   background image.

   This new technique requires some help from you, though. Setting up the
   board as "masked" is the first, and easiest, step: all it needs is the
   addition of the flag AS_MODE_MASKED in as_CreateBoard(). The second step
   is to grab the screen, which is now easy with the new function
   as_GrabScreen(). Finally, you need to update the screen before drawing the
   board "transparently" over it.

   A new programming example shows these techniques in action.

o  as_GrabSysPalette() and as_GrabScreen() are new functions that retrieve
   the palette information and the image bits respectively. These are general
   purpose utility functions. To create a board from the grabbed
   palette/screen, you can use the new function as_BoardFromBitmap().

o  The new function as_BoardFromBitmap() can create a board from *any*
   device dependend bitmap. So now you use as_CreateBoard() to make a board
   from a DIB or as_BoardFromBitmap() to make a board from a DDB.

o  as_Link() is a new function that allows sprites to be moved as a group.
   When the "master" sprite moves, the linked sprites move along.

o  as_SpriteAtPos() has an extra parameter that allows you to walk through
   all sprites at a given position. Previously, you could only get the
   topmost sprite at any position with this function.

o  New function as_BoundingBox() lets you determine the closest bounding
   box of a mask (or of an image if you indicate the transparent colour),
   and new function as_CropImage() lets you reduce the size of a DIB to just
   that bounding box. The purpose is of course to reduce the memory footprint
   and to increase performance.

o  as_ConvertImage() now has an option to delete the original image after
   conversion (since it returns a copy of the original; usually the source
   is no longer needed after conversion).

o  New function as_GetPaletteIndex() returns the index of the entry in the
   board's colour table that comes the passed-in colour. This function is
   sometimes convenient in combination with as_BoundingBox() or with DIB
   callbacks.

o  You can now specify an "origin" for every sprite. This simplifies many
   operations, especially if the sprite must be dragged by the mouse. The
   new function as_GetPos() is a compagnion to as_SetPos(); both now take
   the sprite's origin into account.

o  Functions as_PtInSprite() and as_SpriteAtPos() were one pixel off at the
   bottom of the sprite.

o  Functions as_IsValid() and as_IsValidBoard() contained a logical error
   that made them return FALSE in nearly every case, and they could
   potentially return TRUE for invalid sprites.


New in version 1.1
------------------
The biggest update is in the programming examples, not in the library. See
the next section for the in the examples.

o  as_Move is renamed to as_SetPos(), there is a new function as_Move()
   that moves a sprite relative from its current position.

o  You may want to use the new function as_SetTimer() in place of the standard
   Windows function SetTimer(). There are two problems with the Windows
   SetTimer() function:
   1.  its resolution of 55 ms is too coarse for fluent animation
   2.  it is a low priotity message, meaning that the timer message is
       postponed (or even skipped) if there are other messages in the queue.
   The new function as_SetTimer() fixes both of these limitations:
   o  the timer resolution is 1 millisecond
   o  the message AS_TIMER has the same priority as any other message.

o  For reasons of efficiency, most AniSprite functions do not test the
   validity of the sprite and board handles that you pass to the AniSprite
   functions. When you do not trust handles to sprites or boards, you can
   test them with the new functions as_IsValid() and as_IsValidBoard().

o  Two new event callbacks are available:
   1. The periodic AS_EVENT_TIMER event allows for a "sprite oriented"
      programming approach: instead of having one monolithic function that
      moves every sprite at a timer tick, each sprite can now determine its
      action (move, change shape, disappear, ...) by itself.
   2. The AS_EVENT_COLLIDE event fires when two sprites touch each other and
      both are in the same layer.


Programming examples
--------------------
Since the initial release of AniSprite, a number of inconviences were found
in the examples. These have been fixed:
o  The .LIB file for Microsoft Visual C/C++ 4.0 and above was corrupt in the
   initial evaluation version. The current version comes with updated .LIB
   files.
o  The instructions for compiling with Borland 5.0, 32-bit were incorrect:
   they referred to the "bcc" compiler, which should have been "bcc32".
o  Although the examples were intentionally lacking most error checking (in
   order to keep the examples as short and as simple as possible), I overdid
   this "simplification". The examples now check at least whether the sprite
   images can be read from disk.
o  The compiling instructions for today's most popular compiler, Microsoft
   Visual C/C++ 4.0 or above, were missing. These are now included.
o  The current set also includes pre-compiled .EXE files, for those that wish
   to test the sprite library without going through the trouble of compiling
   the examples first.
o  The animation in the examples was not as fluent as they can be, and that
   was because of the simple timing circuitry in Microsoft Windows. Version
   1.1 of AnisSprite provides the as_SetTimer() and as_ReleaseTimer() functions
   that provide more accurate timers.


COMMERCIAL INFORMATION
----------------------

AniSprite version 2.0 is available as of December 1998. To order AniSprite
version 2.0, use the order form (file ORDER.FRM in the archive) in the
evaluation version, or ask us to send or fax you an order form.


1. Contents of the product

AniSprite version 2.0 consists of:

  AS16.DLL, the 16-bit sprite animation library (DLL)
  AS32.DLL, the 32-bit sprite animation library (DLL)
  library files and include files for current 16-bit and 32-bit C/C++ compilers
  programming examples
  printed manual


2. Price information

All prices are in Dutch Guilders (NLG). Approximate prices in Dollars
are given between parentheses, based on an exchange rate of 1.90 Dutch
Guilder for every Dollar.

Several license are available. The costs for shipping and handling
is NLG 45,00.


AniSprite standard license                        NLG 320,00
                                                  ($ 170.=)
   Includes:
        run time DLLs (16-bit and 32-bit)
        library files and include files
        programming examples, including source
        printed manual

   The AniSprite run time DLLs may be distributed (without royalties) in
   combination with an application or development tool that uses the AniSprite
   DLLs. The AniSprite manual, examples or development files may not be
   distributed (and only be duplicated for backup purposes).


AniSprite source code license                     NLG 750,00
                                                  ($ 395.=)
   Includes:
   Includes:
        run time DLLs (16-bit and 32-bit), including source
        library files and include files
        programming examples, including source
        printed manual

   Libraries and source code that are licensed from other parties are
   not included (this includes the run-time library of the C compiler).

   Modified, or unmodified, versions of the AniSprite run time DLLs may be
   distributed only in executable form and only in combination with an
   application that uses the AniSprite DLLs. The manual or other development
   files may not be resold or distributed.

