コード例 #1
0
        public override void Build(MetaBuilder mb, bool isRoot = false)
        {
            this.MetaStructure.Unk_2598445407 = this.Unk_2598445407;

            if (this.Unk_3902803273 != null)
            {
                this.MetaStructure.Unk_3902803273 = mb.AddItemArrayPtr((MetaName)(94549140), this.Unk_3902803273.Select(e => { e.Build(mb); return(e.MetaStructure); }).ToArray());
            }

            MUnk_94549140.AddEnumAndStructureInfo(mb);

            if (this.AAnchors != null)
            {
                this.MetaStructure.aAnchors = mb.AddItemArrayPtr(MetaName.CAnchorProps, this.AAnchors.Select(e => { e.Build(mb); return(e.MetaStructure); }).ToArray());
            }

            MCAnchorProps.AddEnumAndStructureInfo(mb);


            MUnk_2858946626.AddEnumAndStructureInfo(mb);

            if (isRoot)
            {
                mb.AddItem(this.MetaName, this.MetaStructure);

                this.Meta = mb.GetMeta();
            }
        }
コード例 #2
0
ファイル: MCAnchorProps.cs プロジェクト: indilo53/gta-toolkit
        public override void Build(MetaBuilder mb, bool isRoot = false)
        {
            this.MetaStructure.props  = mb.AddByteArrayPtr(this.Props.ToArray());
            this.MetaStructure.anchor = this.Anchor;

            MCAnchorProps.AddEnumAndStructureInfo(mb);

            if (isRoot)
            {
                mb.AddItem(this.MetaName, this.MetaStructure);

                this.Meta = mb.GetMeta();
            }
        }
コード例 #3
0
        public override void Parse(MetaFile meta, Unk_2858946626 Unk_2858946626)
        {
            this.Meta          = meta;
            this.MetaStructure = Unk_2858946626;

            // this.Unk_2598445407 = Unk_2858946626.Unk_2598445407;
            var Unk_3902803273 = MetaUtils.ConvertDataArray <Unk_94549140>(meta, Unk_2858946626.Unk_3902803273);

            var values = Enum.GetValues(typeof(Unk_2834549053));

            foreach (Unk_2834549053 value in values)
            {
                if (value != Unk_2834549053.NUM_ANCHORS)
                {
                    Props[value] = Unk_3902803273?.Where(e => e.anchorId == (byte)value).Select(e => { var msw = new MUnk_94549140(this); msw.Parse(meta, e); return(msw); }).ToList() ?? new List <MUnk_94549140>();
                }
            }

            var aAnchors = MetaUtils.ConvertDataArray <CAnchorProps>(meta, Unk_2858946626.aAnchors);

            this.AAnchors = (aAnchors?.Select(e => { var msw = new MCAnchorProps(this); msw.Parse(meta, e); return(msw); }).ToList()) ?? new List <MCAnchorProps>();
        }