Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-spam!ames!ucbcad!ucbvax!CORY.BERKELEY.EDU!dillon From: dillon@CORY.BERKELEY.EDU (Matt Dillon) Newsgroups: comp.sys.amiga Subject: Re: Blitter Message-ID: <8612040134.AA15904@cory.Berkeley.EDU> Date: Wed, 3-Dec-86 20:34:49 EST Article-I.D.: cory.8612040134.AA15904 Posted: Wed Dec 3 20:34:49 1986 Date-Received: Thu, 4-Dec-86 00:15:44 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: University of California at Berkeley Lines: 31 Well, you have to define what you mean by 'not change either image'. Firstly, if you assume that color 0 is transparent, then you want to blit only the parts of the source bitmap that have color > 0 (that is, a one bit on any of the bit planes for that pixel). For those pixels which do have color > 0, you want to overwrite ALL 4 planes for that pixel. If done Generically, this would take more than one blitter pass since the blitter has only three sources and one destination. -OR all four planes in the source together and place in a temporary bitmap resulting in a template. (This will take two blitter passes) -Do another FOUR blitter passes. Each pass uses plane X of the source, the template, and plane X of the destination. For Each pass, write the source (0 or 1) to the destination IFF the template is a 1. ---------------- If you are using source shapes which don't change, then the first part (generating the template) can be replaced by static data. If you don't want to set up the blit manually, a new 1.2 graphics call will blit from a source bitmap to a destination rastport through a template: BltMaskBitMapRastPort(srcbm, srcx, srcy, destrp, destx, desty, sizex, sizey, minterm, blitmask) (bltmask is a pointer to a SINGLE bit-plane mask, which must be the same size and dimensions as the planes of the source bitmap). -Matt