From 421e6dfe9ebc91a1f7058e28bed0a3efa3e92678 Mon Sep 17 00:00:00 2001 From: meep-eep Date: Sat, 26 Oct 2002 21:54:29 +0000 Subject: [PATCH] Details on .ct files. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@154 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/doc/devel/strtab | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) 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 +