FLI Master by S.Goodwin Copyright 1996 Abstract This program plays FLI animations files, as created on AutoDesk Animator (R) and AutoDesk 3D Studio (R), on any Amiga with 1Mb+ of RAM. It allows animations to be loaded into memory, or played directly from disk, depending on size. Because of the differences between PC and Amiga graphics there are varying options to produce the most effective conversions. FLI Master also saves individual frames as IFF images, or as an Anim 5 animation. Note: FLI Master uses the 'MakeAnim' tool to compile the animations. Written, I believe, by Michael W. Hartman. -- Copyright Notice -- This software, and all its associated documents, is copyright 1996 by Steven Goodwin. The version provided here may be freely distributed as long as no files are edited or deleted, and the copyright notice contained herein is not modified. No warranties, implied or otherwise, are given and this software is used at the users own risk, and no liability can be accepted for any damaged caused, either directly or indirectly, from this software. -- Usage -- FLI Master consists of a main screen with a GUI front end, which features all the operational controls. Behind this screen is the current frame of the FLI in memory. This screen can be seen by dragging the screens title bar down. The GUI screen, features four distinct areas. They are: Playback Options Top left Animation Save Options Top right General Information Bottom left Palette Options Bottom right Now for each of these in order, - Playback Options - Double Buffered Screen - This, as you may know, stops the image being visible while it is being updated. For images where only a small part of the display changes each frame, this is best kept off. Use Ring Frame - For most animations, this option is best kept on. It uses a special 'ring frame' to re-start the animation from the start quickly and minimal fuss. However, some anims use complex palette changes, and the FLI will appear a little pyschedelic. Frame - To change the frame, enter a new number into the box, and press return. You *must* press return! Play Fli - Plays the entire FLI, from the current frame, to the end, and then loops back to the start again. Once this button has been pressed, the GUI screen will disappear, allowing to concentrate (and admire) the animation. The speed is measured in frames per second, as given in the text requester. Next Frame - Moves onto the next frame. - Animation Save Options - Name - This text requester holds the filename under which the frames will be saved. The button of the left opens a file requester, and the selected filename is then added to the text requester. In fact, this filename is actually a 'base name'. That means the frame number is appended to the 'base name' to build a complete filename. For example, Base name = dh0:anims/bball The first 4 frames of the FLI would be saved with the names: dh0:anims/bball0001 dh0:anims/bball0002 dh0:anims/bball0003 dh0:anims/bball0004 Save FLI as Iffs - This button will save each frame to disc (using the base name, as mentioned above). It will also save them in the pattern you specify with the other gadgets. They are, From xxx To xxx Using - Which frames will be saved Every other xxx - If xxx=1, it saves every frame. If xxx=2, it saves every other frame (1,3,5) If xxx=3, it saves frames 1,4,7 etc... Number Consecutively - Create a filename that runs consecutively, regardless of the frame number of the anim. Padding Zeros - The number of digits in the filename. A padding of 4 will turn 23 into 0023, for example. Once this command has completed, you will be given the option of joining all the saved files into an animation. This option calls 'MakeAnim' and must be in the 'c:' directory on your system. - General Information - This lists out each frame, its size, and compression techniques. At the bottom of this scrolling list are the statistical totals of each compression type used. This is normally used for interests sake, but for those who are interested in the FLI format, or testing their own decode routines, it can be very useful indeed. To the lay user, it provides a useful way of seeing how often the palette changes. Save List - This saves the list as a plain ASCII text document to a file (specified by you). It allows to inspect the contents more closely. Print List - This prints the list to a connect printer, in plain ASCII format. - Palette Options - Decode FLI colours - This allows the program to have a 'guess' at the colours to use. The word 'guess' is used because it must make the 256 colours of a FLI, and work out which 32 to use, before you release the FLI has stopped. Use Static Palette - Uses the same set of colours for all the FLI frames. FLI Master will map the colour the FLI *wants* to use, into the closest one available in the palette. The static palette can be: From: A filename is specified of an IFF file. The image in the file is unimportant, as FLI Master takes the file, finds the palette, and then clears it from memory. Default: A set of reds, blues and greens covering most of the colours. This means that a FLI will generally find some colours near to the one it wants. Gray Scaled: Like default, except this uses a pre-defined set of grays. This often works better, because the eye is very forgiving with black and white (as it only recognises 256 variations - apparently). -- Hints -- 1) If you can get a 32 colour LBM/IFF of the animations first frame this will help tremendously with problem palettes. 2) If not, save the first frame as an IFF and tidy the palette up in Dpaint/Ppaint (etc) to adjust any jarring colours, and then use this new IFF to map colours. Note: If the palette changes several times during the animation, it might be an idea to search the description list (bottom left) for the frame numbers of any other palette changes. 3) To impress friends with the animations, it's best to re-save them as IFF - Anim 5 format, or only play FLIs with a small amount of movement. 4) Use a static default palette to get an idea of the colours the FLI wants to use. 5) Don't show off to PC users, as even a 286 can run FLIs faster than 68020 Amiga :-( -- Background Information -- Depending on what you know about FLIs, you may have one of the following two questions: 1) Why is it so slow??? 2) Why is it so fast??? To take them in order: 1) Why is it so slow??? FLI master is slow because of the amount of work it has to do, in order for an image to appear on screen. FLIs are stored in a 'chunky' graphics format. That means that each byte holds the colour of a single pixel on screen. It therefore takes one memory write access to produce one dot. The Amiga's screen layout, on the other hand, is 'planar'. This means that there are four (or more) screens (known as bit planes), each holding part of the picture. For a 32 colour image there are five of these bit planes, each plane controlling part of the colour. Not only does each dot require five memory writes, it also needs some controlling logic to work out *which* of the five pixel bits requires a '1' and which require a '0'. Also, because a 'chunky' screen has a one pixel-per-byte format, moving to the 7th column is easy: you add 7. With a planar system you must move on 7 *bits*. Which may, or may not, overlap into the next byte. All these calculations must be done in full for the screen to appear correctly. It is not possible to omit stages. There is also additional time spent trying to calculate the palette for the FLI. As 256 colours are present in the FLI, but only 32 are available on the Amiga's display. 2) Why is it so fast??? FLI master is fast because of the amount of work I have done, in making the assembler as short and 'dirty' as possible! Although not perfectly tuned, the assembler was optimised by using all 16 registers (bar the stack pointer) to hold FLI information for the duration of the decode routine, without using data in memory. In addition, the purpose of each register was only changed when necessary. Unfortunately, this makes for slightly scrappy coding methods, but like most good (!?) programmers, these routines are commented and placed into macros to isolate them from the main program. Function calls feature an overhead, so macros were used instead. -- The Final Word -- This program is shareware, you can use it for 30 years (yes, years!) before paying for it. If, however, you want the source (both the Amos and assembler parts) then send me £5, and I'll return you a disc with all the source, the latest version of FLI Master, and any other utilities I've written that haven't been released yet. Now, Q. Where do I send my money? A. Steven Goodwin 105 St. Johns Road Clacton-on-Sea Essex CO16 8DB Q. What do I say? A. Try printing this off.... (or copying the relevant bits if you're without a printer) o/_________________________ CUT HERE ________________________________ O\ Your Name:_______________ Address :_______________ _______________ _______________ _______________ Hi Mr. Steven Goodwin, I would like to register my copy of FLI Master because a) I have been using it for the shareware limit of 30 years! b) I feel sorry for you, not having had any mail for days! c) I don't believe your assembler will confuse me! d) I'm interested in the FLI format and would like to see the special AMOS version of the decode routines. e) I have a tremendous guilt complex! f) All of the above (circle as appropriate) I enclose a cheque/postal order for £5 (which includes P&P) because I'm a kind hearted soul whos cares about the people who make my software. Thanks very much, Name ________________ (not completely necessary, but ties up the letter nicely) o/_________________________ CUT HERE ________________________________ O\ That's all folks!!!! See you on the next release...