Path: utzoo!mnetor!uunet!husc6!hao!gatech!mcnc!decvax!decwrl!sun!plx!dlb!dana!rap From: rap@dana.UUCP (Rob Peck) Newsgroups: comp.sys.amiga Subject: Re: Info on Blitter Line Drawing Message-ID: <287@dana.UUCP> Date: 13 Jan 88 17:31:17 GMT References: <2374@cup.portal.com> <3131@cbmvax.UUCP> Organization: Dana Computer, Inc., Sunnyvale, CA Lines: 37 Summary: why didnt I think of that? In article <3131@cbmvax.UUCP>, steveb@cbmvax.UUCP (Steve Beats) writes: > In article <2374@cup.portal.com> Chad_The-Walrus_Netzer@cup.portal.com writes: > > > >want to know if the blitter (in line drawing mode) can somehow be made > >to draw a line in a bitmap, without actually affecting that bitmap (I > >just want to read the BZERO bit in DMACONR, to check if the line would > >draw into an area that has already been writen to). > > Yeah, no problem. Instead of using USEA|USEC|USED in bltcon0 leave off the > USED term. Set everything else up to draw a line as normal, your minterms > > Steve If indeed the collision detection routines in the DoCollision dont handle inter-object collisions "completely correctly" as indicated in the autodocs (and as people have evidently found out the hard way), it seems that interobject collisions can be detected using the blitter by disabling the USE-D flag as Steve has noted. Most likely though that one would have to go through the QBlit functions in order to get temporary custody of the blitter as well as access to the critical BZERO flag immediately following the blit. Also, since in a Bob or VSprite, the system will create a mask for you (all of the planes, OR'd together for masking the object - as 1 wherever there was a 1 in the object and zeros [transparent] elsewhere) this mask can be used - one plane at a time - against the other thing you want to test for collision bits. Or better still, to minimize the total number of user-blitter passes, how about this: for objects that are "suspected to be colliding", do a single plane blit of the first object's mask into an empty rectangular work area, then using the method Steve Beats mentioned, blit the second object into the work area and check for BZERO. Sounds like one plane, two blits to test each suspected collision. Plane size = (object1.width + object2.width) by (ob1.ht + ob2.ht) Food for thought for advanced version of GelTools, sometime in the next few months unless someone else Beats (grin) me to it. Rob Peck ...ihnp4!hplabs!dana!rap