This is a concept build of a Sprite file viewer/editor, for CTP/CTP2 Sprites.
   
   Please feel free to distribute this program under the conditions
   stated below. The newest version can be found at:
   http://mbv.dk/tileedit

The legal stuff: (oh how I hate this but it's got to be there)

   Distribution:
   This program may NOT under any circumstances be distributed
   on any read-only media, or as part of any software package,
   including modifications to games without explicit written
   permission from the programmer.
   
   Usage:
   This program is the property of the programmer, 
   Martin B. Vestergaard. You may use it only to view and extract
   graphics from Sprite-files for the Call to Power games. You 
   may not make any charge for any material generated/extracted 
   by this program.

   Warranty:
   This program is provided "as is" , without warranty of any
   kind, either expressed or implied. The use of the program
   is your own responsibility, and the programmer will NOT
   accept any claims what so ever.
   
   -- The programmer is not in any way connected to Activision. --
   -- THIS PROGRAM IS NOT MADE OR SUPPORTED BY ACTIVISION. --

So what can it do?
For now it can view and play sprite files, and Save the frames as images.
The plan is to expand it to a full GUI Sprite Editor, capable of generating and modifying SpriteFiles (including handling the scripts known from the CTPSpritetool)

Implemented Features:
 
 - Display SpriteFiles
   Most view options have now been implemented. SpriteEdit can now 
   open and display the frames and animation information for all 
   version 1.3 and 2.0 sprites.
 
 - Save Sprite Images
   Sprite Edit can now save the following:
   - Combined Image: This saves all the graphical data of a given
                     frame to a 32 bit tga image. The pixel data is 
                     saved as RGB-color values, the transparency mask
                     is saved to the alpha channel. And the shadow is 
                     saved as the shadow color selected on the shadow
                     menu.
   - Masked Image:   Same as Combined Image except the shadow is not
                     saved.
   - Pixels:         This will save the pixel data to a 32 bit RGB
                     tga image, with no shadow or Mask.
   - Mask:           Saves the Mask to both the alpha channel and as
                     gray values to a 32 bit RGB tga image.
   - Shadow:         Save the shadow as a 2 color image, it is 
                     actually saved as a 32 bit RGB tga image.

 - Play Animations
   The animation sequences can be played, for now only as looped
   animations. The Sprite Files can contain both sequential, 
   back-n-forth, and looped.

 - Edit all non-graphical elements in the SpriteFile.
 
 - Save the SpriteFile 
   For backward compability with Civ:CTP the saved sprite will be 
   version 1.3.
 
A note on background images: If anyone feels like creating more images, just make all images the same size (any size will do) and save them to one wide .bmp-file, but put a blank frame to the left. On the options menu you can tell SpriteEdit what size each frame has and then load the image. If the image is less than the size of the sprite it is tiled, to fill the whole background.



How you can help:

To get an idea of what functions I have planned to include look at the disabled buttons, and their associated hints.

Drop me a note if you have any suggestions for functions for the finished program.

If you wish to help, please contact me, for an update on current progress and specific tasks.

Martin B. Vestergaard (aka. Martin the Dane) mtd@mbv.dk

Known bugs
- Non right now

To do list:
- Implement Editor capabilities.
- Make a PSP-safe ekport option.

Changes from Build 11 to 12
- Modified the tga-import to eliminate "pure-black". Now if the tga contains 
  pure black pixels those pixels will be converted to the darkest gray.
- Added 4 short-cut keys:
  In the Main window:
    <CTRL> + <SHIFT> + E = Edit currently selected sprite-frame
    <CTRL> + <SHIFT> + I = Insert a sprite-frame befor the currently selected sprite-frame
    <CTRL> + <SHIFT> + A = Add a sprite-frame to the current animation.
  In the Edit sprite-frame window:
    <ALT> + L = Open the load tga dialog. 

Changes from Build 10 to 11
- Edit Sprite Frame now edits the selected heading not just North.

Changes from Build 9 to 10
- Implemented Add, Remove, Insert, and Edit Sprite Frame.
  This is verry much beta, so please report any odd behaviour.
  Note that it is not possible create sprites from scratch.

Changes from Build 8 to 9
- Fixed export images directories, so the images are now exported to the correct directories.
- Only relevant color options are now available on the export dialog.
- Changed a checkbox caption from cbDiversColors to "Use Divers Colors"

Changes from Build 7 to 8
- Fixed emty frame save error (Saving sprites with frames with only 
  background would generate invalid sprites)
- Fixed error on no background image
- Fixed reset ini-file so that it does reset the whole ini-file
  not just parts of it. (was added in build 7)
- Fixed a typo or two in this file ;)

Changes from Build 6 to 7
- Added edit capability for all non-graphical elements of the 
  SpriteFile.
- Added save SpriteFile. For compatability reasoons the sprites are
  saved in version 1.3, so they are compatible with both Civ:CTP and 
  CTP2.
- Made a lot of minor changes to the ini-file structure, so now default
  values for options are not saved in the ini-file.
- Images can now be saved as Windows-Bitmaps as well as tga.
- The save dialog now adds the selected extention if the file name does
  not include an extention.
- Fixed a lot of minor things in loading and manipulating SpriteFiles.
- Added register .spr-extention with SpriteEdit option. If you do 
  double-clicking a .spr-file will open it in SpriteEdit.

Changes from Build 5 to 6 (minor version changed from 1 to 2)
- Implemented all the save image options, (I hope) so now you can save
  as Combined Image, Masked Image, Pixels, Mask, and Shadow.
- Added Export images options. You can now save all frames in the
  sprite file in three different modes:
  - One file   : All elements of the frame is saved to the same image.
  - Two Files  : Each frame is saved as Masked Image and Shadow.
  - Three Files: Each frame is saved as Pixel, Mask, and Shadow Images.
- Fixed the shadow color bug.
- Added displaying of a number of properties: (Not fully implemented)
  - Centerpoints, for each headding
  - Deltas or nudges for each Animation frame
  - Transparency (fade) values for each Animation Frame
  - SpriteNumFrames, number of frames pressent in the animation block
  - SpriteFirestFrame, first frame in animation block only used in the
                       scripts from Activision, has no impact on the 
                       spritefile.
  - AnimType, sequential, loop, or back-n-forth.
  - AnimNumFrames, number of animation frames.
  - AnimPlayBackTime, length of animation in milliseconds, not 
                      implemented acording to Activision.
  - AnimDelay, number of times to play last frame in animation befor 
               restarting animation.
- Relative Paths now work in the interface (note: This is only visual).

Changes from Build 4 to 5
- Added Background image option (Thanks Immortal Wombat for the image)
  It is now possible to display an image as the background.
  You can make your own background image-stripe, first image in stripe
  should be blank. Color of upper left pixel is transparent color and 
  any pixel in the image with this color will be replaced by the current
  background color.
- Added save as 32 bit tga with alpha. Both with and without the shadow.
- Added save alpha Mask to 32 bit tga.

Changes from Build 3 to 4
Seems like I managed to break as much as I fixed between build 2 and 3,
so let's hope I've managed to fix them all.
- The animations now plays again
- Fixed the crashes on load, now you should get an intelligible error
  message.
- Added inverse-shadows, so the shadow color is the inverse of the 
  background.
- Added display of separate and combined Pixel, Mask, and Shadow.
- Sprites can now be loaded from the list by key-board both in single
  and double-click mode. ([space-bar] and [enter])
- Saved BG and SH colors (ini-file) are now reflected on menus.

Changes from Build 2 to 3
- Fixed the large-sprites does not load bug.
- Fixed shadow colors bug in play.
- Added a couple of protections that hopefully fixed bug where one 
    crash causes subsequent load attempt to fail.

Changes from Build 1 to 2
- Removed flicker
- Partially fixed load bug for sprite 'GG023.spr'
    This turned out to be a version 2.1 good sprite. I's a slightly
    different format than the 1.3 good sprite. Still need to do the
    anim-sequence load.
- Found and fixed a memory-leak.
- Added Options, menu, and a number of different Directory options.
- Added quick-loading of sprites in the sprite-list. So now the selected
  sprite will be loaded without double-clicking. (Option)
- fixed a number of minor bugs, i.e.. the headings bug.
