
(Special Effects for BitBlt Games by Jotaf98)
 
(E-mail: jotaf98@hotmail.com)
 


(Version History)
 
() v2.0
    -A huge advance in the functions: they now use
      look-up tables, which greatly enhance their
      speed. I also included some new special
      effects (since it's easier to make your own).

() v1.1
    -In the excitement of releasing these
      functions, I forgot to comment them. That
      shouldn't be a problem now ;)
      Also, I improved the sample a bit: you can
      save your images and load new ones.

() v1.0
    -First release of Special Effects for BitBlt
      Games.



(Info)
 
Basically this is a module with some functions I
wrote to allow BitBlt games to use special effects.

Here's a brief explanation of how to use each of
them:


() LoadImage
 
Usage:
LoadImage Index, SourceDC, X, Y, Width, Height

This one loads the image in SourceDC to an internal
format, a type called "tEffect", using the Index
you specify instead of a variable name.

Whenever you want to draw an image using a special
effect, just pass to the function the image's index
that you specified here.

X, Y, Width and Height are the coordinates that will
be used from the source image, like in BitBlt.

The reason I use this internal format is because
it gets too slow if I keep using GetPixel and
extracting the RGB values in the source image; this
way, they're kept in an array that is much faster
to access.



() SpecialBlt
 
Usage:
SpecialBlt LookupTableIndex, Index, DestDC, X, Y

This is the function that bilts the effects. It copies
the image to DestDC at the coordinates you specify
with X and Y, but by using the effect you want!
LookUpTableIndex is the index of the lookup table you
want to use (see below for the description of each of
them). Index is the index of an image you loaded using
LoadImage.



(LookUp Table Indexes)
 
The look up table index you specify in SpecialBlt
is one of the most important part, because it's the
effect that will be used. I have included lots of
them in this release, and I'm sure they're all you
need ;)

() 0 - Add
   This is a very cool effect that will make the 
    destination image brighter, so it's good for
    lights, fire, explosions, lasers... just
    experiment with different stuff and you'll know
    what I mean.
    Brighter means more opaque, darker means more
    translucent. Black is completely transparent.

() 1 - Subtract (with no color correction)
   This is a not-so-used effect that will make the
    destination image darker, so you can use it for
    black smoke, dirt, or "black magic" effects.
    This one too is a matter of experimenting it
    with different images to see if it suits it.
    It inverts the colors of the source image, so
    it's a bit harder to handle with.
    Darker means more opaque, brighter means more
    translucent. White is the transparent color here.

() 2 - Subtract (corrected)
   Just like the above one, but you don't have to
    worry about inverted colors in the source image!
    So, black is the transparent.

() 3 - Better Add Effect (Alpha Map to White)
   This is a trick that uses the source image as an
    alpha map, and White as the source color. It's an
    enhanced Add effect, because it makes the
    destination brighter, but not too much! Look
    closely, it's much smoother than the original Add
    effect.

() 4 - Better Subtract Effect (Alpha Map to Black)
   Same thing, but makes the image darker!

() 5 to 13 - Translucency
   The effect you've all been waiting for:
    translucency! And it comes in 8 different
    levels of opacity!
    2 is the most opaque one. 10 is the most
    transparent. Full black in the source image
    will be used as the completely transparent
    color.

() 14 to 17 - Weird Effects
   5 weird effects, using functions like Sin or Sqr.
    Try them in differen spots of the image to see
    what I mean! These are REALLY cool if you use
    them well!



(Plans for Future Versions)
 
Currently none, they're all here now :)

Please e-mail me any suggestion you have to
jotaf98@hotmail.com


