Sprite Engine

 

 

C++ DirectDraw 2D Sprite Engine

This (incomplete) sprite engine supports the following features:

  • Automatic resampling of bitmapped images to any screen resolution using more advanced algorithms than those used by BitBlt (Nearest Neighbor, Box, Triangle, Bell, Bspline, Lanczos3, and Mitchell resampling filters can be specified on a per-sprite basis).
  • Uses 24 Bit full color images for sources. Optimized palette created on-the-fly for other bit depths, and can be weighted to favor any sprite. Error diffusion dither can be  specified on a per-sprite basis.
  • Supports frame-based animation with arbitrary frame rates.
    Supports Auto-Ghosting feature (Ok... this just means I have some work to do to clean up the display at certian resolutions...)
  • Minimally uses MFC (removing MFC dependencies we be done later if there is any interest).
  • Source code distributed free. Peruse it at will. Play with it. Comment on it. Learn from it. Fix it. Create derivative works. Notify me if used in a commercial product.

The source code is available here (2.5 MB, MS Visual C 6.0 Project).

This is an executable of the code used to test the library. It requires that mfc42.dll (dated 6/17/98) be already installed on your system. This is the latest version distributed with Visual C++ 6.0. Unfortunately, there is an older mfc42.dll that is already installed on most systems (dated 8/19/97). This one does not work. If you do not have it, download this and extract it to your system32 directory (or \windows\system for Win 95/98).