[comp.sys.amiga.tech] Blitting with an ImageShadow - Possible in one-pass??

djh@neuromancer.metaphor.com (Dallas J. Hodgson) (10/09/90)

OK, blitter-type gurus: What started out being a simple idea has turned out
to be not-so simple. I've been writing a replacement for the Bob portion of
DrawGList(), after profiling my code and seeing that's where most of my
time is wasted. A "kinder, gentler" DrawGList...

Actual implementation of rendering Bobs into a background w/transparency
is tricky, because it seems one needs one more blitter source DMA channel
than available to handle the process, like so:

SRCA = DMA off, BPLADAT = 0xFFFF, BLTAWFM/BLTALFM set accordingly (masks)
SRCB = ImageShadow
SRCC = ImageData
SRCD = Destination (Background source)
DEST = Destination

and then performing a "cookie cut" operation that would pass thru the
ImageData wherever the ImageShadow is set to 1 and the first/last word
mask bits are set. Everywhere else, the background shows thru. The SRCA
word masks are necessary to mask off the garbage bits that occur at
the beginning/end of each image line whenever barrel shifting is performed.

Of course, my first idea was to use SRCA as a pointer to the ImageShadow,
shift it along with the ImageData as necessary and combine this with the
first word/last word masks. This ain't possible however, since the @#$!
masks perform their masking BEFORE the data gets shifted, thereby cropping
the image.

So, can this operation be done in ONE PASS or must it require two? If the
ImageShadow wasn't a concern this would be easy. Thanx!

+----------------------------------------------------------------------------+
| Dallas J. Hodgson               |     "This here's the wattle,             |
| Metaphor Computer Systems       |      It's the emblem of our land.        |
| Mountain View, Ca.              |      You can put it in a bottle,         |
| USENET : djh@metaphor.com       |      You can hold it in your hand."      |
+============================================================================+
| "The views I express are my own, and not necessarily those of my employer" |
+----------------------------------------------------------------------------+