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.


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.


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 as16.lib

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

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

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

Watcom C/C++ 11.0, 32-bit
        wcl386 /l=nt_win cutout.c as32w.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 256 colour
    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 256 colour modes.

    The screen grab facility is intended to either:
    1. grab a window that you build up yourself and for which you already
       have an appropriate palette, or
    2. grab any screen and use it in combination with a transparent board.
    So what GRABSCRN shows is not really the intended use.

    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).


LOADDIB.C

    This file contains a function that is common to all examples. It loads
    256-colour BMP files and it aborts the program when the picture cannot be
    read.

    Instead of compiling this file separately, as one would normally do, I have
    simply #include'd it in all example programs as if it were a header file.


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.

