
This is for people who want to do it the hard way, or want to understand
how a filmstrip is created by hand.  If you use Tinker 1.5 or later, you
don't need to know this -- but hey, it may be of hisorical interest.

Simple editing: how to change the colours
=========================================

Don't forget to keep a backup copy of your original .flm file,
in case the editing gets into a horrid mess :-)

For this job you need to open the .flm in a hex editor.  Look at the numbers 
in the hexadecimal section of the file; each of these numbers corresponds 
to a colour in the game's palette.  So, from the chart bitmap included 
with this tutorial, check the colours. If the toy (or whatever item you're 
changing) has yellow in it and you want to change that, check in the chart 
which numbers are the yellows.  Now use the hex editor to change all instances 
of those numbers with ones for the colours you want.  So for instance, if you 
had yellow that you wanted to change to blue, in Oddballz you'd be changing 
yellows 32-3B for blues 78-81.

When you've changed all instances of a few colour numbers, save the file and 
open the game to see how your work is looking.  If it's looking horrible or not 
changed enough, close the game and go back to the filmstrip file to try more changes.

Advanced editing: how to edit the Filmstrips properly (not just recolouring)
============================================================================

Each filmstrip, or .flm file, contains a series of bitmaps.  If you're lucky,
these will be all of the same width, but most of the time they vary and you
have to chop the thing up into sections wherever the width changes, so that
you can put bitmap headers onto them and edit them in a paint package.  When
you've done editing you have to put them back into the hex editor to strip off
the bitmap headers and stick the parts back together.  They must go back 
together in the correct order, and each section must stay the same size, or 
you would need to edit the corresponding .flh information-file, because
otherwise the graphics will end up weird and overlapping.

Now this is where a hex editor that lets you view in graphic mode comes in very 
handy; the point is, because the "filmstrips" are all made up of headerless bitmaps 
stuck together it's not easy to see where each bitmap starts and finishes in an 
editor that doesn't have a graphic view.  Axe 2 is a good freeware one, available
at Carolyn's Creations or Daniel Wright's Oddballz Neo and probably elsewhere too. 
So download Axe, open your filmstrip into it, press the blue button marked with a 
"g" and drag the edge of the "Data:" section out until something recognisable starts 
to appear.

Select the whole of the area that contains the recognisable shapes.  Now cut it 
off and save it to a new file in the hex editor; this is the first filmstrip section.  
You'd be best saving it with a name and number that enables you to know which ones 
go where when you put them back together, e.g. gun1, gun2, etc.

Now drag out the remaining filmstrip's edge (note that sometimes you need to 
drag it the other way) until you see another recognisable upside-down shape.  
Chop this off also, and save it to a new file.  Drag the edge of the remaining 
filmstrip's edge again until the image makes sense, select and hop this one off 
also and save to a new file; keep up this drag, see, chop-and-save until you 
get down to the very last section.  Save that also.  Now you should have several 
files, each of which can be opened into a paint program and edited once you've 
given it a suitable header.

The header is the important thing.  I include a bitmap header for Oddballz; it
has the correct palette and you will simply have to copy/paste it to the beginning
of each filmstrip section and then change a few bytes.  Where are the bytes that 
need to be changed?  Look at my included BytesToChangeInBitmapHeader.jpg; that
shows in red the hexadecimal numbers that you will have to check for each of your
new bitmaps.

The first two numbers, directly after BM, are the total size of the bitmap.
Select the whole thing, set your hex editor to show you the size in hexadecimal,
and then enter the numbers in reverse order.  yes, I know, weird, but that's the
way it has to be.  So in my example picture you see 4E63 in red; that means that
when I selected the whole bitmap, my hex editor told me that it was 634E in size.
The next number in red is 44.  This is what Axe shows as the number of rows, in
hexadecimal of course.  Below that you see 185F.  This is the size of the filmstrip
section before you put the header on, and it will have actually been 5F18 bytes big
(remember we have to reverse numbers when entering them).  Finally you see 6601.
This is the length of the file in number of lines, and you get it by a little 
calculation.  Don't panic, it's simple -- open the calculator that came with Windows 
and choose  "Scientific" from its View menu.  Now click on the Hex radio button.  
Now enter  5F18, click on the forward slash, then enter 44 and hit the = sign.  
You should see  166, which is hex 0166, and when it's entered into the hex editor 
in reverse you  see it as 6601.  With a bit of practise, you'll get the idea.

So, you have your set of bitmaps.  Open them into a paint program, edit them 
to your heart's content, and then strip off the headers and stitch them together.
It's easy to strip them; just remove the first 1078 bytes (or hexadecimal 436 bytes).

Then make sure the finished filmstrip has the same name as the original, make sure
you have a copy of your original safe, and then overwrite it with your new one.

Enjoy!

Carolyn

