Exemple #1
0
        public Array_Structure AddWrapperArray(MetaWrapper[] items)
        {
            if ((items == null) || (items.Length == 0))
            {
                return(new Array_Structure());
            }

            var sa = new Array_Structure();

            sa.Count1 = (ushort)items.Length;
            sa.Count2 = sa.Count1;
            for (int i = 0; i < items.Length; i++)
            {
                var item  = items[i];
                var meptr = item.Save(this);
                if (i == 0)
                {
                    MetaBuilderPointer mbp = new MetaBuilderPointer();
                    mbp.BlockID = meptr.BlockID;
                    mbp.Offset  = meptr.Offset;
                    sa.Pointer  = mbp.Pointer;
                }
            }
            return(sa);
        }
Exemple #2
0
 public static T[] ConvertDataArray <T>(MetaFile meta, Array_Structure array) where T : struct
 {
     return(ConvertDataArray <T>(meta, array.Pointer, array.Count1));
 }