Mail Archives: djgpp/1996/09/14/21:58:53
I was wondering if someone could give me a concise snippet of code,
using GrBitBlt as a sprite function (_if_ this is possible). (Grx2,
btw). I've looked at BitBltTst.c, and as far as I can see, it doesn't
do what I need, which is namely a simple sprite put. When I do:
GrContext sprite=GrCreateContext(40,40,NULL,NULL);
GrBitBlt(sprite,0,0,NULL,0,0,39,39,GrWRITE);
then
while (!kbhit())
{
GrBitBlt(NULL,random(600),random(600),sprite,0,0,39,39,GrWRITE);
}
BitBlt gets the data area okay, but if it happens to write over part
of the screen where it originally got the sprite, it incorporates the
new image into the sprite data. While it is cool looking, can
somebody tell me a way to avoid it? The GRX2 manual didn't say, and
I'm saving D/l Grx1 as a last resort, if possible.
Thanks for _any_ and _all_ help,
Jeff
(*PS: No, this wasn't in manual :)
- Raw text -