View Single Post
Old 09-04-2010, 10:42 AM   #12
Dunstan
Rookie
 
Join Date: Jul 2010
Posts: 11
The format of the fr.speech.info is the following:

byte 0-3 : identification data (?)
byte 4-279203 : index table in 32 byte records (8725 entries)
byte 279204- : localization text in pointer text - English original - translation format separated by bytes 00.

The index table's 32 byte records contain pointers to the actual speech file, and to the localization data in this file. Bytes 20-31 contain the three 4-byte reversed pointers, bytes 20-23 for the pointer text (like 'GUY_4_shore_11_1a'), bytes 24-27 for English original (like 'It doesn't seem to open.'), bytes 28-31 for the translation (like 'Ça n'a pas l'air de s'ouvrir.'). Reversed values mean, the actual value of the pointer is byte0+256*byte1+256*256*byte2+256*256*256*byte3. Pointers have an offset which is the position of the first byte in the file. So correct pointers for the n-th item are:

pointer text of the n-th item: (value from the reversed 4 bytes starting at position 4+(n-1)*32+20) + 4+(n-1)*32+20
English original of the n-th item: (value from the reversed 4 bytes starting at position 4+(n-1)*32+24) + 4+(n-1)*32+24
localized text of the n-th item: (value from the reversed 4 bytes at position 4+(n-1)*32+28) + 4+(n-1)*32+28

Where n starts with 1.

Hope it helps.

Last edited by Dunstan; 09-04-2010 at 10:47 AM.
Dunstan is offline   you may: quote & reply,