STATIC.SPR FILE HEADER bytes: value ---------------------------------------- HEADER 1 4 bytes: 0, indicates the nonexistence of a header section that is present in the Resource.spr and UnitXX.spr files. 2 4 bytes: 12, offset for the "image offsets" section 3 4 bytes: offset for the image section IMAGE OFFSETS 406 x 4 bytes: image offsets (from start of image section), the last one of these offsets points to the end of the file. IMAGES ID bytes: value ---------------------------------------- IMAGE HEADER 1 16 bytes: always 0 (?), changing it doesn't seem to have any effect 2 4 bytes: image width 3 4 bytes: image height 4 4 bytes: nr. of starting empty columns 5 4 bytes: nr. of starting empty rows 6 4 bytes: nr. of columns (= width up to the last non-empty pixel) 7 4 bytes: nr. of rows (= height up to the last non-empty pixel) 8 1 byte : always 0xFD, seems to have something to do with the transparent pixels (only those that are actually present in the image encoding, not the "assumed" transparent pixels at the start/end of the rows/columns of the image) 9 4 bytes: image body size IMAGE BODY ([img header value 7] - [img header value 5] rows) 1 4 bytes: nr. of empty bytes~~ 2 4 bytes: row data size (= N) 3 N bytes: row image data** 4 10 bytes: 0 (?) ~~ This number of bytes corresponds with half this number of transparent pixels (since the image is 16-bit, or 2 bytes per pixel). ** The image data is in 15+1 bit format (in Big Endian byte order: 1-5-5-5). The first bit indicates whether the pixel's shade is changed to the civ color (1) or not (0). The other 15 bits are 5 bits each in the order R-G-B. Transparent pixels are represented by magenta (or 0x1F7C or 0111110000011111 in Big Endian binary). UNITXX.SPR FILE HEADER ID bytes: value ---------------------------------------- HEADER 1 4 bytes: 12, offset for mysterious next header section. Since that section isn't in Static.spr, it probably has to do with the animation aspect. Such as telling which images belong together in an animation, and how long each of those frames should be displayed. 2 4 bytes: offset for "image offset" section 3 4 bytes: offset for image section MYSTERY SECTION 1 32 x 4 bytes: offsets for per animation information (?). (8 facing directions x 4 actions = 32 animations) The actions being: Idle, Die, Attack, Move (?) [...] IMAGE OFFSETS X x 4 bytes: image offsets (from start of image section), the last one of these offsets points to the end of the file. IMAGES As in Static.spr