(EAGLS): recognize large index files (#53)

This commit is contained in:
morkt 2017-03-14 00:46:57 +04:00
parent 4d7534151a
commit 309b1efe11

View File

@ -67,6 +67,8 @@ namespace GameRes.Formats.Eagls
index = DecryptIndex (idx);
int index_offset = 0;
int entry_size = index.Length / 10000;
if (entry_size > 40)
entry_size = 40;
bool long_offsets = 40 == entry_size;
int name_size = long_offsets ? 0x18 : 0x14;
long first_offset = LittleEndian.ToUInt32 (index, name_size);