delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/26/06:02:19

From: aho450s AT nic DOT smsu DOT edu (Tony O'Bryan)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Using allegro GUI & timer functions
Date: Sat, 21 Jun 1997 20:36:09 GMT
Organization: Southwest Missouri State University
Lines: 35
Message-ID: <33ac3a46.15880575@ursa.smsu.edu>
References: <01bc7c9e$05527be0$0100a8c0 AT hal9000>
NNTP-Posting-Host: forseti.i123.smsu.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On 19 Jun 1997 10:46:20 GMT, "Huang Chee Thong" <sg7537006 AT ntuvax DOT ntu DOT ac DOT sg>
wrote:

>	Because I have update the screen very often (basically a few text boxes
>bar graphs and a scatter plot) the mouse cursor is always flashing (It is
>hardly visable). Is there some way to update the screen without turning the
>cursor off ( I'm already drawing every thing to BITMAPs and bliting them to
>the screen) I am using a P90 with a ISA video)?

If you are using an invisible bitmap to do all the drawing work then blitting
that invisible bitmap to the screen once all the drawing is done, then
displaying a rock-solid mouse cursor is easy.  Assuming that

BITMAP *MyBitmap

is the invisible bitmap, do this:

show_mouse(NULL); /* Hide the mouse */
... do all your drawing to MyBitmap ....
show_mouse(MyBitmap); /* Draw the mouse on the invisible screen */
blit(MyBitmap,screen,0,0,0,0,MyBitmap -> w,MyBitmap -> h);

You mouse pointer will never again disappear.

>	I use the timer interupt functions to provide an interupt frequency of
>1kHz to control 2 motors using pluse width modulation and I found out I
>can't seen to use the standard time functions. Is there any functions that
>could return me a time interval ? I tried improvising using the interrupt
>service routine for PWM (using a counter). But then it do not seem to be
>very accurate.
>
>Thank you for your kind attention.
>
>cth.

- Raw text -


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