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

cmcmanis%pepper@Sun.COM (Chuck McManis) (04/13/88)

In some article (Brett S Bourbin) asks:
> Does anyone have a utility to convert a Deluxe Paint II brush file to
> assembly "DC.W" statements.  I have to include some of my images with
> my code and it is NOT a fun job to convert them by hand!

Then in another article (Stephan P Iannce) asks:
>What about doing the same thing except for transfering them into a C program?

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.

Now for the kludgy part, if you use this to make C code, then you can
have either the Lattice or Manx C compiler compile this into assembly
for you. Then edit the resulting assembly code to extract the parts
of interest. (I know, bletch city, but it works :-))


--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses, but you knew that didn't you.