Exemple #1
0
 public Class_eCMotionResource2(BinaryStream s)
 {
     NameClass = new string16(s);
     NumberClass = s.Read<byte>();
     NumberOfBlock = s.Read<ushort>();
     EndOfBlock = s.Read<ushort>();
     EndOfBlock = s.Read<ushort>();
     SizeOfBlock = s.Read<uint>();
     EndOfBlock = s.Read<ushort>();
     NumberEffects = s.Read<uint>();
     NameEffects = new string16(s);
     NameClassObj = new string16(s);
     CommandsOfBlockEffects = s.Read<ushort>();
     SizeOfBlockEffects = s.Read<uint>();
     NumberBlockOfEffects = s.Read<byte>();
     Effects = new IMAGE_EFFECTS(s);
 }
Exemple #2
0
        public static List<LogData> GetCTESTWINLogList(string filePath)
        {
            List<LogData> tmp = new List<LogData>();
            if(!IsCTESTWINLog(filePath)) {
                return null;
            }

            BinaryStream bs = new BinaryStream();
            bs.ChangeEncoding("Shift-JIS");
            bs.ReadOpen(filePath);
            try {
                ushort logNum = bs.GETUSHORT();
                bs.GETCHAR(6);
                bs.GETCHAR(8);
                for(ushort i = 0;i < logNum;i++) {
                    string call = bs.GETCHAR(CtestwinDefs.CallLen);
                    string mycno = bs.GETCHAR(CtestwinDefs.NumLen);
                    string opcno = bs.GETCHAR(CtestwinDefs.NumLen);
                    string mode = ((ModeStr)bs.GETUSHORT()).ToString();
                    string freq = Freq.CnvTostr((FreqStr)bs.GETUSHORT());
                    bs.GETUSHORT();
                    bs.GETUSHORT();
                    DateTime date = CTimeToDate(bs.GETLONG());
                    string oprtr = bs.GETCHAR(CtestwinDefs.CallLen);
                    bs.GETUSHORT();
                    string rem = bs.GETCHAR(CtestwinDefs.RemLen + 2);
                    tmp.Add(new LogData {
                        Date = date, Callsign = call, SentCn = mycno, ReceivedCn = opcno,
                        Mode = mode, Freq = freq, Operator = oprtr, Rem = rem, Point = 1,
                        IsSearched = false, IsFinded = true,
                    });
                }
            } catch(Exception e) {
                MessageBox.Show("ログファイル読み込みエラー\r\n" + e.Message, "通知");
                return null;
            }

            return tmp;
        }
Exemple #3
0
            byte TypeOf3D; //

            #endregion Fields

            #region Constructors

            public RedactorMAX_MAYA(BinaryStream s)
            {
                TypeOf3D = s.Read<byte>();
                switch (TypeOf3D)
                {
                    case 0:
                        Type = "Type3D_Redactor" + "Alias Maya 2008";
                        break;
                    case 1:
                        Type = "Type3D_Redactor" + "3D Studio Max 7";
                        break;
                }
                if (Type != string.Empty)
                    1.ToString();
            }
Exemple #4
0
            uint Zero; //

            #endregion Fields

            #region Constructors

            public IMAGE_BONE_3D(BinaryStream s)
            {
                NumberOfBlock = s.Read<uint>();
                SizeOfBlock = s.Read<uint>();
                NameXSM = s.ReadRange<byte>(3);
                NumOfBlocks = s.Read<uint>();
                TypeOf3DRedactor = new RedactorMAX_MAYA(s);
                DataUnknow0 = s.Read<uint>();
                DataUnknow1 = s.Read<uint>();
                DataUnknow2 = s.Read<uint>();
                DataUnknow3 = s.Read<uint>();
                DataUnknow4 = s.Read<uint>();
                DataUnknow5 = s.Read<uint>();
                DataUnknow6_1 = s.Read<short>();
                DataUnknow6_2 = s.Read<byte>();
                DataUnknow6_3 = s.Read<byte>();
                Name3D_Redactor = new string32(s);
                PathFileOfWork = new string32(s);
                DateFileOfWork = new string32(s);
                Zero = s.Read<uint>();
                Command202 = s.Read<uint>();
                DataUnKnown = s.Read<uint>();
                Num_01 = s.Read<uint>();
                numJoints = s.Read<uint>();
                Primitive3D_Setup = new Vertex4_6(s);
                SkeletalAnimation = new Joints_3D[numJoints];
                for (int i = 0; i < numJoints; i++)
                    SkeletalAnimation[i] = new Joints_3D(s);
            }
Exemple #5
0
 public IMAGE_XMOT_HEADERS(BinaryStream s)
 {
     Number01 = s.Read<ushort>();
     Number02 = s.Read<byte>();
     Number03 = s.Read<ushort>();
     Number04 = s.Read<byte>();
     eCMotionResource2 = new Class_eCMotionResource2(s);
 }
Exemple #6
0
 public virtual void imethod_1(BinaryStream binaryStream_0)
 {
     binaryStream_0.smethod_7(23791);
     this.vmethod_2(binaryStream_0);
 }
Exemple #7
0
 public override void imethod_2(BinaryStream binaryStream_0)
 {
     binaryStream_0.smethod_7(-17173);
     base.imethod_2(binaryStream_0);
     binaryStream_0.smethod_4(this.int_0 << 5 | U.smethod_0(this.int_0, 27));
 }
Exemple #8
0
 public VertexAni4(BinaryStream s)
 {
     Pos = s.Read<Vector3>();
     TimeKadrAlfa = s.Read<float>();
 }
Exemple #9
0
 public virtual void imethod_2(BinaryStream binaryStream_0)
 {
     binaryStream_0.smethod_7(248);
     binaryStream_0.smethod_4(this.int_0 << 16 | U.smethod_0(this.int_0, 16));
     binaryStream_0.smethod_4(this.int_1 << 12 | U.smethod_0(this.int_1, 20));
 }
Exemple #10
0
 public override void imethod_1(BinaryStream binaryStream_0)
 {
     binaryStream_0.smethod_7(18280);
     this.vmethod_2(binaryStream_0);
 }
Exemple #11
0
 public abstract void Read(BinaryStream stream);
Exemple #12
0
 public virtual void imethod_2(BinaryStream binaryStream_0)
 {
     binaryStream_0.smethod_7(3261);
     binaryStream_0.smethod_7(this.int_0);
 }
Exemple #13
0
 protected virtual void vmethod_2(BinaryStream binaryStream_0)
 {
     this.gclass647_0.imethod_1(binaryStream_0);
     binaryStream_0.smethod_3(this.string_0);
     this.gclass597_0.imethod_1(binaryStream_0);
 }
Exemple #14
0
 public virtual void imethod_1(BinaryStream binaryStream_0)
 {
     this.int_0 = (int)binaryStream_0.smethod_1();
 }
Exemple #15
0
 public virtual void imethod_2(BinaryStream binaryStream_0)
 {
     binaryStream_0.smethod_7(-4571);
     binaryStream_0.smethod_4(this.int_0 << 2 | U.smethod_0(this.int_0, 30));
     binaryStream_0.smethod_3(this.string_0);
 }
Exemple #16
0
 public virtual void imethod_1(BinaryStream binaryStream_0)
 {
     this.int_0    = binaryStream_0.smethod_0();
     this.int_0    = (U.smethod_0(this.int_0, 2) | this.int_0 << 30);
     this.string_0 = binaryStream_0.smethod_2();
 }
Exemple #17
0
 public string32(BinaryStream s)
 {
     uint l = s.Read<uint>();
     this.s = string.Empty;
     for (int i = 0; i < l; i++)
         this.s = this.s + (char)s.Read<byte>();
 }
Exemple #18
0
        private static bool IsCTESTWINLog(string filePath)
        {
            BinaryStream bs = new BinaryStream();
            bs.ChangeEncoding("Shift-JIS");
            if(!bs.ReadOpen(filePath)) {
                return false;
            }
            try {
                bs.GETUSHORT();
                bs.GETCHAR(6);
                if(bs.GETCHAR(8) != "CQsoData") return false;
            } catch {
                return false;
            }

            return true;
        }
Exemple #19
0
 public Vertex4_6(BinaryStream s)
 {
     Vertex_4 = new Vertex4[4];
     Vertex_6 = new Vertex6[2];
     for (int i = 0; i < 4; i++)
         Vertex_4[i] = new Vertex4(s);
     for (int i = 0; i < 2; i++)
         Vertex_6[i] = new Vertex6(s);
 }
Exemple #20
0
 public virtual void imethod_1(BinaryStream binaryStream_0)
 {
     this.BXIGCFKOFZ = binaryStream_0.smethod_0();
     this.BXIGCFKOFZ = (U.smethod_0(this.BXIGCFKOFZ, 16) | this.BXIGCFKOFZ << 16);
     this.bool_0     = binaryStream_0.ReadBoolean();
 }
Exemple #21
0
 public abstract void Write(BinaryStream stream);
Exemple #22
0
 protected virtual void vmethod_2(BinaryStream binaryStream_0)
 {
     binaryStream_0.smethod_7(-4252);
 }
Exemple #23
0
 public virtual void HrqIugnatr8(BinaryStream binaryStream_0)
 {
     binaryStream_0.smethod_1();
 }
Exemple #24
0
 public virtual void imethod_2(BinaryStream binaryStream_0)
 {
     binaryStream_0.smethod_7(6018);
     binaryStream_0.smethod_4(U.smethod_0(this.int_0, 12) | this.int_0 << 20);
     binaryStream_0.smethod_4(U.smethod_0(this.int_1, 3) | this.int_1 << 29);
 }
Exemple #25
0
 public virtual void imethod_2(BinaryStream binaryStream_0)
 {
     binaryStream_0.smethod_7(32739);
     binaryStream_0.smethod_4(this.BXIGCFKOFZ << 16 | U.smethod_0(this.BXIGCFKOFZ, 16));
     binaryStream_0.WriteBoolean(this.bool_0);
 }
Exemple #26
0
 public virtual void HrqIugnatr8(BinaryStream binaryStream_0)
 {
     this.bool_0 = binaryStream_0.ReadBoolean();
     binaryStream_0.smethod_1();
 }
Exemple #27
0
 protected virtual void vmethod_2(BinaryStream binaryStream_0)
 {
     binaryStream_0.smethod_7(-29558);
     binaryStream_0.smethod_4(this.int_0 << 9 | U.smethod_0(this.int_0, 23));
     binaryStream_0.smethod_7(17733);
 }
Exemple #28
0
 protected virtual void vmethod_2(BinaryStream binaryStream_0)
 {
     binaryStream_0.WriteBoolean(this.bool_0);
     binaryStream_0.smethod_7(-27907);
 }
Exemple #29
0
 public override void HrqIugnatr8(BinaryStream binaryStream_0)
 {
     base.HrqIugnatr8(binaryStream_0);
     this.Value = binaryStream_0.ReadBoolean();
 }
        public static unsafe void Test(ISupportsBinaryStream stream)
        {
            BinaryStream bs   = new BinaryStream(stream);
            Random       rand = new Random();
            int          seed = rand.Next();

            rand = new Random(seed);
            byte[] data  = new byte[16];
            byte[] data2 = new byte[16];

            fixed(byte *lp = data)
            {
                for (int x = 0; x < 10000; x++)
                {
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        bs.Write(*lp);
                    }
                    int skip = rand.Next(40) + 1;
                    bs.Position += skip;
                    bs.Position -= rand.Next(skip);
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        bs.Write(*(sbyte *)lp);
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        bs.Write(*(short *)lp);
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        bs.Write(*(int *)lp);
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        bs.Write(*(long *)lp);
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        bs.Write(*(ushort *)lp);
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        bs.Write(*(uint *)lp);
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        bs.Write(*(ulong *)lp);
                    }

                    for (int i = 0; i < 9; i++)
                    {
                        rand.NextBytes(data);
                        while (rand.Next(4) < 2)
                        {
                            bs.WriteUInt(*(ulong *)lp, i);
                        }
                    }

                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        bs.Write(*(decimal *)lp);
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        bs.Write(*(Guid *)lp);
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        bs.Write(NextDate(data, rand));
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        bs.Write(NextSingle(data, rand));
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        bs.Write(NextDouble(data, rand));
                    }
                    rand.NextBytes(data);
                    bool value = *lp != 0;
                    while (rand.Next(4) < 2)
                    {
                        bs.Write(value);
                    }

                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        bs.Write7Bit(*(uint *)lp);
                    }
                    data[3] = 0;
                    while (rand.Next(4) < 2)
                    {
                        bs.Write7Bit(*(uint *)lp);
                    }
                    data[2] = 0;
                    while (rand.Next(4) < 2)
                    {
                        bs.Write7Bit(*(uint *)lp);
                    }
                    data[1] = 0;
                    while (rand.Next(4) < 2)
                    {
                        bs.Write7Bit(*(uint *)lp);
                    }

                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        bs.Write7Bit(*(ulong *)lp);
                    }
                    data[7] = 0;
                    while (rand.Next(4) < 2)
                    {
                        bs.Write7Bit(*(ulong *)lp);
                    }
                    data[6] = 0;
                    while (rand.Next(4) < 2)
                    {
                        bs.Write7Bit(*(ulong *)lp);
                    }
                    data[5] = 0;
                    while (rand.Next(4) < 2)
                    {
                        bs.Write7Bit(*(ulong *)lp);
                    }
                    data[4] = 0;
                    while (rand.Next(4) < 2)
                    {
                        bs.Write7Bit(*(ulong *)lp);
                    }
                    data[3] = 0;
                    while (rand.Next(4) < 2)
                    {
                        bs.Write7Bit(*(ulong *)lp);
                    }
                    data[2] = 0;
                    while (rand.Next(4) < 2)
                    {
                        bs.Write7Bit(*(ulong *)lp);
                    }
                    data[1] = 0;
                    while (rand.Next(4) < 2)
                    {
                        bs.Write7Bit(*(ulong *)lp);
                    }

                    rand.NextBytes(data);
                    bs.Write(data, 0, data.Length);

                    while (rand.Next(4) < 2)
                    {
                        if (bs.Position > 100)
                        {
                            bs.Position -= 100;
                            int insertCount = rand.Next(16) + 1;
                            bs.InsertBytes(insertCount, 100);
                            bs.Write(data, 0, insertCount);
                            bs.Position -= insertCount;
                            bs.ReadAll(data2, 0, insertCount);
                            bs.Position -= insertCount;
                            bs.RemoveBytes(insertCount, 100);
                            bs.Position += 100;

                            for (int y = 0; y < insertCount; y++)
                            {
                                if (data[y] != data2[y])
                                {
                                    throw new Exception();
                                }
                            }
                        }
                    }
                }
                rand = new Random(seed);

                bs.Position = 0;

                for (int x = 0; x < 10000; x++)
                {
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        if (bs.ReadUInt8() != *lp)
                        {
                            throw new Exception();
                        }
                    }
                    int skip = rand.Next(40) + 1;
                    bs.Position += skip;
                    bs.Position -= rand.Next(skip);
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        if (bs.ReadInt8() != *(sbyte *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        if (bs.ReadInt16() != *(short *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        if (bs.ReadInt32() != *(int *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        if (bs.ReadInt64() != *(long *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        if (bs.ReadUInt16() != *(ushort *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        if (bs.ReadUInt32() != *(uint *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        if (bs.ReadUInt64() != *(ulong *)lp)
                        {
                            throw new Exception();
                        }
                    }

                    for (int i = 0; i < 9; i++)
                    {
                        rand.NextBytes(data);
                        while (rand.Next(4) < 2)
                        {
                            if (bs.ReadUInt(i) != (mask(i) & *(ulong *)lp))
                            {
                                throw new Exception();
                            }
                        }
                    }

                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        if (bs.ReadDecimal() != *(decimal *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        if (bs.ReadGuid() != *(Guid *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        if (bs.ReadDateTime() != NextDate(data, rand))
                        {
                            throw new Exception();
                        }
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        if (bs.ReadSingle() != NextSingle(data, rand))
                        {
                            throw new Exception();
                        }
                    }
                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        if (bs.ReadDouble() != NextDouble(data, rand))
                        {
                            throw new Exception();
                        }
                    }
                    rand.NextBytes(data);
                    bool b2 = *lp != 0;
                    while (rand.Next(4) < 2)
                    {
                        if (bs.ReadBoolean() != b2)
                        {
                            throw new Exception();
                        }
                    }

                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        if (bs.Read7BitUInt32() != *(uint *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    data[3] = 0;
                    while (rand.Next(4) < 2)
                    {
                        if (bs.Read7BitUInt32() != *(uint *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    data[2] = 0;
                    while (rand.Next(4) < 2)
                    {
                        if (bs.Read7BitUInt32() != *(uint *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    data[1] = 0;
                    while (rand.Next(4) < 2)
                    {
                        if (bs.Read7BitUInt32() != *(uint *)lp)
                        {
                            throw new Exception();
                        }
                    }

                    rand.NextBytes(data);
                    while (rand.Next(4) < 2)
                    {
                        if (bs.Read7BitUInt64() != *(ulong *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    data[7] = 0;
                    while (rand.Next(4) < 2)
                    {
                        if (bs.Read7BitUInt64() != *(ulong *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    data[6] = 0;
                    while (rand.Next(4) < 2)
                    {
                        if (bs.Read7BitUInt64() != *(ulong *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    data[5] = 0;
                    while (rand.Next(4) < 2)
                    {
                        if (bs.Read7BitUInt64() != *(ulong *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    data[4] = 0;
                    while (rand.Next(4) < 2)
                    {
                        if (bs.Read7BitUInt64() != *(ulong *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    data[3] = 0;
                    while (rand.Next(4) < 2)
                    {
                        if (bs.Read7BitUInt64() != *(ulong *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    data[2] = 0;
                    while (rand.Next(4) < 2)
                    {
                        if (bs.Read7BitUInt64() != *(ulong *)lp)
                        {
                            throw new Exception();
                        }
                    }
                    data[1] = 0;
                    while (rand.Next(4) < 2)
                    {
                        if (bs.Read7BitUInt64() != *(ulong *)lp)
                        {
                            throw new Exception();
                        }
                    }

                    rand.NextBytes(data);
                    bs.ReadAll(data2, 0, 16);
                    if (!data2.SequenceEqual(data))
                    {
                        throw new Exception();
                    }

                    while (rand.Next(4) < 2)
                    {
                        if (bs.Position > 100)
                        {
                            int insertCount = rand.Next(16);
                        }
                    }
                }
            }
        }
Exemple #31
0
 public IMAGE_EFFECTS(BinaryStream s)
 {
     NumberOfEffects = s.Read<uint>();
     if (NumberOfEffects > 0)
     {
         for (int i = 0; i < NumberOfEffects; i++)
         {
             ushort SectionEffects = s.Read<ushort>();
             string16 NameEffects = new string16(s);
             Effects.Add(SectionEffects, NameEffects);
         }
         EndOfBlock = s.Read<ushort>();
     }
     else
     {
         EndOfBlock = s.Read<ushort>();
     }
 }
        public void Test()
        {
            MemoryPoolTest.TestMemoryLeak();
            const int        count = 100;
            MemoryPoolStream ms    = new MemoryPoolStream();
            //ms.Write(new byte[100000], 0, 100000);
            //ms.Write(new byte[100000], 0, 100000);
            //ms.Position = 0;
            BinaryStream bs = new BinaryStream(ms);
            Stopwatch    sw = new Stopwatch();
            //DateTime b = DateTime.UtcNow;
            long b = 10;

            //Guid b = Guid.NewGuid() ;
            for (int x2 = 0; x2 < count; x2++)
            {
                bs.Position = 0;
                for (int x = 0; x < count; x++)
                {
                    bs.Write(b);
                    bs.Write(b);
                    bs.Write(b);
                    bs.Write(b);
                    bs.Write(b);
                    bs.Write(b);
                    bs.Write(b);
                    bs.Write(b);
                    bs.Write(b);
                    bs.Write(b);
                }
            }

            sw.Start();
            for (int x2 = 0; x2 < count; x2++)
            {
                bs.Position = 0;
                for (int x = 0; x < count; x++)
                {
                    bs.Write(b);
                    bs.Write(b);
                    bs.Write(b);
                    bs.Write(b);
                    bs.Write(b);
                    bs.Write(b);
                    bs.Write(b);
                    bs.Write(b);
                    bs.Write(b);
                    bs.Write(b);
                    //bs.ReadDecimal();
                    //bs.ReadDecimal();
                    //bs.ReadDecimal();
                    //bs.ReadDecimal();
                    //bs.ReadDecimal();
                    //bs.ReadDecimal();
                    //bs.ReadDecimal();
                    //bs.ReadDecimal();
                    //bs.ReadDecimal();
                    //bs.ReadDecimal();
                    //bs.ReadInt64();
                    //bs.ReadInt64();
                    //bs.ReadInt64();
                    //bs.ReadInt64();
                    //bs.ReadInt64();
                    //bs.ReadInt64();
                    //bs.ReadInt64();
                    //bs.ReadInt64();
                    //bs.ReadInt64();
                    //bs.ReadInt64();
                    //bs.ReadInt32();
                    //bs.ReadInt32();
                    //bs.ReadInt32();
                    //bs.ReadInt32();
                    //bs.ReadInt32();
                    //bs.ReadInt32();
                    //bs.ReadInt32();
                    //bs.ReadInt32();
                    //bs.ReadInt32();
                    //bs.ReadInt32();
                    //bs.ReadInt16();
                    //bs.ReadInt16();
                    //bs.ReadInt16();
                    //bs.ReadInt16();
                    //bs.ReadInt16();
                    //bs.ReadInt16();
                    //bs.ReadInt16();
                    //bs.ReadInt16();
                    //bs.ReadInt16();
                    //bs.ReadInt16();
                    //bs.ReadByte();
                    //bs.ReadByte();
                    //bs.ReadByte();
                    //bs.ReadByte();
                    //bs.ReadByte();
                    //bs.ReadByte();
                    //bs.ReadByte();
                    //bs.ReadByte();
                    //bs.ReadByte();
                    //bs.ReadByte();
                    //bs.Write7Bit(b);
                    //bs.Write7Bit(b);
                    //bs.Write7Bit(b);
                    //bs.Write7Bit(b);
                    //bs.Write7Bit(b);
                    //bs.Write7Bit(b);
                    //bs.Write7Bit(b);
                    //bs.Write7Bit(b);
                    //bs.Write7Bit(b);
                    //bs.Write7Bit(b);
                }
            }
            sw.Stop();
            Assert.IsTrue(true);
            ms.Dispose();
            MemoryPoolTest.TestMemoryLeak();
            //MessageBox.Show((count * count * 10 / sw.Elapsed.TotalSeconds / 1000000).ToString());
        }
Exemple #33
0
            public Joints_3D(BinaryStream s)
            {
                Keys_Parent = s.Read<uint>();
                Keys_Child = s.Read<uint>();
                Keys_03 = s.Read<uint>();
                Keys_04 = s.Read<uint>();
                TypeCommands = s.Read<uint>();
                NameJoints = new string32(s);
                Joints_Parent_ROOT = new VertexAni4[Keys_Parent];
                Joints_Child = new VertexAni5[Keys_Child];
                Joints_Kadrs_03 = new VertexAni5[Keys_03];
                Joints_Kadrs_04 = new VertexAni5[Keys_04];

                for (int i = 0; i < Keys_Parent; i++)
                    Joints_Parent_ROOT[i] = new VertexAni4(s);

                for (int i = 0; i < Keys_Child; i++)
                    Joints_Child[i] = new VertexAni5(s);

                for (int i = 0; i < Keys_03; i++)
                    Joints_Kadrs_03[i] = new VertexAni5(s);

                for (int i = 0; i < Keys_04; i++)
                    Joints_Kadrs_04[i] = new VertexAni5(s);

                if (s.Position != s.Length)
                    Vertex = new Vertex4_6(s);
            }
Exemple #34
0
 protected virtual void vmethod_2(BinaryStream binaryStream_0)
 {
     binaryStream_0.smethod_4(U.smethod_0(this.int_0, 7) | this.int_0 << 25);
     binaryStream_0.smethod_7(-25375);
     binaryStream_0.smethod_7(-15898);
 }
Exemple #35
0
 public string16(BinaryStream s)
 {
     short l = s.Read<short>();
     this.s = string.Empty;
     for (int i = 0; i < l; i++)
         this.s = this.s + (char)s.Read<byte>();
 }
Exemple #36
0
 public virtual void imethod_2(BinaryStream binaryStream_0)
 {
     binaryStream_0.smethod_7(-12598);
 }
Exemple #37
0
 public Vertex4(BinaryStream s)
 {
     Pos = s.Read<Vector3>();
     Quaternion = s.Read<float>();
 }
Exemple #38
0
 public virtual void imethod_1(BinaryStream binaryStream_0)
 {
     this.double_0 = binaryStream_0.ReadDouble();
     this.double_1 = binaryStream_0.ReadDouble();
     this.double_2 = binaryStream_0.ReadDouble();
 }
Exemple #39
0
 public Vertex6(BinaryStream s)
 {
     Pos = s.Read<Vector3>();
     Orient = new Quaternion(s.Read<float>(), s.Read<float>(), s.Read<float>(), 0);
     float t = 1.0f - (Orient.X * Orient.X) - (Orient.Y * Orient.Y) - (Orient.Z * Orient.Z);
     if (t <= 0.0f)
     {
         Orient.W = 0.0f;
     }
     else
     {
         Orient.W = -(float)Math.Sqrt(t);
     }
     Orient.Normalize();
 }
Exemple #40
0
 public virtual void HrqIugnatr8(BinaryStream binaryStream_0)
 {
     this.string_0 = binaryStream_0.smethod_2();
     this.double_0 = binaryStream_0.ReadDouble();
 }
Exemple #41
0
 public VertexAni5(BinaryStream s)
 {
     Pos = s.Read<Vector3>();
     Quaternion = s.Read<float>();
     TimeKadrAlfa = s.Read<float>();
 }
Exemple #42
0
 protected virtual void vmethod_2(BinaryStream binaryStream_0)
 {
     binaryStream_0.smethod_3(this.string_0);
     binaryStream_0.WriteDouble(this.double_0);
 }
Exemple #43
0
 public HeaderXmot(BinaryStream s)
 {
     ResMagic = s.Read<uint>();
     ResClass = s.Read<uint>();
     PropOffset = s.Read<uint>();
     PropLength = s.Read<uint>();
     DataOffset = s.Read<uint>();
     DataLength = s.Read<uint>();
     RawDateTime = s.Read<uint>();
     RawFileExt = new char[8];
     for (int i = 0; i < 8; i++)
         RawFileExt[i] = (char)s.Read<byte>();
     s.Position = PropOffset;
     header = new IMAGE_XMOT_HEADERS(s);
     s.Position = DataOffset;
     data = new IMAGE_BONE_3D(s);
 }
Exemple #44
0
 public virtual void imethod_1(BinaryStream binaryStream_0)
 {
 }
Exemple #45
0
 public virtual void imethod_2(BinaryStream binaryStream_0)
 {
     binaryStream_0.smethod_7(-24050);
 }
Exemple #46
0
 public override void Initialize(Stream input)
 {
     m_input = BinaryStream.FromStream(input, "");
 }