Dec 072017
 
Outputs C source for accessing Amiga IFF graphics files from your progra.
File IFF2TEMP.ZIP from The Programmer’s Corner in
Category C Source Code
Outputs C source for accessing Amiga IFF graphics files from your progra.
File Name File Size Zip Size Zip Type
IFF2 12468 6642 deflated
IFF2.DOC 5634 2385 deflated

Download File IFF2TEMP.ZIP Here

Contents of the IFF2.DOC file



IFF2 -- An IFF/ILBM C Source Code Generator


INTRODUCTION

Iff2 is a public-domain programmer's tool that takes IFF pictures
(produced by such packages as DeluxePaint) and produces the C source code
needed to use the picture in your own programs. Iff2 can also produce
the filled in data structures needed by your image.


FEATURES

-- can produce UWORD arrays, Bobs, VSprites, Gadgets, Images,
BitMaps, or sprite-format data
-- optionally produces a color table
-- works with DeluxePaint I && II
-- works with pictures OR brushes.
-- uses PlanePick where possible to conserve disk space and memory
-- can put header (suitable for copyright notices, etc.) in
output file
-- smaller, faster, and more powerful than other equivalent programs


USAGE

iff2 [options] [ ... ]


OPTION SUMMARY

-aAppend to the output file. Default action is to make a new
file, erasing any previous contents. This automatically
invokes -h.
-bProduce a Bob. Also declares a VSprite structure.
-gProduce a boolean gadget, using the as the gadget's
image.
-hDo NOT prepend the standard header file INCLUDE:iff2hdr.
-iProduce an Intuition Image structure.
-mProduce a BitMap.
-nxxxxUse 'xxxx' as the base name for data objects.
-oxxxx Use 'xxxx' as the output filename.
-pProduce sprite-format data, suitable for use with the
SimpleSprite system.
-tProduce a table of colors used with this image, in format
suitable for use with LoadRGB4().
-vProduce a VSprite.
-VWrite verification messages to the screen.
-@x,yUse 'x' as the LeftEdge and 'y' as the 'TopEdge' of the
data object.


PRODUCING THE OUTPUT FILE

Iff2 by default produces a file name .c, where
is the name of the ILBM that you want converted. For example, if you
type "iff2 foo", then iff2 will create the file "foo.c" as its output.
Use the -o option to direct output to another file, or the -a option
to preserve the contents of the output file.

Iff2 will look for a file "INCLUDE:iff2hdr" to be used as a header
for the output file. This file (if found) will be copied to the output
file before any of the data is written.

Iff2 will then write out any #include statements which may be needed
to compile-- for instance, if you are creating an Intuition Image, iff2
will write an "#include " statement to the output
file.

If you used the -t option, then iff2 will next produce an array of
colors used by this ILBM called 'color_table'.

Next, iff2 will write out the raw bit data, as an array of UWORDs
called _data. This data is in format suitable for use in
BitMaps, unless the -p option is used, in which case sprite format data
is produced.

If you chose option b, g, i, m, or v, then iff2 will write out the
appropriate structure declarations for you-- _bob,
_gadget, _image, _bitmap, or
_vsprite.


USING THE OUTPUT FILE

Compile the output file normally, and then link it with your main
program. In your program files, you must include an external declaration
for your data object (and color table if you used the -t option). For
example, if you have a picture file "uparrow" and you want to make it
into a gadget, type

iff2 -gt uparrow

to produce file uparrow.c (which will include the color table). Then you
need to include the following statements in your main program:

extern struct Gadgetuparrow_gadget;
extern UWORDcolor_table[];


THE HEADER FILE

The header file INCLUDE:iff2hdr is copied to the output file
verbatim, except for the following symbols:

@Nthis is replaced by the output file name
@Dthis is replaced by the current date


ADDITIONAL NOTES ON DATA STRUCTURES PRODUCED

Most of the Amiga data structures produced by iff2 have a .Flags
field; iff2 always writes the same information (detailed below) into
this field. You can edit the output file yourself if your needs are
different from the default output produced.

BitMaps
-------
The .Flags and .pad fields are always set to 0. The width of the
image in bits is provided in the UWORD variable '_width'; for
example, the command "iff2 -m foo" produces "foo_bitmap" and "foo_width".

Bobs
----
Since each Bob requires an attached VSprite structure, iff2 creates
_vsprite for you as well as _bob, and takes care
of linking them together. The bob and vsprite have no flags set.

Gadgets
-------
Iff2 assumes that the gadget is GADGIMAGE boolean gadget. Highlighting
is set to GADGHCOMP, and the RELVERIFY activation flag is set. The
.GadgetID is always 0.

SimpleSprite-format data
------------------------
Iff2 includes the pairs of 0 words needed before and after the actual
data for the SimpleSprite system to work. The height of the sprite
is available as _height. The image file can be no wider than
16 bits, and only the first two bitplanes (0 and 1) are used for the
image.

VSprites
--------
The only flag set is the VSPRITE flag. The image file can be no wider
than 16 bits, and only the first two bitplanes (0 and 1) are used for the
image.


SOURCE CODE AVAILABILITY

Source code for IFF2 (Lattice C V4.0) is available for $10. Send
any suggestions, comments, criticisms, or donations to:

David Townsend
12111 Galena Rd.
Rockville, MD 20852


 December 7, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)