Mail Archives: djgpp/1997/03/19/03:14:39
> Christoph Kukulies writes:
> >While I'm moving a round the sprite smudge gets spattered over
> >the screen (pieces of the sprite, pixels are set where they not
> >should be etc etc.).
> >
> >When I'm doing a show_mouse(NULL) before I'm doing the drawing the
> >smudge disappears but this is leading to intolerable flickering
> >of the sprite.
>
> Drawing to the screen while the mouse pointer is being displayed is a
> bad thing for two reasons:
Thanks for the detailed elaboration. I understand so far. But I seem
to recall that I didn't have that sort of problems with GRX - not sure
though at the moment - would to have grab out some code.
>
> - In order to restore what was under the mouse when it next moves,
> Allegro stores a copy of what lies underneath it on the screen. If you
> draw something else over the top of the cursor, this buffer will
> become invalid. If you then move the mouse, the old, incorrect image
> will get restored where it used to be, so it will leave some 'mouse
> droppings' behind...
>
> - The mouse pointer is drawn inside a timer interrupt, which means that
> it may get drawn while the main program is in the middle of some other
> drawing operation. This wreaks havoc with the SVGA bank switching
> mechanism, as the mouse drawing code will change bank, and then return
Just a naive question (or two):
Could the interrupt routine save the SVGA bank and restore it back? Or
would that be too slow or impossible? Or is my question totally off
target :-) ? Excuse my ignorance.
> from the interrupt to the other drawing function which fails to
> realise that it now needs to switch back to whatever bank it was
> previously using. This can result in pixels being written to
> completely the wrong part of the screen, but is only a problem in
> banked SVGA modes.
>
[valuable tips... deleted for sake of brevity]
>
>
> --
> 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.
>
--
Christoph P. U. Kukulies kuku AT gil DOT physik DOT rwth-aachen DOT de
- Raw text -