コード例 #1
0
 public static void WritePropHeader(this EndianWriter stream, IMEPackage pcc, NameReference propName, PropertyType type, int size, int staticArrayIndex)
 {
     stream.WriteNameReference(propName, pcc);
     stream.WriteNameReference(type.ToString(), pcc);
     stream.WriteInt32(size);
     stream.WriteInt32(staticArrayIndex);
 }
コード例 #2
0
 public static void WriteEnumProperty(this EndianWriter stream, IMEPackage pcc, NameReference propName, NameReference enumName, NameReference enumValue, int staticArrayIndex)
 {
     stream.WritePropHeader(pcc, propName, PropertyType.ByteProperty, 8, staticArrayIndex);
     if (pcc.Game >= MEGame.ME3)
     {
         stream.WriteNameReference(enumName, pcc);
     }
     stream.WriteNameReference(enumValue, pcc);
 }
コード例 #3
0
        public static void WriteNameProperty(this EndianWriter stream, IMEPackage pcc, NameReference propName, NameReference value, int staticArrayIndex)
        {
            //Debug.WriteLine("Writing name property " + propName + ", value: " + value + " at 0x" + stream.Position.ToString("X6"));

            stream.WritePropHeader(pcc, propName, PropertyType.NameProperty, 8, staticArrayIndex);
            stream.WriteNameReference(value, pcc);
        }
コード例 #4
0
        public static void WriteStructProperty(this EndianWriter stream, IMEPackage pcc, NameReference propName, NameReference structName, Stream value, int staticArrayIndex)
        {
            //Debug.WriteLine("Writing struct property " + propName + ", value: " + value + " at 0x" + stream.Position.ToString("X6"));

            stream.WritePropHeader(pcc, propName, PropertyType.StructProperty, (int)value.Length, staticArrayIndex);
            stream.WriteNameReference(structName, pcc);
            stream.BaseStream.WriteStream(value);
        }
コード例 #5
0
 public static void WriteByteProperty(this EndianWriter stream, IMEPackage pcc, NameReference propName, byte value, int staticArrayIndex)
 {
     //Debug.WriteLine("Writing byte property " + propName + ", value: " + value + " at 0x" + stream.Position.ToString("X6"));
     stream.WritePropHeader(pcc, propName, PropertyType.ByteProperty, 1, staticArrayIndex);
     if (pcc.Game >= MEGame.ME3)
     {
         stream.WriteNameReference("None", pcc);
     }
     stream.WriteByte(value);
 }
コード例 #6
0
 public static void WriteDelegateProperty(this EndianWriter stream, IMEPackage pcc, NameReference propName, ScriptDelegate value, int staticArrayIndex)
 {
     stream.WritePropHeader(pcc, propName, PropertyType.DelegateProperty, 12, staticArrayIndex);
     stream.WriteInt32(value.Object);
     stream.WriteNameReference(value.FunctionName, pcc);
 }
コード例 #7
0
 public static void WriteNoneProperty(this EndianWriter stream, IMEPackage pcc)
 {
     //Debug.WriteLine("Writing none property at 0x" + stream.Position.ToString("X6"));
     stream.WriteNameReference("None", pcc);
 }