SAMPLE: Animation in WindowsLast reviewed: February 15, 1996Article ID: Q103215 |
The information in this article applies to:
Animation in Windows Herman Rodent Starring: Nell and Olivia, the Wonder Dog Created: April 28, 1993
AbstractThis article is aimed at people who would like to create a Microsoft Windows-based application that does some form of animation, or who would like to understand how to improve the performance of an existing animated application, or who are considering porting an MS-DOS--based application to Windows. The main focus of the article is on using device-independent bitmaps (DIBs) for the images and the DIB driver (DIB.DRV) for the off-screen image buffer. The article is written around a sample application, Sprites, which is included with the article. Some knowledge of animation techniques is assumed. If you're looking for a "How to Do Animation" article, this isn't it. The following points are covered:
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. Download SPRITES.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:
|
Additional reference words: 3.10 softlib SPRITES.EXE
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |