public static void Write(this BinaryWriter writer, Ps4SlotHeader ps4Header)
 {
     writer.Write((uint)ps4Header.slotPosition);
     writer.Write(ps4Header.unk1);
     writer.Write(ps4Header.saveSize);
     writer.Write(ps4Header.saveOffset);
 }
Esempio n. 2
0
        }                                          // Must match the slot header size.

        public Ps4Header(BinaryReader reader)
        {
            prefix = reader.ReadChars(8);
            unk1   = reader.ReadUInt32();
            unk2   = reader.ReadUInt32();
            var slotSize = reader.ReadUInt32();

            unk3 = reader.ReadUInt32();

            slotHeader = new Ps4SlotHeader[slotSize];
            saveData   = new SaveData[slotSize];

            for (var i = 0; i < slotSize; i++)
            {
                slotHeader[i] = reader.ReadPs4SlotHeader();
            }

            for (var i = 0; i < slotSize; i++)
            {
                reader.BaseStream.Seek(slotHeader[i].saveOffset, SeekOrigin.Begin);
                saveData[i] = reader.ReadSaveData(true, slotHeader[i].saveSize);
            }
        }