home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: rec.games.programmer
- Path: sparky!uunet!usc!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!jas37876
- From: jas37876@uxa.cso.uiuc.edu (John A. Slagel)
- Subject: Re: PC Graphics (animation)
- References: <1993Jan21.082235.505680@zeus.calpoly.edu>
- Message-ID: <C17tq1.HHs@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: University of Illinois at Urbana
- Date: Thu, 21 Jan 1993 17:53:58 GMT
- Lines: 29
-
- Well, you're headed in the right direction...
-
- I will post some C code in the next day or so to take care
- of multiple keypresses with no typomatic stupid repeat. However,
- this code is in Microsoft C with inline assembler, so if you
- are using something else, it might take some effort... I also
- have the code in Pascal that someone posted a while back.
-
- To take care of flicker... Use the XLIB04 package. Set up two
- virtual screens. Then, you can draw on one while viewing the
- other. Then, after you're done drawing on the hidden page,
- make the hidden page visable, and then wait for verticle retrace
- and then begin drawing on the now-hidden previous page that was shown.
- Keep looping... Another good thing to do is to use 3 pages... one
- for the background and 2 for page flipping. Then, whenever you need
- to erase a "sprite" you can just use a fast display memory to display
- memory copy from the background page on top of the sprite you need
- to erase, and wala, the background is restored! All the routines
- that you need to do this are in the XLIB04 library. For three pages,
- you'll need to use 320x200 mode. 320x240 only gives ~2.4 pages or
- something like that.
-
- Good luck.
-
- --
- -----------------------------------------------------------------------------
- John A. Slagel "My old man used to tell me, before he left this
- j-slagel1@uiuc.edu shitty world, never chase buses or women- you
- (217) 337-7930 always get left behind." -The Marlboro Man
-