MSF File Format
The MSF (Mini Sprite File) file format is very simple and straightforward which is made up of a header that describes the image version, size and frame count, followed by the frame data (duration and pixel colors in 24bit RGB format):
- The first four bytes are the 32bit integer 0x46778370 (hex)
- The next byte is the version (must be 0)
- The next two bytes must be 0
- The next four bytes are a 32bit integer for the color key in BGR form (one byte is not used)
- The next two bytes are a 16bit integer for the frame count (must be between 1 and 10000)
- The next two bytes are a 16bit integer for the sprite's width
- The next two bytes are a 16bit integer for the sprite's height
- Then for each frame:
- Two bytes for a 16bit integer for the frame's duration in 1/100 of a second
- Width * Height 8bit triplets for each pixel's red, green and blue components