www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/01/18:08:26

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro question
Date: Tue, 1 Apr 1997 20:25:36 +0100
Organization: None
Distribution: world
Message-ID: <dIBE1XAwEWQzEwXi@talula.demon.co.uk>
References: <19970331204412 DOT AAA2520 AT hometown>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 28
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Jeff Bachtel writes:
>If I show_mouse(s), where s is an offscreen buffer, do the normal 
>warnings not to write to the buffer while the mouse cursor is visible 
>still apply? (ie can I draw to s whenever I want, and blit s to the 
>screen when I want)

Using an offscreen buffer avoids the problems with unexpected changes to
the SVGA banking registers, but doesn't help with the issue of your
drawing overwriting the mouse pointer. If you are doing your drawing on
an offscreen buffer, a better approach would be:

    [mouse is off at this point]
    draw some cool graphics
    show mouse
    blit to screen
    hide mouse
    repeat

Zero flicker, and nothing will ever get overwritten. The only potential
trouble is that if the mouse moves at the exact same instant as the blit
is taking place, a distorted pointer could get displayed for that frame.
This can be fixed by setting "freeze_mouse_flag = TRUE" just before you
do the blit.


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019