示例#1
0
 public void UpdateElementFormatSize(PmxElementFormat f = null, PmxTextureTable tx = null)
 {
     if (f == null)
     {
         f = Header.ElementFormat;
     }
     f.VertexSize   = PmxElementFormat.GetUnsignedBufSize(VertexList.Count);
     f.MaterialSize = PmxElementFormat.GetSignedBufSize(MaterialList.Count);
     f.BoneSize     = PmxElementFormat.GetSignedBufSize(BoneList.Count);
     f.MorphSize    = PmxElementFormat.GetSignedBufSize(MorphList.Count);
     f.BodySize     = PmxElementFormat.GetSignedBufSize(BodyList.Count);
     if (tx == null)
     {
         tx = new PmxTextureTable(MaterialList);
     }
     f.TexSize = PmxElementFormat.GetSignedBufSize(tx.Count);
 }
示例#2
0
        // Token: 0x060000B3 RID: 179 RVA: 0x0000D0CC File Offset: 0x0000B2CC
        public void UpdateElementFormatSize(PmxElementFormat f, PmxTextureTable tx)
        {
            bool flag = f == null;

            if (flag)
            {
                f = this.Header.ElementFormat;
            }
            f.VertexSize   = PmxElementFormat.GetUnsignedBufSize(this.VertexList.Count);
            f.MaterialSize = PmxElementFormat.GetSignedBufSize(this.MaterialList.Count);
            f.BoneSize     = PmxElementFormat.GetSignedBufSize(this.BoneList.Count);
            f.MorphSize    = PmxElementFormat.GetSignedBufSize(this.MorphList.Count);
            f.BodySize     = PmxElementFormat.GetSignedBufSize(this.BodyList.Count);
            bool flag2 = tx == null;

            if (flag2)
            {
                tx = new PmxTextureTable(this.MaterialList);
            }
            f.TexSize = PmxElementFormat.GetSignedBufSize(tx.Count);
        }