STСI format is used to store graphical objects of Jagged Alliance 2 game. Every STCI file can hold one or more images. Images are stored using either 16-bit (16bppRGB565) or 8-bit (8bppIndexed) format. 16-bit file holds just one noncompressed image. The most of them are in LOADSCREENS folder.

Header (64 bytes, STCIHeader structure).

STCIHeader structure is described in Standard Gaming Platform\imgfmt.h.

ok, first of all: the animation flag (bit 0 of the flags) seems to define whether the file contains app data (in case of STIs that are the animation headers). so far it looks like all files with this flag set have app data. which would then be the same as checking if uiAppDataSize is greater than 0, I believed. in fact some files do have an app data size of 0, but do contain app data.

one file puzzles me, though. IMP face #216 from the 4870 release has the "has app data" flag set, but has no actual app data. when I try using that face the game crashes as soon as I enter the tactic screen. is the STI corrupt or did I miss out on something? all other faces I tested didn't have the flag set.

and I couldn't find any purpose of the unused data blocks, maybe values other than 0 are simply remnants of earlier format versions. does anyone know if these have any meaning?

Step 1: Before declaring STI format, clarify that the format msut be nicely aligned, and not exceed 64 bytes

Step 2: Directly under that, declare STI format. Make it not aligned. Size will be 68 bytes.

Step 3: ???

Step 4: Say 'Fuck this', put in #define STCI_HEADER_SIZE 64. Whenever you read or write STI format, do not use the size of the structure you just declared, but 64.

Step 5: Profit!!! :spend:

This will leave parts of the structure with bogus values. Also, this might lead to values being stored in variables that should be unused.

2. When reading the number of tiles in an animation, store that number in a variable that is too small, causing an overflow. Always do that. Whenever you use it, cause an overflow again, thereby restoring the old value.