C3FLIC Readme

Contents

1. Legal Stuff
2. Using C3FLIC
2.1 Altering existing flc's
2.2 Decoding existing flc's
2.3 Encoding new flc's
3. Other Technical Notes

1. Legal Stuff

LICENSE AGREEMENT
=================

IMPORTANT - READ CAREFULLY
This license and disclaimer statement constitutes a legal agreement
("License Agreement") between you (either as an individual or a single entity)
and Kristofor Wiklund (the "Author"), for this software product ("Software"),
including any software, media, and accompanying on-line or printed
documentation.

BY DOWNLOADING, INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE, YOU 
AGREE TO BE BOUND BY ALL OF THE TERMS AND CONDITIONS OF THIS LICENSE AND 
DISCLAIMER AGREEMENT.

This software is freeware. You can use this software royalty-free for private
and commercial purposes.

You can freely distribute copies of the main archive as long as no alterations
are made to the contents and no charge is raised except a reasonable fee for
distributing costs.

This software is provided "as is" and without any warranties expressed or
implied, including, but not limited to, implied warranties of fitness for
a particular purpose.

In no event shall the author be liable for any damages whatsoever (including,
without limitation, damages for loss of business profits, business interruption,
loss of business information, or other pecuniary loss) arising out of the use
of or inability to use this software or documentation, even if the author has
been advised of the possibility of such damages.


2. Using C3FLIC

	C3FLIC is for encoding unit FLIC animations used on the main map of Civ III.  The program has three functions: Altering existing an existing unit's flc rendering parameters, Decoding the images from existing unit's flc into bitmaps, and finally encoding a new unit flc from a series of bitmaps.  The application has a different tab for each of these functions.

2.1 Altering existing flc's

	All unit flc's have four parameters defining how they are to be rendered: X Offset, Y Offset, frame speed, and number of frames per facing.  The number of frames is set when creating an flc, but can't be changed later.  To change the X Offset, Y Offset or frame speed, select the Alter tab.  At the top of the page there should be a text box with the words 'No File' and a small button next to it.  Click the small button to bring up the open file dialog.  Select a unit flc and click OK.
	The file's name should appear in the text box, and the current value of its parameter should be given below.  Change the parameters to the new values you want and click  the Apply button.  Click the Close button to close the file.  For information on the flc parameters see section 3.

2.2 Decoding existing flc's

	To decode a unit flc, select the Decode tab.  Like the Alter tab, this page has a text box with a small button beside it at the top.  Click the small button to bring up the open file dialog.  Select a unit flc and click OK.
	The file's name will appear in the text box, and the number of frames per facing should be given below.  Click the Decode button to decode the images.  The images will be saved to the same folder as the original flc.  The image files will be named flcname_A00.bmp , flcname_A01.bmp .. flcname_H00.bmp etc.  Images with the letter A face southwest.  Successive letters turn counter clock-wise.

2.3 Encoding new flc's

	Encoding a new flc requires a series of bitmaps named newfile_A00.bmp, newfile_A01.bmp ... newfile_H00.bmp etc.  Just like the file output by the Decoding function.  These bitmaps must be in the same folder where you are creating the new flc.
	The encoding function is accessed through the Encode tab.  Like the previous two tabs this page has a text box and a small button at the top.  The new file's name and path can be typed into the text box, or the small button can be clicked to bring up a save file dialog.  Below type in the number of frames per facing, X offset, Y offset and frame speed for the new flc.  Once ready click the Encode button.  If successful you should get the message 'FLC encoded.'

3. Other Technical notes

  +When encoding new flc's, all the bitmaps must be the same size and (for now)have to have the exact same palette.

  +The last 32 colours (or perhaps the first depending on your perspective) in the palette appear to be reserved.  31 of these are for the shadows.  The last colour in the palette is the transparency colour.

  +The X and Y offsets define where to start drawing the image on the main map.  To get the offset in the right ball pack, find the offset within the unit's image of the pixel that you want to be in the center of the square.  Subtract the value of these offsets from 120.  You will probably end up having to adjust the offsets a few times to get it perfect.

  +I don't know the units for the frame speed.  But the values used seem to generally range between 1000 and 2000.	

  +If you find bugs (and I know you will) send a report to kwiklund@gmx.net	