Esempio n. 1
0
        public override void Build(MetaBuilder mb, bool isRoot = false)
        {
            this.MetaStructure.extensions = new Array_StructurePointer();

            // CBaseArchetypeDef + CMloArchetypeDef + CTimeArchetypeDef
            var archetypePtrs = new List <MetaPOINTER>();

            this.AddMetaPointers(mb, archetypePtrs, MetaName.CBaseArchetypeDef, this.Archetypes.Select(e => { e.Build(mb); return(e.MetaStructure); }));
            this.AddMetaPointers(mb, archetypePtrs, MetaName.CMloArchetypeDef, this.MloArchetypes.Select(e => { e.Build(mb); return(e.MetaStructure); }));
            this.AddMetaPointers(mb, archetypePtrs, MetaName.CTimeArchetypeDef, this.TimeArchetypes.Select(e => { e.Build(mb); return(e.MetaStructure); }));
            this.MetaStructure.archetypes = mb.AddPointerArray(archetypePtrs.ToArray());

            this.MetaStructure.name         = (uint)this.Name;
            this.MetaStructure.dependencies = mb.AddUintArrayPtr(this.Dependencies.ToArray());

            this.MetaStructure.compositeEntityTypes = mb.AddItemArrayPtr(MetaName.CCompositeEntityType, this.CompositeEntityTypes.Select(e => e.MetaStructure).ToArray());
            MCCompositeEntityType.AddEnumAndStructureInfo(mb);

            MCMapTypes.AddEnumAndStructureInfo(mb);

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

                this.Meta = mb.GetMeta();
            }
        }
Esempio n. 2
0
        public override void Build(MetaBuilder mb, bool isRoot = false)
        {
            this.MetaStructure.Name             = this.Name;
            this.MetaStructure.lodDist          = this.LodDist;
            this.MetaStructure.flags            = this.Flags;
            this.MetaStructure.specialAttribute = this.SpecialAttribute;
            this.MetaStructure.bbMin            = this.BbMin;
            this.MetaStructure.bbMax            = this.BbMax;
            this.MetaStructure.bsCentre         = this.BsCentre;
            this.MetaStructure.bsRadius         = this.BsRadius;
            this.MetaStructure.StartModel       = this.StartModel;
            this.MetaStructure.EndModel         = this.EndModel;
            this.MetaStructure.StartImapFile    = this.StartImapFile;
            this.MetaStructure.EndImapFile      = this.EndImapFile;
            this.MetaStructure.PtFxAssetName    = this.PtFxAssetName;
            if (this.Animations != null)
            {
                this.MetaStructure.Animations = mb.AddItemArrayPtr((MetaName)(1980345114), this.Animations.Select(e => { e.Build(mb); return(e.MetaStructure); }).ToArray());
            }
            MUnk_1980345114.AddEnumAndStructureInfo(mb);


            MCCompositeEntityType.AddEnumAndStructureInfo(mb);

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

                this.Meta = mb.GetMeta();
            }
        }