Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!watcgl!fdfishman From: fdfishman@watcgl.UUCP Newsgroups: comp.sys.amiga Subject: Re: Rapid Stimulus Displaying on the Amiga Help. Solution Message-ID: <916@watcgl.UUCP> Date: Mon, 20-Apr-87 18:20:32 EST Article-I.D.: watcgl.916 Posted: Mon Apr 20 18:20:32 1987 Date-Received: Tue, 21-Apr-87 00:14:19 EST References: <8704200221.AA03819@cory.Berkeley.EDU> Reply-To: fdfishman@watcgl.UUCP (Flynn D. Fishman) Organization: U. of Waterloo, Ontario Lines: 47 In article <8704200221.AA03819@cory.Berkeley.EDU> dillon@CORY.BERKELEY.EDU (Matt Dillon) writes: > > Use a two plane screen, then render bitmap A into plane 1, and > bitmap B into plane 2 . The idea is that then all you need to > do to switch bitmaps is set the color registers: > > plane: 2 1 color register > 0 0 0 always background color > 0 1 1 depends > 1 0 2 depends > 1 1 3 doesn't matter ^^^^^^^ ^^^^^ colour 3 does matter, since it represents the intersection of the two stimulus, if you set this colour to 0 then, where ever the two stimulus intersect you will see a missing hole. As well if you set 3 to white when you draw the stimulus, you see a white area before you want to display the object. So want to know the simple solution? When you display a plane make sure you also enable colour 3. This method of drawing into two planes is a very good one, but why stop at two planes, you have 5 to play with, therefore you can display 5 stimulus, all you have to do when writing the stimulus is enable the write mask so that only the desired plane is written to (i.e. RastPort.Mask = 1 << plane). Then to display each plane you can use a simple routines like: DisplayPlane(view, plane) struct ViewPort *view; int plane; { int loop; for (loop = 0; loop < 2^NUMPLANES; loop++) { if ( (loop & (1< > -Matt > -- FDFISHMAN (Flynn D. Fishman) @ WATCGL (but you can call me Flynn) UUCP : ...!{decvax|ihnp4|clyde|allegra|utzoo}!watmath!watcgl!fdfishman ARPA : fdfishman%watcgl%waterloo.csnet@csnet-relay.arpa2 CSNET : fdfishman%watcgl@waterloo.csnet