'=========================================================================== ' Subject: PUT W/O ERASING BACKGROUND Date: 06-27-96 (00:00) ' Author: Chad Beck Code: QB, QBasic, PDS ' Origin: FidoNet QUIK_BAS Echo Packet: GRAPHICS.ABC '=========================================================================== ' [= As two common people in New York would say, let's start rambling =] '> Wait a minute. Is the above an example of BLOADing a image? I think I have '> the idea of how to get the sprite to the screen. 'That's an idea. Draw a bunch of sprites, use PICEM to display it and then 'code to save it in BLOAD format as maybe something like SPRITE.BLD. Then 'the program can load it in another page not displayed, and GET the sprites 'into buffers while displaying a "please wait" message on the viewable page? 'Just ideas I was thinking up while reading this. '> Now for the big question "Can you tilt the picture after drawing it?". 'Well, if you GET the dartboard into a buffer somehow (assuming you can create 'one large enough) I guess you can PUT it differently? Or what about this: You 'scan the visable page for each pixel, and replot it slightly differently to 'an angle on a non-visiable page, then flip to that page and its tilted! Or 'do this on two non-visiable page while the "please wait" message is on the 'visiable page? We may have to use the 320 x 200 mode, as don't that have the 'most pages to work with? I am not sure on the concept of this virtual page 'thing, but it may be a key to this and other neat display tricks. 'As for animating, I heard of page-flipping techniques. Also you can do some 'neat things with the PUT statement: 'From: Chad Beck 'Subj: PUTs ' > I think it was CHAD BECK who earlier posted how to PUT a bitmap to ' > the screen using XOR and AND to not distort the background. If you ' > could be so kind, could you repost it!? Thanks... ' Actually it uses AND & OR. ' The ANDed image (which is PUT first) should be an inverse of 'original, whereby color zero is used for the solid areas and the highest 'color in the palette (mode dependant) is used for the transparent areas. ' Here's the demo from an old mail pack. The pair of images used to 'draw each sprite are left in the upper left-hand corner of the screen for 'your inspection. '----------------------------------------------------------------------- DEFINT A-Z SCREEN 13 PALETTE 255, 1024 * 15 'Change color 255 so it's visible DIM Image(0 TO 33), Scr(0 TO 33) InColr = 4 'The inner color of the circle OutColr = 3 'The color of its outer ring CIRCLE (5, 5), 4, OutColr 'Draw original image--make transparent PAINT (5, 5), InColr, OutColr ' areas Color 0 GET (1, 2)-(9, 8), Image LINE (16, 2)-(24, 8), 255, BF 'Draw its compliment--Color 0 CIRCLE (20, 5), 4, 0 ' for solid areas, Color 255 (or 15 in PAINT (20, 5), 0, 0 ' EGA modes) for transparent areas GET (16, 2)-(24, 8), Scr FOR Repeat = 1 TO 9 'Draw a background pattern LINE (0, 20 * Repeat)-(320, 200), Repeat + 20, BF NEXT FOR Repeat = 1 TO 100 'Draw the sprites X = RND * 310 Y = RND * 190 PUT (X, Y), Scr, AND PUT (X, Y), Image, OR NEXT DO: LOOP UNTIL LEN(INKEY$) 'Wait before quitting