diff --git a/src/archive/archive_atlus/FBIN.cs b/src/archive/archive_atlus/FBIN.cs index 838534ad..08be82ee 100644 --- a/src/archive/archive_atlus/FBIN.cs +++ b/src/archive/archive_atlus/FBIN.cs @@ -17,7 +17,20 @@ public FBIN(Stream input) _stream = input; using (var br = new BinaryReaderX(input, true)) { - // TODO + header = br.ReadStruct
(); + var offsets = br.ReadMultiple(header.fileCount); + br.BaseStream.Position = br.BaseStream.Position + 0x0C; //0x0C is the size of the header struct + for (int i = 0; i < header.fileCount - 1; i++) + { + Files.Add(new FbinFileInfo + { + State = ArchiveFileState.Archived, + FileName = "file"+ i + ".bin", + FileData = new SubStream(br.BaseStream, br.BaseStream.Position, offsets[i]) + }); + br.BaseStream.Position = (br.BaseStream.Position + offsets[i]); + } + } } diff --git a/src/archive/archive_atlus/FbinSupport.cs b/src/archive/archive_atlus/FbinSupport.cs index 3c6230ad..8902f86e 100644 --- a/src/archive/archive_atlus/FbinSupport.cs +++ b/src/archive/archive_atlus/FbinSupport.cs @@ -6,13 +6,15 @@ namespace archive_atlus.FBIN { public class FbinFileInfo : ArchiveFileInfo { - // TODO + } [StructLayout(LayoutKind.Sequential, Pack = 1)] public class Header { public Magic magic; - // TODO + public int fileCount; + public uint headerSize; } + }