Mail Archives: djgpp/1999/06/08/20:30:23
Hello,
Allegro does let you show the cursor on a memory bitmap.
Just use the show_mouse() function. (ie:
BITMAP *buf=create_bitmap(SCREEN_W,SCREEN_H);
clear(buf);
show_mouse(buf);
blit(buf,screen,0,0,0,0,buf->w,buf->h);
:)
At least this has always worked for me.
Later.
Tom Fjellstrom.
Jan Hubicka wrote:
>
> On Mon, Jun 07, 1999 at 10:24:02AM +0100, Shawn Hargreaves wrote:
> > Beholder1 writes:
> > > I'm wondering, is there any way to write to the screen while having
> > > a mouse present without having to call scare_mouse() every time?
> >
> > Not unless you are using a VBE/AF driver that supports hardware cursors.
> >
> > > When i scare the mouse, draw the screen, and then unscare the mouse,
> > > I get an unattractive flicker.
> >
> > If you are doing a fully fledged screen animation, you need to make
> > the mouse pointer be a part of that system. In other words don't use
> > Allegro to draw the cursor at all, but just plot your own sprite
> > using the same double buffering or page flipping system that you
> > have in place for the rest of your graphics.
> In XaoS I am just putting new bitmaps to the screen. In the rest
> I would like to keep allegro's cursor just to make it working even
> in cases XaoS is busy by calculating.
> It can be nice, if allegro had some way to let me draw cursor to
> bitmap (w/o removing original one on screen), putting bitmap with
> the cursor to screen and then reventing back to normal mode draving
> cursor on screen. This can avoid flickering in such bitmap blits.
> I believe it is quite common situation, so maybe allegro can have
> some support for this( or does it already have one?)
> I've done this in the XaoS's direct-X driver and it seems to work nicely..
>
> Honza
> >
> >
> > Shawn Hargreaves.
- Raw text -