🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #40344

Re: "DissBits"?

#40344
From: David Phillip Oster
Date: Wed, 05 Apr 1989 05:31
33 lines
2598 bytes
In article <1223@microsoft.UUCP> stuartb@microsoft.UUCP (Stuart Burden) writes:
>I think Mike Morton is the author of DissBits (if I recall I've seen
>him talk about it in this forum).  I have a copy of a version of DissBits
>around here somewhere, but it is a few years old now.  If there is a more
>recent version, let me be one of the first "me to's".  What I would really
>like to see, is some C source to disolve PixMaps.  Perhaps some generous
>soul will post the most recent version of DissBits, or some disolving
>PixMap code.

Even more fun: if the pixmap is on a device that supports color lookup
tables, you can use SetEntries to repeatedly decrease the values in all
the color entries, and do a fade to black that is dead smooth. Chris
Derossi's INIT Dimmer probably uses this technique.  Then, while the
screen is black, you CopyBits in a new pixmap, and slowly restore the
color table to be equal to a second color table. In this way you can do a
smooth fade through black (or uniform gray) to another image.  Even
fancier things are possible.  Be sure to have a backup technique for the
program to use when it is running on a black&white only display, or on one
that doesn't support modifying the CLUTs (such as the 24-bit per pixel
displays that are beginning to appear.)

Note: some of these 24-bit per pixel displays have so much video memory
that Color Quickdraw has to throw the system into 32-bit addressing mode
to get at them. thePort->portBits.baseAddr will lie to you if you try to 
use it to get at screen memory directly, so watch it!

My "Stars" uses a similar technique to Mike Morton's, but I wrote my own
code for it (with algorithm suggestions from Matt Grayson). My version is
even faster than Mike's.

--- David Phillip Oster            --"When we replace the mouse with a pen,
Arpa: oster@dewey.soe.berkeley.edu --3 button mouse fans will need saxophone
Uucp: {uwvax,decvax}!ucbvax!oster%dewey.soe.berkeley.edu --lessons." - Gasee
Technical Details
Message-ID: <28686@ucbvax.BERKELEY.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!dewey.soe.berkeley.edu!oster
References: <1536@husc6.harvard.edu> <1223@microsoft.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!dewey.soe.berkeley.edu!oster
From: oster@dewey.soe.berkeley.edu (David Phillip Oster)
Newsgroups: comp.sys.mac,comp.sys.mac.programmer
Subject: Re: "DissBits"?
Keywords: Mike Morton where are you? :-)
Message-ID: <28686@ucbvax.BERKELEY.EDU>
Date: 5 Apr 89 05:31:45 GMT
References: <1536@husc6.harvard.edu> <1223@microsoft.UUCP>
Sender: usenet@ucbvax.BERKELEY.EDU
Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster)
Distribution: usa
Organization: School of Education, UC-Berkeley
Lines: 33