SAMPLE: SPRITES - Sample Application

PSS ID Number: Q103222
Article last modified on 08-23-1993

3.10
WINDOWS

----------------------------------------------------------------------
The information in this article applies to:

 - Microsoft Windows Software Development Kit (SDK) for Windows
   version 3.1
----------------------------------------------------------------------

Sprites: Demonstrates Animation in a Windows-based Application
Sprites is a companion sample application for the "Animation in
Windows" technical article on the Microsoft® Developer Network CD.
It demonstrates sprite (cast-based) animation in a Microsoft
Windows™-based application using device-independent bitmaps (DIBs)
for the images and the DIB driver (DIB.DRV) for the off-screen image
buffer.
The Sprites application uses a DIB for a background scene, and allows
you to load multiple sprites on top of the background scene. Each
sprite has x, y, and z coordinates, optional x and y velocity, and a
flag that indicates whether it can be dragged by the mouse.
A background and a set of sprites can be combined into a scene
described in a simple INI file. You can load the entire scene by
choosing the Load Scene command from the File menu.
The application updates the positions of all sprites that have a
non-zero velocity as fast as it can, using a PeekMessage loop. Sprites
that have the selectable attribute set can be dragged with the mouse.
Double-clicking a sprite brings up a dialog box for setting sprite
attributes.
Sprites was built and tested under Microsoft Windows 3.1 and the
Microsoft C/C++ version 7.0 compiler.
KEYWORDS: CD4
For Microsoft OnLine customers, SPRITES is available in the
Software/Data Library as 3X61.ZIP and can be found by searching on the
word SPRITES, the Q number of this article, or S14245. For CompuServe
Customers, SPRITES can be downloaded from the file 3-61.ZIP in library
section number 3 of the MSDNLIB forum. SPRITES was archived using the
PKware file-compression utility.

Additional reference words: 3.10
KBCategory:
KBSubcategory:
Copyright Microsoft Corporation 1993.