From: Christoph Kukulies Message-Id: <199703190811.JAA23035@gilberto.physik.rwth-aachen.de> Subject: Re: allegro - sprites and smudge on screen In-Reply-To: from Shawn Hargreaves at "Mar 18, 97 08:34:46 pm" To: Shawn AT talula DOT demon DOT co DOT uk (Shawn Hargreaves) Date: Wed, 19 Mar 1997 09:11:40 +0100 (MET) Cc: djgpp AT delorie DOT com Reply-To: Christoph Kukulies MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > 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