public static void WriteGvas(Stream stream, Gvas save)
 {
     using (var writer = new UE_BinaryWriter(stream, true))
     {
         SaveGameHeader.Write(writer, save.Header);
         var ue_prop_writer = new UE_Property_Writer(writer);
         for (int i = 0; i < save.PropertyList.Count; i++)
         {
             ue_prop_writer.Write(save.PropertyList[i], PositionToken.Normal);
         }
         ue_prop_writer.Write_UE_None();
         string Null_End = null;
         writer.Write(Null_End);
     }
 }
예제 #2
0
 void Write(UE_Struct_Generic value, PositionToken position)
 {
     if (position == PositionToken.Normal)
     {
         byte[] _R;
         using (var ms = new MemoryStream())
             using (var bw = new UE_BinaryWriter(ms, true))
             {
                 var ue_prop_w = new UE_Property_Writer(bw);
                 foreach (var prop in value.PropertyList)
                 {
                     ue_prop_w.Write(prop, PositionToken.Normal);
                 }
                 ue_prop_w.Write_UE_None();
                 //
                 _R = ms.ToArray();
             }
         long I64_Length = _R.Length;
         Write_UE_Value_Hair(value.TypeString, I64_Length);
         //
         Write_UE_Struct_Header(value.StructTypeString);
         writer.Write(_R, 0, _R.Length);
     }
     else if (position == PositionToken.InsideArray)
     {
         foreach (var prop in value.PropertyList)
         {
             Write(prop, PositionToken.Normal);
         }
         Write_UE_None();
     }
     else
     {
         throw new NotImplementedException(position.ToString());
     }
 }