internal static ActivityData Restore(TypeDesc typeDesc, SaveInfo info, ref ByteStreamReader bsr)
        {
            uint len = bsr.ReadUInt();

            return((len & 0xFFFF0000) != ActivityFileTag
                                ? new ActivityData(typeDesc, (int)len)
                                : new ActivityData(typeDesc, bsr.ReadStringOfLength(len & 0xFFFF)));
        }
 protected override void Parse(ref ByteStreamReader bsr)
 {
     IdString    = bsr.ReadStringOfLength(4);
     SaveVersion = bsr.ReadSInt();
     TokenTableFileTableOffset = bsr.ReadSInt();
     TokenCount     = bsr.ReadSInt();
     TokenTableSize = bsr.ReadSInt();
     // offset += table size?
 }
Example #3
0
 private static ParsedSaveField VGuiScreenStringOps(TypeDesc desc, SaveInfo info, ref ByteStreamReader bsr)
 => new ParsedSaveField <string>(bsr.ReadStringOfLength(bsr.ReadSInt()), desc);
 static ParsedSaveField MatReadFunc(TypeDesc desc, SaveInfo info, ref ByteStreamReader bsr)
 => new ParsedSaveField <MaterialIndexStr>((MaterialIndexStr)bsr.ReadStringOfLength(bsr.ReadSInt()), desc);