davecarr@tove.cs.umd.edu (David Carr) (06/20/91)
Hello, Does anyone know were to find an algorithm to do smooth animation of a sprite across an arbitrary background. By smooth I mean that I don't want to see the background flicker through the sprite. Examples of existing programs with this type of animation are Windows Solitare and any mouse driver. I would appreciate a reference or algorithm description. Thanks in advance. David Carr (davecarr@cs.umd.edu)
sorrow@oak.circa.ufl.edu (06/21/91)
Mouse cursors use two bit masks (monochrome) via XOR then an AND of a screen mask and a cursor mask. The Logitech Mouse PRogrammer's Reference describes this. This is flicker free mostly because it is all done using 1-bit plane logic (monochrome). As for good full screen animation, a technique called double buffering is used, where you draw to hidden page while looking at another one, then you swap pages when ready, etc. As for solitaire, it seems to use a standard XOR technique much like the mouse cursor. If you have a Microsoft C or Borland compiler, look at the getimage() and putimage() functions. MSC is _getimage() and _putimage(). Brian /* Brian Hook -- MS-DOS Programmer for Contract ----------------------------------------------------------------- "Seamus, that's my dog...I saw her today at the reception...sorry, sixTEEN inches....better save the women and children first...but this one goes to 11! ..anymore of that plutonium nyborg?....there can be only ONE!....like a finger pointing to the moon....ease the seat back...one day closer to death */