public override void Read(Stream input) { BinaryReader reader = new BinaryReader(input, Encoding.Default, true); int pftxsMagicNumber = reader.ReadInt32(); // PFTXS int unknown1 = reader.ReadInt32(); int unknown2 = reader.ReadInt32(); int unknown3 = reader.ReadInt32(); int texlistMagicNumber = reader.ReadInt32(); // TEXL Size = reader.ReadInt32(); FileCount = reader.ReadInt32(); int unknown4 = reader.ReadInt32(); for (int i = 0; i < FileCount; i++) { PftxsFtexFile pftxsFtexFile = new PftxsFtexFile(); pftxsFtexFile.Read(input); Files.Add(pftxsFtexFile); } }
public override void Read(Stream input) { X360Reader reader = new X360Reader(input, Encoding.Default, true, false); int pftxsMagicNumber = reader.ReadInt32(); // PFTXS if (pftxsMagicNumber != PftxMagicNumber) return; int unknown1 = reader.ReadInt32(); // 0x40 00 00 00 if (unknown1 != 0x40000000) { if(unknown1 != 0x40) return; reader.BaseStream.Position -= 4; reader.FlipEndian = true; unknown1 = reader.ReadInt32(); } Endianness = reader.FlipEndian ? "Big" : "Little"; int unknown2 = reader.ReadInt32(); // 0x10 if (unknown2 != 0x10) return; int unknown3 = reader.ReadInt32(); // 0x1 if (unknown3 != 0x1) return; int texlistMagicNumber = reader.ReadInt32(); // TEXL Size = reader.ReadInt32(); FileCount = reader.ReadInt32(); int unknown4 = reader.ReadInt32(); for (int i = 0; i < FileCount; i++) { PftxsFtexFile pftxsFtexFile = new PftxsFtexFile(); pftxsFtexFile.Read(reader); Files.Add(pftxsFtexFile); } }