public override void ToFragment(ErpFragment fragment)
        {
            using (var newData = new MemoryStream())
                using (ErpBinaryWriter writer = new ErpBinaryWriter(MiscUtil.Conversion.EndianBitConverter.Little, newData))
                {
                    writer.Write((byte)MipMapFileName.Length);
                    writer.Write(MipMapFileName, MipMapFileName.Length);
                    writer.Write((UInt32)Mips.Count);

                    for (int i = 0; i < Mips.Count; ++i)
                    {
                        writer.Write((byte)Mips[i].Compression);
                        writer.Write(Mips[i].Offset);
                        writer.Write(Mips[i].PackedSize);
                        writer.Write(Mips[i].Size);
                    }

                    if (hasTwoUnknowns)
                    {
                        writer.Write(Unknown);
                        writer.Write(Unknown2);
                    }

                    fragment.SetData(newData.ToArray());
                }
        }
示例#2
0
        public override void ToFragment(ErpFragment fragment)
        {
            using var newData = new MemoryStream();
            using var writer  = new ErpBinaryWriter(MiscUtil.Conversion.EndianBitConverter.Little, newData);
            writer.Write(Unknown);
            writer.Write((int)ImageType);
            writer.Write(Unknown2);
            writer.Write(MipMapCount);
            writer.Write(Unknown3);
            writer.Write(Unknown4);
            writer.Write(SurfaceResourceName);

            fragment.SetData(newData.ToArray());
        }
示例#3
0
        public override void ToFragment(ErpFragment fragment)
        {
            using (var newData = new MemoryStream())
                using (ErpBinaryWriter writer = new ErpBinaryWriter(MiscUtil.Conversion.EndianBitConverter.Little, newData))
                {
                    writer.Write(Unknown);
                    writer.Write(Unknown2);
                    writer.Write((Int32)ImageType);
                    writer.Write(Width);
                    writer.Write(Height);
                    writer.Write(Unknown3);
                    writer.Write(MipMapCount);
                    writer.Write(ArraySize);
                    writer.Write(Unknown4);

                    fragment.SetData(newData.ToArray());
                }
        }
 public override void ToFragment(ErpFragment fragment)
 {
     fragment.SetData(Data);
 }