diff --git a/sc2/doc/devel/strtab b/sc2/doc/devel/strtab index 94a56bd7d..1127a75a4 100644 --- a/sc2/doc/devel/strtab +++ b/sc2/doc/devel/strtab @@ -1,22 +1,34 @@ This is the format for resources of type STRTAB. It contains a number of -entries of unspecified data (not necessarilly strings). +items of unspecified data (not necessarilly strings). This is used for game strings (extension .txt), colour tables (.ct), and colour translation tables (.xlt). +Everything is stored MSB first unless otherwise specified. + position length meaning 4 Unknown, always 0xffffffff 2 Unknown, always 0x0000 - 2 number of entries in the file (StringCount) + 2 number of items in the file (StringCount) Followed by: In file: 4 Placeholder, always 0x00000000 - numentries times: + numitems times: 4 length of string In memory: - numentries times: + numitems times: 4 offset from &StringCount to the string followed by: 4 offset from &StringCount until one char past the end of the last string. + +For .ct files an item is as follows: + 1 Index of first clut in this item. + 1 Index of last clut in this item. + For each item: + 32 palette entries: + 2 bits 0-4: blue value + bits 5-9: green value + bits 10-15: red value +