Here is what I've found (something is probably old info, because it was used in NOVA patch). All numbers are stored in IBM format (lowest byte first).
.RES file begins with 16 bytes header:
Code: Select all
struct res_file_header_t {
char signature[16];
};
Code: Select all
"(C) H.D.I. V1.0\x1a"
Code: Select all
struct res_file_group_t {
char name[12];
unsigned __int32 offset;
};
Last (terminator, again my term) group has empty name (all characters set to zero = '\0'), and offset equals to length of file.
There are several resource group types, but their type is not stored in .RES file, it is probably hardcoded in efs.exe. So far I've been able to fully decode only 'string table' group, but there are at least 2 more types (dialog and menu).
So let's speak about string table then (at least some info about this is used in NOVA).
String table starts with 2 bytes, which combined in number gets number of strings in table.
After these bytes, strings follows.
One string has 4 bytes header - 2 bytes as string identifier/index (I think this is most important for EFS to know which string to use) and then 2 bytes means string length. After the header follows string characters (take length from header).
Another resource group type is dialog, so far I've decoded only beginning:
2 bytes - x pos
2 bytes - y pos
2 bytes - x size
2 bytes - y size
2 bytes - unknown
2 bytes - number of objects in dialog
then there are some yet undecoded data - buttons, labels, images ... (I can see some strings here, also path to bin files ...).
Last resource group type is menu, but I've not decoded anything yet - I just see there are strings used in menus.