[comp.sys.amiga.tech] Convering brushes to C code

SLMYQ@USU.BITNET (04/15/88)

In some article (Chuck McManis) writes:
>I don't know how to do it for Assembly language (except for a *real*
>kludgy way) but I have done this with C several times. You can use
>two programs "zapicon" and "Icon2C". The first is part of the IFF
>distribution disk (Fish Disk #64) and will convert a "brush" to an
>"icon" (even if it is more than 2 bitplanes), and then the program
>Icon2C which is available on the Extras Disk I believe and possibly
>a Fish Disk which will take the icon and convert it to C code. The
>C code will have to be edited but you can take out just the Image
>definition, or the Image and Gadget definition or the Image, Gadget,
>and DiskObject definitions. Quite useful and it works with the caveat
>that the brush really should be designed on a screen with the same
>attributes as the destination screen including resolution and palette.

Everyone seems to be missing something.  DeluxePaint brushes are standard
ILBM files!!!  Which means you can use the "ILBMDump" program that comes
with all the IFF junk to convert brushes directly to C code.  It's
much easier, to say the least, and it can create sprite and attached
sprite formats also.

Just a thought...has anyone tried loading a brush as a picture?  Or a picture
as a brush?

                                Bryan Ford (SLMYQ@USU.BITNET)

ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) (04/18/88)

In article <8804150328.AA26808@jade.berkeley.edu> SLMYQ@USU.BITNET writes:
>Everyone seems to be missing something.  DeluxePaint brushes are standard
>ILBM files!!!  Which means you can use the "ILBMDump" program that comes
>with all the IFF junk to convert brushes directly to C code.  It's
>much easier, to say the least, and it can create sprite and attached
>sprite formats also.
>
	Like most programs from EA, ILBMDump doesn't work, either.  It dumps
BOBs just great, but sucks major hose when trying to dump anything else it
claims to support (sprites and attached sprites don't work at all).  Since
the program is written in obfuscated Lattice C, I have not yet bothered to
dive in and find out why the program is broken.  Note that I have not
bothered to recompile the program from the sources; I'm using the
distribution binary.

>Just a thought...has anyone tried loading a brush as a picture?  Or a picture
>as a brush?
>
	I once loaded a picture as a brush in DPaint.  Worked great.

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Leo L. Schwab -- The Guy in The Cape  ihnp4!pacbell -\
 \_ -_		Recumbent Bikes:	      dual ---> !{well,unicom}!ewhac
O----^o	      The Only Way To Fly.	      hplabs / (pronounced "AE-wack")
"Work FOR?  I don't work FOR anybody!  I'm just having fun."  -- The Doctor

farren@gethen.UUCP (Michael J. Farren) (04/20/88)

Until I get around to doing the Super-gi, which will handle damn near
everything, may I recommend the modified gi program, based on my
original code?  It takes a Deluxe Paint brush file and turns out
C code jes' fine, thanks, although it doesn't handle sprite format,
just Image.

The original gi is on a Fish Disk (#18, I think, but am not sure),
but only handles Dpaint I brushes, due to my wrongheaded use of hard-
coded formats for the Dpaint brush files.  The modified one suffers
from the same problem, but at least handles Dpaint II brushes.  Sorry,
I don't know where to find it.

-- 
Michael J. Farren             | "INVESTIGATE your point of view, don't just 
{ucbvax, uunet, hoptoad}!     | dogmatize it!  Reflect on it and re-evaluate
        unisoft!gethen!farren | it.  You may want to change your mind someday."
gethen!farren@lll-winken.llnl.gov ----- Tom Reingold, from alt.flame