Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!cornell!batcomputer!pyramid!hplabs!well!ewhac From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Newsgroups: comp.sys.amiga Subject: Re: PopCLI Fade Message-ID: <4211@well.UUCP> Date: Wed, 14-Oct-87 02:19:15 EDT Article-I.D.: well.4211 Posted: Wed Oct 14 02:19:15 1987 Date-Received: Thu, 15-Oct-87 23:37:05 EDT References: <1852@gryphon.CTS.COM> <106@rpicsb8> Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Organization: Nothing to do with Williams Electronics. Lines: 57 Keywords: Popcli fade Summary: Get a life. In article <106@rpicsb8> guilford@csv.rpi.edu (Jim Guilford) writes: >In article <1852@gryphon.CTS.COM> bilbo@pnet02.CTS.COM (Bill Daggett) writes: >>I've been using PopCLI for some time and am curious to know if it would be >>possible for the screen to fade rather then pop? [ ... ] > >In order to do a fade, one would have to create a set of screens >(one for each screen being displayed), copy the currently displayed image >onto the new screen, and then fade it. Then to unfade it, it would have to >copy the new version of the other screens (remember that output continues >while faded) to the top screen, quickly unfade it, and then remove the new >screens. All in all, it would be very messy. >One might try playing with the color registers directly, but then if the >user's programs diddled with them during a fade you would have a mess. >Due to the versatility of the amiga, I don't think it is easily possible. > I read this, and my jaw sort of sagged. Rather than make a humorous personality-related comment that would instantly get misinterpreted, I'll restrict myself to a practical solution. First off, find the topmost screen. This can be discovered by: scr = IntuitionBase -> FirstScreen; Next, locate the screen's ViewPort structure: vp = &scr -> ViewPort; Once you have a pointer to the ViewPort, you can do all kinds of neat things: extern long GetRGB4(); for (i=0; i<16; i++) for (idx = 1 << ViewPort -> RasInfo -> BitMap; idx; idx--) { color = GetRGB4 (vp, (long) idx); r = (color & 0xf00) >> 8; g = (color & 0x0f0) >> 4; b = color & 0x00f; if (r) r--; if (g) g--; if (b) b--; SetRGB4 (vp, (long) idx, (long) r, (long) g, (long) b); } This won't be a very pretty fade, but it'll fade. And it wasn't all that hard, either. However, this code fragment does not address the problem of what happens if a program is playing with the ViewPort's colors, too. However, there are a multitude of ways around this, none of which are all *that* messy. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Leo L. Schwab -- The Guy in The Cape ihnp4!ptsfa -\ \_ -_ Recumbent Bikes: dual ---> !{well,unicom}!ewhac O----^o The Only Way To Fly. hplabs / (pronounced "AE-wack") "Although there are technical differences between the quality of images created on the Amiga and on our system, we feel that viewers could be misled to believe otherwise, even with your disclaimers to the contrary." -- Ralph J. Guggenheim, Pixar