As you may or may not know i've created tool for extracting locale files from Kingdom Hearts 1.5+2.5/2.8 into "translatable" format (.po).
It seems that format they're using (.ctdl, but my script wrongly saves it as .ctd (it's just takes magic value and save it as extension - works in most cases ) have 3 "variations", i successfully can extract strings from 2 "variations" (more details below), but have problem with 3rd one.
Details on how i read and named first variation:
Code: Select all
int magicValue = 0x44545340; # Always "@CTD"
int unknown1 = 503; # Some kind of indicator (strings with that are saved in UTF-16)
int unknown2;
short unknown3;
short loc_count, addr_offset, padding, hash_offset, padding, data_offset;
struct addr_block {
short[loc_count] loc_id, set_id, offset, unknown;
}
struct hash_block {
string[loc_count] # Hash, 32 bytes (0x20 bytes)
}
struct data_block {
string[loc_count] # Double null terminated UTF-16 encoded
}
Second "variation":
Code: Select all
int magicValue = 0x44545340; # Always "@CTD"
int unknown1; # If this value is not 503, strings are utf-8
int unknown2;
short unknown3;
short loc_count, addr_offset, padding, hash_offset, padding, data_offset;
struct addr_block {
short[loc_count] loc_id, set_id, offset, unknown;
int unknown2;
}
struct hash_block {
string[loc_count] # Hash, 32 bytes (0x20 bytes)
}
struct data_block {
string[loc_count] # Null terminated UTF-8 encoded
}
As you can see, these two variants are relatively similar. But third variant is an exception. And it really confuses me.
I attached all variations,
Can someone help with "documenting" the third variation (also, if someone have better idea what "unknown" values in my structs are)
Thanks in advance