The AniSprite examples are kept as simple as possible. With the exception of
CUTOUT.C, each of the examples is designed to show one specific feature.

CUTOUT.C is the simplest example of all. Its purpose is to show the general
setup of AniSprite and simple animation. The other examples build from
CUTOUT.C.

For users of Visual Basic, the SIMPLE.VBP is an equivalent of CUTOUT.C. When
modifying the file, make sure that the AniSprite type library is referenced
in Visual Basic. See the AniSprite manual for details. The SIMPLE.VBP example
was is a Visual Basic 4.0 project. It was also tested with Visual Basic 6.0.


Compiling
---------
The examples can be directly compiled. If your compiler requires a resource
file, use EXAMPLE.RC. If your linker requires a .DEF file, use EXAMPLE.DEF.

Below are a few examples. Look up you compiler documentation if you have
a compiler that is not listed.

Borland C++, 16-bit
        bcc -W cutout.c ..\lib\as16.lib

Borland C++, 32-bit
        bcc32 -tW cutout.c ..\lib\as32b.lib

Microsoft C/C++, 16 bit
        cl -Gw cutout.c ..\lib\as16.lib slibcew.lib libw.lib example.def
        rc example.rc cutout.exe

Microsoft C/C++, 32 bit
        cl -GA cutout.c ..\lib\as32m.lib user32.lib gdi32.lib

Watcom C/C++, 32-bit
        wcl386 /l=nt_win cutout.c ..\lib\as32w.lib

LCC-Win32
        lcc cutout.c
        lcclnk -subsystem windows cutout.obj ..\lib\as32l.lib


Descriptions
------------

CUTOUT.C

    Simple sprite animation with a cutout mask. The other examples are
    modifications of this file.

    This example shows:
    o  Creating a board.
    o  Creating a palette for the board.
    o  Creating a sprite.
    o  Doing simple animation.
    o  Cleaning up (deleting the sprite and the board).


ANIMATE.C

    Simple sprite animation with two images for a single sprite.

    This example shows:
    o  Changing the appearance of a sprite.


SCROLL.C

    Sprite animation on a scrolling background.

    This example shows:
    o  Creating a board that is smaller than the "board" image.
    o  Moving the image in the board (independently from the sprite).


SHADOW.C

    Shadow masks and simple sprite animation.

    This example shows:
    o  Creating a mask with multiple transparent colours.
    o  Preparing the board for luma masks and creating a luma levels.
    o  Setting the opacity level of the sprite, so that the shadow
       is considered transparent.


GHOST.C

    Alpha blending (a translucent sprite).

    This example shows:
    o  Changing a cutout mask to an alpha mask.
    o  Preparing the board for alpha masks and creating a alpha levels.
    o  Loading and saving alpha levels to disk (the same applies to
       luma levels).


CALLBACK.C

    An "owner draw" sprite. This example writes the number of "hits" between
    the sprite and the window edges in the sprite itself.

    This example shows:
    o  using a DDB callback function.


SMOOTH.C

    Shows the difference between an anti-aliased mask and a plain cutout mask.
    The animation board also uses a DIB section and an identity palette.

    To better examine the differences between the anti-aliased sprite and the
    standard sprite (with a cutout mask), you can stop the animation by
    pressing the space bar. To restart the animation, press the space bar
    again.

    This example shows:
    o  Creating board with a DIB section and an identity palette.
    o  Creating a bi-level cutout mask from a sprite image.
    o  Smoothing the edge of a bi-level mask.


GRABSCRN.C

    Grabs the screen and creates a board from it. The board is (still)
    restricted to 256 colours, so if your graphic adapter is in RGB mode,
    you will see a "sudden" change of colours.

    The GRABSCRN example also grabs the current system palette. If Windows
    runs in a RGB mode, it does not really use a palette. The system palette
    is hence set to a series of fixed colours. These colours are not very well
    chosen, which means that the screen grab of GRABSCRN looks quite ugly if
    the display is in an RGB mode (more than 256 colours).

    See the TRANSP.C example for using AniSprite with a grabbed screen in
    RGB mode.

    This example shows:
    o  Grabbing the system palette and the display image.
    o  Creating a board from that screen grab.
    o  Adapting the sprite image to the palette of the board.
    o  Doing simple animation, like that in CUTOUT.C.
    o  Cleaning up (deleting the sprite and the board).


TRANSP.C

    Sets up a transparent board and grabs the screen as a "background" for
    that transparent board. Transparent boards are a "cleaner" way of adding
    an animation on top of the desktop (or any other grabbed image), but
    they are also slower. If the display adapter is in a 256 colour mode,
    there is an alternative, faster, way: see GRABSCRCN.C.

    This example shows:
    o  Grabbing the display.
    o  Creating a transparent board.
    o  Creating a region from the "dirty rectangle" list.
    o  Drawing a transparent board.



ALPHATBL.C

    This file contains two functions to load and save alpha belnding tables
    that some of the programing examples use.

    Instead of compiling this file separately, I have simply #include'd it in
    the example programs that require it.

