示例#1
0
        public static CellBinaryOverlay CellFactory(
            OverlayStream stream,
            BinaryOverlayFactoryPackage package,
            TypedParseParams?parseParams = null)
        {
            stream = PluginUtilityTranslation.DecompressStream(stream);
            var ret = new CellBinaryOverlay(
                bytes: HeaderTranslation.ExtractRecordMemory(stream.RemainingMemory, package.MetaData.Constants),
                package: package);
            var finalPos = checked ((int)(stream.Position + stream.GetMajorRecord().TotalLength));
            int offset   = stream.Position + package.MetaData.Constants.MajorConstants.TypeAndLengthLength;

            ret._package.FormVersion = ret;
            stream.Position         += 0x10 + package.MetaData.Constants.MajorConstants.TypeAndLengthLength;
            ret.CustomFactoryEnd(
                stream: stream,
                finalPos: finalPos,
                offset: offset);
            ret.FillSubrecordTypes(
                majorReference: ret,
                stream: stream,
                finalPos: finalPos,
                offset: offset,
                parseParams: parseParams,
                fill: ret.FillRecordType);
            return(ret);
        }
示例#2
0
 partial void ItemsCustomParse(OverlayStream stream, long finalPos, int offset, RecordType type, int?lastParsed)
 {
     this.Items = BinaryOverlayList.FactoryByArray <CellBinaryOverlay>(
         mem: stream.RemainingMemory,
         package: _package,
         recordTypeConverter: null,
         getter: (s, p, recConv) => CellBinaryOverlay.CellFactory(new OverlayStream(s, p), p, insideWorldspace: true),
         locs: CellBinaryOverlay.ParseRecordLocations(
             stream: stream,
             package: _package));
 }