🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #2744

Re: animation in Windows?

#2744
From: Doug McDonald
Date: Sun, 19 May 1991 16:24
34 lines
2198 bytes
In article <1991May19.152505.11357@sunee.waterloo.edu> gpsteffl@sunee.waterloo.edu (Glenn Steffler) writes:
>In article <1688@anaxagoras.ils.nwu.edu> neves@aristotle.ils.nwu.edu (David Neves) writes:
>>
>>We want to do some simple animation in Windows.  If anyone has some
>>pointers on this I would appreciate them.
>
>This is a topic which most programmers find difficult in Windows due to
>the "uncommon" choice of API for bitmapped video.  An easy way to draw
>a particular bitmap to the screen is BitBlt ().  Unfortunately the
>Windows graphics primatives provide only a source bitmap device a
>destination bitmap device and a SMALL (is that in caps or what?!)
>pattern bitmap.  The pattern bitmap determines what parts of the source
>will be copied to the destination (hey lets just deal in these terms as
>a new developer may not realize the multitudinal useage variety
>provided by ROP modes -ed).  Like I said, this pattern bitmap is a
>small 8x8 bitmap (actually it's a brush) that is selected before the
>drawing operation.
>

Yep. It is a serious problem. There is really only one way to do
any serious general animation in Windows, so far as I have figured out. 
You have to keep a memory bitmap - of the same type as the screen,
that is, device dependent, and keep your whole image on it. You draw to
it however you please (for moderate speed you use Windows primitives,
for top speed you do it directly yourself, to memory) and keep track of
all the rectangular areas you modify, then you just COPY those areas
to the screen with bitblt.

This of course also has the advantage that repainting the screen if
it gets zapped is trivial.


Doug McDonald
Technical Details
Message-ID: <1991May19.162407.20846@ux1.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!uwm.edu!ux1.cso.uiuc.edu!usenet
References: <1991May19.152505.11357@sunee.waterloo.edu> <1688@anaxagoras.ils.nwu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!uwm.edu!ux1.cso.uiuc.edu!usenet
From: mcdonald@aries.scs.uiuc.edu (Doug McDonald)
Newsgroups: comp.windows.ms.programmer
Subject: Re: animation in Windows?
Message-ID: <1991May19.162407.20846@ux1.cso.uiuc.edu>
Date: 19 May 91 16:24:07 GMT
References: <1991May19.152505.11357@sunee.waterloo.edu> <1688@anaxagoras.ils.nwu.edu>
Sender: usenet@ux1.cso.uiuc.edu (News)
Organization: University of Illinois at Urbana
Lines: 34