コード例 #1
0
ファイル: CColor.cs プロジェクト: q4a/Wolven-kit
 public CColor(IRed3EngineFile cr2w, CVariable parent, string name) : base(cr2w, parent, name)
 {
     Red   = new CUInt8(cr2w, this, nameof(Red));
     Green = new CUInt8(cr2w, this, nameof(Green));
     Blue  = new CUInt8(cr2w, this, nameof(Blue));
     Alpha = new CUInt8(cr2w, this, nameof(Alpha));
 }
コード例 #2
0
        }                                                                            // MAX LIMIT 4

        public CurveInfo(IRed3EngineFile cr2w, CVariable parent, string name) : base(cr2w, parent, name)
        {
            someName = new CName(cr2w, this, nameof(someName))
            {
                IsSerialized = true
            };
            someByte = new CUInt8(cr2w, this, nameof(someByte))
            {
                IsSerialized = true
            };
            pieces = new CCompressedBuffer <CurvePiece>(cr2w, this, nameof(pieces))
            {
                IsSerialized = true
            };
        }
コード例 #3
0
 public CFXTrackItem(CR2WFile cr2w, CVariable parent, string name) : base(cr2w, parent, name)
 {
     buffername = new CName(cr2w, this, nameof(buffername))
     {
         IsSerialized = true
     };
     count = new CDynamicInt(cr2w, this, nameof(count))
     {
         IsSerialized = true
     };
     unk = new CUInt8(cr2w, this, nameof(unk))
     {
         IsSerialized = true
     };
     buffer = new CCompressedBuffer <CBufferUInt16 <CFloat> >(cr2w, this, nameof(buffer))
     {
         IsSerialized = true
     };
 }
コード例 #4
0
        private void ReadBytes(int bytestart, BinaryReader reader)
        {
            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CVector(File);
                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CVector";
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CUInt64(File);
                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CUInt64";
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CUInt32(File);
                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CUInt32";
            }
            catch
            {
            }


            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CUInt16(File);
                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CUInt16";
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CUInt8(File);

                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CUInt8";
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CDynamicInt(File);
                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CDynamicInt";
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CFloat(File);
                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CFloat";
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CName(File);

                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CName";

                var valueTest = v.Value;
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CHandle(File);

                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CHandle";

                var valueTest = v.Value;
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = new CSoft(File);

                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "CSoft";

                var valueTest = v.Value;
            }
            catch
            {
            }

            reader.BaseStream.Seek(bytestart, SeekOrigin.Begin);

            try
            {
                var obj = File.ReadVariable(reader);

                obj.Read(reader, (uint)(bytes.Length - bytestart));
                var v = CreatePropertyLayout(obj);
                v.Endpos   = (int)reader.BaseStream.Position;
                v.HexValue = bytes[bytestart].ToString("X2");
                v.Method   = "ReadVariable";
            }
            catch
            {
            }
        }