(Legacy): IFP archives.

This commit is contained in:
morkt
2018-05-27 15:55:00 +04:00
parent adfe0a6cea
commit ba8d6648bf
2 changed files with 94 additions and 2 deletions

View File

@@ -46,11 +46,11 @@ namespace GameRes.Formats.Winters
return null;
var base_name = Path.GetFileNameWithoutExtension (file.Name);
var dir = new List<Entry>();
for (uint index_offset = 0x20; index_offset < 0x10000; index_offset += 0x10)
for (int i = 0, index_offset = 0x20; index_offset < 0x10000; index_offset += 0x10, ++i)
{
if (file.View.ReadUInt16 (index_offset) == 0)
continue;
var name = string.Format ("{0}#{1:D5}", base_name, dir.Count);
var name = string.Format ("{0}#{1:D5}", base_name, i);
uint offset = file.View.ReadUInt32 (index_offset+4);
var entry = AutoEntry.Create (file, offset, name);
entry.Size = file.View.ReadUInt32 (index_offset+8);