diff --git a/GHNamespace1/Class10.cs b/GHNamespace1/Class10.cs index 5f78e63..73fdb0e 100644 --- a/GHNamespace1/Class10.cs +++ b/GHNamespace1/Class10.cs @@ -39,7 +39,7 @@ public struct Struct7 [Guid("0000000c-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] - public interface Interface0 + public interface INterface0 { void imethod_0(IntPtr pv, uint cb, out uint pcbRead); @@ -49,7 +49,7 @@ public interface Interface0 void imethod_3(ulong libNewSize); - void imethod_4(Interface0 pstm, ulong cb, out ulong pcbRead, out ulong pcbWritten); + void imethod_4(INterface0 pstm, ulong cb, out ulong pcbRead, out ulong pcbWritten); void imethod_5(uint grfCommitFlags); @@ -61,16 +61,16 @@ public interface Interface0 void imethod_9(out Struct7 pstatstg, uint grfStatFlag); - void imethod_10(out Interface0 ppstm); + void imethod_10(out INterface0 ppstm); } [Guid("7c23ff90-33af-11d3-95da-00a024a85b51"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] - public interface Interface1 + public interface INterface1 { - void imethod_0(Interface2 pName); + void imethod_0(INterface2 pName); - void imethod_1(out Interface2 ppName); + void imethod_1(out INterface2 ppName); void imethod_2([MarshalAs(UnmanagedType.LPWStr)] string szName, int pvValue, uint cbValue, uint dwFlags); @@ -82,7 +82,7 @@ void imethod_3([MarshalAs(UnmanagedType.LPWStr)] string szName, out int pvValue, [Guid("CD193BC0-B4BC-11d2-9833-00C04FC31D2E"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] - public interface Interface2 + public interface INterface2 { [PreserveSig] int imethod_0(uint propertyId, IntPtr pvProperty, uint cbProperty); @@ -97,7 +97,7 @@ public interface Interface2 int imethod_3(IntPtr szDisplayName, ref uint pccDisplayName, uint dwDisplayFlags); [PreserveSig] - int imethod_4(object refIid, object pAsmBindSink, Interface1 pApplicationContext, + int imethod_4(object refIid, object pAsmBindSink, INterface1 pApplicationContext, [MarshalAs(UnmanagedType.LPWStr)] string szCodeBase, long llFlags, int pvReserved, uint cbReserved, out int ppv); @@ -108,20 +108,20 @@ int imethod_4(object refIid, object pAsmBindSink, Interface1 pApplicationContext int imethod_6(out uint pdwVersionHi, out uint pdwVersionLow); [PreserveSig] - int imethod_7(Interface2 pName, uint dwCmpFlags); + int imethod_7(INterface2 pName, uint dwCmpFlags); [PreserveSig] - int imethod_8(out Interface2 pName); + int imethod_8(out INterface2 pName); } [Guid("9e3aaeb4-d1cd-11d2-bab9-00c04f8eceae"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] - public interface Interface3 + public interface INterface3 { void imethod_0([MarshalAs(UnmanagedType.LPWStr)] string pszName, uint dwFormat, uint dwFlags, - uint dwMaxSize, out Interface0 ppStream); + uint dwMaxSize, out INterface0 ppStream); - void imethod_1(Interface2 pName); + void imethod_1(INterface2 pName); void imethod_2(uint dwFlags); @@ -130,7 +130,7 @@ void imethod_0([MarshalAs(UnmanagedType.LPWStr)] string pszName, uint dwFormat, [Guid("e707dcde-d1cd-11d2-bab9-00c04f8eceae"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] - public interface Interface4 + public interface INterface4 { [PreserveSig] int imethod_0(uint dwFlags, [MarshalAs(UnmanagedType.LPWStr)] string pszAssemblyName, IntPtr pvReserved, @@ -140,7 +140,7 @@ int imethod_0(uint dwFlags, [MarshalAs(UnmanagedType.LPWStr)] string pszAssembly int imethod_1(uint dwFlags, [MarshalAs(UnmanagedType.LPWStr)] string pszAssemblyName, IntPtr pAsmInfo); [PreserveSig] - int imethod_2(uint dwFlags, IntPtr pvReserved, out Interface3 ppAsmItem, + int imethod_2(uint dwFlags, IntPtr pvReserved, out INterface3 ppAsmItem, [MarshalAs(UnmanagedType.LPWStr)] string pszAssemblyName); [PreserveSig] @@ -152,12 +152,11 @@ int imethod_4(uint dwFlags, [MarshalAs(UnmanagedType.LPWStr)] string pszManifest } [DllImport("fusion", CharSet = CharSet.Auto)] - public static extern int CreateAssemblyCache(out Interface4 ppAsmCache, uint dwReserved); + public static extern int CreateAssemblyCache(out INterface4 ppAsmCache, uint dwReserved); public static bool smethod_0(string string0) { - Interface4 @interface = null; - var num = CreateAssemblyCache(out @interface, 0u); + int num = CreateAssemblyCache(out INterface4 @interface, 0u); if (num != 0) { return false; diff --git a/GHNamespace1/Class11.cs b/GHNamespace1/Class11.cs index b98f916..a0268ae 100644 --- a/GHNamespace1/Class11.cs +++ b/GHNamespace1/Class11.cs @@ -86,7 +86,7 @@ public static float smethod_15(int int0) public static byte smethod_16(double double0) { - var num = Math.Round(double0 * 127.0) + 128.0; + double num = Math.Round(double0 * 127.0) + 128.0; if (num > 255.0) { return 255; @@ -105,7 +105,7 @@ public static byte smethod_17(float float0) public static sbyte smethod_18(double double0) { - var num = Math.Round(double0 * 127.0); + double num = Math.Round(double0 * 127.0); if (num > 127.0) { return 127; @@ -124,7 +124,7 @@ public static sbyte smethod_19(float float0) public static short smethod_20(double double0) { - var num = Math.Round(double0 * 32767.0); + double num = Math.Round(double0 * 32767.0); if (num > 32767.0) { return 32767; @@ -143,7 +143,7 @@ public static short smethod_21(float float0) public static Struct8 smethod_22(double double0) { - var num = Math.Round(double0 * 8388607.0); + double num = Math.Round(double0 * 8388607.0); return Struct8.smethod_1((num > 8388607.0) ? 8388607 : ((num < -8388608.0) ? -8388608 : ((int) num))); } @@ -154,7 +154,7 @@ public static Struct8 smethod_23(float float0) public static int smethod_24(double double0) { - var num = Math.Round(double0 * 2147483647.0); + double num = Math.Round(double0 * 2147483647.0); if (num > 2147483647.0) { return 2147483647; diff --git a/GHNamespace1/Class12.cs b/GHNamespace1/Class12.cs index 901ba7c..48afa8f 100644 --- a/GHNamespace1/Class12.cs +++ b/GHNamespace1/Class12.cs @@ -12,7 +12,7 @@ public Class12(INterface5[] interface50) public virtual void imethod_0(Class13[] class130) { - foreach (var current in this) + foreach (INterface5 current in this) { current.imethod_0(class130); } diff --git a/GHNamespace1/Class2.cs b/GHNamespace1/Class2.cs index 1ef68d9..c87ca2a 100644 --- a/GHNamespace1/Class2.cs +++ b/GHNamespace1/Class2.cs @@ -174,7 +174,7 @@ public Class3(byte[] byte0) private bool method_0() { - var i = _class50.method_4(); + int i = _class50.method_4(); while (i >= 258) { int num; @@ -216,7 +216,7 @@ private bool method_0() if (_int5 > 0) { _int4 = 10; - var num2 = _class40.method_0(_int5); + int num2 = _class40.method_0(_int5); if (num2 < 0) { return false; @@ -241,7 +241,7 @@ private bool method_0() if (_int5 > 0) { _int4 = 8; - var num3 = _class40.method_0(_int5); + int num3 = _class40.method_0(_int5); if (num3 < 0) { return false; @@ -266,7 +266,7 @@ private bool method_1() _int4 = 12; return false; } - var num = _class40.method_0(3); + int num = _class40.method_0(3); if (num < 0) { return false; @@ -327,7 +327,7 @@ private bool method_1() default: return false; } - var num2 = _class40.method_0(16); + int num2 = _class40.method_0(16); if (num2 < 0) { return false; @@ -335,7 +335,7 @@ private bool method_1() _class40.method_1(16); _int4 = 5; IL_137: - var num3 = _class50.method_3(_class40, _int8); + int num3 = _class50.method_3(_class40, _int8); _int8 -= num3; if (_int8 == 0) { @@ -349,12 +349,12 @@ private bool method_1() public int method_2(byte[] byte0, int int9, int int10) { - var num = 0; + int num = 0; while (true) { if (_int4 != 11) { - var num2 = _class50.method_6(byte0, int9, int10); + int num2 = _class50.method_6(byte0, int9, int10); int9 += num2; num += num2; int10 -= num2; @@ -434,7 +434,7 @@ public bool method_5() public int method_6(byte[] byte1, int int3, int int4) { - var num = 0; + int num = 0; while (_int2 > 0 && int4 > 0) { byte1[int3++] = (byte) _uint0; @@ -447,7 +447,7 @@ public int method_6(byte[] byte1, int int3, int int4) { return num; } - var num2 = _int1 - _int0; + int num2 = _int1 - _int0; if (int4 > num2) { int4 = num2; @@ -468,7 +468,7 @@ public void method_7(byte[] byte1, int int3, int int4) { throw new InvalidOperationException(); } - var num = int3 + int4; + int num = int3 + int4; if (0 <= int3 && int3 <= num && num <= byte1.Length) { if ((int4 & 1) != 0) @@ -523,8 +523,8 @@ public void method_2(int int4, int int5) { throw new InvalidOperationException(); } - var num = _int2 - int5 & Int1; - var num2 = Int0 - int4; + int num = _int2 - int5 & Int1; + int num2 = Int0 - int4; if (num > num2 || _int2 >= num2) { method_1(num, int4, int5); @@ -545,7 +545,7 @@ public void method_2(int int4, int int5) public int method_3(Class4 class40, int int4) { int4 = Math.Min(Math.Min(int4, Int0 - _int3), class40.method_3()); - var num = Int0 - _int2; + int num = Int0 - _int2; int num2; if (int4 > num) { @@ -576,7 +576,7 @@ public int method_5() public int method_6(byte[] byte1, int int4, int int5) { - var num = _int2; + int num = _int2; if (int5 > _int3) { int5 = _int3; @@ -585,8 +585,8 @@ public int method_6(byte[] byte1, int int4, int int5) { num = (_int2 - _int3 + int5 & Int1); } - var num2 = int5; - var num3 = int5 - num; + int num2 = int5; + int num3 = int5 - num; if (num3 > 0) { Array.Copy(_byte0, Int0 - num3, byte1, int4, num3); @@ -616,8 +616,8 @@ public class Class6 static Class6() { Int0 = 15; - var array = new byte[288]; - var i = 0; + byte[] array = new byte[288]; + int i = 0; while (i < 144) { array[i++] = 8; @@ -651,9 +651,9 @@ public Class6(byte[] byte0) private void method_0(byte[] byte0) { - var array = new int[Int0 + 1]; - var array2 = new int[Int0 + 1]; - for (var i = 0; i < byte0.Length; i++) + int[] array = new int[Int0 + 1]; + int[] array2 = new int[Int0 + 1]; + for (int i = 0; i < byte0.Length; i++) { int num = byte0[i]; if (num > 0) @@ -661,33 +661,33 @@ private void method_0(byte[] byte0) array[num]++; } } - var num2 = 0; - var num3 = 512; - for (var j = 1; j <= Int0; j++) + int num2 = 0; + int num3 = 512; + for (int j = 1; j <= Int0; j++) { array2[j] = num2; num2 += array[j] << 16 - j; if (j >= 10) { - var num4 = array2[j] & 130944; - var num5 = num2 & 130944; + int num4 = array2[j] & 130944; + int num5 = num2 & 130944; num3 += num5 - num4 >> 16 - j; } } _short0 = new short[num3]; - var num6 = 512; - for (var k = Int0; k >= 10; k--) + int num6 = 512; + for (int k = Int0; k >= 10; k--) { - var num7 = num2 & 130944; + int num7 = num2 & 130944; num2 -= array[k] << 16 - k; - var num8 = num2 & 130944; - for (var l = num8; l < num7; l += 128) + int num8 = num2 & 130944; + for (int l = num8; l < num7; l += 128) { _short0[Class8.smethod_0(l)] = (short) (-num6 << 4 | k); num6 += 1 << k - 9; } } - for (var m = 0; m < byte0.Length; m++) + for (int m = 0; m < byte0.Length; m++) { int num9 = byte0[m]; if (num9 != 0) @@ -705,7 +705,7 @@ private void method_0(byte[] byte0) else { int num11 = _short0[num10 & 511]; - var num12 = 1 << (num11 & 15); + int num12 = 1 << (num11 & 15); num11 = -(num11 >> 4); do { @@ -729,15 +729,15 @@ public int method_1(Class4 class40) class40.method_1(num2 & 15); return num2 >> 4; } - var num3 = -(num2 >> 4); - var int_ = num2 & 15; + int num3 = -(num2 >> 4); + int int_ = num2 & 15; if ((num = class40.method_0(int_)) >= 0) { num2 = _short0[num3 | num >> 9]; class40.method_1(num2 & 15); return num2 >> 4; } - var num4 = class40.method_2(); + int num4 = class40.method_2(); num = class40.method_0(num4); num2 = _short0[num3 | num >> 9]; if ((num2 & 15) <= num4) @@ -749,7 +749,7 @@ public int method_1(Class4 class40) } else { - var num5 = class40.method_2(); + int num5 = class40.method_2(); num = class40.method_0(num5); int num2 = _short0[num]; if (num2 >= 0 && (num2 & 15) <= num5) @@ -876,7 +876,7 @@ public bool method_0(Class4 class40) IL_156: while (_int8 < _int5) { - var num2 = class40.method_0(3); + int num2 = class40.method_0(3); if (num2 < 0) { return false; @@ -891,8 +891,8 @@ public bool method_0(Class4 class40) _int2 = 4; goto IL_E1; IL_2C: - var num3 = Int1[_int7]; - var num4 = class40.method_0(num3); + int num3 = Int1[_int7]; + int num4 = class40.method_0(num3); if (num4 < 0) { return false; @@ -939,14 +939,14 @@ public bool method_0(Class4 class40) public Class6 method_1() { - var destinationArray = new byte[_int3]; + byte[] destinationArray = new byte[_int3]; Array.Copy(_byte1, 0, destinationArray, 0, _int3); return new Class6(destinationArray); } public Class6 method_2() { - var destinationArray = new byte[_int4]; + byte[] destinationArray = new byte[_int4]; Array.Copy(_byte1, _int3, destinationArray, 0, _int4); return new Class6(destinationArray); } @@ -958,7 +958,7 @@ public class Class8 private static readonly int Int2; - private static int[] _int8; + private static readonly int[] _int8; private static readonly byte[] Byte0; @@ -1023,7 +1023,7 @@ static Class8() }; Short0 = new short[Int1]; Byte1 = new byte[Int1]; - var i = 0; + int i = 0; while (i < 144) { Short0[i] = smethod_0(48 + i << 8); @@ -1073,14 +1073,14 @@ public Stream0(byte[] byte0) : base(byte0, false) public static byte[] smethod_0(byte[] byte0) { - var stream = new Stream0(byte0); - var array = new byte[0]; - var num = stream.method_1(); + Stream0 stream = new Stream0(byte0); + byte[] array = new byte[0]; + int num = stream.method_1(); if (num == 67324752) { - var num2 = (short) stream.method_0(); - var num3 = stream.method_0(); - var num4 = stream.method_0(); + short num2 = (short) stream.method_0(); + int num3 = stream.method_0(); + int num4 = stream.method_0(); if (num == 67324752 && num2 == 20 && num3 == 0) { if (num4 == 8) @@ -1088,22 +1088,22 @@ public static byte[] smethod_0(byte[] byte0) stream.method_1(); stream.method_1(); stream.method_1(); - var num5 = stream.method_1(); - var num6 = stream.method_0(); - var num7 = stream.method_0(); + int num5 = stream.method_1(); + int num6 = stream.method_0(); + int num7 = stream.method_0(); if (num6 > 0) { - var buffer = new byte[num6]; + byte[] buffer = new byte[num6]; stream.Read(buffer, 0, num6); } if (num7 > 0) { - var buffer2 = new byte[num7]; + byte[] buffer2 = new byte[num7]; stream.Read(buffer2, 0, num7); } - var array2 = new byte[stream.Length - stream.Position]; + byte[] array2 = new byte[stream.Length - stream.Position]; stream.Read(array2, 0, array2.Length); - var @class = new Class3(array2); + Class3 @class = new Class3(array2); array = new byte[num5]; @class.method_2(array, 0, array.Length); goto IL_1FF; @@ -1111,7 +1111,7 @@ public static byte[] smethod_0(byte[] byte0) } throw new FormatException("Wrong Header Signature"); } - var num8 = num >> 24; + int num8 = num >> 24; num -= num8 << 24; if (num != 8223355) { @@ -1119,23 +1119,24 @@ public static byte[] smethod_0(byte[] byte0) } if (num8 == 1) { - var num9 = stream.method_1(); + int num9 = stream.method_1(); array = new byte[num9]; int num11; - for (var i = 0; i < num9; i += num11) + for (int i = 0; i < num9; i += num11) { - var num10 = stream.method_1(); + int num10 = stream.method_1(); num11 = stream.method_1(); - var array3 = new byte[num10]; + byte[] array3 = new byte[num10]; stream.Read(array3, 0, array3.Length); - var class2 = new Class3(array3); + Class3 class2 = new Class3(array3); class2.method_2(array, i, num11); } } if (num8 == 2) { - var dEsCryptoServiceProvider = new DESCryptoServiceProvider(); - dEsCryptoServiceProvider.Key = new byte[] + DESCryptoServiceProvider dEsCryptoServiceProvider = new DESCryptoServiceProvider + { + Key = new byte[] { 162, 181, @@ -1145,8 +1146,8 @@ public static byte[] smethod_0(byte[] byte0) 202, 205, 58 - }; - dEsCryptoServiceProvider.IV = new byte[] + }, + IV = new byte[] { 83, 253, @@ -1156,9 +1157,10 @@ public static byte[] smethod_0(byte[] byte0) 112, 167, 112 + } }; - var cryptoTransform = dEsCryptoServiceProvider.CreateDecryptor(); - var byte_ = cryptoTransform.TransformFinalBlock(byte0, 4, byte0.Length - 4); + ICryptoTransform cryptoTransform = dEsCryptoServiceProvider.CreateDecryptor(); + byte[] byte_ = cryptoTransform.TransformFinalBlock(byte0, 4, byte0.Length - 4); dEsCryptoServiceProvider.Clear(); array = smethod_0(byte_); } diff --git a/GHNamespace1/QBModifiedCheck.cs b/GHNamespace1/QBModifiedCheck.cs index 9f4c140..58ab2d1 100644 --- a/GHNamespace1/QBModifiedCheck.cs +++ b/GHNamespace1/QBModifiedCheck.cs @@ -7,7 +7,7 @@ public static class QbModifiedCheck { private static ModuleHandle _moduleHandle0; - private static char[] _char0; + private static readonly char[] _char0; public static void smethod_0(int int0) { @@ -207,7 +207,7 @@ static QbModifiedCheck() '\u009e', '\u009f' }; - var typeFromHandle = typeof(MulticastDelegate); + Type typeFromHandle = typeof(MulticastDelegate); if (typeFromHandle != null) { _moduleHandle0 = Assembly.GetExecutingAssembly().GetModules()[0].ModuleHandle; diff --git a/GHNamespace1/Stream1.cs b/GHNamespace1/Stream1.cs index 948f258..9210840 100644 --- a/GHNamespace1/Stream1.cs +++ b/GHNamespace1/Stream1.cs @@ -29,24 +29,24 @@ public virtual Stream vmethod_2() public virtual int vmethod_3(IntPtr intptr0, int int2) { - var array = new byte[int2]; - var num = Read(array, 0, int2); + byte[] array = new byte[int2]; + int num = Read(array, 0, int2); Marshal.Copy(array, 0, intptr0, num); return num; } public virtual int vmethod_4(float[] float0, int int2, int int3) { - var num = vmethod_0().short_2 + 7 >> 3; - var array = new byte[num * int3]; - var num2 = Read(array, num * int2, array.Length) / num; - var num3 = int2 + num2; - var short_ = vmethod_0().short_2; + int num = vmethod_0().short_2 + 7 >> 3; + byte[] array = new byte[num * int3]; + int num2 = Read(array, num * int2, array.Length) / num; + int num3 = int2 + num2; + short short_ = vmethod_0().short_2; if (short_ <= 16) { if (short_ == 8) { - for (var i = 0; i < num3; i++) + for (int i = 0; i < num3; i++) { float0[int2 + i] = Class11.smethod_3(array[i]); } @@ -54,7 +54,7 @@ public virtual int vmethod_4(float[] float0, int int2, int int3) } if (short_ == 16) { - var num4 = 0; + int num4 = 0; while (int2 < num3) { float0[int2] = Class11.smethod_7(BitConverter.ToInt16(array, num4)); @@ -68,7 +68,7 @@ public virtual int vmethod_4(float[] float0, int int2, int int3) { if (short_ == 24) { - var num5 = 0; + int num5 = 0; while (int2 < num3) { float0[int2] = Class11.smethod_11(Struct8.smethod_2(array, num5)); @@ -83,7 +83,7 @@ public virtual int vmethod_4(float[] float0, int int2, int int3) { if (vmethod_0().waveFormatTag_0 == WaveFormatTag.IeeeFloat) { - var num6 = 0; + int num6 = 0; while (int2 < num3) { float0[int2] = Class11.smethod_26(BitConverter.ToDouble(array, num6)); @@ -101,7 +101,7 @@ public virtual int vmethod_4(float[] float0, int int2, int int3) Buffer.BlockCopy(array, 0, float0, int2 << 2, num2); return num2; } - var num7 = 0; + int num7 = 0; while (int2 < num3) { float0[int2] = Class11.smethod_15(BitConverter.ToInt32(array, num7)); @@ -116,26 +116,26 @@ public virtual int vmethod_4(float[] float0, int int2, int int3) public virtual float[][] vmethod_5(int int2) { - var num = vmethod_0().short_2 + 7 >> 3; - var array = new byte[num * int2 * WaveFormat0.short_0]; - var num2 = Read(array, 0, array.Length) / num / WaveFormat0.short_0; + int num = vmethod_0().short_2 + 7 >> 3; + byte[] array = new byte[num * int2 * WaveFormat0.short_0]; + int num2 = Read(array, 0, array.Length) / num / WaveFormat0.short_0; if (num2 <= 0) { return null; } int short_ = WaveFormat0.short_0; - var num3 = num * short_; - var array2 = new float[short_][]; - var short2 = vmethod_0().short_2; + int num3 = num * short_; + float[][] array2 = new float[short_][]; + short short2 = vmethod_0().short_2; if (short2 <= 16) { if (short2 == 8) { - for (var i = 0; i < short_; i++) + for (int i = 0; i < short_; i++) { - var array3 = array2[i] = new float[num2]; - var j = 0; - var num4 = i; + float[] array3 = array2[i] = new float[num2]; + int j = 0; + int num4 = i; while (j < array3.Length) { array3[j] = Class11.smethod_3(array[num4]); @@ -147,11 +147,11 @@ public virtual float[][] vmethod_5(int int2) } if (short2 == 16) { - for (var k = 0; k < short_; k++) + for (int k = 0; k < short_; k++) { - var array4 = array2[k] = new float[num2]; - var l = 0; - var num5 = num * k; + float[] array4 = array2[k] = new float[num2]; + int l = 0; + int num5 = num * k; while (l < array4.Length) { array4[l] = Class11.smethod_7(BitConverter.ToInt16(array, num5)); @@ -166,11 +166,11 @@ public virtual float[][] vmethod_5(int int2) { if (short2 == 24) { - for (var m = 0; m < short_; m++) + for (int m = 0; m < short_; m++) { - var array5 = array2[m] = new float[num2]; - var n = 0; - var num6 = num * m; + float[] array5 = array2[m] = new float[num2]; + int n = 0; + int num6 = num * m; while (n < array5.Length) { array5[n] = Class11.smethod_11(Struct8.smethod_2(array, num6)); @@ -186,11 +186,11 @@ public virtual float[][] vmethod_5(int int2) { if (vmethod_0().waveFormatTag_0 == WaveFormatTag.IeeeFloat) { - for (var num7 = 0; num7 < short_; num7++) + for (int num7 = 0; num7 < short_; num7++) { - var array6 = array2[num7] = new float[num2]; - var num8 = 0; - var num9 = num * num7; + float[] array6 = array2[num7] = new float[num2]; + int num8 = 0; + int num9 = num * num7; while (num8 < array6.Length) { array6[num8] = Class11.smethod_26(BitConverter.ToDouble(array, num9)); @@ -206,11 +206,11 @@ public virtual float[][] vmethod_5(int int2) { if (vmethod_0().waveFormatTag_0 != WaveFormatTag.IeeeFloat) { - for (var num10 = 0; num10 < short_; num10++) + for (int num10 = 0; num10 < short_; num10++) { - var array7 = array2[num10] = new float[num2]; - var num11 = 0; - var num12 = num * num10; + float[] array7 = array2[num10] = new float[num2]; + int num11 = 0; + int num12 = num * num10; while (num11 < array7.Length) { array7[num11] = Class11.smethod_15(BitConverter.ToInt32(array, num12)); @@ -225,11 +225,11 @@ public virtual float[][] vmethod_5(int int2) Buffer.BlockCopy(array, 0, array2[0], 0, array.Length); return array2; } - for (var num13 = 0; num13 < short_; num13++) + for (int num13 = 0; num13 < short_; num13++) { - var array8 = array2[num13] = new float[num2]; - var num14 = 0; - var num15 = num * num13; + float[] array8 = array2[num13] = new float[num2]; + int num14 = 0; + int num15 = num * num13; while (num14 < array8.Length) { array8[num14] = BitConverter.ToSingle(array, num15); diff --git a/GHNamespace1/Stream2.cs b/GHNamespace1/Stream2.cs index 9ac9e61..34989f1 100644 --- a/GHNamespace1/Stream2.cs +++ b/GHNamespace1/Stream2.cs @@ -37,10 +37,10 @@ public override long Position get => _long1; set { - var num = value / (double) (WaveFormat0.int_0 * WaveFormat0.short_1); - for (var i = 0; i < _list0.Count; i++) + double num = value / (double) (WaveFormat0.int_0 * WaveFormat0.short_1); + for (int i = 0; i < _list0.Count; i++) { - var num2 = Convert.ToInt64(_list0[i].vmethod_0().int_0 * _list0[i].vmethod_0().short_1 * num); + long num2 = Convert.ToInt64(_list0[i].vmethod_0().int_0 * _list0[i].vmethod_0().short_1 * num); _list0[i].Position = ((_list0[i].Length < num2) ? _list0[i].Length : num2); } _long1 = value; @@ -66,11 +66,11 @@ public Stream2(Enum2 enum21, ushort ushort0, bool bool2, GenericAudioStream[] st _bool0 = (stream10.Length == 1 && stream10[0].vmethod_0().short_0 == 1 && ushort0 < 2); _long1 = 0L; _long0 = stream10[0].Length; - var val = 0; - var num = 0; - for (var i = 0; i < stream10.Length; i++) + int val = 0; + int num = 0; + for (int i = 0; i < stream10.Length; i++) { - var stream = stream10[i]; + GenericAudioStream stream = stream10[i]; val = Math.Max(val, stream.vmethod_0().int_0); if (_bool1) { @@ -84,9 +84,9 @@ public Stream2(Enum2 enum21, ushort ushort0, bool bool2, GenericAudioStream[] st } WaveFormat0 = new WaveFormat(val, (ushort0 != 0) ? ushort0 : Math.Min(num, smethod_0(_enum20) * (_bool1 ? stream10.Length : 1))); - for (var j = 0; j < stream10.Length; j++) + for (int j = 0; j < stream10.Length; j++) { - var stream2 = stream10[j]; + GenericAudioStream stream2 = stream10[j]; _long0 = Math.Max(_long0, Convert.ToInt64( WaveFormat0.int_0 * WaveFormat0.short_1 * stream2.vmethod_1().TimeSpan0.TotalSeconds)); @@ -131,8 +131,8 @@ public void method_0(INterface5[] interface50) public override int vmethod_3(IntPtr intptr0, int int3) { int3 >>= 2; - var array = new float[int3]; - var num = vmethod_4(array, 0, int3); + float[] array = new float[int3]; + int num = vmethod_4(array, 0, int3); Marshal.Copy(array, 0, intptr0, num); return num << 2; } @@ -143,8 +143,8 @@ public override int vmethod_4(float[] float0, int int3, int int4) { return 0; } - var num = 0; - var int5 = (int) (_long1 >> 2); + int num = 0; + int int5 = (int) (_long1 >> 2); if (_bool0) { num = _list0[0].vmethod_4(float0, int3, int4); @@ -160,24 +160,24 @@ public override int vmethod_4(float[] float0, int int3, int int4) _long1 += (long) num << 2; return num; } - var array = vmethod_5(int4 / WaveFormat0.short_0); + float[][] array = vmethod_5(int4 / WaveFormat0.short_0); if (array == null) { return 0; } - var array2 = array; - for (var i = 0; i < array2.Length; i++) + float[][] array2 = array; + for (int i = 0; i < array2.Length; i++) { - var array3 = array2[i]; + float[] array3 = array2[i]; num = Math.Max(array3.Length, num); } num *= WaveFormat0.short_0; - var num2 = array.Length; - for (var j = 0; j < num2; j++) + int num2 = array.Length; + for (int j = 0; j < num2; j++) { - var array4 = array[j]; - var k = 0; - var num3 = int3 + j; + float[] array4 = array[j]; + int k = 0; + int num3 = int3 + j; while (k < array4.Length) { float0[num3] = array4[k]; @@ -194,10 +194,10 @@ public override float[][] vmethod_5(int int3) { return null; } - var num = (int) (_long1 >> 2); + int num = (int) (_long1 >> 2); if (_bool0) { - var array = _list0[0].vmethod_5(int3); + float[][] array = _list0[0].vmethod_5(int3); if (array == null) { _long1 = _long0; @@ -210,11 +210,11 @@ public override float[][] vmethod_5(int int3) _long1 += array[0].Length * _int2; return array; } - var num2 = 0; - var num3 = 0; - var list = new List(); - var list2 = new List(); - var i = 0; + int num2 = 0; + int num3 = 0; + List list = new List(); + List list2 = new List(); + int i = 0; while (i < _list0.Count) { float[][] array2; @@ -224,12 +224,12 @@ public override float[][] vmethod_5(int int3) .vmethod_5((int) (int3 * (_list0[i].vmethod_0().int_0 / (double) WaveFormat0.int_0))); if (array2 != null) { - var float_ = _list0[i].vmethod_0().int_0 / (float) WaveFormat0.int_0; - for (var j = 0; j < array2.Length; j++) + float float_ = _list0[i].vmethod_0().int_0 / (float) WaveFormat0.int_0; + for (int j = 0; j < array2.Length; j++) { if ((_enum20 & (Enum2) (1 << j)) != 0) { - var @class = new Class13(num / WaveFormat0.short_0, array2[j]); + Class13 @class = new Class13(num / WaveFormat0.short_0, array2[j]); smethod_1(@class, float_); array2[j] = @class.Float0; } @@ -253,10 +253,10 @@ public override float[][] vmethod_5(int int3) { if (array2.Length < WaveFormat0.short_0) { - var array3 = new float[WaveFormat0.short_0][]; + float[][] array3 = new float[WaveFormat0.short_0][]; Array.Copy(array2, array3, array2.Length); - var k = array2.Length; - var num4 = 0; + int k = array2.Length; + int num4 = 0; while (k < array3.Length) { if ((_enum20 & (Enum2) (1 << k - array2.Length)) != 0) @@ -271,7 +271,7 @@ public override float[][] vmethod_5(int int3) } num3 = 0; } - for (var l = 0; l < array2.Length; l++) + for (int l = 0; l < array2.Length; l++) { if ((_enum20 & (Enum2) (1 << l)) != 0) { @@ -286,8 +286,8 @@ public override float[][] vmethod_5(int int3) List list3; int index; (list3 = list2)[index = num3] = list3[index] + 1; - var class2 = list[num3]; - var class3 = new Class13(num / WaveFormat0.short_0, array2[l]); + Class13 class2 = list[num3]; + Class13 class3 = new Class13(num / WaveFormat0.short_0, array2[l]); if (num2 < array2[l].Length) { smethod_2(class3, class2); @@ -309,15 +309,15 @@ public override float[][] vmethod_5(int int3) _long1 = _long0; return null; } - var num5 = 0; + int num5 = 0; while (num5 < list.Count && list2[num5] > 1) { smethod_3(list[num5], 1f / list2[num5]); num5++; } _class120.imethod_0(list.ToArray()); - var array4 = new float[list.Count][]; - for (var m = 0; m < array4.Length; m++) + float[][] array4 = new float[list.Count][]; + for (int m = 0; m < array4.Length; m++) { array4[m] = list[m].Float0; } @@ -327,8 +327,8 @@ public override float[][] vmethod_5(int int3) private static int smethod_0(Enum2 enum21) { - var num = 0; - for (var num2 = (int) enum21; num2 != 0; num2 &= num2 - 1) + int num = 0; + for (int num2 = (int) enum21; num2 != 0; num2 &= num2 - 1) { num++; } @@ -337,14 +337,14 @@ private static int smethod_0(Enum2 enum21) private static void smethod_1(Class13 class130, float float0) { - var float_ = class130.Float0; - var num = class130.method_0(); - var num2 = class130.method_2(); - var num3 = (int) (num2 / float0); - var array = new float[float_.Length - num2 + num3]; + float[] float_ = class130.Float0; + int num = class130.method_0(); + int num2 = class130.method_2(); + int num3 = (int) (num2 / float0); + float[] array = new float[float_.Length - num2 + num3]; Buffer.BlockCopy(float_, 0, array, 0, num << 2); double num4 = num; - var num5 = num; + int num5 = num; while (num5 < num + num3 && (int) num4 + 1 < float_.Length) { array[num5] = Class15.smethod_2(float_, (float) num4); @@ -357,14 +357,14 @@ private static void smethod_1(Class13 class130, float float0) private static void smethod_2(Class13 class130, Class13 class131) { - var num = class130.method_0(); - var num2 = class130.method_2(); - var num3 = class131.method_0(); + int num = class130.method_0(); + int num2 = class130.method_2(); + int num3 = class131.method_0(); if (class131.Bool0) { try { - for (var i = 0; i < num2; i++) + for (int i = 0; i < num2; i++) { class130.vmethod_3(class130.vmethod_4(num + i) + class131.vmethod_4(num3 + i), num + i); } @@ -377,12 +377,12 @@ private static void smethod_2(Class13 class130, Class13 class131) private static void smethod_3(Class13 class130, float float0) { - var float_ = class130.Float0; - var num = class130.method_0(); - var num2 = class130.method_2(); + float[] float_ = class130.Float0; + int num = class130.method_0(); + int num2 = class130.method_2(); try { - for (var i = num; i < num + num2; i++) + for (int i = num; i < num + num2; i++) { float_[i] = class130.vmethod_1(i, float_[i], float0 * float_[i]); } @@ -397,8 +397,8 @@ private static void smethod_3(Class13 class130, float float0) public override int Read(byte[] buffer, int offset, int count) { count >>= 2; - var array = new float[count]; - var num = vmethod_4(array, 0, count); + float[] array = new float[count]; + int num = vmethod_4(array, 0, count); Buffer.BlockCopy(array, 0, buffer, offset, num); return num << 2; } @@ -415,7 +415,7 @@ public override void Write(byte[] buffer, int offset, int count) public override void Close() { - foreach (var current in _list0) + foreach (GenericAudioStream current in _list0) { current.Close(); } @@ -427,7 +427,7 @@ protected override void Dispose(bool disposing) if (disposing) { _class120.Clear(); - foreach (var current in _list0) + foreach (GenericAudioStream current in _list0) { current.Dispose(); } diff --git a/GHNamespace1/Struct8.cs b/GHNamespace1/Struct8.cs index 7af69bd..3d04f18 100644 --- a/GHNamespace1/Struct8.cs +++ b/GHNamespace1/Struct8.cs @@ -29,8 +29,8 @@ public static int smethod_0(Struct8 struct80) public static Struct8 smethod_1(int int2) { - var result = default(Struct8); - var bytes = BitConverter.GetBytes(int2); + Struct8 result = default(Struct8); + byte[] bytes = BitConverter.GetBytes(int2); result.byte_0 = bytes[0]; result.byte_1 = bytes[1]; result.byte_2 = bytes[2]; @@ -56,7 +56,7 @@ public static Struct8 smethod_3(byte[] byte3, int int2, bool bool0) { throw new ArgumentException("ToInt24: offseted size is too small."); } - var result = default(Struct8); + Struct8 result = default(Struct8); if (bool0) { result.byte_0 = byte3[int2 + 2]; @@ -84,22 +84,22 @@ public static byte[] smethod_4(Struct8 struct80) public static Struct8 smethod_5(Struct8 struct80, int int2) { - var array = new byte[4]; + byte[] array = new byte[4]; array[0] = struct80.byte_0; array[1] = struct80.byte_1; array[2] = struct80.byte_2; - var num = BitConverter.ToInt32(array, 0); + int num = BitConverter.ToInt32(array, 0); num >>= int2; return smethod_1(num); } public static Struct8 smethod_6(Struct8 struct80, int int2) { - var array = new byte[4]; + byte[] array = new byte[4]; array[0] = struct80.byte_0; array[1] = struct80.byte_1; array[2] = struct80.byte_2; - var num = BitConverter.ToInt32(array, 0); + int num = BitConverter.ToInt32(array, 0); num <<= int2; return smethod_1(num); } diff --git a/GHNamespace2/Class13.cs b/GHNamespace2/Class13.cs index 4f8a9da..1c90d8b 100644 --- a/GHNamespace2/Class13.cs +++ b/GHNamespace2/Class13.cs @@ -128,14 +128,14 @@ public virtual float vmethod_0(int int4) { _float1 = new float[_list0.Count]; _float2 = new float[_list0.Count]; - for (var i = 0; i < _list0.Count; i++) + for (int i = 0; i < _list0.Count; i++) { _float1[i] = _list0[i].Float0; _float2[i] = _list0[i].Float1; } _bool2 = false; } - var num = Class15.smethod_3(_float1, _float2, (int4 - (float) method_0()) / method_2()); + float num = Class15.smethod_3(_float1, _float2, (int4 - (float) method_0()) / method_2()); switch (Enum00) { case Enum0.Const3: @@ -150,7 +150,7 @@ public virtual float vmethod_0(int int4) public virtual float vmethod_1(int int4, float float3, float float4) { - var num = vmethod_0(int4); + float num = vmethod_0(int4); return float4 * num + float3 * (1f - num); } diff --git a/GHNamespace2/Class15.cs b/GHNamespace2/Class15.cs index eef6083..eff52c4 100644 --- a/GHNamespace2/Class15.cs +++ b/GHNamespace2/Class15.cs @@ -55,12 +55,12 @@ public static float smethod_3(float[] float0, float[] float1, float float2) { return float1[0]; } - for (var i = 1; i < float0.Length; i++) + for (int i = 1; i < float0.Length; i++) { if (float0[i] > float2) { - var num = float0[i] - float0[i - 1]; - var num2 = float1[i] - float1[i - 1]; + float num = float0[i] - float0[i - 1]; + float num2 = float1[i] - float1[i - 1]; return float1[i - 1] + (float2 - float0[i - 1]) / num * num2; } } @@ -69,8 +69,8 @@ public static float smethod_3(float[] float0, float[] float1, float float2) public static float smethod_4(float[] float0, int int3, int int4) { - var num = 0f; - for (var i = 0; i < int4; i++) + float num = 0f; + for (int i = 0; i < int4; i++) { num += float0[int3 + i] * float0[int3 + i]; } @@ -84,14 +84,14 @@ public static float smethod_5(float float0, float float1, float float2) public static void smethod_6(float[] float0, int int3, int int4, float float1) { - var num = float0[int3]; - for (var i = int3; i < int3 + int4; i++) + float num = float0[int3]; + for (int i = int3; i < int3 + int4; i++) { num = smethod_5(num, float0[i], float1); float0[i] = num; } num = float0[int3 + int4 - 1]; - for (var j = int3 + int4 - 1; j >= int3; j--) + for (int j = int3 + int4 - 1; j >= int3; j--) { num = smethod_5(num, float0[j], float1); float0[j] = num; @@ -116,10 +116,10 @@ public static void smethod_8(float[] float0, int int3) public static float smethod_9(float[] float0, int int3, int int4) { - var num = 0f; - for (var i = 0; i < int4; i++) + float num = 0f; + for (int i = 0; i < int4; i++) { - var num2 = Math.Abs(float0[int3 + i]); + float num2 = Math.Abs(float0[int3 + i]); if (num2 > num) { num = num2; diff --git a/GHNamespace2/Class17.cs b/GHNamespace2/Class17.cs index cdcfdcd..28ca8f4 100644 --- a/GHNamespace2/Class17.cs +++ b/GHNamespace2/Class17.cs @@ -10,15 +10,15 @@ public class Class17 [FieldOffset(4)] private readonly byte[] byte_0; - [FieldOffset(4)] private float[] float_0; + [FieldOffset(4)] private readonly float[] float_0; [FieldOffset(4)] private short[] short_0; - [FieldOffset(4)] private int[] int_1; + [FieldOffset(4)] private readonly int[] int_1; public Class17(int int2) { - var num = int2 & 3; + int num = int2 & 3; int2 = ((num == 0) ? int2 : (int2 + 4 - num)); byte_0 = new byte[int2]; int_0 = 0; @@ -76,7 +76,7 @@ public void method_8(int int2) private int method_9(string string0, int int2, int int3) { - var num = int2 << int3; + int num = int2 << int3; if ((num & 3) != 0) { throw new ArgumentOutOfRangeException(string0, diff --git a/GHNamespace2/Form2.cs b/GHNamespace2/Form2.cs index 0f6a235..f5cbdcd 100644 --- a/GHNamespace2/Form2.cs +++ b/GHNamespace2/Form2.cs @@ -20,7 +20,7 @@ public Form2(int int2, int int3) : base(int2, 0, int3) { waveFormatTag_0 = WaveFormatTag.Adpcm; short_3 = 32; - var int4 = int_0; + int int4 = int_0; if (int4 <= 11025) { if (int4 == 8000 || int4 == 11025) diff --git a/GHNamespace2/Stream3.cs b/GHNamespace2/Stream3.cs index fc226ad..33b8657 100644 --- a/GHNamespace2/Stream3.cs +++ b/GHNamespace2/Stream3.cs @@ -94,7 +94,7 @@ public override int vmethod_3(IntPtr intptr0, int int2) vmethod_2().Position = _long2; } int2 = (int) Math.Min(int2, method_0()); - var num = _stream10.vmethod_3(intptr0, int2); + int num = _stream10.vmethod_3(intptr0, int2); _long2 += num; result = num; } @@ -111,7 +111,7 @@ public override int Read(byte[] buffer, int offset, int count) vmethod_2().Position = _long2; } count = (int) Math.Min(count, method_0()); - var num = _stream10.Read(buffer, offset, count); + int num = _stream10.Read(buffer, offset, count); _long2 += num; result = num; } @@ -128,7 +128,7 @@ public override int vmethod_4(float[] float0, int int2, int int3) vmethod_2().Position = _long2; } int3 = (int) Math.Min(int3, method_0() >> 2); - var num = _stream10.vmethod_4(float0, int2, int3); + int num = _stream10.vmethod_4(float0, int2, int3); _long2 += (long) num << 2; result = num; } @@ -151,7 +151,7 @@ public override float[][] vmethod_5(int int2) } else { - var array = _stream10.vmethod_5(int2); + float[][] array = _stream10.vmethod_5(int2); if (array != null && array.Length >= 1) { _long2 += (array[0].Length << 2) * array.Length; diff --git a/GHNamespace2/Stream4.cs b/GHNamespace2/Stream4.cs index 8ddbfde..69c9fa5 100644 --- a/GHNamespace2/Stream4.cs +++ b/GHNamespace2/Stream4.cs @@ -41,7 +41,7 @@ public override long Position { get { - var position = _stream10.Position; + long position = _stream10.Position; if (!_bool0) { return position; @@ -155,9 +155,9 @@ public Stream4(GenericAudioStream stream11, int int4) private int method_0(byte[] byte0, int int4, int int5) { - var array = new byte[int5 << 2]; - var num = _stream10.Read(array, 0, array.Length); - var i = 0; + byte[] array = new byte[int5 << 2]; + int num = _stream10.Read(array, 0, array.Length); + int i = 0; while (i < num) { byte0[int4] = Class11.smethod_12(BitConverter.ToInt32(byte0, i)); @@ -169,9 +169,9 @@ private int method_0(byte[] byte0, int int4, int int5) private int method_1(byte[] byte0, int int4, int int5) { - var array = new byte[int5 + int5 + int5]; - var num = _stream10.Read(array, 0, array.Length); - var i = 0; + byte[] array = new byte[int5 + int5 + int5]; + int num = _stream10.Read(array, 0, array.Length); + int i = 0; while (i < num) { byte0[int4] = Class11.smethod_8(Struct8.smethod_2(byte0, i)); @@ -183,9 +183,9 @@ private int method_1(byte[] byte0, int int4, int int5) private int method_2(byte[] byte0, int int4, int int5) { - var array = new byte[int5 << 1]; - var num = _stream10.Read(array, 0, array.Length); - var i = 0; + byte[] array = new byte[int5 << 1]; + int num = _stream10.Read(array, 0, array.Length); + int i = 0; while (i < num) { byte0[int4] = Class11.smethod_4(BitConverter.ToInt16(byte0, i)); @@ -242,9 +242,9 @@ private static byte[] smethod_8(byte[] byte0, int int4) private int method_3(byte[] byte0, int int4, int int5) { - var array = new byte[(int) (int5 / _double0)]; - var num = _stream10.Read(array, 0, array.Length); - var i = 0; + byte[] array = new byte[(int) (int5 / _double0)]; + int num = _stream10.Read(array, 0, array.Length); + int i = 0; while (i < num) { Buffer.BlockCopy(_delegate00(array, i), 0, byte0, int4, _int3); @@ -256,9 +256,9 @@ private int method_3(byte[] byte0, int int4, int int5) private int method_4(byte[] byte0, int int4, int int5) { - var array = new float[int5 >> 2]; - var num = _stream10.vmethod_4(array, 0, array.Length); - var i = 0; + float[] array = new float[int5 >> 2]; + int num = _stream10.vmethod_4(array, 0, array.Length); + int i = 0; while (i < num) { Buffer.BlockCopy(BitConverter.GetBytes(Class11.smethod_25(array[i])), 0, byte0, int4, 4); @@ -270,9 +270,9 @@ private int method_4(byte[] byte0, int int4, int int5) private int method_5(byte[] byte0, int int4, int int5) { - var array = new float[int5 / 3]; - var num = _stream10.vmethod_4(array, 0, array.Length); - var i = 0; + float[] array = new float[int5 / 3]; + int num = _stream10.vmethod_4(array, 0, array.Length); + int i = 0; while (i < num) { Buffer.BlockCopy(Struct8.smethod_4(Class11.smethod_23(array[i])), 0, byte0, int4, 3); @@ -284,9 +284,9 @@ private int method_5(byte[] byte0, int int4, int int5) private int method_6(byte[] byte0, int int4, int int5) { - var array = new float[int5 >> 1]; - var num = _stream10.vmethod_4(array, 0, array.Length); - var i = 0; + float[] array = new float[int5 >> 1]; + int num = _stream10.vmethod_4(array, 0, array.Length); + int i = 0; while (i < num) { Buffer.BlockCopy(BitConverter.GetBytes(Class11.smethod_21(array[i])), 0, byte0, int4, 2); @@ -298,9 +298,9 @@ private int method_6(byte[] byte0, int int4, int int5) private int method_7(byte[] byte0, int int4, int int5) { - var array = new float[int5]; - var num = _stream10.vmethod_4(array, 0, array.Length); - var i = 0; + float[] array = new float[int5]; + int num = _stream10.vmethod_4(array, 0, array.Length); + int i = 0; while (i < num) { byte0[int4] = Class11.smethod_17(array[i]); @@ -322,8 +322,8 @@ public override void Write(byte[] buffer, int offset, int count) public override int vmethod_3(IntPtr intptr0, int int4) { - var array = new byte[int4]; - var num = Read(array, 0, int4); + byte[] array = new byte[int4]; + int num = Read(array, 0, int4); Marshal.Copy(array, 0, intptr0, num); return num; } diff --git a/GHNamespace2/Struct10.cs b/GHNamespace2/Struct10.cs index ec42763..ea9ac88 100644 --- a/GHNamespace2/Struct10.cs +++ b/GHNamespace2/Struct10.cs @@ -21,8 +21,8 @@ object ICloneable.Clone() public float method_0() { - var num = Float0; - var num2 = Float1; + float num = Float0; + float num2 = Float1; return (float) Math.Sqrt(num * num + num2 * num2); } @@ -38,9 +38,8 @@ public override int GetHashCode() public override bool Equals(object obj) { - if (obj is Struct10) + if (obj is Struct10 struct10) { - var struct10 = (Struct10) obj; return smethod_0(this, struct10); } return false; diff --git a/GHNamespace2/Struct11.cs b/GHNamespace2/Struct11.cs index 9d47dda..c266d6a 100644 --- a/GHNamespace2/Struct11.cs +++ b/GHNamespace2/Struct11.cs @@ -16,8 +16,8 @@ public Struct11(int int2, int int3) public Struct11 method_0(Struct11 struct110) { - var num = Math.Max(_int0, struct110._int0); - var num2 = Math.Min(_int1, struct110._int1); + int num = Math.Max(_int0, struct110._int0); + int num2 = Math.Min(_int1, struct110._int1); if (num2 > num) { return new Struct11(num, num2); diff --git a/GHNamespace2/Struct12.cs b/GHNamespace2/Struct12.cs index 3f88291..423f7e1 100644 --- a/GHNamespace2/Struct12.cs +++ b/GHNamespace2/Struct12.cs @@ -21,8 +21,8 @@ object ICloneable.Clone() public double method_0() { - var num = Double0; - var num2 = Double1; + double num = Double0; + double num2 = Double1; return Math.Sqrt(num * num + num2 * num2); } @@ -38,9 +38,8 @@ public override int GetHashCode() public override bool Equals(object obj) { - if (obj is Struct12) + if (obj is Struct12 struct12) { - var struct12 = (Struct12) obj; return smethod_0(this, struct12); } return false; diff --git a/GHNamespace3/Class58.cs b/GHNamespace3/Class58.cs index 1fc967b..1ce5e0e 100644 --- a/GHNamespace3/Class58.cs +++ b/GHNamespace3/Class58.cs @@ -4,7 +4,7 @@ namespace GHNamespace3 { public class Class58 : Class57 { - private static int[][][] _int0 = new int[2][][]; + private static readonly int[][][] _int0 = new int[2][][]; public override void vmethod_0(object object0) { diff --git a/GHNamespace3/Class68.cs b/GHNamespace3/Class68.cs index db44220..f3f34dd 100644 --- a/GHNamespace3/Class68.cs +++ b/GHNamespace3/Class68.cs @@ -25,30 +25,30 @@ public void method_0(int int3) _float0 = new float[int3 + int3 / 4]; _int1 = (int) Math.Round(Math.Log(int3) / Math.Log(2.0)); _int0 = int3; - var num = 0; - var num2 = 1; - var num3 = 0 + int3 / 2; - var num4 = num3 + 1; - var num5 = num3 + int3 / 2; - var num6 = num5 + 1; - for (var i = 0; i < int3 / 4; i++) + int num = 0; + int num2 = 1; + int num3 = 0 + int3 / 2; + int num4 = num3 + 1; + int num5 = num3 + int3 / 2; + int num6 = num5 + 1; + for (int i = 0; i < int3 / 4; i++) { _float0[num + i * 2] = (float) Math.Cos(3.1415926535897931 / int3 * (4 * i)); _float0[num2 + i * 2] = -(float) Math.Sin(3.1415926535897931 / int3 * (4 * i)); _float0[num3 + i * 2] = (float) Math.Cos(3.1415926535897931 / (2 * int3) * (2 * i + 1)); _float0[num4 + i * 2] = (float) Math.Sin(3.1415926535897931 / (2 * int3) * (2 * i + 1)); } - for (var j = 0; j < int3 / 8; j++) + for (int j = 0; j < int3 / 8; j++) { _float0[num5 + j * 2] = (float) Math.Cos(3.1415926535897931 / int3 * (4 * j + 2)); _float0[num6 + j * 2] = -(float) Math.Sin(3.1415926535897931 / int3 * (4 * j + 2)); } - var num7 = (1 << _int1 - 1) - 1; - var num8 = 1 << _int1 - 2; - for (var k = 0; k < int3 / 8; k++) + int num7 = (1 << _int1 - 1) - 1; + int num8 = 1 << _int1 - 2; + for (int k = 0; k < int3 / 8; k++) { - var num9 = 0; - var num10 = 0; + int num9 = 0; + int num10 = 0; while ((uint) num8 >> num10 != 0u) { if (((uint) num8 >> num10 & (ulong) k) != 0uL) @@ -74,15 +74,15 @@ public void method_1(float[] float4, float[] float5) { _float3 = new float[_int0 / 2]; } - var array = _float2; - var float6 = _float3; - var num = (int) ((uint) _int0 >> 1); - var num2 = (int) ((uint) _int0 >> 2); - var num3 = (int) ((uint) _int0 >> 3); - var num4 = 1; - var num5 = 0; - var num6 = num; - for (var i = 0; i < num3; i++) + float[] array = _float2; + float[] float6 = _float3; + int num = (int) ((uint) _int0 >> 1); + int num2 = (int) ((uint) _int0 >> 2); + int num3 = (int) ((uint) _int0 >> 3); + int num4 = 1; + int num5 = 0; + int num6 = num; + for (int i = 0; i < num3; i++) { num6 -= 2; array[num5++] = -float4[num4 + 2] * _float0[num6 + 1] - float4[num4] * _float0[num6]; @@ -90,24 +90,24 @@ public void method_1(float[] float4, float[] float5) num4 += 4; } num4 = num - 4; - for (var i = 0; i < num3; i++) + for (int i = 0; i < num3; i++) { num6 -= 2; array[num5++] = float4[num4] * _float0[num6 + 1] + float4[num4 + 2] * _float0[num6]; array[num5++] = float4[num4] * _float0[num6] - float4[num4 + 2] * _float0[num6 + 1]; num4 -= 4; } - var array2 = method_2(array, float6, _int0, num, num2, num3); - var num7 = 0; - var num8 = num; - var num9 = num2; - var num10 = num9 - 1; - var num11 = num2 + num; - var num12 = num11 - 1; - for (var j = 0; j < num2; j++) + float[] array2 = method_2(array, float6, _int0, num, num2, num3); + int num7 = 0; + int num8 = num; + int num9 = num2; + int num10 = num9 - 1; + int num11 = num2 + num; + int num12 = num11 - 1; + for (int j = 0; j < num2; j++) { - var num13 = array2[num7] * _float0[num8 + 1] - array2[num7 + 1] * _float0[num8]; - var num14 = -(array2[num7] * _float0[num8] + array2[num7 + 1] * _float0[num8 + 1]); + float num13 = array2[num7] * _float0[num8 + 1] - array2[num7 + 1] * _float0[num8]; + float num14 = -(array2[num7] * _float0[num8] + array2[num7 + 1] * _float0[num8 + 1]); float5[num9] = -num13; float5[num10] = num13; float5[num11] = num14; @@ -123,39 +123,39 @@ public void method_1(float[] float4, float[] float5) public float[] method_2(float[] float4, float[] float5, int int3, int int4, int int5, int int6) { - var num = int5; - var num2 = 0; - var num3 = int4; - for (var i = 0; i < int5; i++) + int num = int5; + int num2 = 0; + int num3 = int4; + for (int i = 0; i < int5; i++) { - var num4 = float4[num] - float4[num2]; + float num4 = float4[num] - float4[num2]; float5[int5 + i] = float4[num++] + float4[num2++]; - var num5 = float4[num] - float4[num2]; + float num5 = float4[num] - float4[num2]; num3 -= 4; float5[i++] = num4 * _float0[num3] + num5 * _float0[num3 + 1]; float5[i] = num5 * _float0[num3] - num4 * _float0[num3 + 1]; float5[int5 + i] = float4[num++] + float4[num2++]; } - for (var j = 0; j < _int1 - 3; j++) + for (int j = 0; j < _int1 - 3; j++) { - var num6 = (int) ((uint) int3 >> j + 2); - var num7 = 1 << j + 3; - var num8 = int4 - 2; + int num6 = (int) ((uint) int3 >> j + 2); + int num7 = 1 << j + 3; + int num8 = int4 - 2; num3 = 0; - var num9 = 0; + int num9 = 0; while (num9 < (uint) num6 >> 2) { - var num10 = num8; - var num11 = num10 - (num6 >> 1); - var num12 = _float0[num3]; - var num13 = _float0[num3 + 1]; + int num10 = num8; + int num11 = num10 - (num6 >> 1); + float num12 = _float0[num3]; + float num13 = _float0[num3 + 1]; num8 -= 2; num6++; - for (var k = 0; k < 2 << j; k++) + for (int k = 0; k < 2 << j; k++) { - var num14 = float5[num10] - float5[num11]; + float num14 = float5[num10] - float5[num11]; float4[num10] = float5[num10] + float5[num11]; - var num15 = float5[++num10] - float5[++num11]; + float num15 = float5[++num10] - float5[++num11]; float4[num10] = float5[num10] + float5[num11]; float4[num11] = num15 * num12 - num14 * num13; float4[num11 - 1] = num14 * num12 + num15 * num13; @@ -166,26 +166,26 @@ public float[] method_2(float[] float4, float[] float5, int int3, int int4, int num3 += num7; num9++; } - var array = float5; + float[] array = float5; float5 = float4; float4 = array; } - var num16 = int3; - var num17 = 0; - var num18 = 0; - var num19 = int4 - 1; - for (var l = 0; l < int6; l++) + int num16 = int3; + int num17 = 0; + int num18 = 0; + int num19 = int4 - 1; + for (int l = 0; l < int6; l++) { - var num20 = _int2[num17++]; - var num21 = _int2[num17++]; - var num22 = float5[num20] - float5[num21 + 1]; - var num23 = float5[num20 - 1] + float5[num21]; - var num24 = float5[num20] + float5[num21 + 1]; - var num25 = float5[num20 - 1] - float5[num21]; - var num26 = num22 * _float0[num16]; - var num27 = num23 * _float0[num16++]; - var num28 = num22 * _float0[num16]; - var num29 = num23 * _float0[num16++]; + int num20 = _int2[num17++]; + int num21 = _int2[num17++]; + float num22 = float5[num20] - float5[num21 + 1]; + float num23 = float5[num20 - 1] + float5[num21]; + float num24 = float5[num20] + float5[num21 + 1]; + float num25 = float5[num20 - 1] - float5[num21]; + float num26 = num22 * _float0[num16]; + float num27 = num23 * _float0[num16++]; + float num28 = num22 * _float0[num16]; + float num29 = num23 * _float0[num16++]; float4[num18++] = (num24 + num28 + num27) * 0.5f; float4[num19--] = (-num25 + num29 - num26) * 0.5f; float4[num18++] = (num25 + num29 - num26) * 0.5f; diff --git a/GHNamespace3/Class69.cs b/GHNamespace3/Class69.cs index 0e4eaaa..f22190d 100644 --- a/GHNamespace3/Class69.cs +++ b/GHNamespace3/Class69.cs @@ -326,15 +326,15 @@ public class Class69 public static float smethod_0(float float5) { - var num = float5 * (0.31830989 * Int0); - var num2 = (int) num; + double num = float5 * (0.31830989 * Int0); + int num2 = (int) num; return Float0[num2] + (float) (num - num2) * (Float0[num2 + 1] - Float0[num2]); } public static float smethod_1(float float5) { double num = float5 * (2f * Int1) - Int1; - var num2 = (int) num; + int num2 = (int) num; return Float1[num2] + (float) (num - num2) * (Float1[num2 + 1] - Float1[num2]); } @@ -345,7 +345,7 @@ public static float smethod_2(int int3) public static float smethod_3(float float5) { - var num = (int) (float5 * -8f); + int num = (int) (float5 * -8f); if (num < 0) { return 1f; diff --git a/GHNamespace3/Class70.cs b/GHNamespace3/Class70.cs index ae68a3d..1b192e6 100644 --- a/GHNamespace3/Class70.cs +++ b/GHNamespace3/Class70.cs @@ -2,47 +2,47 @@ namespace GHNamespace3 { public class Class70 { - private float[] _float0 = new float[5]; + private readonly float[] _float0 = new float[5]; - private float[] _float1 = new float[5]; + private readonly float[] _float1 = new float[5]; - private float[] _float2 = new float[5]; + private readonly float[] _float2 = new float[5]; - private float[] _float3 = new float[5]; + private readonly float[] _float3 = new float[5]; - private float[] _float4 = new float[5]; + private readonly float[] _float4 = new float[5]; - private float[] _float5 = new float[5]; + private readonly float[] _float5 = new float[5]; - private float[] _float6 = new float[5]; + private readonly float[] _float6 = new float[5]; - private float[] _float7 = new float[5]; + private readonly float[] _float7 = new float[5]; - private float[] _float8 = new float[5]; + private readonly float[] _float8 = new float[5]; - private float[] _float9 = new float[5]; + private readonly float[] _float9 = new float[5]; - private float[] _float10 = new float[5]; + private readonly float[] _float10 = new float[5]; - private float[] _float11 = new float[5]; + private readonly float[] _float11 = new float[5]; - private float[] _float12 = new float[5]; + private readonly float[] _float12 = new float[5]; - private float[] _float13 = new float[5]; + private readonly float[] _float13 = new float[5]; - private float[] _float14 = new float[5]; + private readonly float[] _float14 = new float[5]; - private float[] _float15 = new float[5]; + private readonly float[] _float15 = new float[5]; - private float[] _float16 = new float[5]; + private readonly float[] _float16 = new float[5]; - private float[] _float17 = new float[5]; + private readonly float[] _float17 = new float[5]; - private float[] _float18 = new float[5]; + private readonly float[] _float18 = new float[5]; - private float[] _float19 = new float[5]; + private readonly float[] _float19 = new float[5]; - private float[] _float20 = new float[5]; + private readonly float[] _float20 = new float[5]; public void method_0() { diff --git a/GHNamespace3/Class77.cs b/GHNamespace3/Class77.cs index 3592706..0832419 100644 --- a/GHNamespace3/Class77.cs +++ b/GHNamespace3/Class77.cs @@ -17,22 +17,22 @@ public struct Struct15 public static void smethod_0(float[] float1, int[] int0, int int1, int int2, float[] float2, int int3, float float3, float float4) { - var num = Float0 / int2; + float num = Float0 / int2; int i; for (i = 0; i < int3; i++) { float2[i] = Class69.smethod_0(float2[i]); } - var num2 = int3 / 2 * 2; + int num2 = int3 / 2 * 2; i = 0; while (i < int1) { - var @struct = default(Struct15); - var num3 = int0[i]; - var num4 = 0.707106769f; - var num5 = 0.707106769f; - var num6 = Class69.smethod_0(num * num3); - for (var j = 0; j < num2; j += 2) + Struct15 @struct = default(Struct15); + int num3 = int0[i]; + float num4 = 0.707106769f; + float num5 = 0.707106769f; + float num6 = Class69.smethod_0(num * num3); + for (int j = 0; j < num2; j += 2) { num5 *= float2[j] - num6; num4 *= float2[j + 1] - num6; @@ -50,9 +50,9 @@ public static void smethod_0(float[] float1, int[] int0, int int1, int int2, flo } num5 = num4 + num5; @struct.float_0 = num5; - var num7 = @struct.int_0; - var num8 = 2147483647 & num7; - var num9 = 0; + int num7 = @struct.int_0; + int num8 = 2147483647 & num7; + int num9 = 0; if (num8 < 2139095040 && num8 != 0) { if (num8 < 8388608) diff --git a/GHNamespace3/OGGClass1.cs b/GHNamespace3/OGGClass1.cs index 335caff..06560a4 100644 --- a/GHNamespace3/OGGClass1.cs +++ b/GHNamespace3/OGGClass1.cs @@ -74,7 +74,7 @@ public OggClass1() private static int smethod_0(int int12) { - var num = 0; + int num = 0; while (int12 > 1) { num++; @@ -85,27 +85,27 @@ private static int smethod_0(int int12) public static float[] smethod_1(int int12, int int13, int int14, int int15) { - var array = new float[int13]; + float[] array = new float[int13]; if (int12 == 0) { - var num = (int13 >> 2) - (int14 >> 1); - var num2 = int13 - (int13 >> 2) - (int15 >> 1); - for (var i = 0; i < int14; i++) + int num = (int13 >> 2) - (int14 >> 1); + int num2 = int13 - (int13 >> 2) - (int15 >> 1); + for (int i = 0; i < int14; i++) { - var num3 = (float) ((i + 0.5) / int14 * Float0 / 2.0); + float num3 = (float) ((i + 0.5) / int14 * Float0 / 2.0); num3 = (float) Math.Sin(num3); num3 *= num3; num3 *= (float) (Float0 / 2.0); num3 = (float) Math.Sin(num3); array[i + num] = num3; } - for (var j = num + int14; j < num2; j++) + for (int j = num + int14; j < num2; j++) { array[j] = 1f; } - for (var k = 0; k < int15; k++) + for (int k = 0; k < int15; k++) { - var num4 = (float) ((int15 - k - 0.5) / int15 * Float0 / 2.0); + float num4 = (float) ((int15 - k - 0.5) / int15 * Float0 / 2.0); num4 = (float) Math.Sin(num4); num4 *= num4; num4 *= (float) (Float0 / 2.0); @@ -135,7 +135,7 @@ private int method_0(OggClass5 oggClass5, bool bool0) Float2[1][0][1] = new float[Int1][]; Float2[1][1][0] = new float[Int1][]; Float2[1][1][1] = new float[Int1][]; - for (var i = 0; i < Int1; i++) + for (int i = 0; i < Int1; i++) { Float2[0][0][0][i] = smethod_1(i, oggClass5.Int13[0], oggClass5.Int13[0] >> 1, oggClass5.Int13[0] >> 1); Float2[1][0][0][i] = smethod_1(i, oggClass5.Int13[1], oggClass5.Int13[0] >> 1, oggClass5.Int13[0] >> 1); @@ -144,14 +144,14 @@ private int method_0(OggClass5 oggClass5, bool bool0) Float2[1][1][1][i] = smethod_1(i, oggClass5.Int13[1], oggClass5.Int13[1] >> 1, oggClass5.Int13[1] >> 1); } OggClass4 = new OggClass4[oggClass5.Int19]; - for (var j = 0; j < oggClass5.Int19; j++) + for (int j = 0; j < oggClass5.Int19; j++) { OggClass4[j] = new OggClass4(); OggClass4[j].method_6(oggClass5.OggClass2[j]); } _int4 = 8192; _float1 = new float[oggClass5.Int8][]; - for (var k = 0; k < oggClass5.Int8; k++) + for (int k = 0; k < oggClass5.Int8; k++) { _float1[k] = new float[_int4]; } @@ -160,10 +160,10 @@ private int method_0(OggClass5 oggClass5, bool bool0) _int11 = oggClass5.Int13[1] >> 1; _int5 = _int11; Object1 = new object[oggClass5.Int14]; - for (var l = 0; l < oggClass5.Int14; l++) + for (int l = 0; l < oggClass5.Int14; l++) { - var num = oggClass5.Class270[l].Int3; - var num2 = oggClass5.Int21[num]; + int num = oggClass5.Class270[l].Int3; + int num2 = oggClass5.Int21[num]; Object1[l] = Class34.Class340[num2].vmethod_1(this, oggClass5.Class270[l], oggClass5.Object0[num]); } return 0; @@ -183,14 +183,14 @@ public int method_2(OggClass6 class710) { if (_int11 > OggClass5.Int13[1] >> 1 && _int6 > 8192) { - var num = _int11 - (OggClass5.Int13[1] >> 1); + int num = _int11 - (OggClass5.Int13[1] >> 1); num = ((_int6 < num) ? _int6 : num); _int5 -= num; _int11 -= num; _int6 -= num; if (num != 0) { - for (var i = 0; i < OggClass5.Int8; i++) + for (int i = 0; i < OggClass5.Int8; i++) { Buffer.BlockCopy(_float1[i], num << 2, _float1[i], 0, _int5 << 2); } @@ -207,18 +207,18 @@ public int method_2(OggClass6 class710) _long0 = -1L; } Long1 = class710.Long1; - var num2 = OggClass5.Int13[_int9]; - var num3 = _int11 + (OggClass5.Int13[_int8] >> 2) + (num2 >> 2); - var num4 = num3 - (num2 >> 1); - var num5 = num4 + num2; - var num6 = 0; - var num7 = 0; + int num2 = OggClass5.Int13[_int9]; + int num3 = _int11 + (OggClass5.Int13[_int8] >> 2) + (num2 >> 2); + int num4 = num3 - (num2 >> 1); + int num5 = num4 + num2; + int num6 = 0; + int num7 = 0; if (num5 > _int4) { _int4 = num5 + OggClass5.Int13[1]; - for (var j = 0; j < OggClass5.Int8; j++) + for (int j = 0; j < OggClass5.Int8; j++) { - var array = new float[_int4]; + float[] array = new float[_int4]; Buffer.BlockCopy(_float1[j], 0, array, 0, _float1[j].Length << 2); _float1[j] = array; } @@ -234,9 +234,9 @@ public int method_2(OggClass6 class710) num7 = num6 + (OggClass5.Int13[_int8] >> 1); break; } - for (var k = 0; k < OggClass5.Int8; k++) + for (int k = 0; k < OggClass5.Int8; k++) { - var num8 = num4; + int num8 = num4; int l; for (l = num6; l < num7; l++) { @@ -282,19 +282,19 @@ public int method_4(float[] float3, int int12, int int13) { if (_int6 < _int11) { - var num = _float1.Length; - var num2 = _int11 - _int6; - var num3 = (int13 - int12) / num; + int num = _float1.Length; + int num2 = _int11 - _int6; + int num3 = (int13 - int12) / num; if (num2 > num3) { num2 = num3; } - var num4 = _int6 + num2; - for (var i = 0; i < _float1.Length; i++) + int num4 = _int6 + num2; + for (int i = 0; i < _float1.Length; i++) { - var array = _float1[i]; - var j = _int6; - var num5 = int12 + i; + float[] array = _float1[i]; + int j = _int6; + int num5 = int12 + i; while (j < num4) { float3[num5] = array[j]; @@ -311,12 +311,12 @@ public int method_5(float[][] float3, int int12, int int13) { if (_int6 < _int11) { - var num = _int11 - _int6; + int num = _int11 - _int6; if (num > int13 - int12) { num = int13 - int12; } - for (var i = 0; i < OggClass5.Int8; i++) + for (int i = 0; i < OggClass5.Int8; i++) { Buffer.BlockCopy(_float1[i], _int6 << 2, float3[i], int12 << 2, num << 2); } diff --git a/GHNamespace3/OGGClass2.cs b/GHNamespace3/OGGClass2.cs index d7a733a..9373a9f 100644 --- a/GHNamespace3/OGGClass2.cs +++ b/GHNamespace3/OGGClass2.cs @@ -47,11 +47,11 @@ public int method_0(OggClass3 oggClass3) Int2 = new int[Int1]; if (oggClass3.method_6(1) != 0) { - for (var i = 0; i < Int1; i++) + for (int i = 0; i < Int1; i++) { if (oggClass3.method_6(1) != 0) { - var num = oggClass3.method_6(5); + int num = oggClass3.method_6(5); if (num == -1) { method_2(); @@ -67,9 +67,9 @@ public int method_0(OggClass3 oggClass3) } else { - for (var i = 0; i < Int1; i++) + for (int i = 0; i < Int1; i++) { - var num2 = oggClass3.method_6(5); + int num2 = oggClass3.method_6(5); if (num2 == -1) { method_2(); @@ -81,18 +81,18 @@ public int method_0(OggClass3 oggClass3) break; case 1: { - var num3 = oggClass3.method_6(5) + 1; + int num3 = oggClass3.method_6(5) + 1; Int2 = new int[Int1]; - var i = 0; + int i = 0; while (i < Int1) { - var num4 = oggClass3.method_6(smethod_0(Int1 - i)); + int num4 = oggClass3.method_6(smethod_0(Int1 - i)); if (num4 == -1) { method_2(); return -1; } - var j = 0; + int j = 0; while (j < num4) { Int2[i] = num3; @@ -117,7 +117,7 @@ public int method_0(OggClass3 oggClass3) Int5 = oggClass3.method_6(32); Int6 = oggClass3.method_6(4) + 1; Int7 = oggClass3.method_6(1); - var num5 = 0; + int num5 = 0; switch (Int3) { case 1: @@ -128,7 +128,7 @@ public int method_0(OggClass3 oggClass3) break; } Int8 = new int[num5]; - for (var i = 0; i < num5; i++) + for (int i = 0; i < num5; i++) { Int8[i] = oggClass3.method_6(Int6); } @@ -148,12 +148,12 @@ public int method_0(OggClass3 oggClass3) public int method_1() { - var num = (int) Math.Floor(Math.Pow(Int1, 1.0 / Int0)); + int num = (int) Math.Floor(Math.Pow(Int1, 1.0 / Int0)); while (true) { - var num2 = 1; - var num3 = 1; - for (var i = 0; i < Int0; i++) + int num2 = 1; + int num3 = 1; + for (int i = 0; i < Int0; i++) { num2 *= num; num3 *= num + 1; @@ -187,21 +187,21 @@ public float[] method_3() return null; } } - var num = smethod_1(Int4); - var num2 = smethod_1(Int5); - var array = new float[Int1 * Int0]; + float num = smethod_1(Int4); + float num2 = smethod_1(Int5); + float[] array = new float[Int1 * Int0]; switch (Int3) { case 1: { - var num3 = method_1(); - for (var i = 0; i < Int1; i++) + int num3 = method_1(); + for (int i = 0; i < Int1; i++) { - var num4 = 0f; - var num5 = 1; - for (var j = 0; j < Int0; j++) + float num4 = 0f; + int num5 = 1; + for (int j = 0; j < Int0; j++) { - var num6 = i / num5 % num3; + int num6 = i / num5 % num3; float num7 = Int8[num6]; num7 = Math.Abs(num7) * num2 + num + num4; if (Int7 != 0) @@ -215,10 +215,10 @@ public float[] method_3() break; } case 2: - for (var k = 0; k < Int1; k++) + for (int k = 0; k < Int1; k++) { - var num8 = 0f; - for (var l = 0; l < Int0; l++) + float num8 = 0f; + for (int l = 0; l < Int0; l++) { float num9 = Int8[k * Int0 + l]; num9 = Math.Abs(num9) * num2 + num + num8; @@ -236,7 +236,7 @@ public float[] method_3() public static int smethod_0(int int11) { - var num = 0; + int num = 0; while (int11 != 0) { num++; diff --git a/GHNamespace3/OGGClass6.cs b/GHNamespace3/OGGClass6.cs index 716d018..2a75b9a 100644 --- a/GHNamespace3/OGGClass6.cs +++ b/GHNamespace3/OGGClass6.cs @@ -59,13 +59,13 @@ public int method_1() public int method_2(Class67 class670) { - var oggClass5 = OggClass1.OggClass5; + GHNamespaceH.OggClass5 oggClass5 = OggClass1.OggClass5; OggClass3.method_4(class670.Byte0, class670.Int0, class670.Int1); if (OggClass3.method_6(1) != 0) { return -1; } - var num = OggClass3.method_6(OggClass1.Int3); + int num = OggClass3.method_6(OggClass1.Int3); if (num == -1) { return -1; @@ -94,11 +94,11 @@ public int method_2(Class67 class670) { Float0 = new float[oggClass5.Int8][]; } - for (var i = 0; i < oggClass5.Int8; i++) + for (int i = 0; i < oggClass5.Int8; i++) { if (Float0[i] != null && Float0[i].Length >= Int3) { - for (var j = 0; j < Int3; j++) + for (int j = 0; j < Int3; j++) { Float0[i][j] = 0f; } @@ -108,7 +108,7 @@ public int method_2(Class67 class670) Float0[i] = new float[Int3]; } } - var num2 = oggClass5.Int21[oggClass5.Class270[Int4].Int3]; + int num2 = oggClass5.Int21[oggClass5.Class270[Int4].Int3]; return Class34.Class340[num2].vmethod_3(this, OggClass1.Object1[Int4]); } } diff --git a/GHNamespace3/VorbisClass.cs b/GHNamespace3/VorbisClass.cs index 27d7ae6..1eb3174 100644 --- a/GHNamespace3/VorbisClass.cs +++ b/GHNamespace3/VorbisClass.cs @@ -44,32 +44,32 @@ public class VorbisClass public void method_0() { - for (var i = 0; i < Int8; i++) + for (int i = 0; i < Int8; i++) { Class640[i] = null; } Class640 = null; - for (var j = 0; j < Int9; j++) + for (int j = 0; j < Int9; j++) { Class45.Class450[Int15[j]].vmethod_0(Object0[j]); } Object0 = null; - for (var k = 0; k < Int10; k++) + for (int k = 0; k < Int10; k++) { Class72.Class720[Int16[k]].vmethod_0(Object1[k]); } Object1 = null; - for (var l = 0; l < Int11; l++) + for (int l = 0; l < Int11; l++) { Class41.Class410[Int17[l]].vmethod_0(Object2[l]); } Object2 = null; - for (var m = 0; m < Int12; m++) + for (int m = 0; m < Int12; m++) { Class57.Class570[Int18[m]].vmethod_0(Object3[m]); } Object3 = null; - for (var n = 0; n < Int13; n++) + for (int n = 0; n < Int13; n++) { if (Class760[n] != null) { @@ -78,7 +78,7 @@ public void method_0() } } Class760 = null; - for (var num = 0; num < Int14; num++) + for (int num = 0; num < Int14; num++) { Class530[num].method_0(); } diff --git a/GHNamespace4/AudioPlayer.cs b/GHNamespace4/AudioPlayer.cs index e5584a0..2af4400 100644 --- a/GHNamespace4/AudioPlayer.cs +++ b/GHNamespace4/AudioPlayer.cs @@ -18,8 +18,8 @@ private class VolumeListener public void StartListener(object object0) { - var num = 0f; - var num2 = Volume; + float num = 0f; + float num2 = Volume; while (num < num2) { AudioPlayer.SetVolume(num); @@ -40,7 +40,7 @@ private class Class161 public void method_0(object object0) { GC.KeepAlive(Class1590._delegate40); - var intPtr = Intptr0; + IntPtr intPtr = Intptr0; while (Class162.waveOutClose(intPtr) != Enum18.Const0) { Thread.Sleep(1000); @@ -73,8 +73,10 @@ public void method_0(object object0) public AudioPlayer(int int0, WaveFormat waveFormat0, int int1, float volume, bool bool3, Delegate3 delegate31) { WaitCallback waitCallback = null; - var volumeListener = new VolumeListener(); - volumeListener.Volume = volume; + VolumeListener volumeListener = new VolumeListener + { + Volume = volume + }; _delegate40 = Class165.smethod_0; _object0 = new object(); //base..ctor(); @@ -98,7 +100,7 @@ public AudioPlayer(int int0, WaveFormat waveFormat0, int int1, float volume, boo public int method_0() { - var @struct = default(Struct67); + Struct67 @struct = default(Struct67); @struct.enum14_0 = Enum14.Const2; if (_intptr0 != IntPtr.Zero) { @@ -109,7 +111,7 @@ public int method_0() public float method_1() { - var num = 0; + int num = 0; if (_intptr0 != IntPtr.Zero) { Class162.waveOutGetVolume(_intptr0, ref num); @@ -119,7 +121,7 @@ public float method_1() public void SetVolume(float float0) { - var int_ = (int) (float0 * 65535f) + ((int) (float0 * 65535f) << 16); + int int_ = (int) (float0 * 65535f) + ((int) (float0 * 65535f) << 16); if (_intptr0 != IntPtr.Zero) { Class162.waveOutSetVolume(_intptr0, int_); @@ -164,9 +166,11 @@ public void Dispose() method_8(); if (_intptr0 != IntPtr.Zero) { - var @class = new Class161(); - @class.Class1590 = this; - @class.Intptr0 = _intptr0; + Class161 @class = new Class161 + { + Class1590 = this, + Intptr0 = _intptr0 + }; ThreadPool.QueueUserWorkItem(@class.method_0); } } @@ -195,10 +199,10 @@ private void method_6() } else { - var array = new byte[_class1651.method_0()]; + byte[] array = new byte[_class1651.method_0()]; if (_byte0 != 0) { - for (var i = 0; i < array.Length; i++) + for (int i = 0; i < array.Length; i++) { array[i] = _byte0; } @@ -217,12 +221,12 @@ private void method_7(int int0, int int1) if (int1 > 0) { _class1650 = new Class165(_intptr0, int0); - var @class = _class1650; + Class165 @class = _class1650; try { - for (var i = 1; i < int1; i++) + for (int i = 1; i < int1; i++) { - var class2 = new Class165(_intptr0, int0); + Class165 class2 = new Class165(_intptr0, int0); @class.Class1650 = class2; @class = class2; } @@ -239,12 +243,12 @@ private void method_8() _class1651 = null; if (_class1650 != null) { - var @class = _class1650; + Class165 @class = _class1650; _class1650 = null; - var class2 = @class; + Class165 class2 = @class; do { - var class3 = class2.Class1650; + Class165 class3 = class2.Class1650; class2.Dispose(); class2 = class3; } while (class2 != @class); @@ -259,7 +263,7 @@ private void method_9() private void method_10() { - var @class = _class1650; + Class165 @class = _class1650; while (@class.Class1650 != _class1650) { @class.method_3(); diff --git a/GHNamespace4/Class134.cs b/GHNamespace4/Class134.cs index f5996d5..c1f1035 100644 --- a/GHNamespace4/Class134.cs +++ b/GHNamespace4/Class134.cs @@ -21,16 +21,16 @@ public Class134(Class144 class1440, Class140 class1401, Class136 class1360, int { _int3 = class1360.vmethod_2(); _int1 = int6; - for (var i = 0; i < int6; i++) + for (int i = 0; i < int6; i++) { _int2[i] = class1440.vmethod_12(int4); } - var num = class1440.vmethod_10(2); - var num2 = num; + int num = class1440.vmethod_10(2); + int num2 = num; if (num2 == 0) { - var int7 = class1440.vmethod_10(4); - var @class = new Class138(); + int int7 = class1440.vmethod_10(4); + Class138 @class = new Class138(); _class1370 = @class; @class.Int0 = int7; @class.Class1430 = class1360.vmethod_1(); @@ -44,9 +44,9 @@ public Class134(Class144 class1440, Class140 class1401, Class136 class1360, int public override string ToString() { - var stringBuilder = new StringBuilder(string.Concat("FLACSubframe_Fixed: Order=", _int1, " PartitionOrder=", + StringBuilder stringBuilder = new StringBuilder(string.Concat("FLACSubframe_Fixed: Order=", _int1, " PartitionOrder=", ((Class138) _class1370).Int0, " WastedBits=", Int0)); - for (var i = 0; i < _int1; i++) + for (int i = 0; i < _int1; i++) { stringBuilder.Append(string.Concat(" warmup[", i, "]=", _int2[i])); } diff --git a/GHNamespace4/Class135.cs b/GHNamespace4/Class135.cs index a0d78bb..3d775da 100644 --- a/GHNamespace4/Class135.cs +++ b/GHNamespace4/Class135.cs @@ -20,30 +20,30 @@ public class Class135 : Class131 private readonly int[] _int5 = new int[32]; - private int[] _int6; + private readonly int[] _int6; public Class135(Class144 class1440, Class140 class1401, Class136 class1360, int int7, int int8, int int9) : base(class1401, int8) { _int6 = class1360.vmethod_2(); _int1 = int9; - for (var i = 0; i < int9; i++) + for (int i = 0; i < int9; i++) { _int5[i] = class1440.vmethod_12(int7); } - var num = class1440.vmethod_10(4); + int num = class1440.vmethod_10(4); if (num == 15) { throw new IOException("STREAM_DECODER_ERROR_STATUS_LOST_SYNC"); } _int2 = num + 1; _int3 = class1440.vmethod_12(5); - for (var j = 0; j < int9; j++) + for (int j = 0; j < int9; j++) { _int4[j] = class1440.vmethod_12(_int2); } - var num2 = class1440.vmethod_10(2); - var num3 = num2; + int num2 = class1440.vmethod_10(2); + int num3 = num2; if (num3 != 0) { throw new IOException("STREAM_DECODER_UNPARSEABLE_STREAM"); @@ -75,20 +75,20 @@ public Class135(Class144 class1440, Class140 class1401, Class136 class1360, int public override string ToString() { - var stringBuilder = new StringBuilder(string.Concat("ChannelLPC: Order=", _int1, " WastedBits=", Int0)); + StringBuilder stringBuilder = new StringBuilder(string.Concat("ChannelLPC: Order=", _int1, " WastedBits=", Int0)); stringBuilder.Append(string.Concat(" qlpCoeffPrecision=", _int2, " quantizationLevel=", _int3)); stringBuilder.Append("\n\t\tqlpCoeff: "); - for (var i = 0; i < _int1; i++) + for (int i = 0; i < _int1; i++) { stringBuilder.Append(_int4[i] + " "); } stringBuilder.Append("\n\t\tWarmup: "); - for (var j = 0; j < _int1; j++) + for (int j = 0; j < _int1; j++) { stringBuilder.Append(_int5[j] + " "); } stringBuilder.Append("\n\t\tParameter: "); - for (var k = 0; k < 1 << ((Class138) _class1370).Int0; k++) + for (int k = 0; k < 1 << ((Class138) _class1370).Int0; k++) { stringBuilder.Append(((Class138) _class1370).Class1430.Int0[k] + " "); } diff --git a/GHNamespace4/Class154.cs b/GHNamespace4/Class154.cs index 40ef8e0..0e760a4 100644 --- a/GHNamespace4/Class154.cs +++ b/GHNamespace4/Class154.cs @@ -47,12 +47,12 @@ private void method_0() { if (_class1560 != null) { - var @class = _class1560; + Class156 @class = _class1560; _class1560 = null; - var class2 = @class; + Class156 class2 = @class; do { - var class3 = class2.Class1560; + Class156 class3 = class2.Class1560; class2.Dispose(); class2 = class3; } while (class2 != @class); @@ -61,7 +61,7 @@ private void method_0() private void method_1() { - var @class = _class1560; + Class156 @class = _class1560; while (@class.Class1560 != _class1560) { @class.method_0(); diff --git a/GHNamespace4/Class158.cs b/GHNamespace4/Class158.cs index 0cd18d3..3642865 100644 --- a/GHNamespace4/Class158.cs +++ b/GHNamespace4/Class158.cs @@ -88,8 +88,8 @@ public bool method_1() int num; lock (_stream10) { - var arg390 = _stream10; - var arg391 = _struct660.Intptr0; + GenericAudioStream arg390 = _stream10; + IntPtr arg391 = _struct660.Intptr0; int int_; _class170.method_4(int_ = _class170.method_0().Length); num = arg390.vmethod_3(arg391, int_); diff --git a/GHNamespace4/Class165.cs b/GHNamespace4/Class165.cs index 7a61ff4..b4fa5fb 100644 --- a/GHNamespace4/Class165.cs +++ b/GHNamespace4/Class165.cs @@ -32,7 +32,7 @@ public static void smethod_0(IntPtr intptr1, Class162.Enum16 enum160, int int0, { try { - var @class = (Class165) ((GCHandle) struct661.Intptr1).Target; + Class165 @class = (Class165) ((GCHandle) struct661.Intptr1).Target; @class.method_4(); } catch diff --git a/GHNamespace4/MP3Output.cs b/GHNamespace4/MP3Output.cs index 3b59c4a..ad2f3e3 100644 --- a/GHNamespace4/MP3Output.cs +++ b/GHNamespace4/MP3Output.cs @@ -71,7 +71,7 @@ public int vmethod_0() public void SetStartingTimeBasedOnSomeValue(int int1) { - var @enum = _enum10; + AudioStatus @enum = _enum10; if (@enum != AudioStatus.ShouldStopAudio) { StopPlaying(); @@ -178,7 +178,7 @@ private void method_0(AudioPlayer class1591, IntPtr intptr0, int int1, ref bool { lock (_stream10) { - var num = _stream10.vmethod_3(intptr0, int1); + int num = _stream10.vmethod_3(intptr0, int1); if (num < int1) { bool1 = true; @@ -224,7 +224,7 @@ public void Dispose() [CompilerGenerated] private void method_2(object object0) { - var num = vmethod_1(); + float num = vmethod_1(); while (num < _volume) { if (_enum10 != AudioStatus.ShouldStartAudio) diff --git a/GHNamespace4/WaveOutput.cs b/GHNamespace4/WaveOutput.cs index c44bd46..c86e11c 100644 --- a/GHNamespace4/WaveOutput.cs +++ b/GHNamespace4/WaveOutput.cs @@ -87,7 +87,7 @@ private enum Enum19 private int _int3; - private EventHandler _eventHandler0; + private readonly EventHandler _eventHandler0; public WaveOutput(GenericAudioStream stream11) : this(stream11, -1, 300) { @@ -128,7 +128,7 @@ public void method_0(GenericAudioStream stream11) Class162.Enum17.Const3), "waveOutOpen"); _stream10.Position = vmethod_0(); _class1580 = new Class158[5]; - for (var i = 0; i < 5; i++) + for (int i = 0; i < 5; i++) { _class1580[i] = new Class158(_intptr0, _int0, _stream10, _object0); } @@ -140,7 +140,7 @@ private void method_1() while (true) { _autoResetEvent0.WaitOne(); - var flag = true; + bool flag = true; while (flag) { Class164 @class = null; @@ -210,7 +210,7 @@ private void method_2(IntPtr intptr1, Class162.Enum16 enum160, int int4, ref Str { if (enum160 == Class162.Enum16.Const1) { - var object_ = (Class158) ((GCHandle) struct660.Intptr1).Target; + Class158 object_ = (Class158) ((GCHandle) struct660.Intptr1).Target; lock (_queue1) { _queue1.Enqueue(new Class164(Enum19.Const2, object_)); @@ -244,10 +244,7 @@ private void method_4() { SetStartingTimeBasedOnSomeValue(0); _stopwatch0.Reset(); - if (_eventHandler0 != null) - { - _eventHandler0(this, EventArgs.Empty); - } + _eventHandler0?.Invoke(this, EventArgs.Empty); } public void DifferentStartPlaying() @@ -273,7 +270,7 @@ private void method_5() if (!_bool0) { _enum10 = AudioStatus.ShouldStartAudio; - for (var i = 0; i < 5; i++) + for (int i = 0; i < 5; i++) { _class1580[i].method_1(); } @@ -288,7 +285,7 @@ public void StartPlaying() { return; } - var num = vmethod_0(); + int num = vmethod_0(); StopPlaying(); _stream10.Position = _int3 = num; _enum10 = AudioStatus.IsCurrentlyPlayingAudio; @@ -335,7 +332,7 @@ public void method_7() } if (_class1580 != null) { - for (var i = 0; i < 5; i++) + for (int i = 0; i < 5; i++) { _class1580[i].Dispose(); } @@ -400,7 +397,7 @@ public void SetStartingTimeBasedOnSomeValue(int int4) private void method_8(int int4) { WaitCallback waitCallback = null; - var @enum = _enum10; + AudioStatus @enum = _enum10; if (@enum == AudioStatus.IsCurrentlyPlayingAudio) { StopPlaying(); @@ -412,26 +409,26 @@ private void method_8(int int4) arg350.Position = int4; if (@enum == AudioStatus.ShouldStartAudio) { - var count = _queue0.Count; - var num = 1f / (_int0 * count / (float) GetWaveFormat().short_1); - var num2 = 0f; - var num3 = 1f; + int count = _queue0.Count; + float num = 1f / (_int0 * count / (float) GetWaveFormat().short_1); + float num2 = 0f; + float num3 = 1f; if (GetWaveFormat().waveFormatTag_0 == WaveFormatTag.IeeeFloat) { - var array = new float[_int0 >> 2]; - using (var enumerator = _queue0.GetEnumerator()) + float[] array = new float[_int0 >> 2]; + using (Queue.Enumerator enumerator = _queue0.GetEnumerator()) { while (enumerator.MoveNext()) { - var current = enumerator.Current; - var array2 = current.method_3().method_1(); - var num4 = _stream10.vmethod_4(array, 0, array.Length); + Class158 current = enumerator.Current; + float[] array2 = current.method_3().method_1(); + int num4 = _stream10.vmethod_4(array, 0, array.Length); if (num4 == 0) { break; } - var i = 0; - var num5 = 0; + int i = 0; + int num5 = 0; while (i < num4) { array2[i] = num3 * array2[i] + num2 * array[i]; @@ -452,19 +449,19 @@ private void method_8(int int4) } if (GetWaveFormat().waveFormatTag_0 == WaveFormatTag.Pcm) { - using (var @class = new Class19(_int0)) + using (Class19 @class = new Class19(_int0)) { - foreach (var current2 in _queue0) + foreach (Class158 current2 in _queue0) { - var array3 = current2.method_3().method_2(); - var array4 = Class19.smethod_0(@class); - var num6 = _stream10.vmethod_3(Class19.smethod_1(@class), _int0) >> 1; + short[] array3 = current2.method_3().method_2(); + short[] array4 = Class19.smethod_0(@class); + int num6 = _stream10.vmethod_3(Class19.smethod_1(@class), _int0) >> 1; if (num6 == 0) { break; } - var j = 0; - var num7 = 0; + int j = 0; + int num7 = 0; while (j < num6) { array3[j] = (short) (num3 * array3[j] + num2 * array4[j]); @@ -511,9 +508,9 @@ public WaveFormat GetWaveFormat() public void SetVolume(float float1) { _float0 = float1; - var num = _float0; - var num2 = _float0; - var num3 = (int) (num * 65535f) + ((int) (num2 * 65535f) << 16); + float num = _float0; + float num2 = _float0; + int num3 = (int) (num * 65535f) + ((int) (num2 * 65535f) << 16); lock (_queue1) { _queue1.Enqueue(new Class164(Enum19.Const5, num3)); @@ -559,8 +556,8 @@ public void method_10(bool bool2) private void method_11(object object1) { _bool1 = true; - var num = 0f; - var num2 = _float0; + float num = 0f; + float num2 = _float0; while (num < num2) { SetVolume(num); @@ -575,8 +572,8 @@ private void method_11(object object1) private void method_12(object object1) { _bool1 = true; - var num = 0f; - var num2 = _float0; + float num = 0f; + float num2 = _float0; while (num < num2) { SetVolume(num); diff --git a/GHNamespace5/Class173.cs b/GHNamespace5/Class173.cs index 1f84874..2c365d4 100644 --- a/GHNamespace5/Class173.cs +++ b/GHNamespace5/Class173.cs @@ -65,15 +65,15 @@ private float method_0(float float2) public override void vmethod_0(Class13 class130) { - var @struct = new Struct11(class130.Int0 + class130.method_0(), + Struct11 @struct = new Struct11(class130.Int0 + class130.method_0(), class130.Int0 + class130.method_0() + class130.method_2()); if (_struct110.Length != 0) { - var array = _struct110; - for (var i = 0; i < array.Length; i++) + Struct11[] array = _struct110; + for (int i = 0; i < array.Length; i++) { - var struct2 = array[i]; - var struct3 = struct2.method_0(@struct); + Struct11 struct2 = array[i]; + Struct11 struct3 = struct2.method_0(@struct); if (!struct3.method_1()) { method_1(ref class130.Float0, struct3.method_2() - class130.Int0, struct3.method_3(), @@ -92,13 +92,13 @@ private void method_1(ref float[] float2, int int0, int int1, int int2, float fl case Enum26.Const0: try { - for (var i = 0; i < int1; i++) + for (int i = 0; i < int1; i++) { float2[int0 + i] *= method_0((int2 + i) / float3) * _float1 + _float0; } if (_bool0) { - for (var j = 0; j < int0; j++) + for (int j = 0; j < int0; j++) { float2[j] *= _float0; } @@ -118,13 +118,13 @@ private void method_1(ref float[] float2, int int0, int int1, int int2, float fl } try { - for (var k = 0; k < int1; k++) + for (int k = 0; k < int1; k++) { float2[int0 + k] *= method_0(1f - (int2 + k) / float3) * _float1 + _float0; } if (_bool0) { - for (var l = int0 + int1; l < float2.Length; l++) + for (int l = int0 + int1; l < float2.Length; l++) { float2[l] *= _float0; } @@ -136,21 +136,21 @@ private void method_1(ref float[] float2, int int0, int int1, int int2, float fl return; } IL_117: - var num = int1 / 2; + int num = int1 / 2; float3 = num; - var array = new float[float2.Length - num]; + float[] array = new float[float2.Length - num]; try { - for (var m = 0; m < num; m++) + for (int m = 0; m < num; m++) { float2[int0 + m] = method_0((num - m) / float3) * float2[int0 + m] + method_0(m / float3) * float2[int0 + num + m]; } - for (var n = 0; n < int0 + num; n++) + for (int n = 0; n < int0 + num; n++) { array[n] = float2[n]; } - for (var num2 = int0 + int1; num2 < float2.Length; num2++) + for (int num2 = int0 + int1; num2 < float2.Length; num2++) { array[num2 - num] = float2[num2]; } diff --git a/GHNamespace5/Class174.cs b/GHNamespace5/Class174.cs index c02c5dc..c463ceb 100644 --- a/GHNamespace5/Class174.cs +++ b/GHNamespace5/Class174.cs @@ -17,10 +17,10 @@ public Class174(int int1, float float1) public override void vmethod_0(Class13 class130) { - var array = class130.Float0; - var num = class130.method_0(); - var num2 = class130.method_2(); - var num3 = 0f; + float[] array = class130.Float0; + int num = class130.method_0(); + int num2 = class130.method_2(); + float num3 = 0f; switch (_int0) { case 1: @@ -33,8 +33,8 @@ public override void vmethod_0(Class13 class130) num3 = 1f; break; } - var num4 = _float0 / num3; - for (var i = num; i < num + num2; i++) + float num4 = _float0 / num3; + for (int i = num; i < num + num2; i++) { array[i] = class130.vmethod_1(i, array[i], array[i] * num4); } diff --git a/GHNamespace5/Class179.cs b/GHNamespace5/Class179.cs index d1c20b8..593bb30 100644 --- a/GHNamespace5/Class179.cs +++ b/GHNamespace5/Class179.cs @@ -19,10 +19,9 @@ private class Class180 : IComparer { public int Compare(object x, object y) { - var @class = x as Class181; - var class2 = y as Class181; + Class181 class2 = y as Class181; int num; - if (@class == null) + if (!(x is Class181 @class)) { if (class2 == null) { @@ -39,12 +38,12 @@ public int Compare(object x, object y) } else { - var num2 = (@class.method_1() == Enum28.Const0 || @class.method_1() == Enum28.Const1) ? 0 : 1; - var num3 = (class2.method_1() == Enum28.Const0 || class2.method_1() == Enum28.Const1) ? 0 : 1; + int num2 = (@class.method_1() == Enum28.Const0 || @class.method_1() == Enum28.Const1) ? 0 : 1; + int num3 = (class2.method_1() == Enum28.Const0 || class2.method_1() == Enum28.Const1) ? 0 : 1; num = num2 - num3; if (num == 0) { - var num4 = @class.method_0().method_6() - class2.method_0().method_6(); + long num4 = @class.method_0().method_6() - class2.method_0().method_6(); if (num4 < 0L) { num = -1; @@ -65,9 +64,9 @@ public int Compare(object x, object y) private class Class181 { - private Class193 _class1930; + private readonly Class193 _class1930; - private Enum28 _enum280; + private readonly Enum28 _enum280; public Class193 method_0() { @@ -108,13 +107,13 @@ public bool MoveNext() private Stream _stream0; - private bool _bool1; + private readonly bool _bool1; private Class193[] _class1930; - private INterface9 _interface90 = new Class212(); + private readonly INterface9 _interface90 = new Class212(); - private string _string0 = string.Empty; + private readonly string _string0 = string.Empty; public Class193 this[int int1] => (Class193) _class1930[int1].Clone(); diff --git a/GHNamespace5/Class184.cs b/GHNamespace5/Class184.cs index 69e5d4d..ad41cf4 100644 --- a/GHNamespace5/Class184.cs +++ b/GHNamespace5/Class184.cs @@ -68,7 +68,7 @@ public bool method_0(bool bool1, bool bool2) while (true) { method_7(); - var bool3 = bool1 && _int18 == _int19; + bool bool3 = bool1 && _int18 == _int19; bool flag; switch (_int16) { @@ -114,7 +114,7 @@ public void method_1(byte[] byte2, int int20, int int21) { throw new InvalidOperationException("Old input was not completely processed"); } - var num = int20 + int21; + int num = int20 + int21; if (int20 > num || num > byte2.Length) { throw new ArgumentOutOfRangeException("count"); @@ -139,11 +139,11 @@ public void method_3() _int17 = 0; _bool0 = false; _int8 = 2; - for (var i = 0; i < 32768; i++) + for (int i = 0; i < 32768; i++) { _short0[i] = 0; } - for (var j = 0; j < 32768; j++) + for (int j = 0; j < 32768; j++) { _short1[j] = 0; } @@ -220,7 +220,7 @@ public void method_7() } while (_int11 < 262 && _int18 < _int19) { - var num = 65536 - _int11 - _int10; + int num = 65536 - _int11 - _int10; if (num > _int19 - _int18) { num = _int19 - _int18; @@ -244,8 +244,8 @@ private void method_8() private int method_9() { - var num = (_int6 << 5 ^ _byte0[_int10 + 2]) & 32767; - var num2 = _short1[_int10 & 32767] = _short0[num]; + int num = (_int6 << 5 ^ _byte0[_int10 + 2]) & 32767; + short num2 = _short1[_int10 & 32767] = _short0[num]; _short0[num] = (short) _int10; _int6 = num; return num2 & 65535; @@ -257,30 +257,30 @@ private void method_10() _int7 -= 32768; _int10 -= 32768; _int9 -= 32768; - for (var i = 0; i < 32768; i++) + for (int i = 0; i < 32768; i++) { - var num = _short0[i] & 65535; + int num = _short0[i] & 65535; _short0[i] = (short) ((num >= 32768) ? (num - 32768) : 0); } - for (var j = 0; j < 32768; j++) + for (int j = 0; j < 32768; j++) { - var num2 = _short1[j] & 65535; + int num2 = _short1[j] & 65535; _short1[j] = (short) ((num2 >= 32768) ? (num2 - 32768) : 0); } } private bool method_11(int int20) { - var num = _int12; - var num2 = _int14; - var array = _short1; - var num3 = _int10; - var num4 = _int10 + _int8; - var num5 = Math.Max(_int8, 2); - var num6 = Math.Max(_int10 - 32506, 0); - var num7 = _int10 + 258 - 1; - var b = _byte0[num4 - 1]; - var b2 = _byte0[num4]; + int num = _int12; + int num2 = _int14; + short[] array = _short1; + int num3 = _int10; + int num4 = _int10 + _int8; + int num5 = Math.Max(_int8, 2); + int num6 = Math.Max(_int10 - 32506, 0); + int num7 = _int10 + 258 - 1; + byte b = _byte0[num4 - 1]; + byte b2 = _byte0[num4]; if (num5 >= _int15) { num >>= 2; @@ -294,7 +294,7 @@ private bool method_11(int int20) if (_byte0[int20 + num5] == b2 && _byte0[int20 + num5 - 1] == b && _byte0[int20] == _byte0[num3] && _byte0[int20 + 1] == _byte0[num3 + 1]) { - var num8 = int20 + 2; + int num8 = int20 + 2; num3 += 2; while (_byte0[++num3] == _byte0[++num8] && _byte0[++num3] == _byte0[++num8] && _byte0[++num3] == _byte0[++num8] && _byte0[++num3] == _byte0[++num8] && @@ -333,12 +333,12 @@ private bool method_12(bool bool1, bool bool2) } _int10 += _int11; _int11 = 0; - var num = _int10 - _int9; + int num = _int10 - _int9; if (num < Int0 && (_int9 >= 32768 || num < 32506) && !bool1) { return true; } - var flag = bool2; + bool flag = bool2; if (num > Int0) { num = Int0; @@ -371,7 +371,7 @@ private bool method_13(bool bool1, bool bool2) if (_int11 >= 3 && (num = method_9()) != 0 && _enum290 != Enum29.Const2 && _int10 - num <= 32506 && method_11(num)) { - var flag = _class1900.method_7(_int10 - _int7, _int8); + bool flag = _class1900.method_7(_int10 - _int7, _int8); _int11 -= _int8; if (_int8 <= _int13 && _int11 >= 3) { @@ -404,7 +404,7 @@ private bool method_13(bool bool1, bool bool2) } if (_class1900.method_5()) { - var flag2 = bool2 && _int11 == 0; + bool flag2 = bool2 && _int11 == 0; _class1900.method_4(_byte0, _int9, _int10 - _int9, flag2); _int9 = _int10; return !flag2; @@ -436,11 +436,11 @@ private bool method_14(bool bool1, bool bool2) { method_10(); } - var num = _int7; - var num2 = _int8; + int num = _int7; + int num2 = _int8; if (_int11 >= 3) { - var num3 = method_9(); + int num3 = method_9(); if (_enum290 != Enum29.Const2 && num3 != 0 && _int10 - num3 <= 32506 && method_11(num3) && _int8 <= 5 && (_enum290 == Enum29.Const1 || (_int8 == 3 && _int10 - _int7 > 4096))) { @@ -477,12 +477,12 @@ private bool method_14(bool bool1, bool bool2) } if (_class1900.method_5()) { - var num4 = _int10 - _int9; + int num4 = _int10 - _int9; if (_bool0) { num4--; } - var flag = bool2 && _int11 == 0 && !_bool0; + bool flag = bool2 && _int11 == 0 && !_bool0; _class1900.method_4(_byte0, _int9, num4, flag); _int9 += num4; return !flag; diff --git a/GHNamespace5/Class185.cs b/GHNamespace5/Class185.cs index 07b97f4..dd281c0 100644 --- a/GHNamespace5/Class185.cs +++ b/GHNamespace5/Class185.cs @@ -11,8 +11,8 @@ public class Class185 : INterface8 static Class185() { - var invalidPathChars = Path.GetInvalidPathChars(); - var num = invalidPathChars.Length + 2; + char[] invalidPathChars = Path.GetInvalidPathChars(); + int num = invalidPathChars.Length + 2; Char1 = new char[num]; Array.Copy(invalidPathChars, 0, Char1, 0, invalidPathChars.Length); Char1[num - 1] = '*'; diff --git a/GHNamespace5/Class187.cs b/GHNamespace5/Class187.cs index 242cb8e..4dfb92e 100644 --- a/GHNamespace5/Class187.cs +++ b/GHNamespace5/Class187.cs @@ -65,7 +65,7 @@ public int method_6(byte[] byte1, int int3, int int4) { throw new InvalidOperationException("Bit buffer is not byte aligned!"); } - var num = 0; + int num = 0; while (_int2 > 0 && int4 > 0) { byte1[int3++] = (byte) _uint0; @@ -78,7 +78,7 @@ public int method_6(byte[] byte1, int int3, int int4) { return num; } - var num2 = _int1 - _int0; + int num2 = _int1 - _int0; if (int4 > num2) { int4 = num2; @@ -119,7 +119,7 @@ public void method_8(byte[] byte1, int int3, int int4) { throw new InvalidOperationException("Old input was not completely processed"); } - var num = int3 + int4; + int num = int3 + int4; if (int3 <= num && num <= byte1.Length) { if ((int4 & 1) != 0) diff --git a/GHNamespace5/Stream19.cs b/GHNamespace5/Stream19.cs index 9656863..f6c51fa 100644 --- a/GHNamespace5/Stream19.cs +++ b/GHNamespace5/Stream19.cs @@ -40,20 +40,12 @@ public Stream19(Stream stream1, Class196 class1961) : this(stream1, class1961, 4 public Stream19(Stream stream1, Class196 class1961, int int0) { - if (stream1 == null) - { - throw new ArgumentNullException("baseInputStream"); - } - if (class1961 == null) - { - throw new ArgumentNullException("inflater"); - } if (int0 <= 0) { throw new ArgumentOutOfRangeException("bufferSize"); } - Stream0 = stream1; - Class1960 = class1961; + Stream0 = stream1 ?? throw new ArgumentNullException("baseInputStream"); + Class1960 = class1961 ?? throw new ArgumentNullException("inflater"); Class2010 = new Class201(stream1, int0); } @@ -68,12 +60,12 @@ public long method_0(long long1) Stream0.Seek(long1, SeekOrigin.Current); return long1; } - var num = 2048; + int num = 2048; if (long1 < 2048L) { num = (int) long1; } - var array = new byte[num]; + byte[] array = new byte[num]; return Stream0.Read(array, 0, array.Length); } @@ -137,10 +129,10 @@ public override int Read(byte[] buffer, int offset, int count) { throw new SharpZipBaseException("Need a dictionary"); } - var num = count; + int num = count; while (true) { - var num2 = Class1960.method_7(buffer, offset, num); + int num2 = Class1960.method_7(buffer, offset, num); offset += num2; num -= num2; if (num == 0 || Class1960.method_10()) diff --git a/GHNamespace5/Stream21.cs b/GHNamespace5/Stream21.cs index b8e1929..9ee4148 100644 --- a/GHNamespace5/Stream21.cs +++ b/GHNamespace5/Stream21.cs @@ -58,8 +58,8 @@ public override void WriteByte(byte value) public override int ReadByte() { - var array = new byte[1]; - var num = Read(array, 0, 1); + byte[] array = new byte[1]; + int num = Read(array, 0, 1); if (num <= 0) { return -1; @@ -73,7 +73,7 @@ public override int Read(byte[] buffer, int offset, int count) { throw new ArgumentNullException("buffer"); } - var num = 0; + int num = 0; if (Long1 >= Long0) { return 0; @@ -85,7 +85,7 @@ public override int Read(byte[] buffer, int offset, int count) } if (Byte0 != null) { - var num3 = (num2 > (long) Byte0.Length) ? Byte0.Length : ((int) num2); + int num3 = (num2 > (long) Byte0.Length) ? Byte0.Length : ((int) num2); Array.Copy(Byte0, 0, buffer, offset, num3); if (num3 >= Byte0.Length) { @@ -93,8 +93,8 @@ public override int Read(byte[] buffer, int offset, int count) } else { - var num4 = Byte0.Length - num3; - var destinationArray = new byte[num4]; + int num4 = Byte0.Length - num3; + byte[] destinationArray = new byte[num4]; Array.Copy(Byte0, num3, destinationArray, 0, num4); Byte0 = destinationArray; } @@ -104,13 +104,13 @@ public override int Read(byte[] buffer, int offset, int count) } while (num2 > 0L) { - var array = Class2060.method_2(); + byte[] array = Class2060.method_2(); if (array == null) { throw new TarException("unexpected EOF with " + num2 + " bytes unread"); } - var num5 = (int) num2; - var num6 = array.Length; + int num5 = (int) num2; + int num6 = array.Length; if (num6 > num5) { Array.Copy(array, 0, buffer, offset, num5); diff --git a/GHNamespace5/Stream22.cs b/GHNamespace5/Stream22.cs index 1837b40..1c70f65 100644 --- a/GHNamespace5/Stream22.cs +++ b/GHNamespace5/Stream22.cs @@ -51,17 +51,14 @@ public Stream22(Stream stream1, Class194 class1941, int int0) { throw new ArgumentException("Must support writing", "baseOutputStream"); } - if (class1941 == null) - { - throw new ArgumentNullException("deflater"); - } + if (int0 <= 0) { throw new ArgumentOutOfRangeException("bufferSize"); } Stream0 = stream1; _byte0 = new byte[int0]; - Class1940 = class1941; + Class1940 = class1941 ?? throw new ArgumentNullException("deflater"); } public virtual void vmethod_0() @@ -69,7 +66,7 @@ public virtual void vmethod_0() Class1940.method_3(); while (!Class1940.method_4()) { - var num = Class1940.method_9(_byte0, 0, _byte0.Length); + int num = Class1940.method_9(_byte0, 0, _byte0.Length); if (num <= 0) { break; @@ -119,8 +116,8 @@ public void method_3(byte[] byte1, int int0, int int1) public void method_4(string string1) { - var @class = new Class208(); - var rgbKey = Class207.smethod_0(Class186.smethod_3(string1)); + Class208 @class = new Class208(); + byte[] rgbKey = Class207.smethod_0(Class186.smethod_3(string1)); _icryptoTransform0 = @class.CreateEncryptor(rgbKey, null); } @@ -128,7 +125,7 @@ public void method_5() { while (!Class1940.method_5()) { - var num = Class1940.method_9(_byte0, 0, _byte0.Length); + int num = Class1940.method_9(_byte0, 0, _byte0.Length); if (num <= 0) { break; diff --git a/GHNamespace5/ZIPCompressor.cs b/GHNamespace5/ZIPCompressor.cs index 5a11c89..6478aa6 100644 --- a/GHNamespace5/ZIPCompressor.cs +++ b/GHNamespace5/ZIPCompressor.cs @@ -65,7 +65,7 @@ public Class193 method_5() { method_8(); } - var num = Class2010.method_10(); + int num = Class2010.method_10(); if (num != 33639248 && num != 101010256 && num != 84233040 && num != 117853008) { if (num != 101075792) @@ -78,19 +78,19 @@ public Class193 method_5() { throw new ZipException("Wrong Local header signature: 0x" + string.Format("{0:X}", num)); } - var int_ = (short) Class2010.method_9(); + short int_ = (short) Class2010.method_9(); _int1 = Class2010.method_9(); _int0 = Class2010.method_9(); - var num2 = (uint) Class2010.method_10(); - var num3 = Class2010.method_10(); + uint num2 = (uint) Class2010.method_10(); + int num3 = Class2010.method_10(); Long0 = Class2010.method_10(); _long1 = Class2010.method_10(); - var num4 = Class2010.method_9(); - var num5 = Class2010.method_9(); - var flag = (_int1 & 1) == 1; - var array = new byte[num4]; + int num4 = Class2010.method_9(); + int num5 = Class2010.method_9(); + bool flag = (_int1 & 1) == 1; + byte[] array = new byte[num4]; Class2010.method_5(array); - var string_ = Class186.smethod_2(_int1, array); + string string_ = Class186.smethod_2(_int1, array); _class1930 = new Class193(string_, int_); _class1930.method_5(_int1); _class1930.method_28((Enum31) _int0); @@ -120,7 +120,7 @@ public Class193 method_5() _class1930.method_18(num2); if (num5 > 0) { - var array2 = new byte[num5]; + byte[] array2 = new byte[num5]; Class2010.method_5(array2); _class1930.method_30(array2); } @@ -208,14 +208,14 @@ public void method_8() { if ((_int1 & 8) != 0) { - var array = new byte[2048]; + byte[] array = new byte[2048]; while (Read(array, 0, array.Length) > 0) { } return; } Long0 -= Class1960.method_12(); - var expr67 = Class2010; + Class201 expr67 = Class2010; expr67.method_2(expr67.method_1() + Class1960.method_13()); } if (Class2010.method_1() > Long0 && Long0 >= 0L) @@ -228,7 +228,7 @@ public void method_8() Class2010.method_2(0); while (Long0 != 0L) { - var num = (int) method_0(Long0 & 4294967295L); + int num = (int) method_0(Long0 & 4294967295L); if (num <= 0) { throw new ZipException("Zip archive ends early."); @@ -241,7 +241,7 @@ public void method_8() public override int ReadByte() { - var array = new byte[1]; + byte[] array = new byte[1]; if (Read(array, 0, 1) <= 0) { return -1; @@ -272,10 +272,10 @@ private int method_11(byte[] byte0, int int2, int int3) { throw new ZipException("No password set."); } - var @class = new Class208(); - var rgbKey = Class207.smethod_0(Class186.smethod_3(_password)); + Class208 @class = new Class208(); + byte[] rgbKey = Class207.smethod_0(Class186.smethod_3(_password)); Class2010.method_12(@class.CreateDecryptor(rgbKey, null)); - var array = new byte[12]; + byte[] array = new byte[12]; Class2010.method_7(array, 0, 12); if (array[11] != _class1930.method_2()) { @@ -337,8 +337,8 @@ private int method_12(byte[] byte0, int int2, int int3) { throw new ArgumentException("Offset + count exceeds buffer size"); } - var flag = false; - var num = _int0; + bool flag = false; + int num = _int0; if (num != 0) { if (num == 8) diff --git a/GHNamespace6/Class190.cs b/GHNamespace6/Class190.cs index 70a67a3..8e693f2 100644 --- a/GHNamespace6/Class190.cs +++ b/GHNamespace6/Class190.cs @@ -35,7 +35,7 @@ public Class191(Class190 class1901, int int4, int int5, int int6) public void method_0() { - for (var i = 0; i < Short0.Length; i++) + for (int i = 0; i < Short0.Length; i++) { Short0[i] = 0; } @@ -56,15 +56,15 @@ public void method_2(short[] short2, byte[] byte1) public void method_3() { - var array = new int[_int3]; - var num = 0; + int[] array = new int[_int3]; + int num = 0; _short1 = new short[Short0.Length]; - for (var i = 0; i < _int3; i++) + for (int i = 0; i < _int3; i++) { array[i] = num; num += _int2[i] << 15 - i; } - for (var j = 0; j < Int1; j++) + for (int j = 0; j < Int1; j++) { int num2 = Byte0[j]; if (num2 > 0) @@ -77,16 +77,16 @@ public void method_3() public void method_4() { - var num = Short0.Length; - var array = new int[num]; - var i = 0; - var num2 = 0; - for (var j = 0; j < num; j++) + int num = Short0.Length; + int[] array = new int[num]; + int i = 0; + int num2 = 0; + for (int j = 0; j < num; j++) { int num3 = Short0[j]; if (num3 != 0) { - var num4 = i++; + int num4 = i++; int num5; while (num4 > 0 && Short0[array[num5 = (num4 - 1) / 2]] > num3) { @@ -99,17 +99,17 @@ public void method_4() } while (i < 2) { - var num6 = (num2 < 2) ? (++num2) : 0; + int num6 = (num2 < 2) ? (++num2) : 0; array[i++] = num6; } Int1 = Math.Max(num2 + 1, Int0); - var num7 = i; - var array2 = new int[4 * i - 2]; - var array3 = new int[2 * i - 1]; - var num8 = num7; - for (var k = 0; k < i; k++) + int num7 = i; + int[] array2 = new int[4 * i - 2]; + int[] array3 = new int[2 * i - 1]; + int num8 = num7; + for (int k = 0; k < i; k++) { - var num9 = array[k]; + int num9 = array[k]; array2[2 * k] = num9; array2[2 * k + 1] = -1; array3[k] = Short0[num9] << 8; @@ -117,9 +117,9 @@ public void method_4() } do { - var num10 = array[0]; - var num11 = array[--i]; - var num12 = 0; + int num10 = array[0]; + int num11 = array[--i]; + int num12 = 0; int l; for (l = 1; l < i; l = l * 2 + 1) { @@ -130,17 +130,17 @@ public void method_4() array[num12] = array[l]; num12 = l; } - var num13 = array3[num11]; + int num13 = array3[num11]; while ((l = num12) > 0 && array3[array[num12 = (l - 1) / 2]] > num13) { array[l] = array[num12]; } array[l] = num11; - var num14 = array[0]; + int num14 = array[0]; num11 = num8++; array2[2 * num11] = num10; array2[2 * num11 + 1] = num14; - var num15 = Math.Min(array3[num10] & 255, array3[num14] & 255); + int num15 = Math.Min(array3[num10] & 255, array3[num14] & 255); num13 = (array3[num11] = array3[num10] + array3[num14] - num15 + 1); num12 = 0; for (l = 1; l < i; l = num12 * 2 + 1) @@ -167,8 +167,8 @@ public void method_4() public int method_5() { - var num = 0; - for (var i = 0; i < Short0.Length; i++) + int num = 0; + for (int i = 0; i < Short0.Length; i++) { num += Short0[i] * Byte0[i]; } @@ -177,11 +177,11 @@ public int method_5() public void method_6(Class191 class1910) { - var num = -1; - var i = 0; + int num = -1; + int i = 0; while (i < Int1) { - var num2 = 1; + int num2 = 1; int num3 = Byte0[i]; int num4; int num5; @@ -196,8 +196,8 @@ public void method_6(Class191 class1910) num5 = 3; if (num != num3) { - var expr_3BCp0 = class1910.Short0; - var expr_3BCp1 = num3; + short[] expr_3BCp0 = class1910.Short0; + int expr_3BCp1 = num3; expr_3BCp0[expr_3BCp1] += 1; num2 = 0; } @@ -218,26 +218,26 @@ public void method_6(Class191 class1910) } if (num2 < num5) { - var expr_8CCp0 = class1910.Short0; - var expr_8CCp1 = num; + short[] expr_8CCp0 = class1910.Short0; + int expr_8CCp1 = num; expr_8CCp0[expr_8CCp1] += (short) num2; } else if (num != 0) { - var exprAdCp0 = class1910.Short0; - var exprAdCp1 = 16; + short[] exprAdCp0 = class1910.Short0; + int exprAdCp1 = 16; exprAdCp0[exprAdCp1] += 1; } else if (num2 <= 10) { - var exprCfCp0 = class1910.Short0; - var exprCfCp1 = 17; + short[] exprCfCp0 = class1910.Short0; + int exprCfCp1 = 17; exprCfCp0[exprCfCp1] += 1; } else { - var exprEcCp0 = class1910.Short0; - var exprEcCp1 = 18; + short[] exprEcCp0 = class1910.Short0; + int exprEcCp1 = 18; exprEcCp0[exprEcCp1] += 1; } } @@ -245,11 +245,11 @@ public void method_6(Class191 class1910) public void method_7(Class191 class1910) { - var num = -1; - var i = 0; + int num = -1; + int i = 0; while (i < Int1) { - var num2 = 1; + int num2 = 1; int num3 = Byte0[i]; int num4; int num5; @@ -310,20 +310,20 @@ public void method_7(Class191 class1910) private void method_8(int[] int4) { Byte0 = new byte[Short0.Length]; - var num = int4.Length / 2; - var num2 = (num + 1) / 2; - var num3 = 0; - for (var i = 0; i < _int3; i++) + int num = int4.Length / 2; + int num2 = (num + 1) / 2; + int num3 = 0; + for (int i = 0; i < _int3; i++) { _int2[i] = 0; } - var array = new int[num]; + int[] array = new int[num]; array[num - 1] = 0; - for (var j = num - 1; j >= 0; j--) + for (int j = num - 1; j >= 0; j--) { if (int4[2 * j + 1] != -1) { - var num4 = array[j] + 1; + int num4 = array[j] + 1; if (num4 > _int3) { num4 = _int3; @@ -333,7 +333,7 @@ private void method_8(int[] int4) } else { - var num5 = array[j]; + int num5 = array[j]; _int2[num5 - 1]++; Byte0[int4[2 * j]] = (byte) array[j]; } @@ -342,7 +342,7 @@ private void method_8(int[] int4) { return; } - var num6 = _int3 - 1; + int num6 = _int3 - 1; while (true) { if (_int2[--num6] != 0) @@ -361,13 +361,13 @@ private void method_8(int[] int4) } _int2[_int3 - 1] += num3; _int2[_int3 - 2] -= num3; - var num7 = 2 * num2; - for (var num8 = _int3; num8 != 0; num8--) + int num7 = 2 * num2; + for (int num8 = _int3; num8 != 0; num8--) { - var k = _int2[num8 - 1]; + int k = _int2[num8 - 1]; while (k > 0) { - var num9 = 2 * int4[num7++]; + int num9 = 2 * int4[num7++]; if (int4[num9 + 1] == -1) { Byte0[int4[num9]] = (byte) num8; @@ -451,7 +451,7 @@ static Class190() }; Short0 = new short[286]; Byte1 = new byte[286]; - var i = 0; + int i = 0; while (i < 144) { Short0[i] = smethod_0(48 + i << 8); @@ -508,7 +508,7 @@ public void method_1(int int3) Class1890.method_5(_class1910.Int1 - 257, 5); Class1890.method_5(_class1911.Int1 - 1, 5); Class1890.method_5(int3 - 4, 4); - for (var i = 0; i < int3; i++) + for (int i = 0; i < int3; i++) { Class1890.method_5(_class1912.Byte0[Int0[i]], 3); } @@ -518,20 +518,20 @@ public void method_1(int int3) public void method_2() { - for (var i = 0; i < _int1; i++) + for (int i = 0; i < _int1; i++) { - var num = _byte3[i] & 255; + int num = _byte3[i] & 255; int num2 = _short2[i]; if (num2-- != 0) { - var num3 = smethod_1(num); + int num3 = smethod_1(num); _class1910.method_1(num3); - var num4 = (num3 - 261) / 4; + int num4 = (num3 - 261) / 4; if (num4 > 0 && num4 <= 5) { Class1890.method_5(num & (1 << num4) - 1, num4); } - var num5 = smethod_2(num2); + int num5 = smethod_2(num2); _class1911.method_1(num5); num4 = num5 / 2 - 1; if (num4 > 0) @@ -559,29 +559,29 @@ public void method_3(byte[] byte4, int int3, int int4, bool bool0) public void method_4(byte[] byte4, int int3, int int4, bool bool0) { - var expr15Cp0 = _class1910.Short0; - var expr15Cp1 = 256; + short[] expr15Cp0 = _class1910.Short0; + int expr15Cp1 = 256; expr15Cp0[expr15Cp1] += 1; _class1910.method_4(); _class1911.method_4(); _class1910.method_6(_class1912); _class1911.method_6(_class1912); _class1912.method_4(); - var num = 4; - for (var i = 18; i > num; i--) + int num = 4; + for (int i = 18; i > num; i--) { if (_class1912.Byte0[Int0[i]] > 0) { num = i + 1; } } - var num2 = 14 + num * 3 + _class1912.method_5() + _class1910.method_5() + _class1911.method_5() + _int2; - var num3 = _int2; - for (var j = 0; j < 286; j++) + int num2 = 14 + num * 3 + _class1912.method_5() + _class1910.method_5() + _class1911.method_5() + _int2; + int num3 = _int2; + for (int j = 0; j < 286; j++) { num3 += _class1910.Short0[j] * Byte1[j]; } - for (var k = 0; k < 30; k++) + for (int k = 0; k < 30; k++) { num3 += _class1911.Short0[k] * Byte2[k]; } @@ -618,7 +618,7 @@ public bool method_6(int int3) { _short2[_int1] = 0; _byte3[_int1++] = (byte) int3; - var expr39Cp0 = _class1910.Short0; + short[] expr39Cp0 = _class1910.Short0; expr39Cp0[int3] += 1; return method_5(); } @@ -627,17 +627,17 @@ public bool method_7(int int3, int int4) { _short2[_int1] = (short) int3; _byte3[_int1++] = (byte) (int4 - 3); - var num = smethod_1(int4 - 3); - var expr45Cp0 = _class1910.Short0; - var expr45Cp1 = num; + int num = smethod_1(int4 - 3); + short[] expr45Cp0 = _class1910.Short0; + int expr45Cp1 = num; expr45Cp0[expr45Cp1] += 1; if (num >= 265 && num < 285) { _int2 += (num - 261) / 4; } - var num2 = smethod_2(int3 - 1); - var expr93Cp0 = _class1911.Short0; - var expr93Cp1 = num2; + int num2 = smethod_2(int3 - 1); + short[] expr93Cp0 = _class1911.Short0; + int expr93Cp1 = num2; expr93Cp0[expr93Cp1] += 1; if (num2 >= 4) { @@ -658,7 +658,7 @@ private static int smethod_1(int int3) { return 285; } - var num = 257; + int num = 257; while (int3 >= 8) { num += 4; @@ -669,7 +669,7 @@ private static int smethod_1(int int3) private static int smethod_2(int int3) { - var num = 0; + int num = 0; while (int3 >= 4) { num += 2; diff --git a/GHNamespace6/Class193.cs b/GHNamespace6/Class193.cs index 420ac7e..992073f 100644 --- a/GHNamespace6/Class193.cs +++ b/GHNamespace6/Class193.cs @@ -39,7 +39,7 @@ private enum Enum32 : byte private byte[] _byte0; - private string _string1; + private readonly string _string1; private int _int1; @@ -134,7 +134,7 @@ public int method_8() private bool method_9(int int2) { - var result = false; + bool result = false; if ((byte) (_enum320 & Enum32.Flag5) != 0 && (method_10() == 0 || method_10() == 10) && (method_8() & int2) == int2) { @@ -154,7 +154,7 @@ public int method_11() { return _ushort1; } - var result = 10; + int result = 10; if (method_16()) { result = 45; @@ -199,7 +199,7 @@ public bool method_15() bool result; if (!(result = _bool0)) { - var num = _ulong1; + ulong num = _ulong1; if (_ushort1 == 0 && method_0()) { num += 12uL; @@ -231,12 +231,12 @@ public void method_18(long long2) public void method_19(DateTime dateTime0) { - var num = (uint) dateTime0.Year; - var num2 = (uint) dateTime0.Month; - var num3 = (uint) dateTime0.Day; - var num4 = (uint) dateTime0.Hour; - var num5 = (uint) dateTime0.Minute; - var num6 = (uint) dateTime0.Second; + uint num = (uint) dateTime0.Year; + uint num2 = (uint) dateTime0.Month; + uint num3 = (uint) dateTime0.Day; + uint num4 = (uint) dateTime0.Hour; + uint num5 = (uint) dateTime0.Minute; + uint num6 = (uint) dateTime0.Second; if (num < 1980u) { num = 1980u; @@ -344,7 +344,7 @@ public void method_30(byte[] byte2) public void method_31(bool bool1) { - var @class = new Class202(_byte0); + Class202 @class = new Class202(_byte0); if (@class.method_6(1)) { if ((_ushort1 & 255) < 45) @@ -382,13 +382,13 @@ public void method_31(bool bool1) @class.method_15(); while (@class.method_5() >= 4) { - var num = @class.method_16(); - var num2 = @class.method_16(); + int num = @class.method_16(); + int num2 = @class.method_16(); if (num == 1) { if (num2 >= 24) { - var fileTime = @class.method_14(); + long fileTime = @class.method_14(); @class.method_14(); @class.method_14(); method_19(DateTime.FromFileTime(fileTime)); @@ -401,11 +401,11 @@ public void method_31(bool bool1) } else if (@class.method_6(21589)) { - var num3 = @class.method_3(); - var num4 = @class.method_17(); + int num3 = @class.method_3(); + int num4 = @class.method_17(); if ((num4 & 1) != 0 && num3 >= 5) { - var seconds = @class.method_15(); + int seconds = @class.method_15(); method_19((new DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime() + new TimeSpan(0, 0, 0, seconds, 0)) .ToLocalTime()); } @@ -419,7 +419,7 @@ public string method_32() public bool method_33() { - var length = _string0.Length; + int length = _string0.Length; int arg410; if (length > 0) { @@ -440,7 +440,7 @@ public bool method_34() public object Clone() { - var @class = (Class193) MemberwiseClone(); + Class193 @class = (Class193) MemberwiseClone(); if (_byte0 != null) { @class._byte0 = new byte[_byte0.Length]; diff --git a/GHNamespace6/Class194.cs b/GHNamespace6/Class194.cs index dad512e..d37da24 100644 --- a/GHNamespace6/Class194.cs +++ b/GHNamespace6/Class194.cs @@ -105,15 +105,15 @@ public void method_8(Enum29 enum290) public int method_9(byte[] byte0, int int2, int int3) { - var num = int3; + int num = int3; if (_int1 == 127) { throw new InvalidOperationException("Deflater closed"); } if (_int1 < 16) { - var num2 = 30720; - var num3 = _int0 - 1 >> 1; + int num2 = 30720; + int num3 = _int0 - 1 >> 1; if (num3 < 0 || num3 > 3) { num3 = 3; @@ -127,7 +127,7 @@ public int method_9(byte[] byte0, int int2, int int3) _class1890.method_6(num2); if ((_int1 & 1) != 0) { - var num4 = _class1840.method_4(); + int num4 = _class1840.method_4(); _class1840.ResetAdler(); _class1890.method_6(num4 >> 16); _class1890.method_6(num4 & 65535); @@ -136,7 +136,7 @@ public int method_9(byte[] byte0, int int2, int int3) } while (true) { - var num5 = _class1890.method_8(byte0, int2, int3); + int num5 = _class1890.method_8(byte0, int2, int3); int2 += num5; _long0 += num5; int3 -= num5; @@ -154,7 +154,7 @@ public int method_9(byte[] byte0, int int2, int int3) { if (_int0 != 0) { - for (var i = 8 + (-_class1890.method_3() & 7); i > 0; i -= 10) + for (int i = 8 + (-_class1890.method_3() & 7); i > 0; i -= 10) { _class1890.method_5(2, 10); } @@ -166,7 +166,7 @@ public int method_9(byte[] byte0, int int2, int int3) _class1890.method_4(); if (!_bool0) { - var num6 = _class1840.method_4(); + int num6 = _class1840.method_4(); _class1890.method_6(num6 >> 16); _class1890.method_6(num6 & 65535); } diff --git a/GHNamespace6/Class195.cs b/GHNamespace6/Class195.cs index df39b13..9603d76 100644 --- a/GHNamespace6/Class195.cs +++ b/GHNamespace6/Class195.cs @@ -5,9 +5,9 @@ namespace GHNamespace6 { public class Class195 : IDisposable { - private string _string0 = string.Empty; + private readonly string _string0 = string.Empty; - private string _string1 = string.Empty; + private readonly string _string1 = string.Empty; private Stream21 _stream210; diff --git a/GHNamespace6/Class196.cs b/GHNamespace6/Class196.cs index 7af6c82..53c945b 100644 --- a/GHNamespace6/Class196.cs +++ b/GHNamespace6/Class196.cs @@ -201,7 +201,7 @@ public void method_0() private bool method_1() { - var num = _class1870.method_0(16); + int num = _class1870.method_0(16); if (num < 0) { return false; @@ -232,7 +232,7 @@ private bool method_2() { while (_int6 > 0) { - var num = _class1870.method_0(8); + int num = _class1870.method_0(8); if (num < 0) { return false; @@ -246,7 +246,7 @@ private bool method_2() private bool method_3() { - var i = _class2030.method_4(); + int i = _class2030.method_4(); while (i >= 258) { int num; @@ -295,7 +295,7 @@ private bool method_3() if (_int6 > 0) { _int4 = 10; - var num2 = _class1870.method_0(_int6); + int num2 = _class1870.method_0(_int6); if (num2 < 0) { return false; @@ -327,7 +327,7 @@ private bool method_3() if (_int6 > 0) { _int4 = 8; - var num3 = _class1870.method_0(_int6); + int num3 = _class1870.method_0(_int6); if (num3 < 0) { return false; @@ -345,7 +345,7 @@ private bool method_4() { while (_int6 > 0) { - var num = _class1870.method_0(8); + int num = _class1870.method_0(8); if (num < 0) { return false; @@ -386,7 +386,7 @@ private bool method_5() } else { - var num = _class1870.method_0(3); + int num = _class1870.method_0(3); if (num < 0) { return false; @@ -449,7 +449,7 @@ private bool method_5() default: throw new SharpZipBaseException("Inflater.Decode unknown mode"); } - var num2 = _class1870.method_0(16); + int num2 = _class1870.method_0(16); if (num2 < 0) { return false; @@ -461,7 +461,7 @@ private bool method_5() } _int4 = 5; IL_1A4: - var num3 = _class2030.method_3(_class1870, _int9); + int num3 = _class2030.method_3(_class1870, _int9); _int9 -= num3; if (_int9 == 0) { @@ -505,12 +505,12 @@ public int method_7(byte[] byte0, int int10, int int11) } return 0; } - var num = 0; + int num = 0; while (true) { if (_int4 != 11) { - var num2 = _class2030.method_6(byte0, int10, int11); + int num2 = _class2030.method_6(byte0, int10, int11); if (num2 > 0) { _class2000.vmethod_2(byte0, int10, num2); diff --git a/GHNamespace6/Class197.cs b/GHNamespace6/Class197.cs index bc21571..c8de415 100644 --- a/GHNamespace6/Class197.cs +++ b/GHNamespace6/Class197.cs @@ -16,8 +16,8 @@ static Class197() { try { - var array = new byte[288]; - var i = 0; + byte[] array = new byte[288]; + int i = 0; while (i < 144) { array[i++] = 8; @@ -56,9 +56,9 @@ public Class197(byte[] byte0) private void method_0(byte[] byte0) { - var array = new int[16]; - var array2 = new int[16]; - for (var i = 0; i < byte0.Length; i++) + int[] array = new int[16]; + int[] array2 = new int[16]; + for (int i = 0; i < byte0.Length; i++) { int num = byte0[i]; if (num > 0) @@ -66,33 +66,33 @@ private void method_0(byte[] byte0) array[num]++; } } - var num2 = 0; - var num3 = 512; - for (var j = 1; j <= 15; j++) + int num2 = 0; + int num3 = 512; + for (int j = 1; j <= 15; j++) { array2[j] = num2; num2 += array[j] << 16 - j; if (j >= 10) { - var num4 = array2[j] & 130944; - var num5 = num2 & 130944; + int num4 = array2[j] & 130944; + int num5 = num2 & 130944; num3 += num5 - num4 >> 16 - j; } } _short0 = new short[num3]; - var num6 = 512; - for (var k = 15; k >= 10; k--) + int num6 = 512; + for (int k = 15; k >= 10; k--) { - var num7 = num2 & 130944; + int num7 = num2 & 130944; num2 -= array[k] << 16 - k; - var num8 = num2 & 130944; - for (var l = num8; l < num7; l += 128) + int num8 = num2 & 130944; + for (int l = num8; l < num7; l += 128) { _short0[Class190.smethod_0(l)] = (short) (-num6 << 4 | k); num6 += 1 << k - 9; } } - for (var m = 0; m < byte0.Length; m++) + for (int m = 0; m < byte0.Length; m++) { int num9 = byte0[m]; if (num9 != 0) @@ -110,7 +110,7 @@ private void method_0(byte[] byte0) else { int num11 = _short0[num10 & 511]; - var num12 = 1 << (num11 & 15); + int num12 = 1 << (num11 & 15); num11 = -(num11 >> 4); do { @@ -134,15 +134,15 @@ public int method_1(Class187 class1870) class1870.method_1(num2 & 15); return num2 >> 4; } - var num3 = -(num2 >> 4); - var int_ = num2 & 15; + int num3 = -(num2 >> 4); + int int_ = num2 & 15; if ((num = class1870.method_0(int_)) >= 0) { num2 = _short0[num3 | num >> 9]; class1870.method_1(num2 & 15); return num2 >> 4; } - var num4 = class1870.method_2(); + int num4 = class1870.method_2(); num = class1870.method_0(num4); num2 = _short0[num3 | num >> 9]; if ((num2 & 15) <= num4) @@ -154,7 +154,7 @@ public int method_1(Class187 class1870) } else { - var num5 = class1870.method_2(); + int num5 = class1870.method_2(); num = class1870.method_0(num5); int num2 = _short0[num]; if (num2 >= 0 && (num2 & 15) <= num5) diff --git a/GHNamespace6/Class198.cs b/GHNamespace6/Class198.cs index db5d899..27f86c6 100644 --- a/GHNamespace6/Class198.cs +++ b/GHNamespace6/Class198.cs @@ -122,7 +122,7 @@ public bool method_0(Class187 class1870) IL_176: while (_int9 < _int6) { - var num2 = class1870.method_0(3); + int num2 = class1870.method_0(3); if (num2 < 0) { return false; @@ -137,8 +137,8 @@ public bool method_0(Class187 class1870) _int3 = 4; goto IL_F4; IL_2C: - var num3 = Int1[_int8]; - var num4 = class1870.method_0(num3); + int num3 = Int1[_int8]; + int num4 = class1870.method_0(num3); if (num4 < 0) { return false; @@ -191,14 +191,14 @@ public bool method_0(Class187 class1870) public Class197 method_1() { - var destinationArray = new byte[_int4]; + byte[] destinationArray = new byte[_int4]; Array.Copy(_byte1, 0, destinationArray, 0, _int4); return new Class197(destinationArray); } public Class197 method_2() { - var destinationArray = new byte[_int5]; + byte[] destinationArray = new byte[_int5]; Array.Copy(_byte1, _int4, destinationArray, 0, _int5); return new Class197(destinationArray); } diff --git a/GHNamespace6/Class200.cs b/GHNamespace6/Class200.cs index 775f053..9aec945 100644 --- a/GHNamespace6/Class200.cs +++ b/GHNamespace6/Class200.cs @@ -43,11 +43,11 @@ public void vmethod_2(byte[] byte0, int int0, int int1) { throw new ArgumentOutOfRangeException("count", "exceeds buffer size"); } - var num = _uint0 & 65535u; - var num2 = _uint0 >> 16; + uint num = _uint0 & 65535u; + uint num2 = _uint0 >> 16; while (int1 > 0) { - var num3 = 3800; + int num3 = 3800; if (3800 > int1) { num3 = int1; diff --git a/GHNamespace6/Class201.cs b/GHNamespace6/Class201.cs index 132c323..430c33c 100644 --- a/GHNamespace6/Class201.cs +++ b/GHNamespace6/Class201.cs @@ -62,10 +62,10 @@ public void method_3(Class196 class1960) public void method_4() { _int0 = 0; - var i = _byte0.Length; + int i = _byte0.Length; while (i > 0) { - var num = _stream0.Read(_byte0, _int0, i); + int num = _stream0.Read(_byte0, _int0, i); if (num > 0) { _int0 += num; @@ -103,8 +103,8 @@ public int method_6(byte[] byte3, int int3, int int4) { throw new ArgumentOutOfRangeException("length"); } - var num = int3; - var i = int4; + int num = int3; + int i = int4; while (i > 0) { if (_int2 <= 0) @@ -115,7 +115,7 @@ public int method_6(byte[] byte3, int int3, int int4) return 0; } } - var num2 = Math.Min(i, _int2); + int num2 = Math.Min(i, _int2); Array.Copy(_byte0, _int0 - _int2, byte3, num, num2); num += num2; i -= num2; @@ -130,8 +130,8 @@ public int method_7(byte[] byte3, int int3, int int4) { throw new ArgumentOutOfRangeException("length"); } - var num = int3; - var i = int4; + int num = int3; + int i = int4; while (i > 0) { if (_int2 <= 0) @@ -142,7 +142,7 @@ public int method_7(byte[] byte3, int int3, int int4) return 0; } } - var num2 = Math.Min(i, _int2); + int num2 = Math.Min(i, _int2); Array.Copy(_byte1, _int1 - _int2, byte3, num, num2); num += num2; i -= num2; @@ -161,7 +161,7 @@ public int method_8() throw new ZipException("EOF in header"); } } - var result = (byte) (_byte0[_int0 - _int2] & 255); + byte result = (byte) (_byte0[_int0 - _int2] & 255); _int2--; return result; } diff --git a/GHNamespace6/Class202.cs b/GHNamespace6/Class202.cs index 316ee27..bea1b4a 100644 --- a/GHNamespace6/Class202.cs +++ b/GHNamespace6/Class202.cs @@ -77,8 +77,8 @@ public bool method_6(int int3) _int1 = _byte0.Length; _int2 = 0; _int0 = 0; - var num = _int1; - var num2 = int3 - 1; + int num = _int1; + int num2 = int3 - 1; while (num2 != int3 && _int0 < _byte0.Length - 3) { num2 = method_20(); @@ -103,12 +103,12 @@ public void method_7(int int3, byte[] byte1) { throw new ArgumentOutOfRangeException("headerID"); } - var num = (byte1 == null) ? 0 : byte1.Length; + int num = (byte1 == null) ? 0 : byte1.Length; if (num > 65535) { throw new ArgumentOutOfRangeException("fieldData", "exceeds maximum length"); } - var num2 = _byte0.Length + num + 4; + int num2 = _byte0.Length + num + 4; if (method_6(int3)) { num2 -= method_3() + 4; @@ -118,9 +118,9 @@ public void method_7(int int3, byte[] byte1) throw new ZipException("Data exceeds maximum length"); } method_13(int3); - var array = new byte[num2]; + byte[] array = new byte[num2]; _byte0.CopyTo(array, 0); - var index = _byte0.Length; + int index = _byte0.Length; _byte0 = array; method_21(ref index, int3); method_21(ref index, num); @@ -137,7 +137,7 @@ public void method_8() public void method_9(int int3) { - var byte_ = _memoryStream0.ToArray(); + byte[] byte_ = _memoryStream0.ToArray(); _memoryStream0 = null; method_7(int3, byte_); } @@ -162,14 +162,14 @@ public void method_12(long long0) public bool method_13(int int3) { - var result = false; + bool result = false; if (method_6(int3)) { result = true; - var num = _int1 - 4; - var destinationArray = new byte[_byte0.Length - (method_3() + 4)]; + int num = _int1 - 4; + byte[] destinationArray = new byte[_byte0.Length - (method_3() + 4)]; Array.Copy(_byte0, 0, destinationArray, 0, num); - var num2 = num + method_3() + 4; + int num2 = num + method_3() + 4; Array.Copy(_byte0, num2, destinationArray, num, _byte0.Length - num2); _byte0 = destinationArray; } @@ -185,7 +185,7 @@ public long method_14() public int method_15() { method_19(4); - var result = _byte0[_int0] + (_byte0[_int0 + 1] << 8) + (_byte0[_int0 + 2] << 16) + + int result = _byte0[_int0] + (_byte0[_int0 + 1] << 8) + (_byte0[_int0 + 2] << 16) + (_byte0[_int0 + 3] << 24); _int0 += 4; return result; @@ -194,14 +194,14 @@ public int method_15() public int method_16() { method_19(2); - var result = _byte0[_int0] + (_byte0[_int0 + 1] << 8); + int result = _byte0[_int0] + (_byte0[_int0 + 1] << 8); _int0 += 2; return result; } public int method_17() { - var result = -1; + int result = -1; if (_int0 < _byte0.Length && _int1 + _int2 > _int0) { result = _byte0[_int0]; @@ -234,7 +234,7 @@ private int method_20() { throw new ZipException("End of extra data"); } - var result = _byte0[_int0] + (_byte0[_int0 + 1] << 8); + int result = _byte0[_int0] + (_byte0[_int0 + 1] << 8); _int0 += 2; return result; } diff --git a/GHNamespace6/Class203.cs b/GHNamespace6/Class203.cs index 8a4abf5..b4b7105 100644 --- a/GHNamespace6/Class203.cs +++ b/GHNamespace6/Class203.cs @@ -37,8 +37,8 @@ public void method_2(int int2, int int3) { throw new InvalidOperationException("Window full"); } - var num = _int0 - int3 & 32767; - var num2 = 32768 - int2; + int num = _int0 - int3 & 32767; + int num2 = 32768 - int2; if (num > num2 || _int0 >= num2) { method_1(num, int2, int3); @@ -59,7 +59,7 @@ public void method_2(int int2, int int3) public int method_3(Class187 class1870, int int2) { int2 = Math.Min(Math.Min(int2, 32768 - _int1), class1870.method_3()); - var num = 32768 - _int0; + int num = 32768 - _int0; int num2; if (int2 > num) { @@ -90,7 +90,7 @@ public int method_5() public int method_6(byte[] byte1, int int2, int int3) { - var num = _int0; + int num = _int0; if (int3 > _int1) { int3 = _int1; @@ -99,8 +99,8 @@ public int method_6(byte[] byte1, int int2, int int3) { num = (_int0 - _int1 + int3 & 32767); } - var num2 = int3; - var num3 = int3 - num; + int num2 = int3; + int num3 = int3 - num; if (num3 > 0) { Array.Copy(_byte0, 32768 - num3, byte1, int2, num3); diff --git a/GHNamespace6/Class204.cs b/GHNamespace6/Class204.cs index f4861b8..6dfb2d6 100644 --- a/GHNamespace6/Class204.cs +++ b/GHNamespace6/Class204.cs @@ -16,11 +16,11 @@ public class Class204 : ICloneable private long _long0; - private DateTime _dateTime1; + private readonly DateTime _dateTime1; - private int _int3; + private readonly int _int3; - private byte _byte0; + private readonly byte _byte0; private string _string1; @@ -32,9 +32,9 @@ public class Class204 : ICloneable private string _string5; - private int _int4; + private readonly int _int4; - private int _int5; + private readonly int _int5; public static string String6 = "None"; @@ -66,11 +66,7 @@ public string method_0() public void method_1(string string9) { - if (string9 == null) - { - throw new ArgumentNullException("value"); - } - _string0 = string9; + _string0 = string9 ?? throw new ArgumentNullException("value"); } public int method_2() @@ -129,11 +125,7 @@ public string method_11() public void method_12(string string9) { - if (string9 == null) - { - throw new ArgumentNullException("value"); - } - _string1 = string9; + _string1 = string9 ?? throw new ArgumentNullException("value"); } public string method_13() @@ -143,11 +135,7 @@ public string method_13() public void method_14(string string9) { - if (string9 == null) - { - throw new ArgumentNullException("value"); - } - _string2 = string9; + _string2 = string9 ?? throw new ArgumentNullException("value"); } public string method_15() @@ -157,11 +145,7 @@ public string method_15() public void method_16(string string9) { - if (string9 == null) - { - throw new ArgumentNullException("value"); - } - _string3 = string9; + _string3 = string9 ?? throw new ArgumentNullException("value"); } public string method_17() @@ -176,7 +160,7 @@ public void method_18(string string9) _string4 = string9.Substring(0, Math.Min(32, string9.Length)); return; } - var text = Environment.UserName; + string text = Environment.UserName; if (text.Length > 32) { text = text.Substring(0, 32); @@ -221,8 +205,7 @@ public override int GetHashCode() public override bool Equals(object obj) { - var @class = obj as Class204; - return @class != null && (_string0 == @class._string0 && _int0 == @class._int0 && + return obj is Class204 @class && (_string0 == @class._string0 && _int0 == @class._int0 && method_2() == @class.method_2() && method_4() == @class.method_4() && method_6() == @class.method_6() && method_8() == @class.method_8() && method_9() == @class.method_9() && method_10() == @class.method_10() && diff --git a/GHNamespace6/Class205.cs b/GHNamespace6/Class205.cs index 83657ec..b60a175 100644 --- a/GHNamespace6/Class205.cs +++ b/GHNamespace6/Class205.cs @@ -15,17 +15,18 @@ private Class205() public object Clone() { - var @class = new Class205(); - @class._string0 = _string0; - @class._class2040 = (Class204) _class2040.Clone(); + Class205 @class = new Class205 + { + _string0 = _string0, + _class2040 = (Class204)_class2040.Clone() + }; @class.method_1(method_0()); return @class; } public override bool Equals(object obj) { - var @class = obj as Class205; - return @class != null && method_0().Equals(@class.method_0()); + return obj is Class205 @class && method_0().Equals(@class.method_0()); } public override int GetHashCode() diff --git a/GHNamespace6/Class206.cs b/GHNamespace6/Class206.cs index 74a5e26..d1781ea 100644 --- a/GHNamespace6/Class206.cs +++ b/GHNamespace6/Class206.cs @@ -10,7 +10,7 @@ public class Class206 private Stream _stream1; - private byte[] _byte0; + private readonly byte[] _byte0; private int _int0; @@ -40,7 +40,7 @@ public byte[] method_2() { throw new TarException("Failed to read a record"); } - var array = new byte[512]; + byte[] array = new byte[512]; Array.Copy(_byte0, _int0 * 512, array, 0, 512); _int0++; return array; @@ -53,9 +53,9 @@ private bool method_3() throw new TarException("no input stream stream defined"); } _int0 = 0; - var num = 0; + int num = 0; long num2; - for (var i = method_0(); i > 0; i -= (int) num2) + for (int i = method_0(); i > 0; i -= (int) num2) { num2 = _stream0.Read(_byte0, num, i); if (num2 <= 0L) @@ -80,7 +80,7 @@ public void method_4(byte[] byte1) } if (byte1.Length != 512) { - var string_ = string.Format( + string string_ = string.Format( "TarBuffer.WriteBlock - block to write has length '{0}' which is not the block size of '{1}'", byte1.Length, 512); throw new TarException(string_); @@ -109,7 +109,7 @@ public void method_5(byte[] byte1, int int4) } if (int4 + 512 > byte1.Length) { - var string_ = string.Format( + string string_ = string.Format( "TarBuffer.WriteBlock - record has length '{0}' with offset '{1}' which is less than the record size of '{2}'", byte1.Length, int4, _int2); throw new TarException(string_); @@ -142,7 +142,7 @@ private void method_7() } if (_int0 > 0) { - var num = _int0 * 512; + int num = _int0 * 512; Array.Clear(_byte0, num, method_0() - num); method_6(); } diff --git a/GHNamespace6/Class207.cs b/GHNamespace6/Class207.cs index 531b5b8..a10c4ee 100644 --- a/GHNamespace6/Class207.cs +++ b/GHNamespace6/Class207.cs @@ -21,7 +21,7 @@ public static byte[] smethod_0(byte[] byte0) 591751049u, 878082192u }; - for (var i = 0; i < byte0.Length; i++) + for (int i = 0; i < byte0.Length; i++) { array[0] = Class192.smethod_0(array[0], byte0[i]); array[1] = array[1] + (byte) array[0]; diff --git a/GHNamespace6/Stream23.cs b/GHNamespace6/Stream23.cs index cd2fbe2..0423874 100644 --- a/GHNamespace6/Stream23.cs +++ b/GHNamespace6/Stream23.cs @@ -78,11 +78,11 @@ public void method_10(Class193 class1931) { throw new ZipException("Too many entries for Zip file"); } - var @enum = class1931.method_27(); - var int_ = _int0; + Enum31 @enum = class1931.method_27(); + int int_ = _int0; class1931.method_5(class1931.method_4() & 2048); _bool2 = false; - var flag = true; + bool flag = true; if (@enum == Enum31.Const0) { class1931.method_5(class1931.method_4() & -9); @@ -195,12 +195,12 @@ public void method_10(Class193 class1931) method_8(0); } } - var array = Class186.smethod_4(class1931.method_4(), class1931.method_20()); + byte[] array = Class186.smethod_4(class1931.method_4(), class1931.method_20()); if (array.Length > 65535) { throw new ZipException("Entry name too long."); } - var @class = new Class202(class1931.method_29()); + Class202 @class = new Class202(class1931.method_29()); if (class1931.method_15() && (flag || _bool2)) { @class.method_8(); @@ -228,7 +228,7 @@ public void method_10(Class193 class1931) { @class.method_13(1); } - var array2 = @class.method_0(); + byte[] array2 = @class.method_0(); method_7(array.Length); method_7(array2.Length); if (array.Length > 0) @@ -273,7 +273,7 @@ public void method_11() { base.vmethod_0(); } - var num = (_enum310 == Enum31.Const1) ? Class1940.method_1() : _long0; + long num = (_enum310 == Enum31.Const1) ? Class1940.method_1() : _long0; if (_class1930.method_21() < 0L) { _class1930.method_22(_long0); @@ -303,13 +303,13 @@ public void method_11() _long1 += num; if (_class1930.method_0()) { - var expr_1E6 = _class1930; + Class193 expr_1E6 = _class1930; expr_1E6.method_24(expr_1E6.method_23() + 12L); } if (_bool2) { _bool2 = false; - var position = Stream0.Position; + long position = Stream0.Position; Stream0.Seek(_long2, SeekOrigin.Begin); method_8((int) _class1930.method_25()); if (_class1930.method_15()) @@ -354,8 +354,8 @@ private void method_12(long long4) { _long1 += 12L; method_4(method_1()); - var array = new byte[12]; - var random = new Random(); + byte[] array = new byte[12]; + Random random = new Random(); random.NextBytes(array); array[11] = (byte) (long4 >> 24); method_3(array, 0, array.Length); @@ -386,7 +386,7 @@ public override void Write(byte[] buffer, int offset, int count) } _class1920.vmethod_3(buffer, offset, count); _long0 += count; - var @enum = _enum310; + Enum31 @enum = _enum310; if (@enum != Enum31.Const0) { if (@enum != Enum31.Const1) @@ -408,10 +408,10 @@ public override void Write(byte[] buffer, int offset, int count) private void method_13(byte[] byte2, int int1, int int2) { - var array = new byte[4096]; + byte[] array = new byte[4096]; while (int2 > 0) { - var num = (int2 < 4096) ? int2 : 4096; + int num = (int2 < 4096) ? int2 : 4096; Array.Copy(byte2, int1, array, 0, num); method_3(array, 0, num); Stream0.Write(array, 0, num); @@ -431,7 +431,7 @@ public override void vmethod_0() method_11(); } long num = _arrayList0.Count; - var num2 = 0L; + long num2 = 0L; foreach (Class193 @class in _arrayList0) { method_8(33639248); @@ -457,12 +457,12 @@ public override void vmethod_0() { method_8(-1); } - var array = Class186.smethod_4(@class.method_4(), @class.method_20()); + byte[] array = Class186.smethod_4(@class.method_4(), @class.method_20()); if (array.Length > 65535) { throw new ZipException("Name too long."); } - var class2 = new Class202(@class.method_29()); + Class202 class2 = new Class202(@class.method_29()); if (@class.method_16()) { class2.method_8(); @@ -484,8 +484,8 @@ public override void vmethod_0() { class2.method_13(1); } - var array2 = class2.method_0(); - var array3 = (@class.method_32() != null) + byte[] array2 = class2.method_0(); + byte[] array3 = (@class.method_32() != null) ? Class186.smethod_4(@class.method_4(), @class.method_32()) : new byte[0]; if (array3.Length > 65535) @@ -531,7 +531,7 @@ public override void vmethod_0() } num2 += 46 + array.Length + array2.Length + array3.Length; } - using (var stream = new Stream25(Stream0)) + using (Stream25 stream = new Stream25(Stream0)) { stream.method_1(num, num2, _long1, _byte1); } diff --git a/GHNamespace6/Stream24.cs b/GHNamespace6/Stream24.cs index 9aa734c..ca42a10 100644 --- a/GHNamespace6/Stream24.cs +++ b/GHNamespace6/Stream24.cs @@ -96,7 +96,7 @@ public void method_2() } if (_long0 < Long1) { - var string_ = string.Format( + string string_ = string.Format( "Entry closed at '{0}' before the '{1}' bytes specified in the header were written", _long0, Long1); throw new TarException(string_); } @@ -130,7 +130,7 @@ public override void Write(byte[] buffer, int offset, int count) } if (_long0 + count > Long1) { - var message = string.Format("request to write '{0}' bytes exceeds size in header of '{1}' bytes", count, + string message = string.Format("request to write '{0}' bytes exceeds size in header of '{1}' bytes", count, Long1); throw new ArgumentOutOfRangeException("count", message); } @@ -138,7 +138,7 @@ public override void Write(byte[] buffer, int offset, int count) { if (_int0 + count >= Byte0.Length) { - var num = Byte0.Length - _int0; + int num = Byte0.Length - _int0; Array.Copy(Byte1, 0, Byte0, 0, _int0); Array.Copy(buffer, offset, Byte0, _int0, num); Class2060.method_4(Byte0); @@ -164,7 +164,7 @@ public override void Write(byte[] buffer, int offset, int count) return; } Class2060.method_5(buffer, offset); - var num2 = Byte0.Length; + int num2 = Byte0.Length; _long0 += num2; count -= num2; offset += num2; diff --git a/GHNamespace6/Stream25.cs b/GHNamespace6/Stream25.cs index 6a1bead..30d6e28 100644 --- a/GHNamespace6/Stream25.cs +++ b/GHNamespace6/Stream25.cs @@ -57,7 +57,7 @@ public override void Write(byte[] buffer, int offset, int count) public override void Close() { - var stream = _stream0; + Stream stream = _stream0; _stream0 = null; if (_bool0 && stream != null) { @@ -68,7 +68,7 @@ public override void Close() public void method_0(long long0, long long1, long long2) { - var position = _stream0.Position; + long position = _stream0.Position; method_4(101075792); method_6(44L); method_2(45); @@ -120,7 +120,7 @@ public void method_1(long long0, long long1, long long2, byte[] byte0) { method_4((int) long2); } - var num = (byte0 != null) ? byte0.Length : 0; + int num = (byte0 != null) ? byte0.Length : 0; if (num > 65535) { throw new ZipException(string.Format("Comment length({0}) is too long can only be 64K", num)); diff --git a/GHNamespace6/ZIPManager.cs b/GHNamespace6/ZIPManager.cs index 51e323b..a059244 100644 --- a/GHNamespace6/ZIPManager.cs +++ b/GHNamespace6/ZIPManager.cs @@ -28,22 +28,22 @@ public static void ProcessFile(IEnumerable fileNameList, Stream zipFile, { if (compressionAmount >= 0 && compressionAmount <= 9) { - var @class = new Class192(); - var stream = new Stream23(zipFile); + Class192 @class = new Class192(); + Stream23 stream = new Stream23(zipFile); stream.method_6(compressionAmount); if (password != null) { stream.method_2(password); } - var num = 0; - using (var enumerator = fileNameList.GetEnumerator()) + int num = 0; + using (IEnumerator enumerator = fileNameList.GetEnumerator()) { while (enumerator.MoveNext()) { - var current = enumerator.Current; - var class2 = new Class193(current); + string current = enumerator.Current; + Class193 class2 = new Class193(current); class2.method_19(DateTime.Now); - var stream2 = fileStreamList[num++]; + Stream stream2 = fileStreamList[num++]; byte[] array; if (stream2 is MemoryStream) { @@ -52,7 +52,7 @@ public static void ProcessFile(IEnumerable fileNameList, Stream zipFile, else { array = new byte[stream2.Length]; - var num2 = stream2.Read(array, 0, array.Length); + int num2 = stream2.Read(array, 0, array.Length); if (num2 < array.Length) { Array.Resize(ref array, num2); @@ -92,14 +92,14 @@ public static byte[] smethod_5(byte[] byte0, string string0) public static byte[] smethod_6(Stream stream0, string string0) { - var memoryStream = new MemoryStream(); + MemoryStream memoryStream = new MemoryStream(); smethod_9(stream0, memoryStream, string0); return memoryStream.ToArray(); } public static void ExtractBytes(Stream streamIn, out byte[] bytes, string fileName, string password) { - var memoryStream = new MemoryStream(); + MemoryStream memoryStream = new MemoryStream(); smethod_10(streamIn, memoryStream, fileName, password); bytes = memoryStream.ToArray(); } @@ -116,12 +116,12 @@ public static void smethod_9(Stream stream0, Stream stream1, string string0) public static void smethod_10(Stream zipFile, Stream memoryStream, string fileName, string password) { - var zipManager = new ZipCompressor(zipFile); + ZipCompressor zipManager = new ZipCompressor(zipFile); if (password != null) { zipManager.method_3(password); } - var buffer = new byte[2048]; + byte[] buffer = new byte[2048]; Class193 @class; while ((@class = zipManager.method_5()) != null) { @@ -144,18 +144,18 @@ public static void smethod_10(Stream zipFile, Stream memoryStream, string fileNa public static void smethod_11(string string0, List list0, List list1, string string1) { Stream stream = File.OpenRead(string0); - var stream2 = new ZipCompressor(stream); + ZipCompressor stream2 = new ZipCompressor(stream); if (string1 != null) { stream2.method_3(string1); } - var array = new byte[2048]; + byte[] array = new byte[2048]; Class193 @class; while ((@class = stream2.method_5()) != null) { if (list1.Contains(@class.method_20())) { - var index = list1.IndexOf(@class.method_20()); + int index = list1.IndexOf(@class.method_20()); using (Stream stream3 = File.Create(list0[index])) { if (stream3.CanWrite) diff --git a/GHNamespace7/ActionList.cs b/GHNamespace7/ActionList.cs index 28fc803..4621862 100644 --- a/GHNamespace7/ActionList.cs +++ b/GHNamespace7/ActionList.cs @@ -15,12 +15,12 @@ public class ActionList public void method_0(Delegate6 delegate61) { - var @delegate = _delegate60; + Delegate6 @delegate = _delegate60; Delegate6 delegate2; do { delegate2 = @delegate; - var value = (Delegate6) Delegate.Combine(delegate2, delegate61); + Delegate6 value = (Delegate6) Delegate.Combine(delegate2, delegate61); @delegate = Interlocked.CompareExchange(ref _delegate60, value, delegate2); } while (@delegate != delegate2); } @@ -33,9 +33,9 @@ public ActionList(List actionList) public void method_1() { EventArgs0 e; - foreach (var current in _actionList) + foreach (QbEditor current in _actionList) { - var int_ = 100 * _actionList.IndexOf(current) / _actionList.Count; + int int_ = 100 * _actionList.IndexOf(current) / _actionList.Count; e = new EventArgs0(current + " Processing...", int_); _delegate60(this, e); string finalStatus; diff --git a/GHNamespace7/Class208.cs b/GHNamespace7/Class208.cs index 1437bef..2b3aa67 100644 --- a/GHNamespace7/Class208.cs +++ b/GHNamespace7/Class208.cs @@ -61,7 +61,7 @@ public override void GenerateIV() public override void GenerateKey() { _byte0 = new byte[12]; - var random = new Random(); + Random random = new Random(); random.NextBytes(_byte0); } diff --git a/GHNamespace7/Class209.cs b/GHNamespace7/Class209.cs index 0a78d6e..d131077 100644 --- a/GHNamespace7/Class209.cs +++ b/GHNamespace7/Class209.cs @@ -9,7 +9,7 @@ public class Class209 public byte method_0() { - var num = (_uint0[2] & 65535u) | 2u; + uint num = (_uint0[2] & 65535u) | 2u; return (byte) (num * (num ^ 1u) >> 8); } diff --git a/GHNamespace7/Class210.cs b/GHNamespace7/Class210.cs index 3fe629c..0cff93f 100644 --- a/GHNamespace7/Class210.cs +++ b/GHNamespace7/Class210.cs @@ -20,7 +20,7 @@ public Class210(byte[] byte0) public byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount) { - var array = new byte[inputCount]; + byte[] array = new byte[inputCount]; TransformBlock(inputBuffer, inputOffset, inputCount, array, 0); return array; } @@ -28,9 +28,9 @@ public byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int input public int TransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset) { - for (var i = inputOffset; i < inputOffset + inputCount; i++) + for (int i = inputOffset; i < inputOffset + inputCount; i++) { - var byte_ = inputBuffer[i]; + byte byte_ = inputBuffer[i]; outputBuffer[outputOffset++] = (byte) (inputBuffer[i] ^ method_0()); method_2(byte_); } diff --git a/GHNamespace7/Class211.cs b/GHNamespace7/Class211.cs index 9078c79..d7597ca 100644 --- a/GHNamespace7/Class211.cs +++ b/GHNamespace7/Class211.cs @@ -20,7 +20,7 @@ public Class211(byte[] byte0) public byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount) { - var array = new byte[inputCount]; + byte[] array = new byte[inputCount]; TransformBlock(inputBuffer, inputOffset, inputCount, array, 0); return array; } @@ -28,9 +28,9 @@ public byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int input public int TransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset) { - for (var i = inputOffset; i < inputOffset + inputCount; i++) + for (int i = inputOffset; i < inputOffset + inputCount; i++) { - var b = (byte) (inputBuffer[i] ^ method_0()); + byte b = (byte) (inputBuffer[i] ^ method_0()); outputBuffer[outputOffset++] = b; method_2(b); } diff --git a/GHNamespace7/Class212.cs b/GHNamespace7/Class212.cs index 3681fb3..9469fde 100644 --- a/GHNamespace7/Class212.cs +++ b/GHNamespace7/Class212.cs @@ -5,9 +5,9 @@ namespace GHNamespace7 { public class Class212 : INterface9 { - private INterface8 _interface80; + private readonly INterface8 _interface80; - private DateTime _dateTime0 = DateTime.Now; + private readonly DateTime _dateTime0 = DateTime.Now; public Class212() { diff --git a/GHNamespace7/Class216.cs b/GHNamespace7/Class216.cs index 7c8181b..c33d26a 100644 --- a/GHNamespace7/Class216.cs +++ b/GHNamespace7/Class216.cs @@ -18,9 +18,9 @@ public static void smethod_0(string string2) { if (SortedDictionary0.Count != 0) { - using (var streamWriter = File.CreateText(string2 + DateTime.Now.ToString(String1) + ".log")) + using (StreamWriter streamWriter = File.CreateText(string2 + DateTime.Now.ToString(String1) + ".log")) { - foreach (var current in SortedDictionary0.Keys) + foreach (string current in SortedDictionary0.Keys) { streamWriter.WriteLine("[" + current + "]"); streamWriter.WriteLine("{"); diff --git a/GHNamespace7/Class219.cs b/GHNamespace7/Class219.cs index 698ed4f..c408748 100644 --- a/GHNamespace7/Class219.cs +++ b/GHNamespace7/Class219.cs @@ -61,7 +61,7 @@ public void method_4() { return; } - var rect = new Rectangle(0, 0, method_0(), method_1()); + Rectangle rect = new Rectangle(0, 0, method_0(), method_1()); _bitmapData0 = method_3().LockBits(rect, ImageLockMode.ReadWrite, method_3().PixelFormat); _intptr0 = _bitmapData0.Scan0; _byte0 = new byte[method_0() * method_1() * (method_2() ? 4 : 3)]; @@ -105,14 +105,14 @@ public void method_7(int int2, int int3, Color color0) } if (method_2()) { - var num = (int3 * method_0() + int2) * 4; + int num = (int3 * method_0() + int2) * 4; _byte0[num] = color0.B; _byte0[num + 1] = color0.G; _byte0[num + 2] = color0.R; _byte0[num + 3] = color0.A; return; } - var num2 = (int3 * method_0() + int2) * 3; + int num2 = (int3 * method_0() + int2) * 3; _byte0[num2] = color0.B; _byte0[num2 + 1] = color0.G; _byte0[num2 + 2] = color0.R; diff --git a/GHNamespace7/Class220.cs b/GHNamespace7/Class220.cs index 48a7223..d507c4f 100644 --- a/GHNamespace7/Class220.cs +++ b/GHNamespace7/Class220.cs @@ -17,7 +17,7 @@ public abstract class Class220 : IEnumerator public bool MoveNext() { - var array = vmethod_0(false); + int[] array = vmethod_0(false); return array.Length > 0; } @@ -34,9 +34,9 @@ public Array method_0() { throw new InvalidOperationException("CombinatorialBase collection must be Reset() before usage"); } - for (var i = 0; i < Int0.Length; i++) + for (int i = 0; i < Int0.Length; i++) { - var index = Int0[i]; + int index = Int0[i]; Array1.SetValue(Array0.GetValue(index), i); } return Array1; diff --git a/GHNamespace7/Class221.cs b/GHNamespace7/Class221.cs index d5eb547..7c842df 100644 --- a/GHNamespace7/Class221.cs +++ b/GHNamespace7/Class221.cs @@ -28,10 +28,10 @@ public virtual bool vmethod_0(T gparam0) public virtual bool vmethod_1(ICollection icollection0) { - var result = false; + bool result = false; if (icollection0 != null) { - foreach (var current in icollection0) + foreach (T current in icollection0) { result = vmethod_0(current); } diff --git a/GHNamespace7/Class222.cs b/GHNamespace7/Class222.cs index b4cd047..5d3c28a 100644 --- a/GHNamespace7/Class222.cs +++ b/GHNamespace7/Class222.cs @@ -74,8 +74,8 @@ public Class227(T gparam1) public override void vmethod_0(Class225.Class226 class2262) { - var @class = (Class227) class2262; - var t = Gparam0; + Class227 @class = (Class227) class2262; + T t = Gparam0; Gparam0 = @class.Gparam0; @class.Gparam0 = t; } @@ -153,7 +153,7 @@ public Class222(IEnumerable ienumerable0, IComparer icomparer0) : this(ico { throw new ArgumentNullException("collection"); } - foreach (var current in ienumerable0) + foreach (T current in ienumerable0) { vmethod_1(current); } @@ -192,7 +192,7 @@ public bool vmethod_1(T gparam0) public virtual bool vmethod_2(T gparam0) { - var @class = new Class227(gparam0); + Class227 @class = new Class227(gparam0); return _class2250.method_1(gparam0, @class) == @class; } @@ -234,11 +234,11 @@ public void method_2(T[] gparam0, int int0, int int1) { throw new ArgumentException("destination array cannot hold the requested elements"); } - using (var @struct = _class2250.method_14()) + using (Class225.Struct77 @struct = _class2250.method_14()) { while (@struct.MoveNext()) { - var @class = (Class227) @struct.Current; + Class227 @class = (Class227) @struct.Current; if (int1-- == 0) { break; @@ -269,11 +269,11 @@ void ICollection.CopyTo(Array array, int index) { throw new ArgumentException(); } - using (var @struct = _class2250.method_14()) + using (Class225.Struct77 @struct = _class2250.method_14()) { while (@struct.MoveNext()) { - var @class = (Class227) @struct.Current; + Class227 @class = (Class227) @struct.Current; array.SetValue(@class.Gparam0, index++); } return; diff --git a/GHNamespace7/Class225.cs b/GHNamespace7/Class225.cs index eae82a6..3a2222b 100644 --- a/GHNamespace7/Class225.cs +++ b/GHNamespace7/Class225.cs @@ -71,7 +71,7 @@ public bool MoveNext() { return false; } - var class2 = _stack0.Pop(); + Class226 class2 = _stack0.Pop(); @class = class2.Class2261; } while (@class != null) @@ -179,10 +179,10 @@ public Class226 this[int int0] { if (int0 >= 0 && int0 < method_4()) { - var class226 = _class2260; + Class226 class226 = _class2260; while (class226 != null) { - var num = (int) ((class226.Class2260 == null) ? 0u : class226.Class2260.method_2()); + int num = (int) ((class226.Class2260 == null) ? 0u : class226.Class2260.method_2()); if (int0 == num) { return class226; @@ -236,9 +236,9 @@ public Class226 method_1(T gparam0, Class226 class2261) _uint0 += 1u; return _class2260; } - var list = smethod_0(); - var int_ = method_5(gparam0, list); - var @class = list[list.Count - 1]; + List list = smethod_0(); + int int_ = method_5(gparam0, list); + Class226 @class = list[list.Count - 1]; if (@class == null) { if (class2261 == null) @@ -257,8 +257,8 @@ public Class226 method_2(T gparam0) { return null; } - var list = smethod_0(); - var num = method_5(gparam0, list); + List list = smethod_0(); + int num = method_5(gparam0, list); Class226 result = null; if (num == 0) { @@ -270,7 +270,7 @@ public Class226 method_2(T gparam0) public Class226 method_3(T gparam0) { - var @interface = (INterface10) _object0; + INterface10 @interface = (INterface10) _object0; Class226 @class; int num; for (@class = _class2260; @class != null; @class = ((num < 0) ? @class.Class2260 : @class.Class2261)) @@ -295,9 +295,9 @@ public int method_4() private int method_5(T gparam0, List list0) { - var @interface = (INterface10) _object0; - var num = 0; - var class226 = _class2260; + INterface10 @interface = (INterface10) _object0; + int num = 0; + Class226 class226 = _class2260; if (list0 != null) { list0.Add(_class2260); @@ -332,7 +332,7 @@ private int method_5(T gparam0, List list0) private Class226 method_6(int int0, Class226 class2261, List list0) { list0[list0.Count - 1] = class2261; - var @class = list0[list0.Count - 3]; + Class226 @class = list0[list0.Count - 3]; if (int0 < 0) { @class.Class2260 = class2261; @@ -341,9 +341,9 @@ private Class226 method_6(int int0, Class226 class2261, List list0) { @class.Class2261 = class2261; } - for (var i = 0; i < list0.Count - 2; i += 2) + for (int i = 0; i < list0.Count - 2; i += 2) { - var expr_3D = list0[i]; + Class226 expr_3D = list0[i]; expr_3D.method_3(expr_3D.method_2() + 1u); } if (!@class.method_0()) @@ -360,15 +360,15 @@ private Class226 method_6(int int0, Class226 class2261, List list0) private Class226 method_7(List list0) { - var num = list0.Count - 1; - var @class = list0[num]; + int num = list0.Count - 1; + Class226 @class = list0[num]; if (@class.Class2260 != null) { - var class2 = smethod_2(@class.Class2260, @class.Class2261, list0); + Class226 class2 = smethod_2(@class.Class2260, @class.Class2261, list0); @class.vmethod_0(class2); if (class2.Class2260 != null) { - var class3 = class2.Class2260; + Class226 class3 = class2.Class2260; list0.Add(null); list0.Add(class3); class2.vmethod_0(class3); @@ -376,7 +376,7 @@ private Class226 method_7(List list0) } else if (@class.Class2261 != null) { - var class226 = @class.Class2261; + Class226 class226 = @class.Class2261; list0.Add(null); list0.Add(class226); @class.vmethod_0(class226); @@ -389,9 +389,9 @@ private Class226 method_7(List list0) } list0[num] = null; method_13((num == 0) ? null : list0[num - 2], @class, 0u, null); - for (var i = 0; i < list0.Count - 2; i += 2) + for (int i = 0; i < list0.Count - 2; i += 2) { - var exprD2 = list0[i]; + Class226 exprD2 = list0[i]; exprD2.method_3(exprD2.method_2() - 1u); } if (@class.method_0()) @@ -412,10 +412,10 @@ private Class226 method_7(List list0) private void method_8(List list0) { - var num = list0.Count - 1; + int num = list0.Count - 1; while (list0[num - 3] != null && !list0[num - 3].method_0()) { - var arg340 = list0[num - 2]; + Class226 arg340 = list0[num - 2]; list0[num - 3].method_1(true); arg340.method_1(true); num -= 4; @@ -434,10 +434,10 @@ private void method_8(List list0) private void method_9(List list0) { - var num = list0.Count - 1; + int num = list0.Count - 1; do { - var @class = list0[num - 1]; + Class226 @class = list0[num - 1]; if (!@class.method_0()) { num = method_12(num, list0); @@ -463,12 +463,12 @@ private void method_9(List list0) private void method_10(int int0, List list0) { - var @class = list0[int0]; - var class2 = list0[int0 - 2]; - var class3 = list0[int0 - 4]; - var uint_ = class3.method_2(); - var flag = class2 == class3.Class2260; - var flag2 = @class == class2.Class2260; + Class226 @class = list0[int0]; + Class226 class2 = list0[int0 - 2]; + Class226 class3 = list0[int0 - 4]; + uint uint_ = class3.method_2(); + bool flag = class2 == class3.Class2260; + bool flag2 = @class == class2.Class2260; Class226 class4; if (flag && flag2) { @@ -510,10 +510,10 @@ private void method_10(int int0, List list0) private void method_11(int int0, List list0) { - var @class = list0[int0 - 1]; - var class2 = list0[int0 - 2]; - var uint_ = class2.method_2(); - var bool_ = class2.method_0(); + Class226 @class = list0[int0 - 1]; + Class226 class2 = list0[int0 - 2]; + uint uint_ = class2.method_2(); + bool bool_ = class2.method_0(); Class226 class3; if (class2.Class2261 == @class) { @@ -526,7 +526,7 @@ private void method_11(int int0, List list0) } else { - var class4 = @class.Class2260; + Class226 class4 = @class.Class2260; class2.Class2261 = class4.Class2260; class4.Class2260 = class2; @class.Class2260 = class4.Class2261; @@ -543,7 +543,7 @@ private void method_11(int int0, List list0) } else { - var class226 = @class.Class2261; + Class226 class226 = @class.Class2261; class2.Class2260 = class226.Class2261; class226.Class2261 = class2; @class.Class2261 = class226.Class2260; @@ -562,10 +562,10 @@ private void method_11(int int0, List list0) private int method_12(int int0, List list0) { - var value = list0[int0]; - var @class = list0[int0 - 1]; - var class2 = list0[int0 - 2]; - var uint_ = class2.method_2(); + Class226 value = list0[int0]; + Class226 @class = list0[int0 - 1]; + Class226 class2 = list0[int0 - 2]; + uint uint_ = class2.method_2(); bool flag; if (class2.Class2261 == @class) { @@ -643,10 +643,10 @@ public Struct77 method_14() public Struct77 method_15(T gparam0) { - var stack = new Stack(); - var @interface = (INterface10) _object0; + Stack stack = new Stack(); + INterface10 @interface = (INterface10) _object0; int num; - for (var @class = _class2260; @class != null; @class = ((num < 0) ? @class.Class2260 : @class.Class2261)) + for (Class226 @class = _class2260; @class != null; @class = ((num < 0) ? @class.Class2260 : @class.Class2261)) { num = @interface.imethod_0(gparam0, @class); if (num <= 0) diff --git a/GHNamespace7/Track.cs b/GHNamespace7/Track.cs index 3ef5e23..fcbca4c 100644 --- a/GHNamespace7/Track.cs +++ b/GHNamespace7/Track.cs @@ -31,14 +31,14 @@ private bool method_0(ref int int0, ref int int1, ref int int2, TKey offset) while (int0 <= int1) { int2 = (int0 + int1) / 2; - var tKey = Keys[int2]; + TKey tKey = Keys[int2]; if (tKey.CompareTo(offset) < 0) { int0 = int2 + 1; } else { - var tKey2 = Keys[int2]; + TKey tKey2 = Keys[int2]; if (tKey2.CompareTo(offset) <= 0) { return true; @@ -53,9 +53,9 @@ private bool method_0(ref int int0, ref int int1, ref int int2, TKey offset) //Not the problem public int method_1(TKey offset) { - var num = 0; - var num2 = Count - 1; - var num3 = 0; + int num = 0; + int num2 = Count - 1; + int num3 = 0; if (method_0(ref num, ref num2, ref num3, offset)) { } @@ -73,9 +73,9 @@ public int method_1(TKey offset) public int method_2(TKey offset) { - var num = 0; - var num2 = Count - 1; - var num3 = 0; + int num = 0; + int num2 = Count - 1; + int num3 = 0; num3 = (method_0(ref num, ref num2, ref num3, offset) ? num3 : num); if (num3 < Count) { @@ -86,14 +86,14 @@ public int method_2(TKey offset) public int method_3(TKey gparam0, TKey gparam1) { - var num = 0; - var num2 = Count - 1; - var num3 = 0; - var num4 = method_0(ref num, ref num2, ref num3, gparam0) ? num3 : num; + int num = 0; + int num2 = Count - 1; + int num3 = 0; + int num4 = method_0(ref num, ref num2, ref num3, gparam0) ? num3 : num; num = num4; num2 = Count - 1; num3 = 0; - var num5 = method_0(ref num, ref num2, ref num3, gparam1) ? (num3 + 1) : num; + int num5 = method_0(ref num, ref num2, ref num3, gparam1) ? (num3 + 1) : num; return num5 - num4; } diff --git a/GHNamespace7/ViewLog.cs b/GHNamespace7/ViewLog.cs index f29deff..4b56efd 100644 --- a/GHNamespace7/ViewLog.cs +++ b/GHNamespace7/ViewLog.cs @@ -18,7 +18,7 @@ public class ViewLog : Form public ViewLog() { InitializeComponent(); - foreach (var current in Class216.SortedDictionary0.Keys) + foreach (string current in Class216.SortedDictionary0.Keys) { _logListBox.Items.Add(current); } diff --git a/GHNamespace7/zzCollection214.cs b/GHNamespace7/zzCollection214.cs index f64e63c..f0f72f7 100644 --- a/GHNamespace7/zzCollection214.cs +++ b/GHNamespace7/zzCollection214.cs @@ -26,8 +26,8 @@ public TValue this[TKey key] { if (_dictionary0.ContainsKey(key)) { - var arg300 = _list1; - var arg301 = _list0.IndexOf(key); + List arg300 = _list1; + int arg301 = _list0.IndexOf(key); _dictionary0[key] = value; arg300[arg301] = value; return; @@ -50,8 +50,8 @@ public TValue this[int int0] { if (_dictionary0.Count > int0) { - var arg300 = _dictionary0; - var arg301 = _list0[int0]; + Dictionary arg300 = _dictionary0; + TKey arg301 = _list0[int0]; _list1[int0] = value; arg300[arg301] = value; } @@ -65,8 +65,8 @@ public TKey this[TValue gparam0] { if (_dictionary0.ContainsKey(value)) { - var arg300 = _list1; - var arg301 = _list0.IndexOf(value); + List arg300 = _list1; + int arg301 = _list0.IndexOf(value); _dictionary0[value] = gparam0; arg300[arg301] = gparam0; return; @@ -138,7 +138,7 @@ public void Add(KeyValuePair item) public void Add(ICollection> icollection0) { - foreach (var current in icollection0) + foreach (KeyValuePair current in icollection0) { Add(current); } @@ -155,7 +155,7 @@ public bool Contains(KeyValuePair item) { if (_dictionary0.ContainsKey(item.Key)) { - var tValue = _dictionary0[item.Key]; + TValue tValue = _dictionary0[item.Key]; return tValue.Equals(item.Value); } return false; @@ -163,7 +163,7 @@ public bool Contains(KeyValuePair item) public void CopyTo(KeyValuePair[] array, int index) { - for (var i = 0; i < _dictionary0.Count; i++) + for (int i = 0; i < _dictionary0.Count; i++) { array[index + i] = new KeyValuePair(_list0[i], _list1[i]); } diff --git a/GHNamespace7/zzDrawingClass230.cs b/GHNamespace7/zzDrawingClass230.cs index bc5e183..07d818d 100644 --- a/GHNamespace7/zzDrawingClass230.cs +++ b/GHNamespace7/zzDrawingClass230.cs @@ -56,7 +56,7 @@ public void method_2(int int1) Point point4; if (_listBox0.Sorted) { - var r = _listBox0.ClientRectangle; + Rectangle r = _listBox0.ClientRectangle; r = _listBox0.RectangleToScreen(r); point = new Point(r.Left, r.Top); point2 = new Point(r.Left, r.Bottom); @@ -90,7 +90,7 @@ public void method_2(int int1) point3 = new Point(r.Left, r.Top + 1); point4 = new Point(r.Right, r.Top + 1); } - var dC = Gdi.GetDC(IntPtr.Zero); + IntPtr dC = Gdi.GetDC(IntPtr.Zero); Gdi.SetROP2(dC, 6); Gdi.MoveToEx(dC, point.X, point.Y, IntPtr.Zero); Gdi.LineTo(dC, point2.X, point2.Y); diff --git a/GHNamespace8/BPMInterpreter.cs b/GHNamespace8/BPMInterpreter.cs index ad9bcc0..1679720 100644 --- a/GHNamespace8/BPMInterpreter.cs +++ b/GHNamespace8/BPMInterpreter.cs @@ -15,17 +15,17 @@ public BpmInterpreter() public BpmInterpreter(string[] string0) { - for (var i = 0; i < string0.Length; i++) + for (int i = 0; i < string0.Length; i++) { - var text = string0[i]; - var array = text.Split(new[] + string text = string0[i]; + string[] array = text.Split(new[] { ' ', '\t', '=' }, StringSplitOptions.RemoveEmptyEntries); - var num = ChartParser.GetNoteFromResolution(array[0]); - var num2 = Convert.ToInt32(array[2]); + int num = ChartParser.GetNoteFromResolution(array[0]); + int num2 = Convert.ToInt32(array[2]); string a; if ((a = array[1]) != null) { diff --git a/GHNamespace8/ChartParser.cs b/GHNamespace8/ChartParser.cs index cde5e73..beb83bf 100644 --- a/GHNamespace8/ChartParser.cs +++ b/GHNamespace8/ChartParser.cs @@ -40,8 +40,8 @@ public ChartParser(Gh3Song gh3Song1) : this() public ChartParser(string fileName, bool nothing) { - var list = new List(); - var stringReader = new StringReader(fileName); + List list = new List(); + StringReader stringReader = new StringReader(fileName); string bracketItems = null; string bracketItemsWithBrackets; while ((bracketItemsWithBrackets = stringReader.ReadLine()) != null) @@ -66,20 +66,20 @@ public ChartParser(string fileName, bool nothing) if (a == "Song") { Gh3SongInfo.Editable = true; - using (var enumerator = list.GetEnumerator()) + using (List.Enumerator enumerator = list.GetEnumerator()) { while (enumerator.MoveNext()) { - var current = enumerator.Current; - var array = current.Split(new[] + string current = enumerator.Current; + string[] array = current.Split(new[] { '\t', '=' }, StringSplitOptions.RemoveEmptyEntries); if (array.Length > 1) { - var text3 = array[0].Trim().ToLower(); - var text4 = array[1].Trim().Replace("\"", ""); + string text3 = array[0].Trim().ToLower(); + string text4 = array[1].Trim().Replace("\"", ""); string key; switch (key = text3) { @@ -191,8 +191,8 @@ public ChartParser(string fileName, bool nothing) public ChartParser(string fileName) { - var list = new List(); - var streamReader = File.OpenText(fileName); + List list = new List(); + StreamReader streamReader = File.OpenText(fileName); string bracketItems = null; string bracketItemsWithBrackets; while ((bracketItemsWithBrackets = streamReader.ReadLine()) != null) @@ -217,20 +217,20 @@ public ChartParser(string fileName) if (a == "Song") { Gh3SongInfo.Editable = true; - using (var enumerator = list.GetEnumerator()) + using (List.Enumerator enumerator = list.GetEnumerator()) { while (enumerator.MoveNext()) { - var current = enumerator.Current; - var array = current.Split(new[] + string current = enumerator.Current; + string[] array = current.Split(new[] { '\t', '=' }, StringSplitOptions.RemoveEmptyEntries); if (array.Length > 1) { - var text3 = array[0].Trim().ToLower(); - var text4 = array[1].Trim().Replace("\"", ""); + string text3 = array[0].Trim().ToLower(); + string text4 = array[1].Trim().Replace("\"", ""); string key; switch (key = text3) { @@ -355,9 +355,9 @@ public void RemoveEmptyParts() "Hard", "Expert" }; - for (var i = 0; i < array.Length; i++) + for (int i = 0; i < array.Length; i++) { - var str = array[i]; + string str = array[i]; if (DifficultyWithNotes.ContainsKey(str + "Single")) { DifficultyWithNotes.Add(str + "SingleGuitar", DifficultyWithNotes[str + "Single"]); @@ -377,8 +377,8 @@ public void RemoveEmptyParts() DifficultyWithNotes.Remove(str + "DoubleBass"); } } - var list = new List(DifficultyWithNotes.Keys); - foreach (var current in list) + List list = new List(DifficultyWithNotes.Keys); + foreach (string current in list) { if (DifficultyWithNotes[current].NoteList.Count == 0) { @@ -398,7 +398,7 @@ public void RemoveEmptyParts() public void ChartCreator(string fileLocation, Gh3Song song) { Gh3SongInfo = song; - var streamWriter = new StreamWriter(fileLocation); + StreamWriter streamWriter = new StreamWriter(fileLocation); streamWriter.WriteLine("[Song]"); streamWriter.WriteLine("{"); streamWriter.WriteLine("\tName = \"" + Gh3SongInfo.Title + "\""); @@ -430,8 +430,8 @@ public void ChartCreator(string fileLocation, Gh3Song song) streamWriter.WriteLine("}"); streamWriter.WriteLine("[SyncTrack]"); streamWriter.WriteLine("{"); - var list = new List(BpmInterpreter.TsList.Keys); - foreach (var current in BpmInterpreter.BpmList.Keys) + List list = new List(BpmInterpreter.TsList.Keys); + foreach (int current in BpmInterpreter.BpmList.Keys) { if (!list.Contains(current)) { @@ -439,7 +439,7 @@ public void ChartCreator(string fileLocation, Gh3Song song) } } list.Sort(); - foreach (var current2 in list) + foreach (int current2 in list) { if (BpmInterpreter.BpmList.ContainsKey(current2)) { @@ -454,7 +454,7 @@ public void ChartCreator(string fileLocation, Gh3Song song) streamWriter.WriteLine("[Events]"); streamWriter.WriteLine("{"); list = new List(SectionInterpreter.SectionList.Keys); - foreach (var current3 in SectionInterpreter.OtherList.Keys) + foreach (int current3 in SectionInterpreter.OtherList.Keys) { if (!list.Contains(current3)) { @@ -462,7 +462,7 @@ public void ChartCreator(string fileLocation, Gh3Song song) } } list.Sort(); - foreach (var current4 in list) + foreach (int current4 in list) { if (SectionInterpreter.SectionList.ContainsKey(current4)) { @@ -471,8 +471,8 @@ public void ChartCreator(string fileLocation, Gh3Song song) } if (SectionInterpreter.OtherList.ContainsKey(current4)) { - var list2 = SectionInterpreter.OtherList[current4]; - foreach (var current5 in list2) + List list2 = SectionInterpreter.OtherList[current4]; + foreach (string current5 in list2) { streamWriter.WriteLine(string.Concat("\t", current4, " = E \"", current5, "\"")); } @@ -487,76 +487,76 @@ public void ChartCreator(string fileLocation, Gh3Song song) "Hard", "Expert" }; - for (var i = 0; i < difficulties.Length; i++) + for (int i = 0; i < difficulties.Length; i++) { - var str = difficulties[i]; + string str = difficulties[i]; string[] array2 = { "Single", "Double" }; - for (var j = 0; j < array2.Length; j++) + for (int j = 0; j < array2.Length; j++) { - var str2 = array2[j]; + string str2 = array2[j]; string[] array3 = { "Guitar", "Rhythm" }; - for (var k = 0; k < array3.Length; k++) + for (int k = 0; k < array3.Length; k++) { - var str3 = array3[k]; + string str3 = array3[k]; if (DifficultyWithNotes.ContainsKey(str + str2 + str3)) { - var text = str + str2 + str3; - var printText = ConvertDbcName("[" + text + "]"); - var @class = DifficultyWithNotes[text]; + string text = str + str2 + str3; + string printText = ConvertDbcName("[" + text + "]"); + NoteEventInterpreter @class = DifficultyWithNotes[text]; streamWriter.WriteLine(printText); streamWriter.WriteLine("{"); list = new List(@class.NoteList.Keys); - foreach (var current6 in @class.Class2282.Keys) + foreach (int current6 in @class.Class2282.Keys) { if (!list.Contains(current6)) { list.Add(current6); } } - foreach (var current7 in @class.Class2283.Keys) + foreach (int current7 in @class.Class2283.Keys) { if (!list.Contains(current7)) { list.Add(current7); } } - foreach (var current8 in @class.Class2281.Keys) + foreach (int current8 in @class.Class2281.Keys) { if (!list.Contains(current8)) { list.Add(current8); } } - foreach (var current9 in @class.Class2284.Keys) + foreach (int current9 in @class.Class2284.Keys) { if (!list.Contains(current9)) { list.Add(current9); } } - foreach (var current10 in @class.Class2285.Keys) + foreach (int current10 in @class.Class2285.Keys) { if (!list.Contains(current10)) { list.Add(current10); } } - foreach (var current11 in @class.Class2286.Keys) + foreach (int current11 in @class.Class2286.Keys) { if (!list.Contains(current11)) { list.Add(current11); } } - foreach (var current12 in @class.EventList.Keys) + foreach (int current12 in @class.EventList.Keys) { if (!list.Contains(current12)) { @@ -564,20 +564,20 @@ public void ChartCreator(string fileLocation, Gh3Song song) } } list.Sort(); - foreach (var current13 in list) + foreach (int current13 in list) { if (@class.EventList.ContainsKey(current13)) { - var list2 = @class.EventList[current13]; - foreach (var current14 in list2) + List list2 = @class.EventList[current13]; + foreach (string current14 in list2) { streamWriter.WriteLine(string.Concat("\t", current13, " = E ", current14)); } } if (@class.NoteList.ContainsKey(current13)) { - var class2 = @class.NoteList[current13]; - for (var l = 0; l < class2.NoteValues.Length; l++) + NotesAtOffset class2 = @class.NoteList[current13]; + for (int l = 0; l < class2.NoteValues.Length; l++) { if (class2.NoteValues[l]) { @@ -626,20 +626,20 @@ public void ChartCreator(string fileLocation, Gh3Song song) "Drums", "Keyboard" }; - for (var j = 0; j < array2.Length; j++) + for (int j = 0; j < array2.Length; j++) { - var str4 = array2[j]; + string str4 = array2[j]; if (InstrumentList.ContainsKey(str + str4)) { - var text2 = str + str4; - var class3 = InstrumentList[text2]; + string text2 = str + str4; + InstrumentType class3 = InstrumentList[text2]; streamWriter.WriteLine("[" + text2 + "]"); streamWriter.WriteLine("{"); list = new List(class3.Keys); list.Sort(); - foreach (var current15 in list) + foreach (int current15 in list) { - foreach (var current16 in class3[current15]) + foreach (string current16 in class3[current15]) { streamWriter.WriteLine(string.Concat("\t", current15, " = E ", current16)); } @@ -667,7 +667,7 @@ private String ConvertDbcName(String name) "[EasySingleBass]", "[MediumSingleBass]", "[HardSingleBass]", "[ExpertSingleBass]", "[EasyDoubleBass]", "[MediumDoubleBass]", "[HardDoubleBass]", "[ExpertDoubleBass]" }; - for (var i = 0; i < dbcTypes.Length; i++) + for (int i = 0; i < dbcTypes.Length; i++) { if (name.Equals(dbcTypes[i])) { @@ -680,7 +680,7 @@ private String ConvertDbcName(String name) public void DbcCreator(string fileLocation, Gh3Song gH3Song) { Gh3SongInfo = gH3Song; - var streamWriter = new StreamWriter(fileLocation); + StreamWriter streamWriter = new StreamWriter(fileLocation); streamWriter.WriteLine("[Song]"); streamWriter.WriteLine("{"); streamWriter.WriteLine("\tName = \"" + Gh3SongInfo.Title + "\""); @@ -712,8 +712,8 @@ public void DbcCreator(string fileLocation, Gh3Song gH3Song) streamWriter.WriteLine("}"); streamWriter.WriteLine("[SyncTrack]"); streamWriter.WriteLine("{"); - var list = new List(BpmInterpreter.TsList.Keys); - foreach (var current in BpmInterpreter.BpmList.Keys) + List list = new List(BpmInterpreter.TsList.Keys); + foreach (int current in BpmInterpreter.BpmList.Keys) { if (!list.Contains(current)) { @@ -721,7 +721,7 @@ public void DbcCreator(string fileLocation, Gh3Song gH3Song) } } list.Sort(); - foreach (var current2 in list) + foreach (int current2 in list) { if (BpmInterpreter.BpmList.ContainsKey(current2)) { @@ -736,7 +736,7 @@ public void DbcCreator(string fileLocation, Gh3Song gH3Song) streamWriter.WriteLine("[Events]"); streamWriter.WriteLine("{"); list = new List(SectionInterpreter.SectionList.Keys); - foreach (var current3 in SectionInterpreter.OtherList.Keys) + foreach (int current3 in SectionInterpreter.OtherList.Keys) { if (!list.Contains(current3)) { @@ -744,7 +744,7 @@ public void DbcCreator(string fileLocation, Gh3Song gH3Song) } } list.Sort(); - foreach (var current4 in list) + foreach (int current4 in list) { if (SectionInterpreter.SectionList.ContainsKey(current4)) { @@ -753,8 +753,8 @@ public void DbcCreator(string fileLocation, Gh3Song gH3Song) } if (SectionInterpreter.OtherList.ContainsKey(current4)) { - var list2 = SectionInterpreter.OtherList[current4]; - foreach (var current5 in list2) + List list2 = SectionInterpreter.OtherList[current4]; + foreach (string current5 in list2) { streamWriter.WriteLine(string.Concat("\t", current4, " = E \"", current5, "\"")); } @@ -769,75 +769,75 @@ public void DbcCreator(string fileLocation, Gh3Song gH3Song) "Hard", "Expert" }; - for (var i = 0; i < array.Length; i++) + for (int i = 0; i < array.Length; i++) { - var str = array[i]; + string str = array[i]; string[] array2 = { "Single", "Double" }; - for (var j = 0; j < array2.Length; j++) + for (int j = 0; j < array2.Length; j++) { - var str2 = array2[j]; + string str2 = array2[j]; string[] array3 = { "Guitar", "Rhythm" }; - for (var k = 0; k < array3.Length; k++) + for (int k = 0; k < array3.Length; k++) { - var str3 = array3[k]; + string str3 = array3[k]; if (DifficultyWithNotes.ContainsKey(str + str2 + str3)) { - var text = str + str2 + str3; - var @class = DifficultyWithNotes[text]; + string text = str + str2 + str3; + NoteEventInterpreter @class = DifficultyWithNotes[text]; streamWriter.WriteLine("[" + text + "]"); streamWriter.WriteLine("{"); list = new List(@class.NoteList.Keys); - foreach (var current6 in @class.Class2282.Keys) + foreach (int current6 in @class.Class2282.Keys) { if (!list.Contains(current6)) { list.Add(current6); } } - foreach (var current7 in @class.Class2283.Keys) + foreach (int current7 in @class.Class2283.Keys) { if (!list.Contains(current7)) { list.Add(current7); } } - foreach (var current8 in @class.Class2281.Keys) + foreach (int current8 in @class.Class2281.Keys) { if (!list.Contains(current8)) { list.Add(current8); } } - foreach (var current9 in @class.Class2284.Keys) + foreach (int current9 in @class.Class2284.Keys) { if (!list.Contains(current9)) { list.Add(current9); } } - foreach (var current10 in @class.Class2285.Keys) + foreach (int current10 in @class.Class2285.Keys) { if (!list.Contains(current10)) { list.Add(current10); } } - foreach (var current11 in @class.Class2286.Keys) + foreach (int current11 in @class.Class2286.Keys) { if (!list.Contains(current11)) { list.Add(current11); } } - foreach (var current12 in @class.EventList.Keys) + foreach (int current12 in @class.EventList.Keys) { if (!list.Contains(current12)) { @@ -845,20 +845,20 @@ public void DbcCreator(string fileLocation, Gh3Song gH3Song) } } list.Sort(); - foreach (var current13 in list) + foreach (int current13 in list) { if (@class.EventList.ContainsKey(current13)) { - var list2 = @class.EventList[current13]; - foreach (var current14 in list2) + List list2 = @class.EventList[current13]; + foreach (string current14 in list2) { streamWriter.WriteLine(string.Concat("\t", current13, " = E ", current14)); } } if (@class.NoteList.ContainsKey(current13)) { - var class2 = @class.NoteList[current13]; - for (var l = 0; l < class2.NoteValues.Length; l++) + NotesAtOffset class2 = @class.NoteList[current13]; + for (int l = 0; l < class2.NoteValues.Length; l++) { if (class2.NoteValues[l]) { @@ -907,20 +907,20 @@ public void DbcCreator(string fileLocation, Gh3Song gH3Song) "Drums", "Keyboard" }; - for (var j = 0; j < array2.Length; j++) + for (int j = 0; j < array2.Length; j++) { - var str4 = array2[j]; + string str4 = array2[j]; if (InstrumentList.ContainsKey(str + str4)) { - var text2 = str + str4; - var class3 = InstrumentList[text2]; + string text2 = str + str4; + InstrumentType class3 = InstrumentList[text2]; streamWriter.WriteLine("[" + text2 + "]"); streamWriter.WriteLine("{"); list = new List(class3.Keys); list.Sort(); - foreach (var current15 in list) + foreach (int current15 in list) { - foreach (var current16 in class3[current15]) + foreach (string current16 in class3[current15]) { streamWriter.WriteLine(string.Concat("\t", current15, " = E ", current16)); } @@ -934,8 +934,8 @@ public void DbcCreator(string fileLocation, Gh3Song gH3Song) private int CalculateOffset(int offsetInMs) { - var bpmIndex = BpmInterpreter.BpmList.method_1(offsetInMs); - var test = Convert.ToInt32(125000m * (_bpmMsTracker[bpmIndex] + + int bpmIndex = BpmInterpreter.BpmList.method_1(offsetInMs); + int test = Convert.ToInt32(125000m * (_bpmMsTracker[bpmIndex] + (offsetInMs - (decimal) BpmInterpreter.BpmList.Keys[bpmIndex]) / BpmInterpreter.BpmList.Values[bpmIndex])); return test; @@ -943,17 +943,17 @@ private int CalculateOffset(int offsetInMs) public QbcParser ConvertToQbc() { - var @class = new QbcParser(Gh3SongInfo); + QbcParser @class = new QbcParser(Gh3SongInfo); Track track = null; Track class3 = null; - var largestOffset = 0; + int largestOffset = 0; //Checks if there are any difficulties if (DifficultyWithNotes.Count == 0) { throw new Exception("Chart file is empty and cannot be parsed to QB."); } //Finds the largest offset - foreach (var notes in DifficultyWithNotes.Values) + foreach (NoteEventInterpreter notes in DifficultyWithNotes.Values) { largestOffset = Math.Max(largestOffset, notes.NoteList.Keys[notes.NoteList.Count - 1] + @@ -962,10 +962,12 @@ public QbcParser ConvertToQbc() largestOffset = ((SectionInterpreter.OtherList.Count == 0) ? largestOffset : Math.Max(largestOffset, SectionInterpreter.OtherList.Keys[SectionInterpreter.OtherList.Count - 1])); - _bpmMsTracker = new Track(); - _bpmMsTracker.Add(0, 0m); + _bpmMsTracker = new Track + { + { 0, 0m } + }; //Adds BPMS to local list - for (var i = 1; i < BpmInterpreter.BpmList.Count; i++) + for (int i = 1; i < BpmInterpreter.BpmList.Count; i++) { _bpmMsTracker.Add(i, _bpmMsTracker[i - 1] + (BpmInterpreter.BpmList.Keys[i] - BpmInterpreter.BpmList.Keys[i - 1]) / @@ -976,17 +978,17 @@ public QbcParser ConvertToQbc() "Single", "Double" }; - for (var j = 0; j < array.Length; j++) + for (int j = 0; j < array.Length; j++) { - var text = array[j]; + string text = array[j]; string[] array2 = { "Guitar", "Rhythm" }; - for (var k = 0; k < array2.Length; k++) + for (int k = 0; k < array2.Length; k++) { - var text2 = array2[k]; + string text2 = array2[k]; string[] array3 = { "Easy", @@ -994,14 +996,14 @@ public QbcParser ConvertToQbc() "Hard", "Expert" }; - for (var l = 0; l < array3.Length; l++) + for (int l = 0; l < array3.Length; l++) { - var text3 = array3[l]; - var difficulty = (text2.ToLower() + ((text == "Double") ? "coop" : "") + "_" + text3.ToLower()) + string text3 = array3[l]; + string difficulty = (text2.ToLower() + ((text == "Double") ? "coop" : "") + "_" + text3.ToLower()) .Replace("guitar_", ""); if (DifficultyWithNotes.ContainsKey(text3 + text + text2)) { - var noteEventInterpreter = DifficultyWithNotes[text3 + text + text2]; + NoteEventInterpreter noteEventInterpreter = DifficultyWithNotes[text3 + text + text2]; if (noteEventInterpreter.NoteList.Count != 0) { @class.NoteList.Add(difficulty, new Track()); @@ -1033,7 +1035,7 @@ public QbcParser ConvertToQbc() } method_6(@class.Class2282, track); method_6(@class.Class2283, class3); - foreach (var current2 in BpmInterpreter.TsList.Keys) + foreach (int current2 in BpmInterpreter.TsList.Keys) { @class.TsList.Add(CalculateOffset(current2), new[] { @@ -1041,14 +1043,14 @@ public QbcParser ConvertToQbc() 4 }); } - var num2 = (int) Math.Ceiling(largestOffset / (double) Constant480); - for (var m = 0; m <= num2; m++) + int num2 = (int) Math.Ceiling(largestOffset / (double) Constant480); + for (int m = 0; m <= num2; m++) { @class.FretbarList.method_1(CalculateOffset(m * Constant480)); } @class.FretbarList[0] = @class.FretbarList[1] - 4; @class.Int0 = 1; - foreach (var current3 in SectionInterpreter.SectionList.Keys) + foreach (int current3 in SectionInterpreter.SectionList.Keys) { @class.Class2281.Add(CalculateOffset(current3), SectionInterpreter.SectionList[current3]); } @@ -1060,15 +1062,15 @@ public QbcParser ConvertToQbc() private void method_4(Track class2281, Track class2282) { - foreach (var current in class2282.Keys) + foreach (int current in class2282.Keys) { - var num = CalculateOffset(current); - var int_ = (class2282[current].SustainLength == 0) + int num = CalculateOffset(current); + int int_ = (class2282[current].SustainLength == 0) ? 1 : (CalculateOffset(current + class2282[current].SustainLength) - num); if (class2281.ContainsKey(num)) { - for (var i = 0; i < 32; i++) + for (int i = 0; i < 32; i++) { if (class2282[current].NoteValues[i]) { @@ -1085,17 +1087,17 @@ private void method_4(Track class2281, Track difficulty, Track sp, Track notes) { - foreach (var current in sp.Keys) + foreach (int current in sp.Keys) { - var num = CalculateOffset(current); - var num2 = 0; + int num = CalculateOffset(current); + int num2 = 0; if (sp[current] == 0) { num2 = 1; } else { - var num4 = 0; + int num4 = 0; if ((sp.Keys[sp.method_1(current + sp[current])] > current)) { num4 = notes.Keys[notes.method_1(sp.Keys[sp.method_1(current + sp[current])] - 1)]; @@ -1104,7 +1106,7 @@ private void method_5(Track difficulty, Track sp, Track current) ? notes.Keys[notes.method_1(sp.Keys[sp.method_1(current + sp[current])] - 1)] : (current + sp[current])); num2 = (num3 - num); } @@ -1123,10 +1125,10 @@ private void method_6(Track class2281, Track class2282) { return; } - foreach (var current in class2282.Keys) + foreach (int current in class2282.Keys) { - var num = CalculateOffset(current); - var value = (class2282[current] == 0) ? 1 : (CalculateOffset(current + class2282[current]) - num); + int num = CalculateOffset(current); + int value = (class2282[current] == 0) ? 1 : (CalculateOffset(current + class2282[current]) - num); class2281.Add(num, value); } } diff --git a/GHNamespace8/Class248.cs b/GHNamespace8/Class248.cs index d8ba0bf..007e9e0 100644 --- a/GHNamespace8/Class248.cs +++ b/GHNamespace8/Class248.cs @@ -42,10 +42,10 @@ public Class248(ZzQbSongObject class3231, string string4, string string5) String1 = _class3230.FileName; _string3 = string4; _string2 = string5; - var array = _class3230.String1; - for (var i = 0; i < array.Length; i++) + string[] array = _class3230.String1; + for (int i = 0; i < array.Length; i++) { - var text = array[i]; + string text = array[i]; if (text.Equals(_class3230.FileName + "_rhythm")) { Bool0 = true; @@ -77,8 +77,8 @@ public override void CreateCustomMenu() } else { - var list = new List(); - var list2 = new List(); + List list = new List(); + List list2 = new List(); GenericAudioStream stream3; if (_string0.Length == 1) { @@ -110,7 +110,7 @@ public override void CreateCustomMenu() } else { - var list3 = new List(); + List list3 = new List(); string[] array = { "_song", @@ -120,7 +120,7 @@ public override void CreateCustomMenu() "_coop_guitar", "_coop_rhythm" }; - for (var i = 0; i < _string0.Length; i++) + for (int i = 0; i < _string0.Length; i++) { if (_string0[i] != null && !_string0[i].Equals("") && File.Exists(_string0[i])) { @@ -144,20 +144,20 @@ public override void CreateCustomMenu() } } stream3 = new Stream2(list3.ToArray()); - var num = 0f; - var stream5 = new Stream3(stream3, _timeSpan0, _timeSpan1); - var array2 = stream5.vmethod_5(100); + float num = 0f; + Stream3 stream5 = new Stream3(stream3, _timeSpan0, _timeSpan1); + float[][] array2 = stream5.vmethod_5(100); while (array2 != null && array2.Length > 0) { - var array3 = array2; - for (var j = 0; j < array3.Length; j++) + float[][] array3 = array2; + for (int j = 0; j < array3.Length; j++) { - var array4 = array3[j]; - var array5 = array4; - for (var k = 0; k < array5.Length; k++) + float[] array4 = array3[j]; + float[] array5 = array4; + for (int k = 0; k < array5.Length; k++) { - var value = array5[k]; - var num2 = Math.Abs(value); + float value = array5[k]; + float num2 = Math.Abs(value); if (num2 > num) { num = num2; @@ -171,8 +171,8 @@ public override void CreateCustomMenu() new Class174(3, 1f / num) }); } - var waveFormat = stream3.vmethod_0(); - var t = new TimeSpan(0, 0, 1); + SharpAudio.ASC.WaveFormat waveFormat = stream3.vmethod_0(); + TimeSpan t = new TimeSpan(0, 0, 1); Stream stream6 = new Stream27(); Stream16.smethod_0(new Stream2(new Stream3(stream3, _timeSpan0, _timeSpan1), new INterface5[] { diff --git a/GHNamespace8/Class249.cs b/GHNamespace8/Class249.cs index df094c0..4f5aef3 100644 --- a/GHNamespace8/Class249.cs +++ b/GHNamespace8/Class249.cs @@ -20,13 +20,13 @@ public override void CreateCustomMenu() { Console.WriteLine("-=- " + ToString() + " -=-"); ZzGenericNode1 @class = _class3180.ZzGetNode1("scripts\\guitar\\menu\\menu_cheats.qb"); - foreach (var current in @class.zzFindNode(new ArrayPointerRootNode("guitar_hero_cheats")) + foreach (StructureHeaderNode current in @class.zzFindNode(new ArrayPointerRootNode("guitar_hero_cheats")) .method_7() .method_8()) { - var flag = current.zzFindNode(new StructItemQbKey("name", "unlockall")) != null; - var flag2 = current.zzFindNode(new StructItemQbKey("name", "unlockalleverything")) != null; - var class2 = current.zzFindNode(new ArrayPointerNode("unlock_pattern")).GetFirstChild() as IntegerArrayNode; + bool flag = current.zzFindNode(new StructItemQbKey("name", "unlockall")) != null; + bool flag2 = current.zzFindNode(new StructItemQbKey("name", "unlockalleverything")) != null; + IntegerArrayNode class2 = current.zzFindNode(new ArrayPointerNode("unlock_pattern")).GetFirstChild() as IntegerArrayNode; if (class2.Nodes.Count == 1) { Console.WriteLine("QB Database is already edited."); diff --git a/GHNamespace8/Class250.cs b/GHNamespace8/Class250.cs index b9428c7..eb421a2 100644 --- a/GHNamespace8/Class250.cs +++ b/GHNamespace8/Class250.cs @@ -8,7 +8,7 @@ public class Class250 : QbEditor { public QbcParser Class3620; - private ZzPakNode2 _class3180; + private readonly ZzPakNode2 _class3180; private readonly string _string0; @@ -24,7 +24,7 @@ public Class250(string string2, QbcParser class3621, ZzPakNode2 class3181, strin public override void CreateCustomMenu() { - using (var @class = new ZzPakNode2()) + using (ZzPakNode2 @class = new ZzPakNode2()) { @class.zzCreateQbFileFrom("songs\\" + _string0 + ".mid.qb", Class3620.method_4(_string0)); @class.method_16(_string1 + "songs\\" + _string0 + "_song.pak.xen"); diff --git a/GHNamespace8/Disclaimer.cs b/GHNamespace8/Disclaimer.cs index 838f802..7bc6737 100644 --- a/GHNamespace8/Disclaimer.cs +++ b/GHNamespace8/Disclaimer.cs @@ -35,7 +35,7 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { icontainer_0 = new Container(); - var componentResourceManager = new ComponentResourceManager(typeof(Disclaimer)); + ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(Disclaimer)); _richTextBox1 = new RichTextBox(); _acceptBtn = new Button(); _tableLayoutPanel1 = new TableLayoutPanel(); diff --git a/GHNamespace8/IniParser.cs b/GHNamespace8/IniParser.cs index 825ebde..0df8057 100644 --- a/GHNamespace8/IniParser.cs +++ b/GHNamespace8/IniParser.cs @@ -13,8 +13,8 @@ public static Gh3Song ParseIni(string file, Gh3Song gH3Song) { if (File.Exists(file + "\\song.ini")) { - var iniContents = File.ReadAllLines(file + "\\song.ini"); - foreach (var line in iniContents) + string[] iniContents = File.ReadAllLines(file + "\\song.ini"); + foreach (string line in iniContents) { if (line.StartsWith("name")) { diff --git a/GHNamespace8/InstrumentType.cs b/GHNamespace8/InstrumentType.cs index 7787ca4..71c635f 100644 --- a/GHNamespace8/InstrumentType.cs +++ b/GHNamespace8/InstrumentType.cs @@ -14,10 +14,10 @@ public InstrumentType(string[] string0) : this() { if (string0.Length != 0) { - for (var i = 0; i < string0.Length; i++) + for (int i = 0; i < string0.Length; i++) { - var text = string0[i]; - var array = text.Split(new[] + string text = string0[i]; + string[] array = text.Split(new[] { ' ', '\t', diff --git a/GHNamespace8/LoadGameSettings.cs b/GHNamespace8/LoadGameSettings.cs index 124f346..2ee2e2d 100644 --- a/GHNamespace8/LoadGameSettings.cs +++ b/GHNamespace8/LoadGameSettings.cs @@ -97,8 +97,8 @@ private void method_0() { return; } - var itemRectangle = _listQb.GetItemRectangle(_int0); - var text = (string) _listQb.Items[_int0]; + Rectangle itemRectangle = _listQb.GetItemRectangle(_int0); + string text = (string) _listQb.Items[_int0]; _editBox.Location = new Point(itemRectangle.X + 30, itemRectangle.Y + 10); _editBox.Show(); _editBox.Text = text; @@ -120,7 +120,7 @@ public void method_1(string[] string0) public string[] method_2() { - var array = new string[_listQb.Items.Count]; + string[] array = new string[_listQb.Items.Count]; _listQb.Items.CopyTo(array, 0); return array; } diff --git a/GHNamespace8/MIDIParser.cs b/GHNamespace8/MIDIParser.cs index d66eba8..6c6e6ec 100644 --- a/GHNamespace8/MIDIParser.cs +++ b/GHNamespace8/MIDIParser.cs @@ -68,7 +68,7 @@ public class MidiParser private MidiReader _midiReader; - private readonly List _uselessEvents = new List(); + private readonly List _animationEvents = new List(); public MidiParser(string fileLocation) { @@ -77,7 +77,7 @@ public MidiParser(string fileLocation) public ChartParser LoadMidi() { - var name = ""; + string name = ""; name = name + new FileInfo(_fileLocation).Name + ":\n"; try { @@ -87,7 +87,7 @@ public ChartParser LoadMidi() { throw new IOException(name + "Unknown Error: Could not parse MIDI sequence."); } - foreach (var current in _midiReader.GetMidiLineList()) + foreach (MidiLine current in _midiReader.GetMidiLineList()) { if (current.method_2().Equals("PART GUITAR")) { @@ -107,7 +107,7 @@ public ChartParser LoadMidi() { throw new IOException(name + "PART GUITAR not found. No chart created."); } - var chartParser = new ChartParser(); + ChartParser chartParser = new ChartParser(); _bpmInterpreter = chartParser.BpmInterpreter; _sectionInterpreter = chartParser.SectionInterpreter; chartParser.DifficultyWithNotes.Add("EasySingle", _easySingle); @@ -135,7 +135,7 @@ public ChartParser LoadMidi() object obj = name; name = string.Concat(obj, "NumTracks = ", _midiReader.GetMidiLineList().Count, "\n"); method_1(_midiReader.GetMidiLineList()[0]); - foreach (var midiLine in _midiReader.GetMidiLineList()) + foreach (MidiLine midiLine in _midiReader.GetMidiLineList()) { if (midiLine.method_2().Equals("PART GUITAR")) { @@ -187,12 +187,11 @@ public ChartParser LoadMidi() private void method_1(MidiLine class3530) { _songTitle = class3530.method_2(); - foreach (var current in class3530.method_0()) + foreach (AbstractNoteClass current in class3530.method_0()) { - var num = Convert.ToInt32(current.method_0() * _resolution); - if (current is ZzNote1) + int num = Convert.ToInt32(current.method_0() * _resolution); + if (current is ZzNote1 @class) { - var @class = (ZzNote1) current; if (!_isEvents && @class.method_2() == ZzNote1.Enum37.Const0) { method_4(4, num, "section " + @class.method_1()); @@ -200,41 +199,40 @@ private void method_1(MidiLine class3530) } else if (current is BpmNote1) { - var num2 = ((BpmNote1) current).method_1(); + int num2 = ((BpmNote1)current).method_1(); _bpmInterpreter.BpmList.Add(num, Convert.ToInt32(Math.Floor(60000000.0 / num2 * 1000.0))); } else if (current is ZzNote338) { - _bpmInterpreter.TsList.Add(num, ((ZzNote338) current).method_1()); + _bpmInterpreter.TsList.Add(num, ((ZzNote338)current).method_1()); } } } private void GetNotes(MidiLine midiLine, int difficulty) { - var array = new bool[midiLine.method_0().Count]; - var list = midiLine.method_0(); - for (var i = 0; i < list.Count; i++) + bool[] array = new bool[midiLine.method_0().Count]; + List list = midiLine.method_0(); + for (int i = 0; i < list.Count; i++) { if (!array[i]) { - var num = Convert.ToInt32(list[i].method_0() * _resolution); - if (list[i] is MidiNote) + int num = Convert.ToInt32(list[i].method_0() * _resolution); + if (list[i] is MidiNote midiNote) { - var midiNote = (MidiNote) list[i]; if (midiNote.method_5()) { - var j = -1; - var num2 = i + 1; + int j = -1; + int num2 = i + 1; while (j < 0) { if (num2 == midiLine.method_0().Count) { break; } - if (list[num2] is MidiNote && ((MidiNote) list[num2]).method_4() == midiNote.method_4()) + if (list[num2] is MidiNote && ((MidiNote)list[num2]).method_4() == midiNote.method_4()) { - if (((MidiNote) list[num2]).method_5()) + if (((MidiNote)list[num2]).method_5()) { j = Convert.ToInt32(list[num2].method_0() * _resolution); array[num2] = true; @@ -246,7 +244,7 @@ private void GetNotes(MidiLine midiLine, int difficulty) } num2++; } - var num3 = Convert.ToInt32(j - num); + int num3 = Convert.ToInt32(j - num); if (num3 <= 160) { num3 = 0; @@ -254,11 +252,10 @@ private void GetNotes(MidiLine midiLine, int difficulty) method_3(difficulty, num, midiNote, num3); } } - else if (list[i] is ZzNote1) + else if (list[i] is ZzNote1 class2) { - var class2 = (ZzNote1) list[i]; - var list2 = method_5(difficulty - 4); - var text = class2.method_1(); + List list2 = method_5(difficulty - 4); + string text = class2.method_1(); if (text.StartsWith("[")) { text = text.Substring(1, text.Length - 2); @@ -355,7 +352,7 @@ private void method_3(int instrumentType, int int1, MidiNote midiNote, int int2) noteEvenInterpreter.NoteList[int1].NoteValues[(int) midiNote.method_3()] = true; return; } - var array = new bool[32]; + bool[] array = new bool[32]; array[(int) midiNote.method_3()] = true; noteEvenInterpreter.NoteList.Add(int1, new NotesAtOffset(array, int2)); } @@ -474,54 +471,54 @@ private void method_4(int int0, int int1, string string2) private List method_5(int int0) { - if (_uselessEvents.Count == 0) + if (_animationEvents.Count == 0) { - _uselessEvents.Add("lighting (chase)"); - _uselessEvents.Add("lighting (strobe)"); - _uselessEvents.Add("lighting (color1)"); - _uselessEvents.Add("lighting (color2)"); - _uselessEvents.Add("lighting (sweep)"); - _uselessEvents.Add("crowd_lighters_fast"); - _uselessEvents.Add("crowd_lighters_off"); - _uselessEvents.Add("crowd_lighters_slow"); - _uselessEvents.Add("crowd_half_tempo"); - _uselessEvents.Add("crowd_normal_tempo"); - _uselessEvents.Add("crowd_double_tempo"); - _uselessEvents.Add("band_jump"); - _uselessEvents.Add("sync_head_bang"); - _uselessEvents.Add("sync_wag"); - _uselessEvents.Add("lighting ()"); - _uselessEvents.Add("lighting (flare)"); - _uselessEvents.Add("lighting (blackout)"); - _uselessEvents.Add("music_start"); - _uselessEvents.Add("verse"); - _uselessEvents.Add("chorus"); - _uselessEvents.Add("solo"); - _uselessEvents.Add("end"); - _uselessEvents.Add("idle"); - _uselessEvents.Add("play"); - _uselessEvents.Add("solo_on"); - _uselessEvents.Add("solo_off"); - _uselessEvents.Add("wail_on"); - _uselessEvents.Add("wail_off"); - _uselessEvents.Add("drum_on"); - _uselessEvents.Add("drum_off"); - _uselessEvents.Add("sing_on"); - _uselessEvents.Add("sing_off"); - _uselessEvents.Add("bass_on"); - _uselessEvents.Add("bass_off"); - _uselessEvents.Add("gtr_on"); - _uselessEvents.Add("gtr_off"); - _uselessEvents.Add("ow_face_on"); - _uselessEvents.Add("ow_face_off"); - _uselessEvents.Add("half_tempo"); - _uselessEvents.Add("normal_tempo"); - _uselessEvents.Add("half_time"); - _uselessEvents.Add("double_time"); - _uselessEvents.Add("allbeat"); - _uselessEvents.Add("nobeat"); + _animationEvents.Add("lighting (chase)"); + _animationEvents.Add("lighting (strobe)"); + _animationEvents.Add("lighting (color1)"); + _animationEvents.Add("lighting (color2)"); + _animationEvents.Add("lighting (sweep)"); + _animationEvents.Add("crowd_lighters_fast"); + _animationEvents.Add("crowd_lighters_off"); + _animationEvents.Add("crowd_lighters_slow"); + _animationEvents.Add("crowd_half_tempo"); + _animationEvents.Add("crowd_normal_tempo"); + _animationEvents.Add("crowd_double_tempo"); + _animationEvents.Add("band_jump"); + _animationEvents.Add("sync_head_bang"); + _animationEvents.Add("sync_wag"); + _animationEvents.Add("lighting ()"); + _animationEvents.Add("lighting (flare)"); + _animationEvents.Add("lighting (blackout)"); + _animationEvents.Add("music_start"); + _animationEvents.Add("verse"); + _animationEvents.Add("chorus"); + _animationEvents.Add("solo"); + _animationEvents.Add("end"); + _animationEvents.Add("idle"); + _animationEvents.Add("play"); + _animationEvents.Add("solo_on"); + _animationEvents.Add("solo_off"); + _animationEvents.Add("wail_on"); + _animationEvents.Add("wail_off"); + _animationEvents.Add("drum_on"); + _animationEvents.Add("drum_off"); + _animationEvents.Add("sing_on"); + _animationEvents.Add("sing_off"); + _animationEvents.Add("bass_on"); + _animationEvents.Add("bass_off"); + _animationEvents.Add("gtr_on"); + _animationEvents.Add("gtr_off"); + _animationEvents.Add("ow_face_on"); + _animationEvents.Add("ow_face_off"); + _animationEvents.Add("half_tempo"); + _animationEvents.Add("normal_tempo"); + _animationEvents.Add("half_time"); + _animationEvents.Add("double_time"); + _animationEvents.Add("allbeat"); + _animationEvents.Add("nobeat"); } - return _uselessEvents; + return _animationEvents; } } } \ No newline at end of file diff --git a/GHNamespace8/MainMenu.cs b/GHNamespace8/MainMenu.cs index 92f86d7..110b3c7 100644 --- a/GHNamespace8/MainMenu.cs +++ b/GHNamespace8/MainMenu.cs @@ -536,7 +536,7 @@ public class MainMenu : Form private void SongListBox_MouseDown(object sender, MouseEventArgs e) { - var num = _songListBox.IndexFromPoint(e.X, e.Y); + int num = _songListBox.IndexFromPoint(e.X, e.Y); if (num >= 0 && num < _songListBox.Items.Count) { if (e.Clicks == 2 && e.Button == MouseButtons.Left) @@ -551,7 +551,7 @@ private void SongListBox_MouseDown(object sender, MouseEventArgs e) } else if (e.Clicks == 2 && e.Button == MouseButtons.Right) { - var gH3Song = (Gh3Song) _songListBox.Items[num]; + Gh3Song gH3Song = (Gh3Song) _songListBox.Items[num]; if (gH3Song.Editable && DialogResult.Yes == MessageBox.Show( gH3Song.Name.ToUpper() + @@ -559,7 +559,7 @@ private void SongListBox_MouseDown(object sender, MouseEventArgs e) MessageBoxButtons.YesNo)) { _songListBox.Items.Remove(gH3Song); - foreach (var current in _gh3Songlist.method_1(gH3Song)) + foreach (int current in _gh3Songlist.method_1(gH3Song)) { method_4(new ZzSetListUpdater(current, Class3190, _gh3Songlist)); } @@ -571,23 +571,23 @@ private void SongListBox_MouseDown(object sender, MouseEventArgs e) private void HideUnEdit_MenuItem_Click(object sender, EventArgs e) { - var arg_1D0 = _gh3Songlist; - var expr_0C = _hideUnEditMenuItem; + Gh3Songlist arg_1D0 = _gh3Songlist; + ToolStripMenuItem expr_0C = _hideUnEditMenuItem; arg_1D0.HideUnEditable = (expr_0C.Checked = !expr_0C.Checked); RefreshSongListBox(); } private void HideUsed_MenuItem_Click(object sender, EventArgs e) { - var arg_1D0 = _gh3Songlist; - var expr_0C = _hideUsedMenuItem; + Gh3Songlist arg_1D0 = _gh3Songlist; + ToolStripMenuItem expr_0C = _hideUsedMenuItem; arg_1D0.HideUsed = (expr_0C.Checked = !expr_0C.Checked); RefreshSongListBox(); } private void ByTitle_MenuItem_Click(object sender, EventArgs e) { - var expr06 = _byTitleMenuItem; + ToolStripMenuItem expr06 = _byTitleMenuItem; Gh3Song.Bool0 = (expr06.Checked = !expr06.Checked); RefreshSongListBox(); } @@ -596,7 +596,7 @@ private void SongListBox_SelectedIndexChanged(object sender, EventArgs e) { if (_songListBox.SelectedItems.Count != 0) { - var enabled = false; + bool enabled = false; foreach (Gh3Song song in _songListBox.SelectedItems) { if (song.Editable) @@ -635,7 +635,7 @@ private void SongProps_MenuItem_Click(object sender, EventArgs e) private void RebuildSong_MenuItem_Click(object sender, EventArgs e) { - var song = (Gh3Song) _songListBox.Items[_songListBox.SelectedIndex]; + Gh3Song song = (Gh3Song) _songListBox.Items[_songListBox.SelectedIndex]; SongData songData; if (!song.IsEditable()) { @@ -647,14 +647,14 @@ private void RebuildSong_MenuItem_Click(object sender, EventArgs e) { if (songData.Bool1) { - var @class = songData.method_1(Class3190, _dataFolder); + Class250 @class = songData.method_1(Class3190, _dataFolder); method_4(@class); if (DialogResult.Yes == MessageBox.Show( "Do you wish to get the song properties from the game track? (Current properties will be overwritten | Mid files have no properties!)", "Tier Exporting", MessageBoxButtons.YesNo)) { - var noRhythmTrack = song.NoRhythmTrack; - var useCoopNotetracks = song.UseCoopNotetracks; + bool noRhythmTrack = song.NoRhythmTrack; + bool useCoopNotetracks = song.UseCoopNotetracks; song.vmethod_0(@class.Class3620.Gh3Song0); song.NoRhythmTrack = noRhythmTrack; song.UseCoopNotetracks = useCoopNotetracks; @@ -663,7 +663,7 @@ private void RebuildSong_MenuItem_Click(object sender, EventArgs e) } if (songData.Bool0) { - var class2 = songData.method_0(_dataFolder); + Class248 class2 = songData.method_0(_dataFolder); method_4(class2); song.NoRhythmTrack = !class2.Bool0; song.UseCoopNotetracks = class2.Bool1; @@ -679,14 +679,14 @@ private void SongListBox_KeyDown(object sender, KeyEventArgs e) "The selected songs will be deleted from the Songlist!\nAre you sure you wish to continue?", "Warning!", MessageBoxButtons.YesNo)) { - var array = _songListBox.imethod_3(); - for (var i = 0; i < array.Length; i++) + object[] array = _songListBox.imethod_3(); + for (int i = 0; i < array.Length; i++) { - var gH3Song = (Gh3Song) array[i]; + Gh3Song gH3Song = (Gh3Song) array[i]; if (gH3Song.Editable) { _songListBox.Items.Remove(gH3Song); - foreach (var current in _gh3Songlist.method_1(gH3Song)) + foreach (int current in _gh3Songlist.method_1(gH3Song)) { method_4(new ZzSetListUpdater(current, Class3190, _gh3Songlist)); } @@ -698,10 +698,10 @@ private void SongListBox_KeyDown(object sender, KeyEventArgs e) private void DeleteSong_MenuItem_Click(object sender, EventArgs e) { - var array = _songListBox.imethod_3(); - for (var i = 0; i < array.Length; i++) + object[] array = _songListBox.imethod_3(); + for (int i = 0; i < array.Length; i++) { - var gH3Song = (Gh3Song) array[i]; + Gh3Song gH3Song = (Gh3Song) array[i]; if (gH3Song.Editable && DialogResult.Yes == MessageBox.Show( gH3Song.Name.ToUpper() + @@ -709,7 +709,7 @@ private void DeleteSong_MenuItem_Click(object sender, EventArgs e) MessageBoxButtons.YesNo)) { _songListBox.Items.Remove(gH3Song); - foreach (var current in _gh3Songlist.method_1(gH3Song)) + foreach (int current in _gh3Songlist.method_1(gH3Song)) { method_4(new ZzSetListUpdater(current, Class3190, _gh3Songlist)); } @@ -720,19 +720,19 @@ private void DeleteSong_MenuItem_Click(object sender, EventArgs e) private void NewSong_MenuItem_Click(object sender, EventArgs e) { - var songData = new SongData(_gh3Songlist, _forceRb3MidConversionToolStripMenuItem.Checked); + SongData songData = new SongData(_gh3Songlist, _forceRb3MidConversionToolStripMenuItem.Checked); if (songData.ShowDialog() == DialogResult.OK) { - var gH3Song = _isAerosmith ? new GhaSong() : new Gh3Song(); + Gh3Song gH3Song = _isAerosmith ? new GhaSong() : new Gh3Song(); if (songData.Bool1) { - var @class = songData.method_1(Class3190, _dataFolder); + Class250 @class = songData.method_1(Class3190, _dataFolder); method_4(@class); gH3Song.vmethod_0(@class.Class3620.Gh3Song0); } if (songData.Bool0) { - var class2 = songData.method_0(_dataFolder); + Class248 class2 = songData.method_0(_dataFolder); method_4(class2); gH3Song.Name = class2.String1; gH3Song.NoRhythmTrack = !class2.Bool0; @@ -741,7 +741,7 @@ private void NewSong_MenuItem_Click(object sender, EventArgs e) gH3Song.Leaderboard = true; gH3Song.Editable = true; } - var songProperties = new SongProperties(gH3Song); + SongProperties songProperties = new SongProperties(gH3Song); if (songProperties.ShowDialog() == DialogResult.OK) { songProperties.GetSongWithChanges(); @@ -754,12 +754,12 @@ private void NewSong_MenuItem_Click(object sender, EventArgs e) private void RecoverSonglist_MenuItem_Click(object sender, EventArgs e) { - var flag = false; - var files = Directory.GetFiles(_dataFolder + "music\\", "*.dat.xen", SearchOption.AllDirectories); - for (var i = 0; i < files.Length; i++) + bool flag = false; + string[] files = Directory.GetFiles(_dataFolder + "music\\", "*.dat.xen", SearchOption.AllDirectories); + for (int i = 0; i < files.Length; i++) { - var text = files[i]; - var text2 = KeyGenerator.GetFileNameNoExt(text); + string text = files[i]; + string text2 = KeyGenerator.GetFileNameNoExt(text); if (File.Exists(_dataFolder + "music\\" + text2 + ".fsb.xen") && File.Exists(_dataFolder + "songs\\" + text2 + "_song.pak.xen") && !_gh3Songlist.method_3(text2) && !QbSongClass1.smethod_4(text2) && @@ -767,8 +767,8 @@ private void RecoverSonglist_MenuItem_Click(object sender, EventArgs e) { try { - var gH3Song = _isAerosmith ? new GhaSong(text2) : new Gh3Song(text2); - var list = new List(new ZzQbSongObject(text).String1); + Gh3Song gH3Song = _isAerosmith ? new GhaSong(text2) : new Gh3Song(text2); + List list = new List(new ZzQbSongObject(text).String1); gH3Song.NoRhythmTrack = !list.Contains(text2 + "_rhythm"); gH3Song.UseCoopNotetracks = list.Contains(text2 + "_coop_song"); _gh3Songlist.Add(text2, gH3Song); @@ -804,8 +804,8 @@ private void LoadChart_EditorBtn_Click(object sender, EventArgs e) { if (fileName.EndsWith("_song.pak.xen")) { - var str = KeyGenerator.GetFileName(fileName).Replace("_song.pak.xen", ""); - using (var @class = new ZzPakNode2(fileName, false)) + string str = KeyGenerator.GetFileName(fileName).Replace("_song.pak.xen", ""); + using (ZzPakNode2 @class = new ZzPakNode2(fileName, false)) { if (!@class.zzQbFileExists("songs\\" + str + ".mid.qb")) { @@ -837,7 +837,7 @@ private void LoadChart_EditorBtn_Click(object sender, EventArgs e) } _songNameEditorLbl.Text = qbcParser.Gh3Song0.Title; _selectedTrackEditorBox.Items.Clear(); - foreach (var current in qbcParser.NoteList.Keys) + foreach (string current in qbcParser.NoteList.Keys) { _selectedTrackEditorBox.Items.Add(current); } @@ -927,14 +927,14 @@ private void GameMode_EditorBtn_Click(object sender, EventArgs e) private void ToggleElements_EditorSplitBtn_ButtonClick(object sender, EventArgs e) { - var arg_1D0 = _songEditorControl; - var expr_0C = _starViewEditorBtn; + SongEditor arg_1D0 = _songEditorControl; + ToolStripMenuItem expr_0C = _starViewEditorBtn; arg_1D0.LoadStarpowerTextures = (expr_0C.Checked = !expr_0C.Checked); - var arg_3F0 = _songEditorControl; - var expr_2E = _hopoViewEditorBtn; + SongEditor arg_3F0 = _songEditorControl; + ToolStripMenuItem expr_2E = _hopoViewEditorBtn; arg_3F0.LoadHopoTextures = (expr_2E.Checked = !expr_2E.Checked); - var arg610 = _songEditorControl; - var expr50 = _audioViewEditorBtn; + SongEditor arg610 = _songEditorControl; + ToolStripMenuItem expr50 = _audioViewEditorBtn; arg610.ShowAudioOnFretboard = (expr50.Checked = !expr50.Checked); } @@ -982,13 +982,13 @@ private void SaveChart_MenuItem_Click(object sender, EventArgs e) { if (_songListBox.SelectedIndex >= 0) { - var gH3Song = (Gh3Song) _songListBox.SelectedItem; - var fileLocation = KeyGenerator.OpenOrSaveFile("Select where to save the song chart.", + Gh3Song gH3Song = (Gh3Song) _songListBox.SelectedItem; + string fileLocation = KeyGenerator.OpenOrSaveFile("Select where to save the song chart.", "GH3 Chart File|*.chart|GH3CP QB Based Chart File|*.qbc|GH3CP dB Based Chart File|*.dbc", false, _songListBox.Text); if (!fileLocation.Equals("") && File.Exists(_dataFolder + "songs\\" + gH3Song.Name + "_song.pak.xen")) { - using (var @class = new ZzPakNode2(_dataFolder + "songs\\" + gH3Song.Name + "_song.pak.xen", false)) + using (ZzPakNode2 @class = new ZzPakNode2(_dataFolder + "songs\\" + gH3Song.Name + "_song.pak.xen", false)) { if (fileLocation.EndsWith(".qbc")) { @@ -1016,7 +1016,7 @@ private void SaveTGH_MenuItem_Click(object sender, EventArgs e) { if (_tierBox.SelectedIndex >= 0) { - var text = KeyGenerator.OpenOrSaveFile("Select where to save the tier.", "GH3CP Tier File|*.tgh", false, + string text = KeyGenerator.OpenOrSaveFile("Select where to save the tier.", "GH3CP Tier File|*.tgh", false, _tierTitleTxtBox.Text); if (text.Equals("")) { @@ -1045,12 +1045,12 @@ private void TGHSwitch_MenuItem_Click(object sender, EventArgs e) { if (_tierBox.SelectedIndex >= 0) { - var text = KeyGenerator.OpenFile("Select the tier to switch to.", "GH3CP Tier File|*.tgh"); + string text = KeyGenerator.OpenFile("Select the tier to switch to.", "GH3CP Tier File|*.tgh"); if (text.Equals("")) { return; } - var gH3Tier = new Gh3Tier(); + Gh3Tier gH3Tier = new Gh3Tier(); try { TghManager tghManager; @@ -1082,12 +1082,12 @@ private void TGHImport_MenuItem_Click(object sender, EventArgs e) { if (_gh3Songlist.Gh3SetlistList.ContainsKey(_selectedSetlist)) { - var text = KeyGenerator.OpenFile("Select the tier to import.", "GH3CP Tier File|*.tgh"); + string text = KeyGenerator.OpenFile("Select the tier to import.", "GH3CP Tier File|*.tgh"); if (text.Equals("")) { return; } - var gH3Tier = new Gh3Tier(); + Gh3Tier gH3Tier = new Gh3Tier(); try { TghManager @class; @@ -1119,7 +1119,7 @@ private void SaveSGH_MenuItem_Click(object sender, EventArgs e) { if (_gh3Songlist.Gh3SetlistList.ContainsKey(_selectedSetlist)) { - var saveLocation = KeyGenerator.OpenOrSaveFile("Select where to save the setlist.", + string saveLocation = KeyGenerator.OpenOrSaveFile("Select where to save the setlist.", "GH3CP Setlist File|*.sgh", false, _setlistTitleTxtBox.Text); if (saveLocation.Equals("")) { @@ -1146,25 +1146,27 @@ private void exportSetlistAsChartsToolStripMenuItem_Click_1(object sender, Event { if (_gh3Songlist.Gh3SetlistList.ContainsKey(_selectedSetlist)) { - var folderBrowserDialog = new FolderBrowserDialog(); - folderBrowserDialog.ShowNewFolderButton = false; - folderBrowserDialog.Description = "Please select where you would like to save the charts."; - folderBrowserDialog.RootFolder = Environment.SpecialFolder.DesktopDirectory; + FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog + { + ShowNewFolderButton = false, + Description = "Please select where you would like to save the charts.", + RootFolder = Environment.SpecialFolder.DesktopDirectory + }; if (folderBrowserDialog.ShowDialog() != DialogResult.OK) { return; } - var saveLocation = folderBrowserDialog.SelectedPath; + string saveLocation = folderBrowserDialog.SelectedPath; if (saveLocation.Equals("")) { return; } - foreach (var tier in _gh3Songlist.Gh3SetlistList[_selectedSetlist].Tiers) + foreach (Gh3Tier tier in _gh3Songlist.Gh3SetlistList[_selectedSetlist].Tiers) { - foreach (var gH3Song in tier.Songs) + foreach (Gh3Song gH3Song in tier.Songs) { - var fileLocation = saveLocation + "\\" + gH3Song.Name + ".chart"; - using (var @class = new ZzPakNode2(_dataFolder + "songs\\" + gH3Song.Name + "_song.pak.xen", + string fileLocation = saveLocation + "\\" + gH3Song.Name + ".chart"; + using (ZzPakNode2 @class = new ZzPakNode2(_dataFolder + "songs\\" + gH3Song.Name + "_song.pak.xen", false)) { new QbcParser(gH3Song.Name, @class.ZzGetNode1("songs\\" + gH3Song.Name + ".mid.qb")) @@ -1179,7 +1181,7 @@ private void exportSetlistAsChartsToolStripMenuItem_Click_1(object sender, Event private void SGHSwitch_MenuItem_Click(object sender, EventArgs e) { if (!_gh3Songlist.Gh3SetlistList.ContainsKey(_selectedSetlist)) return; - var text = KeyGenerator.OpenFile("Select the setlist to switch to.", "GH3CP Setlist File|*.sgh"); + string text = KeyGenerator.OpenFile("Select the setlist to switch to.", "GH3CP Setlist File|*.sgh"); if (text.Equals("")) { return; @@ -1188,10 +1190,10 @@ private void SGHSwitch_MenuItem_Click(object sender, EventArgs e) Trace.WriteLine("Found file: " + text); Debug.WriteLine("Found file: " + text); Console.WriteLine("Found file: " + text); - var gH3Setlist = new Gh3Setlist(); + Gh3Setlist gH3Setlist = new Gh3Setlist(); try { - var sghManager = DialogResult.Yes == + SghManager sghManager = DialogResult.Yes == MessageBox.Show( "Do you wish to import all contained song data (Music & Game Tracks)? Data and properties will be overwritten!", "Setlist Switching", MessageBoxButtons.YesNo) @@ -1225,7 +1227,7 @@ private static void LegacyImporter_MenuItem_Click(object sender, EventArgs e) private void MassImporter_MenuItem_Click(object sender, EventArgs e) { - var folderBrowserDialog = new FolderBrowserDialog + FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog { ShowNewFolderButton = false, Description = "Please select a folder that contains the folder structure for mass song importing.", @@ -1235,19 +1237,19 @@ private void MassImporter_MenuItem_Click(object sender, EventArgs e) { return; } - var directories = Directory.GetDirectories(folderBrowserDialog.SelectedPath, "*", + string[] directories = Directory.GetDirectories(folderBrowserDialog.SelectedPath, "*", SearchOption.TopDirectoryOnly); - var list = new List(directories); - var array = directories; - foreach (var file in array) + List list = new List(directories); + string[] array = directories; + foreach (string file in array) { try { - var list2 = KeyGenerator.CheckFile(file, "*.mid;*.chart;*.qbc;*.dbc", true); - var list3 = KeyGenerator.CheckFile(file, "*.wav;*.mp3;*.ogg", true); - var files = Directory.GetFiles(file, "*.dat", SearchOption.TopDirectoryOnly); + List list2 = KeyGenerator.CheckFile(file, "*.mid;*.chart;*.qbc;*.dbc", true); + List list3 = KeyGenerator.CheckFile(file, "*.wav;*.mp3;*.ogg", true); + string[] files = Directory.GetFiles(file, "*.dat", SearchOption.TopDirectoryOnly); if (list2.Count == 0 || (list3.Count == 0 && files.Length == 0)) continue; - var gH3Song = _isAerosmith ? new GhaSong() : new Gh3Song(); + Gh3Song gH3Song = _isAerosmith ? new GhaSong() : new Gh3Song(); gH3Song.Name = KeyGenerator.GetFileName(file).ToLower().Replace(" ", "").Replace('.', '_'); if (gH3Song.Name.Length > 30) { @@ -1255,16 +1257,16 @@ private void MassImporter_MenuItem_Click(object sender, EventArgs e) } if (QbSongClass1.smethod_4(gH3Song.Name) || _gh3Songlist.method_3(gH3Song.Name)) { - var num = 2; + int num = 2; while (QbSongClass1.smethod_4(gH3Song.Name + num) || _gh3Songlist.method_3(gH3Song.Name + num)) { num++; } - var expr176 = gH3Song; + Gh3Song expr176 = gH3Song; expr176.Name += num; } QbcParser qbcParser = null; - foreach (var current in list2) + foreach (string current in list2) { try { @@ -1291,8 +1293,8 @@ private void MassImporter_MenuItem_Click(object sender, EventArgs e) ZzQbSongObject class2 = null; if (files.Length != 0) { - var array2 = files; - foreach (var text2 in array2) + string[] array2 = files; + foreach (string text2 in array2) { try { @@ -1309,9 +1311,9 @@ private void MassImporter_MenuItem_Click(object sender, EventArgs e) } } if (class2 == null && list3.Count == 0) continue; - var songData = new SongData(gH3Song.Name, qbcParser, class2, list3.ToArray()); - var class3 = songData.method_1(Class3190, _dataFolder); - var class4 = songData.method_0(_dataFolder); + SongData songData = new SongData(gH3Song.Name, qbcParser, class2, list3.ToArray()); + Class250 class3 = songData.method_1(Class3190, _dataFolder); + Class248 class4 = songData.method_0(_dataFolder); gH3Song.vmethod_0(class3.Class3620.Gh3Song0); IniParser.ParseIni(file, gH3Song); gH3Song.NoRhythmTrack = !class4.Bool0; @@ -1331,7 +1333,7 @@ private void MassImporter_MenuItem_Click(object sender, EventArgs e) method_4(new Class247(Class3190, _gh3Songlist)); RefreshSongListBox(); if (list.Count == 0) return; - var text4 = list.Aggregate("The following songs (by folder name) failed:", + string text4 = list.Aggregate("The following songs (by folder name) failed:", (current, current2) => current + "\n" + KeyGenerator.GetFileName(current2)); MessageBox.Show(text4, "Error!"); } @@ -1346,7 +1348,7 @@ public MainMenu() { string text = null; string text2 = null; - using (var streamReader = new StreamReader( + using (StreamReader streamReader = new StreamReader( new WebClient().OpenRead("http://sites.google.com/site/sigmaincproduction/ghtcp_latest.txt"))) { string text3; @@ -1413,7 +1415,7 @@ public MainMenu() } _ghtcpRegistry = (_isAerosmith ? "SOFTWARE\\SigmaInc\\GHTCPAero\\" : "SOFTWARE\\SigmaInc\\GHTCP\\"); _backupName = (_isAerosmith ? "backupAero\\" : "backup\\"); - zzEmbeddedResourceDB.GameName = (_isAerosmith ? "GHA" : "GH3"); + ZzEmbeddedResourceDB.GameName = (_isAerosmith ? "GHA" : "GH3"); if (_isAerosmith) { Text += " - Aerosmith"; @@ -1477,7 +1479,7 @@ public MainMenu() QbSongClass1.smethod_0(); _appDirectory = Directory.GetCurrentDirectory() + "\\"; method_12(false); - var registryKey = Registry.LocalMachine.CreateSubKey(_ghtcpRegistry); + RegistryKey registryKey = Registry.LocalMachine.CreateSubKey(_ghtcpRegistry); method_10((string) registryKey.GetValue("Priority")); if (!new List(new[] { @@ -1489,7 +1491,7 @@ public MainMenu() { method_10("normal"); } - var list = new List(new[] + List list = new List(new[] { (string) registryKey.GetValue("English"), (string) registryKey.GetValue("French"), @@ -1548,10 +1550,10 @@ public MainMenu() "MP3 Encoding Library Missing!"); try { - var text4 = + string text4 = KeyGenerator.OpenOrSaveFile("Locate MP3 Encoding Library (file will be deleted after!)", "MP3 Lame Zip|*.zip", true); - var text5 = KeyGenerator.GetFileNameNoExt(text4); + string text5 = KeyGenerator.GetFileNameNoExt(text4); ZipManager.smethod_4(text4, _appDirectory + "lame_enc.dll", "libmp3lame" + text5.Substring(text5.LastIndexOf('-')) + "/lame_enc.dll"); try @@ -1579,13 +1581,13 @@ private void TexExplorer_MenuItem_Click(object sender, EventArgs e) private void SaveFileControl_MenuItem_Click(object sender, EventArgs e) { - var a = KeyGenerator.OpenOrSaveFile("Select Save File to Import. Current Save File will be Overwritten!", + string a = KeyGenerator.OpenOrSaveFile("Select Save File to Import. Current Save File will be Overwritten!", "GH3 Save File|s000.d", true); if (a != "") { - var @class = new Class324(a); + Class324 @class = new Class324(a); @class.method_0(new Class324(872398018)).List0[0].Int0[1] = -1; - var text = "Progress" + (new[] + string text = "Progress" + (new[] { "A", "B", @@ -1633,7 +1635,7 @@ private void ExecuteActions_MenuItem_Click(object sender, EventArgs e) if (DialogResult.Yes == MessageBox.Show("Are You sure you want to Execute Actions?", "Warning!", MessageBoxButtons.YesNo)) { - var list = new List(); + List list = new List(); foreach (QbEditor item in _actionRequestsListBox.Items) { list.Add(item); @@ -1710,11 +1712,13 @@ private void notifyIcon_0_MouseDown(object sender, MouseEventArgs e) } try { - var registryKey = Registry.LocalMachine.OpenSubKey(_gameRegistry); - var process = new Process(); - process.StartInfo = - new ProcessStartInfo((string) registryKey.GetValue("Path") + - (_isAerosmith ? "Guitar Hero Aerosmith.exe" : "GH3.exe")); + RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(_gameRegistry); + Process process = new Process + { + StartInfo = + new ProcessStartInfo((string)registryKey.GetValue("Path") + + (_isAerosmith ? "Guitar Hero Aerosmith.exe" : "GH3.exe")) + }; process.Start(); if (_priority != "normal") { @@ -1748,7 +1752,7 @@ private void notifyIcon_0_MouseDown(object sender, MouseEventArgs e) private void formClosing() { - var registryKey = Registry.LocalMachine.CreateSubKey(_ghtcpRegistry); + RegistryKey registryKey = Registry.LocalMachine.CreateSubKey(_ghtcpRegistry); registryKey.SetValue("Priority", _priority); registryKey.SetValue("SilentGuitar", Class248.Bool2 ? 1 : 0); registryKey.SetValue("MinimizeToTray", _minToTrayMenuItem.Checked ? 1 : 0); @@ -1782,15 +1786,15 @@ private void method_7(string string7) private void method_8(string string7) { - var registryKey = Registry.LocalMachine.CreateSubKey(_gameRegistry); + RegistryKey registryKey = Registry.LocalMachine.CreateSubKey(_gameRegistry); registryKey.SetValue("Language", string7); method_7(string7); } private string method_9() { - var registryKey = Registry.LocalMachine.CreateSubKey(_gameRegistry); - var text = (string) registryKey.GetValue("Language"); + RegistryKey registryKey = Registry.LocalMachine.CreateSubKey(_gameRegistry); + string text = (string) registryKey.GetValue("Language"); method_7(text); return text; } @@ -1844,7 +1848,7 @@ private void About_MenuItem_Click(object sender, EventArgs e) private void SilentGuitar_MenuItem_Click(object sender, EventArgs e) { - var expr06 = _silentGuitarMenuItem; + ToolStripMenuItem expr06 = _silentGuitarMenuItem; Class248.Bool2 = (expr06.Checked = !expr06.Checked); } @@ -1855,7 +1859,7 @@ private void FxSpeedBoost_MenuItem_Click(object sender, EventArgs e) private void ForceMp3Conversion_MenuItem_Click(object sender, EventArgs e) { - var expr06 = _forceMp3ConversionMenuItem; + ToolStripMenuItem expr06 = _forceMp3ConversionMenuItem; Class248.Bool3 = (expr06.Checked = !expr06.Checked); } @@ -1892,14 +1896,14 @@ private void CreateSetlist_Btn_Click(object sender, EventArgs e) { return; } - var gH3Setlist = new Gh3Setlist(); + Gh3Setlist gH3Setlist = new Gh3Setlist(); gH3Setlist.method_3("scripts\\guitar\\custom_menu\\guitar_custom_progression.qb"); gH3Setlist.InitialMovie = ""; gH3Setlist.Tiers.Add(new Gh3Tier()); - for (var i = 0;;) + for (int i = 0;;) { //num = 2^numOfSetlists - var num = 1 << i; + int num = 1 << i; if ((_gh3Songlist.CustomBitMask & num) != 0) { goto SKIPIT; @@ -1938,7 +1942,7 @@ private void DeleteSetlist_Btn_Click(object sender, EventArgs e) { return; } - var text = (string) _setlistDropBox.SelectedItem; + string text = (string) _setlistDropBox.SelectedItem; _setlistDropBox.SelectedIndex--; _setlistDropBox.Items.Remove(text); method_4(new Class246(_gh3Songlist.Class2140[text], Class3190, _gh3Songlist, false)); @@ -1952,7 +1956,7 @@ private void SetlistTitle_TxtBox_TextChanged(object sender, EventArgs e) private void SetlistApply_Btn_Click(object sender, EventArgs e) { - var gH3Setlist = _gh3Songlist.Gh3SetlistList[_selectedSetlist]; + Gh3Setlist gH3Setlist = _gh3Songlist.Gh3SetlistList[_selectedSetlist]; gH3Setlist.InitialMovie = _setlistInitMovieTxtBox.Text; gH3Setlist.Tiers.Clear(); foreach (Gh3Tier item in _tierBox.Items) @@ -1985,12 +1989,12 @@ private void ManageTiers_MenuItem_Click(object sender, EventArgs e) { if (_tierBox.SelectedIndex >= 0) { - var list = new List(); + List list = new List(); foreach (Gh3Tier item in _tierBox.Items) { list.Add(item); } - var tierManagement = new TierManagement((string) _setlistDropBox.SelectedItem, list.ToArray()); + TierManagement tierManagement = new TierManagement((string) _setlistDropBox.SelectedItem, list.ToArray()); if (tierManagement.ShowDialog() == DialogResult.OK) { _tierBox.Items.Clear(); @@ -2020,7 +2024,7 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { components = new Container(); - var resources = new ComponentResourceManager(typeof(MainMenu)); + ComponentResourceManager resources = new ComponentResourceManager(typeof(MainMenu)); _rightClickMenu = new ContextMenuStrip(components); _sysHighMenuItem = new ToolStripMenuItem(); _sysAboveMenuItem = new ToolStripMenuItem(); @@ -3817,20 +3821,20 @@ private void InitializeComponent() private void BulkSGHSwitch_MenuItem_Click(object sender, EventArgs e) { - var dialog = new OpenFileDialog + OpenFileDialog dialog = new OpenFileDialog { Multiselect = true, Title = "Select the setlists to import.", Filter = "GH3CP Setlist Files|*.sgh" }; - var result = dialog.ShowDialog(); + DialogResult result = dialog.ShowDialog(); if (result == DialogResult.Cancel || result == DialogResult.No) { return; } - var files = dialog.FileNames; - foreach (var saveLocation in files) + string[] files = dialog.FileNames; + foreach (string saveLocation in files) { CreateSetlist_Btn_Click(sender,e); _setlistDropBox.SelectedIndex = _setlistDropBox.Items.Count - 1; @@ -3840,10 +3844,10 @@ private void BulkSGHSwitch_MenuItem_Click(object sender, EventArgs e) return; } - var gH3Setlist = new Gh3Setlist(); + Gh3Setlist gH3Setlist = new Gh3Setlist(); try { - var sghManager = new SghManager(_gh3Songlist, gH3Setlist, saveLocation, _dataFolder); + SghManager sghManager = new SghManager(_gh3Songlist, gH3Setlist, saveLocation, _dataFolder); sghManager.ImportSGH(); _tierBox.Items.Clear(); @@ -3922,7 +3926,7 @@ private void method_12(bool bool1) public void InitializeLanguageList() { - var registryKey = Registry.LocalMachine.CreateSubKey(_ghtcpRegistry); + RegistryKey registryKey = Registry.LocalMachine.CreateSubKey(_ghtcpRegistry); string[] array = { "English", @@ -3932,7 +3936,7 @@ public void InitializeLanguageList() "German", "Korean" }; - for (var i = 0; i < array.Length; i++) + for (int i = 0; i < array.Length; i++) { registryKey.SetValue(array[i], _languageList[i]); } @@ -3956,7 +3960,7 @@ private void RecoverGameSettings_MenuItem_Click(object sender, EventArgs e) private void LoadCurrentGameSettings(bool bool1) { - var loadGameSettings = new LoadGameSettings(_languageList); + LoadGameSettings loadGameSettings = new LoadGameSettings(_languageList); if (loadGameSettings.ShowDialog() != DialogResult.OK) { return; @@ -3966,7 +3970,7 @@ private void LoadCurrentGameSettings(bool bool1) InitializeLanguageList(); try { - var registryKey = Registry.LocalMachine.OpenSubKey(_gameRegistry); + RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(_gameRegistry); _dataFolder = (string) registryKey.GetValue("Path") + "\\DATA\\"; if (!Directory.Exists(_dataFolder)) { @@ -3975,7 +3979,7 @@ private void LoadCurrentGameSettings(bool bool1) } catch { - var text = KeyGenerator.OpenOrSaveFile("Find Guitar Hero " + (_isAerosmith ? "Aerosmith" : "3"), + string text = KeyGenerator.OpenOrSaveFile("Find Guitar Hero " + (_isAerosmith ? "Aerosmith" : "3"), _isAerosmith ? "Guitar Hero Aerosmith Executable|Guitar Hero Aerosmith.exe" : "Guitar Hero 3 Executable|GH3.exe", true); @@ -3986,7 +3990,7 @@ private void LoadCurrentGameSettings(bool bool1) try { _dataFolder = new FileInfo(text).Directory.FullName; - var registryKey = Registry.LocalMachine.CreateSubKey(_gameRegistry); + RegistryKey registryKey = Registry.LocalMachine.CreateSubKey(_gameRegistry); registryKey.SetValue("Path", _dataFolder); _dataFolder += "\\DATA\\"; } @@ -3998,8 +4002,8 @@ private void LoadCurrentGameSettings(bool bool1) return; } } - var text2 = _list0[loadGameSettings.method_3()]; - var int_ = loadGameSettings.method_3(); + string text2 = _list0[loadGameSettings.method_3()]; + int int_ = loadGameSettings.method_3(); using (new Class217("QB Parse Operations")) { try @@ -4011,7 +4015,7 @@ private void LoadCurrentGameSettings(bool bool1) { return; } - var class2 = new ZzPabNode( + ZzPabNode class2 = new ZzPabNode( string.Concat(_appDirectory, _backupName, "originals\\qb", text2, ".pak.xen"), string.Concat(_appDirectory, _backupName, "originals\\qb", text2, ".pab.xen"), false); Gh3Songlist gH3Songlist = null; @@ -4039,7 +4043,7 @@ private void LoadCurrentGameSettings(bool bool1) Class3190 = null; if (gH3Songlist != null) { - var dialogResult = + DialogResult dialogResult = MessageBox.Show( "Game Settings files are not compatible, but something can be recovered. Do you wish to recover when starting from backup? (Overwriting!)", "Loading Game Settings", MessageBoxButtons.YesNoCancel); @@ -4082,10 +4086,10 @@ private void LoadCurrentGameSettings(bool bool1) _gh3Songlist = new Gh3Songlist(Class3190.ZzGetNode1("scripts\\guitar\\songlist.qb"), new Gh3Songlist(class2.ZzGetNode1("scripts\\guitar\\songlist.qb"), null)); class2.Dispose(); - var flag = false; + bool flag = false; if (gH3Songlist != null) { - foreach (var current in gH3Songlist.Keys) + foreach (string current in gH3Songlist.Keys) { if (!_gh3Songlist.method_3(current)) { @@ -4102,14 +4106,14 @@ private void LoadCurrentGameSettings(bool bool1) new ZzSetListParser(Class3190, _gh3Songlist, _isAerosmith).method_0(); if (flag && gH3Songlist.Gh3SetlistList.Count != 0) { - var flag2 = false; - using (var enumerator2 = gH3Songlist.Gh3SetlistList.Keys.GetEnumerator()) + bool flag2 = false; + using (Dictionary.KeyCollection.Enumerator enumerator2 = gH3Songlist.Gh3SetlistList.Keys.GetEnumerator()) { IL_78C: while (enumerator2.MoveNext()) { - var current2 = enumerator2.Current; - var gH3Setlist = gH3Songlist.Gh3SetlistList[current2]; + int current2 = enumerator2.Current; + Gh3Setlist gH3Setlist = gH3Songlist.Gh3SetlistList[current2]; if (gH3Setlist.method_4()) { try @@ -4118,9 +4122,9 @@ private void LoadCurrentGameSettings(bool bool1) { break; }*/ - for (var i = 0;;) + for (int i = 0;;) { - var num = 1 << i; + int num = 1 << i; if (!((_gh3Songlist.CustomBitMask & num) == 0)) goto SKIPIT; @@ -4193,7 +4197,7 @@ private void LoadCurrentGameSettings(bool bool1) return; } } - foreach (var current3 in _gh3Songlist.Class2140.Keys) + foreach (string current3 in _gh3Songlist.Class2140.Keys) { _setlistDropBox.Items.Add(current3); } @@ -4244,16 +4248,16 @@ private void method_15() private bool method_16(int int3) { - var text = string.Concat(_appDirectory, _backupName, "originals\\qb", _list0[int3], ".pab.xen"); - var icollection = _isAerosmith ? _int2[int3] : _int1[int3]; + string text = string.Concat(_appDirectory, _backupName, "originals\\qb", _list0[int3], ".pab.xen"); + int[] icollection = _isAerosmith ? _int2[int3] : _int1[int3]; return File.Exists(text) && File.Exists(text.Replace(".pab.xen", ".pak.xen")) && KeyGenerator.smethod_53( KeyGenerator.smethod_21(KeyGenerator.HashStream(text)), icollection); } private bool method_17(int int3) { - var text = _dataFolder + "PAK\\qb" + _list0[int3] + ".pab.xen"; - var icollection = _isAerosmith ? _int2[int3] : _int1[int3]; + string text = _dataFolder + "PAK\\qb" + _list0[int3] + ".pab.xen"; + int[] icollection = _isAerosmith ? _int2[int3] : _int1[int3]; while (!File.Exists(text) || !File.Exists(text.Replace(".pab.xen", ".pak.xen")) || !KeyGenerator.smethod_53( KeyGenerator.smethod_21(KeyGenerator.HashStream(text)), icollection)) { @@ -4320,8 +4324,8 @@ private void RestoreOriginal_MenuItem_Click(object sender, EventArgs e) { return; } - var text = KeyGenerator.GetFileNameNoExt(Class3190.String0); - var int_ = new List(_list0).IndexOf(text.Replace("qb", "")); + string text = KeyGenerator.GetFileNameNoExt(Class3190.String0); + int int_ = new List(_list0).IndexOf(text.Replace("qb", "")); if (method_16(int_)) { method_15(); @@ -4342,7 +4346,7 @@ private void RestoreLast_MenuItem_Click(object sender, EventArgs e) { return; } - var text = KeyGenerator.GetFileNameNoExt(Class3190.String0); + string text = KeyGenerator.GetFileNameNoExt(Class3190.String0); if (File.Exists(string.Concat(_appDirectory, _backupName, "lastedited\\", text, ".pak.xen")) && File.Exists( string.Concat(_appDirectory, _backupName, "lastedited\\", text, ".pab.xen"))) { @@ -4364,7 +4368,7 @@ private void GameSettingsSwitch_MenuItem_Click(object sender, EventArgs e) { return; } - var loadGameSettings = new LoadGameSettings(new[] + LoadGameSettings loadGameSettings = new LoadGameSettings(new[] { "English", "French", @@ -4377,8 +4381,8 @@ private void GameSettingsSwitch_MenuItem_Click(object sender, EventArgs e) { return; } - var num = loadGameSettings.method_3(); - var text = KeyGenerator.GetFileNameNoExt(Class3190.String0); + int num = loadGameSettings.method_3(); + string text = KeyGenerator.GetFileNameNoExt(Class3190.String0); if (!method_16(num) && DialogResult.Yes == MessageBox.Show("A proper backup doesn't exist. Do you wish to start backup creation? (Overwriting!)", "Loading Game Settings", MessageBoxButtons.YesNo) && !method_17(num)) @@ -4387,7 +4391,7 @@ private void GameSettingsSwitch_MenuItem_Click(object sender, EventArgs e) } new List(_list0).IndexOf(text.Replace("qb", "")); method_15(); - using (var @class = new ZzPabNode( + using (ZzPabNode @class = new ZzPabNode( string.Concat(_appDirectory, _backupName, "originals\\qb", _list0[num], ".pak.xen"), string.Concat(_appDirectory, _backupName, "originals\\qb", _list0[num], ".pab.xen"), false)) { @@ -4409,7 +4413,7 @@ private void TierSongs_ListBox_DragDrop(object sender, DragEventArgs e) private void TierSongs_ListBox_MouseDown(object sender, MouseEventArgs e) { - var num = _tierSongsListBox.IndexFromPoint(e.Location); + int num = _tierSongsListBox.IndexFromPoint(e.Location); if (num >= 0 && num < _tierSongsListBox.Items.Count && e.Clicks == 2 && e.Button == MouseButtons.Right) { _tierSongsListBox.Items.RemoveAt(num); @@ -4484,7 +4488,7 @@ private void TierUnlockedSet_Btn_Click(object sender, EventArgs e) private void TierApply_Btn_Click(object sender, EventArgs e) { - var gH3Tier = (Gh3Tier) _tierBox.Items[_tierBox.SelectedIndex]; + Gh3Tier gH3Tier = (Gh3Tier) _tierBox.Items[_tierBox.SelectedIndex]; gH3Tier.Title = _tierTitleTxtBox.Text; gH3Tier.Defaultunlocked = Convert.ToInt32(_tierUnlockedNumBox.Value); gH3Tier.CompletionMovie = _tierCompMovieTxtBox.Text; @@ -4524,10 +4528,12 @@ private void exportSongListToolStripMenuItem_Click(object sender, EventArgs e) { if (_gh3Songlist.Gh3SetlistList.ContainsKey(_selectedSetlist)) { - SaveFileDialog saveFileDlg = new SaveFileDialog(); - saveFileDlg.Filter = "CSV files (*.csv)|*.csv"; - saveFileDlg.Title = "Please select where you would like to save the songlist"; - saveFileDlg.FileName = String.Format("{0}.csv", _setlistDropBox.Text); + SaveFileDialog saveFileDlg = new SaveFileDialog + { + Filter = "CSV files (*.csv)|*.csv", + Title = "Please select where you would like to save the songlist", + FileName = String.Format("{0}.csv", _setlistDropBox.Text) + }; if (saveFileDlg.ShowDialog() != DialogResult.OK) { return; @@ -4579,10 +4585,12 @@ private void exportSongListToolStripMenuItem1_Click(object sender, EventArgs e) bool sortBySetlist = form.sortBy == SortSongListForm.SortBy.Setlist; - SaveFileDialog saveFileDlg = new SaveFileDialog(); - saveFileDlg.Filter = "CSV files (*.csv)|*.csv"; - saveFileDlg.Title = "Please select where you would like to save the songlist."; - saveFileDlg.FileName = "songlist.csv"; + SaveFileDialog saveFileDlg = new SaveFileDialog + { + Filter = "CSV files (*.csv)|*.csv", + Title = "Please select where you would like to save the songlist.", + FileName = "songlist.csv" + }; if (saveFileDlg.ShowDialog() != DialogResult.OK) { return; diff --git a/GHNamespace8/NoteEventInterpreter.cs b/GHNamespace8/NoteEventInterpreter.cs index 5ab226f..622269d 100644 --- a/GHNamespace8/NoteEventInterpreter.cs +++ b/GHNamespace8/NoteEventInterpreter.cs @@ -42,9 +42,9 @@ public NoteEventInterpreter(string[] stringImported, int constant480) if (!(AlwaysTrue = (stringImported.Length == 0))) //If string is empty { //Cycles through the string array imported (All notes/SP) - for (var i = 0; i < stringImported.Length; i++) + for (int i = 0; i < stringImported.Length; i++) { - var currentString = stringImported[i]; + string currentString = stringImported[i]; /* Indexes: 0=Offset @@ -52,13 +52,13 @@ public NoteEventInterpreter(string[] stringImported, int constant480) 2=Note Value 3=Sustain Length */ - var notesEventsArray = currentString.Split(new[] + string[] notesEventsArray = currentString.Split(new[] { ' ', '\t', '=' }, StringSplitOptions.RemoveEmptyEntries); - var offset = ChartParser.GetNoteFromResolution(notesEventsArray[0]); + int offset = ChartParser.GetNoteFromResolution(notesEventsArray[0]); string eventType; if ((eventType = notesEventsArray[1]) != null) { @@ -72,7 +72,7 @@ public NoteEventInterpreter(string[] stringImported, int constant480) if (EventList.ContainsKey(offset)) { _currentEventLine = notesEventsArray[2]; - for (var j = 3; j < notesEventsArray.Length; j++) + for (int j = 3; j < notesEventsArray.Length; j++) { _currentEventLine = _currentEventLine + " " + notesEventsArray[j]; } @@ -81,7 +81,7 @@ public NoteEventInterpreter(string[] stringImported, int constant480) else { _currentEventLine = notesEventsArray[2]; - for (var k = 3; k < notesEventsArray.Length; k++) + for (int k = 3; k < notesEventsArray.Length; k++) { _currentEventLine = _currentEventLine + " " + notesEventsArray[k]; } @@ -150,8 +150,8 @@ public NoteEventInterpreter(string[] stringImported, int constant480) */ else { - var notes = new bool[32]; - var sustainLength = ChartParser.GetNoteFromResolution(notesEventsArray[3]); + bool[] notes = new bool[32]; + int sustainLength = ChartParser.GetNoteFromResolution(notesEventsArray[3]); if (sustainLength <= constant480 / 4) { sustainLength = 0; @@ -162,14 +162,14 @@ public NoteEventInterpreter(string[] stringImported, int constant480) } else { - var currentSustainLength = NoteList[offset].SustainLength; + int currentSustainLength = NoteList[offset].SustainLength; //Updates sustain length if (currentSustainLength < sustainLength) { NoteList[offset].SustainLength = sustainLength; } } - var note = Convert.ToInt32(notesEventsArray[2]); + int note = Convert.ToInt32(notesEventsArray[2]); NoteList[offset].NoteValues[note] = true; } } diff --git a/GHNamespace8/NotesAtOffset.cs b/GHNamespace8/NotesAtOffset.cs index 2a5eef8..0e34d79 100644 --- a/GHNamespace8/NotesAtOffset.cs +++ b/GHNamespace8/NotesAtOffset.cs @@ -20,8 +20,8 @@ public NotesAtOffset(int int1, int int2) public int method_0() { - var num = 0u; //0 - for (var i = 0; i < NoteValues.Length; i++) + uint num = 0u; //0 + for (int i = 0; i < NoteValues.Length; i++) { if (NoteValues[i]) { @@ -34,7 +34,7 @@ public int method_0() public void SetNote(int int1) { NoteValues = new bool[32]; - for (var i = 0; i < 32; i++) + for (int i = 0; i < 32; i++) { if ((int1 >> i & 1) != 0) { diff --git a/GHNamespace8/SGHManager.cs b/GHNamespace8/SGHManager.cs index 92ef733..3649b88 100644 --- a/GHNamespace8/SGHManager.cs +++ b/GHNamespace8/SGHManager.cs @@ -34,12 +34,11 @@ public SghManager(Gh3Songlist gh3Songlist1, Gh3Setlist gh3Setlist1, string saveL public void ImportSGH() { - byte[] byte_; - ZipManager.ExtractBytesFrom(_saveLocation, out byte_, "songs.info", "SGH9ZIP2PASS4MXKR"); - var @class = new ZzGenericNode1("songs", KeyGenerator.smethod_8(byte_, "SNG4AES4KEY9MXKR")); + ZipManager.ExtractBytesFrom(_saveLocation, out byte[] byte_, "songs.info", "SGH9ZIP2PASS4MXKR"); + ZzGenericNode1 @class = new ZzGenericNode1("songs", KeyGenerator.smethod_8(byte_, "SNG4AES4KEY9MXKR")); foreach (StructurePointerNode class302 in @class.Nodes) { - var gH3Song = new Gh3Song(class302) {Editable = true}; + Gh3Song gH3Song = new Gh3Song(class302) {Editable = true}; _gh3SongList.method_0(gH3Song, _string0 != null); } ZipManager.ExtractBytesFrom(_saveLocation, out byte_, "setlist.info", "SGH9ZIP2PASS4MXKR"); @@ -47,11 +46,11 @@ public void ImportSGH() (StructureHeaderNode) new ZzGenericNode1("setlist", KeyGenerator.smethod_8(byte_, "SET4AES4KEY9MXKR")) .Nodes[0], _gh3SongList)); if (_string0 == null) return; - var list = new List(); - var list2 = new List(); - foreach (var current in SetlistToExport.Tiers) + List list = new List(); + List list2 = new List(); + foreach (GuitarHero.Tier.Gh3Tier current in SetlistToExport.Tiers) { - foreach (var current2 in current.Songs) + foreach (Gh3Song current2 in current.Songs) { if (!current2.Editable) continue; list.Add(current2.Name + "_song.pak.xen"); @@ -67,15 +66,15 @@ public void ImportSGH() public void method_1() { - var fileStreamList = new List(); + List fileStreamList = new List(); Stream stream = new MemoryStream(); KeyGenerator.smethod_1(new ZzGenericNode1("setlist", SetlistToExport.method_6()).method_8(), stream, "SET4AES4KEY9MXKR"); - var fileNameList = new List(); - var list3 = new List(); - foreach (var current in SetlistToExport.Tiers) + List fileNameList = new List(); + List list3 = new List(); + foreach (GuitarHero.Tier.Gh3Tier current in SetlistToExport.Tiers) { - foreach (var current2 in current.Songs) + foreach (Gh3Song current2 in current.Songs) { if (current2.Editable) { diff --git a/GHNamespace8/SectionInterpreter.cs b/GHNamespace8/SectionInterpreter.cs index 867fcc8..5daa0d9 100644 --- a/GHNamespace8/SectionInterpreter.cs +++ b/GHNamespace8/SectionInterpreter.cs @@ -17,10 +17,10 @@ public SectionInterpreter() public SectionInterpreter(string[] string0) { - for (var i = 0; i < string0.Length; i++) + for (int i = 0; i < string0.Length; i++) { - var text = string0[i]; - var array = text.Split(new[] + string text = string0[i]; + string[] array = text.Split(new[] { '=', '"' @@ -32,7 +32,7 @@ public SectionInterpreter(string[] string0) { array[2] = array[2].Substring(0, array[2].Length - 1); } - var num = ChartParser.GetNoteFromResolution(array[0].Trim()); + int num = ChartParser.GetNoteFromResolution(array[0].Trim()); if (array[2].StartsWith("section ")) { SectionList.Add(num, diff --git a/GHNamespace8/SongProperties.cs b/GHNamespace8/SongProperties.cs index de02b1b..27f4d8f 100644 --- a/GHNamespace8/SongProperties.cs +++ b/GHNamespace8/SongProperties.cs @@ -198,7 +198,7 @@ public SongProperties(Gh3Song song) : this(song.Name) } if (_aeroGroupBox.Enabled) { - var gHaSong = (GhaSong) _song; + GhaSong gHaSong = (GhaSong) _song; _coveredTxt.Text = gHaSong.CoveredBy; _singAnimPakTxt.Text = gHaSong.SingerAnimPak; _bandBox.SelectedItem = gHaSong.Band; @@ -280,12 +280,11 @@ public Gh3Song GetSongWithChanges() _song.Boss = "boss_tommorello_props"; } } - if (_song is GhaSong) + if (_song is GhaSong song) { - var song = (GhaSong) _song; song.CoveredBy = _coveredTxt.Text; song.SingerAnimPak = _singAnimPakTxt.Text; - song.Band = (string) _bandBox.SelectedItem; + song.Band = (string)_bandBox.SelectedItem; _bpm8NoteBox.Value = song.ThinFretbar_8NoteParamsHighBpm; _aeroGuitaristBox.Checked = song.GuitaristChecksum; _perryMicBox.Checked = song.PerryMicStand; @@ -381,8 +380,8 @@ private void InitializeComponent() _yearTxt.Size = new Size(156, 20); _yearTxt.TabIndex = 2; _offsetBox.Location = new Point(130, 175); - var arg_2Ea0 = _offsetBox; - var array = new int[4]; + NumericUpDown arg_2Ea0 = _offsetBox; + int[] array = new int[4]; array[0] = 30000; arg_2Ea0.Maximum = new decimal(array); _offsetBox.Minimum = new decimal(new[] @@ -519,8 +518,8 @@ private void InitializeComponent() 131072 }); _bandVolBox.Location = new Point(130, 124); - var argA560 = _bandVolBox; - var array2 = new int[4]; + NumericUpDown argA560 = _bandVolBox; + int[] array2 = new int[4]; array2[0] = 5; argA560.Maximum = new decimal(array2); _bandVolBox.Minimum = new decimal(new[] @@ -551,8 +550,8 @@ private void InitializeComponent() 131072 }); _guitarVolBox.Location = new Point(130, 99); - var argBb00 = _guitarVolBox; - var array3 = new int[4]; + NumericUpDown argBb00 = _guitarVolBox; + int[] array3 = new int[4]; array3[0] = 5; argBb00.Maximum = new decimal(array3); _guitarVolBox.Minimum = new decimal(new[] @@ -583,8 +582,8 @@ private void InitializeComponent() 131072 }); _hammerOnBox.Location = new Point(130, 150); - var argD0C0 = _hammerOnBox; - var array4 = new int[4]; + NumericUpDown argD0C0 = _hammerOnBox; + int[] array4 = new int[4]; array4[0] = 5; argD0C0.Maximum = new decimal(array4); _hammerOnBox.Minimum = new decimal(new[] @@ -864,13 +863,13 @@ private void InitializeComponent() _label15.TabIndex = 36; _label15.Text = "Covered By:"; _label15.TextAlign = ContentAlignment.MiddleCenter; - var arg_1D9F0 = _bpm8NoteBox; - var array5 = new int[4]; + NumericUpDown arg_1D9F0 = _bpm8NoteBox; + int[] array5 = new int[4]; array5[0] = 5; arg_1D9F0.Increment = new decimal(array5); _bpm8NoteBox.Location = new Point(127, 71); - var arg_1Dd60 = _bpm8NoteBox; - var array6 = new int[4]; + NumericUpDown arg_1Dd60 = _bpm8NoteBox; + int[] array6 = new int[4]; array6[0] = 500; arg_1Dd60.Maximum = new decimal(array6); _bpm8NoteBox.Minimum = new decimal(new[] diff --git a/GHNamespace8/TierManagement.cs b/GHNamespace8/TierManagement.cs index dfcc508..b5fd25e 100644 --- a/GHNamespace8/TierManagement.cs +++ b/GHNamespace8/TierManagement.cs @@ -89,7 +89,7 @@ private void TierList_MouseDown(object sender, MouseEventArgs e) { if (e.Clicks == 2 && e.Button == MouseButtons.Right) { - var num = _tierList.IndexFromPoint(e.X, e.Y); + int num = _tierList.IndexFromPoint(e.X, e.Y); if (num >= 0 && num < _tierList.Items.Count && 1 < _tierList.Items.Count) { _tierList.Items.RemoveAt(num); @@ -97,7 +97,7 @@ private void TierList_MouseDown(object sender, MouseEventArgs e) } return; } - var num2 = _tierList.IndexFromPoint(e.X, e.Y); + int num2 = _tierList.IndexFromPoint(e.X, e.Y); if (num2 >= 0 && num2 < _tierList.Items.Count) { _tierList.DoDragDrop(_tierList.Items[_int0 = num2], DragDropEffects.Move); @@ -138,7 +138,7 @@ private void TierList_DragOver(object sender, DragEventArgs e) public Gh3Tier[] method_0() { - var list = new List(); + List list = new List(); foreach (Gh3Tier item in _tierList.Items) { list.Add(item); diff --git a/GHNamespace9/ActionsWindow.cs b/GHNamespace9/ActionsWindow.cs index 00107a2..8fcf951 100644 --- a/GHNamespace9/ActionsWindow.cs +++ b/GHNamespace9/ActionsWindow.cs @@ -42,21 +42,23 @@ public ActionsWindow(List listOfActions) public void method_0(EventHandler eventHandler1) { - var eventHandler = _eventHandler0; + EventHandler eventHandler = _eventHandler0; EventHandler eventHandler2; do { eventHandler2 = eventHandler; - var value = (EventHandler) Delegate.Combine(eventHandler2, eventHandler1); + EventHandler value = (EventHandler) Delegate.Combine(eventHandler2, eventHandler1); eventHandler = Interlocked.CompareExchange(ref _eventHandler0, value, eventHandler2); } while (eventHandler != eventHandler2); } public void method_1() { - _thread0 = new Thread(_actionList.method_1); - _thread0.CurrentCulture = Thread.CurrentThread.CurrentCulture; - _thread0.CurrentUICulture = Thread.CurrentThread.CurrentUICulture; + _thread0 = new Thread(_actionList.method_1) + { + CurrentCulture = Thread.CurrentThread.CurrentCulture, + CurrentUICulture = Thread.CurrentThread.CurrentUICulture + }; _thread0.Start(); } @@ -68,7 +70,7 @@ private void method_2(object sender, EventArgs0 e) Invoke(method, sender, e); return; } - var expr34 = _actionsTxt; + RichTextBox expr34 = _actionsTxt; expr34.Text += e.method_0(); _actionsTxt.ScrollToCaret(); _progressBar.Value = e.method_1(); diff --git a/GHNamespace9/EventHandlerClass1.cs b/GHNamespace9/EventHandlerClass1.cs index b46ee3f..ff11426 100644 --- a/GHNamespace9/EventHandlerClass1.cs +++ b/GHNamespace9/EventHandlerClass1.cs @@ -27,23 +27,20 @@ protected override void WndProc(ref Message m) base.WndProc(ref m); if (m.Msg == Int0) { - var keys = (Keys) ((int) m.LParam >> 16 & 65535); - var modKeys = (ModKeys) ((int) m.LParam & 65535); - if (_eventHandler0 != null) - { - _eventHandler0(this, new EventArgs1(modKeys, keys)); - } + Keys keys = (Keys) ((int) m.LParam >> 16 & 65535); + ModKeys modKeys = (ModKeys) ((int) m.LParam & 65535); + _eventHandler0?.Invoke(this, new EventArgs1(modKeys, keys)); } } public void method_0(EventHandler eventHandler1) { - var eventHandler = _eventHandler0; + EventHandler eventHandler = _eventHandler0; EventHandler eventHandler2; do { eventHandler2 = eventHandler; - var value = (EventHandler) Delegate.Combine(eventHandler2, eventHandler1); + EventHandler value = (EventHandler) Delegate.Combine(eventHandler2, eventHandler1); eventHandler = Interlocked.CompareExchange(ref _eventHandler0, value, eventHandler2); } while (eventHandler != eventHandler2); } @@ -58,11 +55,11 @@ public void Dispose() private readonly Dictionary _dictionary0 = new Dictionary(); - private EventHandler _eventHandler0; + private readonly EventHandler _eventHandler0; public EventHandlerClass1() { - var arg320 = _class2340; + HandlerBuddy arg320 = _class2340; EventHandler eventHandler = method_1; arg320.method_0(eventHandler); } @@ -72,7 +69,7 @@ public EventHandlerClass1() public void method_0() { - foreach (var current in _dictionary0.Values) + foreach (int current in _dictionary0.Values) { UnregisterHotKey(_class2340.Handle, current); } @@ -88,10 +85,7 @@ public void Dispose() [CompilerGenerated] private void method_1(object sender, EventArgs1 e) { - if (_eventHandler0 != null) - { - _eventHandler0(this, e); - } + _eventHandler0?.Invoke(this, e); } } } \ No newline at end of file diff --git a/GHNamespace9/Fretbar.cs b/GHNamespace9/Fretbar.cs index 5d43e98..764a9cb 100644 --- a/GHNamespace9/Fretbar.cs +++ b/GHNamespace9/Fretbar.cs @@ -21,7 +21,7 @@ public class Fretbar : List, ICloneable where T : IComparable base[int0] = value; if (int0 > 0) { - var t = base[int0 - 1]; + T t = base[int0 - 1]; if (t.CompareTo(value) > 0) { goto IL_54; @@ -66,8 +66,8 @@ public void method_1(T gparam0) { if (_bool1) { - var num = method_3(gparam0); - var num2 = (num >= 0) ? num : (-num - 1); + int num = method_3(gparam0); + int num2 = (num >= 0) ? num : (-num - 1); if (num2 >= Count) { Add(gparam0); @@ -99,7 +99,7 @@ public int method_3(T gparam0) { for (i = BinarySearch(gparam0); i > 0; i--) { - var t = base[i - 1]; + T t = base[i - 1]; if (!t.Equals(gparam0)) { break; @@ -115,11 +115,11 @@ public int method_3(T gparam0) public override string ToString() { - var text = "{"; - for (var i = 0; i < Count; i++) + string text = "{"; + for (int i = 0; i < Count; i++) { - var arg370 = text; - var t = base[i]; + string arg370 = text; + T t = base[i]; text = arg370 + t + ((i != Count - 1) ? "; " : "}"); } return text; @@ -127,14 +127,14 @@ public override string ToString() public override bool Equals(object obj) { - var @class = (Fretbar) obj; + Fretbar @class = (Fretbar) obj; if (@class.Count != Count) { return false; } - for (var i = 0; i < Count; i++) + for (int i = 0; i < Count; i++) { - var t = @class[i]; + T t = @class[i]; if (!t.Equals(this[i])) { return false; @@ -179,14 +179,14 @@ private bool method_6(ref int int0, ref int int1, ref int int2, T gparam0) while (int0 <= int1) { int2 = (int0 + int1) / 2; - var t = base[int2]; + T t = base[int2]; if (t.CompareTo(gparam0) < 0) { int0 = int2 + 1; } else { - var t2 = base[int2]; + T t2 = base[int2]; if (t2.CompareTo(gparam0) <= 0) { return true; @@ -199,9 +199,9 @@ private bool method_6(ref int int0, ref int int1, ref int int2, T gparam0) public int method_7(T gparam0) { - var num = 0; - var num2 = Count - 1; - var num3 = 0; + int num = 0; + int num2 = Count - 1; + int num3 = 0; num3 = (method_6(ref num, ref num2, ref num3, gparam0) ? num3 : num2); if (num3 >= 0) { diff --git a/GHNamespace9/GhtcpToolStripControlHost.cs b/GHNamespace9/GhtcpToolStripControlHost.cs index 2feb680..28feaa7 100644 --- a/GHNamespace9/GhtcpToolStripControlHost.cs +++ b/GHNamespace9/GhtcpToolStripControlHost.cs @@ -57,8 +57,7 @@ public void method_5(int int0) protected override void OnSubscribeControlEvents(Control control) { base.OnSubscribeControlEvents(control); - var trackBar = control as TrackBar; - if (trackBar != null) + if (control is TrackBar trackBar) { trackBar.ValueChanged += method_6; } @@ -67,8 +66,7 @@ protected override void OnSubscribeControlEvents(Control control) protected override void OnUnsubscribeControlEvents(Control control) { base.OnUnsubscribeControlEvents(control); - var trackBar = control as TrackBar; - if (trackBar != null) + if (control is TrackBar trackBar) { trackBar.ValueChanged -= method_6; } @@ -76,20 +74,17 @@ protected override void OnUnsubscribeControlEvents(Control control) private void method_6(object sender, EventArgs e) { - if (_eventHandler0 != null) - { - _eventHandler0(sender, e); - } + _eventHandler0?.Invoke(sender, e); } public void method_7(EventHandler eventHandler1) { - var eventHandler = _eventHandler0; + EventHandler eventHandler = _eventHandler0; EventHandler eventHandler2; do { eventHandler2 = eventHandler; - var value = (EventHandler) Delegate.Combine(eventHandler2, eventHandler1); + EventHandler value = (EventHandler) Delegate.Combine(eventHandler2, eventHandler1); eventHandler = Interlocked.CompareExchange(ref _eventHandler0, value, eventHandler2); } while (eventHandler != eventHandler2); } diff --git a/GHNamespace9/KeyGenerator.cs b/GHNamespace9/KeyGenerator.cs index 21e0e9c..d9d5d18 100644 --- a/GHNamespace9/KeyGenerator.cs +++ b/GHNamespace9/KeyGenerator.cs @@ -307,11 +307,11 @@ public static void smethod_0(Stream stream0, Stream stream1, byte[] byte1, byte[ { return; } - var rijndael = Rijndael.Create(); + Rijndael rijndael = Rijndael.Create(); rijndael.Key = byte1; rijndael.IV = byte2; - var cryptoStream = new CryptoStream(stream1, rijndael.CreateEncryptor(), CryptoStreamMode.Write); - var array = new byte[4096]; + CryptoStream cryptoStream = new CryptoStream(stream1, rijndael.CreateEncryptor(), CryptoStreamMode.Write); + byte[] array = new byte[4096]; int count; while ((count = stream0.Read(array, 0, array.Length)) > 0) { @@ -322,13 +322,13 @@ public static void smethod_0(Stream stream0, Stream stream1, byte[] byte1, byte[ public static void smethod_1(Stream stream0, Stream stream1, string string0) { - var passwordDeriveBytes = new PasswordDeriveBytes(string0, PwByteArray); + PasswordDeriveBytes passwordDeriveBytes = new PasswordDeriveBytes(string0, PwByteArray); smethod_0(stream0, stream1, passwordDeriveBytes.GetBytes(32), passwordDeriveBytes.GetBytes(16)); } public static byte[] smethod_2(Stream stream0, string string0) { - var memoryStream = new MemoryStream(); + MemoryStream memoryStream = new MemoryStream(); smethod_1(stream0, memoryStream, string0); return memoryStream.ToArray(); } @@ -339,11 +339,11 @@ private static void CryptoMethod(Stream stream0, Stream stream1, byte[] byte1, b { return; } - var rijndael = Rijndael.Create(); + Rijndael rijndael = Rijndael.Create(); rijndael.Key = byte1; rijndael.IV = byte2; - var cryptoStream = new CryptoStream(stream1, rijndael.CreateDecryptor(), CryptoStreamMode.Write); - var array = new byte[4096]; + CryptoStream cryptoStream = new CryptoStream(stream1, rijndael.CreateDecryptor(), CryptoStreamMode.Write); + byte[] array = new byte[4096]; int count; while ((count = stream0.Read(array, 0, array.Length)) > 0) { @@ -354,13 +354,13 @@ private static void CryptoMethod(Stream stream0, Stream stream1, byte[] byte1, b private static void CryptoMethod(Stream stream0, Stream stream1, string string0) { - var passwordDeriveBytes = new PasswordDeriveBytes(string0, PwByteArray); + PasswordDeriveBytes passwordDeriveBytes = new PasswordDeriveBytes(string0, PwByteArray); CryptoMethod(stream0, stream1, passwordDeriveBytes.GetBytes(32), passwordDeriveBytes.GetBytes(16)); } public static byte[] CryptoMethod(Stream stream0, string string0) { - var memoryStream = new MemoryStream(); + MemoryStream memoryStream = new MemoryStream(); CryptoMethod(stream0, memoryStream, string0); return memoryStream.ToArray(); } @@ -371,23 +371,23 @@ public static void smethod_6(byte[] byte1, Stream stream0, byte[] key, byte[] in { return; } - var rijndael = Rijndael.Create(); + Rijndael rijndael = Rijndael.Create(); rijndael.Key = key; rijndael.IV = initializationVector; - var cryptoStream = new CryptoStream(stream0, rijndael.CreateDecryptor(), CryptoStreamMode.Write); + CryptoStream cryptoStream = new CryptoStream(stream0, rijndael.CreateDecryptor(), CryptoStreamMode.Write); cryptoStream.Write(byte1, 0, byte1.Length); cryptoStream.Close(); } public static void smethod_7(byte[] byte1, Stream stream0, string string0) { - var passwordDeriveBytes = new PasswordDeriveBytes(string0, PwByteArray); + PasswordDeriveBytes passwordDeriveBytes = new PasswordDeriveBytes(string0, PwByteArray); smethod_6(byte1, stream0, passwordDeriveBytes.GetBytes(32), passwordDeriveBytes.GetBytes(16)); } public static byte[] smethod_8(byte[] byte1, string string0) { - var memoryStream = new MemoryStream(); + MemoryStream memoryStream = new MemoryStream(); smethod_7(byte1, memoryStream, string0); return memoryStream.ToArray(); } @@ -404,14 +404,14 @@ public static void WriteAllBytes(string fileName, byte[] bytes) public static string smethod_10(string string0) { - var length = string0.LastIndexOfAny(new[] {'\\', '/'}) + 1; + int length = string0.LastIndexOfAny(new[] {'\\', '/'}) + 1; return string0.Substring(0, length); } public static string GetFileName(string path, int dotsInExtension) { - var i = path.LastIndexOfAny(new[] {'\\', '/'}) + 1; - var text = path.Substring(i); + int i = path.LastIndexOfAny(new[] {'\\', '/'}) + 1; + string text = path.Substring(i); try { if (dotsInExtension == -1) @@ -447,10 +447,10 @@ public static string GetExtension(string string0, int int0) string result; try { - var text = string0.Substring(string0.IndexOf('.') + 1); + string text = string0.Substring(string0.IndexOf('.') + 1); if (int0 != 0) { - var array = text.Split(new[] + string[] array = text.Split(new[] { '.' }, StringSplitOptions.RemoveEmptyEntries); @@ -467,7 +467,7 @@ public static string GetExtension(string string0, int int0) public static string OpenOrSaveFile(string title, string filter, bool isOpenDialog, string fileName = "") { - var fileDialog = isOpenDialog ? (FileDialog) new OpenFileDialog() : new SaveFileDialog(); + FileDialog fileDialog = isOpenDialog ? (FileDialog) new OpenFileDialog() : new SaveFileDialog(); fileDialog.Title = title; fileDialog.FileName = fileName; fileDialog.CheckPathExists = true; @@ -485,13 +485,13 @@ public static string OpenFile(string title, string filter) public static List CheckFile(string string0, string string1, bool bool2) { - var array = string1.Split(new[] + string[] array = string1.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); - var fileList = new List(); - var array2 = array; - foreach (var searchPattern in array2) + List fileList = new List(); + string[] array2 = array; + foreach (string searchPattern in array2) { fileList.AddRange(Directory.GetFiles(string0, searchPattern, bool2 ? SearchOption.TopDirectoryOnly : SearchOption.AllDirectories)); @@ -532,8 +532,8 @@ public static int[] smethod_21(ICollection icollection0) public static int[] smethod_22(List list0) { - var array = new int[list0.Count / 4]; - for (var i = 0; i < array.Length; i++) + int[] array = new int[list0.Count / 4]; + for (int i = 0; i < array.Length; i++) { array[i] = smethod_25(list0.GetRange(i * 4, 4).ToArray()); } @@ -551,7 +551,7 @@ public static int smethod_24(byte[] byte1, bool bool2) { return BytesToInt(byte1); } - var num = byte1.Length; + int num = byte1.Length; switch (num) { case 2: @@ -584,8 +584,8 @@ public static int ReverseEndianness(int int0) public static short BytesToShort(byte[] byte1) { short num = 0; - var num2 = Math.Min(2, byte1.Length); - for (var i = 0; i < num2; i++) + int num2 = Math.Min(2, byte1.Length); + for (int i = 0; i < num2; i++) { num |= (short) (byte1[i] << 8 - 8 * i); } @@ -594,9 +594,9 @@ public static short BytesToShort(byte[] byte1) public static int BytesToInt(byte[] byte1) { - var num = 0; - var num2 = Math.Min(4, byte1.Length); - for (var i = 0; i < num2; i++) + int num = 0; + int num2 = Math.Min(4, byte1.Length); + for (int i = 0; i < num2; i++) { num |= byte1[i] << 24 - 8 * i; } @@ -621,8 +621,8 @@ public static byte[] ReadBytes(string path) public static byte[] ReadBytes(Stream stream0) { - var binaryReader = new BinaryReader(stream0); - var result = binaryReader.ReadBytes((int) stream0.Length); + BinaryReader binaryReader = new BinaryReader(stream0); + byte[] result = binaryReader.ReadBytes((int) stream0.Length); binaryReader.Close(); return result; } @@ -648,7 +648,7 @@ public static string ValToHex32Bit(int int0) public static string ValToPaddedHex(int val, int halfPadding) { - var text = val.ToString("x"); + string text = val.ToString("x"); while (text.Length < halfPadding * 2) { text = "0" + text; @@ -679,7 +679,7 @@ public static int GetQbKey(Stream stream, bool negateCrc, bool reverseEndianness } stream.Position = 0L; ResetKey(); - var array = new byte[4096]; + byte[] array = new byte[4096]; int int_; while ((int_ = stream.Read(array, 0, array.Length)) != 0) { @@ -742,7 +742,7 @@ public static byte[] HashStream(Stream stream0) public static byte[] HashStream(HashAlgorithm hashAlgorithm0, Stream stream0) { - var result = hashAlgorithm0.ComputeHash(stream0); + byte[] result = hashAlgorithm0.ComputeHash(stream0); hashAlgorithm0.Clear(); stream0.Close(); return result; @@ -765,13 +765,13 @@ public static void smethod_46(Stream stream0, string string0) public static void smethod_47(Stream stream0, Stream stream1) { - var count = 256; - var buffer = new byte[256]; + int count = 256; + byte[] buffer = new byte[256]; if (stream0.CanSeek && stream0.Position != 0L) { stream0.Position = 0L; } - for (var i = stream0.Read(buffer, 0, count); i > 0; i = stream0.Read(buffer, 0, count)) + for (int i = stream0.Read(buffer, 0, count); i > 0; i = stream0.Read(buffer, 0, count)) { stream1.Write(buffer, 0, i); } @@ -786,7 +786,7 @@ public static Bitmap ScaleImageFixedRatio(Image image, Size size) public static Bitmap ScaleImageFixedRatio(Image image, int width, int height) { - var size = ScaleDimensions(image.Width, image.Height, width, height); + Size size = ScaleDimensions(image.Width, image.Height, width, height); return ScaleImage(image, size.Width, size.Height); } @@ -797,19 +797,19 @@ public static Bitmap ScaleImage(Image image, Size size) public static Bitmap ScaleImage(Image image, int width, int height) { - var bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb); - var graphics = Graphics.FromImage(bitmap); + Bitmap bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb); + Graphics graphics = Graphics.FromImage(bitmap); graphics.SmoothingMode = SmoothingMode.HighQuality; graphics.CompositingQuality = CompositingQuality.HighQuality; graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; - var destRect = new Rectangle(0, 0, bitmap.Width, bitmap.Height); + Rectangle destRect = new Rectangle(0, 0, bitmap.Width, bitmap.Height); graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel); return bitmap; } private static Size ScaleDimensions(int width1, int height1, int width2, int height2) { - var num = ((decimal) height1) / width1; + decimal num = ((decimal) height1) / width1; if (height2 > width2) { width2 = decimal.ToInt32(height2 / num); @@ -839,14 +839,14 @@ public static bool smethod_55(ICollection icollection0, ICollection ico { return false; } - var enumerator = icollection0.GetEnumerator(); - var enumerator2 = icollection1.GetEnumerator(); + IEnumerator enumerator = icollection0.GetEnumerator(); + IEnumerator enumerator2 = icollection1.GetEnumerator(); enumerator.Reset(); enumerator2.Reset(); - var num = 0; + int num = 0; while (num < int0 && enumerator.MoveNext() && enumerator2.MoveNext()) { - var current = enumerator.Current; + T current = enumerator.Current; if (current.CompareTo(enumerator2.Current) != 0 ^ bool2) { return false; @@ -858,11 +858,11 @@ public static bool smethod_55(ICollection icollection0, ICollection ico public static void smethod_56(IList ilist0) { - var arrayList = new ArrayList(ilist0); - var num = 0; + ArrayList arrayList = new ArrayList(ilist0); + int num = 0; while (arrayList.Count != 0) { - var obj = arrayList[Random0.Next(0, arrayList.Count)]; + object obj = arrayList[Random0.Next(0, arrayList.Count)]; ilist0[num++] = obj; arrayList.Remove(obj); } diff --git a/GHNamespace9/QbEditor.cs b/GHNamespace9/QbEditor.cs index 2773a57..7059a00 100644 --- a/GHNamespace9/QbEditor.cs +++ b/GHNamespace9/QbEditor.cs @@ -3,7 +3,6 @@ namespace GHNamespace9 { // Base class of some other classes that appear to edit qb files - public abstract class QbEditor : IEquatable { public bool method_0() diff --git a/GHNamespace9/Stream26.cs b/GHNamespace9/Stream26.cs index b6bd44a..610fb24 100644 --- a/GHNamespace9/Stream26.cs +++ b/GHNamespace9/Stream26.cs @@ -192,7 +192,7 @@ public void WriteByteArray(byte[] array, bool writeBackwards) { if (writeBackwards) { - for (var i = array.Length - 1; i >= 0; i--) + for (int i = array.Length - 1; i >= 0; i--) { Stream.WriteByte(array[i]); } @@ -203,7 +203,7 @@ public void WriteByteArray(byte[] array, bool writeBackwards) public void WriteEnumerableInts(IEnumerable values, bool reverseEndianness) { - foreach (var current in values) + foreach (int current in values) { WriteInt(current, reverseEndianness); } @@ -221,7 +221,7 @@ public int ReadInt() public int ReadInt(bool reverseEndianness) { - var array = ReadBytes(4, false); + byte[] array = ReadBytes(4, false); if (!(reverseEndianness ^ BitConverter.IsLittleEndian)) { return KeyGenerator.BytesToInt(array); @@ -236,10 +236,10 @@ public float ReadFloat() public float ReadFloat(bool reverseEndianness) { - var array = ReadBytes(4, false); + byte[] array = ReadBytes(4, false); if (!(reverseEndianness ^ BitConverter.IsLittleEndian)) { - var array2 = array; + byte[] array2 = array; array = new[] { array2[3], @@ -258,7 +258,7 @@ public short ReadShort() public short ReadShort(bool reverseEndianness) { - var array = ReadBytes(2, false); + byte[] array = ReadBytes(2, false); if (!(reverseEndianness ^ BitConverter.IsLittleEndian)) { return KeyGenerator.BytesToShort(array); @@ -273,7 +273,7 @@ public ushort ReadUShort() public ushort ReadUShort(bool reverseEndianness) { - var array = ReadBytes(2, false); + byte[] array = ReadBytes(2, false); if (!(reverseEndianness ^ BitConverter.IsLittleEndian)) { return (ushort) KeyGenerator.BytesToShort(array); @@ -283,8 +283,8 @@ public ushort ReadUShort(bool reverseEndianness) public string ReadAsciiString() { - var list = new List(); - for (var item = ReadByte2(); item != 0; item = ReadByte2()) + List list = new List(); + for (byte item = ReadByte2(); item != 0; item = ReadByte2()) { list.Add(item); } @@ -303,9 +303,9 @@ public string ReadUnicodeString() public string ReadUnicodeString(bool reverseEndianness) { - var list = new List(); - var b = ReadByte2(); - var b2 = ReadByte2(); + List list = new List(); + byte b = ReadByte2(); + byte b2 = ReadByte2(); while (b != 0 || b2 != 0) { list.Add(b); @@ -327,7 +327,7 @@ public byte[] ReadBytes(int count) public byte[] ReadBytes(int count, bool reverseEndianness) { - var array = new byte[count]; + byte[] array = new byte[count]; if (Stream.Read(array, 0, count) == 0) { throw new EndOfStreamException(); diff --git a/GHNamespace9/Struct78.cs b/GHNamespace9/Struct78.cs index 88abc72..06cbc57 100644 --- a/GHNamespace9/Struct78.cs +++ b/GHNamespace9/Struct78.cs @@ -21,8 +21,8 @@ object ICloneable.Clone() public float method_0() { - var num = Float0; - var num2 = Float1; + float num = Float0; + float num2 = Float1; return (float) Math.Sqrt(num * num + num2 * num2); } @@ -38,9 +38,8 @@ public override int GetHashCode() public override bool Equals(object obj) { - if (obj is Struct78) + if (obj is Struct78 struct78) { - var struct78 = (Struct78) obj; return smethod_0(this, struct78); } return false; diff --git a/GHNamespace9/Struct79.cs b/GHNamespace9/Struct79.cs index cd715ba..e97cee4 100644 --- a/GHNamespace9/Struct79.cs +++ b/GHNamespace9/Struct79.cs @@ -21,8 +21,8 @@ object ICloneable.Clone() public double method_0() { - var num = Double0; - var num2 = Double1; + double num = Double0; + double num2 = Double1; return Math.Sqrt(num * num + num2 * num2); } @@ -38,9 +38,8 @@ public override int GetHashCode() public override bool Equals(object obj) { - if (obj is Struct79) + if (obj is Struct79 struct79) { - var struct79 = (Struct79) obj; return smethod_0(this, struct79); } return false; diff --git a/GHNamespace9/Struct80.cs b/GHNamespace9/Struct80.cs index 4609aea..5b0cbe3 100644 --- a/GHNamespace9/Struct80.cs +++ b/GHNamespace9/Struct80.cs @@ -21,7 +21,7 @@ public int CompareTo(object target) { throw new ArgumentException("Value is not a SystemTools.Int24 or System.Int32"); } - var num = (int) target; + int num = (int) target; if (Int2 == num) { return 0; diff --git a/GHNamespace9/zzCollection1.cs b/GHNamespace9/zzCollection1.cs index 4b274cb..cd1c537 100644 --- a/GHNamespace9/zzCollection1.cs +++ b/GHNamespace9/zzCollection1.cs @@ -56,7 +56,7 @@ public bool MoveNext() } while (_int0 < _class2360._int1) { - var num = _int0++; + int num = _int0++; if (_class2360.method_4(num) != 0) { _gparam0 = _class2360._gparam0[num]; @@ -135,8 +135,8 @@ private static bool smethod_0(int int1) { if ((int1 & 1) != 0) { - var num = (int) Math.Sqrt(int1); - for (var i = 3; i < num; i += 2) + int num = (int) Math.Sqrt(int1); + for (int i = 3; i < num; i += 2) { if (int1 % i == 0) { @@ -150,7 +150,7 @@ private static bool smethod_0(int int1) private static int smethod_1(int int1) { - for (var i = (int1 & -2) - 1; i < Int32.MaxValue; i += 2) + for (int i = (int1 & -2) - 1; i < Int32.MaxValue; i += 2) { if (smethod_0(i)) { @@ -162,7 +162,7 @@ private static int smethod_1(int int1) public static int smethod_2(int int1) { - for (var i = 0; i < OddPrimeSequence.Length; i++) + for (int i = 0; i < OddPrimeSequence.Length; i++) { if (int1 <= OddPrimeSequence[i]) { @@ -215,14 +215,13 @@ public ZzCollection1(IEnumerable ienumerable0, IEqualityComparer iequality { throw new ArgumentNullException("collection"); } - var int_ = 0; - var collection = ienumerable0 as ICollection; - if (collection != null) + int int_ = 0; + if (ienumerable0 is ICollection collection) { int_ = collection.Count; } method_0(int_, iequalityComparer1); - foreach (var current in ienumerable0) + foreach (T current in ienumerable0) { vmethod_0(current); } @@ -286,8 +285,8 @@ public void method_2(T[] gparam1, int int6, int int7) { throw new ArgumentException("Destination array cannot hold the requested elements!"); } - var num = 0; - var num2 = int6 + int7; + int num = 0; + int num2 = int6 + int7; while (num < _int1 && int6 < num2) { if (method_4(num) != 0) @@ -311,22 +310,22 @@ public void Clear() private void method_3() { - var num = Class237.smethod_2(_int0.Length << 1 | 1); - var array = new int[num]; - var array2 = new Struct81[num]; - for (var i = 0; i < _int0.Length; i++) + int num = Class237.smethod_2(_int0.Length << 1 | 1); + int[] array = new int[num]; + Struct81[] array2 = new Struct81[num]; + for (int i = 0; i < _int0.Length; i++) { - for (var num2 = _int0[i] - 1; num2 != -1; num2 = _struct810[num2].Int1) + for (int num2 = _int0[i] - 1; num2 != -1; num2 = _struct810[num2].Int1) { - var num3 = array2[num2].Int0 = method_5(_gparam0[num2]); - var num4 = (num3 & 2147483647) % num; + int num3 = array2[num2].Int0 = method_5(_gparam0[num2]); + int num4 = (num3 & 2147483647) % num; array2[num2].Int1 = array[num4] - 1; array[num4] = num2 + 1; } } _int0 = array; _struct810 = array2; - var destinationArray = new T[num]; + T[] destinationArray = new T[num]; Array.Copy(_gparam0, 0, destinationArray, 0, _int1); _gparam0 = destinationArray; _int4 = (int) (num * 0.9f); @@ -353,8 +352,8 @@ void ICollection.Add(T item) public bool vmethod_0(T gparam1) { - var num = method_5(gparam1); - var num2 = (num & 2147483647) % _int0.Length; + int num = method_5(gparam1); + int num2 = (num & 2147483647) % _int0.Length; if (method_6(num2, num, gparam1)) { return false; @@ -364,7 +363,7 @@ public bool vmethod_0(T gparam1) method_3(); num2 = (num & 2147483647) % _int0.Length; } - var num3 = _int2; + int num3 = _int2; if (num3 == -1) { num3 = _int1++; @@ -383,15 +382,15 @@ public bool vmethod_0(T gparam1) public bool Contains(T item) { - var num = method_5(item); - var int_ = (num & 2147483647) % _int0.Length; + int num = method_5(item); + int int_ = (num & 2147483647) % _int0.Length; return method_6(int_, num, item); } private bool method_6(int int6, int int7, T gparam1) { Struct81 @struct; - for (var num = _int0[int6] - 1; num != -1; num = @struct.Int1) + for (int num = _int0[int6] - 1; num != -1; num = @struct.Int1) { @struct = _struct810[num]; if (@struct.Int0 == int7 && ((int7 != -2147483648 || (gparam1 != null && _gparam0[num] != null)) @@ -406,17 +405,17 @@ private bool method_6(int int6, int int7, T gparam1) public bool Remove(T item) { - var num = method_5(item); - var num2 = (num & 2147483647) % _int0.Length; - var num3 = _int0[num2] - 1; + int num = method_5(item); + int num2 = (num & 2147483647) % _int0.Length; + int num3 = _int0[num2] - 1; if (num3 == -1) { return false; } - var num4 = -1; + int num4 = -1; do { - var @struct = _struct810[num3]; + Struct81 @struct = _struct810[num3]; if (@struct.Int0 == num) { if ((num != -2147483648 || (item != null && _gparam0[num3] != null)) diff --git a/GHNamespace9/zzList240.cs b/GHNamespace9/zzList240.cs index 82dc419..5be569c 100644 --- a/GHNamespace9/zzList240.cs +++ b/GHNamespace9/zzList240.cs @@ -9,7 +9,7 @@ private class MyComparer : IComparer { public int Compare(object x, object y) { - var comparable = x as IComparable; + IComparable comparable = x as IComparable; return comparable.CompareTo(y); } } @@ -47,8 +47,8 @@ public object this[int index] { if (method_0(value)) { - var obj = (index > 0) ? _arrayList0[index - 1] : null; - var obj2 = (index < Count - 1) ? _arrayList0[index + 1] : null; + object obj = (index > 0) ? _arrayList0[index - 1] : null; + object obj2 = (index < Count - 1) ? _arrayList0[index + 1] : null; if ((obj != null && _icomparer0.Compare(obj, value) > 0) || (obj2 != null && _icomparer0.Compare(value, obj2) > 0)) { @@ -84,13 +84,13 @@ public ZzList240(IComparer icomparer1, int int0) public int Add(object value) { - var result = -1; + int result = -1; if (method_0(value)) { if (_bool2) { - var num = IndexOf(value); - var num2 = (num >= 0) ? num : (-num - 1); + int num = IndexOf(value); + int num2 = (num >= 0) ? num : (-num - 1); if (num2 >= Count) { _arrayList0.Add(value); @@ -148,8 +148,8 @@ public void Insert(int index, object value) { if (method_0(value)) { - var obj = _arrayList0[index]; - var obj2 = (index > 0) ? _arrayList0[index - 1] : null; + object obj = _arrayList0[index]; + object obj2 = (index > 0) ? _arrayList0[index - 1] : null; if ((obj2 != null && _icomparer0.Compare(obj2, value) > 0) || (obj != null && _icomparer0.Compare(value, obj) > 0)) { @@ -200,8 +200,8 @@ public object Clone() public override string ToString() { - var text = "{"; - for (var i = 0; i < _arrayList0.Count; i++) + string text = "{"; + for (int i = 0; i < _arrayList0.Count; i++) { text = text + _arrayList0[i] + ((i != _arrayList0.Count - 1) ? "; " : "}"); } @@ -210,12 +210,12 @@ public override string ToString() public override bool Equals(object obj) { - var @class = (ZzList240) obj; + ZzList240 @class = (ZzList240) obj; if (@class.Count != Count) { return false; } - for (var i = 0; i < Count; i++) + for (int i = 0; i < Count; i++) { if (!@class[i].Equals(this[i])) { diff --git a/GHNamespace9/zzListBox238.cs b/GHNamespace9/zzListBox238.cs index 3e62b18..bf56869 100644 --- a/GHNamespace9/zzListBox238.cs +++ b/GHNamespace9/zzListBox238.cs @@ -67,25 +67,25 @@ public void method_2(bool bool5) public object[] imethod_3() { - var array = new object[SelectedItems.Count]; + object[] array = new object[SelectedItems.Count]; SelectedItems.CopyTo(array, 0); return array; } public void method_3() { - for (var i = SelectedIndices.Count - 1; i >= 0; i--) + for (int i = SelectedIndices.Count - 1; i >= 0; i--) { - var index = SelectedIndices[i]; + int index = SelectedIndices[i]; Items.RemoveAt(index); } } public void imethod_4(ref int int1) { - for (var i = SelectedIndices.Count - 1; i >= 0; i--) + for (int i = SelectedIndices.Count - 1; i >= 0; i--) { - var num = SelectedIndices[i]; + int num = SelectedIndices[i]; Items.RemoveAt(num); if (num < int1) { @@ -96,11 +96,7 @@ public void imethod_4(ref int int1) public void imethod_5(EventArgs2 eventArgs20) { - var eventHandler = _eventHandler0; - if (eventHandler != null) - { - eventHandler(this, eventArgs20); - } + _eventHandler0?.Invoke(this, eventArgs20); } public void method_4(bool bool5) @@ -117,12 +113,12 @@ public void method_5(bool bool5) public void method_6(EventHandler eventHandler1) { - var eventHandler = _eventHandler0; + EventHandler eventHandler = _eventHandler0; EventHandler eventHandler2; do { eventHandler2 = eventHandler; - var value = (EventHandler) Delegate.Combine(eventHandler2, eventHandler1); + EventHandler value = (EventHandler) Delegate.Combine(eventHandler2, eventHandler1); eventHandler = Interlocked.CompareExchange(ref _eventHandler0, value, eventHandler2); } while (eventHandler != eventHandler2); } @@ -131,29 +127,29 @@ protected override void OnDragDrop(DragEventArgs drgevent) { base.OnDragDrop(drgevent); _class2300.method_1(); - var @interface = drgevent.Data.GetData("IDragDropSource") as INterface11; - var array = @interface.imethod_3(); - var sorted = Sorted; + INterface11 @interface = drgevent.Data.GetData("IDragDropSource") as INterface11; + object[] array = @interface.imethod_3(); + bool sorted = Sorted; Sorted = false; - var num = method_9(drgevent.Y); - var num2 = num; + int num = method_9(drgevent.Y); + int num2 = num; if (num >= Items.Count) { Items.AddRange(array); } else { - var array2 = array; - for (var i = 0; i < array2.Length; i++) + object[] array2 = array; + for (int i = 0; i < array2.Length; i++) { - var item = array2[i]; + object item = array2[i]; Items.Insert(num++, item); } } Enum34 @enum; if (drgevent.Effect == DragDropEffects.Move) { - var num3 = num2; + int num3 = num2; @interface.imethod_4(ref num3); if (@interface == this) { @@ -176,7 +172,7 @@ protected override void OnDragDrop(DragEventArgs drgevent) } else if (SelectionMode != SelectionMode.None) { - for (var j = num2; j < num2 + array.Length; j++) + for (int j = num2; j < num2 + array.Length; j++) { SetSelected(j, true); } @@ -209,7 +205,7 @@ protected override void OnDragOver(DragEventArgs drgevent) { return; } - var num = method_9(drgevent.Y); + int num = method_9(drgevent.Y); if (num != _class2300.method_0()) { _class2300.method_1(); @@ -232,12 +228,12 @@ protected override void OnDragLeave(EventArgs e) protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); - var num = IndexFromPoint(e.Location); + int num = IndexFromPoint(e.Location); if (num >= 0 && MouseButtons == MouseButtons.Left && (_bool1 || _bool2 || _bool3) && (GetSelected(num) || ModifierKeys == Keys.Shift)) { method_7(num); - var dragSize = SystemInformation.DragSize; + Size dragSize = SystemInformation.DragSize; _rectangle0 = new Rectangle(new Point(e.X - dragSize.Width / 2, e.Y - dragSize.Height / 2), dragSize); } } @@ -270,10 +266,10 @@ private void method_7(int int1) Array.IndexOf(_int0, int1) >= 0) { _bool0 = true; - var array = _int0; - for (var i = 0; i < array.Length; i++) + int[] array = _int0; + for (int i = 0; i < array.Length; i++) { - var index = array[i]; + int index = array[i]; SetSelected(index, true); } SetSelected(int1, true); @@ -285,7 +281,7 @@ private void method_8() { if (!_bool0 && SelectionMode == SelectionMode.MultiExtended) { - var selectedIndices = SelectedIndices; + SelectedIndexCollection selectedIndices = SelectedIndices; if (_int0.Length != selectedIndices.Count) { _int0 = new int[selectedIndices.Count]; @@ -296,7 +292,7 @@ private void method_8() private int method_9(int int1) { - var num = PointToClient(new Point(0, int1)).Y; + int num = PointToClient(new Point(0, int1)).Y; if (num < 0) { num = 0; @@ -305,17 +301,17 @@ private int method_9(int int1) { num = ClientRectangle.Bottom - 1; } - var num2 = IndexFromPoint(0, num); + int num2 = IndexFromPoint(0, num); if (num2 == -1) { return Items.Count; } - var itemRectangle = GetItemRectangle(num2); + Rectangle itemRectangle = GetItemRectangle(num2); if (num > itemRectangle.Top + itemRectangle.Height / 2) { num2++; } - var num3 = TopIndex + ClientRectangle.Height / ItemHeight; + int num3 = TopIndex + ClientRectangle.Height / ItemHeight; if (num2 > num3) { return num3; @@ -325,9 +321,8 @@ private int method_9(int int1) private DragDropEffects method_10(DragEventArgs dragEventArgs0) { - var result = DragDropEffects.None; - var @interface = dragEventArgs0.Data.GetData("IDragDropSource") as INterface11; - if (@interface != null && _string0 == @interface.imethod_0()) + DragDropEffects result = DragDropEffects.None; + if (dragEventArgs0.Data.GetData("IDragDropSource") is INterface11 @interface && _string0 == @interface.imethod_0()) { if (@interface == this) { diff --git a/GHNamespaceA/About.cs b/GHNamespaceA/About.cs index 10f284e..202b4c0 100644 --- a/GHNamespaceA/About.cs +++ b/GHNamespaceA/About.cs @@ -38,11 +38,11 @@ public About() public string method_0() { - var customAttributes = Assembly.GetExecutingAssembly() + object[] customAttributes = Assembly.GetExecutingAssembly() .GetCustomAttributes(typeof(AssemblyTitleAttribute), false); if (customAttributes.Length > 0) { - var assemblyTitleAttribute = (AssemblyTitleAttribute) customAttributes[0]; + AssemblyTitleAttribute assemblyTitleAttribute = (AssemblyTitleAttribute) customAttributes[0]; if (assemblyTitleAttribute.Title != "") { return assemblyTitleAttribute.Title; @@ -58,7 +58,7 @@ public string method_1() public string method_2() { - var customAttributes = Assembly.GetExecutingAssembly() + object[] customAttributes = Assembly.GetExecutingAssembly() .GetCustomAttributes(typeof(AssemblyProductAttribute), false); if (customAttributes.Length == 0) { @@ -69,7 +69,7 @@ public string method_2() public string method_3() { - var customAttributes = Assembly.GetExecutingAssembly() + object[] customAttributes = Assembly.GetExecutingAssembly() .GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); if (customAttributes.Length == 0) { @@ -80,7 +80,7 @@ public string method_3() public string method_4() { - var customAttributes = Assembly.GetExecutingAssembly() + object[] customAttributes = Assembly.GetExecutingAssembly() .GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); if (customAttributes.Length == 0) { @@ -100,7 +100,7 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { - var componentResourceManager = new ComponentResourceManager(typeof(About)); + ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(About)); _tableLayoutPanel = new TableLayoutPanel(); _logoPictureBox = new PictureBox(); _labelProductName = new Label(); diff --git a/GHNamespaceA/CustomMenuCreator.cs b/GHNamespaceA/CustomMenuCreator.cs index 755a2c0..44a3f5c 100644 --- a/GHNamespaceA/CustomMenuCreator.cs +++ b/GHNamespaceA/CustomMenuCreator.cs @@ -32,51 +32,51 @@ public override void CreateCustomMenu() { Console.WriteLine("Creating Custom Menu."); _zzQbPak.zzCreateQbFileFrom("scripts\\guitar\\custom_menu\\guitar_custom_menu.qb", - zzEmbeddedResourceDB.unpackQbFile("guitar_custom_menu")); + ZzEmbeddedResourceDB.unpackQbFile("guitar_custom_menu")); _zzQbPak.zzCreateQbFileFrom("scripts\\guitar\\custom_menu\\guitar_custom_gem_scale.qb", - zzEmbeddedResourceDB.unpackQbFile("guitar_custom_gem_scale")); + ZzEmbeddedResourceDB.unpackQbFile("guitar_custom_gem_scale")); _zzQbPak.zzCreateQbFileFrom("scripts\\guitar\\custom_menu\\guitar_custom_menu_credits.qb", - zzEmbeddedResourceDB.unpackQbFile("guitar_custom_menu_credits")); + ZzEmbeddedResourceDB.unpackQbFile("guitar_custom_menu_credits")); _zzQbPak.zzCreateQbFileFrom("scripts\\guitar\\custom_menu\\guitar_custom_menu_cutoff_viewer.qb", - zzEmbeddedResourceDB.unpackQbFile("guitar_custom_menu_cutoff_viewer")); + ZzEmbeddedResourceDB.unpackQbFile("guitar_custom_menu_cutoff_viewer")); _zzQbPak.zzCreateQbFileFrom("scripts\\guitar\\custom_menu\\guitar_custom_menu_gfx_options.qb", - zzEmbeddedResourceDB.unpackQbFile("guitar_custom_menu_gfx_options")); + ZzEmbeddedResourceDB.unpackQbFile("guitar_custom_menu_gfx_options")); _zzQbPak.zzCreateQbFileFrom("scripts\\guitar\\custom_menu\\guitar_custom_menu_setlist_switcher.qb", - zzEmbeddedResourceDB.unpackQbFile("guitar_custom_menu_setlist_switcher")); + ZzEmbeddedResourceDB.unpackQbFile("guitar_custom_menu_setlist_switcher")); ZzGenericNode1 activeQbFile = _zzQbPak.ZzGetNode1(_isGHA ? "scripts\\guitar\\menu\\menu_main.qb" : "scripts\\guitar\\guitar_menu.qb"); - zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("create_main_menu"))); + ZzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("create_main_menu"))); activeQbFile = _zzQbPak.ZzGetNode1("scripts\\guitar\\guitar_progression.qb"); - zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("get_progression_globals"))); + ZzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("get_progression_globals"))); activeQbFile = _zzQbPak.ZzGetNode1("scripts\\guitar\\guitar_gems.qb"); - zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("load_venue"))); - zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("start_gem_scroller"))); - zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("kill_gem_scroller"))); + ZzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("load_venue"))); + ZzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("start_gem_scroller"))); + ZzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("kill_gem_scroller"))); activeQbFile = _zzQbPak.ZzGetNode1("scripts\\guitar\\guitar_events.qb"); - zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("guitarevent_songwon_spawned"))); + ZzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("guitarevent_songwon_spawned"))); activeQbFile = _zzQbPak.ZzGetNode1("scripts\\game\\net\\guitar_net.qb"); - zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("net_write_single_player_stats"))); + ZzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("net_write_single_player_stats"))); activeQbFile = _zzQbPak.ZzGetNode1("scripts\\guitar\\guitar_globaltags.qb"); - zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("setup_globaltags"))); - zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("setup_songtags"))); - zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("push_bandtags"))); + ZzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("setup_globaltags"))); + ZzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("setup_songtags"))); + ZzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("push_bandtags"))); activeQbFile = _zzQbPak.ZzGetNode1("scripts\\guitar\\menu\\menu_credits.qb"); - zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("scrolling_list_add_item"))); + ZzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("scrolling_list_add_item"))); if (!_isGHA) { - zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("start_team_photos"))); + ZzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("start_team_photos"))); } if (_isGHA) { activeQbFile = _zzQbPak.ZzGetNode1("scripts\\guitar\\custom_menu\\guitar_custom_menu_cutoff_viewer.qb"); - zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode( + ZzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode( new ScriptRootNode("custom_menu_cutoff_viewer_create_paper"))); - zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode( + ZzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode( new ScriptRootNode("custom_menu_cutoff_viewer_create_poster"))); } activeQbFile = _zzQbPak.ZzGetNode1("scripts\\guitar\\menu\\main_menu_flow.qb"); - var customMenuFS = new StructureHeaderNode(); + StructureHeaderNode customMenuFS = new StructureHeaderNode(); customMenuFS.addChild(new StructItemQbKey("action", "select_custom_menu")); customMenuFS.addChild(new StructItemQbKey("flow_state", "custom_menu_fs")); customMenuFS.addChild(new StructItemQbKey(0, "transition_right")); diff --git a/GHNamespaceA/GameSettingsChecker.cs b/GHNamespaceA/GameSettingsChecker.cs index e9661ea..aa9226d 100644 --- a/GHNamespaceA/GameSettingsChecker.cs +++ b/GHNamespaceA/GameSettingsChecker.cs @@ -43,14 +43,14 @@ public GameSettingsChecker(ZzPakNode2 class3180) { return; } - var @class = new ZzGenericNode1(HashPath, + ZzGenericNode1 @class = new ZzGenericNode1(HashPath, KeyGenerator.smethod_8(class3180.method_12(HashPath), "MaC39SubInfo1245")); Version = new Version(@class.zzFindNode(new UnicodeRootNode("version")).method_7()); - var array = @class.zzFindNode(new ArrayPointerRootNode("date")).method_7().method_7(); + float[] array = @class.zzFindNode(new ArrayPointerRootNode("date")).method_7().method_7(); Date = new DateTime((int) array[0], (int) array[1], (int) array[2]); UnkBuffer = @class.zzFindNode(new ArrayPointerRootNode("hash")).method_7().method_7(); class3180.method_7(HashPath); - using (var stream = class3180.method_17()) + using (Stream26 stream = class3180.method_17()) { stream.Position = 0L; // Ignore checks for external tools modifying game settings because we're not children who will dictate how people can play their game @@ -77,17 +77,17 @@ public static void SignHash(ZzPakNode2 pakNode) { pakNode.method_7(HashPath); } - var @class = new ZzGenericNode1(); + ZzGenericNode1 @class = new ZzGenericNode1(); @class.addChild(new UnicodeRootNode("version", HashPath, Assembly.GetExecutingAssembly().GetName().Version.ToString())); - using (var stream = pakNode.method_17()) + using (Stream26 stream = pakNode.method_17()) { stream.Position = 0L; @class.addChild(new ArrayPointerRootNode("hash", HashPath, new IntegerArrayNode(KeyGenerator.smethod_21(KeyGenerator.HashStream(stream.Stream))))); } GC.Collect(); - var now = DateTime.Now; + DateTime now = DateTime.Now; @class.addChild(new ArrayPointerRootNode("date", HashPath, new FloatArrayNode(new[] { now.Year, diff --git a/GHNamespaceA/Main.cs b/GHNamespaceA/Main.cs index 02f4994..1fc7171 100644 --- a/GHNamespaceA/Main.cs +++ b/GHNamespaceA/Main.cs @@ -11,8 +11,7 @@ public static class Start [STAThread] private static void Main(string[] args) { - bool flag; - var obj = new Mutex(true, "GHTCP", out flag); + Mutex obj = new Mutex(true, "GHTCP", out bool flag); if (!flag) { MessageBox.Show("GH3 Control Panel+ is already running."); diff --git a/GHNamespaceA/QbDatabaseInitialModifier.cs b/GHNamespaceA/QbDatabaseInitialModifier.cs index f900662..5c0db15 100644 --- a/GHNamespaceA/QbDatabaseInitialModifier.cs +++ b/GHNamespaceA/QbDatabaseInitialModifier.cs @@ -8,7 +8,6 @@ namespace GHNamespaceA { //Changes default high score names + a few other things like mem card limit - public class QbDatabaseInitialModifier : QbEditor { private readonly ZzPakNode2 _pakNode; @@ -53,11 +52,11 @@ public override void CreateCustomMenu() }; KeyGenerator.smethod_56(array); Console.WriteLine("Randomized Names:"); - var num = 0; + int num = 0; while (num < 5 && !_qbDatabaseAlreadyEdited) { Console.WriteLine(array[num]); - var class2 = @class.zzFindNode(new UnicodeStructureNode("name" + (num + 1))); + UnicodeStructureNode class2 = @class.zzFindNode(new UnicodeStructureNode("name" + (num + 1))); if (class2.method_8().Equals(_bool1 ? array3[num] : array2[num])) { class2.method_9(array[num]); @@ -98,9 +97,9 @@ public override void CreateCustomMenu() { ZzGenericNode1 class4 = _pakNode.ZzGetNode1("scripts\\guitar\\menu\\menu_setlist.qb"); Console.WriteLine("Changing Setlist Scroller."); - zzEmbeddedResourceDB.unpackQbScriptTo(class4.zzFindNode(new ScriptRootNode("setlist_scroll"))); + ZzEmbeddedResourceDB.unpackQbScriptTo(class4.zzFindNode(new ScriptRootNode("setlist_scroll"))); Console.WriteLine("Changing Tier Name Display."); - zzEmbeddedResourceDB.unpackQbScriptTo(class4.zzFindNode(new ScriptRootNode("create_sl_assets"))); + ZzEmbeddedResourceDB.unpackQbScriptTo(class4.zzFindNode(new ScriptRootNode("create_sl_assets"))); } if (!_qbDatabaseAlreadyEdited) { diff --git a/GHNamespaceA/SongData.cs b/GHNamespaceA/SongData.cs index 6d92368..d2b43b6 100644 --- a/GHNamespaceA/SongData.cs +++ b/GHNamespaceA/SongData.cs @@ -945,8 +945,10 @@ public SongData(Gh3Songlist gh3Songlist1) Bool0 = true; EnableAudioButtons(); _gh3Songlist0 = gh3Songlist1; - _timer0 = new Timer(); - _timer0.Interval = 30; + _timer0 = new Timer + { + Interval = 30 + }; _timer0.Tick += timer_0_Tick; } @@ -961,8 +963,10 @@ public SongData(Gh3Songlist gh3Songlist1, bool forceRb3) Bool0 = true; EnableAudioButtons(); _gh3Songlist0 = gh3Songlist1; - _timer0 = new Timer(); - _timer0.Interval = 30; + _timer0 = new Timer + { + Interval = 30 + }; _timer0.Tick += timer_0_Tick; } @@ -972,13 +976,15 @@ public SongData(string string0, bool bool6, bool bool7) _songNameTxt.Text = string0; _bool2 = true; _songNameTxt.Enabled = false; - _timer0 = new Timer(); - _timer0.Interval = 30; + _timer0 = new Timer + { + Interval = 30 + }; _timer0.Tick += timer_0_Tick; - var arg710 = _audioCheckBox; + CheckBox arg710 = _audioCheckBox; Bool0 = bool6; arg710.Checked = bool6; - var arg860 = _chartCheckBox; + CheckBox arg860 = _chartCheckBox; Bool1 = bool7; arg860.Checked = bool7; EnableAudioButtons(); @@ -994,7 +1000,7 @@ public SongData(string string0, QbcParser class3621, ZzQbSongObject class3231, s method_4("No Track"); method_5("No Track"); method_8(0); - foreach (var current in _qbcParser.NoteList.Keys) + foreach (string current in _qbcParser.NoteList.Keys) { method_4(current); } @@ -1033,10 +1039,10 @@ public SongData(string string0, QbcParser class3621, ZzQbSongObject class3231, s string text4 = null; string text5 = null; string text6 = null; - for (var i = 0; i < string1.Length; i++) + for (int i = 0; i < string1.Length; i++) { - var text7 = string1[i]; - var text8 = KeyGenerator.GetFileName(text7).ToLower(); + string text7 = string1[i]; + string text8 = KeyGenerator.GetFileName(text7).ToLower(); if (string1.Length > 4 && text8.Contains("coop")) { if (text5 == null && (text8.Contains("rhythm") || text8.Contains("bass"))) @@ -1065,10 +1071,7 @@ public SongData(string string0, QbcParser class3621, ZzQbSongObject class3231, s text3 = text7; } } - if (text == null) - { - throw new Exception("File names did not follow format!"); - } + if (text3 != null) { if (text2 != null) @@ -1096,7 +1099,7 @@ public SongData(string string0, QbcParser class3621, ZzQbSongObject class3231, s { _singleAudioBtn.Checked = true; } - _guitarAudioTxt.Text = text; + _guitarAudioTxt.Text = text ?? throw new Exception("File names did not follow format!"); } _previewSlider.method_18(Convert.ToInt32(AudioManager.GetAudioStream(_guitarAudioTxt.Text) .vmethod_1() @@ -1164,7 +1167,7 @@ public Class248 method_0(string string0) public Class250 method_1(ZzPakNode2 class3180, string string0) { - var dictionary = new Dictionary>(); + Dictionary> dictionary = new Dictionary>(); if (!_easyGuitarBox.SelectedItem.Equals("No Track")) { dictionary.Add("easy", _qbcParser.NoteList[(string) _easyGuitarBox.SelectedItem]); @@ -1229,10 +1232,10 @@ public Class250 method_1(ZzPakNode2 class3180, string string0) { dictionary.Add("rhythmcoop_expert", _qbcParser.NoteList[(string) _expertCoop2Box.SelectedItem]); } - var class228 = method_2(_faceOffP1Box); - var class2282 = method_2(_faceOffP2Box); - var class2283 = method_2(_bossBattleP1Box); - var class2284 = method_2(_bossBattleP2Box); + Track class228 = method_2(_faceOffP1Box); + Track class2282 = method_2(_faceOffP2Box); + Track class2283 = method_2(_bossBattleP1Box); + Track class2284 = method_2(_bossBattleP2Box); _qbcParser.NoteList = dictionary; _qbcParser.Class2282 = class228; _qbcParser.Class2283 = class2282; @@ -1463,8 +1466,8 @@ private void ChartFileBtn_Click(object sender, EventArgs e) //Configures paks if (fileName.EndsWith("_song.pak.xen")) { - var text2 = KeyGenerator.GetFileName(fileName).Replace("_song.pak.xen", ""); - using (var @class = new ZzPakNode2(fileName, false)) + string text2 = KeyGenerator.GetFileName(fileName).Replace("_song.pak.xen", ""); + using (ZzPakNode2 @class = new ZzPakNode2(fileName, false)) { if (!@class.zzQbFileExists("songs\\" + text2 + ".mid.qb")) { @@ -1498,7 +1501,7 @@ private void ChartFileBtn_Click(object sender, EventArgs e) Control arg12B0 = _autoConfigBtn; _resetBtn.Enabled = true; arg12B0.Enabled = true; - foreach (var current in _qbcParser.NoteList.Keys) + foreach (string current in _qbcParser.NoteList.Keys) { method_4(current); } @@ -1646,7 +1649,7 @@ private void CoopAudioBtn_CheckedChanged(object sender, EventArgs e) private void GuitarAudioBtn_Click(object sender, EventArgs e) { - var fileName = KeyGenerator.OpenOrSaveFile("Select the Guitar Audio track file.", + string fileName = KeyGenerator.OpenOrSaveFile("Select the Guitar Audio track file.", "Any Supported Audio Formats|*.dat.xen;*.mp3;*.wav;*.ogg;*.flac|GH3 Audio Header file|*.dat.xen|MPEG Layer-3 Audio file|*.mp3|Waveform Audio file|*.wav|Ogg Vorbis Audio file|*.ogg|FLAC Audio File|*.flac", true) .ToLower(); @@ -1869,7 +1872,7 @@ private void LoadAudio() { try { - var list = new List(); + List list = new List(); if (!_bandCoopTxt.Text.Equals("")) { list.Add(AudioManager.GetAudioStream(_bandCoopTxt.Text)); @@ -1896,7 +1899,7 @@ private void LoadAudio() } if (list.Count != 0) { - var stream = (list.Count == 1) ? list[0] : new Stream2(list.ToArray()); + GenericAudioStream stream = (list.Count == 1) ? list[0] : new Stream2(list.ToArray()); if (_audio != null) { _audio.Dispose(); diff --git a/GHNamespaceA/SongEditor.cs b/GHNamespaceA/SongEditor.cs index 7c5bced..10f3cac 100644 --- a/GHNamespaceA/SongEditor.cs +++ b/GHNamespaceA/SongEditor.cs @@ -28,13 +28,13 @@ private class SongData public void LoadAudioData(object object0) { - using (var stream = AudioManager.GetAudioStream(FileName)) + using (GenericAudioStream stream = AudioManager.GetAudioStream(FileName)) { SongEditor0._audioData = new sbyte[stream.vmethod_1().Uint0 * (ulong) stream.vmethod_1().method_0()]; - var array = new float[4096]; + float[] array = new float[4096]; int num; - for (var i = 0; i < SongEditor0._audioData.Length; i += num) + for (int i = 0; i < SongEditor0._audioData.Length; i += num) { if (i + array.Length < SongEditor0._audioData.Length) { @@ -44,7 +44,7 @@ public void LoadAudioData(object object0) { num = stream.vmethod_4(array, 0, SongEditor0._audioData.Length - i); } - for (var j = 0; j < num; j++) + for (int j = 0; j < num; j++) { SongEditor0._audioData[i + j] = Class11.smethod_19(array[j]); } @@ -116,7 +116,7 @@ public void LoadAudioData(object object0) Brushes.LightGray }; - private Pen[] _notePen = + private readonly Pen[] _notePen = { Pens.Green, Pens.Red, @@ -208,7 +208,7 @@ public void SetOffset(int offset) { return; } - var ghSong = _chart.Gh3Song0; + GuitarHero.Songlist.Gh3Song ghSong = _chart.Gh3Song0; _chart.Gh3Song0.GemOffset = offset; ghSong.FretbarOffset = offset; RedrawFretboard(); @@ -272,8 +272,10 @@ public SongEditor() Controls.Add(_verticalScrollBar); SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true); - _timer = new Timer(); - _timer.Interval = 20; + _timer = new Timer + { + Interval = 20 + }; _timer.Tick += timer_0_Tick; _timer.Start(); } @@ -286,7 +288,7 @@ public void LoadChart(QbcParser chartFile) FretbarWidth = Size1.Width / (decimal) _chart.FretbarList[1]; SetFretboardAngle(15.0); Difficulty = "expert"; - for (var i = 0; i < _noteBrush.Length; i++) + for (int i = 0; i < _noteBrush.Length; i++) { _pen4[i] = new Pen(_noteBrush[i], Size1.Height / 24f); } @@ -295,14 +297,16 @@ public void LoadChart(QbcParser chartFile) public void LoadAudio(string fileName) { - var songData = new SongData(); - songData.FileName = fileName; - songData.SongEditor0 = this; + SongData songData = new SongData + { + FileName = fileName, + SongEditor0 = this + }; if (_audio != null) { _audio.Dispose(); } - var audioStream = AudioManager.GetAudioStream(songData.FileName); + GenericAudioStream audioStream = AudioManager.GetAudioStream(songData.FileName); if (audioStream == null) { return; @@ -391,7 +395,7 @@ private void SongEditor_MouseDown(object sender, MouseEventArgs e) private void SongEditor_MouseWheel(object sender, MouseEventArgs e) { - var num = _verticalScrollBar.Value - e.Delta / SystemInformation.MouseWheelScrollDelta; + int num = _verticalScrollBar.Value - e.Delta / SystemInformation.MouseWheelScrollDelta; if (_verticalScrollBar.Maximum - (_verticalScrollBar.LargeChange - _verticalScrollBar.SmallChange) >= num && _verticalScrollBar.Minimum <= num) { @@ -411,7 +415,7 @@ private int method_15(float float6) private int method_16(float float6) { - var num = (int) Math.Floor(float6); + int num = (int) Math.Floor(float6); if (num + 1 >= _chart.FretbarList.Count) { return _lastFretbar; @@ -420,13 +424,13 @@ private int method_16(float float6) { return 0; } - var num2 = _chart.FretbarList[num]; + int num2 = _chart.FretbarList[num]; return num2 + Convert.ToInt32((float6 - num) * (_chart.FretbarList[num + 1] - num2)); } private static bool smethod_0(bool[] bool5, bool[] bool6) { - for (var i = 0; i < 5; i++) + for (int i = 0; i < 5; i++) { if (bool5[i] && bool6[i]) { @@ -441,21 +445,21 @@ private void method_17(Graphics graphics0, int int8, int int9, float float6, flo int8 += _chart.Gh3Song0.FretbarOffset; int9 += _chart.Gh3Song0.FretbarOffset; graphics0.SetClip(new RectangleF(float6, 0f, _width - float6 * 2f, _height)); - var count = _chart.FretbarList.Count; - var num = _chart.FretbarList.method_7(int8); - var num2 = _chart.FretbarList.method_7(int9); - var num3 = _chart.FretbarList[num]; - var num4 = (num + 1 < count) ? ((int8 - num3) / (float) (_chart.FretbarList[num + 1] - num3)) : 0f; - var count2 = _chart.TsList.Count; - var num5 = _chart.TsList.method_1(num3); - var num6 = _chart.TsList.Values[num5][0]; - var num7 = _chart.FretbarList.method_7(_chart.TsList.Keys[num5]); - var num8 = (count2 > num5 + 1) ? _chart.FretbarList.method_7(_chart.TsList.Keys[num5 + 1]) : -1; - var num9 = 0f; - var y = float7 + Size1.Height; - for (var i = num; i <= num2; i++) + int count = _chart.FretbarList.Count; + int num = _chart.FretbarList.method_7(int8); + int num2 = _chart.FretbarList.method_7(int9); + int num3 = _chart.FretbarList[num]; + float num4 = (num + 1 < count) ? ((int8 - num3) / (float) (_chart.FretbarList[num + 1] - num3)) : 0f; + int count2 = _chart.TsList.Count; + int num5 = _chart.TsList.method_1(num3); + int num6 = _chart.TsList.Values[num5][0]; + int num7 = _chart.FretbarList.method_7(_chart.TsList.Keys[num5]); + int num8 = (count2 > num5 + 1) ? _chart.FretbarList.method_7(_chart.TsList.Keys[num5 + 1]) : -1; + float num9 = 0f; + float y = float7 + Size1.Height; + for (int i = num; i <= num2; i++) { - var num10 = _chart.FretbarList[i]; + int num10 = _chart.FretbarList[i]; if (ShouldDoubleFretbarWidth()) { num9 = float6 + (i - num - num4) * Size1.Width; @@ -500,8 +504,8 @@ private void method_17(Graphics graphics0, int int8, int int9, float float6, flo } } } - var x = (int9 >= _lastFretbar) ? num9 : (_width - float6); - for (var j = 1; j < _numberOfNoteLines; j++) + float x = (int9 >= _lastFretbar) ? num9 : (_width - float6); + for (int j = 1; j < _numberOfNoteLines; j++) { graphics0.DrawLine(_penGray, float6, y = float7 + j * Size1.Height / (float) _numberOfNoteLines, x, y); } @@ -514,54 +518,54 @@ private void DrawFlatViewNotes(Graphics graphics0, int int8, int int9, float flo { int8 += _chart.Gh3Song0.GemOffset; int9 += _chart.Gh3Song0.GemOffset; - var @class = _chart.NoteList.ContainsKey(Difficulty) + Track @class = _chart.NoteList.ContainsKey(Difficulty) ? _chart.NoteList[Difficulty] : new Track(); - var class2 = _chart.SpList.ContainsKey(Difficulty) ? _chart.SpList[Difficulty] : new Track(); - var arg_9A0 = @class.Count; - var num = @class.method_1(int8); - var num2 = @class.method_1(int9); - var num3 = @class.Keys[num]; + Track class2 = _chart.SpList.ContainsKey(Difficulty) ? _chart.SpList[Difficulty] : new Track(); + int arg_9A0 = @class.Count; + int num = @class.method_1(int8); + int num2 = @class.method_1(int9); + int num3 = @class.Keys[num]; if (int8 < _lastFretbar && num3 <= int9) { - var count = _chart.FretbarList.Count; - var num4 = _chart.FretbarList.method_7(num3); - var num5 = _chart.FretbarList[num4]; - var num6 = _chart.FretbarList[num4 + 1] - num5; - var num7 = (count > num4 + 1) ? @class.method_2(_chart.FretbarList[num4 + 1]) : -1; - var num8 = _chart.FretbarList.method_7(int8); - var num9 = (int8 - _chart.FretbarList[num8]) / + int count = _chart.FretbarList.Count; + int num4 = _chart.FretbarList.method_7(num3); + int num5 = _chart.FretbarList[num4]; + int num6 = _chart.FretbarList[num4 + 1] - num5; + int num7 = (count > num4 + 1) ? @class.method_2(_chart.FretbarList[num4 + 1]) : -1; + int num8 = _chart.FretbarList.method_7(int8); + float num9 = (int8 - _chart.FretbarList[num8]) / (float) (_chart.FretbarList[num8 + 1] - _chart.FretbarList[num8]); - var count2 = _chart.TsList.Count; - var num10 = _chart.TsList.method_1(num3); - var num11 = _chart.TsList.Values[num10][0]; - var num12 = (count2 > num10 + 1) ? _chart.FretbarList.method_7(_chart.TsList.Keys[num10 + 1]) : -1; - var count3 = class2.Count; - var num13 = class2.method_1(num3); - var num14 = (class2.Count == 0 || class2.Keys[num13] > num3) + int count2 = _chart.TsList.Count; + int num10 = _chart.TsList.method_1(num3); + int num11 = _chart.TsList.Values[num10][0]; + int num12 = (count2 > num10 + 1) ? _chart.FretbarList.method_7(_chart.TsList.Keys[num10 + 1]) : -1; + int count3 = class2.Count; + int num13 = class2.method_1(num3); + int num14 = (class2.Count == 0 || class2.Keys[num13] > num3) ? -1 : (class2.Keys[num13] + class2.Values[num13][0]); - var num15 = (count3 > num13 + 1) + int num15 = (count3 > num13 + 1) ? @class.method_1(class2.Keys[(num14 != -1) ? (num13 + 1) : num13]) : -1; if (num14 == -1) { num13--; } - var num16 = Size1.Height / (float) _numberOfNoteLines; - var num17 = Size1.Height / 15f; - var num18 = num17 / 1.6f; - var num19 = num17 * 2f; - var num20 = num18 * 2f; - var val = _width - float6; + float num16 = Size1.Height / (float) _numberOfNoteLines; + float num17 = Size1.Height / 15f; + float num18 = num17 / 1.6f; + float num19 = num17 * 2f; + float num20 = num18 * 2f; + float val = _width - float6; if (Has5NoteLines()) { float7 += num16 / 2f; } - for (var i = num; i <= num2; i++) + for (int i = num; i <= num2; i++) { - var num21 = @class.Keys[i]; - var class3 = @class[num21]; + int num21 = @class.Keys[i]; + NotesAtOffset class3 = @class[num21]; if (i == num7) { num4 = _chart.FretbarList.method_7(num21); @@ -583,7 +587,7 @@ private void DrawFlatViewNotes(Graphics graphics0, int int8, int int9, float flo num14 = class2.Keys[num13] + class2.Values[num13][0]; num15 = ((count3 > num13 + 1) ? @class.method_1(class2.Keys[num13 + 1]) : -1); } - var showDrawSp = LoadStarpowerTextures && num14 >= num21; + bool showDrawSp = LoadStarpowerTextures && num14 >= num21; float num22; float num23; if (ShouldDoubleFretbarWidth()) @@ -593,7 +597,7 @@ private void DrawFlatViewNotes(Graphics graphics0, int int8, int int9, float flo if (class3.SustainLength - _chart.Int0 > _chart.Int0) { num23 = num21 + class3.SustainLength - _chart.Int0; - var num24 = _chart.FretbarList.method_7((int) num23); + int num24 = _chart.FretbarList.method_7((int) num23); num23 = Math.Min( float6 + @@ -615,7 +619,7 @@ private void DrawFlatViewNotes(Graphics graphics0, int int8, int int9, float flo } if (num23 == -1f || num23 >= float6) { - var shouldDrawHopo = LoadHopoTextures && + bool shouldDrawHopo = LoadHopoTextures && ((i != 0 && smethod_0(@class[@class.Keys[i - 1]].NoteValues, class3.NoteValues) && num21 - @class.Keys[i - 1] <= @@ -623,11 +627,11 @@ private void DrawFlatViewNotes(Graphics graphics0, int int8, int int9, float flo ((_chart.Gh3Song0.HammerOn == 0f) ? QbcParser.Float0 : _chart.Gh3Song0.HammerOn)) ^ class3.NoteValues[5]); - for (var j = 0; j < 6; j++) + for (int j = 0; j < 6; j++) { if (class3.NoteValues[j]) { - var num25 = float7 + num16 * j; + float num25 = float7 + num16 * j; if (num23 != -1f) { graphics0.DrawLine(_pen4[j], num22, num25, num23, num25); @@ -638,8 +642,8 @@ private void DrawFlatViewNotes(Graphics graphics0, int int8, int int9, float flo { if (showDrawSp) { - var array = new PointF[5]; - for (var k = 0; k < 5; k++) + PointF[] array = new PointF[5]; + for (int k = 0; k < 5; k++) { array[k] = new PointF(num22 + num19 * (float) Math.Sin(k * _double0), @@ -647,7 +651,7 @@ private void DrawFlatViewNotes(Graphics graphics0, int int8, int int9, float flo } graphics0.FillPolygon(_brushBlack, array, FillMode.Winding); } - var rect = new RectangleF(num22 - num17, num25 - num17, num19, num19); + RectangleF rect = new RectangleF(num22 - num17, num25 - num17, num19, num19); graphics0.FillEllipse(_noteBrush[j], rect); graphics0.DrawEllipse(_penBlack2, rect); if (shouldDrawHopo) @@ -670,34 +674,34 @@ private void DrawAudio(Graphics graphics0, int int8, int int9, float float6, flo { return; } - var num = float6; - var x = num; - var num2 = 0f; - var num3 = Convert.ToInt32(_audio.GetWaveFormat().int_0 * _audio.GetWaveFormat().short_0 * (int8 / 1000m)); - var num4 = Convert.ToInt32(_audio.GetWaveFormat().int_0 * _audio.GetWaveFormat().short_0 * (int9 / 1000m)); + float num = float6; + float x = num; + float num2 = 0f; + int num3 = Convert.ToInt32(_audio.GetWaveFormat().int_0 * _audio.GetWaveFormat().short_0 * (int8 / 1000m)); + int num4 = Convert.ToInt32(_audio.GetWaveFormat().int_0 * _audio.GetWaveFormat().short_0 * (int9 / 1000m)); num4 = Math.Min(num4, _audioData.Length); - var num5 = Convert.ToInt32(_audio.GetWaveFormat().int_0 * _audio.GetWaveFormat().short_0 / + int num5 = Convert.ToInt32(_audio.GetWaveFormat().int_0 * _audio.GetWaveFormat().short_0 / (FretbarWidth * 1000m)); - var i = num3; - for (var j = 0; j < (int) _audio.GetWaveFormat().short_0; j++) + int i = num3; + for (int j = 0; j < (int) _audio.GetWaveFormat().short_0; j++) { while (i < num4) { - var num6 = -128f; - var num7 = 127f; + float num6 = -128f; + float num7 = 127f; if (ShouldDoubleFretbarWidth()) { num5 = Size1.Width; } - var num8 = j; + int num8 = j; while (num8 < num5 && num8 + i < num4) { num6 = Math.Max(num6, _audioData[num8 + i]); num7 = Math.Min(num7, _audioData[num8 + i]); num8 += _audio.GetWaveFormat().short_0; } - var num9 = (num7 + 128f) * Size1.Height / 256f; - var num10 = (num6 + 128f) * Size1.Height / 256f; + float num9 = (num7 + 128f) * Size1.Height / 256f; + float num10 = (num6 + 128f) * Size1.Height / 256f; if (num6 != num7) { if (num5 <= 1E-10) @@ -730,24 +734,24 @@ private void DrawAudio(Graphics graphics0, int int8, int int9, float float6, flo private void DrawFlatView(Graphics graphics0) { - var num = 0; - var num2 = 0; + int num = 0; + int num2 = 0; if (ShouldDoubleFretbarWidth()) { - var num3 = Math.Min(_int2, _someFretbarValue); - for (var i = 0; i < num3; i++) + int num3 = Math.Min(_int2, _someFretbarValue); + for (int i = 0; i < num3; i++) { num = method_16(_fretboardAngleFloat * (_verticalScrollBar.Value + i)); num2 = method_16(_fretboardAngleFloat * (_verticalScrollBar.Value + i + 1)); - var num4 = Float5 * 2f + _float0 * i; + float num4 = Float5 * 2f + _float0 * i; method_17(graphics0, num, num2, Float5, num4); DrawFlatViewNotes(graphics0, num, num2, Float5, num4); } } else { - var num5 = Math.Min(_int2, _lastFretbarValue); - var j = 0; + int num5 = Math.Min(_int2, _lastFretbarValue); + int j = 0; if (_audio != null) { j = (int) _audio.AudioLength().TotalMilliseconds; @@ -759,11 +763,11 @@ private void DrawFlatView(Graphics graphics0) _verticalScrollBar.Value--; } } - for (var k = 0; k < num5; k++) + for (int k = 0; k < num5; k++) { num = _usedForCalculatingLastFretbar * (_verticalScrollBar.Value + k); num2 = _usedForCalculatingLastFretbar * (_verticalScrollBar.Value + k + 1); - var num4 = Float5 * 2f + _float0 * k; + float num4 = Float5 * 2f + _float0 * k; if (ShowAudioOnFretboard) { DrawAudio(graphics0, num, num2, Float5, num4); @@ -772,7 +776,7 @@ private void DrawFlatView(Graphics graphics0) DrawFlatViewNotes(graphics0, num, num2, Float5, num4); if (_audio != null && num <= j && j <= num2) { - var smoothingMode = graphics0.SmoothingMode; + SmoothingMode smoothingMode = graphics0.SmoothingMode; graphics0.SmoothingMode = SmoothingMode.None; graphics0.DrawLine(_penBlack2, Float5 + method_14(j - num), num4 - 5f, Float5 + method_14(j - num), num4 + Size1.Height + 5f); @@ -822,20 +826,20 @@ private void method_25(Graphics graphics0, int int8, int int9, float float6, flo { int8 += _chart.Gh3Song0.FretbarOffset; int9 += _chart.Gh3Song0.FretbarOffset; - var count = _chart.FretbarList.Count; - var num = _chart.FretbarList.method_7(int8); - var num2 = _chart.FretbarList.method_7(int9); - var num3 = _chart.FretbarList[num]; - var num4 = (num + 1 < count) ? ((int8 - num3) / (float) (_chart.FretbarList[num + 1] - num3)) : 0f; - var count2 = _chart.TsList.Count; - var num5 = _chart.TsList.method_1(num3); - var num6 = _chart.TsList.Values[num5][0]; - var num7 = _chart.FretbarList.method_7(_chart.TsList.Keys[num5]); - var num8 = (count2 > num5 + 1) ? _chart.FretbarList.method_7(_chart.TsList.Keys[num5 + 1]) : -1; + int count = _chart.FretbarList.Count; + int num = _chart.FretbarList.method_7(int8); + int num2 = _chart.FretbarList.method_7(int9); + int num3 = _chart.FretbarList[num]; + float num4 = (num + 1 < count) ? ((int8 - num3) / (float) (_chart.FretbarList[num + 1] - num3)) : 0f; + int count2 = _chart.TsList.Count; + int num5 = _chart.TsList.method_1(num3); + int num6 = _chart.TsList.Values[num5][0]; + int num7 = _chart.FretbarList.method_7(_chart.TsList.Keys[num5]); + int num8 = (count2 > num5 + 1) ? _chart.FretbarList.method_7(_chart.TsList.Keys[num5 + 1]) : -1; float num10; - for (var i = num; i <= num2; i++) + for (int i = num; i <= num2; i++) { - var num9 = _chart.FretbarList[i]; + int num9 = _chart.FretbarList[i]; if (ShouldDoubleFretbarWidth()) { num10 = float7 - Convert.ToSingle(_editorSize.Width * @@ -851,8 +855,8 @@ private void method_25(Graphics graphics0, int int8, int int9, float float6, flo } if (i - num7 == 0) { - var num11 = Convert.ToSingle((float7 - num10) * Math.Tan(_double1)); - var font = new Font("Verdana", Math.Max(0f, (_editorSize.Height - 2f * num11) / 15f)); + float num11 = Convert.ToSingle((float7 - num10) * Math.Tan(_double1)); + Font font = new Font("Verdana", Math.Max(0f, (_editorSize.Height - 2f * num11) / 15f)); graphics0.DrawString(num6 + "/" + _chart.TsList.Values[num5][1], font, _brushGrayText, float6 + _editorSize.Height + 5f - num11, num10 - font.Size); } @@ -862,8 +866,8 @@ private void method_25(Graphics graphics0, int int8, int int9, float float6, flo num6 = _chart.TsList.Values[num5][0]; num7 = _chart.FretbarList.method_7(_chart.TsList.Keys[num5]); num8 = ((count2 > num5 + 1) ? _chart.FretbarList.method_7(_chart.TsList.Keys[num5 + 1]) : -1); - var num11 = Convert.ToSingle((float7 - num10) * Math.Tan(_double1)); - var font2 = new Font("Verdana", Math.Max(0f, (_editorSize.Height - 2f * num11) / 15f)); + float num11 = Convert.ToSingle((float7 - num10) * Math.Tan(_double1)); + Font font2 = new Font("Verdana", Math.Max(0f, (_editorSize.Height - 2f * num11) / 15f)); graphics0.DrawString(num6 + "/" + _chart.TsList.Values[num5][1], font2, _brushGrayText, float6 + _editorSize.Height + 5f - num11, num10 - font2.Size); } @@ -900,9 +904,9 @@ private void method_25(Graphics graphics0, int int8, int int9, float float6, flo } } num10 = float7 - _float3; - var num12 = Convert.ToSingle((float7 - num10) * Math.Tan(_double1)); - var num13 = _editorSize.Height - 2f * num12; - for (var j = 0; j <= _numberOfNoteLines; j++) + float num12 = Convert.ToSingle((float7 - num10) * Math.Tan(_double1)); + float num13 = _editorSize.Height - 2f * num12; + for (int j = 0; j <= _numberOfNoteLines; j++) { graphics0.DrawLine(_penGray, float6 + j * _editorSize.Height / (float) _numberOfNoteLines, float7, float6 + num12 + j * num13 / _numberOfNoteLines, num10); @@ -913,55 +917,55 @@ private void DrawGameViewNotes(Graphics graphics0, int int8, int int9, float flo { int8 += _chart.Gh3Song0.GemOffset; int9 += _chart.Gh3Song0.GemOffset; - var @class = _chart.NoteList.ContainsKey(Difficulty) + Track @class = _chart.NoteList.ContainsKey(Difficulty) ? _chart.NoteList[Difficulty] : new Track(); - var class2 = _chart.SpList.ContainsKey(Difficulty) ? _chart.SpList[Difficulty] : new Track(); + Track class2 = _chart.SpList.ContainsKey(Difficulty) ? _chart.SpList[Difficulty] : new Track(); if (@class.Count == 0) { return; } - var argA30 = @class.Count; - var num = @class.method_1(int8); - var num2 = @class.method_1(int9); - var num3 = @class.Keys[num]; + int argA30 = @class.Count; + int num = @class.method_1(int8); + int num2 = @class.method_1(int9); + int num3 = @class.Keys[num]; if (int8 < _lastFretbar && num3 <= int9) { - var count = _chart.FretbarList.Count; - var num4 = _chart.FretbarList.method_7(num3); - var num5 = _chart.FretbarList[num4]; - var num6 = _chart.FretbarList[num4 + 1] - num5; - var num7 = (count > num4 + 1) ? @class.method_2(_chart.FretbarList[num4 + 1]) : -1; - var num8 = _chart.FretbarList.method_7(int8); + int count = _chart.FretbarList.Count; + int num4 = _chart.FretbarList.method_7(num3); + int num5 = _chart.FretbarList[num4]; + int num6 = _chart.FretbarList[num4 + 1] - num5; + int num7 = (count > num4 + 1) ? @class.method_2(_chart.FretbarList[num4 + 1]) : -1; + int num8 = _chart.FretbarList.method_7(int8); _chart.FretbarList.method_7(int9); - var num9 = (int8 - _chart.FretbarList[num8]) / + float num9 = (int8 - _chart.FretbarList[num8]) / (float) (_chart.FretbarList[num8 + 1] - _chart.FretbarList[num8]); - var count2 = _chart.TsList.Count; - var num10 = _chart.TsList.method_1(num3); - var num11 = _chart.TsList.Values[num10][0]; - var num12 = (count2 > num10 + 1) ? _chart.FretbarList.method_7(_chart.TsList.Keys[num10 + 1]) : -1; - var count3 = class2.Count; - var num13 = class2.method_1(num3); - var num14 = (class2.Count == 0 || class2.Keys[num13] > num3) + int count2 = _chart.TsList.Count; + int num10 = _chart.TsList.method_1(num3); + int num11 = _chart.TsList.Values[num10][0]; + int num12 = (count2 > num10 + 1) ? _chart.FretbarList.method_7(_chart.TsList.Keys[num10 + 1]) : -1; + int count3 = class2.Count; + int num13 = class2.method_1(num3); + int num14 = (class2.Count == 0 || class2.Keys[num13] > num3) ? -1 : (class2.Keys[num13] + class2.Values[num13][0]); - var num15 = (count3 > num13 + 1) + int num15 = (count3 > num13 + 1) ? @class.method_1(class2.Keys[(num14 != -1) ? (num13 + 1) : num13]) : -1; if (num14 == -1) { num13--; } - var num16 = _editorSize.Height / (float) _numberOfNoteLines; - var num17 = _editorSize.Height / 15f; - var num18 = num17 / 1.6f; - var num19 = num17 * 2f; - var num20 = num18 * 2f; - var val = float7 - _float3; - for (var i = num; i <= num2; i++) + float num16 = _editorSize.Height / (float) _numberOfNoteLines; + float num17 = _editorSize.Height / 15f; + float num18 = num17 / 1.6f; + float num19 = num17 * 2f; + float num20 = num18 * 2f; + float val = float7 - _float3; + for (int i = num; i <= num2; i++) { - var num21 = @class.Keys[i]; - var class3 = @class[num21]; + int num21 = @class.Keys[i]; + NotesAtOffset class3 = @class[num21]; if (i == num7) { num4 = _chart.FretbarList.method_7(num21); @@ -983,7 +987,7 @@ private void DrawGameViewNotes(Graphics graphics0, int int8, int int9, float flo num14 = class2.Keys[num13] + class2.Values[num13][0]; num15 = ((count3 > num13 + 1) ? @class.method_1(class2.Keys[num13 + 1]) : -1); } - var shouldDrawSp = LoadStarpowerTextures && num14 >= num21; + bool shouldDrawSp = LoadStarpowerTextures && num14 >= num21; float num22; float num23; if (ShouldDoubleFretbarWidth()) @@ -997,7 +1001,7 @@ private void DrawGameViewNotes(Graphics graphics0, int int8, int int9, float flo if (class3.SustainLength - _chart.Int0 > _chart.Int0) { num23 = num21 + class3.SustainLength - _chart.Int0; - var num24 = _chart.FretbarList.method_7((int) num23); + int num24 = _chart.FretbarList.method_7((int) num23); num23 = Math.Max( float7 - Convert.ToSingle(_editorSize.Width * (1.0 - Math.Pow(_fretboardAngle, @@ -1030,7 +1034,7 @@ private void DrawGameViewNotes(Graphics graphics0, int int8, int int9, float flo } if (num23 == -1f || num23 <= float7) { - var shouldDrawHopo = LoadHopoTextures && + bool shouldDrawHopo = LoadHopoTextures && ((i != 0 && smethod_0(@class[@class.Keys[i - 1]].NoteValues, class3.NoteValues) && num21 - @class.Keys[i - 1] <= @@ -1038,16 +1042,16 @@ private void DrawGameViewNotes(Graphics graphics0, int int8, int int9, float flo ((_chart.Gh3Song0.HammerOn == 0f) ? QbcParser.Float0 : _chart.Gh3Song0.HammerOn)) ^ class3.NoteValues[5]); - var num25 = float6 + Convert.ToSingle((float7 - num22) * Math.Tan(_double1)); + float num25 = float6 + Convert.ToSingle((float7 - num22) * Math.Tan(_double1)); num16 = (_editorSize.Height - 2f * (num25 - float6)) / _numberOfNoteLines; - var num26 = float6 + Convert.ToSingle((float7 - num23) * Math.Tan(_double1)); - var num27 = (_editorSize.Height - 2f * (num26 - float6)) / _numberOfNoteLines; + float num26 = float6 + Convert.ToSingle((float7 - num23) * Math.Tan(_double1)); + float num27 = (_editorSize.Height - 2f * (num26 - float6)) / _numberOfNoteLines; num17 = (_editorSize.Height - 2f * (num25 - float6)) / 15f; num18 = num17 / 1.6f; num19 = num17 * 2f; num20 = num18 * 2f; - var num28 = (_editorSize.Height - 2f * (num25 - float6)) / 32f; - var num29 = (_editorSize.Height - 2f * (num26 - float6)) / 32f; + float num28 = (_editorSize.Height - 2f * (num25 - float6)) / 32f; + float num29 = (_editorSize.Height - 2f * (num26 - float6)) / 32f; if (Has5NoteLines()) { num25 += num16 / 2f; @@ -1055,7 +1059,7 @@ private void DrawGameViewNotes(Graphics graphics0, int int8, int int9, float flo } num25 -= num16; num26 -= num27; - for (var j = 0; j < 6; j++) + for (int j = 0; j < 6; j++) { num25 += num16; num26 += num27; @@ -1076,8 +1080,8 @@ private void DrawGameViewNotes(Graphics graphics0, int int8, int int9, float flo { if (shouldDrawSp) { - var trianlePositions = new PointF[5]; - for (var k = 0; k < 5; k++) + PointF[] trianlePositions = new PointF[5]; + for (int k = 0; k < 5; k++) { trianlePositions[k] = new PointF(num25 - num19 * (float) Math.Sin(k * _double0), @@ -1085,7 +1089,7 @@ private void DrawGameViewNotes(Graphics graphics0, int int8, int int9, float flo } graphics0.FillPolygon(_brushBlack, trianlePositions, FillMode.Winding); } - var rect = new RectangleF(num25 - num17, num22 - num17 * _fretboardAngle, num19, + RectangleF rect = new RectangleF(num25 - num17, num22 - num17 * _fretboardAngle, num19, num19 * _fretboardAngle); graphics0.FillEllipse(_noteBrush[j], rect); graphics0.DrawEllipse(_penBlack2, rect); @@ -1111,41 +1115,41 @@ private void DrawGameviewFretbars(Graphics graphics0, int int8, int int9, float { return; } - var num = 0f; - var num2 = float7; - var num3 = num2; - var num4 = Convert.ToInt32(_audio.GetWaveFormat().int_0 * _audio.GetWaveFormat().short_0 * (int8 / 1000m)); - var num5 = Convert.ToInt32(_audio.GetWaveFormat().int_0 * _audio.GetWaveFormat().short_0 * (int9 / 1000m)); + float num = 0f; + float num2 = float7; + float num3 = num2; + int num4 = Convert.ToInt32(_audio.GetWaveFormat().int_0 * _audio.GetWaveFormat().short_0 * (int8 / 1000m)); + int num5 = Convert.ToInt32(_audio.GetWaveFormat().int_0 * _audio.GetWaveFormat().short_0 * (int9 / 1000m)); num5 = Math.Min(num5, _audioData.Length); - var d = 0m; - var i = num4; - for (var j = 0; j < (int) _audio.GetWaveFormat().short_0; j++) + decimal d = 0m; + int i = num4; + for (int j = 0; j < (int) _audio.GetWaveFormat().short_0; j++) { while (i < num5) { - var num6 = -128f; - var num7 = 127f; - var num8 = (decimal) (_chart.FretbarList[1] / _hyperspeed * + float num6 = -128f; + float num7 = 127f; + decimal num8 = (decimal) (_chart.FretbarList[1] / _hyperspeed * Math.Log( Math.Abs( 1.0 - (float7 - num2 + 1f) * (1f - _fretboardAngle) / (double) _editorSize.Width), _fretboardAngle)); - var num9 = Convert.ToInt32(_audio.GetWaveFormat().int_0 * _audio.GetWaveFormat().short_0 * + int num9 = Convert.ToInt32(_audio.GetWaveFormat().int_0 * _audio.GetWaveFormat().short_0 * ((num8 - d) / 1000m)); d = num8; - var num10 = j; + int num10 = j; while (num10 < num9 && num10 + i < num5) { num6 = Math.Max(num6, _audioData[num10 + i]); num7 = Math.Min(num7, _audioData[num10 + i]); num10 += _audio.GetWaveFormat().short_0; } - var num11 = Convert.ToSingle((float7 - num2) * Math.Tan(_double1)); - var num12 = _editorSize.Height - 2f * num11; + float num11 = Convert.ToSingle((float7 - num2) * Math.Tan(_double1)); + float num12 = _editorSize.Height - 2f * num11; if (num7 != num6) { - var num13 = (num7 + 128f) * num12 / 256f; - var num14 = (num6 + 128f) * num12 / 256f; + float num13 = (num7 + 128f) * num12 / 256f; + float num14 = (num6 + 128f) * num12 / 256f; if (num9 <= 1E-10) { return; @@ -1183,12 +1187,12 @@ private void DrawGameviewFretbars(Graphics graphics0, int int8, int int9, float private void DrawGameView(Graphics graphics0) { - var num = Float5 * 2f; - var num2 = method_16( + float num = Float5 * 2f; + int num2 = method_16( (_verticalScrollBar.Maximum - _verticalScrollBar.LargeChange - _verticalScrollBar.Value) / 2f); if (ShouldDoubleFretbarWidth()) { - var int_ = method_16( + int int_ = method_16( (_verticalScrollBar.Maximum - _verticalScrollBar.LargeChange - _verticalScrollBar.Value) / 2f + _fretboardAngleFloat); method_25(graphics0, num2, int_, _width / 4f, _height - num); @@ -1200,7 +1204,7 @@ private void DrawGameView(Graphics graphics0) { num2 = (int) _audio.AudioLength().TotalMilliseconds; } - var int_ = num2 + _usedForCalculatingLastFretbar; + int int_ = num2 + _usedForCalculatingLastFretbar; if (ShowAudioOnFretboard) { DrawGameviewFretbars(graphics0, num2, int_, _width / 4f, _height - num); @@ -1213,12 +1217,12 @@ private void DrawGameView(Graphics graphics0) public void method_29(Delegate10 delegate101) { - var @delegate = _delegate100; + Delegate10 @delegate = _delegate100; Delegate10 delegate2; do { delegate2 = @delegate; - var value = (Delegate10) Delegate.Combine(delegate2, delegate101); + Delegate10 value = (Delegate10) Delegate.Combine(delegate2, delegate101); @delegate = Interlocked.CompareExchange(ref _delegate100, value, delegate2); } while (@delegate != delegate2); } @@ -1230,7 +1234,7 @@ protected override void OnPaint(PaintEventArgs e) { return; } - var graphics = e.Graphics; + Graphics graphics = e.Graphics; graphics.SmoothingMode = SmoothingMode.AntiAlias; if (_gamemodeView) { diff --git a/GHNamespaceA/TGHManager.cs b/GHNamespaceA/TGHManager.cs index 1f49acc..1078515 100644 --- a/GHNamespaceA/TGHManager.cs +++ b/GHNamespaceA/TGHManager.cs @@ -34,13 +34,14 @@ public TghManager(Gh3Songlist gh3Songlist1, Gh3Tier gh3Tier1, string string2, st public void method_0() { - byte[] byte_; - ZipManager.ExtractBytesFrom(_string1, out byte_, "songs.info", "TGH9ZIP2PASS4MXKR"); - var @class = new ZzGenericNode1("songs", KeyGenerator.smethod_8(byte_, "SNG4AES4KEY9MXKR")); + ZipManager.ExtractBytesFrom(_string1, out byte[] byte_, "songs.info", "TGH9ZIP2PASS4MXKR"); + ZzGenericNode1 @class = new ZzGenericNode1("songs", KeyGenerator.smethod_8(byte_, "SNG4AES4KEY9MXKR")); foreach (StructurePointerNode class302 in @class.Nodes) { - var gH3Song = new Gh3Song(class302); - gH3Song.Editable = true; + Gh3Song gH3Song = new Gh3Song(class302) + { + Editable = true + }; _gh3Songlist0.method_0(gH3Song, _string0 != null); } ZipManager.ExtractBytesFrom(_string1, out byte_, "tier.info", "TGH9ZIP2PASS4MXKR"); @@ -49,9 +50,9 @@ public void method_0() .Nodes[0], _gh3Songlist0)); if (_string0 != null) { - var list = new List(); - var list2 = new List(); - foreach (var current in Gh3Tier0.Songs) + List list = new List(); + List list2 = new List(); + foreach (Gh3Song current in Gh3Tier0.Songs) { if (current.Editable) { @@ -69,13 +70,13 @@ public void method_0() public void method_1() { - var list = new List(); + List list = new List(); Stream stream = new MemoryStream(); KeyGenerator.smethod_1(new ZzGenericNode1("tier", Gh3Tier0.method_3()).method_8(), stream, "TIR4AES4KEY9MXKR"); - var list2 = new List(); - var list3 = new List(); - foreach (var current in Gh3Tier0.Songs) + List list2 = new List(); + List list3 = new List(); + foreach (Gh3Song current in Gh3Tier0.Songs) { if (current.Editable) { diff --git a/GHNamespaceA/zzEmbeddedResourceDB.cs b/GHNamespaceA/zzEmbeddedResourceDB.cs index d7811f9..2297ba9 100644 --- a/GHNamespaceA/zzEmbeddedResourceDB.cs +++ b/GHNamespaceA/zzEmbeddedResourceDB.cs @@ -6,7 +6,7 @@ namespace GHNamespaceA { - public static class zzEmbeddedResourceDB + public static class ZzEmbeddedResourceDB { public static string GameName = "GH3"; diff --git a/GHNamespaceA/zzFxBoost.cs b/GHNamespaceA/zzFxBoost.cs index ca17660..8f48e95 100644 --- a/GHNamespaceA/zzFxBoost.cs +++ b/GHNamespaceA/zzFxBoost.cs @@ -7,7 +7,6 @@ namespace GHNamespaceA { //This is probably the "speed boost" part of GHTCP - public class ZzFxBoost : QbEditor { private readonly ZzPakNode2 _class3180; @@ -17,7 +16,7 @@ public class ZzFxBoost : QbEditor public ZzFxBoost(ZzPakNode2 class3181) { _class3180 = class3181; - var @class = ((StructureHeaderNode) _class3180.ZzGetNode1("scripts\\guitar\\guitar_events.qb") + StructItemQbKey @class = ((StructureHeaderNode) _class3180.ZzGetNode1("scripts\\guitar\\guitar_events.qb") .zzFindNode(new StructItemQbKey("event", "star_power_on")) .Parent).zzFindNode(new StructItemQbKey("scr")); _bool0 = (@class.method_8() == "guitarevent_starpoweron"); @@ -57,7 +56,7 @@ public override void CreateCustomMenu() QbSongClass1.AddKeyToDictionary("guitarevent_multiplier4xon_spawned_original"); @class.zzFindNode(new ScriptRootNode("first_gem_fx")).Int0 = QbSongClass1.AddKeyToDictionary("first_gem_fx_original"); - var class2 = @class.zzFindNode(new ScriptRootNode("hit_note_fx_empty")); + ScriptRootNode class2 = @class.zzFindNode(new ScriptRootNode("hit_note_fx_empty")); if (class2 != null) { class2.Int0 = QbSongClass1.AddKeyToDictionary("hit_note_fx"); diff --git a/GHNamespaceA/zzSetListParser.cs b/GHNamespaceA/zzSetListParser.cs index ebab4e9..ff052a6 100644 --- a/GHNamespaceA/zzSetListParser.cs +++ b/GHNamespaceA/zzSetListParser.cs @@ -24,7 +24,7 @@ public ZzSetListParser(ZzPakNode2 class3181, Gh3Songlist gh3Songlist1, bool bool public override void CreateCustomMenu() { - var text = "scripts\\guitar\\guitar_progression.qb"; + string text = "scripts\\guitar\\guitar_progression.qb"; ZzGenericNode1 @class = _class3180.ZzGetNode1(text); _gh3Songlist0.method_4(text, @class.zzFindNode(new StructurePointerRootNode("gh3_career_songs"))); _gh3Songlist0.method_4(text, @class.zzFindNode(new StructurePointerRootNode("gh3_general_songs"))); @@ -58,8 +58,8 @@ public override void CreateCustomMenu() if (_class3180.zzQbFileExists(text = "scripts\\guitar\\custom_menu\\guitar_custom_progression.qb")) { @class = _class3180.ZzGetNode1(text); - var num = @class.zzFindNode(new IntegerRootNode("custom_setlist_bitmask")).method_7(); - for (var i = 0; i < 32; i++) + int num = @class.zzFindNode(new IntegerRootNode("custom_setlist_bitmask")).method_7(); + for (int i = 0; i < 32; i++) { if (num >> i != 0) { diff --git a/GHNamespaceB/AbsTreeNode1_1.cs b/GHNamespaceB/AbsTreeNode1_1.cs index fa8740e..57dc0d9 100644 --- a/GHNamespaceB/AbsTreeNode1_1.cs +++ b/GHNamespaceB/AbsTreeNode1_1.cs @@ -26,23 +26,22 @@ public T[] method_7() public List method_8() { - var list = new List(); + List list = new List(); if (Nodes[0] is AbstractTreeNode1) { - var enumerator = Nodes.GetEnumerator(); + System.Collections.IEnumerator enumerator = Nodes.GetEnumerator(); try { while (enumerator.MoveNext()) { - var item = (T) enumerator.Current; + T item = (T) enumerator.Current; list.Add(item); } return list; } finally { - var disposable = enumerator as IDisposable; - if (disposable != null) + if (enumerator is IDisposable disposable) { disposable.Dispose(); } diff --git a/GHNamespaceB/AbsTreeNode1_1_Gen.cs b/GHNamespaceB/AbsTreeNode1_1_Gen.cs index 0e91212..1533c0a 100644 --- a/GHNamespaceB/AbsTreeNode1_1_Gen.cs +++ b/GHNamespaceB/AbsTreeNode1_1_Gen.cs @@ -2,8 +2,7 @@ namespace GHNamespaceB { - //Probably an array tree node - + // Probably an array tree node public abstract class AbsTreeNode11 : AbsTreeNode11 where T : AbstractBaseTreeNode1 { public void method_9(IEnumerable ienumerable0) @@ -14,7 +13,7 @@ public void method_9(IEnumerable ienumerable0) public void method_10(IEnumerable ienumerable0) { - foreach (var current in ienumerable0) + foreach (T current in ienumerable0) { Nodes.Add(current); } diff --git a/GHNamespaceB/AbstractTreeNode1.cs b/GHNamespaceB/AbstractTreeNode1.cs index d6800c8..ac8b795 100644 --- a/GHNamespaceB/AbstractTreeNode1.cs +++ b/GHNamespaceB/AbstractTreeNode1.cs @@ -74,13 +74,13 @@ public T zzFindNode(T gparam0) where T : AbstractTreeNode1 } if (Nodes.Count != 0 && Nodes[0] is AbstractTreeNode1) { - var enumerator = Nodes.GetEnumerator(); + System.Collections.IEnumerator enumerator = Nodes.GetEnumerator(); T result; try { while (enumerator.MoveNext()) { - var @class = (AbstractTreeNode1) enumerator.Current; + AbstractTreeNode1 @class = (AbstractTreeNode1) enumerator.Current; T t; if ((t = @class.zzFindNode(gparam0)) != null) { @@ -92,8 +92,7 @@ public T zzFindNode(T gparam0) where T : AbstractTreeNode1 } finally { - var disposable = enumerator as IDisposable; - if (disposable != null) + if (enumerator is IDisposable disposable) { disposable.Dispose(); } @@ -112,13 +111,13 @@ public bool method_6(ref T gparam0) where T : AbstractTreeNode1 } if (Nodes.Count != 0 && Nodes[0] is AbstractTreeNode1) { - var enumerator = Nodes.GetEnumerator(); + System.Collections.IEnumerator enumerator = Nodes.GetEnumerator(); bool result; try { while (enumerator.MoveNext()) { - var @class = (AbstractTreeNode1) enumerator.Current; + AbstractTreeNode1 @class = (AbstractTreeNode1) enumerator.Current; if (@class.method_6(ref gparam0)) { result = true; @@ -129,8 +128,7 @@ public bool method_6(ref T gparam0) where T : AbstractTreeNode1 } finally { - var disposable = enumerator as IDisposable; - if (disposable != null) + if (enumerator is IDisposable disposable) { disposable.Dispose(); } diff --git a/GHNamespaceB/AbstractTreeNode2.cs b/GHNamespaceB/AbstractTreeNode2.cs index 9986a2f..8e0e477 100644 --- a/GHNamespaceB/AbstractTreeNode2.cs +++ b/GHNamespaceB/AbstractTreeNode2.cs @@ -14,7 +14,7 @@ public abstract class AbstractTreeNode2 : AbstractBaseTreeNode1 public string IntToHex32Bit(int int0) // This is kind of dumb because this is implemented elsewhere already { - var text = int0.ToString("x"); + string text = int0.ToString("x"); while (text.Length < 8) { text = "0" + text; @@ -24,7 +24,7 @@ public string IntToHex32Bit(int int0) // This is kind of dumb because this is im public override Color GetColor() { - if (_colorFlipFlopper = !_colorFlipFlopper) //why would you do this max + if (_colorFlipFlopper = !_colorFlipFlopper) // Why would you do this max { return Color.Ivory; } @@ -33,7 +33,7 @@ public override Color GetColor() public override object Clone() { - var @class = (AbstractTreeNode2) base.Clone(); + AbstractTreeNode2 @class = (AbstractTreeNode2) base.Clone(); @class.vmethod_9(vmethod_8()); return @class; } diff --git a/GHNamespaceB/AsciiRootNode.cs b/GHNamespaceB/AsciiRootNode.cs index 9601597..07e38bb 100644 --- a/GHNamespaceB/AsciiRootNode.cs +++ b/GHNamespaceB/AsciiRootNode.cs @@ -28,7 +28,7 @@ public override void vmethod_13(Stream26 stream260) { Int0 = stream260.ReadInt(); Int1 = stream260.ReadInt(); - var num = stream260.ReadInt(); + int num = stream260.ReadInt(); stream260.ReadInt(); if (num != 0) { @@ -39,7 +39,7 @@ public override void vmethod_13(Stream26 stream260) public override void vmethod_14(Stream26 stream260) { - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = (vmethod_7() ? (byte) 32 : (byte) 4); array[2] = 3; stream260.WriteByteArray(array, false); diff --git a/GHNamespaceB/FloatArrayNode.cs b/GHNamespaceB/FloatArrayNode.cs index c3a4ec8..c5ef586 100644 --- a/GHNamespaceB/FloatArrayNode.cs +++ b/GHNamespaceB/FloatArrayNode.cs @@ -28,7 +28,7 @@ public override int vmethod_1() public void method_11(IEnumerable ienumerable0) { - foreach (var float_ in ienumerable0) + foreach (float float_ in ienumerable0) { Nodes.Add(new FloatValueNode(float_)); } diff --git a/GHNamespaceB/IntegerArrayNode.cs b/GHNamespaceB/IntegerArrayNode.cs index a2bffe9..9663657 100644 --- a/GHNamespaceB/IntegerArrayNode.cs +++ b/GHNamespaceB/IntegerArrayNode.cs @@ -28,7 +28,7 @@ public override int vmethod_1() public void method_11(IEnumerable ienumerable0) { - foreach (var current in ienumerable0) + foreach (int current in ienumerable0) { Nodes.Add(new IntegerValueNode(current)); } diff --git a/GHNamespaceB/QbScriptNode.cs b/GHNamespaceB/QbScriptNode.cs index 982a60a..ac3b94e 100644 --- a/GHNamespaceB/QbScriptNode.cs +++ b/GHNamespaceB/QbScriptNode.cs @@ -31,9 +31,9 @@ public override int vmethod_1() public override void vmethod_13(Stream26 stream260) { Int0 = stream260.ReadInt(); - var num = stream260.ReadInt(); - var num2 = stream260.ReadInt(); - var byte_ = stream260.ReadBytes(num2, false); + int num = stream260.ReadInt(); + int num2 = stream260.ReadInt(); + byte[] byte_ = stream260.ReadBytes(num2, false); if (num == num2) { Byte0 = byte_; @@ -49,7 +49,7 @@ public override void vmethod_14(Stream26 stream260) { stream260.WriteInt(Int0); stream260.WriteInt(Byte0.Length); - var array = new Class320().method_0(Byte0); + byte[] array = new Class320().method_0(Byte0); if (Byte0.Length <= array.Length) { array = Byte0; @@ -96,7 +96,7 @@ public override void vmethod_2(ref int int1) int1 += 12; if (Byte0 != null) { - var array = new Class320().method_0(Byte0); + byte[] array = new Class320().method_0(Byte0); if (Byte0.Length <= array.Length) { array = Byte0; @@ -108,7 +108,7 @@ public override void vmethod_2(ref int int1) public override object Clone() { - var @class = (QbScriptNode) base.Clone(); + QbScriptNode @class = (QbScriptNode) base.Clone(); @class.Int0 = Int0; @class.Byte0 = new byte[Byte0.Length]; Buffer.BlockCopy(Byte0, 0, @class.Byte0, 0, Byte0.Length); diff --git a/GHNamespaceB/TextRootNode.cs b/GHNamespaceB/TextRootNode.cs index d2992c2..09e108b 100644 --- a/GHNamespaceB/TextRootNode.cs +++ b/GHNamespaceB/TextRootNode.cs @@ -44,7 +44,7 @@ public override void vmethod_13(Stream26 stream260) public override void vmethod_14(Stream26 stream260) { vmethod_9(true); - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = (vmethod_7() ? (byte) 32 : (byte) 4); array[2] = 28; stream260.WriteByteArray(array, false); diff --git a/GHNamespaceB/zzUnkNode260.cs b/GHNamespaceB/zzUnkNode260.cs index 7d67a7a..0b92227 100644 --- a/GHNamespaceB/zzUnkNode260.cs +++ b/GHNamespaceB/zzUnkNode260.cs @@ -12,7 +12,7 @@ public abstract class ZzUnkNode260 : AbstractTreeNode1 public override string GetText() { - var text = (Nodes.Count > 0) ? method_2(0).GetText() : "NULL"; + string text = (Nodes.Count > 0) ? method_2(0).GetText() : "NULL"; if (QbSongClass1.ContainsKey(Int0)) { return QbSongClass1.GetDictString(Int0) + " = " + text; @@ -46,7 +46,7 @@ public override int CompareTo(object target) public override object Clone() { - var @class = (ZzUnkNode260) base.Clone(); + ZzUnkNode260 @class = (ZzUnkNode260) base.Clone(); @class.Int0 = Int0; @class.Int1 = Int1; return @class; diff --git a/GHNamespaceB/zzUnkNode278.cs b/GHNamespaceB/zzUnkNode278.cs index 6e79088..6f47d20 100644 --- a/GHNamespaceB/zzUnkNode278.cs +++ b/GHNamespaceB/zzUnkNode278.cs @@ -10,7 +10,7 @@ public abstract class ZzUnkNode278 : AbsTreeNode11 where T : AbstractBaseT public override void vmethod_13(Stream26 stream260) { - var num = stream260.ReadInt(); + int num = stream260.ReadInt(); if (num == 0) { return; @@ -21,7 +21,7 @@ public override void vmethod_13(Stream26 stream260) } if (this is FloatArrayNode) { - for (var i = 0; i < num; i++) + for (int i = 0; i < num; i++) { Nodes.Add(new FloatValueNode(stream260.ReadFloat())); } @@ -29,7 +29,7 @@ public override void vmethod_13(Stream26 stream260) } if (this is IntegerArrayNode) { - for (var j = 0; j < num; j++) + for (int j = 0; j < num; j++) { Nodes.Add(new IntegerValueNode(stream260.ReadInt())); } @@ -37,7 +37,7 @@ public override void vmethod_13(Stream26 stream260) } if (this is TagArray || this is FileTagArrayNode) { - for (var k = 0; k < num; k++) + for (int k = 0; k < num; k++) { Nodes.Add(new TagValueNode(stream260.ReadInt())); } @@ -46,7 +46,7 @@ public override void vmethod_13(Stream26 stream260) public override void vmethod_14(Stream26 stream260) { - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = 1; array[2] = vmethod_15(); stream260.WriteByteArray(array, false); diff --git a/GHNamespaceB/zzUnkNode294.cs b/GHNamespaceB/zzUnkNode294.cs index d39a947..0b7928f 100644 --- a/GHNamespaceB/zzUnkNode294.cs +++ b/GHNamespaceB/zzUnkNode294.cs @@ -24,7 +24,7 @@ public override int CompareTo(object target) public override string GetText() { - var str = (Nodes.Count > 0) ? method_2(0).GetText() : "NULL"; + string str = (Nodes.Count > 0) ? method_2(0).GetText() : "NULL"; if (QbSongClass1.ContainsKey(Int0)) { return QbSongClass1.GetDictString(Int0) + " = " + str; @@ -43,7 +43,7 @@ public override Color GetColor() public override object Clone() { - var @class = (ZzUnkNode294) base.Clone(); + ZzUnkNode294 @class = (ZzUnkNode294) base.Clone(); @class.Int0 = Int0; return @class; } diff --git a/GHNamespaceB/zzUnkNode295.cs b/GHNamespaceB/zzUnkNode295.cs index d4fd8e6..d8e224b 100644 --- a/GHNamespaceB/zzUnkNode295.cs +++ b/GHNamespaceB/zzUnkNode295.cs @@ -24,10 +24,10 @@ public override void vmethod_13(Stream26 stream260) { Nodes.Add(new TagValueNode(stream260.ReadInt())); } - var num = stream260.ReadInt(); + int num = stream260.ReadInt(); if (num != 0) { - var @class = (Parent is StructureHeaderNode) + AbstractTreeNode1 @class = (Parent is StructureHeaderNode) ? (Parent as StructureHeaderNode).method_11(stream260.ReadIntAt(num)) : vmethod_12(stream260.ReadIntAt(num, true)); method_1().Nodes.Add(@class); @@ -39,34 +39,33 @@ public override void vmethod_14(Stream26 stream260) { if (vmethod_8()) { - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = 1; array[2] = (byte) (vmethod_15() - 128); stream260.WriteByteArray(array, false); } else { - var array2 = new byte[4]; + byte[] array2 = new byte[4]; array2[1] = vmethod_15(); stream260.WriteByteArray(array2, false); } stream260.WriteInt(Int0); if (Nodes.Count != 0) { - var enumerator = Nodes.GetEnumerator(); + System.Collections.IEnumerator enumerator = Nodes.GetEnumerator(); try { while (enumerator.MoveNext()) { - var @class = (AbstractTreeNode2) enumerator.Current; + AbstractTreeNode2 @class = (AbstractTreeNode2) enumerator.Current; stream260.WriteByteArray(@class.vmethod_8()); } goto IL_AA; } finally { - var disposable = enumerator as IDisposable; - if (disposable != null) + if (enumerator is IDisposable disposable) { disposable.Dispose(); } diff --git a/GHNamespaceC/AsciiStructureNode.cs b/GHNamespaceC/AsciiStructureNode.cs index 2f94553..ea0f269 100644 --- a/GHNamespaceC/AsciiStructureNode.cs +++ b/GHNamespaceC/AsciiStructureNode.cs @@ -51,8 +51,8 @@ public string method_8() public override void vmethod_13(Stream26 stream260) { Int0 = stream260.ReadInt(); - var num = stream260.ReadInt(); - var num2 = stream260.ReadInt(); + int num = stream260.ReadInt(); + int num2 = stream260.ReadInt(); if (num != 0) { Nodes.Add(new AsciiValueNode(stream260.ReadAsciiStringAt(num))); @@ -60,7 +60,7 @@ public override void vmethod_13(Stream26 stream260) } if (num2 != 0) { - var @class = (Parent is StructureHeaderNode) + AbstractTreeNode1 @class = (Parent is StructureHeaderNode) ? (Parent as StructureHeaderNode).method_11(stream260.ReadIntAt(num2)) : vmethod_12(stream260.ReadIntAt(num2, true)); method_1().Nodes.Add(@class); @@ -72,19 +72,19 @@ public override void vmethod_14(Stream26 stream260) { if (vmethod_8()) { - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = 1; array[2] = 3; stream260.WriteByteArray(array, false); } else { - var array2 = new byte[4]; + byte[] array2 = new byte[4]; array2[1] = (byte) (vmethod_7() ? 131 : 7); stream260.WriteByteArray(array2, false); } stream260.WriteInt(Int0); - var int_ = (int) stream260.Position + 4; + int int_ = (int) stream260.Position + 4; if (Nodes.Count != 0) { stream260.WriteInt((int) stream260.Position + 8); @@ -97,7 +97,7 @@ public override void vmethod_14(Stream26 stream260) { stream260.WriteInt(0); } - var num = (int) stream260.Position; + int num = (int) stream260.Position; if (method_1().Nodes.IndexOf(this) < method_1().Nodes.Count - 1) { stream260.WriteIntAt(int_, num); diff --git a/GHNamespaceC/Class320.cs b/GHNamespaceC/Class320.cs index 804dbf7..04fffb1 100644 --- a/GHNamespaceC/Class320.cs +++ b/GHNamespaceC/Class320.cs @@ -26,7 +26,7 @@ public class Class320 public byte[] method_0(byte[] byte1) { MemoryStream memoryStream2; - using (var memoryStream = new MemoryStream(byte1)) + using (MemoryStream memoryStream = new MemoryStream(byte1)) { MemoryStream memoryStream3; memoryStream2 = (memoryStream3 = new MemoryStream()); @@ -55,29 +55,29 @@ public void method_1(Stream stream0, Stream stream1) { throw new IOException("Output stream is not writable."); } - var num = Int0 - Int1; - var num2 = 0; - var num3 = 1; - var array = new byte[17]; + int num = Int0 - Int1; + int num2 = 0; + int num3 = 1; + byte[] array = new byte[17]; byte b = 1; - var num4 = stream0.Length - stream0.Position; - for (var i = Int0 + 1; i <= Int0 + 256; i++) + long num4 = stream0.Length - stream0.Position; + for (int i = Int0 + 1; i <= Int0 + 256; i++) { _int6[i] = Int0; } - for (var i = 0; i < Int0; i++) + for (int i = 0; i < Int0; i++) { _int7[i] = Int0; } array[0] = 0; - for (var i = num2; i < _byte0.Length; i++) + for (int i = num2; i < _byte0.Length; i++) { _byte0[i] = 32; } int j; for (j = 0; j < Int1; j++) { - var exprC0 = num4; + long exprC0 = num4; num4 = exprC0 - 1L; if (exprC0 <= 0L) { @@ -85,7 +85,7 @@ public void method_1(Stream stream0, Stream stream1) } _byte0[num + j] = (byte) stream0.ReadByte(); } - for (var i = 1; i <= Int1; i++) + for (int i = 1; i <= Int1; i++) { method_2(num - i); } @@ -99,8 +99,8 @@ public void method_1(Stream stream0, Stream stream1) if (_int4 <= Int2) { _int4 = 1; - var expr136Cp0 = array; - var expr136Cp1 = 0; + byte[] expr136Cp0 = array; + int expr136Cp1 = 0; expr136Cp0[expr136Cp1] |= b; array[num3++] = _byte0[num]; } @@ -117,14 +117,14 @@ public void method_1(Stream stream0, Stream stream1) stream1.WriteByte(array[i]); } array[0] = 0; - var arg_1Bc0 = 1; + int arg_1Bc0 = 1; b = 1; num3 = arg_1Bc0; } - var num5 = _int4; + int num5 = _int4; for (i = 0; i < num5; i++) { - var expr_1Cc = num4; + long expr_1Cc = num4; num4 = expr_1Cc - 1L; if (expr_1Cc <= 0L) { @@ -153,7 +153,7 @@ public void method_1(Stream stream0, Stream stream1) } while (j > 0); if (num3 > 1) { - for (var i = 0; i < num3; i++) + for (int i = 0; i < num3; i++) { stream1.WriteByte(array[i]); } @@ -162,8 +162,8 @@ public void method_1(Stream stream0, Stream stream1) private void method_2(int int8) { - var num = 1; - var num2 = Int0 + 1 + _byte0[int8]; + int num = 1; + int num2 = Int0 + 1 + _byte0[int8]; _int6[int8] = (_int5[int8] = Int0); _int4 = 0; while (true) @@ -184,7 +184,7 @@ private void method_2(int int8) } num2 = _int5[num2]; } - var num3 = 1; + int num3 = 1; while (num3 < Int1 && (num = _byte0[int8 + num3] - _byte0[num2 + num3]) == 0) { num3++; @@ -269,7 +269,7 @@ private void method_3(int int8) public byte[] method_4(byte[] byte1) { MemoryStream memoryStream2; - using (var memoryStream = new MemoryStream(byte1)) + using (MemoryStream memoryStream = new MemoryStream(byte1)) { MemoryStream memoryStream3; memoryStream2 = (memoryStream3 = new MemoryStream()); @@ -298,10 +298,10 @@ public void method_5(Stream stream0, Stream stream1) { throw new IOException("Output stream is not writable."); } - var num = Int0 - Int1; - var num2 = 0; - var num3 = stream0.Length - stream0.Position; - for (var i = 0; i < _byte0.Length; i++) + int num = Int0 - Int1; + int num2 = 0; + long num3 = stream0.Length - stream0.Position; + for (int i = 0; i < _byte0.Length; i++) { _byte0[i] = 32; } @@ -325,7 +325,7 @@ public void method_5(Stream stream0, Stream stream1) int num5 = (byte) stream0.ReadByte(); num4 |= (num5 & 240) << 4; num5 = (num5 & 15) + Int2; - for (var j = 0; j <= num5; j++) + for (int j = 0; j <= num5; j++) { stream1.WriteByte(_byte0[num++] = _byte0[num4 + j & Int0 - 1]); num &= Int0 - 1; diff --git a/GHNamespaceC/Class324.cs b/GHNamespaceC/Class324.cs index d216218..28c6b9b 100644 --- a/GHNamespaceC/Class324.cs +++ b/GHNamespaceC/Class324.cs @@ -53,7 +53,7 @@ public virtual void vmethod_0(Stream26 stream260) if (num == 10) { stream260.Position -= 1L; - var @class = new Class324(); + Class324 @class = new Class324(); @class.vmethod_0(stream260); List0.Add(@class); } @@ -64,7 +64,7 @@ public virtual void vmethod_0(Stream26 stream260) break; } stream260.Position -= 1L; - var class2 = new ZzStreamClass325(); + ZzStreamClass325 class2 = new ZzStreamClass325(); class2.vmethod_0(stream260); List0.Add(class2); } @@ -75,7 +75,7 @@ public virtual void vmethod_1(Stream26 stream260) { stream260.WriteByte2(10); stream260.WriteInt(Int0[0]); - foreach (var current in List0) + foreach (Class324 current in List0) { current.vmethod_1(stream260); } @@ -89,9 +89,9 @@ public Class324 method_0(Class324 class3240) { return this; } - foreach (var current in List0) + foreach (Class324 current in List0) { - var @class = current.method_0(class3240); + Class324 @class = current.method_0(class3240); if (@class != null) { return @class; @@ -102,11 +102,11 @@ public Class324 method_0(Class324 class3240) public void method_1(string string0) { - using (var stream = new Stream26(File.Create(string0 + "\\s000.d"))) + using (Stream26 stream = new Stream26(File.Create(string0 + "\\s000.d"))) { vmethod_1(stream); stream.WriteByte2(0); - using (var stream2 = new Stream26(File.Create(string0 + "\\toc.dat"))) + using (Stream26 stream2 = new Stream26(File.Create(string0 + "\\toc.dat"))) { stream2.WriteInt(0); stream2.WriteByte2(4); @@ -133,7 +133,7 @@ public void method_1(string string0) stream2.WriteInt(756937245); stream2.WriteNBytes(0, 12); stream2.Position = 4L; - var num = KeyGenerator.GetQbKey(stream2, true); + int num = KeyGenerator.GetQbKey(stream2, true); stream2.Position = 0L; stream2.WriteInt(num); stream.Position = stream.Length; diff --git a/GHNamespaceC/ProbablyRootNode.cs b/GHNamespaceC/ProbablyRootNode.cs index 9acc06d..d4b74f9 100644 --- a/GHNamespaceC/ProbablyRootNode.cs +++ b/GHNamespaceC/ProbablyRootNode.cs @@ -12,11 +12,11 @@ public override void vmethod_13(Stream26 stream260) { Int0 = stream260.ReadInt(); Int1 = stream260.ReadInt(); - var num = stream260.ReadInt(); + int num = stream260.ReadInt(); stream260.ReadInt(); if (num != 0) { - var @class = vmethod_12(stream260.ReadIntAt(num, true)); + AbstractTreeNode1 @class = vmethod_12(stream260.ReadIntAt(num, true)); Nodes.Add(@class); @class.method_4(stream260); } @@ -24,7 +24,7 @@ public override void vmethod_13(Stream26 stream260) public override void vmethod_14(Stream26 stream260) { - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = (vmethod_7() ? (byte) 32 : (byte) 4); array[2] = vmethod_16(); stream260.WriteByteArray(array, false); diff --git a/GHNamespaceC/TexFile.cs b/GHNamespaceC/TexFile.cs index 8eff2d0..273e10a 100644 --- a/GHNamespaceC/TexFile.cs +++ b/GHNamespaceC/TexFile.cs @@ -53,9 +53,9 @@ public void Initialize() { _fileStream = new Stream26(File.Open(_fileName, FileMode.Open, FileAccess.Read, FileShare.Read), true); } - var num = 1; - var num2 = _fileStream.ReadUShort(); - var num3 = 0; + int num = 1; + ushort num2 = _fileStream.ReadUShort(); + int num3 = 0; if (num2 == 0xFACE) // Hey man he was in my face { _unkFlag0 = false; @@ -86,7 +86,7 @@ public void Initialize() public void ReplaceTexture(int index, Image img, ImgPixelFormat format) { - var texMetaData = TextureList[index]; + TextureMetadata texMetaData = TextureList[index]; texMetaData.Height = (short) img.Height; texMetaData.Width = (short) img.Width; texMetaData.Data = new DdsTexture(img, texMetaData.MipMapCount, format).ToByteArray(); @@ -128,9 +128,9 @@ public void WriteEverythingToFile() public Stream26 ToStream() { - var stream = new Stream26(true); - var textureCount = TextureCount(); - var textureMetaDataOffset = 0; + Stream26 stream = new Stream26(true); + int textureCount = TextureCount(); + int textureMetaDataOffset = 0; if (!_unkFlag0) { stream.WriteUInt(0xFACECAA7); //meow @@ -140,7 +140,7 @@ public Stream26 ToStream() stream.WriteInt(0); stream.WriteInt(-1); - var num3 = 2; + int num3 = 2; while (textureCount / Math.Pow(2.0, num3 - 2) > 1.0) { num3++; @@ -156,10 +156,10 @@ public Stream26 ToStream() stream.Position = textureMetaDataOffset; } stream.WriteNBytes(0, 40 * textureCount); - for (var i = 0; i < textureCount; i++) + for (int i = 0; i < textureCount; i++) { - var tex = TextureList[i]; - var array = GetRawTextureData(i); + TextureMetadata tex = TextureList[i]; + byte[] array = GetRawTextureData(i); stream.WriteShortAt(textureMetaDataOffset + 40 * i, 2600); stream.WriteShort(tex.UnkFlags); stream.WriteInt(tex.Key); @@ -182,7 +182,7 @@ public Stream26 ToStream() public void WriteEverythingToFile(string fileName) { - var stream = ToStream(); + Stream26 stream = ToStream(); if (_fileStream != null && _fileName == fileName) { _fileStream.Close(); @@ -206,8 +206,8 @@ public void Dispose() public int CloneTextureElement(int index) { - var original = TextureList[index]; - var newMeta = new TextureMetadata(original.UnkFlags, original.Key, original.Width, original.Height, + TextureMetadata original = TextureList[index]; + TextureMetadata newMeta = new TextureMetadata(original.UnkFlags, original.Key, original.Width, original.Height, original.UnkShort3, original.MipMapCount, original.UnkShort4, original.StartIndex, original.Length); TextureList.Add(newMeta); return TextureList.Count - 1; diff --git a/GHNamespaceC/UnicodeArrayNode.cs b/GHNamespaceC/UnicodeArrayNode.cs index c05d01c..7809d43 100644 --- a/GHNamespaceC/UnicodeArrayNode.cs +++ b/GHNamespaceC/UnicodeArrayNode.cs @@ -23,16 +23,16 @@ public override int vmethod_1() public override void vmethod_13(Stream26 stream260) { - var num = stream260.ReadInt(); + int num = stream260.ReadInt(); if (num == 0) { return; } - var array = new int[num]; + int[] array = new int[num]; if (num > 1) { stream260.Position = stream260.ReadInt(); - for (var i = 0; i < num; i++) + for (int i = 0; i < num; i++) { array[i] = stream260.ReadInt(); } @@ -41,10 +41,10 @@ public override void vmethod_13(Stream26 stream260) { array[0] = stream260.ReadInt(); } - var array2 = array; - for (var j = 0; j < array2.Length; j++) + int[] array2 = array; + for (int j = 0; j < array2.Length; j++) { - var int_ = array2[j]; + int int_ = array2[j]; Nodes.Add(new UnicodeValueNode(stream260.ReadUnicodeStringAt(int_))); } stream260.Position += smethod_0(stream260.Position); @@ -52,7 +52,7 @@ public override void vmethod_13(Stream26 stream260) public override void vmethod_14(Stream26 stream260) { - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = 1; array[2] = 4; stream260.WriteByteArray(array, false); @@ -65,8 +65,8 @@ public override void vmethod_14(Stream26 stream260) { stream260.WriteInt((int) stream260.Position + 4); } - var num = (int) stream260.Position + 4 * Nodes.Count; - var stream = new Stream26(); + int num = (int) stream260.Position + 4 * Nodes.Count; + Stream26 stream = new Stream26(); foreach (UnicodeValueNode @class in Nodes) { stream260.WriteInt(num); diff --git a/GHNamespaceC/ZonePakLoader.cs b/GHNamespaceC/ZonePakLoader.cs index 7c3ba80..23a6a97 100644 --- a/GHNamespaceC/ZonePakLoader.cs +++ b/GHNamespaceC/ZonePakLoader.cs @@ -22,24 +22,24 @@ public class ZonePakLoader public void method_0(Delegate8 delegate81) { - var @delegate = _delegate80; + Delegate8 @delegate = _delegate80; Delegate8 delegate2; do { delegate2 = @delegate; - var value = (Delegate8) Delegate.Combine(delegate2, delegate81); + Delegate8 value = (Delegate8) Delegate.Combine(delegate2, delegate81); @delegate = Interlocked.CompareExchange(ref _delegate80, value, delegate2); } while (@delegate != delegate2); } public void method_1(Delegate9 delegate91) { - var @delegate = _delegate90; + Delegate9 @delegate = _delegate90; Delegate9 delegate2; do { delegate2 = @delegate; - var value = (Delegate9) Delegate.Combine(delegate2, delegate91); + Delegate9 value = (Delegate9) Delegate.Combine(delegate2, delegate91); @delegate = Interlocked.CompareExchange(ref _delegate90, value, delegate2); } while (@delegate != delegate2); } @@ -52,13 +52,13 @@ public ZonePakLoader(string dataDirectory) public void method_2() { _delegate90(0, "*.tex.xen"); - var treeNode = new TreeNode("Data"); - var files = Directory.GetFiles(_dataDirectory.Remove(_dataDirectory.Length - 1), "*.tex.xen", + TreeNode treeNode = new TreeNode("Data"); + string[] files = Directory.GetFiles(_dataDirectory.Remove(_dataDirectory.Length - 1), "*.tex.xen", SearchOption.AllDirectories); - var array = files; - for (var i = 0; i < array.Length; i++) + string[] array = files; + for (int i = 0; i < array.Length; i++) { - var text = array[i]; + string text = array[i]; method_3(treeNode, new List(text.Substring(_dataDirectory.Length) .Split(new[] { @@ -71,10 +71,10 @@ public void method_2() _delegate90(1, "*.img.xen"); files = Directory.GetFiles(_dataDirectory.Remove(_dataDirectory.Length - 1), "*.img.xen", SearchOption.AllDirectories); - var array2 = files; - for (var j = 0; j < array2.Length; j++) + string[] array2 = files; + for (int j = 0; j < array2.Length; j++) { - var text2 = array2[j]; + string text2 = array2[j]; method_3(treeNode, new List(text2.Substring(_dataDirectory.Length) .Split(new[] { @@ -84,26 +84,26 @@ public void method_2() .ToolTipText = text2; } - var num = QbSongClass1.AddKeyToDictionary(".tex"); - var num2 = QbSongClass1.AddKeyToDictionary(".img"); + int num = QbSongClass1.AddKeyToDictionary(".tex"); + int num2 = QbSongClass1.AddKeyToDictionary(".img"); files = Directory.GetFiles(_dataDirectory.Remove(_dataDirectory.Length - 1), "*.pak.xen", SearchOption.AllDirectories); - var num3 = 0; - var array3 = files; - for (var k = 0; k < array3.Length; k++) + int num3 = 0; + string[] array3 = files; + for (int k = 0; k < array3.Length; k++) { - var text3 = array3[k]; + string text3 = array3[k]; _delegate90(1 + (int) (98.0 * ++num3 / files.Length), KeyGenerator.GetFileName(text3)); try { - using (var @class = File.Exists(text3.Replace(".pak.xen", ".pab.xen")) + using (ZzPakNode2 @class = File.Exists(text3.Replace(".pak.xen", ".pab.xen")) ? new ZzPabNode(text3, text3.Replace(".pak.xen", ".pab.xen"), false) : new ZzPakNode2(text3, false)) { - var list = new List(); - foreach (var current in @class.List0) + List list = new List(); + foreach (INterface12 current in @class.List0) { - var num4 = current.imethod_7(); + int num4 = current.imethod_7(); if (current.imethod_4() == num || current.imethod_4() == num2) { list.Add(new TreeNode(QbSongClass1.ContainsKey(num4) diff --git a/GHNamespaceC/zzPabNode.cs b/GHNamespaceC/zzPabNode.cs index de19beb..2f5bec0 100644 --- a/GHNamespaceC/zzPabNode.cs +++ b/GHNamespaceC/zzPabNode.cs @@ -54,34 +54,34 @@ private void method_19() { Class3180 = new ZzPakNode2(String1, false); } - using (var stream = new Stream26(File.Open(String0, FileMode.Open, FileAccess.Read, FileShare.Read))) + using (Stream26 stream = new Stream26(File.Open(String0, FileMode.Open, FileAccess.Read, FileShare.Read))) { - var num = 0; - var num2 = (int) stream.Length; + int num = 0; + int num2 = (int) stream.Length; if (num2 == 0) { throw new Exception("Pak File is empty!"); } - var int_ = stream.ReadInt(); + int int_ = stream.ReadInt(); stream.ReverseEndianness = (Bool2 = (!QbSongClass1.ContainsKey(int_) || !QbSongClass1.GetDictString(int_).StartsWith("."))); Bool3 = (stream.ReadInt() < stream.Length); - var @enum = (Enum35) stream.ReadIntAt(28); + Enum35 @enum = (Enum35) stream.ReadIntAt(28); Bool1 = ((@enum & Enum35.Flag3) == Enum35.Flag0); Int0 = stream.ReadIntAt(Bool1 ? 12 : 16, Bool2 && (@enum & Enum35.Flag4) == Enum35.Flag0 && (@enum & Enum35.Flag5) == Enum35.Flag0); while (true) { - var enum2 = (Enum35) stream.ReadIntAt(num + 28, false); - var bool_ = Bool2 && (enum2 & Enum35.Flag4) == Enum35.Flag0 && + Enum35 enum2 = (Enum35) stream.ReadIntAt(num + 28, false); + bool bool_ = Bool2 && (enum2 & Enum35.Flag4) == Enum35.Flag0 && (enum2 & Enum35.Flag5) == Enum35.Flag0; - var num3 = stream.ReadIntAt(num, bool_); + int num3 = stream.ReadIntAt(num, bool_); if (QbSongClass1.ContainsKey(num3) && (QbSongClass1.GetDictString(num3).Equals(".last") || QbSongClass1.GetDictString(num3).Equals("last"))) { break; } - var num4 = stream.ReadInt(bool_); + int num4 = stream.ReadInt(bool_); if (!Bool3) { num4 = num4 - num2 + num; @@ -90,16 +90,16 @@ private void method_19() { num4 = 0; } - var int2 = stream.ReadInt(bool_); - var num5 = stream.ReadIntAt(num + (Bool1 ? 16 : 12), bool_); - var num6 = stream.ReadIntAt(num + 20, bool_); - var int3 = stream.ReadInt(bool_); + int int2 = stream.ReadInt(bool_); + int num5 = stream.ReadIntAt(num + (Bool1 ? 16 : 12), bool_); + int num6 = stream.ReadIntAt(num + 20, bool_); + int int3 = stream.ReadInt(bool_); stream.Position += 4L; if ((enum2 & Enum35.Flag3) != Enum35.Flag0) { Bool1 = false; - var text = Stream260.ReadString(160); - var num7 = text.IndexOf('\0'); + string text = Stream260.ReadString(160); + int num7 = text.IndexOf('\0'); if (num7 >= 0) { text = text.Substring(0, num7); @@ -133,10 +133,10 @@ private void method_19() } else { - var text2 = "abcdefghijklmnopqrstuvwxyz"; - for (var i = 0; i < text2.Length; i++) + string text2 = "abcdefghijklmnopqrstuvwxyz"; + for (int i = 0; i < text2.Length; i++) { - var c = text2[i]; + char c = text2[i]; if (num5 == KeyGenerator.GetQbKey(c + text, true)) { QbSongClass1.AddKeyToDictionary(c + text); @@ -190,8 +190,8 @@ public override void vmethod_1() public void method_20(string string3, string string4) { - var stream = new Stream26(Bool2); - var stream2 = new Stream26(); + Stream26 stream = new Stream26(Bool2); + Stream26 stream2 = new Stream26(); method_18(stream, stream2); if (Stream260 != null && String0 == string3 && String2 == string4) { diff --git a/GHNamespaceC/zzPakNode1.cs b/GHNamespaceC/zzPakNode1.cs index 13502e3..fb55b75 100644 --- a/GHNamespaceC/zzPakNode1.cs +++ b/GHNamespaceC/zzPakNode1.cs @@ -6,8 +6,7 @@ namespace GHNamespaceC { - //I'm not positive this has to do with pak files yet - + // I'm not positive this has to do with pak files yet public class ZzPakNode1 : TreeNode { public bool Bool0; @@ -39,7 +38,7 @@ public void zzCreateQbFileFrom(string string0, ZzGenericNode1 class3080) public void method_1(string string0, T gparam0) where T : TreeNode { - var @class = string.IsNullOrEmpty(string0) ? this : method_2(KeyGenerator.smethod_10(string0)); + ZzPakNode1 @class = string.IsNullOrEmpty(string0) ? this : method_2(KeyGenerator.smethod_10(string0)); if (@class.Nodes.ContainsKey(gparam0.Text)) { @class.Nodes.RemoveByKey(gparam0.Text); @@ -48,13 +47,13 @@ public void method_1(string string0, T gparam0) where T : TreeNode if (gparam0 is INterface12) { TreeNode treeNode = this; - var level = treeNode.Level; + int level = treeNode.Level; while (level-- != 0) { treeNode = treeNode.Parent; } - var class2 = treeNode as ZzPakNode2; - var @interface = class2.method_10(string0); + ZzPakNode2 class2 = treeNode as ZzPakNode2; + INterface12 @interface = class2.method_10(string0); if (@interface == null) { class2.List0.Add(gparam0 as INterface12); @@ -79,7 +78,7 @@ public ZzPakNode1 method_2(string string0) { return this; } - var list = new List(string0.Split(new[] + List list = new List(string0.Split(new[] { '\\', '/' @@ -109,7 +108,7 @@ public ZzPakNode1 method_3(List list0) } if (!Nodes.ContainsKey(list0[0]) || !(Nodes[list0[0]] is ZzPakNode1)) { - var @class = new ZzPakNode1(list0[0]); + ZzPakNode1 @class = new ZzPakNode1(list0[0]); list0.RemoveAt(0); Nodes.Add(@class); return @class.method_3(list0); @@ -118,7 +117,7 @@ public ZzPakNode1 method_3(List list0) { return (ZzPakNode1) Nodes[list0[0]]; } - var key = list0[0]; + string key = list0[0]; list0.RemoveAt(0); return ((ZzPakNode1) Nodes[key]).method_3(list0); } diff --git a/GHNamespaceC/zzPakNode2.cs b/GHNamespaceC/zzPakNode2.cs index 843eefc..d372938 100644 --- a/GHNamespaceC/zzPakNode2.cs +++ b/GHNamespaceC/zzPakNode2.cs @@ -19,7 +19,7 @@ public class ZzPakNode2 : ZzPakNode1, IEnumerable, IDisposable, IEnumerable List0; - public ZzPakNode2 Class3180; //Linked List?.. + public ZzPakNode2 Class3180; //Linked List? public Dictionary Dictionary0; @@ -95,17 +95,17 @@ private void method_4() { throw new Exception("Pak File is empty!"); } - var num = 0; - var num2 = Stream260.ReadInt(); + int num = 0; + int num2 = Stream260.ReadInt(); Stream260.ReverseEndianness = (Bool2 = (!QbSongClass1.ContainsKey(num2) || !QbSongClass1.GetDictString(num2).StartsWith("."))); - var @enum = (Enum35) Stream260.ReadIntAt(28); + Enum35 @enum = (Enum35) Stream260.ReadIntAt(28); Bool1 = ((@enum & Enum35.Flag3) == Enum35.Flag0); Int0 = Stream260.ReadIntAt(Bool1 ? 12 : 16, Bool2 && (@enum & Enum35.Flag4) == Enum35.Flag0 && (@enum & Enum35.Flag5) == Enum35.Flag0); if (Bool4 && String0 != null) { - var text = KeyGenerator.GetFileName(String0); + string text = KeyGenerator.GetFileName(String0); if (text.Contains("_song")) { QbSongClass1.GenerateSongTrackStuff(text.Substring(0, text.LastIndexOf("_song.pak")).ToLower()); @@ -117,9 +117,9 @@ private void method_4() } while (true) { - var enum2 = (Enum35) Stream260.ReadIntAt(num + 28); - var flag = Bool2 && (enum2 & Enum35.Flag4) == Enum35.Flag0 && (enum2 & Enum35.Flag5) == Enum35.Flag0; - var int_ = Stream260.ReadIntAt(num, flag); + Enum35 enum2 = (Enum35) Stream260.ReadIntAt(num + 28); + bool flag = Bool2 && (enum2 & Enum35.Flag4) == Enum35.Flag0 && (enum2 & Enum35.Flag5) == Enum35.Flag0; + int int_ = Stream260.ReadIntAt(num, flag); if (QbSongClass1.ContainsKey(int_)) { if (QbSongClass1.GetDictString(int_).Equals(".last")) @@ -131,17 +131,17 @@ private void method_4() break; } } - var int2 = Stream260.ReadInt(flag) + num; - var int3 = Stream260.ReadInt(flag); - var num3 = Stream260.ReadIntAt(num + (Bool1 ? 16 : 12), flag); - var num4 = Stream260.ReadIntAt(num + 20, flag); - var int4 = Stream260.ReadInt(flag); + int int2 = Stream260.ReadInt(flag) + num; + int int3 = Stream260.ReadInt(flag); + int num3 = Stream260.ReadIntAt(num + (Bool1 ? 16 : 12), flag); + int num4 = Stream260.ReadIntAt(num + 20, flag); + int int4 = Stream260.ReadInt(flag); Stream260.Position += 4L; if ((enum2 & Enum35.Flag3) != Enum35.Flag0) { Bool1 = false; - var text2 = Stream260.ReadString(160); - var num5 = text2.IndexOf('\0'); + string text2 = Stream260.ReadString(160); + int num5 = text2.IndexOf('\0'); if (num5 >= 0) { text2 = text2.Substring(0, num5); @@ -175,10 +175,10 @@ private void method_4() } else { - var text3 = "abcdefghijklmnopqrstuvwxyz"; - for (var i = 0; i < text3.Length; i++) + string text3 = "abcdefghijklmnopqrstuvwxyz"; + for (int i = 0; i < text3.Length; i++) { - var c = text3[i]; + char c = text3[i]; if (num3 == KeyGenerator.GetQbKey(c + text2, true)) { QbSongClass1.AddKeyToDictionary(c + text2); @@ -229,7 +229,7 @@ public void method_5(int int1, INterface12 interface120) { Nodes.Add(Class3170); } - var @interface = method_11(int1); + INterface12 @interface = method_11(int1); if (@interface == null) { List0.Add(interface120); @@ -250,14 +250,14 @@ public bool zzQbFileExists(string string2) public bool method_7(string string2) { - var @interface = method_10(string2); + INterface12 @interface = method_10(string2); ((TreeNode) @interface).Remove(); return @interface != null && List0.Remove(@interface); } public Class309 ZzGetNode1(string string2) { - var @interface = method_10(string2); + INterface12 @interface = method_10(string2); if (@interface == null) { return null; @@ -266,7 +266,7 @@ public Class309 ZzGetNode1(string string2) { return (Class309) method_15(@interface); } - var @class = @interface.imethod_20(new Class309()); + Class309 @class = @interface.imethod_20(new Class309()); if (Bool4) { ((TreeNode) @interface).Remove(); @@ -281,7 +281,7 @@ public Class309 ZzGetNode1(string string2) public Class328 method_9(string string2) { - var @interface = method_10(string2); + INterface12 @interface = method_10(string2); if (@interface == null) { return null; @@ -290,7 +290,7 @@ public Class328 method_9(string string2) { return (Class328) method_15(@interface); } - var @class = @interface.imethod_20(new Class328()); + Class328 @class = @interface.imethod_20(new Class328()); if (Bool4) { ((TreeNode) @interface).Remove(); @@ -310,7 +310,7 @@ public INterface12 method_10(string string2) public INterface12 method_11(int int1) { - foreach (var current in List0) + foreach (INterface12 current in List0) { if (current.imethod_7() == int1) { @@ -367,7 +367,7 @@ public virtual void vmethod_1() public void method_16(string string2) { - var stream = method_17(); + Stream26 stream = method_17(); if (Stream260 != null && String0 == string2) { Stream260.Close(); @@ -388,8 +388,8 @@ public void method_16(string string2) public Stream26 method_17() { - var stream = new Stream26(Bool2); - var stream2 = new Stream26(); + Stream26 stream = new Stream26(Bool2); + Stream26 stream2 = new Stream26(); method_18(stream, stream2); stream.WriteByteArray(stream2.ReadEverything(), false); stream2.Dispose(); @@ -398,15 +398,15 @@ public Stream26 method_17() private static int smethod_0(long long0, int int1) { - var num = 1 << int1; - var num2 = num - 1; + int num = 1 << int1; + int num2 = num - 1; return (int) (num - (long0 & num2) & num2); } public void method_18(Stream26 stream261, Stream26 stream262) { - var num = 0; - foreach (var current in List0) + int num = 0; + foreach (INterface12 current in List0) { num += (((current.imethod_14() & Enum35.Flag3) == Enum35.Flag0 || !QbSongClass1.ContainsKey(current.imethod_7())) @@ -421,13 +421,13 @@ public void method_18(Stream26 stream261, Stream26 stream262) { num += (Bool2 ? 64 : 48); } - var num2 = 0; - var list = new List(); - foreach (var current2 in List0) + int num2 = 0; + List list = new List(); + foreach (INterface12 current2 in List0) { if (current2 is Class309 && (current2 as Class309).vmethod_8()) { - var string_ = current2.imethod_9().Replace(".qb", ".qs"); + string string_ = current2.imethod_9().Replace(".qb", ".qs"); if (!Class3180.zzQbFileExists(string_)) { if (!current2.imethod_18()) @@ -441,7 +441,7 @@ public void method_18(Stream26 stream261, Stream26 stream262) } else { - var @interface = Class3180.method_10(string_); + INterface12 @interface = Class3180.method_10(string_); if (@interface.imethod_18() || ((Class328) @interface).Dictionary0 != (current2 as Class309).vmethod_10()) { @@ -455,18 +455,18 @@ public void method_18(Stream26 stream261, Stream26 stream262) Class3180.List0.AddRange(list); } int num4; - foreach (var current3 in List0) + foreach (INterface12 current3 in List0) { - var flag = Bool2 && (current3.imethod_14() & Enum35.Flag4) == Enum35.Flag0 && + bool flag = Bool2 && (current3.imethod_14() & Enum35.Flag4) == Enum35.Flag0 && (current3.imethod_14() & Enum35.Flag5) == Enum35.Flag0; - var num3 = current3.imethod_7(); + int num3 = current3.imethod_7(); if (current3.imethod_4() != 0) { stream261.WriteInt(current3.imethod_4(), flag); } else { - var text = QbSongClass1.GetDictString(num3); + string text = QbSongClass1.GetDictString(num3); if (!Bool1 && !text.EndsWith(".qb.ngc") && !text.EndsWith(".qb.ps2")) { stream261.WriteInt(1270999134, flag); @@ -501,11 +501,11 @@ public void method_18(Stream26 stream261, Stream26 stream262) stream261.WriteInt(current3.imethod_10(), flag); stream261.WriteInt(current3.imethod_12(), flag); stream261.WriteInt((int) current3.imethod_14(), false); - var flag2 = false; + bool flag2 = false; if ((current3.imethod_14() & Enum35.Flag3) != Enum35.Flag0 && QbSongClass1.ContainsKey(num3)) { flag2 = true; - var text2 = QbSongClass1.GetDictString(num3); + string text2 = QbSongClass1.GetDictString(num3); if (!current3.imethod_6().EndsWith(".qb.ngc") && !current3.imethod_6().EndsWith(".qb.ps2")) { if (Bool1) diff --git a/GHNamespaceC/zzQbSongObject.cs b/GHNamespaceC/zzQbSongObject.cs index 99d5d90..5e1878f 100644 --- a/GHNamespaceC/zzQbSongObject.cs +++ b/GHNamespaceC/zzQbSongObject.cs @@ -22,7 +22,7 @@ public ZzQbSongObject(string path) : this(KeyGenerator.GetFileName(path, -1).ToL public ZzQbSongObject(string newFileName, byte[] newData) { Data = newData; - var list = new List(Data); + List list = new List(Data); FileName = newFileName; String1 = new string[KeyGenerator.smethod_24(list.GetRange(0, 4).ToArray(), true)]; Int0 = KeyGenerator.smethod_24(list.GetRange(4, 4).ToArray(), true); @@ -36,17 +36,17 @@ public ZzQbSongObject(string newFileName, byte[] newData) FileName + "_coop_guitar", FileName + "_coop_rhythm" }; - var list2 = new List(); - var array2 = array; - for (var i = 0; i < array2.Length; i++) + List list2 = new List(); + string[] array2 = array; + for (int i = 0; i < array2.Length; i++) { - var text = array2[i]; + string text = array2[i]; list2.Add(KeyGenerator.GetQbKey(text, true)); } - var num = 8; - for (var j = 0; j < String1.Length; j++) + int num = 8; + for (int j = 0; j < String1.Length; j++) { - var num2 = KeyGenerator.smethod_24(list.GetRange(num, 4).ToArray(), true); + int num2 = KeyGenerator.smethod_24(list.GetRange(num, 4).ToArray(), true); if (!list2.Contains(num2)) { throw new Exception(string.Concat("Dat File Corrupted: unperdictable CRC value (", num2, @@ -60,7 +60,7 @@ public ZzQbSongObject(string newFileName, byte[] newData) public void method_0(string string2) { - for (var i = 0; i < String1.Length; i++) + for (int i = 0; i < String1.Length; i++) { String1[i] = String1[i].Replace(FileName, string2); } @@ -78,14 +78,14 @@ public ZzQbSongObject(int int1, string[] string2) public void method_1() { - var list = new List(); + List list = new List(); list.AddRange(KeyGenerator.smethod_32(String1.Length, true)); list.AddRange(KeyGenerator.smethod_32(Int0, true)); - for (var i = 0; i < String1.Length; i++) + for (int i = 0; i < String1.Length; i++) { list.AddRange(KeyGenerator.smethod_32(KeyGenerator.GetQbKey(String1[i], true), true)); list.AddRange(KeyGenerator.smethod_32(i, true)); - for (var j = 0; j < 12; j++) + for (int j = 0; j < 12; j++) { list.Add(0); } diff --git a/GHNamespaceC/zzStreamClass325.cs b/GHNamespaceC/zzStreamClass325.cs index a33dc27..8fe18a6 100644 --- a/GHNamespaceC/zzStreamClass325.cs +++ b/GHNamespaceC/zzStreamClass325.cs @@ -11,7 +11,7 @@ public override void vmethod_0(Stream26 stream260) { stream260.ReadInt() }; - var byte_ = Byte0; + byte byte_ = Byte0; switch (byte_) { case 1: @@ -55,7 +55,7 @@ public override void vmethod_1(Stream26 stream260) { stream260.WriteByte2(Byte0); stream260.WriteInt(Int0[0]); - var byte_ = Byte0; + byte byte_ = Byte0; switch (byte_) { case 1: diff --git a/GHNamespaceC/zzTextureClass.cs b/GHNamespaceC/zzTextureClass.cs index 3c16f69..e1f0f1c 100644 --- a/GHNamespaceC/zzTextureClass.cs +++ b/GHNamespaceC/zzTextureClass.cs @@ -8,7 +8,7 @@ namespace GHNamespaceC { public class ZzTextureClass { - //Nonsense names for now to help me remember which is which + // Nonsense names for now to help me remember which is which public struct Tom { public float Float0; @@ -86,17 +86,17 @@ public void method_0(BinaryWriter binaryWriter0) private static void smethod_0() { - for (var i = 0; i < 32; i++) + for (int i = 0; i < 32; i++) { Byte0[i] = (byte) (i << 3 | i >> 2); } - for (var j = 0; j < 64; j++) + for (int j = 0; j < 64; j++) { Byte1[j] = (byte) (j << 2 | j >> 4); } - for (var k = 0; k < 272; k++) + for (int k = 0; k < 272; k++) { - var int_ = smethod_11(k - 8, 0, 255); + int int_ = smethod_11(k - 8, 0, 255); Byte4[k] = Byte0[smethod_2(int_, 31)]; Byte5[k] = Byte1[smethod_2(int_, 63)]; } @@ -107,16 +107,16 @@ private static void smethod_0() private static void smethod_1(ref byte[,] byte6, byte[] byte7, int int0) { - for (var i = 0; i < 256; i++) + for (int i = 0; i < 256; i++) { - var num = 256; - for (var j = 0; j < int0; j++) + int num = 256; + for (int j = 0; j < int0; j++) { - for (var k = 0; k < int0; k++) + for (int k = 0; k < int0; k++) { int num2 = byte7[j]; int num3 = byte7[k]; - var num4 = Math.Abs(num3 + smethod_2(num2 - num3, 85) - i); + int num4 = Math.Abs(num3 + smethod_2(num2 - num3, 85) - i); if (num4 < num) { byte6[i, 0] = (byte) k; @@ -130,15 +130,15 @@ private static void smethod_1(ref byte[,] byte6, byte[] byte7, int int0) private static int smethod_2(int int0, int int1) { - var num = int0 * int1 + 128; + int num = int0 * int1 + 128; return num + (num >> 8) >> 8; } private static Color smethod_3(ushort ushort0) { - var num = (ushort0 & 63488) >> 11; - var num2 = (ushort0 & 2016) >> 5; - var num3 = ushort0 & 31; + int num = (ushort0 & 63488) >> 11; + int num2 = (ushort0 & 2016) >> 5; + int num3 = ushort0 & 31; return Color.FromArgb(0, Byte0[num], Byte1[num2], Byte0[num3]); } @@ -164,17 +164,17 @@ private static void smethod_6(ref Color[] color0, ushort ushort0, ushort ushort1 private static Color[] smethod_7(Color[] color0) { - var array = new Color[color0.Length]; - var array2 = new int[3, 4]; - var array3 = new int[3, 4]; - for (var i = 0; i < 4; i++) + Color[] array = new Color[color0.Length]; + int[,] array2 = new int[3, 4]; + int[,] array3 = new int[3, 4]; + for (int i = 0; i < 4; i++) { - var num = i * 4; - var b = Byte4[color0[num].B + (3 * array3[0, 1] + 5 * array3[0, 0] >> 4) + 8]; + int num = i * 4; + byte b = Byte4[color0[num].B + (3 * array3[0, 1] + 5 * array3[0, 0] >> 4) + 8]; array2[0, 0] = color0[num].B - b; - var b2 = Byte5[color0[num].G + (3 * array3[1, 1] + 5 * array3[1, 0] >> 4) + 8]; + byte b2 = Byte5[color0[num].G + (3 * array3[1, 1] + 5 * array3[1, 0] >> 4) + 8]; array2[1, 0] = color0[num].G - b2; - var b3 = Byte4[color0[num].R + (3 * array3[2, 1] + 5 * array3[2, 0] >> 4) + 8]; + byte b3 = Byte4[color0[num].R + (3 * array3[2, 1] + 5 * array3[2, 0] >> 4) + 8]; array2[2, 0] = color0[num].R - b3; array[num] = Color.FromArgb(b3, b2, b); b = @@ -216,7 +216,7 @@ private static Color[] smethod_7(Color[] color0) b3 = Byte4[color0[num + 3].R + (7 * array2[2, 2] + 5 * array3[2, 3] + array3[2, 2] >> 4) + 8]; array2[2, 3] = color0[num + 3].R - b3; array[num + 3] = Color.FromArgb(b3, b2, b); - var array4 = array2; + int[,] array4 = array2; array2 = array3; array3 = array4; } @@ -225,29 +225,29 @@ private static Color[] smethod_7(Color[] color0) private static uint smethod_8(Color[] color0, Color[] color1, bool bool1) { - var num = 0u; - var num2 = color1[0].R - color1[1].R; - var num3 = color1[0].G - color1[1].G; - var num4 = color1[0].B - color1[1].B; - var array = new int[16]; - for (var i = 0; i < 16; i++) + uint num = 0u; + int num2 = color1[0].R - color1[1].R; + int num3 = color1[0].G - color1[1].G; + int num4 = color1[0].B - color1[1].B; + int[] array = new int[16]; + for (int i = 0; i < 16; i++) { array[i] = color0[i].R * num2 + color0[i].G * num3 + color0[i].B * num4; } - var array2 = new int[4]; - for (var j = 0; j < 4; j++) + int[] array2 = new int[4]; + for (int j = 0; j < 4; j++) { array2[j] = color1[j].R * num2 + color1[j].G * num3 + color1[j].B * num4; } - var num5 = array2[1] + array2[3] >> 1; - var num6 = array2[3] + array2[2] >> 1; - var num7 = array2[2] + array2[0] >> 1; + int num5 = array2[1] + array2[3] >> 1; + int num6 = array2[3] + array2[2] >> 1; + int num7 = array2[2] + array2[0] >> 1; if (!bool1) { - for (var k = 15; k >= 0; k--) + for (int k = 15; k >= 0; k--) { num <<= 2; - var num8 = array[k]; + int num8 = array[k]; if (num8 < num6) { num |= ((num8 < num5) ? 1u : 3u); @@ -260,14 +260,14 @@ private static uint smethod_8(Color[] color0, Color[] color1, bool bool1) } else { - var array3 = new int[4]; - var array4 = new int[4]; + int[] array3 = new int[4]; + int[] array4 = new int[4]; num5 <<= 4; num6 <<= 4; num7 <<= 4; - for (var l = 0; l < 4; l++) + for (int l = 0; l < 4; l++) { - var num9 = (array[l * 4] << 4) + (3 * array4[1] + 5 * array4[0]); + int num9 = (array[l * 4] << 4) + (3 * array4[1] + 5 * array4[0]); int num10; if (num9 < num6) { @@ -278,7 +278,7 @@ private static uint smethod_8(Color[] color0, Color[] color1, bool bool1) num10 = ((num9 < num7) ? 2 : 0); } array3[0] = array[l * 4] - array2[num10]; - var num11 = num10; + int num11 = num10; num9 = (array[l * 4 + 1] << 4) + (7 * array3[0] + 3 * array4[2] + 5 * array4[1] + array4[0]); if (num9 < num6) { @@ -312,7 +312,7 @@ private static uint smethod_8(Color[] color0, Color[] color1, bool bool1) } array3[3] = array[l * 4 + 3] - array2[num10]; num11 |= num10 << 6; - var array5 = array3; + int[] array5 = array3; array3 = array4; array4 = array5; num |= (uint) num11 << l * 8; @@ -323,18 +323,18 @@ private static uint smethod_8(Color[] color0, Color[] color1, bool bool1) private static void smethod_9(Color[] block, out ushort max16, out ushort min16) { - var num = 4; - var array = new int[3]; - var array2 = new int[3]; - var array3 = new int[3]; - for (var i = 0; i < 3; i++) + int num = 4; + int[] array = new int[3]; + int[] array2 = new int[3]; + int[] array3 = new int[3]; + for (int i = 0; i < 3; i++) { int num4; int num3; - var num2 = num3 = (num4 = (block[0].ToArgb() >> i * 8 & 255)); - for (var j = 1; j < 16; j++) + int num2 = num3 = (num4 = (block[0].ToArgb() >> i * 8 & 255)); + for (int j = 1; j < 16; j++) { - var b = (byte) (block[j].ToArgb() >> i * 8 & 255); + byte b = (byte) (block[j].ToArgb() >> i * 8 & 255); num3 += b; num2 = Math.Min(num2, b); num4 = Math.Max(num4, b); @@ -343,16 +343,16 @@ private static void smethod_9(Color[] block, out ushort max16, out ushort min16) array2[i] = num2; array3[i] = num4; } - var array4 = new int[6]; - for (var k = 0; k < 6; k++) + int[] array4 = new int[6]; + for (int k = 0; k < 6; k++) { array4[k] = 0; } - for (var l = 0; l < 16; l++) + for (int l = 0; l < 16; l++) { - var num5 = block[l].R - array[2]; - var num6 = block[l].G - array[1]; - var num7 = block[l].B - array[0]; + int num5 = block[l].R - array[2]; + int num6 = block[l].G - array[1]; + int num7 = block[l].B - array[0]; array4[0] += num5 * num5; array4[1] += num5 * num6; array4[2] += num5 * num7; @@ -360,24 +360,24 @@ private static void smethod_9(Color[] block, out ushort max16, out ushort min16) array4[4] += num6 * num7; array4[5] += num7 * num7; } - var array5 = new float[6]; - for (var m = 0; m < 6; m++) + float[] array5 = new float[6]; + for (int m = 0; m < 6; m++) { array5[m] = array4[m] / 255f; } float num8 = array3[2] - array2[2]; float num9 = array3[1] - array2[1]; float num10 = array3[0] - array2[0]; - for (var n = 0; n < num; n++) + for (int n = 0; n < num; n++) { - var num11 = num8 * array5[0] + num9 * array5[1] + num10 * array5[2]; - var num12 = num8 * array5[1] + num9 * array5[3] + num10 * array5[4]; - var num13 = num8 * array5[2] + num9 * array5[4] + num10 * array5[5]; + float num11 = num8 * array5[0] + num9 * array5[1] + num10 * array5[2]; + float num12 = num8 * array5[1] + num9 * array5[3] + num10 * array5[4]; + float num13 = num8 * array5[2] + num9 * array5[4] + num10 * array5[5]; num8 = num11; num9 = num12; num10 = num13; } - var num14 = Math.Max(Math.Max(Math.Abs(num8), Math.Abs(num9)), Math.Abs(num10)); + float num14 = Math.Max(Math.Max(Math.Abs(num8), Math.Abs(num9)), Math.Abs(num10)); int num15; int num16; int num17; @@ -394,13 +394,13 @@ private static void smethod_9(Color[] block, out ushort max16, out ushort min16) num16 = Convert.ToInt32(num9 * num14); num17 = Convert.ToInt32(num10 * num14); } - var num18 = 2147483647; - var num19 = -2147483647; - var color = default(Color); - var color2 = default(Color); - for (var num20 = 0; num20 < 16; num20++) + int num18 = 2147483647; + int num19 = -2147483647; + Color color = default(Color); + Color color2 = default(Color); + for (int num20 = 0; num20 < 16; num20++) { - var num21 = block[num20].R * num15 + block[num20].G * num16 + block[num20].B * num17; + int num21 = block[num20].R * num15 + block[num20].G * num16 + block[num20].B * num17; if (num21 < num18) { num18 = num21; @@ -432,21 +432,21 @@ private static bool smethod_10(Color[] color0, ref ushort ushort0, ref ushort us 262402, 66562 }; - var num = 0; - var num2 = uint0; - var arg300 = 0; - var num3 = 0; - var num4 = 0; - var num5 = arg300; - var arg380 = 0; - var num6 = 0; - var num7 = 0; - var num8 = arg380; - var i = 0; + int num = 0; + uint num2 = uint0; + int arg300 = 0; + int num3 = 0; + int num4 = 0; + int num5 = arg300; + int arg380 = 0; + int num6 = 0; + int num7 = 0; + int num8 = arg380; + int i = 0; while (i < 16) { - var num9 = (int) (num2 & 3u); - var num10 = array[num9]; + int num9 = (int) (num2 & 3u); + int num10 = array[num9]; int r = color0[i].R; int g = color0[i].G; int b = color0[i].B; @@ -463,17 +463,17 @@ private static bool smethod_10(Color[] color0, ref ushort ushort0, ref ushort us num8 = 3 * num8 - num5; num7 = 3 * num7 - num4; num6 = 3 * num6 - num3; - var num11 = num >> 16; - var num12 = num >> 8 & 255; - var num13 = num & 255; + int num11 = num >> 16; + int num12 = num >> 8 & 255; + int num13 = num & 255; if (num12 != 0 && num11 != 0) { if (num11 * num12 != num13 * num13) { - var num14 = 0.3647059f / (num11 * num12 - num13 * num13); - var num15 = num14 * 63f / 31f; - var num16 = ushort1; - var num17 = ushort0; + float num14 = 0.3647059f / (num11 * num12 - num13 * num13); + float num15 = num14 * 63f / 31f; + ushort num16 = ushort1; + ushort num17 = ushort0; ushort0 = (ushort) (smethod_11(Convert.ToInt32((num5 * num12 - num8 * num13) * num14 + 0.5f), 0, 31) << 11); @@ -513,11 +513,11 @@ private static int smethod_11(int int0, int int1, int int2) private static Jerry smethod_12(Color[] color0, bool bool1) { - var array = new Color[16]; - var color = new Color[4]; + Color[] array = new Color[16]; + Color[] color = new Color[4]; uint num2; - var num = num2 = (uint) color0[0].ToArgb(); - for (var i = 1; i < 16; i++) + uint num = num2 = (uint) color0[0].ToArgb(); + for (int i = 1; i < 16; i++) { num2 = Math.Min(num2, (uint) color0[i].ToArgb()); num = Math.Max(num, (uint) color0[i].ToArgb()); @@ -565,7 +565,7 @@ private static Jerry smethod_12(Color[] color0, bool bool1) } if (num3 < num4) { - var num6 = num3; + ushort num6 = num3; num3 = num4; num4 = num6; num5 ^= 1431655765u; @@ -579,7 +579,7 @@ private static Jerry smethod_12(Color[] color0, bool bool1) private static int smethod_13(float float0, int int0) { - var num = Convert.ToInt32(float0 + 0.5f); + int num = Convert.ToInt32(float0 + 0.5f); if (num < 0) { num = 0; @@ -593,13 +593,13 @@ private static int smethod_13(float float0, int int0) private static byte[] smethod_14(Color[] color0) { - var array = new byte[8]; - for (var i = 0; i < 8; i++) + byte[] array = new byte[8]; + for (int i = 0; i < 8; i++) { - var float_ = color0[2 * i].A * 0.05882353f; - var float2 = color0[2 * i + 1].A * 0.05882353f; - var num = smethod_13(float_, 15); - var num2 = smethod_13(float2, 15); + float float_ = color0[2 * i].A * 0.05882353f; + float float2 = color0[2 * i + 1].A * 0.05882353f; + int num = smethod_13(float_, 15); + int num2 = smethod_13(float2, 15); array[i] = (byte) (num | num2 << 4); } return array; @@ -607,28 +607,28 @@ private static byte[] smethod_14(Color[] color0) private static byte[] smethod_15(Color[] color0) { - var array = new byte[8]; - var num = 0; + byte[] array = new byte[8]; + int num = 0; byte b2; - var b = b2 = color0[0].A; - for (var i = 1; i < 16; i++) + byte b = b2 = color0[0].A; + for (int i = 1; i < 16; i++) { b2 = Math.Min(b2, color0[i].A); b = Math.Max(b, color0[i].A); } array[num++] = b; array[num++] = b2; - var num2 = b - b2; - var num3 = b2 * 7 - (num2 >> 1); - var num4 = num2 * 4; - var num5 = num2 * 2; - var num6 = 0; - var num7 = 0; - for (var j = 0; j < 16; j++) - { - var num8 = color0[j].A * 7 - num3; - var num9 = num4 - num8 >> 31; - var num10 = num9 & 4; + int num2 = b - b2; + int num3 = b2 * 7 - (num2 >> 1); + int num4 = num2 * 4; + int num5 = num2 * 2; + int num6 = 0; + int num7 = 0; + for (int j = 0; j < 16; j++) + { + int num8 = color0[j].A * 7 - num3; + int num9 = num4 - num8 >> 31; + int num10 = num9 & 4; num8 -= (num4 & num9); num9 = num5 - num8 >> 31; num10 += (num9 & 2); @@ -651,21 +651,21 @@ private static byte[] smethod_15(Color[] color0) public static void smethod_16(Bitmap bitmap0, BinaryWriter binaryWriter0, ImgPixelFormat imgpixelFormat0, bool bool1) { - var height = bitmap0.Height; - var width = bitmap0.Width; + int height = bitmap0.Height; + int width = bitmap0.Width; if (!_bool0) { smethod_0(); } - for (var i = 0; i < height; i += 4) + for (int i = 0; i < height; i += 4) { - for (var j = 0; j < width; j += 4) + for (int j = 0; j < width; j += 4) { - var array = new Color[16]; - var num = 0; - for (var k = 0; k < 4; k++) + Color[] array = new Color[16]; + int num = 0; + for (int k = 0; k < 4; k++) { - for (var l = 0; l < 4; l++) + for (int l = 0; l < 4; l++) { if (j + l < width && i + k < height) { @@ -689,39 +689,39 @@ public static void smethod_16(Bitmap bitmap0, BinaryWriter binaryWriter0, ImgPix public static void smethod_17(BinaryReader binaryReader0, ImageRelatedClass class2190, ImgPixelFormat imgpixelFormat0) { - var array = new Tom[16]; - var num = class2190.method_1(); - var num2 = class2190.method_0(); - for (var i = 0; i < num; i += 4) + Tom[] array = new Tom[16]; + int num = class2190.method_1(); + int num2 = class2190.method_0(); + for (int i = 0; i < num; i += 4) { - for (var j = 0; j < num2; j += 4) + for (int j = 0; j < num2; j += 4) { if (imgpixelFormat0 == ImgPixelFormat.Dxt3) { - var array2 = new ushort[4]; - for (var k = 0; k < 4; k++) + ushort[] array2 = new ushort[4]; + for (int k = 0; k < 4; k++) { - for (var l = 0; l < 4; l++) + for (int l = 0; l < 4; l++) { if (l == 0) { array2[k] = binaryReader0.ReadUInt16(); } array[k * 4 + l].Float0 = (array2[k] & 15) / 15f; - var expr74Cp0 = array2; - var expr74Cp1 = k; + ushort[] expr74Cp0 = array2; + int expr74Cp1 = k; expr74Cp0[expr74Cp1] = (ushort) (expr74Cp0[expr74Cp1] >> 4); } } } else if (imgpixelFormat0 == ImgPixelFormat.Dxt5) { - var array3 = binaryReader0.ReadBytes(2); - var array4 = binaryReader0.ReadBytes(6); - var array5 = new float[8]; + byte[] array3 = binaryReader0.ReadBytes(2); + byte[] array4 = binaryReader0.ReadBytes(6); + float[] array5 = new float[8]; array5[0] = array3[0] / 255f; array5[1] = array3[1] / 255f; - var num3 = 4; + int num3 = 4; if (array3[0] > array3[1]) { num3 = 6; @@ -731,29 +731,29 @@ public static void smethod_17(BinaryReader binaryReader0, ImageRelatedClass clas array5[6] = 0f; array5[7] = 1f; } - var num4 = 1f / (num3 + 1); - for (var m = 0; m < num3; m++) + float num4 = 1f / (num3 + 1); + for (int m = 0; m < num3; m++) { - var num5 = (num3 - m) * num4; - var num6 = (m + 1) * num4; + float num5 = (num3 - m) * num4; + float num6 = (m + 1) * num4; array5[m + 2] = num5 * array3[0] + num6 * array3[1]; } - for (var n = 0; n < 16; n++) + for (int n = 0; n < 16; n++) { //Console.WriteLine("Broken"); - var div = (n * 3) / 8; - var rem = (n * 3) % 8; - var b = (byte) ((array4[div] >> rem) & 7); + int div = (n * 3) / 8; + int rem = (n * 3) % 8; + byte b = (byte) ((array4[div] >> rem) & 7); if (rem > 5) { - var b2 = (byte) ((array4[div + 1] << (8 - rem)) & 0xFF); + byte b2 = (byte) ((array4[div + 1] << (8 - rem)) & 0xFF); b |= (byte) (b2 & 7); } array[n].Float0 = array5[b]; } } - var @struct = Jerry.smethod_0(binaryReader0); - var array6 = new Tom[4]; + Jerry @struct = Jerry.smethod_0(binaryReader0); + Tom[] array6 = new Tom[4]; array6[0].Float1 = ((@struct.Ushort0 & 63488) >> 11) / 31f; array6[0].Float2 = ((@struct.Ushort0 & 2016) >> 5) / 63f; array6[0].Float3 = (@struct.Ushort0 & 31) / 31f; @@ -770,14 +770,14 @@ public static void smethod_17(BinaryReader binaryReader0, ImageRelatedClass clas array6[2] = Tom.smethod_1(Tom.smethod_2(Tom.smethod_0(2f, array6[0]), array6[1]), 0.333333343f); array6[3] = Tom.smethod_1(Tom.smethod_2(array6[0], Tom.smethod_0(2f, array6[1])), 0.333333343f); } - for (var num9 = 0; num9 < 4; num9++) + for (int num9 = 0; num9 < 4; num9++) { - for (var num10 = 0; num10 < 4; num10++) + for (int num10 = 0; num10 < 4; num10++) { if (j + num10 < num2 && i + num9 < num) { - var point = new Point(j + num10, i + num9); - var num11 = @struct.Uint0 & 3u; + Point point = new Point(j + num10, i + num9); + uint num11 = @struct.Uint0 & 3u; if (imgpixelFormat0 == ImgPixelFormat.Dxt1) { class2190.method_6(point, diff --git a/GHNamespaceC/zzUnkNode288.cs b/GHNamespaceC/zzUnkNode288.cs index 91e7a93..2acff8a 100644 --- a/GHNamespaceC/zzUnkNode288.cs +++ b/GHNamespaceC/zzUnkNode288.cs @@ -10,16 +10,16 @@ public abstract class ZzUnkNode288 : AbsTreeNode11 public override void vmethod_13(Stream26 stream260) { - var num = stream260.ReadInt(); + int num = stream260.ReadInt(); if (num == 0) { return; } - var array = new int[num]; + int[] array = new int[num]; if (num > 1) { stream260.Position = stream260.ReadInt(); - for (var i = 0; i < num; i++) + for (int i = 0; i < num; i++) { array[i] = stream260.ReadInt(); } @@ -28,11 +28,11 @@ public override void vmethod_13(Stream26 stream260) { array[0] = stream260.ReadInt(); } - var array2 = array; - for (var j = 0; j < array2.Length; j++) + int[] array2 = array; + for (int j = 0; j < array2.Length; j++) { - var int_ = array2[j]; - var @class = vmethod_12(stream260.ReadIntAt(int_, true)); + int int_ = array2[j]; + AbstractTreeNode1 @class = vmethod_12(stream260.ReadIntAt(int_, true)); Nodes.Add(@class); @class.method_4(stream260); } @@ -40,7 +40,7 @@ public override void vmethod_13(Stream26 stream260) public override void vmethod_14(Stream26 stream260) { - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = 1; array[2] = vmethod_15(); stream260.WriteByteArray(array, false); @@ -53,15 +53,15 @@ public override void vmethod_14(Stream26 stream260) { stream260.WriteInt((int) stream260.Position + 4); } - var int_ = (int) stream260.Position; - var list = new List(Nodes.Count); + int int_ = (int) stream260.Position; + List list = new List(Nodes.Count); stream260.WriteNBytes(0, 4 * Nodes.Count); foreach (AbstractTreeNode1 @class in Nodes) { list.Add((int) stream260.Position); @class.vmethod_14(stream260); } - var num = (int) stream260.Position; + int num = (int) stream260.Position; stream260.WriteEnumerableIntsAt(int_, list); stream260.Position = num; } diff --git a/GHNamespaceC/zzUnkNode300.cs b/GHNamespaceC/zzUnkNode300.cs index da35b7d..62dedbd 100644 --- a/GHNamespaceC/zzUnkNode300.cs +++ b/GHNamespaceC/zzUnkNode300.cs @@ -11,17 +11,17 @@ public abstract class ZzUnkNode300 : ZzUnkNode294 public override void vmethod_13(Stream26 stream260) { Int0 = stream260.ReadInt(); - var num = stream260.ReadInt(); - var num2 = stream260.ReadInt(); + int num = stream260.ReadInt(); + int num2 = stream260.ReadInt(); if (num != 0) { - var @class = vmethod_12(stream260.ReadIntAt(num, true)); + AbstractTreeNode1 @class = vmethod_12(stream260.ReadIntAt(num, true)); Nodes.Add(@class); @class.method_4(stream260); } if (num2 != 0) { - var class2 = (Parent is StructureHeaderNode) + AbstractTreeNode1 class2 = (Parent is StructureHeaderNode) ? (Parent as StructureHeaderNode).method_11(stream260.ReadIntAt(num2)) : vmethod_12(stream260.ReadIntAt(num2, true)); method_1().Nodes.Add(class2); @@ -33,26 +33,26 @@ public override void vmethod_14(Stream26 stream260) { if (vmethod_8()) { - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = 1; array[2] = (byte) (vmethod_15() - 128); stream260.WriteByteArray(array, false); } else { - var array2 = new byte[4]; + byte[] array2 = new byte[4]; array2[1] = vmethod_15(); stream260.WriteByteArray(array2, false); } stream260.WriteInt(Int0); stream260.WriteInt((Nodes.Count != 0) ? ((int) stream260.Position + 8) : 0); - var int_ = (int) stream260.Position; + int int_ = (int) stream260.Position; stream260.WriteInt(0); foreach (AbstractTreeNode1 @class in Nodes) { @class.vmethod_14(stream260); } - var num = (int) stream260.Position; + int num = (int) stream260.Position; if (method_1().Nodes.IndexOf(this) < method_1().Nodes.Count - 1) { stream260.WriteIntAt(int_, num); diff --git a/GHNamespaceD/Class24.cs b/GHNamespaceD/Class24.cs index 8a317da..5f96b5f 100644 --- a/GHNamespaceD/Class24.cs +++ b/GHNamespaceD/Class24.cs @@ -11,16 +11,18 @@ public class Class24 : Class23 public override object vmethod_0(OggClass5 class490, OggClass3 class380) { - var num = 0; - var @class = new Class40(); - @class.Int0 = class380.method_6(24); - @class.Int1 = class380.method_6(24); - @class.Int2 = class380.method_6(24) + 1; - @class.Int3 = class380.method_6(6) + 1; - @class.Int4 = class380.method_6(8); - for (var i = 0; i < @class.Int3; i++) + int num = 0; + Class40 @class = new Class40 { - var num2 = class380.method_6(3); + Int0 = class380.method_6(24), + Int1 = class380.method_6(24), + Int2 = class380.method_6(24) + 1, + Int3 = class380.method_6(6) + 1, + Int4 = class380.method_6(8) + }; + for (int i = 0; i < @class.Int3; i++) + { + int num2 = class380.method_6(3); if (class380.method_6(1) != 0) { num2 |= class380.method_6(5) << 3; @@ -28,7 +30,7 @@ public override object vmethod_0(OggClass5 class490, OggClass3 class380) @class.Int5[i] = num2; num += smethod_3(num2); } - for (var j = 0; j < num; j++) + for (int j = 0; j < num; j++) { @class.Int6[j] = class380.method_6(8); } @@ -37,7 +39,7 @@ public override object vmethod_0(OggClass5 class490, OggClass3 class380) vmethod_2(@class); return null; } - for (var k = 0; k < num; k++) + for (int k = 0; k < num; k++) { if (@class.Int6[k] >= class490.Int19) { @@ -50,20 +52,20 @@ public override object vmethod_0(OggClass5 class490, OggClass3 class380) public override object vmethod_1(OggClass1 class660, Class27 class270, object object0) { - var @class = (Class40) object0; - var class2 = new Class39(); - var num = 0; - var num2 = 0; + Class40 @class = (Class40) object0; + Class39 class2 = new Class39(); + int num = 0; + int num2 = 0; class2.Class400 = @class; class2.Int0 = class270.Int3; class2.Int1 = @class.Int3; class2.Class210 = class660.OggClass4; class2.Class211 = class660.OggClass4[@class.Int4]; - var num3 = class2.Class211.Int0; + int num3 = class2.Class211.Int0; class2.Int3 = new int[class2.Int1][]; - for (var i = 0; i < class2.Int1; i++) + for (int i = 0; i < class2.Int1; i++) { - var num4 = smethod_2(@class.Int5[i]); + int num4 = smethod_2(@class.Int5[i]); if (num4 != 0) { if (num4 > num2) @@ -71,7 +73,7 @@ public override object vmethod_1(OggClass1 class660, Class27 class270, object ob num2 = num4; } class2.Int3[i] = new int[num4]; - for (var j = 0; j < num4; j++) + for (int j = 0; j < num4; j++) { if ((@class.Int5[i] & 1 << j) != 0) { @@ -83,14 +85,14 @@ public override object vmethod_1(OggClass1 class660, Class27 class270, object ob class2.Int4 = (int) Math.Round(Math.Pow(class2.Int1, num3)); class2.Int2 = num2; class2.Int5 = new int[class2.Int4][]; - for (var k = 0; k < class2.Int4; k++) + for (int k = 0; k < class2.Int4; k++) { - var num5 = k; - var num6 = class2.Int4 / class2.Int1; + int num5 = k; + int num6 = class2.Int4 / class2.Int1; class2.Int5[k] = new int[num3]; - for (var l = 0; l < num3; l++) + for (int l = 0; l < num3; l++) { - var num7 = num5 / num6; + int num7 = num5 / num6; num5 -= num7 * num6; num6 /= class2.Int1; class2.Int5[k][l] = num7; @@ -106,24 +108,24 @@ public override void vmethod_2(object object0) [MethodImpl(MethodImplOptions.Synchronized)] public static int smethod_0(OggClass6 class710, object object0, float[][] float0, int int1, int int2) { - var @class = (Class39) object0; - var class40 = @class.Class400; - var int3 = class40.Int2; - var num = @class.Class211.Int0; - var num2 = class40.Int1 - class40.Int0; - var num3 = num2 / int3; - var num4 = (num3 + num - 1) / num; + Class39 @class = (Class39) object0; + Class40 class40 = @class.Class400; + int int3 = class40.Int2; + int num = @class.Class211.Int0; + int num2 = class40.Int1 - class40.Int0; + int num3 = num2 / int3; + int num4 = (num3 + num - 1) / num; if (_int0.Length < int1) { _int0 = new int[int1][][]; - for (var i = 0; i < int1; i++) + for (int i = 0; i < int1; i++) { _int0[i] = new int[num4][]; } } else { - for (var i = 0; i < int1; i++) + for (int i = 0; i < int1; i++) { if (_int0[i] == null || _int0[i].Length < num4) { @@ -131,17 +133,17 @@ public static int smethod_0(OggClass6 class710, object object0, float[][] float0 } } } - for (var j = 0; j < @class.Int2; j++) + for (int j = 0; j < @class.Int2; j++) { - var k = 0; - var num5 = 0; + int k = 0; + int num5 = 0; while (k < num3) { if (j == 0) { - for (var i = 0; i < int1; i++) + for (int i = 0; i < int1; i++) { - var num6 = @class.Class211.method_4(class710.OggClass3); + int num6 = @class.Class211.method_4(class710.OggClass3); if (num6 == -1) { return 0; @@ -153,15 +155,15 @@ public static int smethod_0(OggClass6 class710, object object0, float[][] float0 } } } - var num7 = 0; + int num7 = 0; while (num7 < num && k < num3) { - for (var i = 0; i < int1; i++) + for (int i = 0; i < int1; i++) { - var int4 = class40.Int0 + k * int3; + int int4 = class40.Int0 + k * int3; if ((class40.Int5[_int0[i][num5][num7]] & 1 << j) != 0) { - var class2 = @class.Class210[@class.Int3[_int0[i][num5][num7]][j]]; + OggClass4 class2 = @class.Class210[@class.Int3[_int0[i][num5][num7]][j]]; if (class2 != null) { if (int2 == 0) @@ -190,23 +192,23 @@ public static int smethod_0(OggClass6 class710, object object0, float[][] float0 public static int smethod_1(OggClass6 class710, object object0, float[][] float0, int int1) { - var @class = (Class39) object0; - var class40 = @class.Class400; - var int2 = class40.Int2; - var num = @class.Class211.Int0; - var num2 = class40.Int1 - class40.Int0; - var num3 = num2 / int2; - var num4 = (num3 + num - 1) / num; - var array = new int[num4][]; - for (var i = 0; i < @class.Int2; i++) + Class39 @class = (Class39) object0; + Class40 class40 = @class.Class400; + int int2 = class40.Int2; + int num = @class.Class211.Int0; + int num2 = class40.Int1 - class40.Int0; + int num3 = num2 / int2; + int num4 = (num3 + num - 1) / num; + int[][] array = new int[num4][]; + for (int i = 0; i < @class.Int2; i++) { - var j = 0; - var num5 = 0; + int j = 0; + int num5 = 0; while (j < num3) { if (i == 0) { - var num6 = @class.Class211.method_4(class710.OggClass3); + int num6 = @class.Class211.method_4(class710.OggClass3); if (num6 == -1) { return 0; @@ -217,13 +219,13 @@ public static int smethod_1(OggClass6 class710, object object0, float[][] float0 return 0; } } - var num7 = 0; + int num7 = 0; while (num7 < num && j < num3) { - var int3 = class40.Int0 + j * int2; + int int3 = class40.Int0 + j * int2; if ((class40.Int5[array[num5][num7]] & 1 << i) != 0) { - var class2 = @class.Class210[@class.Int3[array[num5][num7]][i]]; + OggClass4 class2 = @class.Class210[@class.Int3[array[num5][num7]][i]]; if (class2 != null && class2.method_3(float0, int3, int1, class710.OggClass3, int2) == -1) { return 0; @@ -240,8 +242,8 @@ public static int smethod_1(OggClass6 class710, object object0, float[][] float0 public override int vmethod_3(OggClass6 class710, object object0, float[][] float0, int[] int1, int int2) { - var num = 0; - for (var i = 0; i < int2; i++) + int num = 0; + for (int i = 0; i < int2; i++) { if (int1[i] != 0) { @@ -257,7 +259,7 @@ public override int vmethod_3(OggClass6 class710, object object0, float[][] floa public static int smethod_2(int int1) { - var num = 0; + int num = 0; while (int1 != 0) { num++; @@ -268,7 +270,7 @@ public static int smethod_2(int int1) public static int smethod_3(int int1) { - var num = 0; + int num = 0; while (int1 != 0) { num += (int1 & 1); diff --git a/GHNamespaceD/Class25.cs b/GHNamespaceD/Class25.cs index 7e15978..e41022e 100644 --- a/GHNamespaceD/Class25.cs +++ b/GHNamespaceD/Class25.cs @@ -6,7 +6,7 @@ public class Class25 : Class24 { public override int vmethod_3(OggClass6 class710, object object0, float[][] float0, int[] int1, int int2) { - var num = 0; + int num = 0; while (num < int2 && int1[num] == 0) { num++; diff --git a/GHNamespaceD/Class26.cs b/GHNamespaceD/Class26.cs index dcd4510..0297918 100644 --- a/GHNamespaceD/Class26.cs +++ b/GHNamespaceD/Class26.cs @@ -6,8 +6,8 @@ public class Class26 : Class24 { public override int vmethod_3(OggClass6 class710, object object0, float[][] float0, int[] int1, int int2) { - var num = 0; - for (var i = 0; i < int2; i++) + int num = 0; + for (int i = 0; i < int2; i++) { if (int1[i] != 0) { diff --git a/GHNamespaceD/Class29.cs b/GHNamespaceD/Class29.cs index 1c0bda7..5c20578 100644 --- a/GHNamespaceD/Class29.cs +++ b/GHNamespaceD/Class29.cs @@ -270,11 +270,13 @@ public class Class29 : Class28 public override object vmethod_0(OggClass5 class490, OggClass3 class380) { - var num = 0; - var num2 = -1; - var @class = new Class31(); - @class.Int0 = class380.method_6(5); - for (var i = 0; i < @class.Int0; i++) + int num = 0; + int num2 = -1; + Class31 @class = new Class31 + { + Int0 = class380.method_6(5) + }; + for (int i = 0; i < @class.Int0; i++) { @class.Int1[i] = class380.method_6(4); if (num2 < @class.Int1[i]) @@ -282,7 +284,7 @@ public override object vmethod_0(OggClass5 class490, OggClass3 class380) num2 = @class.Int1[i]; } } - for (var j = 0; j < num2 + 1; j++) + for (int j = 0; j < num2 + 1; j++) { @class.Int2[j] = class380.method_6(3) + 1; @class.Int3[j] = class380.method_6(2); @@ -300,7 +302,7 @@ public override object vmethod_0(OggClass5 class490, OggClass3 class380) @class.method_0(); return null; } - for (var k = 0; k < 1 << @class.Int3[j]; k++) + for (int k = 0; k < 1 << @class.Int3[j]; k++) { @class.Int5[j][k] = class380.method_6(8) - 1; if (@class.Int5[j][k] < -1 || @class.Int5[j][k] >= class490.Int19) @@ -311,15 +313,15 @@ public override object vmethod_0(OggClass5 class490, OggClass3 class380) } } @class.Int6 = class380.method_6(2) + 1; - var num3 = class380.method_6(4); - var l = 0; - var m = 0; + int num3 = class380.method_6(4); + int l = 0; + int m = 0; while (l < @class.Int0) { num += @class.Int2[@class.Int1[l]]; while (m < num) { - var num4 = @class.Int7[m + 2] = class380.method_6(num3); + int num4 = @class.Int7[m + 2] = class380.method_6(num3); if (num4 < 0 || num4 >= 1 << num3) { @class.method_0(); @@ -336,43 +338,45 @@ public override object vmethod_0(OggClass5 class490, OggClass3 class380) public override object vmethod_1(OggClass1 class660, Class27 class270, object object0) { - var num = 0; - var array = new int[Int1 + 2]; - var @class = (Class31) object0; - var class2 = new Class32(); - class2.Class310 = @class; - class2.Int7 = @class.Int7[1]; - for (var i = 0; i < @class.Int0; i++) + int num = 0; + int[] array = new int[Int1 + 2]; + Class31 @class = (Class31) object0; + Class32 class2 = new Class32 + { + Class310 = @class, + Int7 = @class.Int7[1] + }; + for (int i = 0; i < @class.Int0; i++) { num += @class.Int2[@class.Int1[i]]; } num += 2; class2.Int6 = num; - for (var j = 0; j < num; j++) + for (int j = 0; j < num; j++) { array[j] = j; } - for (var k = 0; k < num - 1; k++) + for (int k = 0; k < num - 1; k++) { - for (var l = k; l < num; l++) + for (int l = k; l < num; l++) { if (@class.Int7[array[k]] > @class.Int7[array[l]]) { - var num2 = array[l]; + int num2 = array[l]; array[l] = array[k]; array[k] = num2; } } } - for (var m = 0; m < num; m++) + for (int m = 0; m < num; m++) { class2.Int2[m] = array[m]; } - for (var n = 0; n < num; n++) + for (int n = 0; n < num; n++) { class2.Int3[class2.Int2[n]] = n; } - for (var num3 = 0; num3 < num; num3++) + for (int num3 = 0; num3 < num; num3++) { class2.Int1[num3] = @class.Int7[class2.Int2[num3]]; } @@ -394,16 +398,16 @@ public override object vmethod_1(OggClass1 class660, Class27 class270, object ob class2.Int8 = -1; break; } - for (var num4 = 0; num4 < num - 2; num4++) + for (int num4 = 0; num4 < num - 2; num4++) { - var num5 = 0; - var num6 = 1; - var num7 = 0; - var num8 = class2.Int7; - var num9 = @class.Int7[num4 + 2]; - for (var num10 = 0; num10 < num4 + 2; num10++) + int num5 = 0; + int num6 = 1; + int num7 = 0; + int num8 = class2.Int7; + int num9 = @class.Int7[num4 + 2]; + for (int num10 = 0; num10 < num4 + 2; num10++) { - var num11 = @class.Int7[num10]; + int num11 = @class.Int7[num10]; if (num11 > num7 && num11 < num9) { num5 = num10; @@ -427,9 +431,9 @@ public override void vmethod_2(object object0) public override object vmethod_3(OggClass6 class710, object object0, object object1) { - var @class = (Class32) object0; - var class31 = @class.Class310; - var class21 = class710.OggClass1.OggClass4; + Class32 @class = (Class32) object0; + Class31 class31 = @class.Class310; + OggClass4[] class21 = class710.OggClass1.OggClass4; if (class710.OggClass3.method_6(1) == 1) { int[] array = null; @@ -439,7 +443,7 @@ public override object vmethod_3(OggClass6 class710, object object0, object obje } if (array != null && array.Length >= @class.Int6) { - for (var i = 0; i < array.Length; i++) + for (int i = 0; i < array.Length; i++) { array[i] = 0; } @@ -450,15 +454,15 @@ public override object vmethod_3(OggClass6 class710, object object0, object obje } array[0] = class710.OggClass3.method_6(smethod_2(@class.Int8 - 1)); array[1] = class710.OggClass3.method_6(smethod_2(@class.Int8 - 1)); - var j = 0; - var num = 2; + int j = 0; + int num = 2; while (j < class31.Int0) { - var num2 = class31.Int1[j]; - var num3 = class31.Int2[num2]; - var num4 = class31.Int3[num2]; - var num5 = 1 << num4; - var num6 = 0; + int num2 = class31.Int1[j]; + int num3 = class31.Int2[num2]; + int num4 = class31.Int3[num2]; + int num5 = 1 << num4; + int num6 = 0; if (num4 != 0) { num6 = class21[class31.Int4[num2]].method_4(class710.OggClass3); @@ -467,9 +471,9 @@ public override object vmethod_3(OggClass6 class710, object object0, object obje return null; } } - for (var k = 0; k < num3; k++) + for (int k = 0; k < num3; k++) { - var num7 = class31.Int5[num2][num6 & num5 - 1]; + int num7 = class31.Int5[num2][num6 & num5 - 1]; num6 = (int) ((uint) num6 >> num4); if (num7 >= 0) { @@ -486,14 +490,14 @@ public override object vmethod_3(OggClass6 class710, object object0, object obje num += num3; j++; } - for (var l = 2; l < @class.Int6; l++) + for (int l = 2; l < @class.Int6; l++) { - var num8 = smethod_0(class31.Int7[@class.Int5[l - 2]], class31.Int7[@class.Int4[l - 2]], + int num8 = smethod_0(class31.Int7[@class.Int5[l - 2]], class31.Int7[@class.Int4[l - 2]], array[@class.Int5[l - 2]], array[@class.Int4[l - 2]], class31.Int7[l]); - var num9 = @class.Int8 - num8; - var num10 = num8; - var num11 = ((num9 < num10) ? num9 : num10) << 1; - var num12 = array[l]; + int num9 = @class.Int8 - num8; + int num10 = num8; + int num11 = ((num9 < num10) ? num9 : num10) << 1; + int num12 = array[l]; if (num12 != 0) { if (num12 >= num11) @@ -533,11 +537,11 @@ private static int smethod_0(int int2, int int3, int int4, int int5, int int6) { int4 &= 32767; int5 &= 32767; - var num = int5 - int4; - var num2 = int3 - int2; - var num3 = Math.Abs(num); - var num4 = num3 * (int6 - int2); - var num5 = num4 / num2; + int num = int5 - int4; + int num2 = int3 - int2; + int num3 = Math.Abs(num); + int num4 = num3 * (int6 - int2); + int num5 = num4 / num2; if (num < 0) { return int4 - num5; @@ -547,19 +551,19 @@ private static int smethod_0(int int2, int int3, int int4, int int5, int int6) public override int vmethod_4(OggClass6 class710, object object0, object object1, float[] float1) { - var @class = (Class32) object0; - var class31 = @class.Class310; - var num = class710.OggClass1.OggClass5.Int13[class710.Int4] / 2; + Class32 @class = (Class32) object0; + Class31 class31 = @class.Class310; + int num = class710.OggClass1.OggClass5.Int13[class710.Int4] / 2; if (object1 != null) { - var array = (int[]) object1; - var num2 = 0; - var int_ = 0; - var int2 = array[0] * class31.Int6; - for (var i = 1; i < @class.Int6; i++) + int[] array = (int[]) object1; + int num2 = 0; + int int_ = 0; + int int2 = array[0] * class31.Int6; + for (int i = 1; i < @class.Int6; i++) { - var num3 = @class.Int2[i]; - var num4 = array[num3] & 32767; + int num3 = @class.Int2[i]; + int num4 = array[num3] & 32767; if (num4 == array[num3]) { num4 *= class31.Int6; @@ -569,13 +573,13 @@ public override int vmethod_4(OggClass6 class710, object object0, object object1 int2 = num4; } } - for (var j = num2; j < num; j++) + for (int j = num2; j < num; j++) { float1[j] *= float1[j - 1]; } return 1; } - for (var k = 0; k < num; k++) + for (int k = 0; k < num; k++) { float1[k] = 0f; } @@ -584,14 +588,14 @@ public override int vmethod_4(OggClass6 class710, object object0, object object1 private static void smethod_1(int int2, int int3, int int4, int int5, float[] float1) { - var num = int5 - int4; - var num2 = int3 - int2; - var num3 = Math.Abs(num); - var num4 = num / num2; - var num5 = (num < 0) ? (num4 - 1) : (num4 + 1); - var num6 = int2; - var num7 = int4; - var num8 = 0; + int num = int5 - int4; + int num2 = int3 - int2; + int num3 = Math.Abs(num); + int num4 = num / num2; + int num5 = (num < 0) ? (num4 - 1) : (num4 + 1); + int num6 = int2; + int num7 = int4; + int num8 = 0; num3 -= Math.Abs(num4 * num2); float1[num6] *= Float0[num7]; while (++num6 < int3) @@ -612,7 +616,7 @@ private static void smethod_1(int int2, int int3, int int4, int int5, float[] fl private static int smethod_2(int int2) { - var num = 0; + int num = 0; while (int2 != 0) { num++; diff --git a/GHNamespaceD/Class30.cs b/GHNamespaceD/Class30.cs index a22fc77..69ebb57 100644 --- a/GHNamespaceD/Class30.cs +++ b/GHNamespaceD/Class30.cs @@ -10,16 +10,18 @@ public class Class30 : Class28 public override object vmethod_0(OggClass5 class490, OggClass3 class380) { - var @class = new Class36(); - @class.Int0 = class380.method_6(8); - @class.Int1 = class380.method_6(16); - @class.Int2 = class380.method_6(16); - @class.Int3 = class380.method_6(6); - @class.Int4 = class380.method_6(8); - @class.Int5 = class380.method_6(4) + 1; + Class36 @class = new Class36 + { + Int0 = class380.method_6(8), + Int1 = class380.method_6(16), + Int2 = class380.method_6(16), + Int3 = class380.method_6(6), + Int4 = class380.method_6(8), + Int5 = class380.method_6(4) + 1 + }; if (@class.Int0 >= 1 && @class.Int1 >= 1 && @class.Int2 >= 1 && @class.Int5 >= 1) { - for (var i = 0; i < @class.Int5; i++) + for (int i = 0; i < @class.Int5; i++) { @class.Int6[i] = class380.method_6(8); if (@class.Int6[i] < 0 || @class.Int6[i] >= class490.Int19) @@ -34,19 +36,21 @@ public override object vmethod_0(OggClass5 class490, OggClass3 class380) public override object vmethod_1(OggClass1 class660, Class27 class270, object object1) { - var class49 = class660.OggClass5; - var @class = (Class36) object1; - var class2 = new Class37(); - class2.Int2 = @class.Int0; - class2.Int0 = class49.Int13[class270.Int0] / 2; - class2.Int1 = @class.Int2; - class2.Class360 = @class; + OggClass5 class49 = class660.OggClass5; + Class36 @class = (Class36) object1; + Class37 class2 = new Class37 + { + Int2 = @class.Int0, + Int0 = class49.Int13[class270.Int0] / 2, + Int1 = @class.Int2, + Class360 = @class + }; class2.Class630.method_0(class2.Int1, class2.Int2); - var num = class2.Int1 / (float) smethod_0((float) (@class.Int1 / 2.0)); + float num = class2.Int1 / (float) smethod_0((float) (@class.Int1 / 2.0)); class2.Int3 = new int[class2.Int0]; - for (var i = 0; i < class2.Int0; i++) + for (int i = 0; i < class2.Int0; i++) { - var num2 = (int) Math.Floor(smethod_0((float) (@class.Int1 / 2.0 / class2.Int0 * i)) * num); + int num2 = (int) Math.Floor(smethod_0((float) (@class.Int1 / 2.0 / class2.Int0 * i)) * num); if (num2 >= class2.Int1) { num2 = class2.Int1; @@ -58,9 +62,9 @@ public override object vmethod_1(OggClass1 class660, Class27 class270, object ob private static double smethod_0(float float0) { - var num = 13.1 * Math.Atan(0.00074 * float0); - var num2 = 2.24 * Math.Atan(float0 * float0 * 1.85E-08); - var num3 = 0.0001 * float0; + double num = 13.1 * Math.Atan(0.00074 * float0); + double num2 = 2.24 * Math.Atan(float0 * float0 * 1.85E-08); + double num3 = 0.0001 * float0; return num + num2 + num3; } @@ -70,26 +74,26 @@ public override void vmethod_2(object object1) public override object vmethod_3(OggClass6 class710, object object1, object object2) { - var @class = (Class37) object1; - var class36 = @class.Class360; + Class37 @class = (Class37) object1; + Class36 class36 = @class.Class360; float[] array = null; if (object2 is float[]) { array = (float[]) object2; } - var num = class710.OggClass3.method_6(class36.Int3); + int num = class710.OggClass3.method_6(class36.Int3); if (num > 0) { - var num2 = (1 << class36.Int3) - 1; - var num3 = num / (float) num2 * class36.Int4; - var num4 = class710.OggClass3.method_6(smethod_1(class36.Int5)); + int num2 = (1 << class36.Int3) - 1; + float num3 = num / (float) num2 * class36.Int4; + int num4 = class710.OggClass3.method_6(smethod_1(class36.Int5)); if (num4 != -1 && num4 < class36.Int5) { - var class2 = class710.OggClass1.OggClass4[class36.Int6[num4]]; - var num5 = 0f; + OggClass4 class2 = class710.OggClass1.OggClass4[class36.Int6[num4]]; + float num5 = 0f; if (array != null && array.Length >= @class.Int2 + 1) { - for (var i = 0; i < array.Length; i++) + for (int i = 0; i < array.Length; i++) { array[i] = 0f; } @@ -98,17 +102,17 @@ public override object vmethod_3(OggClass6 class710, object object1, object obje { array = new float[@class.Int2 + 1]; } - for (var j = 0; j < @class.Int2; j += class2.Int0) + for (int j = 0; j < @class.Int2; j += class2.Int0) { if (class2.method_2(array, j, class710.OggClass3, class2.Int0) == -1) { return null; } } - var k = 0; + int k = 0; while (k < @class.Int2) { - var l = 0; + int l = 0; while (l < class2.Int0) { array[k] += num5; @@ -126,17 +130,17 @@ public override object vmethod_3(OggClass6 class710, object object1, object obje public override int vmethod_4(OggClass6 class710, object object1, object object2, float[] float0) { - var @class = (Class37) object1; - var class36 = @class.Class360; + Class37 @class = (Class37) object1; + Class36 class36 = @class.Class360; if (object2 != null) { - var array = (float[]) object2; - var float_ = array[@class.Int2]; + float[] array = (float[]) object2; + float float_ = array[@class.Int2]; Class77.smethod_0(float0, @class.Int3, @class.Int0, @class.Int1, array, @class.Int2, float_, class36.Int4); return 1; } - for (var i = 0; i < @class.Int0; i++) + for (int i = 0; i < @class.Int0; i++) { float0[i] = 0f; } @@ -145,7 +149,7 @@ public override int vmethod_4(OggClass6 class710, object object1, object object2 private static int smethod_1(int int0) { - var num = 0; + int num = 0; while (int0 != 0) { num++; diff --git a/GHNamespaceD/Class31.cs b/GHNamespaceD/Class31.cs index 172e61e..a2ea637 100644 --- a/GHNamespaceD/Class31.cs +++ b/GHNamespaceD/Class31.cs @@ -20,7 +20,7 @@ public class Class31 public Class31() { - for (var i = 0; i < Int5.Length; i++) + for (int i = 0; i < Int5.Length; i++) { Int5[i] = new int[8]; } diff --git a/GHNamespaceD/OGGClass3.cs b/GHNamespaceD/OGGClass3.cs index e917fae..14f1ad6 100644 --- a/GHNamespaceD/OGGClass3.cs +++ b/GHNamespaceD/OGGClass3.cs @@ -64,13 +64,13 @@ public void method_1() public int method_2(int int5) { - var num = Int0[int5]; + int num = Int0[int5]; int5 += _int2; if (_int3 + 4 >= _int4 && _int3 + (int5 - 1) / 8 >= _int4) { return -1; } - var num2 = (_byte0[_int1] & 255) >> _int2; + int num2 = (_byte0[_int1] & 255) >> _int2; if (int5 > 8) { num2 |= (_byte0[_int1 + 1] & 255) << 8 - _int2; @@ -109,7 +109,7 @@ public void method_4(byte[] byte1, int int5, int int6) public void method_5(byte[] byte1, int int5) { - var num = 0; + int num = 0; while (int5-- != 0) { byte1[num++] = (byte) method_6(8); @@ -118,7 +118,7 @@ public void method_5(byte[] byte1, int int5) public int method_6(int int5) { - var num = Int0[int5]; + int num = Int0[int5]; int5 += _int2; int num2; if (_int3 + 4 >= _int4) diff --git a/GHNamespaceD/OGGClass4.cs b/GHNamespaceD/OGGClass4.cs index 8ae662b..b5b2d53 100644 --- a/GHNamespaceD/OGGClass4.cs +++ b/GHNamespaceD/OGGClass4.cs @@ -21,7 +21,7 @@ public class OggClass4 [MethodImpl(MethodImplOptions.Synchronized)] public int method_0(float[] float1, int int3, OggClass3 oggClass3, int int4) { - var num = int4 / Int0; + int num = int4 / Int0; if (Int2.Length < num) { Int2 = new int[num]; @@ -29,7 +29,7 @@ public int method_0(float[] float1, int int3, OggClass3 oggClass3, int int4) int i; for (i = 0; i < num; i++) { - var num2 = method_4(oggClass3); + int num2 = method_4(oggClass3); if (num2 == -1) { return -1; @@ -37,10 +37,10 @@ public int method_0(float[] float1, int int3, OggClass3 oggClass3, int int4) Int2[i] = num2 * Int0; } i = 0; - var num3 = 0; + int num3 = 0; while (i < Int0) { - for (var j = 0; j < num; j++) + for (int j = 0; j < num; j++) { float1[int3 + num3 + j] += Float0[Int2[j] + i]; } @@ -54,16 +54,16 @@ public int method_1(float[] float1, int int3, OggClass3 oggClass3, int int4) { if (Int0 > 8) { - var i = 0; + int i = 0; while (i < int4) { - var num = method_4(oggClass3); + int num = method_4(oggClass3); if (num == -1) { return -1; } - var num2 = num * Int0; - var j = 0; + int num2 = num * Int0; + int j = 0; while (j < Int0) { float1[int3 + i++] += Float0[num2 + j++]; @@ -72,17 +72,17 @@ public int method_1(float[] float1, int int3, OggClass3 oggClass3, int int4) } else { - var i = 0; + int i = 0; while (i < int4) { - var num = method_4(oggClass3); + int num = method_4(oggClass3); if (num == -1) { return -1; } - var num2 = num * Int0; - var j = 0; - for (var k = 0; k < Int0; k++) + int num2 = num * Int0; + int j = 0; + for (int k = 0; k < Int0; k++) { float1[int3 + i++] += Float0[num2 + j++]; } @@ -93,16 +93,16 @@ public int method_1(float[] float1, int int3, OggClass3 oggClass3, int int4) public int method_2(float[] float1, int int3, OggClass3 oggClass3, int int4) { - var i = 0; + int i = 0; while (i < int4) { - var num = method_4(oggClass3); + int num = method_4(oggClass3); if (num == -1) { return -1; } - var num2 = num * Int0; - var j = 0; + int num2 = num * Int0; + int j = 0; while (j < Int0) { float1[int3 + i++] = Float0[num2 + j++]; @@ -113,17 +113,17 @@ public int method_2(float[] float1, int int3, OggClass3 oggClass3, int int4) public int method_3(float[][] float1, int int3, int int4, OggClass3 oggClass3, int int5) { - var num = 0; - var i = int3 / int4; + int num = 0; + int i = int3 / int4; while (i < (int3 + int5) / int4) { - var num2 = method_4(oggClass3); + int num2 = method_4(oggClass3); if (num2 == -1) { return -1; } - var num3 = num2 * Int0; - for (var j = 0; j < Int0; j++) + int num3 = num2 * Int0; + for (int j = 0; j < Int0; j++) { float1[num][i] += Float0[num3 + j]; num++; @@ -139,13 +139,13 @@ public int method_3(float[][] float1, int int3, int int4, OggClass3 oggClass3, i public int method_4(OggClass3 oggClass3) { - var num = 0; - var @class = OggData; + int num = 0; + OggData @class = OggData; if (@class == null) { return num; } - var num2 = oggClass3.method_2(@class.Int2); + int num2 = oggClass3.method_2(@class.Int2); if (num2 >= 0) { num = @class.Int0[num2]; @@ -194,20 +194,20 @@ public int method_6(OggClass2 oggClass2) internal static int[] smethod_0(int[] numArray, int num) { - var numArray1 = new int[33]; - var numArray2 = new int[num]; - for (var i = 0; i < num; i++) + int[] numArray1 = new int[33]; + int[] numArray2 = new int[num]; + for (int i = 0; i < num; i++) { - var num1 = numArray[i]; + int num1 = numArray[i]; if (num1 > 0) { - var num2 = numArray1[num1]; + int num2 = numArray1[num1]; if (num1 < 32 && num2 >> (num1 & 31) != 0) { return null; } numArray2[i] = num2; - var num3 = num1; + int num3 = num1; while (true) { if (num3 <= 0) @@ -230,17 +230,17 @@ internal static int[] smethod_0(int[] numArray, int num) break; } } - for (var j = num1 + 1; j < 33 && (ulong) (numArray1[j] >> 1) == (ulong) num2; j++) + for (int j = num1 + 1; j < 33 && (ulong) (numArray1[j] >> 1) == (ulong) num2; j++) { num2 = numArray1[j]; numArray1[j] = numArray1[j - 1] << 1; } } } - for (var k = 0; k < num; k++) + for (int k = 0; k < num; k++) { - var num4 = 0; - for (var l = 0; l < numArray[k]; l++) + int num4 = 0; + for (int l = 0; l < numArray[k]; l++) { num4 = num4 << 1; num4 = num4 | numArray2[k] >> (l & 31) & 1; @@ -252,21 +252,21 @@ internal static int[] smethod_0(int[] numArray, int num) public OggData GetOggData() { - var num = 0; - var oggData = new OggData(); - var array = oggData.Int3 = new int[Int1 * 2]; - var array2 = oggData.Int4 = new int[Int1 * 2]; - var array3 = smethod_0(OggClass2.Int2, OggClass2.Int1); + int num = 0; + OggData oggData = new OggData(); + int[] array = oggData.Int3 = new int[Int1 * 2]; + int[] array2 = oggData.Int4 = new int[Int1 * 2]; + int[] array3 = smethod_0(OggClass2.Int2, OggClass2.Int1); if (array3 == null) { return null; } oggData.Int5 = Int1 * 2; - for (var i = 0; i < Int1; i++) + for (int i = 0; i < Int1; i++) { if (OggClass2.Int2[i] > 0) { - var num2 = 0; + int num2 = 0; int j; for (j = 0; j < OggClass2.Int2[i] - 1; j++) { @@ -302,13 +302,13 @@ public OggData GetOggData() { oggData.Int2 = 5; } - var num3 = 1 << oggData.Int2; + int num3 = 1 << oggData.Int2; oggData.Int0 = new int[num3]; oggData.Int1 = new int[num3]; - for (var k = 0; k < num3; k++) + for (int k = 0; k < num3; k++) { - var num4 = 0; - var num5 = 0; + int num4 = 0; + int num5 = 0; while (num5 < oggData.Int2 && (num4 > 0 || num5 == 0)) { if ((k & 1 << num5) != 0) @@ -330,7 +330,7 @@ public OggData GetOggData() private void PrintArray(int[] array) { Console.Write("{"); - foreach (var i in array) + foreach (int i in array) { Console.Write(i + ", "); } @@ -339,7 +339,7 @@ private void PrintArray(int[] array) public static int smethod_1(int int3) { - var num = 0; + int num = 0; while (int3 != 0) { num++; diff --git a/GHNamespaceE/Class309.cs b/GHNamespaceE/Class309.cs index 945b9f8..17c1299 100644 --- a/GHNamespaceE/Class309.cs +++ b/GHNamespaceE/Class309.cs @@ -167,19 +167,19 @@ public byte[] imethod_16() public void imethod_17(byte[] byte1) { - var stream26 = new Stream26(byte1); + Stream26 stream26 = new Stream26(byte1); ZzGenericNode1 @class; if (Parent != null && Parent is ZzPakNode1 && !(Parent as ZzPakNode1).Bool0) { TreeNode treeNode = this; - var level = treeNode.Level; + int level = treeNode.Level; while (level-- != 0) { treeNode = treeNode.Parent; } if (treeNode is ZzPakNode2 && (treeNode as ZzPakNode2).Class3180 != null) { - var string_ = imethod_9().Contains(".qb") + string string_ = imethod_9().Contains(".qb") ? imethod_9().Replace(".qb", ".qs") : (imethod_9() + ".qs"); if ((treeNode as ZzPakNode2).Class3180.zzQbFileExists(string_)) @@ -254,7 +254,7 @@ public void Dispose() public override object Clone() { - var @interface = (INterface12) base.Clone(); + INterface12 @interface = (INterface12) base.Clone(); @interface.imethod_1(_int0); @interface.imethod_3(_int1); @interface.imethod_5(_int2); diff --git a/GHNamespaceE/Class328.cs b/GHNamespaceE/Class328.cs index dd41f36..e53579b 100644 --- a/GHNamespaceE/Class328.cs +++ b/GHNamespaceE/Class328.cs @@ -85,11 +85,11 @@ public int imethod_2() { return _int1; } - var num = 2; + int num = 2; if (Dictionary0.Count != 0) { num = Dictionary0.Keys.Count * 12 + 1; - foreach (var current in Dictionary0.Keys) + foreach (int current in Dictionary0.Keys) { num += Dictionary0[current].Length; } @@ -179,12 +179,12 @@ public void imethod_15(Enum35 enum351) public byte[] imethod_16() { - var memoryStream = new MemoryStream(); - using (var streamWriter = new StreamWriter(memoryStream, _encoding0)) + MemoryStream memoryStream = new MemoryStream(); + using (StreamWriter streamWriter = new StreamWriter(memoryStream, _encoding0)) { if (Dictionary0 != null && Dictionary0.Count != 0) { - foreach (var current in Dictionary0.Keys) + foreach (int current in Dictionary0.Keys) { streamWriter.Write("{0} \"{1}\"\n", KeyGenerator.ValToHex32Bit(current), Dictionary0[current]); } @@ -201,14 +201,14 @@ public byte[] imethod_16() public void imethod_17(byte[] byte0) { Dictionary0 = new Dictionary(); - var streamReader = new StreamReader(new MemoryStream(byte0), _encoding0); + StreamReader streamReader = new StreamReader(new MemoryStream(byte0), _encoding0); _encoding0 = streamReader.CurrentEncoding; string text; while ((text = streamReader.ReadLine()) != null) { if (!(text == "")) { - var array = text.Split(new[] + string[] array = text.Split(new[] { ' ' }, 2, StringSplitOptions.RemoveEmptyEntries); @@ -268,7 +268,7 @@ public void Dispose() public override object Clone() { - var @class = (Class328) base.Clone(); + Class328 @class = (Class328) base.Clone(); @class.imethod_1(_int0); @class.imethod_3(_int1); @class.imethod_5(_int2); diff --git a/GHNamespaceE/FsbClass3.cs b/GHNamespaceE/FsbClass3.cs index d7f11b5..c6ad942 100644 --- a/GHNamespaceE/FsbClass3.cs +++ b/GHNamespaceE/FsbClass3.cs @@ -11,27 +11,29 @@ public class FsbClass3 public static long smethod_0(string string0, Stream[] stream0) { long length; - using (var @class = new FsbClass1()) + using (FsbClass1 @class = new FsbClass1()) { @class.Byte0 = FsbEncryptionKey; @class.Enum200 = FsbEnum1.Const3; @class.Enum210 = FsbFlags1.Flag0; - for (var i = 0; i < stream0.Length; i++) + for (int i = 0; i < stream0.Length; i++) { - var stream = stream0[i]; + Stream stream = stream0[i]; stream.Position = 0L; - var class2 = AudioManager.smethod_3(stream); - var class3 = new Class168(); - class3.FileName = i + ".mp3"; - class3.Enum220 = (((class2.method_0() == 1) ? FsbFlags2.Flag6 : FsbFlags2.Flag7) | - FsbFlags2.Flag10); - class3.Int0 = class2.method_3(); - class3.Ushort0 = 255; - class3.Short0 = 0; - class3.Ushort1 = 255; - class3.Uint3 = (uint) class2.method_0(); - class3.Uint0 = class2.Uint0; - class3.Uint1 = 0u; + GHNamespace2.Class16 class2 = AudioManager.smethod_3(stream); + Class168 class3 = new Class168 + { + FileName = i + ".mp3", + Enum220 = (((class2.method_0() == 1) ? FsbFlags2.Flag6 : FsbFlags2.Flag7) | + FsbFlags2.Flag10), + Int0 = class2.method_3(), + Ushort0 = 255, + Short0 = 0, + Ushort1 = 255, + Uint3 = (uint)class2.method_0(), + Uint0 = class2.Uint0, + Uint1 = 0u + }; class3.Uint2 = class3.Uint0 - 1u; class3.Float2 = 1f; class3.Float3 = 10000f; diff --git a/GHNamespaceE/QbSongClass1.cs b/GHNamespaceE/QbSongClass1.cs index 704420d..9190fae 100644 --- a/GHNamespaceE/QbSongClass1.cs +++ b/GHNamespaceE/QbSongClass1.cs @@ -32,14 +32,14 @@ public static void smethod_0() public static void AddAllLinesToDictionary(Stream stream, bool useSecondDictionary = false) { - using (var streamReader = new StreamReader(stream)) + using (StreamReader streamReader = new StreamReader(stream)) { string text; while ((text = streamReader.ReadLine()) != null) { if (!text.Equals("")) { - var key = KeyGenerator.GetQbKey(text, true); + int key = KeyGenerator.GetQbKey(text, true); if (!KeyDict1.ContainsKey(key) && !KeyDict2.ContainsKey(key)) { if (useSecondDictionary) @@ -94,7 +94,7 @@ public static void AddStringToDictionary(string str, bool addToTheOtherDictionar { return; } - var key = KeyGenerator.GetQbKey(str, true); + int key = KeyGenerator.GetQbKey(str, true); if (addToTheOtherDictionaryToo && !KeyDict2.ContainsKey(key)) { KeyDict2.Add(key, str); @@ -109,7 +109,7 @@ public static void AddStringToDictionary(string str, bool addToTheOtherDictionar public static int AddKeyToDictionary(string qbName) { qbName = qbName.ToLower(); - var key = KeyGenerator.GetQbKey(qbName, true); + int key = KeyGenerator.GetQbKey(qbName, true); if (!ContainsKey(key)) { KeyDict2.Add(key, qbName); @@ -125,10 +125,10 @@ public static void GenerateSongTrackStuff(string songName) "_male_", "_female_" }; - for (var i = 0; i < singerTypes.Length; i++) + for (int i = 0; i < singerTypes.Length; i++) { - var singerGender = singerTypes[i]; - for (var j = 1; j < 10; j++) + string singerGender = singerTypes[i]; + for (int j = 1; j < 10; j++) { AddStringToDictionary(string.Concat("gh3_singer", singerGender, songName, "_", j)); AddStringToDictionary(string.Concat("gh3_singer", singerGender, songName, "_", j, "b")); @@ -158,9 +158,9 @@ public static void GenerateSongTrackStuff(string songName) "drum_", "aux_" }; - for (var k = 0; k < array2.Length; k++) + for (int k = 0; k < array2.Length; k++) { - var text2 = array2[k]; + string text2 = array2[k]; string[] array3 = { "easy", @@ -168,9 +168,9 @@ public static void GenerateSongTrackStuff(string songName) "hard", "expert" }; - for (var l = 0; l < array3.Length; l++) + for (int l = 0; l < array3.Length; l++) { - var text3 = array3[l]; + string text3 = array3[l]; AddStringToDictionary(songName + "_song_" + text2 + text3); AddStringToDictionary(string.Concat(songName, "_", text2, text3, "_star")); AddStringToDictionary(string.Concat(songName, "_", text2, text3, "_starbattlemode")); diff --git a/GHNamespaceE/TagArrayNode.cs b/GHNamespaceE/TagArrayNode.cs index 08d34b8..048c76e 100644 --- a/GHNamespaceE/TagArrayNode.cs +++ b/GHNamespaceE/TagArrayNode.cs @@ -29,7 +29,7 @@ public override int vmethod_1() public void method_11(IEnumerable ienumerable0) { - foreach (var current in ienumerable0) + foreach (int current in ienumerable0) { Nodes.Add(new TagValueNode(current)); } diff --git a/GHNamespaceE/TexExplorer.cs b/GHNamespaceE/TexExplorer.cs index 668e195..e144c3c 100644 --- a/GHNamespaceE/TexExplorer.cs +++ b/GHNamespaceE/TexExplorer.cs @@ -767,7 +767,7 @@ public TexExplorer(string string2) _string0 = string2; Closed += TexExplorer_Closed; Text = "Texture Explorer - LOOKING FOR TEXTURES (PLEASE WAIT!)"; - var @class = new ZonePakLoader(_string0); + ZonePakLoader @class = new ZonePakLoader(_string0); @class.method_1(UpdateSearchText); @class.method_0(AddNode); _thread0 = new Thread(@class.method_2); @@ -832,7 +832,7 @@ private void DataFolder_TreeView_DoubleClick(object sender, EventArgs e) if (_dataFolderTreeView.SelectedNode.Tag is int && _dataFolderTreeView.SelectedNode.ToolTipText != "") { DisposeTexFile(); - var toolTipText = _dataFolderTreeView.SelectedNode.ToolTipText; + string toolTipText = _dataFolderTreeView.SelectedNode.ToolTipText; ZzPakNode2 pakNode; if (File.Exists(toolTipText.Replace(".pak.xen", ".pab.xen"))) { @@ -844,7 +844,7 @@ private void DataFolder_TreeView_DoubleClick(object sender, EventArgs e) } _currentTexFile = new TexFile(pakNode.method_13((int) _dataFolderTreeView.SelectedNode.Tag)); - for (var i = 1; i <= _currentTexFile.TextureCount(); i++) + for (int i = 1; i <= _currentTexFile.TextureCount(); i++) { _imgList.Items.Add("Image " + i); } @@ -855,7 +855,7 @@ private void DataFolder_TreeView_DoubleClick(object sender, EventArgs e) { DisposeTexFile(); _currentTexFile = new TexFile(_dataFolderTreeView.SelectedNode.ToolTipText); - for (var j = 1; j <= _currentTexFile.TextureCount(); j++) + for (int j = 1; j <= _currentTexFile.TextureCount(); j++) { _imgList.Items.Add("Image " + j); } @@ -865,12 +865,12 @@ private void DataFolder_TreeView_DoubleClick(object sender, EventArgs e) private void ImgList_SelectedIndexChanged(object sender, EventArgs e) { - var index = _imgList.SelectedIndex; + int index = _imgList.SelectedIndex; if (index >= 0) { - var texture = _currentTexFile[index]; + DdsTexture texture = _currentTexFile[index]; _currentTexturePixelFormat = texture.PixelFormat; _bppTxt.Text = string.Concat(texture.Bpp); @@ -897,7 +897,7 @@ private void ImgList_SelectedIndexChanged(object sender, EventArgs e) _widthTxt.Text = string.Concat(texture.Size.Width); _heightTxt.Text = string.Concat(texture.Size.Height); - var image = texture.GetImage(); + Image image = texture.GetImage(); _size0 = image.Size; if (image.Width > _imagePreviewBox.Width || image.Height > _imagePreviewBox.Height) { @@ -906,7 +906,7 @@ private void ImgList_SelectedIndexChanged(object sender, EventArgs e) _imagePreviewBox.Image = image; _imageInfoBox.Enabled = true; - var metadata = _currentTexFile.TextureList[index]; + TextureMetadata metadata = _currentTexFile.TextureList[index]; CurrentImgFile = metadata; } else @@ -918,7 +918,7 @@ private void ImgList_SelectedIndexChanged(object sender, EventArgs e) private void ReplaceImgBtn_Click(object sender, EventArgs e) { - var text = KeyGenerator.OpenOrSaveFile("Select the image file to replace the texture.", + string text = KeyGenerator.OpenOrSaveFile("Select the image file to replace the texture.", "All Supported Formats|*.dds;*.bmp;*.jpg;*.gif;*.png|DDS Texture|*.dds|Bitmap|*.bmp|JPEG|*.jpg|Graphics Interchange Format|*.gif|Portable Network Graphics|*.png", true); if (text == "") @@ -947,7 +947,7 @@ private void ReplaceImgBtn_Click(object sender, EventArgs e) public ImageFormat GetImageFormat(string fileName) { - var ext = KeyGenerator.GetExtension(fileName, 1).ToLower(); + string ext = KeyGenerator.GetExtension(fileName, 1).ToLower(); if (ext != null) { if (ext == "jpg") @@ -968,7 +968,7 @@ public ImageFormat GetImageFormat(string fileName) private void ExtractImgBtn_Click(object sender, EventArgs e) { - var fileName = KeyGenerator.OpenOrSaveFile("Select location to export the texture.", + string fileName = KeyGenerator.OpenOrSaveFile("Select location to export the texture.", "All Supported Formats|*.dds;*.bmp;*.jpg;*.gif;*.png|DDS Texture|*.dds|Bitmap|*.bmp|JPEG|*.jpg|Graphics Interchange Format|*.gif|Portable Network Graphics|*.png", false); if (fileName == "") @@ -997,8 +997,8 @@ private void RebuildBtn_Click(object sender, EventArgs e) } else { - var toolTipText = _dataFolderTreeView.SelectedNode.ToolTipText; - var pakNode = File.Exists(toolTipText.Replace(".pak.xen", ".pab.xen")) + string toolTipText = _dataFolderTreeView.SelectedNode.ToolTipText; + ZzPakNode2 pakNode = File.Exists(toolTipText.Replace(".pak.xen", ".pab.xen")) ? new ZzPabNode(toolTipText, toolTipText.Replace(".pak.xen", ".pab.xen"), false) : new ZzPakNode2(toolTipText, false); pakNode.method_11((int) _dataFolderTreeView.SelectedNode.Tag) @@ -1018,7 +1018,7 @@ private void NextSearch_Btn_Click(object sender, EventArgs e) } if (_searchTxtBox.Text.Equals("")) { - foreach (var current in _nodeList) + foreach (TreeNode current in _nodeList) { current.BackColor = Color.Empty; } @@ -1029,7 +1029,7 @@ private void NextSearch_Btn_Click(object sender, EventArgs e) } if (!_searchTxtBox.Text.Equals(_string1)) { - foreach (var current2 in _nodeList) + foreach (TreeNode current2 in _nodeList) { current2.BackColor = Color.Transparent; } @@ -1047,8 +1047,8 @@ private void NextSearch_Btn_Click(object sender, EventArgs e) _count = -1; } _count++; - var treeView = _dataFolderTreeView; - var node = _nodeList; + TreeView treeView = _dataFolderTreeView; + List node = _nodeList; int arg16B1; if (_nodeList.Count <= _count) { @@ -1072,7 +1072,7 @@ private void PrevSearch_Btn_Click(object sender, EventArgs e) } if (_searchTxtBox.Text.Equals("")) { - foreach (var current in _nodeList) + foreach (TreeNode current in _nodeList) { current.BackColor = Color.Empty; } @@ -1083,7 +1083,7 @@ private void PrevSearch_Btn_Click(object sender, EventArgs e) } if (!_searchTxtBox.Text.Equals(_string1)) { - foreach (var current2 in _nodeList) + foreach (TreeNode current2 in _nodeList) { current2.BackColor = Color.Empty; } @@ -1112,7 +1112,7 @@ private void Search_Btn_Click(object sender, EventArgs e) { return; } - foreach (var current in _nodeList) + foreach (TreeNode current in _nodeList) { current.BackColor = Color.Empty; } @@ -1138,7 +1138,7 @@ private void Search_Btn_Click(object sender, EventArgs e) private bool method_4() { AddNodeToContainerIfItHasThisString(_dataFolderTreeView.SelectedNode, _string1, _nodeList); - foreach (var current in _nodeList) + foreach (TreeNode current in _nodeList) { current.BackColor = Color.YellowGreen; } @@ -1152,7 +1152,7 @@ private static void AddNodeToContainerIfItHasThisString(TreeNode node, string st { nodeCollection.Add(node); } - for (var i = 0; i < node.Nodes.Count; i++) + for (int i = 0; i < node.Nodes.Count; i++) { AddNodeToContainerIfItHasThisString(node.Nodes[i], str, nodeCollection); } @@ -1234,8 +1234,7 @@ private bool MetadataReadonly private void txtKey_TextChanged(object sender, EventArgs e) { - int newKey; - if (Int32.TryParse(_txtKey.Text, NumberStyles.HexNumber | NumberStyles.AllowHexSpecifier, null, out newKey)) + if (Int32.TryParse(_txtKey.Text, NumberStyles.HexNumber | NumberStyles.AllowHexSpecifier, null, out int newKey)) { _currentImgFile.Key = newKey; } @@ -1261,7 +1260,7 @@ private void btnCloneImage_Click(object sender, EventArgs e) if (_imgList.SelectedIndex < 0 || _imgList.SelectedIndex >= _currentTexFile.TextureCount()) return; - var cloneIndex = _currentTexFile.CloneTextureElement(_imgList.SelectedIndex); + int cloneIndex = _currentTexFile.CloneTextureElement(_imgList.SelectedIndex); _imgList.Items.Add("Image " + (cloneIndex + 1)); } } diff --git a/GHNamespaceE/TextArrayNode.cs b/GHNamespaceE/TextArrayNode.cs index 97716cd..6fddcb1 100644 --- a/GHNamespaceE/TextArrayNode.cs +++ b/GHNamespaceE/TextArrayNode.cs @@ -24,7 +24,7 @@ public override int vmethod_1() public override void vmethod_13(Stream26 stream260) { - var num = stream260.ReadInt(); + int num = stream260.ReadInt(); if (num == 0) { return; @@ -33,7 +33,7 @@ public override void vmethod_13(Stream26 stream260) { stream260.Position = stream260.ReadInt(); } - for (var i = 0; i < num; i++) + for (int i = 0; i < num; i++) { Nodes.Add(new TextValueNode(stream260.ReadInt(), vmethod_10())); } @@ -42,7 +42,7 @@ public override void vmethod_13(Stream26 stream260) public override void vmethod_14(Stream26 stream260) { vmethod_9(true); - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = 1; array[2] = 28; stream260.WriteByteArray(array, false); diff --git a/GHNamespaceE/zzGenericNode1.cs b/GHNamespaceE/zzGenericNode1.cs index b72cde7..6ae288b 100644 --- a/GHNamespaceE/zzGenericNode1.cs +++ b/GHNamespaceE/zzGenericNode1.cs @@ -124,10 +124,10 @@ public override void vmethod_13(Stream26 stream260) { while (stream260.Length > stream260.Position) { - var num = stream260.ReadInt(true); + int num = stream260.ReadInt(true); if (num != 0) { - var @class = vmethod_12(num); + AbstractTreeNode1 @class = vmethod_12(num); stream260.ReverseEndianness = vmethod_7(); Nodes.Add(@class); @class.method_4(stream260); @@ -154,8 +154,8 @@ public override AbstractTreeNode1 vmethod_12(int int0) { return new StructureHeaderNode(); } - var num = int0 >> 16 & 255; - var num2 = int0 >> 8 & 255; + int num = int0 >> 16 & 255; + int num2 = int0 >> 8 & 255; if (num == 32) { Bool1 = true; @@ -164,7 +164,7 @@ public override AbstractTreeNode1 vmethod_12(int int0) { Bool1 = false; } - var ex = new Exception("No QB Node class found for : " + KeyGenerator.ValToHex32Bit(int0)); + Exception ex = new Exception("No QB Node class found for : " + KeyGenerator.ValToHex32Bit(int0)); if (num != 32) { if (num != 4) @@ -374,7 +374,7 @@ public byte[] method_7() public MemoryStream method_8() { - var memoryStream = new MemoryStream(); + MemoryStream memoryStream = new MemoryStream(); method_9(memoryStream); memoryStream.Position = 0L; return memoryStream; @@ -395,7 +395,7 @@ public void method_10(Stream26 stream260) public int method_11() { - var result = 28; + int result = 28; vmethod_2(ref result); return result; } diff --git a/GHNamespaceF/AsciiArrayNode.cs b/GHNamespaceF/AsciiArrayNode.cs index a9b82fe..4d43932 100644 --- a/GHNamespaceF/AsciiArrayNode.cs +++ b/GHNamespaceF/AsciiArrayNode.cs @@ -23,16 +23,16 @@ public override int vmethod_1() public override void vmethod_13(Stream26 stream260) { - var num = stream260.ReadInt(); + int num = stream260.ReadInt(); if (num == 0) { return; } - var array = new int[num]; + int[] array = new int[num]; if (num > 1) { stream260.Position = stream260.ReadInt(); - for (var i = 0; i < num; i++) + for (int i = 0; i < num; i++) { array[i] = stream260.ReadInt(); } @@ -41,10 +41,10 @@ public override void vmethod_13(Stream26 stream260) { array[0] = stream260.ReadInt(); } - var array2 = array; - for (var j = 0; j < array2.Length; j++) + int[] array2 = array; + for (int j = 0; j < array2.Length; j++) { - var int_ = array2[j]; + int int_ = array2[j]; Nodes.Add(new AsciiValueNode(stream260.ReadAsciiStringAt(int_))); } stream260.Position += smethod_0(stream260.Position); @@ -52,7 +52,7 @@ public override void vmethod_13(Stream26 stream260) public override void vmethod_14(Stream26 stream260) { - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = 1; array[2] = 3; stream260.WriteByteArray(array, false); @@ -65,8 +65,8 @@ public override void vmethod_14(Stream26 stream260) { stream260.WriteInt((int) stream260.Position + 4); } - var num = (int) stream260.Position + 4 * Nodes.Count; - var stream = new Stream26(); + int num = (int) stream260.Position + 4 * Nodes.Count; + Stream26 stream = new Stream26(); foreach (AsciiValueNode @class in Nodes) { stream260.WriteInt(num); diff --git a/GHNamespaceF/Class268.cs b/GHNamespaceF/Class268.cs index 024f1dc..a0aeb0f 100644 --- a/GHNamespaceF/Class268.cs +++ b/GHNamespaceF/Class268.cs @@ -31,7 +31,7 @@ public override void vmethod_13(Stream26 stream260) public override void vmethod_14(Stream26 stream260) { - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = (vmethod_7() ? (byte) 32 : (byte) 4); array[2] = vmethod_16(); stream260.WriteByteArray(array, false); @@ -39,20 +39,19 @@ public override void vmethod_14(Stream26 stream260) stream260.WriteInt(Int1); if (Nodes.Count != 0) { - var enumerator = Nodes.GetEnumerator(); + System.Collections.IEnumerator enumerator = Nodes.GetEnumerator(); try { while (enumerator.MoveNext()) { - var @class = (AbstractTreeNode2) enumerator.Current; + AbstractTreeNode2 @class = (AbstractTreeNode2) enumerator.Current; stream260.WriteByteArray(@class.vmethod_8()); } goto IL_97; } finally { - var disposable = enumerator as IDisposable; - if (disposable != null) + if (enumerator is IDisposable disposable) { disposable.Dispose(); } diff --git a/GHNamespaceF/DDSTexture.cs b/GHNamespaceF/DDSTexture.cs index 64e936b..530960c 100644 --- a/GHNamespaceF/DDSTexture.cs +++ b/GHNamespaceF/DDSTexture.cs @@ -92,7 +92,7 @@ public DdsTexture(Image image, int mipMapCount, ImgPixelFormat pixelFormat, bool private void Load(Stream stream, bool leaveOpen) { - var binaryReader = new BinaryReader(stream); + BinaryReader binaryReader = new BinaryReader(stream); if (new string(binaryReader.ReadChars(4)) != "DDS ") { throw new FileLoadException("Invalid DDS file"); @@ -134,7 +134,7 @@ private void Load(Stream stream, bool leaveOpen) Size = new Size((int) header.Width, (int) header.Height); if ((header.pixelFormat.Flags & 4u) != 0u) { - var uint_ = header.pixelFormat.FourCc; + uint uint_ = header.pixelFormat.FourCc; if (uint_ > 116u) { if (uint_ <= 844388420u) @@ -237,7 +237,7 @@ private void Load(Stream stream, bool leaveOpen) } } IL_3BE: - var array = new byte[header.Width * header.Height * (uint) Bpp]; + byte[] array = new byte[header.Width * header.Height * (uint) Bpp]; stream.Read(array, 0, array.Length); Data = array; if (leaveOpen) @@ -254,14 +254,14 @@ private void Load(Stream stream, bool leaveOpen) public Image GetImage() { - var bitmap = new Bitmap(Size.Width, Size.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb); + Bitmap bitmap = new Bitmap(Size.Width, Size.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb); if (PixelFormat == ImgPixelFormat.Bgra32) { - var bitmapData = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), + BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMode.ReadWrite, bitmap.PixelFormat); Marshal.Copy(Data, 0, bitmapData.Scan0, bitmapData.Stride * bitmap.Height); bitmap.UnlockBits(bitmapData); - var stream = new MemoryStream(); + MemoryStream stream = new MemoryStream(); bitmap.Save(stream, ImageFormat.Bmp); return Image.FromStream(stream); } @@ -272,20 +272,20 @@ public Image GetImage() throw new Exception("Can't decode DDS, Unknown format: " + PixelFormat); } } - var unk = new ImageRelatedClass(bitmap); + ImageRelatedClass unk = new ImageRelatedClass(bitmap); unk.method_4(); - var binaryReader = new BinaryReader(new MemoryStream(Data)); + BinaryReader binaryReader = new BinaryReader(new MemoryStream(Data)); ZzTextureClass.smethod_17(binaryReader, unk, PixelFormat); binaryReader.Close(); unk.method_5(true); - var stream2 = new MemoryStream(); + MemoryStream stream2 = new MemoryStream(); bitmap.Save(stream2, ImageFormat.Bmp); return Image.FromStream(stream2); } int ClampMipMaps(int mipMapCount, int width, int height) { - var minDimension = Math.Min(width, height); + int minDimension = Math.Min(width, height); while ((1 << mipMapCount) > minDimension) --mipMapCount; @@ -296,21 +296,21 @@ int ClampMipMaps(int mipMapCount, int width, int height) public void ChangeImageProbably(Image img, int mipMaps, ImgPixelFormat imgpixelFormat1, bool bool0) { - var memoryStream = new MemoryStream(); - var binaryWriter = new BinaryWriter(memoryStream); + MemoryStream memoryStream = new MemoryStream(); + BinaryWriter binaryWriter = new BinaryWriter(memoryStream); mipMaps = ClampMipMaps(MipMapCount, img.Width, img.Height); //Generate mipmaps - for (var i = 0; i < mipMaps; i++) + for (int i = 0; i < mipMaps; i++) { - var bitmap = + Bitmap bitmap = KeyGenerator.ScaleImageFixedRatio(img, Math.Max(1, img.Width >> i), Math.Max(1, img.Height >> i)); if (imgpixelFormat1 == ImgPixelFormat.Bgra32) { - var bitmapData = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), + BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMode.ReadWrite, bitmap.PixelFormat); - var array = new byte[bitmapData.Stride * bitmap.Height]; + byte[] array = new byte[bitmapData.Stride * bitmap.Height]; Marshal.Copy(bitmapData.Scan0, array, 0, array.Length); bitmap.UnlockBits(bitmapData); binaryWriter.Write(array); @@ -327,14 +327,14 @@ public void ChangeImageProbably(Image img, int mipMaps, ImgPixelFormat imgpixelF public byte[] ToByteArray() { - var memoryStream = new MemoryStream(); + MemoryStream memoryStream = new MemoryStream(); WriteDds(memoryStream); return memoryStream.ToArray(); } public void WriteDds(Stream stream, bool leaveOpen = false) { - var binaryWriter = new BinaryWriter(stream); + BinaryWriter binaryWriter = new BinaryWriter(stream); binaryWriter.Write(0x20534444); // DDS Magic word binaryWriter.Write(124); // size (why is this a constant?..) binaryWriter.Write(135175); // flags diff --git a/GHNamespaceF/FloatListNode.cs b/GHNamespaceF/FloatListNode.cs index 13a27c4..9ac07af 100644 --- a/GHNamespaceF/FloatListNode.cs +++ b/GHNamespaceF/FloatListNode.cs @@ -19,7 +19,7 @@ public FloatListNode(bool bool1) : this() { if (bool1) { - var ienumerable = new float[2]; + float[] ienumerable = new float[2]; method_11(ienumerable); } } @@ -31,7 +31,7 @@ public override int vmethod_1() public void method_11(IEnumerable ienumerable0) { - foreach (var float_ in ienumerable0) + foreach (float float_ in ienumerable0) { Nodes.Add(new FloatValueNode(float_)); } @@ -51,7 +51,7 @@ public override void vmethod_13(Stream26 stream260) public override void vmethod_14(Stream26 stream260) { - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = 1; stream260.WriteByteArray(array, false); foreach (FloatValueNode class313 in Nodes) diff --git a/GHNamespaceF/ScriptRootNode.cs b/GHNamespaceF/ScriptRootNode.cs index 8f8c7a8..e97bcd1 100644 --- a/GHNamespaceF/ScriptRootNode.cs +++ b/GHNamespaceF/ScriptRootNode.cs @@ -44,12 +44,12 @@ public override void vmethod_13(Stream26 stream260) { Int0 = stream260.ReadInt(); Int1 = stream260.ReadInt(); - var num = stream260.ReadInt(); + int num = stream260.ReadInt(); stream260.ReadInt(); if (num != 0) { stream260.Position = num; - var @class = new QbScriptNode(); + QbScriptNode @class = new QbScriptNode(); Nodes.Add(@class); @class.method_4(stream260); } @@ -57,7 +57,7 @@ public override void vmethod_13(Stream26 stream260) public override void vmethod_14(Stream26 stream260) { - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = (byte) (vmethod_7() ? 32 : 4); array[2] = 7; stream260.WriteByteArray(array, false); diff --git a/GHNamespaceF/StructureHeaderNode.cs b/GHNamespaceF/StructureHeaderNode.cs index 141c4b9..07b3730 100644 --- a/GHNamespaceF/StructureHeaderNode.cs +++ b/GHNamespaceF/StructureHeaderNode.cs @@ -33,11 +33,11 @@ public override int vmethod_1() public override void vmethod_13(Stream26 stream260) { - var num = stream260.ReadInt(); + int num = stream260.ReadInt(); if (num != 0) { stream260.Position = num; - var @class = method_11(stream260.ReadInt()); + AbstractTreeNode1 @class = method_11(stream260.ReadInt()); Nodes.Add(@class); @class.method_4(stream260); } @@ -45,7 +45,7 @@ public override void vmethod_13(Stream26 stream260) public override void vmethod_14(Stream26 stream260) { - var array = new byte[4]; + byte[] array = new byte[4]; array[2] = 1; stream260.WriteByteArray(array, false); if (Nodes.Count != 0) @@ -68,9 +68,9 @@ public AbstractTreeNode1 method_11(int int0) { return new StructureHeaderNode(); } - var num = int0 >> 16 & 255; - var num2 = int0 >> 8 & 255; - var ex = new Exception("No QB Node class found for : " + KeyGenerator.ValToHex32Bit(int0)); + int num = int0 >> 16 & 255; + int num2 = int0 >> 8 & 255; + Exception ex = new Exception("No QB Node class found for : " + KeyGenerator.ValToHex32Bit(int0)); if (num == 1) { vmethod_9(true); diff --git a/GHNamespaceF/TextStructureNode.cs b/GHNamespaceF/TextStructureNode.cs index cfdd0b8..794e283 100644 --- a/GHNamespaceF/TextStructureNode.cs +++ b/GHNamespaceF/TextStructureNode.cs @@ -38,10 +38,10 @@ public override void vmethod_13(Stream26 stream260) { Int0 = stream260.ReadInt(); Nodes.Add(new TextValueNode(stream260.ReadInt(), vmethod_10())); - var num = stream260.ReadInt(); + int num = stream260.ReadInt(); if (num != 0) { - var @class = (Parent is StructureHeaderNode) + AbstractTreeNode1 @class = (Parent is StructureHeaderNode) ? (Parent as StructureHeaderNode).method_11(stream260.ReadIntAt(num)) : vmethod_12(stream260.ReadIntAt(num, true)); method_1().Nodes.Add(@class); @@ -52,7 +52,7 @@ public override void vmethod_13(Stream26 stream260) public override void vmethod_14(Stream26 stream260) { vmethod_9(true); - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = 1; array[2] = 28; stream260.WriteByteArray(array, false); diff --git a/GHNamespaceF/TextureMetadata.cs b/GHNamespaceF/TextureMetadata.cs index 0471035..cb7b611 100644 --- a/GHNamespaceF/TextureMetadata.cs +++ b/GHNamespaceF/TextureMetadata.cs @@ -10,8 +10,7 @@ public class TextureMetadata public short Height; - public short UnkShort3 - ; // Only used on loading and saving. Value of 0x01 for green note. Maybe number of frames? + public short UnkShort3; // Only used on loading and saving. Value of 0x01 for green note. Maybe number of frames? public byte MipMapCount; diff --git a/GHNamespaceF/TreeNodeTextComparer.cs b/GHNamespaceF/TreeNodeTextComparer.cs index f6cab81..35ea1b8 100644 --- a/GHNamespaceF/TreeNodeTextComparer.cs +++ b/GHNamespaceF/TreeNodeTextComparer.cs @@ -7,8 +7,8 @@ public class TreeNodeTextComparer : IComparer { public int Compare(object x, object y) { - var treeNode = x as TreeNode; - var treeNode2 = y as TreeNode; + TreeNode treeNode = x as TreeNode; + TreeNode treeNode2 = y as TreeNode; if (treeNode.Nodes.Count > 0 && treeNode2.Nodes.Count == 0) { return -1; diff --git a/GHNamespaceF/UnicodeRootNode.cs b/GHNamespaceF/UnicodeRootNode.cs index c24b032..4aa11ef 100644 --- a/GHNamespaceF/UnicodeRootNode.cs +++ b/GHNamespaceF/UnicodeRootNode.cs @@ -63,7 +63,7 @@ public override void vmethod_13(Stream26 stream260) { Int0 = stream260.ReadInt(); Int1 = stream260.ReadInt(); - var num = stream260.ReadInt(); + int num = stream260.ReadInt(); stream260.ReadInt(); if (num != 0) { @@ -74,7 +74,7 @@ public override void vmethod_13(Stream26 stream260) public override void vmethod_14(Stream26 stream260) { - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = (vmethod_7() ? (byte) 32 : (byte) 4); array[2] = 4; stream260.WriteByteArray(array, false); diff --git a/GHNamespaceF/UnicodeStructureNode.cs b/GHNamespaceF/UnicodeStructureNode.cs index a9b2dd4..ff2de0c 100644 --- a/GHNamespaceF/UnicodeStructureNode.cs +++ b/GHNamespaceF/UnicodeStructureNode.cs @@ -61,8 +61,8 @@ public void method_9(string string0) public override void vmethod_13(Stream26 stream260) { Int0 = stream260.ReadInt(); - var num = stream260.ReadInt(); - var num2 = stream260.ReadInt(); + int num = stream260.ReadInt(); + int num2 = stream260.ReadInt(); if (num != 0) { Nodes.Add(new UnicodeValueNode(stream260.ReadUnicodeStringAt(num))); @@ -70,7 +70,7 @@ public override void vmethod_13(Stream26 stream260) } if (num2 != 0) { - var @class = (Parent is StructureHeaderNode) + AbstractTreeNode1 @class = (Parent is StructureHeaderNode) ? (Parent as StructureHeaderNode).method_11(stream260.ReadIntAt(num2)) : vmethod_12(stream260.ReadIntAt(num2, true)); method_1().Nodes.Add(@class); @@ -82,19 +82,19 @@ public override void vmethod_14(Stream26 stream260) { if (vmethod_8()) { - var array = new byte[4]; + byte[] array = new byte[4]; array[1] = 1; array[2] = 4; stream260.WriteByteArray(array, false); } else { - var array2 = new byte[4]; + byte[] array2 = new byte[4]; array2[1] = (vmethod_7() ? (byte) 132 : (byte) 9); stream260.WriteByteArray(array2, false); } stream260.WriteInt(Int0); - var int_ = (int) stream260.Position + 4; + int int_ = (int) stream260.Position + 4; if (Nodes.Count != 0) { stream260.WriteInt((int) stream260.Position + 8); @@ -107,7 +107,7 @@ public override void vmethod_14(Stream26 stream260) { stream260.WriteInt(0); } - var num = (int) stream260.Position; + int num = (int) stream260.Position; if (method_1().Nodes.IndexOf(this) < method_1().Nodes.Count - 1) { stream260.WriteIntAt(int_, num); diff --git a/GHNamespaceF/zzCocoaNode12.cs b/GHNamespaceF/zzCocoaNode12.cs index a0b42d6..cc662e7 100644 --- a/GHNamespaceF/zzCocoaNode12.cs +++ b/GHNamespaceF/zzCocoaNode12.cs @@ -209,7 +209,7 @@ public void Dispose() public override object Clone() { - var @interface = (INterface12) base.Clone(); + INterface12 @interface = (INterface12) base.Clone(); @interface.imethod_1(_int0); @interface.imethod_3(_int1); @interface.imethod_5(_int2); diff --git a/GHNamespaceG/AbstractNoteClass.cs b/GHNamespaceG/AbstractNoteClass.cs index 9971d10..cafd759 100644 --- a/GHNamespaceG/AbstractNoteClass.cs +++ b/GHNamespaceG/AbstractNoteClass.cs @@ -15,8 +15,8 @@ public static int smethod_0(AbstractNoteClass class3350, AbstractNoteClass class { return class3350.method_0() - class3351.method_0(); } - var flag = ((MidiNote) class3350).method_5(); - var flag2 = ((MidiNote) class3351).method_5(); + bool flag = ((MidiNote) class3350).method_5(); + bool flag2 = ((MidiNote) class3351).method_5(); if (flag && !flag2) { return 1; diff --git a/GHNamespaceG/ByteFiddler.cs b/GHNamespaceG/ByteFiddler.cs index 260f4b6..6ae5ec6 100644 --- a/GHNamespaceG/ByteFiddler.cs +++ b/GHNamespaceG/ByteFiddler.cs @@ -23,8 +23,8 @@ public static int DivideSixtyMillionBy(float float0) public static string smethod_3(string string0, BinaryReader binaryReader0, string string1) { - var position = binaryReader0.BaseStream.Position; - var @string = Encoding.ASCII.GetString(binaryReader0.ReadBytes(string1.Length)); + long position = binaryReader0.BaseStream.Position; + string @string = Encoding.ASCII.GetString(binaryReader0.ReadBytes(string1.Length)); if (@string != string1) { Console.WriteLine("Reading {0} at position {1}: expected {2}, found {3}", string0, position, string1, diff --git a/GHNamespaceG/MIDINote.cs b/GHNamespaceG/MIDINote.cs index 860137a..3e1c694 100644 --- a/GHNamespaceG/MIDINote.cs +++ b/GHNamespaceG/MIDINote.cs @@ -45,7 +45,7 @@ public MidiNoteMask method_2() return MidiNoteMask.Invalid; } //Gets note type - var num = (_midiMask - 60) % 12; + int num = (_midiMask - 60) % 12; if (Enum.IsDefined(typeof(MidiNoteMask), num)) { return (MidiNoteMask) num; @@ -59,7 +59,7 @@ public Fret method_3() { return Fret.Invalid; } - var @enum = (Fret) ((_midiMask - 60) % 12); + Fret @enum = (Fret) ((_midiMask - 60) % 12); if (@enum >= Fret.Green && @enum <= Fret.Orange) { return @enum; diff --git a/GHNamespaceG/StreamClass1.cs b/GHNamespaceG/StreamClass1.cs index fe16188..9f0d505 100644 --- a/GHNamespaceG/StreamClass1.cs +++ b/GHNamespaceG/StreamClass1.cs @@ -33,7 +33,7 @@ private class Class343 } }; - private long _long0; + private readonly long _long0; public long method_0() { @@ -54,9 +54,9 @@ public void Dispose() if (smethod_0(_stream0)) { UpdateFinalBlocks(_stream0, _interface140.Length, 0L); - var array = new int[_interface140.Length]; - var array2 = new int[_interface140.Length]; - for (var i = 0; i < _interface140.Length; i++) + int[] array = new int[_interface140.Length]; + int[] array2 = new int[_interface140.Length]; + for (int i = 0; i < _interface140.Length; i++) { array[i] = (int) _class3430[i].method_0() * 28; array2[i] = _interface140[i].imethod_0(); @@ -77,11 +77,11 @@ public static void UpdateFinalBlocks(Stream stream1, int int0, long long0) { throw new ApplicationException("UpdateFinalBlocks called with non-updateable stream"); } - var position = stream1.Position; - var num = long0 + 128L; - var array = new bool[int0]; - var num2 = 0; - var array2 = new byte[16]; + long position = stream1.Position; + long num = long0 + 128L; + bool[] array = new bool[int0]; + int num2 = 0; + byte[] array2 = new byte[16]; stream1.Seek(array2.Length * -1, SeekOrigin.Current); while (stream1.Position - num >= 16L && num2 < array.Length) { @@ -89,7 +89,7 @@ public static void UpdateFinalBlocks(Stream stream1, int int0, long long0) { Class355.Interface150.imethod_1("Unexpected end of stream trying to read final blocks"); } - var num3 = array2[1] & -129; + int num3 = array2[1] & -129; if (num3 < 0 || num3 > int0) { Class355.Interface150.imethod_1( @@ -112,8 +112,8 @@ public static void UpdateFinalBlocks(Stream stream1, int int0, long long0) } else if (!array[num3]) { - var exprF6Cp0 = array2; - var exprF6Cp1 = 1; + byte[] exprF6Cp0 = array2; + int exprF6Cp1 = 1; exprF6Cp0[exprF6Cp1] |= 128; stream1.Seek(array2.Length * -1, SeekOrigin.Current); stream1.Write(array2, 0, array2.Length); @@ -131,7 +131,7 @@ public static void UpdateFinalBlocks(Stream stream1, int[] int0, int[] int1, lon { throw new ApplicationException("UpdateFinalBlocks called with non-updateable stream"); } - var position = stream1.Position; + long position = stream1.Position; stream1.Seek(long0, SeekOrigin.Begin); smethod_3(stream1, int0, int1); stream1.Seek(position, SeekOrigin.Begin); @@ -147,7 +147,7 @@ public static void smethod_3(Stream stream1, int[] int0, int[] int1) } if (!smethod_0(stream1)) { - for (var i = 0; i < int0.Length; i++) + for (int i = 0; i < int0.Length; i++) { if (int0[i] < 1) { @@ -156,10 +156,10 @@ public static void smethod_3(Stream stream1, int[] int0, int[] int1) } } } - var binaryWriter = new BinaryWriter(stream1); + BinaryWriter binaryWriter = new BinaryWriter(stream1); binaryWriter.Write(Encoding.ASCII.GetBytes("VgS!")); binaryWriter.Write(2); - for (var j = 0; j < 15; j++) + for (int j = 0; j < 15; j++) { if (j < int0.Length) { diff --git a/GHNamespaceG/StreamClass2.cs b/GHNamespaceG/StreamClass2.cs index 8c8c120..084bd99 100644 --- a/GHNamespaceG/StreamClass2.cs +++ b/GHNamespaceG/StreamClass2.cs @@ -5,7 +5,7 @@ namespace GHNamespaceG { public class StreamClass2 : IDisposable { - private int _int0; + private readonly int _int0; private readonly int _int1; @@ -13,9 +13,9 @@ public class StreamClass2 : IDisposable public static void smethod_0(Stream stream1, int int2, long long0) { - var position = stream1.Position; + long position = stream1.Position; stream1.Seek(long0 + 4L, SeekOrigin.Begin); - var binaryWriter = new BinaryWriter(stream1); + BinaryWriter binaryWriter = new BinaryWriter(stream1); binaryWriter.Write((uint) (38 + int2)); stream1.Seek(long0 + 42L, SeekOrigin.Begin); binaryWriter.Write((uint) int2); diff --git a/GHNamespaceG/UnusedStreamClass2.cs b/GHNamespaceG/UnusedStreamClass2.cs index 6a8a718..628c1f5 100644 --- a/GHNamespaceG/UnusedStreamClass2.cs +++ b/GHNamespaceG/UnusedStreamClass2.cs @@ -37,7 +37,7 @@ public class UnusedStreamClass2 : IDisposable, IEmptyInterface1 public void Dispose() { _stream0.Dispose(); - for (var i = 0; i < _class3520.Length; i++) + for (int i = 0; i < _class3520.Length; i++) { _class3520[i].Dispose(); } diff --git a/GHNamespaceH/Class35.cs b/GHNamespaceH/Class35.cs index 68a5c32..ce20ba1 100644 --- a/GHNamespaceH/Class35.cs +++ b/GHNamespaceH/Class35.cs @@ -21,9 +21,9 @@ public override void vmethod_2(object object2) public override object vmethod_1(OggClass1 class660, Class27 class270, object object2) { - var class49 = class660.OggClass5; - var @class = new Class55(); - var class2 = @class.Class540 = (Class54) object2; + OggClass5 class49 = class660.OggClass5; + Class55 @class = new Class55(); + Class54 class2 = @class.Class540 = (Class54) object2; @class.Class270 = class270; @class.Object0 = new object[class2.Int0]; @class.Object1 = new object[class2.Int0]; @@ -31,11 +31,11 @@ public override object vmethod_1(OggClass1 class660, Class27 class270, object ob @class.Class500 = new Class50[class2.Int0]; @class.Class280 = new Class28[class2.Int0]; @class.Class230 = new Class23[class2.Int0]; - for (var i = 0; i < class2.Int0; i++) + for (int i = 0; i < class2.Int0; i++) { - var num = class2.Int2[i]; - var num2 = class2.Int3[i]; - var num3 = class2.Int4[i]; + int num = class2.Int2[i]; + int num2 = class2.Int3[i]; + int num3 = class2.Int4[i]; @class.Class500[i] = Class50.Class500[class49.Int22[num]]; @class.Object0[i] = @class.Class500[i].vmethod_1(class660, class270, class49.Object1[num]); @class.Class280[i] = Class28.Class280[class49.Int23[num2]]; @@ -52,7 +52,7 @@ public override object vmethod_1(OggClass1 class660, Class27 class270, object ob public override object vmethod_0(OggClass5 class490, OggClass3 class380) { - var @class = new Class54(); + Class54 @class = new Class54(); if (class380.method_6(1) != 0) { @class.Int0 = class380.method_6(4) + 1; @@ -64,10 +64,10 @@ public override object vmethod_0(OggClass5 class490, OggClass3 class380) if (class380.method_6(1) != 0) { @class.Int6 = class380.method_6(8) + 1; - for (var i = 0; i < @class.Int6; i++) + for (int i = 0; i < @class.Int6; i++) { - var num = @class.Int7[i] = class380.method_6(smethod_0(class490.Int8)); - var num2 = @class.Int8[i] = class380.method_6(smethod_0(class490.Int8)); + int num = @class.Int7[i] = class380.method_6(smethod_0(class490.Int8)); + int num2 = @class.Int8[i] = class380.method_6(smethod_0(class490.Int8)); if (num < 0 || num2 < 0 || num == num2 || num >= class490.Int8 || num2 >= class490.Int8) { @class.method_0(); @@ -82,7 +82,7 @@ public override object vmethod_0(OggClass5 class490, OggClass3 class380) } if (@class.Int0 > 1) { - for (var j = 0; j < class490.Int8; j++) + for (int j = 0; j < class490.Int8; j++) { @class.Int1[j] = class380.method_6(4); if (@class.Int1[j] >= @class.Int0) @@ -92,7 +92,7 @@ public override object vmethod_0(OggClass5 class490, OggClass3 class380) } } } - for (var k = 0; k < @class.Int0; k++) + for (int k = 0; k < @class.Int0; k++) { @class.Int2[k] = class380.method_6(8); if (@class.Int2[k] >= class490.Int16) @@ -121,13 +121,13 @@ public override int vmethod_3(OggClass6 class710, object object2) int result; lock (_object0) { - var class66 = class710.OggClass1; - var class49 = class66.OggClass5; - var @class = (Class55) object2; - var class54 = @class.Class540; - var class27 = @class.Class270; - var num = class710.Int3 = class49.Int13[class710.Int1]; - var array = class66.Float2[class710.Int1][class710.Int0][class710.Int2][class27.Int1]; + OggClass1 class66 = class710.OggClass1; + OggClass5 class49 = class66.OggClass5; + Class55 @class = (Class55) object2; + Class54 class54 = @class.Class540; + Class27 class27 = @class.Class270; + int num = class710.Int3 = class49.Int13[class710.Int1]; + float[] array = class66.Float2[class710.Int1][class710.Int0][class710.Int2][class27.Int1]; if (_float0 == null || _float0.Length < class49.Int8) { _float0 = new float[class49.Int8][]; @@ -135,10 +135,10 @@ public override int vmethod_3(OggClass6 class710, object object2) _int0 = new int[class49.Int8]; _object1 = new object[class49.Int8]; } - for (var i = 0; i < class49.Int8; i++) + for (int i = 0; i < class49.Int8; i++) { - var array2 = class710.Float0[i]; - var num2 = class54.Int1[i]; + float[] array2 = class710.Float0[i]; + int num2 = class54.Int1[i]; _object1[i] = @class.Class280[num2].vmethod_3(class710, @class.Object1[num2], _object1[i]); if (_object1[i] != null) { @@ -148,12 +148,12 @@ public override int vmethod_3(OggClass6 class710, object object2) { _int1[i] = 0; } - for (var j = 0; j < num / 2; j++) + for (int j = 0; j < num / 2; j++) { array2[j] = 0f; } } - for (var k = 0; k < class54.Int6; k++) + for (int k = 0; k < class54.Int6; k++) { if (_int1[class54.Int7[k]] != 0 || _int1[class54.Int8[k]] != 0) { @@ -161,10 +161,10 @@ public override int vmethod_3(OggClass6 class710, object object2) _int1[class54.Int8[k]] = 1; } } - for (var l = 0; l < class54.Int0; l++) + for (int l = 0; l < class54.Int0; l++) { - var num3 = 0; - for (var m = 0; m < class49.Int8; m++) + int num3 = 0; + for (int m = 0; m < class49.Int8; m++) { if (class54.Int1[m] == l) { @@ -181,14 +181,14 @@ public override int vmethod_3(OggClass6 class710, object object2) } @class.Class230[l].vmethod_3(class710, @class.Object2[l], _float0, _int0, num3); } - for (var n = class54.Int6 - 1; n >= 0; n--) + for (int n = class54.Int6 - 1; n >= 0; n--) { - var array3 = class710.Float0[class54.Int7[n]]; - var array4 = class710.Float0[class54.Int8[n]]; - for (var num4 = 0; num4 < num / 2; num4++) + float[] array3 = class710.Float0[class54.Int7[n]]; + float[] array4 = class710.Float0[class54.Int8[n]]; + for (int num4 = 0; num4 < num / 2; num4++) { - var num5 = array3[num4]; - var num6 = array4[num4]; + float num5 = array3[num4]; + float num6 = array4[num4]; if (num5 > 0f) { if (num6 > 0f) @@ -214,30 +214,30 @@ public override int vmethod_3(OggClass6 class710, object object2) } } } - for (var num7 = 0; num7 < class49.Int8; num7++) + for (int num7 = 0; num7 < class49.Int8; num7++) { - var array5 = class710.Float0[num7]; - var num8 = class54.Int1[num7]; + float[] array5 = class710.Float0[num7]; + int num8 = class54.Int1[num7]; @class.Class280[num8].vmethod_4(class710, @class.Object1[num8], _object1[num7], array5); } - for (var num9 = 0; num9 < class49.Int8; num9++) + for (int num9 = 0; num9 < class49.Int8; num9++) { - var array6 = class710.Float0[num9]; + float[] array6 = class710.Float0[num9]; ((Class68) class66.Object0[class710.Int1][0]).method_1(array6, array6); } - for (var num10 = 0; num10 < class49.Int8; num10++) + for (int num10 = 0; num10 < class49.Int8; num10++) { - var array7 = class710.Float0[num10]; + float[] array7 = class710.Float0[num10]; if (_int1[num10] != 0) { - for (var num11 = 0; num11 < num; num11++) + for (int num11 = 0; num11 < num; num11++) { array7[num11] *= array[num11]; } } else { - for (var num12 = 0; num12 < num; num12++) + for (int num12 = 0; num12 < num; num12++) { array7[num12] = 0f; } @@ -250,7 +250,7 @@ public override int vmethod_3(OggClass6 class710, object object2) private static int smethod_0(int int2) { - var num = 0; + int num = 0; while (int2 > 1) { num++; diff --git a/GHNamespaceH/Class44.cs b/GHNamespaceH/Class44.cs index ce6f481..02e61a4 100644 --- a/GHNamespaceH/Class44.cs +++ b/GHNamespaceH/Class44.cs @@ -8,8 +8,8 @@ public class Class44 private static uint smethod_0(uint uint1) { - var num = uint1 << 24; - for (var i = 0; i < 8; i++) + uint num = uint1 << 24; + for (int i = 0; i < 8; i++) { if ((num & 2147483648u) != 0u) { @@ -25,7 +25,7 @@ private static uint smethod_0(uint uint1) public Class44() { - var num = 0u; + uint num = 0u; while (num < (ulong) Uint0.Length) { Uint0[(int) ((UIntPtr) num)] = smethod_0(num); diff --git a/GHNamespaceH/Class47.cs b/GHNamespaceH/Class47.cs index 56cffda..0181931 100644 --- a/GHNamespaceH/Class47.cs +++ b/GHNamespaceH/Class47.cs @@ -21,7 +21,7 @@ public void method_0() public int method_1(OggClass3 class380) { - var num = class380.method_6(32); + int num = class380.method_6(32); if (num < 0) { method_2(); @@ -37,9 +37,9 @@ public int method_1(OggClass3 class380) } Byte0 = new byte[Int2 + 1][]; Int1 = new int[Int2 + 1]; - for (var i = 0; i < Int2; i++) + for (int i = 0; i < Int2; i++) { - var num2 = class380.method_6(32); + int num2 = class380.method_6(32); if (num2 < 0) { method_2(); @@ -59,7 +59,7 @@ public int method_1(OggClass3 class380) public void method_2() { - for (var i = 0; i < Int2; i++) + for (int i = 0; i < Int2; i++) { Byte0[i] = null; } diff --git a/GHNamespaceH/Class48.cs b/GHNamespaceH/Class48.cs index 63b93d3..b73975a 100644 --- a/GHNamespaceH/Class48.cs +++ b/GHNamespaceH/Class48.cs @@ -20,7 +20,7 @@ public class Class48 public Class48() { - var num = 0u; + uint num = 0u; while (num < (ulong) Uint0.Length) { Uint0[(int) ((UIntPtr) num)] = smethod_0(num); @@ -30,8 +30,8 @@ public Class48() private static uint smethod_0(uint uint1) { - var num = uint1 << 24; - for (var i = 0; i < 8; i++) + uint num = uint1 << 24; + for (int i = 0; i < 8; i++) { if ((num & 2147483648u) != 0u) { @@ -91,17 +91,17 @@ public int method_6() public void method_7() { - var num = 0u; - for (var i = 0; i < Int1; i++) + uint num = 0u; + for (int i = 0; i < Int1; i++) { - var num2 = (uint) (Byte0[Int0 + i] & 255); - var num3 = num >> 24 & 255u; + uint num2 = (uint) (Byte0[Int0 + i] & 255); + uint num3 = num >> 24 & 255u; num = (num << 8 ^ Uint0[(int) ((UIntPtr) (num2 ^ num3))]); } - for (var j = 0; j < Int3; j++) + for (int j = 0; j < Int3; j++) { - var num2 = (uint) (Byte1[Int2 + j] & 255); - var num3 = num >> 24 & 255u; + uint num2 = (uint) (Byte1[Int2 + j] & 255); + uint num3 = num >> 24 & 255u; num = (num << 8 ^ Uint0[(int) ((UIntPtr) (num2 ^ num3))]); } Byte0[Int0 + 22] = (byte) num; diff --git a/GHNamespaceH/Class52.cs b/GHNamespaceH/Class52.cs index 53fec89..9fe9338 100644 --- a/GHNamespaceH/Class52.cs +++ b/GHNamespaceH/Class52.cs @@ -39,10 +39,10 @@ public int method_1(int int6) } if (int6 > _int0 - _int1) { - var num = int6 + _int1 + 4096; + int num = int6 + _int1 + 4096; if (Byte0 != null) { - var dst = new byte[num]; + byte[] dst = new byte[num]; Buffer.BlockCopy(Byte0, 0, dst, 0, Byte0.Length); Byte0 = dst; } @@ -67,8 +67,8 @@ public int method_2(int int6) public int method_3(Class48 class481) { - var num = _int2; - var num2 = _int1 - _int2; + int num = _int2; + int num2 = _int1 - _int2; if (_int4 == 0) { if (num2 < 27) @@ -79,12 +79,12 @@ public int method_3(Class48 class481) { if (Byte0[num + 3] == 83) { - var num3 = (Byte0[num + 26] & 255) + 27; + int num3 = (Byte0[num + 26] & 255) + 27; if (num2 < num3) { return 0; } - for (var i = 0; i < (Byte0[num + 26] & 255); i++) + for (int i = 0; i < (Byte0[num + 26] & 255); i++) { _int5 += Byte0[num + 27 + i] & 255; } @@ -94,8 +94,8 @@ public int method_3(Class48 class481) } _int4 = 0; _int5 = 0; - var num4 = 0; - for (var j = 0; j < num2 - 1; j++) + int num4 = 0; + for (int j = 0; j < num2 - 1; j++) { if (Byte0[num + 1 + j] == 79) { @@ -123,7 +123,7 @@ public int method_3(Class48 class481) Byte0[num + 23] = 0; Byte0[num + 24] = 0; Byte0[num + 25] = 0; - var @class = _class480; + Class48 @class = _class480; @class.Byte0 = Byte0; @class.Int0 = num; @class.Int1 = _int4; @@ -141,8 +141,8 @@ public int method_3(Class48 class481) Buffer.BlockCopy(_byte1, 0, Byte0, num + 22, 4); _int4 = 0; _int5 = 0; - var num4 = 0; - for (var k = 0; k < num2 - 1; k++) + int num4 = 0; + for (int k = 0; k < num2 - 1; k++) { if (Byte0[num + 1 + k] == 79) { diff --git a/GHNamespaceH/Class53.cs b/GHNamespaceH/Class53.cs index 07d6ba7..bba6ed1 100644 --- a/GHNamespaceH/Class53.cs +++ b/GHNamespaceH/Class53.cs @@ -2,47 +2,47 @@ namespace GHNamespaceH { public class Class53 { - private float[] _float0 = new float[5]; + private readonly float[] _float0 = new float[5]; - private float[] _float1 = new float[5]; + private readonly float[] _float1 = new float[5]; - private float[] _float2 = new float[5]; + private readonly float[] _float2 = new float[5]; - private float[] _float3 = new float[5]; + private readonly float[] _float3 = new float[5]; - private float[] _float4 = new float[5]; + private readonly float[] _float4 = new float[5]; - private float[] _float5 = new float[5]; + private readonly float[] _float5 = new float[5]; - private float[] _float6 = new float[5]; + private readonly float[] _float6 = new float[5]; - private float[] _float7 = new float[5]; + private readonly float[] _float7 = new float[5]; - private float[] _float8 = new float[5]; + private readonly float[] _float8 = new float[5]; - private float[] _float9 = new float[5]; + private readonly float[] _float9 = new float[5]; - private float[] _float10 = new float[5]; + private readonly float[] _float10 = new float[5]; - private float[] _float11 = new float[5]; + private readonly float[] _float11 = new float[5]; - private float[] _float12 = new float[5]; + private readonly float[] _float12 = new float[5]; - private float[] _float13 = new float[5]; + private readonly float[] _float13 = new float[5]; - private float[] _float14 = new float[5]; + private readonly float[] _float14 = new float[5]; - private float[] _float15 = new float[5]; + private readonly float[] _float15 = new float[5]; - private float[] _float16 = new float[5]; + private readonly float[] _float16 = new float[5]; - private float[] _float17 = new float[5]; + private readonly float[] _float17 = new float[5]; - private float[] _float18 = new float[5]; + private readonly float[] _float18 = new float[5]; - private float[] _float19 = new float[5]; + private readonly float[] _float19 = new float[5]; - private float[] _float20 = new float[5]; + private readonly float[] _float20 = new float[5]; public void method_0() { diff --git a/GHNamespaceH/Class56.cs b/GHNamespaceH/Class56.cs index d85d6a7..c5c61ab 100644 --- a/GHNamespaceH/Class56.cs +++ b/GHNamespaceH/Class56.cs @@ -62,15 +62,15 @@ public void method_1(int int13) } else { - for (var i = 0; i < _byte0.Length; i++) + for (int i = 0; i < _byte0.Length; i++) { _byte0[i] = 0; } - for (var j = 0; j < _int3.Length; j++) + for (int j = 0; j < _int3.Length; j++) { _int3[j] = 0; } - for (var k = 0; k < _long0.Length; k++) + for (int k = 0; k < _long0.Length; k++) { _long0[k] = 0L; } @@ -90,7 +90,7 @@ private void method_3(int int13) if (_int0 <= _int1 + int13) { _int0 += int13 + 1024; - var dst = new byte[_int0]; + byte[] dst = new byte[_int0]; Buffer.BlockCopy(_byte0, 0, dst, 0, _byte0.Length); _byte0 = dst; } @@ -101,10 +101,10 @@ private void method_4(int int13) if (_int4 <= _int5 + int13) { _int4 += int13 + 32; - var dst = new int[_int4]; + int[] dst = new int[_int4]; Buffer.BlockCopy(_int3, 0, dst, 0, _int3.Length << 2); _int3 = dst; - var dst2 = new long[_int4]; + long[] dst2 = new long[_int4]; Buffer.BlockCopy(_long0, 0, dst2, 0, _long0.Length << 3); _long0 = dst2; } @@ -112,7 +112,7 @@ private void method_4(int int13) public int method_5(Class67 class670) { - var num = _int7; + int num = _int7; if (_int6 <= num) { return 0; @@ -123,15 +123,15 @@ public int method_5(Class67 class670) _long1 += 1L; return -1; } - var num2 = _int3[num] & 255; + int num2 = _int3[num] & 255; class670.Byte0 = _byte0; class670.Int0 = _int2; class670.Int3 = (_int3[num] & 512); class670.Int2 = (_int3[num] & 256); - var num3 = 0 + num2; + int num3 = 0 + num2; while (num2 == 255) { - var num4 = _int3[++num]; + int num4 = _int3[++num]; num2 = (num4 & 255); if ((num4 & 512) != 0) { @@ -150,22 +150,22 @@ public int method_5(Class67 class670) public bool method_6(Class48 class480) { - var array = class480.Byte0; - var num = class480.Int0; - var src = class480.Byte1; - var num2 = class480.Int2; - var num3 = class480.Int3; - var i = 0; - var num4 = class480.method_0(); - var num5 = class480.method_1(); - var num6 = class480.method_2(); - var num7 = class480.method_3(); - var num8 = class480.method_4(); - var num9 = class480.method_5(); - var num10 = class480.method_6(); - var num11 = array[num + 26] & 255; - var num12 = _int7; - var num13 = _int2; + byte[] array = class480.Byte0; + int num = class480.Int0; + byte[] src = class480.Byte1; + int num2 = class480.Int2; + int num3 = class480.Int3; + int i = 0; + int num4 = class480.method_0(); + int num5 = class480.method_1(); + int num6 = class480.method_2(); + int num7 = class480.method_3(); + long num8 = class480.method_4(); + int num9 = class480.method_5(); + int num10 = class480.method_6(); + int num11 = array[num + 26] & 255; + int num12 = _int7; + int num13 = _int2; if (num13 != 0) { _int1 -= num13; @@ -197,7 +197,7 @@ public bool method_6(Class48 class480) method_4(num11 + 1); if (num10 != _int12) { - for (var j = _int6; j < _int5; j++) + for (int j = _int6; j < _int5; j++) { _int1 -= (_int3[j] & 255); } @@ -212,7 +212,7 @@ public bool method_6(Class48 class480) num6 = 0; while (i < num11) { - var num14 = array[num + 27 + i] & 255; + int num14 = array[num + 27 + i] & 255; num2 += num14; num3 -= num14; if (num14 < 255) @@ -230,10 +230,10 @@ public bool method_6(Class48 class480) Buffer.BlockCopy(src, num2, _byte0, _int1, num3); _int1 += num3; } - var num15 = -1; + int num15 = -1; while (i < num11) { - var num16 = array[num + 27 + i] & 255; + int num16 = array[num + 27 + i] & 255; _int3[_int5] = num16; _long0[_int5] = -1L; if (num6 != 0) diff --git a/GHNamespaceH/OGGClass5.cs b/GHNamespaceH/OGGClass5.cs index 7964866..603ba3d 100644 --- a/GHNamespaceH/OGGClass5.cs +++ b/GHNamespaceH/OGGClass5.cs @@ -72,32 +72,32 @@ public void method_0() public void method_1() { - for (var i = 0; i < Int14; i++) + for (int i = 0; i < Int14; i++) { Class270[i] = null; } Class270 = null; - for (var j = 0; j < Int15; j++) + for (int j = 0; j < Int15; j++) { Class34.Class340[Int21[j]].vmethod_2(Object0[j]); } Object0 = null; - for (var k = 0; k < Int16; k++) + for (int k = 0; k < Int16; k++) { Class50.Class500[Int22[k]].vmethod_2(Object1[k]); } Object1 = null; - for (var l = 0; l < Int17; l++) + for (int l = 0; l < Int17; l++) { Class28.Class280[Int23[l]].vmethod_2(Object2[l]); } Object2 = null; - for (var m = 0; m < Int18; m++) + for (int m = 0; m < Int18; m++) { Class23.Class230[Int24[m]].vmethod_2(Object3[m]); } Object3 = null; - for (var n = 0; n < Int19; n++) + for (int n = 0; n < Int19; n++) { if (OggClass2[n] != null) { @@ -106,7 +106,7 @@ public void method_1() } } OggClass2 = null; - for (var num = 0; num < Int20; num++) + for (int num = 0; num < Int20; num++) { Class700[num].method_0(); } @@ -144,7 +144,7 @@ private int method_3(OggClass3 oggClass3) { OggClass2 = new OggClass2[Int19]; } - for (var i = 0; i < Int19; i++) + for (int i = 0; i < Int19; i++) { OggClass2[i] = new OggClass2(); if (OggClass2[i].method_0(oggClass3) != 0) @@ -162,7 +162,7 @@ private int method_3(OggClass3 oggClass3) { Object1 = new object[Int16]; } - for (var j = 0; j < Int16; j++) + for (int j = 0; j < Int16; j++) { Int22[j] = oggClass3.method_6(16); if (Int22[j] < 0 || Int22[j] >= Int2) @@ -186,7 +186,7 @@ private int method_3(OggClass3 oggClass3) { Object2 = new object[Int17]; } - for (var k = 0; k < Int17; k++) + for (int k = 0; k < Int17; k++) { Int23[k] = oggClass3.method_6(16); if (Int23[k] < 0 || Int23[k] >= Int3) @@ -210,7 +210,7 @@ private int method_3(OggClass3 oggClass3) { Object3 = new object[Int18]; } - for (var l = 0; l < Int18; l++) + for (int l = 0; l < Int18; l++) { Int24[l] = oggClass3.method_6(16); if (Int24[l] < 0 || Int24[l] >= Int4) @@ -234,7 +234,7 @@ private int method_3(OggClass3 oggClass3) { Object0 = new object[Int15]; } - for (var m = 0; m < Int15; m++) + for (int m = 0; m < Int15; m++) { Int21[m] = oggClass3.method_6(16); if (Int21[m] < 0 || Int21[m] >= Int5) @@ -254,13 +254,15 @@ private int method_3(OggClass3 oggClass3) { Class270 = new Class27[Int14]; } - for (var n = 0; n < Int14; n++) + for (int n = 0; n < Int14; n++) { - Class270[n] = new Class27(); - Class270[n].Int0 = oggClass3.method_6(1); - Class270[n].Int1 = oggClass3.method_6(16); - Class270[n].Int2 = oggClass3.method_6(16); - Class270[n].Int3 = oggClass3.method_6(8); + Class270[n] = new Class27 + { + Int0 = oggClass3.method_6(1), + Int1 = oggClass3.method_6(16), + Int2 = oggClass3.method_6(16), + Int3 = oggClass3.method_6(8) + }; if (Class270[n].Int1 >= Int6 || Class270[n].Int2 >= Int6 || Class270[n].Int3 >= Int15) { method_1(); @@ -277,12 +279,12 @@ private int method_3(OggClass3 oggClass3) public int method_4(Class47 class470, Class67 class670) { - var @class = new OggClass3(); + OggClass3 @class = new OggClass3(); if (class670 != null) { @class.method_4(class670.Byte0, class670.Int0, class670.Int1); - var array = new byte[6]; - var num = @class.method_6(8); + byte[] array = new byte[6]; + int num = @class.method_6(8); @class.method_5(array, 6); if (array[0] == 118 && array[1] == 111 && array[2] == 114 && array[3] == 98 && array[4] == 105) { diff --git a/GHNamespaceH/OGGStream.cs b/GHNamespaceH/OGGStream.cs index a45e797..34f21d0 100644 --- a/GHNamespaceH/OGGStream.cs +++ b/GHNamespaceH/OGGStream.cs @@ -12,7 +12,7 @@ public class OggStream : GenericAudioStream { private static readonly int Int2 = 8500; - private static int _int3; + private static readonly int _int3; private static readonly int Int5 = 2; @@ -112,7 +112,7 @@ public OggStream(string fileName) : this() { throw new Exception0("OggStream: " + ex.Message); } - var num = method_9(fileData, null, 0); + int num = method_9(fileData, null, 0); if (num == -1) { throw new Exception0("OggStream: open return -1"); @@ -125,7 +125,7 @@ public OggStream(Stream stream1) : this(stream1, null, 0) public OggStream(Stream stream1, byte[] byte0, int int24) : this() { - var num = method_9(stream1, byte0, int24); + int num = method_9(stream1, byte0, int24); if (num == -1) { throw new Exception0("OggStream: open return -1"); @@ -140,7 +140,7 @@ private int method_0(Class48 class480, long long6) } while (long6 <= 0L || _long0 < long6) { - var num = _class520.method_3(class480); + int num = _class520.method_3(class480); if (num < 0) { _long0 -= num; @@ -149,7 +149,7 @@ private int method_0(Class48 class480, long long6) { if (num != 0) { - var result = (int) _long0; + int result = (int) _long0; _long0 += num; return result; } @@ -157,7 +157,7 @@ private int method_0(Class48 class480, long long6) { return Int6; } - var num2 = method_7(); + int num2 = method_7(); if (num2 == 0) { return Int7; @@ -173,8 +173,8 @@ private int method_0(Class48 class480, long long6) private int method_1(Class48 class480) { - var num = _long0; - var num2 = -1; + long num = _long0; + int num2 = -1; int num3; while (num2 == -1) { @@ -209,11 +209,11 @@ private int method_1(Class48 class480) private int method_2(OggClass5 oggClass5, Class47 class471, int[] int24, Class48 class480) { - var @class = new Class48(); - var class67 = new Class67(); + Class48 @class = new Class48(); + Class67 class67 = new Class67(); if (class480 == null) { - var num = method_0(@class, Int2); + int num = method_0(@class, Int2); if (num == Int9) { return Int9; @@ -231,13 +231,13 @@ private int method_2(OggClass5 oggClass5, Class47 class471, int[] int24, Class48 _class560.method_1(class480.method_5()); oggClass5.method_0(); class471.method_0(); - var i = 0; + int i = 0; while (i < 3) { _class560.method_6(class480); while (i < 3) { - var num2 = _class560.method_5(class67); + int num2 = _class560.method_5(class67); if (num2 == 0) { break; @@ -274,13 +274,13 @@ private int method_2(OggClass5 oggClass5, Class47 class471, int[] int24, Class48 private void method_3(OggClass5 class491, Class47 class471, int int24) { - var @class = new Class48(); + Class48 @class = new Class48(); _oggClass5 = new OggClass5[_int20]; _class470 = new Class47[_int20]; _long2 = new long[_int20]; _long3 = new long[_int20]; _int21 = new int[_int20]; - var i = 0; + int i = 0; while (i < _int20) { if (class491 != null && class471 != null && i == 0) @@ -303,12 +303,12 @@ private void method_3(OggClass5 class491, Class47 class471, int int24) _class560.method_2(); } } - var long_ = _long1[i + 1]; + long long_ = _long1[i + 1]; method_8(long_); long num2; while (true) { - var num = method_1(@class); + int num = method_1(@class); if (num == -1) { goto Block_6; @@ -358,7 +358,7 @@ private void method_5() private int method_6(int int24) { - var @class = new Class48(); + Class48 @class = new Class48(); Class67 class2; long num2; while (true) @@ -366,7 +366,7 @@ private int method_6(int int24) if (_bool1) { class2 = new Class67(); - var num = _class560.method_5(class2); + int num = _class560.method_5(class2); if (num > 0) { num2 = class2.Long0; @@ -394,7 +394,7 @@ private int method_6(int int24) if (_bool0) { _int22 = @class.method_5(); - var num3 = 0; + int num3 = 0; while (num3 < _int20 && _int21[num3] != _int22) { num3++; @@ -409,8 +409,8 @@ private int method_6(int int24) } else { - var array = new int[1]; - var num4 = method_2(_oggClass5[0], _class470[0], array, @class); + int[] array = new int[1]; + int num4 = method_2(_oggClass5[0], _class470[0], array, @class); _int22 = array[0]; if (num4 != 0) { @@ -424,16 +424,16 @@ private int method_6(int int24) } return -1; Block_11: - var num5 = _oggClass1.method_3(); + int num5 = _oggClass1.method_3(); _oggClass1.method_2(_oggClass6); _float1 += _oggClass1.method_3() - num5; _float0 += class2.Int1 * 8; if (num2 != -1L && class2.Int3 == 0) { - var num6 = _bool0 ? _int23 : 0; - var num7 = _oggClass1.method_3(); + int num6 = _bool0 ? _int23 : 0; + int num7 = _oggClass1.method_3(); num2 -= num7; - for (var i = 0; i < num6; i++) + for (int i = 0; i < num6; i++) { num2 += _long3[i]; } @@ -503,9 +503,9 @@ private static long smethod_1(Stream stream1) private int method_7() { - var offset = _class520.method_1(Int2); - var byte_ = _class520.Byte0; - var num = 0; + int offset = _class520.method_1(Int2); + byte[] byte_ = _class520.Byte0; + int num = 0; int result; try { @@ -545,7 +545,7 @@ private int method_10(Stream fileStream, byte[] nullArray, int zero) _class520.method_5(); if (nullArray != null) { - var dstOffset = _class520.method_1(zero); + int dstOffset = _class520.method_1(zero); Buffer.BlockCopy(nullArray, 0, _class520.Byte0, dstOffset, zero); _class520.method_2(zero); } @@ -559,7 +559,7 @@ private int method_10(Stream fileStream, byte[] nullArray, int zero) num = method_12(); } //int num = stream_1.CanSeek ? this.method_11() : this.method_12(); - var @class = method_21(-1); + OggClass5 @class = method_21(-1); WaveFormat0 = new WaveFormat(@class.Int9, @class.Int8); _double0 = WaveFormat0.int_0 * WaveFormat0.short_1 / (method_20(-1) / 8.0); _long5 = method_15(-1) * WaveFormat0.short_1; @@ -577,13 +577,13 @@ private int method_10(Stream fileStream, byte[] nullArray, int zero) private int method_11() { - var oggClass5 = new OggClass5(); - var class47 = new Class47(); - var @class = new Class48(); - var array = new int[1]; - var num = method_2(oggClass5, class47, array, null); - var num2 = array[0]; - var int_ = (int) _long0; + OggClass5 oggClass5 = new OggClass5(); + Class47 class47 = new Class47(); + Class48 @class = new Class48(); + int[] array = new int[1]; + int num = method_2(oggClass5, class47, array, null); + int num2 = array[0]; + int int_ = (int) _long0; _class560.method_2(); if (num == -1) { @@ -592,7 +592,7 @@ private int method_11() _bool0 = true; smethod_0(FileStream, 0L, Int5); _long0 = smethod_1(FileStream); - var num3 = _long0; + long num3 = _long0; num3 = method_1(@class); if (@class.method_5() != num2) { @@ -618,7 +618,7 @@ private int method_12() _oggClass5[0] = new OggClass5(); _class470 = new Class47[_int20]; _class470[0] = new Class47(); - var array = new int[1]; + int[] array = new int[1]; if (method_2(_oggClass5[0], _class470[0], array, null) == -1) { return -1; @@ -630,9 +630,9 @@ private int method_12() private int method_13(long long6, long long7, long long8, int int24, int int25) { - var num = long8; - var long9 = long8; - var @class = new Class48(); + long num = long8; + long long9 = long8; + Class48 @class = new Class48(); int num3; while (long7 < num) { @@ -699,8 +699,8 @@ public long method_14(int int24) } if (int24 < 0) { - var num = 0L; - for (var i = 0; i < _int20; i++) + long num = 0L; + for (int i = 0; i < _int20; i++) { num += method_14(i); } @@ -717,8 +717,8 @@ public long method_15(int int24) } if (int24 < 0) { - var num = 0L; - for (var i = 0; i < _int20; i++) + long num = 0L; + for (int i = 0; i < _int20; i++) { num += method_15(i); } @@ -735,8 +735,8 @@ public float method_16(int int24) } if (int24 < 0) { - var num = 0f; - for (var i = 0; i < _int20; i++) + float num = 0f; + for (int i = 0; i < _int20; i++) { num += method_16(i); } @@ -790,7 +790,7 @@ public int method_17(int int24) public int method_18(long long6) { - var num = method_15(-1); + long num = method_15(-1); if (!_bool0) { return -1; @@ -810,11 +810,11 @@ public int method_18(long long6) break; } } - var num2 = long6 - num; - var num3 = _long1[i + 1]; - var num4 = _long1[i]; - var int_ = (int) num4; - var @class = new Class48(); + long num2 = long6 - num; + long num3 = _long1[i + 1]; + long num4 = _long1[i]; + int int_ = (int) num4; + Class48 @class = new Class48(); while (num4 < num3) { long num5; @@ -827,14 +827,14 @@ public int method_18(long long6) num5 = (num3 + num4) / 2L; } method_8(num5); - var num6 = method_0(@class, num3 - num5); + int num6 = method_0(@class, num3 - num5); if (num6 == -1) { num3 = num5; } else { - var num7 = @class.method_4(); + long num7 = @class.method_4(); if (num7 < num2) { int_ = num6; @@ -866,8 +866,8 @@ public int method_18(long long6) } while (_long4 < long6) { - var num8 = (int) (long6 - _long4); - var num9 = _oggClass1.method_3(); + int num8 = (int) (long6 - _long4); + int num9 = _oggClass1.method_3(); if (num9 > num8) { num9 = num8; @@ -903,8 +903,8 @@ public int method_20(int int24) } if (int24 < 0) { - var num = 0L; - for (var i = 0; i < _int20; i++) + long num = 0L; + for (int i = 0; i < _int20; i++) { num += (_long1[i + 1] - _long2[i]) * 8L; } @@ -961,7 +961,7 @@ private int method_22() _class560.method_2(); if (_oggClass5 != null && _int20 != 0) { - for (var i = 0; i < _int20; i++) + for (int i = 0; i < _int20; i++) { _oggClass5[i].method_1(); _class470[i].method_2(); @@ -1027,8 +1027,8 @@ public override void Dispose() public override int vmethod_3(IntPtr intptr0, int int24) { int24 >>= 2; - var source = new float[int24]; - var num = vmethod_4(source, 0, int24); + float[] source = new float[int24]; + int num = vmethod_4(source, 0, int24); if (num == 0) { return 0; @@ -1039,22 +1039,22 @@ public override int vmethod_3(IntPtr intptr0, int int24) public override int Read(byte[] buffer, int offset, int count) { - var array = new float[count >> 2]; - var num = vmethod_4(array, 0, array.Length) << 2; + float[] array = new float[count >> 2]; + int num = vmethod_4(array, 0, array.Length) << 2; Buffer.BlockCopy(array, 0, buffer, offset, num); return num; } public override int vmethod_4(float[] float2, int int24, int int25) { - var num = int24; - var num2 = int24 + int25; + int num = int24; + int num2 = int24 + int25; int short_ = WaveFormat0.short_0; do { if (_bool1) { - var num3 = _oggClass1.method_4(float2, num, num2); + int num3 = _oggClass1.method_4(float2, num, num2); if (num3 != 0) { _oggClass1.method_6(num3); @@ -1072,17 +1072,17 @@ public override int vmethod_4(float[] float2, int int24, int int25) public override float[][] vmethod_5(int int24) { - var array = new float[WaveFormat0.short_0][]; - for (var i = 0; i < array.Length; i++) + float[][] array = new float[WaveFormat0.short_0][]; + for (int i = 0; i < array.Length; i++) { array[i] = new float[int24]; } - var num = 0; + int num = 0; do { if (_bool1) { - var num2 = _oggClass1.method_5(array, num, int24); + int num2 = _oggClass1.method_5(array, num, int24); if (num2 != 0) { num += num2; @@ -1101,7 +1101,7 @@ public override float[][] vmethod_5(int int24) } if (num < int24) { - for (var j = 0; j < array.Length; j++) + for (int j = 0; j < array.Length; j++) { Array.Resize(ref array[j], num); } diff --git a/GHNamespaceI/Class101.cs b/GHNamespaceI/Class101.cs index badffcf..9dec108 100644 --- a/GHNamespaceI/Class101.cs +++ b/GHNamespaceI/Class101.cs @@ -11,7 +11,7 @@ public Class101() public void method_0(int int0, int int1) { - var num = 1 << int1 - 1; + int num = 1 << int1 - 1; do { if ((_short0 & 32768) == 0 ^ (int0 & num) == 0) @@ -28,7 +28,7 @@ public void method_0(int int0, int int1) public short method_1() { - var result = _short0; + short result = _short0; _short0 = -1; return result; } diff --git a/GHNamespaceI/Class102.cs b/GHNamespaceI/Class102.cs index ec5f07d..e7d9370 100644 --- a/GHNamespaceI/Class102.cs +++ b/GHNamespaceI/Class102.cs @@ -27,8 +27,8 @@ public int method_0() public int method_1(int int5) { _int2 += int5; - var num = 0; - var num2 = _int3; + int num = 0; + int num2 = _int3; if (num2 + int5 < 32768) { while (int5-- > 0) @@ -53,14 +53,14 @@ public int method_1(int int5) public int method_2() { _int2++; - var result = _int4[_int3]; + int result = _int4[_int3]; _int3 = (_int3 + 1 & Int0); return result; } public void method_3(int int5) { - var num = _int1; + int num = _int1; _int4[num++] = (int5 & 128); _int4[num++] = (int5 & 64); _int4[num++] = (int5 & 32); @@ -89,7 +89,7 @@ public void method_4(int int5) public void method_5(int int5) { - var num = int5 << 3; + int num = int5 << 3; _int2 -= num; _int3 -= num; if (_int3 < 0) diff --git a/GHNamespaceI/Class103.cs b/GHNamespaceI/Class103.cs index 56cd917..895f1cc 100644 --- a/GHNamespaceI/Class103.cs +++ b/GHNamespaceI/Class103.cs @@ -118,21 +118,21 @@ public static void smethod_0() public static int smethod_1(Class103 class1031, int[] int25, int[] int26, int[] int27, int[] int28, Class102 class1020) { - var num = 0; - var result = 1; - var num2 = -2147483648; + int num = 0; + int result = 1; + int num2 = -2147483648; if (class1031._int3 == null) { return 2; } if (class1031._int4 == 0) { - var arg261 = 0; + int arg261 = 0; int26[0] = 0; int25[arg261] = 0; return 0; } - var ile4 = false; + bool ile4 = false; for (;;) { while (ile4 || class1031._int3[num, 0] != 0) @@ -206,7 +206,7 @@ public static int smethod_1(Class103 class1031, int[] int25, int[] int26, int[] return result; } } - var num3 = class1031._int3[num, 1]; + int num3 = class1031._int3[num, 1]; int25[0] = num3 >> 4; int26[0] = (class1031._int3[num, 1] & 15); result = 0; @@ -218,7 +218,7 @@ public static int smethod_1(Class103 class1031, int[] int25, int[] int26, int[] static Class103() { // Note: this type is marked as 'beforefieldinit'. - var array = new int[1, 2]; + int[,] array = new int[1, 2]; Int5 = array; Int6 = new[,] { @@ -393,7 +393,7 @@ static Class103() 34 } }; - var array2 = new int[1, 2]; + int[,] array2 = new int[1, 2]; Int9 = array2; Int10 = new[,] { @@ -5090,7 +5090,7 @@ static Class103() 254 } }; - var array3 = new int[1, 2]; + int[,] array3 = new int[1, 2]; Int19 = array3; Int20 = new[,] { diff --git a/GHNamespaceI/Class80.cs b/GHNamespaceI/Class80.cs index ad9064f..bb083f3 100644 --- a/GHNamespaceI/Class80.cs +++ b/GHNamespaceI/Class80.cs @@ -546,7 +546,7 @@ public void method_0(float[] float9) if (_float4 == null) { _float4 = new float[32]; - for (var i = 0; i < 32; i++) + for (int i = 0; i < 32; i++) { _float4[i] = 1f; } @@ -588,7 +588,7 @@ public void method_2(float float9, int int2) public void method_3(float[] float9) { - for (var i = 31; i >= 0; i--) + for (int i = 31; i >= 0; i--) { _float3[i] = float9[i] * _float4[i]; } @@ -596,71 +596,71 @@ public void method_3(float[] float9) private void method_4() { - var array = _float3; - var num = array[0]; - var num2 = array[1]; - var num3 = array[2]; - var num4 = array[3]; - var num5 = array[4]; - var num6 = array[5]; - var num7 = array[6]; - var num8 = array[7]; - var num9 = array[8]; - var num10 = array[9]; - var num11 = array[10]; - var num12 = array[11]; - var num13 = array[12]; - var num14 = array[13]; - var num15 = array[14]; - var num16 = array[15]; - var num17 = array[16]; - var num18 = array[17]; - var num19 = array[18]; - var num20 = array[19]; - var num21 = array[20]; - var num22 = array[21]; - var num23 = array[22]; - var num24 = array[23]; - var num25 = array[24]; - var num26 = array[25]; - var num27 = array[26]; - var num28 = array[27]; - var num29 = array[28]; - var num30 = array[29]; - var num31 = array[30]; - var num32 = array[31]; - var num33 = num + num32; - var num34 = num2 + num31; - var num35 = num3 + num30; - var num36 = num4 + num29; - var num37 = num5 + num28; - var num38 = num6 + num27; - var num39 = num7 + num26; - var num40 = num8 + num25; - var num41 = num9 + num24; - var num42 = num10 + num23; - var num43 = num11 + num22; - var num44 = num12 + num21; - var num45 = num13 + num20; - var num46 = num14 + num19; - var num47 = num15 + num18; - var num48 = num16 + num17; - var num49 = num33 + num48; - var num50 = num34 + num47; - var num51 = num35 + num46; - var num52 = num36 + num45; - var num53 = num37 + num44; - var num54 = num38 + num43; - var num55 = num39 + num42; - var num56 = num40 + num41; - var num57 = (num33 - num48) * 0.5024193f; - var num58 = (num34 - num47) * 0.5224986f; - var num59 = (num35 - num46) * 0.566944063f; - var num60 = (num36 - num45) * 0.6468218f; - var num61 = (num37 - num44) * 0.7881546f; - var num62 = (num38 - num43) * 1.06067765f; - var num63 = (num39 - num42) * 1.72244716f; - var num64 = (num40 - num41) * 5.10114861f; + float[] array = _float3; + float num = array[0]; + float num2 = array[1]; + float num3 = array[2]; + float num4 = array[3]; + float num5 = array[4]; + float num6 = array[5]; + float num7 = array[6]; + float num8 = array[7]; + float num9 = array[8]; + float num10 = array[9]; + float num11 = array[10]; + float num12 = array[11]; + float num13 = array[12]; + float num14 = array[13]; + float num15 = array[14]; + float num16 = array[15]; + float num17 = array[16]; + float num18 = array[17]; + float num19 = array[18]; + float num20 = array[19]; + float num21 = array[20]; + float num22 = array[21]; + float num23 = array[22]; + float num24 = array[23]; + float num25 = array[24]; + float num26 = array[25]; + float num27 = array[26]; + float num28 = array[27]; + float num29 = array[28]; + float num30 = array[29]; + float num31 = array[30]; + float num32 = array[31]; + float num33 = num + num32; + float num34 = num2 + num31; + float num35 = num3 + num30; + float num36 = num4 + num29; + float num37 = num5 + num28; + float num38 = num6 + num27; + float num39 = num7 + num26; + float num40 = num8 + num25; + float num41 = num9 + num24; + float num42 = num10 + num23; + float num43 = num11 + num22; + float num44 = num12 + num21; + float num45 = num13 + num20; + float num46 = num14 + num19; + float num47 = num15 + num18; + float num48 = num16 + num17; + float num49 = num33 + num48; + float num50 = num34 + num47; + float num51 = num35 + num46; + float num52 = num36 + num45; + float num53 = num37 + num44; + float num54 = num38 + num43; + float num55 = num39 + num42; + float num56 = num40 + num41; + float num57 = (num33 - num48) * 0.5024193f; + float num58 = (num34 - num47) * 0.5224986f; + float num59 = (num35 - num46) * 0.566944063f; + float num60 = (num36 - num45) * 0.6468218f; + float num61 = (num37 - num44) * 0.7881546f; + float num62 = (num38 - num43) * 1.06067765f; + float num63 = (num39 - num42) * 1.72244716f; + float num64 = (num40 - num41) * 5.10114861f; num33 = num49 + num56; num34 = num50 + num55; num35 = num51 + num54; @@ -711,21 +711,21 @@ private void method_4() num48 = (num63 - num64) * 0.707106769f; float num67; float num66; - var num65 = -(num66 = (num67 = num40) + num38) - num39; - var num68 = -num39 - num40 - num37; + float num65 = -(num66 = (num67 = num40) + num38) - num39; + float num68 = -num39 - num40 - num37; float num71; float num70; - var num69 = (num70 = (num71 = num48) + num44) + num46; + float num69 = (num70 = (num71 = num48) + num44) + num46; float num73; - var num72 = -(num73 = num48 + num46 + num42) - num47; + float num72 = -(num73 = num48 + num46 + num42) - num47; float num75; - var num74 = (num75 = -num47 - num48 - num43 - num44) - num46; - var num76 = -num47 - num48 - num45 - num41; - var num77 = num75 - num45; - var num78 = -num33; - var num79 = num34; + float num74 = (num75 = -num47 - num48 - num43 - num44) - num46; + float num76 = -num47 - num48 - num45 - num41; + float num77 = num75 - num45; + float num78 = -num33; + float num79 = num34; float num81; - var num80 = -(num81 = num36) - num35; + float num80 = -(num81 = num36) - num35; num33 = (num - num32) * 0.500603f; num34 = (num2 - num31) * 0.505470932f; num35 = (num3 - num30) * 0.5154473f; @@ -809,22 +809,22 @@ private void method_4() float num85; float num84; float num83; - var num82 = (num83 = (num84 = (num85 = num48) + num40) + num44) + num38 + num46; + float num82 = (num83 = (num84 = (num85 = num48) + num40) + num44) + num38 + num46; float num87; - var num86 = (num87 = num48 + num44 + num36) + num46; + float num86 = (num87 = num48 + num44 + num36) + num46; float num89; - var num88 = -(num89 = (num75 = num46 + num48 + num42) + num34) - num47; + float num88 = -(num89 = (num75 = num46 + num48 + num42) + num34) - num47; float num91; - var num90 = -(num91 = num75 + num38 + num40) - num39 - num47; - var num92 = (num75 = -num43 - num44 - num47 - num48) - num46 - num35 - num36; - var num93 = num75 - num46 - num38 - num39 - num40; - var num94 = num75 - num45 - num35 - num36; + float num90 = -(num91 = num75 + num38 + num40) - num39 - num47; + float num92 = (num75 = -num43 - num44 - num47 - num48) - num46 - num35 - num36; + float num93 = num75 - num46 - num38 - num39 - num40; + float num94 = num75 - num45 - num35 - num36; float num96; - var num95 = num75 - num45 - (num96 = num37 + num39 + num40); - var num97 = (num75 = -num41 - num45 - num47 - num48) - num33; - var num98 = num75 - num96; - var array2 = _float2; - var num99 = _int0; + float num95 = num75 - num45 - (num96 = num37 + num39 + num40); + float num97 = (num75 = -num41 - num45 - num47 - num48) - num33; + float num98 = num75 - num96; + float[] array2 = _float2; + int num99 = _int0; array2[num99] = num79; array2[16 + num99] = num89; array2[32 + num99] = num73; @@ -894,11 +894,11 @@ private void method_4() private void method_5() { - var array = _float2; - var num = 0; - for (var i = 0; i < 32; i++) + float[] array = _float2; + int num = 0; + for (int i = 0; i < 32; i++) { - var array2 = _float7[i]; + float[] array2 = _float7[i]; _float5[i] = array[num] * array2[0] + array[15 + num] * array2[1] + array[14 + num] * array2[2] + array[13 + num] * array2[3] + array[12 + num] * array2[4] + array[11 + num] * array2[5] + array[10 + num] * array2[6] + array[9 + num] * array2[7] + array[8 + num] * array2[8] + @@ -911,11 +911,11 @@ private void method_5() private void method_6() { - var array = _float2; - var num = 0; - for (var i = 0; i < 32; i++) + float[] array = _float2; + int num = 0; + for (int i = 0; i < 32; i++) { - var array2 = _float7[i]; + float[] array2 = _float7[i]; _float5[i] = array[1 + num] * array2[0] + array[num] * array2[1] + array[15 + num] * array2[2] + array[14 + num] * array2[3] + array[13 + num] * array2[4] + array[12 + num] * array2[5] + array[11 + num] * array2[6] + array[10 + num] * array2[7] + array[9 + num] * array2[8] + @@ -928,11 +928,11 @@ private void method_6() private void method_7() { - var array = _float2; - var num = 0; - for (var i = 0; i < 32; i++) + float[] array = _float2; + int num = 0; + for (int i = 0; i < 32; i++) { - var array2 = _float7[i]; + float[] array2 = _float7[i]; _float5[i] = array[2 + num] * array2[0] + array[1 + num] * array2[1] + array[num] * array2[2] + array[15 + num] * array2[3] + array[14 + num] * array2[4] + array[13 + num] * array2[5] + array[12 + num] * array2[6] + array[11 + num] * array2[7] + array[10 + num] * array2[8] + @@ -945,11 +945,11 @@ private void method_7() private void method_8() { - var array = _float2; - var num = 0; - for (var i = 0; i < 32; i++) + float[] array = _float2; + int num = 0; + for (int i = 0; i < 32; i++) { - var array2 = _float7[i]; + float[] array2 = _float7[i]; _float5[i] = array[3 + num] * array2[0] + array[2 + num] * array2[1] + array[1 + num] * array2[2] + array[num] * array2[3] + array[15 + num] * array2[4] + array[14 + num] * array2[5] + array[13 + num] * array2[6] + array[12 + num] * array2[7] + array[11 + num] * array2[8] + @@ -962,11 +962,11 @@ private void method_8() private void method_9() { - var array = _float2; - var num = 0; - for (var i = 0; i < 32; i++) + float[] array = _float2; + int num = 0; + for (int i = 0; i < 32; i++) { - var array2 = _float7[i]; + float[] array2 = _float7[i]; _float5[i] = array[4 + num] * array2[0] + array[3 + num] * array2[1] + array[2 + num] * array2[2] + array[1 + num] * array2[3] + array[num] * array2[4] + array[15 + num] * array2[5] + array[14 + num] * array2[6] + array[13 + num] * array2[7] + array[12 + num] * array2[8] + @@ -979,11 +979,11 @@ private void method_9() private void method_10() { - var array = _float2; - var num = 0; - for (var i = 0; i < 32; i++) + float[] array = _float2; + int num = 0; + for (int i = 0; i < 32; i++) { - var array2 = _float7[i]; + float[] array2 = _float7[i]; _float5[i] = array[5 + num] * array2[0] + array[4 + num] * array2[1] + array[3 + num] * array2[2] + array[2 + num] * array2[3] + array[1 + num] * array2[4] + array[num] * array2[5] + array[15 + num] * array2[6] + array[14 + num] * array2[7] + array[13 + num] * array2[8] + @@ -996,11 +996,11 @@ private void method_10() private void method_11() { - var array = _float2; - var num = 0; - for (var i = 0; i < 32; i++) + float[] array = _float2; + int num = 0; + for (int i = 0; i < 32; i++) { - var array2 = _float7[i]; + float[] array2 = _float7[i]; _float5[i] = array[6 + num] * array2[0] + array[5 + num] * array2[1] + array[4 + num] * array2[2] + array[3 + num] * array2[3] + array[2 + num] * array2[4] + array[1 + num] * array2[5] + array[num] * array2[6] + array[15 + num] * array2[7] + array[14 + num] * array2[8] + @@ -1013,11 +1013,11 @@ private void method_11() private void method_12() { - var array = _float2; - var num = 0; - for (var i = 0; i < 32; i++) + float[] array = _float2; + int num = 0; + for (int i = 0; i < 32; i++) { - var array2 = _float7[i]; + float[] array2 = _float7[i]; _float5[i] = array[7 + num] * array2[0] + array[6 + num] * array2[1] + array[5 + num] * array2[2] + array[4 + num] * array2[3] + array[3 + num] * array2[4] + array[2 + num] * array2[5] + array[1 + num] * array2[6] + array[num] * array2[7] + array[15 + num] * array2[8] + @@ -1030,11 +1030,11 @@ private void method_12() private void method_13() { - var array = _float2; - var num = 0; - for (var i = 0; i < 32; i++) + float[] array = _float2; + int num = 0; + for (int i = 0; i < 32; i++) { - var array2 = _float7[i]; + float[] array2 = _float7[i]; _float5[i] = array[8 + num] * array2[0] + array[7 + num] * array2[1] + array[6 + num] * array2[2] + array[5 + num] * array2[3] + array[4 + num] * array2[4] + array[3 + num] * array2[5] + array[2 + num] * array2[6] + array[1 + num] * array2[7] + array[num] * array2[8] + @@ -1047,11 +1047,11 @@ private void method_13() private void method_14() { - var array = _float2; - var num = 0; - for (var i = 0; i < 32; i++) + float[] array = _float2; + int num = 0; + for (int i = 0; i < 32; i++) { - var array2 = _float7[i]; + float[] array2 = _float7[i]; _float5[i] = array[9 + num] * array2[0] + array[8 + num] * array2[1] + array[7 + num] * array2[2] + array[6 + num] * array2[3] + array[5 + num] * array2[4] + array[4 + num] * array2[5] + array[3 + num] * array2[6] + array[2 + num] * array2[7] + array[1 + num] * array2[8] + @@ -1064,11 +1064,11 @@ private void method_14() private void method_15() { - var array = _float2; - var num = 0; - for (var i = 0; i < 32; i++) + float[] array = _float2; + int num = 0; + for (int i = 0; i < 32; i++) { - var array2 = _float7[i]; + float[] array2 = _float7[i]; _float5[i] = array[10 + num] * array2[0] + array[9 + num] * array2[1] + array[8 + num] * array2[2] + array[7 + num] * array2[3] + array[6 + num] * array2[4] + array[5 + num] * array2[5] + array[4 + num] * array2[6] + array[3 + num] * array2[7] + array[2 + num] * array2[8] + @@ -1081,11 +1081,11 @@ private void method_15() private void method_16() { - var array = _float2; - var num = 0; - for (var i = 0; i < 32; i++) + float[] array = _float2; + int num = 0; + for (int i = 0; i < 32; i++) { - var array2 = _float7[i]; + float[] array2 = _float7[i]; _float5[i] = array[11 + num] * array2[0] + array[10 + num] * array2[1] + array[9 + num] * array2[2] + array[8 + num] * array2[3] + array[7 + num] * array2[4] + array[6 + num] * array2[5] + array[5 + num] * array2[6] + array[4 + num] * array2[7] + array[3 + num] * array2[8] + @@ -1098,11 +1098,11 @@ private void method_16() private void method_17() { - var array = _float2; - var num = 0; - for (var i = 0; i < 32; i++) + float[] array = _float2; + int num = 0; + for (int i = 0; i < 32; i++) { - var array2 = _float7[i]; + float[] array2 = _float7[i]; _float5[i] = array[12 + num] * array2[0] + array[11 + num] * array2[1] + array[10 + num] * array2[2] + array[9 + num] * array2[3] + array[8 + num] * array2[4] + array[7 + num] * array2[5] + array[6 + num] * array2[6] + array[5 + num] * array2[7] + array[4 + num] * array2[8] + @@ -1115,11 +1115,11 @@ private void method_17() private void method_18() { - var array = _float2; - var num = 0; - for (var i = 0; i < 32; i++) + float[] array = _float2; + int num = 0; + for (int i = 0; i < 32; i++) { - var array2 = _float7[i]; + float[] array2 = _float7[i]; _float5[i] = array[13 + num] * array2[0] + array[12 + num] * array2[1] + array[11 + num] * array2[2] + array[10 + num] * array2[3] + array[9 + num] * array2[4] + array[8 + num] * array2[5] + array[7 + num] * array2[6] + array[6 + num] * array2[7] + array[5 + num] * array2[8] + @@ -1132,11 +1132,11 @@ private void method_18() private void method_19() { - var array = _float2; - var num = 0; - for (var i = 0; i < 32; i++) + float[] array = _float2; + int num = 0; + for (int i = 0; i < 32; i++) { - var array2 = _float7[i]; + float[] array2 = _float7[i]; _float5[i] = array[14 + num] * array2[0] + array[13 + num] * array2[1] + array[12 + num] * array2[2] + array[11 + num] * array2[3] + array[10 + num] * array2[4] + array[9 + num] * array2[5] + array[8 + num] * array2[6] + array[7 + num] * array2[7] + array[6 + num] * array2[8] + @@ -1149,11 +1149,11 @@ private void method_19() private void method_20() { - var array = _float2; - var num = 0; - for (var i = 0; i < 32; i++) + float[] array = _float2; + int num = 0; + for (int i = 0; i < 32; i++) { - var array2 = _float7[i]; + float[] array2 = _float7[i]; _float5[i] = array[15 + num] * array2[0] + array[14 + num] * array2[1] + array[13 + num] * array2[2] + array[12 + num] * array2[3] + array[11 + num] * array2[4] + array[10 + num] * array2[5] + array[9 + num] * array2[6] + array[8 + num] * array2[7] + array[7 + num] * array2[8] + @@ -1234,9 +1234,9 @@ public void method_22(Class84 class840) private static float[][] smethod_0(float[] float9, int int2) { - var num = float9.Length / int2; - var array = new float[num][]; - for (var i = 0; i < num; i++) + int num = float9.Length / int2; + float[][] array = new float[num][]; + for (int i = 0; i < num; i++) { array[i] = smethod_1(float9, i * int2, int2); } @@ -1253,8 +1253,8 @@ private static float[] smethod_1(float[] float9, int int2, int int3) { int3 = 0; } - var array = new float[int3]; - for (var i = 0; i < int3; i++) + float[] array = new float[int3]; + for (int i = 0; i < int3; i++) { array[i] = float9[int2 + i]; } diff --git a/GHNamespaceI/Class82.cs b/GHNamespaceI/Class82.cs index 23d5ecf..3a76a72 100644 --- a/GHNamespaceI/Class82.cs +++ b/GHNamespaceI/Class82.cs @@ -182,8 +182,8 @@ public void method_7() public bool method_8(int int7) { - var num = method_16(_byte4, 0, 4); - var int8 = (_byte4[0] << 24 & -16777216) | (_byte4[1] << 16 & 16711680) | (_byte4[2] << 8 & 65280) | + int num = method_16(_byte4, 0, 4); + int int8 = (_byte4[0] << 24 & -16777216) | (_byte4[1] << 16 & 16711680) | (_byte4[2] << 8 & 65280) | _byte4[3] & 255; try { @@ -192,8 +192,8 @@ public bool method_8(int int7) catch (IOException) { } - var result = false; - var num2 = num; + bool result = false; + int num2 = num; if (num2 != 0) { if (num2 == 4) @@ -210,12 +210,12 @@ public bool method_8(int int7) public int method_9(byte byte5) { - var num = method_16(_byte4, 0, 3); + int num = method_16(_byte4, 0, 3); if (num != 3) { throw new BitstreamException(BitstreamError.StreamEof, null); } - var num2 = (_byte4[0] << 16 & 16711680) | (_byte4[1] << 8 & 65280) | _byte4[2] & 255; + int num2 = (_byte4[0] << 16 & 16711680) | (_byte4[1] << 8 & 65280) | _byte4[2] & 255; while (true) { num2 <<= 8; @@ -260,7 +260,7 @@ public bool method_10(int int7, int int8, int int9) public int method_11(int int7) { - var result = method_15(_byte3, 0, int7); + int result = method_15(_byte3, 0, int7); _int2 = int7; _int3 = -1; _int4 = -1; @@ -269,15 +269,15 @@ public int method_11(int int7) public void method_12() { - var num = 0; - var array = _byte3; - var num2 = _int2; - for (var i = 0; i < num2; i += 4) + int num = 0; + byte[] array = _byte3; + int num2 = _int2; + for (int i = 0; i < num2; i += 4) { byte b = 0; byte b2 = 0; byte b3 = 0; - var b4 = array[i]; + byte b4 = array[i]; if (i + 1 < num2) { b = array[i + 1]; @@ -298,7 +298,7 @@ public void method_12() public int method_13(int int7) { - var num = _int4 + int7; + int num = _int4 + int7; if (_int3 < 0) { _int3 = 0; @@ -306,8 +306,8 @@ public int method_13(int int7) int num4; if (num <= 32) { - var num2 = _int1[_int3]; - var num3 = 32 - num; + int num2 = _int1[_int3]; + int num3 = 32 - num; num4 = (num2 >> num3 & _int6[int7]); if ((_int4 += int7) == 32) { @@ -316,11 +316,11 @@ public int method_13(int int7) } return num4; } - var num5 = _int1[_int3] & 65535; + int num5 = _int1[_int3] & 65535; _int3++; - var num6 = _int1[_int3] & -65536; + int num6 = _int1[_int3] & -65536; num4 = ((num5 << 16 & -65536) | (num6 >> 16 & 65535)); - var num7 = 48 - num; + int num7 = 48 - num; num4 >>= num7; num4 &= _int6[int7]; _int4 = num - 32; @@ -335,12 +335,12 @@ public void method_14(int int7) private int method_15(byte[] byte5, int int7, int int8) { - var num = 0; + int num = 0; try { while (int8 > 0) { - var num2 = _class1060.method_1(byte5, int7, int8); + int num2 = _class1060.method_1(byte5, int7, int8); if (num2 == -1 || num2 == 0) { while (int8-- > 0) @@ -363,12 +363,12 @@ private int method_15(byte[] byte5, int int7, int int8) private int method_16(byte[] byte5, int int7, int int8) { - var num = 0; + int num = 0; try { while (int8 > 0) { - var num2 = _class1060.method_1(byte5, int7, int8); + int num2 = _class1060.method_1(byte5, int7, int8); if (num2 == -1 || num2 == 0) { break; @@ -387,8 +387,8 @@ private int method_16(byte[] byte5, int int7, int int8) private void method_17(Stream stream0) { - var position = 0L; - var num = -1; + long position = 0L; + int num = -1; try { position = stream0.Position; @@ -423,8 +423,8 @@ private void method_17(Stream stream0) private static int smethod_0(Stream stream0) { - var array = new byte[4]; - var num = -10; + byte[] array = new byte[4]; + int num = -10; stream0.Read(array, 0, 3); if (array[0] == 73 && array[1] == 68 && array[2] == 51) { diff --git a/GHNamespaceI/Class83.cs b/GHNamespaceI/Class83.cs index d8b323c..96bcbfb 100644 --- a/GHNamespaceI/Class83.cs +++ b/GHNamespaceI/Class83.cs @@ -28,9 +28,9 @@ public Class83(int[] int3, short short0) public int method_0(double double1) { - var num = 0; - var num2 = 0; - var num3 = 0.0; + int num = 0; + int num2 = 0; + double num3 = 0.0; if (_byte0 == null) { while (num3 <= double1) diff --git a/GHNamespaceI/Class84.cs b/GHNamespaceI/Class84.cs index 5abf0aa..72857b5 100644 --- a/GHNamespaceI/Class84.cs +++ b/GHNamespaceI/Class84.cs @@ -27,7 +27,7 @@ public Class84(int int5) _int2 = _int1 << 2; _int0 = new int[_int1]; _float0 = new float[_int1][]; - for (var i = 0; i < _int1; i++) + for (int i = 0; i < _int1; i++) { _float0[i] = new float[1152]; } @@ -37,21 +37,21 @@ public Class84(int int5) public int method_1(float[] float1, int int5, int int6) { int6 <<= 2; - var num = method_0(); - var num2 = (int6 > num) ? num : (int6 - int6 % _int2); + int num = method_0(); + int num2 = (int6 > num) ? num : (int6 - int6 % _int2); if (_int1 == 1) { Buffer.BlockCopy(_float0[0], _int3, float1, int5 << 2, num2); } else { - var num3 = _int3 / _int2; - var num4 = num2 / _int2 + num3; - for (var i = 0; i < _int1; i++) + int num3 = _int3 / _int2; + int num4 = num2 / _int2 + num3; + for (int i = 0; i < _int1; i++) { - var array = _float0[i]; - var j = num3; - var num5 = int5 + i; + float[] array = _float0[i]; + int j = num3; + int num5 = int5 + i; while (j < num4) { float1[num5] = array[j]; @@ -66,15 +66,15 @@ public int method_1(float[] float1, int int5, int int6) public int method_2(byte[] byte0, int int5, int int6) { - var num = method_0(); - var num2 = (int6 > num) ? num : int6; + int num = method_0(); + int num2 = (int6 > num) ? num : int6; if (_int1 == 1) { Buffer.BlockCopy(_float0[0], _int3, byte0, int5, num2); } else { - var array = new float[num2 >> 2]; + float[] array = new float[num2 >> 2]; method_1(array, 0, array.Length); Buffer.BlockCopy(array, 0, byte0, int5, num2); } @@ -86,18 +86,18 @@ public int method_3(float[][] float1, int int5, int int6) { int5 <<= 2; int6 <<= 2; - var num = method_0(); - var num2 = (int6 > num) ? num : (int6 - int6 % _int2); + int num = method_0(); + int num2 = (int6 > num) ? num : (int6 - int6 % _int2); if (_int1 == 1) { Buffer.BlockCopy(_float0[0], _int3, float1[0], int5, num2); } else { - var srcOffset = _int3 / _int1; - var count = num2 / _int1; + int srcOffset = _int3 / _int1; + int count = num2 / _int1; int5 /= _int1; - for (var i = 0; i < float1.Length; i++) + for (int i = 0; i < float1.Length; i++) { Buffer.BlockCopy(_float0[i], srcOffset, float1[i], int5, count); } diff --git a/GHNamespaceI/Class85.cs b/GHNamespaceI/Class85.cs index 212ce1c..529a77a 100644 --- a/GHNamespaceI/Class85.cs +++ b/GHNamespaceI/Class85.cs @@ -1911,13 +1911,13 @@ public Class91(Class85 class851, int[] int2, int[] int3) public Class85(Class82 class821, ZzSoundClass class1071, Class80 class802, Class80 class803, Class84 class841, Enum4 enum41) { - var array = new int[1]; + int[] array = new int[1]; Int12 = array; - var array2 = new int[1]; + int[] array2 = new int[1]; Int13 = array2; - var array3 = new int[1]; + int[] array3 = new int[1]; Int14 = array3; - var array4 = new int[1]; + int[] array4 = new int[1]; Int15 = array4; Int16 = new int[576]; Float7 = new float[576]; @@ -2340,7 +2340,7 @@ public Class85(Class82 class821, ZzSoundClass class1071, Class80 class802, Class if (_int22 == null) { _int22 = new int[9][]; - for (var i = 0; i < 9; i++) + for (int i = 0; i < 9; i++) { _int22[i] = smethod_1(_class860[i].Int1); } @@ -2399,8 +2399,8 @@ public Class85(Class82 class821, ZzSoundClass class1071, Class80 class802, Class _int8 = 0; IL_521: Array.Clear(_float3, 0, 1152); - var arg54B0 = _int3; - var arg54B1 = 0; + int[] arg54B0 = _int3; + int arg54B1 = 0; _int3[1] = 576; arg54B0[arg54B1] = 576; _class1020 = new Class102(); @@ -2414,20 +2414,20 @@ public void imethod_0() public void method_0() { - var num = _class1070.method_13(); + int num = _class1070.method_13(); method_1(); - for (var i = 0; i < num; i++) + for (int i = 0; i < num; i++) { _class1020.method_3(_class820.method_13(8)); } - var num2 = _class1020.method_0() >> 3; + int num2 = _class1020.method_0() >> 3; int num3; if ((num3 = (_class1020.method_0() & 7)) != 0) { _class1020.method_1(8 - num3); num2++; } - var j = _int5 - num2 - _class890.Int0; + int j = _int5 - num2 - _class890.Int0; _int5 += num; if (j < 0) { @@ -2443,7 +2443,7 @@ public void method_0() _class1020.method_1(8); j--; } - for (var k = 0; k < _int4; k++) + for (int k = 0; k < _int4; k++) { int l; for (l = 0; l < _int7; l++) @@ -2471,9 +2471,9 @@ public void method_0() method_8(_float1[l], l, k); method_10(l, k); method_11(l, k); - for (var m = 18; m < 576; m += 36) + for (int m = 18; m < 576; m += 36) { - for (var n = 1; n < 18; n += 2) + for (int n = 1; n < 18; n += 2) { _float2[m + n] = -_float2[m + n]; } @@ -2486,10 +2486,10 @@ public void method_0() { goto IL_241; } - for (var n = 0; n < 18; n++) + for (int n = 0; n < 18; n++) { - var num4 = 0; - for (var m = 0; m < 576; m += 18) + int num4 = 0; + for (int m = 0; m < 576; m += 18) { _float6[num4] = _float2[m + n]; num4++; @@ -2501,10 +2501,10 @@ public void method_0() l++; continue; IL_241: - for (var n = 0; n < 18; n++) + for (int n = 0; n < 18; n++) { - var num4 = 0; - for (var m = 0; m < 576; m += 18) + int num4 = 0; + for (int m = 0; m < 576; m += 18) { _float5[num4] = _float2[m + n]; num4++; @@ -2525,16 +2525,16 @@ private bool method_1() { _class890.Int0 = _class820.method_13(9); _class890.Int1 = ((_int7 == 1) ? _class820.method_13(5) : _class820.method_13(3)); - for (var i = 0; i < _int7; i++) + for (int i = 0; i < _int7; i++) { _class890.Class880[i].Int0[0] = _class820.method_13(1); _class890.Class880[i].Int0[1] = _class820.method_13(1); _class890.Class880[i].Int0[2] = _class820.method_13(1); _class890.Class880[i].Int0[3] = _class820.method_13(1); } - for (var j = 0; j < 2; j++) + for (int j = 0; j < 2; j++) { - for (var i = 0; i < _int7; i++) + for (int i = 0; i < _int7; i++) { _class890.Class880[i].Class870[j].Int0 = _class820.method_13(12); _class890.Class880[i].Class870[j].Int1 = _class820.method_13(9); @@ -2584,7 +2584,7 @@ private bool method_1() { _class890.Int0 = _class820.method_13(8); _class890.Int1 = ((_int7 == 1) ? _class820.method_13(1) : _class820.method_13(2)); - for (var i = 0; i < _int7; i++) + for (int i = 0; i < _int7; i++) { _class890.Class880[i].Class870[0].Int0 = _class820.method_13(12); _class890.Class880[i].Class870[0].Int1 = _class820.method_13(9); @@ -2632,10 +2632,10 @@ private bool method_1() private void method_2(int int24, int int25) { - var @class = _class890.Class880[int24].Class870[int25]; - var num = @class.Int3; - var num2 = Int18[0, num]; - var num3 = Int18[1, num]; + Class87 @class = _class890.Class880[int24].Class870[int25]; + int num = @class.Int3; + int num2 = Int18[0, num]; + int num3 = Int18[1, num]; if (@class.Int4 == 0 || @class.Int5 != 2) { if (_class890.Class880[int24].Int0[0] == 0 || int25 == 0) @@ -2684,20 +2684,20 @@ private void method_2(int int24, int int25) } for (i = 3; i < 6; i++) { - for (var j = 0; j < 3; j++) + for (int j = 0; j < 3; j++) { _class901[int24].Int1[j, i] = _class1020.method_1(Int18[0, @class.Int3]); } } for (i = 6; i < 12; i++) { - for (var j = 0; j < 3; j++) + for (int j = 0; j < 3; j++) { _class901[int24].Int1[j, i] = _class1020.method_1(Int18[1, @class.Int3]); } } i = 12; - for (var j = 0; j < 3; j++) + for (int j = 0; j < 3; j++) { _class901[int24].Int1[j, i] = 0; } @@ -2746,10 +2746,10 @@ private void method_2(int int24, int int25) private void method_3(int int24, int int25) { - var num = _class1070.method_14(); - var num2 = 0; - var @class = _class890.Class880[int24].Class870[int25]; - var num3 = @class.Int3; + int num = _class1070.method_14(); + int num2 = 0; + Class87 @class = _class890.Class880[int24].Class870[int25]; + int num3 = @class.Int3; int num4; if (@class.Int5 == 2) { @@ -2795,11 +2795,10 @@ private void method_3(int int24, int int25) } if ((num == 1 || num == 3) && int24 == 1) { - var num5 = num3 >> 1; + int num5 = num3 >> 1; if (num5 < 180) { - int a; - _int11[0] = Math.DivRem(num5, 36, out a); + _int11[0] = Math.DivRem(num5, 36, out int a); _int11[1] = Math.DivRem(a, 6, out _int11[2]); _int11[3] = 0; _class890.Class880[int24].Class870[int25].Int11 = 0; @@ -2807,7 +2806,7 @@ private void method_3(int int24, int int25) } else if (num5 < 244) { - var num6 = num5 - 180; + int num6 = num5 - 180; _int11[0] = (num6 & 63) >> 4; _int11[1] = (num6 & 15) >> 2; _int11[2] = (num6 & 3); @@ -2824,14 +2823,14 @@ private void method_3(int int24, int int25) num2 = 5; } } - for (var i = 0; i < 45; i++) + for (int i = 0; i < 45; i++) { Int0[i] = 0; } - var num7 = 0; - for (var j = 0; j < 4; j++) + int num7 = 0; + for (int j = 0; j < 4; j++) { - for (var k = 0; k < Int23[num2, num4, j]; k++) + for (int k = 0; k < Int23[num2, num4, j]; k++) { Int0[num7++] = ((_int11[j] == 0) ? 0 : _class1020.method_1(_int11[j])); } @@ -2840,12 +2839,12 @@ private void method_3(int int24, int int25) private void method_4(int int24, int int25) { - var num = 0; - var @class = _class890.Class880[int24].Class870[int25]; + int num = 0; + Class87 @class = _class890.Class880[int24].Class870[int25]; method_3(int24, int25); if (@class.Int4 == 0 || @class.Int5 != 2) { - for (var i = 0; i < 21; i++) + for (int i = 0; i < 21; i++) { _class901[int24].Int0[i] = Int0[num++]; } @@ -2855,31 +2854,31 @@ private void method_4(int int24, int int25) } if (@class.Int6 != 0) { - for (var i = 0; i < 8; i++) + for (int i = 0; i < 8; i++) { _class901[int24].Int0[i] = Int0[num++]; } - for (var i = 3; i < 12; i++) + for (int i = 3; i < 12; i++) { - for (var j = 0; j < 3; j++) + for (int j = 0; j < 3; j++) { _class901[int24].Int1[j, i] = Int0[num++]; } } - for (var j = 0; j < 3; j++) + for (int j = 0; j < 3; j++) { _class901[int24].Int1[j, 12] = 0; } return; } - for (var i = 0; i < 12; i++) + for (int i = 0; i < 12; i++) { - for (var j = 0; j < 3; j++) + for (int j = 0; j < 3; j++) { _class901[int24].Int1[j, i] = Int0[num++]; } } - for (var j = 0; j < 3; j++) + for (int j = 0; j < 3; j++) { _class901[int24].Int1[j, 12] = 0; } @@ -2891,7 +2890,7 @@ private void method_5(int int24, int int25) Int13[0] = 0; Int14[0] = 0; Int15[0] = 0; - var num = _int6 + _class890.Class880[int24].Class870[int25].Int0; + int num = _int6 + _class890.Class880[int24].Class870[int25].Int0; int num2; int num3; if (_class890.Class880[int24].Class870[int25].Int4 != 0 && @@ -2902,8 +2901,8 @@ private void method_5(int int24, int int25) } else { - var num4 = _class890.Class880[int24].Class870[int25].Int9 + 1; - var num5 = num4 + _class890.Class880[int24].Class870[int25].Int10 + 1; + int num4 = _class890.Class880[int24].Class870[int25].Int9 + 1; + int num5 = num4 + _class890.Class880[int24].Class870[int25].Int10 + 1; if (num5 > _class860[_int10].Int0.Length - 1) { num5 = _class860[_int10].Int0.Length - 1; @@ -2911,8 +2910,8 @@ private void method_5(int int24, int int25) num2 = _class860[_int10].Int0[num4]; num3 = _class860[_int10].Int0[num5]; } - var i = 0; - var num6 = 0; + int i = 0; + int num6 = 0; Class103 class103; while (num6 < _class890.Class880[int24].Class870[int25].Int1 << 1 && i < _int2.Length) { @@ -2935,7 +2934,7 @@ private void method_5(int int24, int int25) num6 += 2; } class103 = Class103.Class1030[_class890.Class880[int24].Class870[int25].Int13 + 32]; - var num7 = _class1020.method_0(); + int num7 = _class1020.method_0(); while (num7 < num && i < 576) { Class103.smethod_1(class103, Int12, Int13, Int14, Int15, _class1020); @@ -2988,11 +2987,11 @@ private void method_6(int int24, int int25, int int26) private void method_7(float[,] float17, int int24, int int25) { - var @class = _class890.Class880[int24].Class870[int25]; - var num = 0; - var num2 = 0; - var num3 = 0; - var num4 = 0; + Class87 @class = _class890.Class880[int24].Class870[int25]; + int num = 0; + int num2 = 0; + int num3 = 0; + int num4 = 0; int num5; if (@class.Int4 != 0 && @class.Int5 == 2) { @@ -3011,18 +3010,18 @@ private void method_7(float[,] float17, int int24, int int25) { num5 = _class860[_int10].Int0[1]; } - var num6 = (float) Math.Pow(2.0, 0.25 * (@class.Int2 - 210.0)); - for (var i = 0; i < _int3[int24]; i++) + float num6 = (float) Math.Pow(2.0, 0.25 * (@class.Int2 - 210.0)); + for (int i = 0; i < _int3[int24]; i++) { - var num7 = i % 18; - var num8 = (i - num7) / 18; + int num7 = i % 18; + int num8 = (i - num7) / 18; if (_int2[i] == 0) { float17[num8, num7] = 0f; } else { - var num9 = _int2[i]; + int num9 = _int2[i]; if (num9 < Float11.Length) { if (_int2[i] > 0) @@ -3048,10 +3047,10 @@ private void method_7(float[,] float17, int int24, int int25) } } } - for (var i = 0; i < _int3[int24]; i++) + for (int i = 0; i < _int3[int24]; i++) { - var num10 = i % 18; - var num11 = (i - num10) / 18; + int num10 = i % 18; + int num11 = (i - num10) / 18; if (num4 == num5) { if (@class.Int4 != 0 && @class.Int5 == 2) @@ -3097,14 +3096,14 @@ private void method_7(float[,] float17, int int24, int int25) if (@class.Int4 != 0 && ((@class.Int5 == 2 && @class.Int6 == 0) || (@class.Int5 == 2 && @class.Int6 != 0 && i >= 36))) { - var num12 = (num4 - num2) / num3; - var num13 = _class901[int24].Int1[num12, num] << @class.Int12; + int num12 = (num4 - num2) / num3; + int num13 = _class901[int24].Int1[num12, num] << @class.Int12; num13 += @class.Int8[num12] << 2; float17[num11, num10] *= Float10[num13]; } else { - var num14 = _class901[int24].Int0[num]; + int num14 = _class901[int24].Int0[num]; if (@class.Int11 != 0) { num14 += Int19[num]; @@ -3114,10 +3113,10 @@ private void method_7(float[,] float17, int int24, int int25) } num4++; } - for (var i = _int3[int24]; i < 576; i++) + for (int i = _int3[int24]; i < 576; i++) { - var num15 = i % 18; - var num16 = (i - num15) / 18; + int num15 = i % 18; + int num16 = (i - num15) / 18; if (num15 < 0) { num15 = 0; @@ -3132,13 +3131,13 @@ private void method_7(float[,] float17, int int24, int int25) private void method_8(float[,] float17, int int24, int int25) { - var @class = _class890.Class880[int24].Class870[int25]; + Class87 @class = _class890.Class880[int24].Class870[int25]; if (@class.Int4 == 0 || @class.Int5 != 2) { - for (var i = 0; i < 576; i++) + for (int i = 0; i < 576; i++) { - var num = i % 18; - var num2 = (i - num) / 18; + int num = i % 18; + int num2 = (i - num) / 18; _float2[i] = float17[num2, num]; } return; @@ -3146,25 +3145,25 @@ private void method_8(float[,] float17, int int24, int int25) Array.Clear(_float2, 0, 576); if (@class.Int6 != 0) { - for (var i = 0; i < 36; i++) + for (int i = 0; i < 36; i++) { - var num3 = i % 18; - var num4 = (i - num3) / 18; + int num3 = i % 18; + int num4 = (i - num3) / 18; _float2[i] = float17[num4, num3]; } - for (var j = 3; j < 13; j++) + for (int j = 3; j < 13; j++) { - var num5 = _class860[_int10].Int1[j]; - var num6 = _class860[_int10].Int1[j + 1] - num5; - var num7 = (num5 << 2) - num5; - var k = 0; - var num8 = 0; + int num5 = _class860[_int10].Int1[j]; + int num6 = _class860[_int10].Int1[j + 1] - num5; + int num7 = (num5 << 2) - num5; + int k = 0; + int num8 = 0; while (k < num6) { - var num9 = num7 + k; - var num10 = num7 + num8; - var num11 = num9 % 18; - var num12 = (num9 - num11) / 18; + int num9 = num7 + k; + int num10 = num7 + num8; + int num11 = num9 % 18; + int num12 = (num9 - num11) / 18; _float2[num10] = float17[num12, num11]; num9 += num6; num10++; @@ -3182,11 +3181,11 @@ private void method_8(float[,] float17, int int24, int int25) } return; } - for (var i = 0; i < 576; i++) + for (int i = 0; i < 576; i++) { - var num13 = _int22[_int10][i]; - var num14 = num13 % 18; - var num15 = (num13 - num14) / 18; + int num13 = _int22[_int10][i]; + int num14 = num13 % 18; + int num15 = (num13 - num14) / 18; _float2[i] = float17[num15, num14]; } } @@ -3198,12 +3197,12 @@ private void method_9(int int24) Array.Copy(_float0[0], 0, _float1[0], 0, 576); return; } - var @class = _class890.Class880[0].Class870[int24]; - var num = _class1070.method_14(); - var flag = _class1070.method_8() == Enum5.Const1 && (num & 2) != 0; - var flag2 = _class1070.method_8() == Enum5.Const1 && (num & 1) != 0; - var flag3 = _class1070.method_3() == Enum3.Const0 || _class1070.method_3() == Enum3.Const2; - var int25 = @class.Int3 & 1; + Class87 @class = _class890.Class880[0].Class870[int24]; + int num = _class1070.method_14(); + bool flag = _class1070.method_8() == Enum5.Const1 && (num & 2) != 0; + bool flag2 = _class1070.method_8() == Enum5.Const1 && (num & 1) != 0; + bool flag3 = _class1070.method_3() == Enum3.Const0 || _class1070.method_3() == Enum3.Const2; + int int25 = @class.Int3 & 1; int i; for (i = 0; i < 576; i++) { @@ -3216,15 +3215,15 @@ private void method_9(int int24) { if (@class.Int6 != 0) { - var num2 = 0; - for (var j = 0; j < 3; j++) + int num2 = 0; + for (int j = 0; j < 3; j++) { - var num3 = 2; + int num3 = 2; int k; for (k = 12; k >= 3; k--) { i = _class860[_int10].Int1[k]; - var l = _class860[_int10].Int1[k + 1] - i; + int l = _class860[_int10].Int1[k + 1] - i; i = (i << 2) - i + (j + 1) * l - 1; while (l > 0) { @@ -3294,8 +3293,8 @@ private void method_9(int int24) if (num2 <= 3) { i = 2; - var n = 17; - var m = -1; + int n = 17; + int m = -1; while (i >= 0) { if (_float0[1][i, n] != 0f) @@ -3318,7 +3317,7 @@ private void method_9(int int24) { i++; } - var k = i; + int k = i; i = _class860[_int10].Int0[i]; while (k < 8) { @@ -3344,15 +3343,15 @@ private void method_9(int int24) } else { - for (var num5 = 0; num5 < 3; num5++) + for (int num5 = 0; num5 < 3; num5++) { - var num6 = -1; + int num6 = -1; int k; int num4; for (k = 12; k >= 0; k--) { num4 = _class860[_int10].Int1[k]; - var l = _class860[_int10].Int1[k + 1] - num4; + int l = _class860[_int10].Int1[k + 1] - num4; i = (num4 << 2) - num4 + (num5 + 1) * l - 1; while (l > 0) { @@ -3391,7 +3390,7 @@ private void method_9(int int24) } } num4 = _class860[_int10].Int1[10]; - var num7 = _class860[_int10].Int1[11]; + int num7 = _class860[_int10].Int1[11]; m = num7 - num4; k = (num4 << 2) - num4 + num5 * m; m = _class860[_int10].Int1[12] - num7; @@ -3417,8 +3416,8 @@ private void method_9(int int24) else { i = 31; - var n = 17; - var m = 0; + int n = 17; + int m = 0; while (i >= 0) { if (_float0[1][i, n] != 0f) @@ -3441,7 +3440,7 @@ private void method_9(int int24) { i++; } - var k = i; + int k = i; i = _class860[_int10].Int0[i]; while (k < 21) { @@ -3483,9 +3482,9 @@ private void method_9(int int24) } } i = 0; - for (var m = 0; m < 32; m++) + for (int m = 0; m < 32; m++) { - for (var n = 0; n < 18; n++) + for (int n = 0; n < 18; n++) { if (Int16[i] == 7) { @@ -3520,7 +3519,7 @@ private void method_9(int int24) private void method_10(int int24, int int25) { - var @class = _class890.Class880[int24].Class870[int25]; + Class87 @class = _class890.Class880[int24].Class870[int25]; if (@class.Int4 != 0 && @class.Int5 == 2 && @class.Int6 == 0) { return; @@ -3534,14 +3533,14 @@ private void method_10(int int24, int int25) { num = 558; } - for (var i = 0; i < num; i += 18) + for (int i = 0; i < num; i += 18) { - for (var j = 0; j < 8; j++) + for (int j = 0; j < 8; j++) { - var num2 = i + 17 - j; - var num3 = i + 18 + j; - var num4 = _float2[num2]; - var num5 = _float2[num3]; + int num2 = i + 17 - j; + int num3 = i + 18 + j; + float num4 = _float2[num2]; + float num5 = _float2[num3]; _float2[num2] = num4 * Float14[j] - num5 * Float15[j]; _float2[num3] = num5 * Float14[j] + num4 * Float15[j]; } @@ -3550,21 +3549,21 @@ private void method_10(int int24, int int25) private void method_11(int int24, int int25) { - var @class = _class890.Class880[int24].Class870[int25]; - for (var i = 0; i < 576; i += 18) + Class87 @class = _class890.Class880[int24].Class870[int25]; + for (int i = 0; i < 576; i += 18) { - var int26 = (@class.Int4 == 0 || @class.Int6 == 0 || i >= 36) ? @class.Int5 : 0; - var array = _float2; - for (var j = 0; j < 18; j++) + int int26 = (@class.Int4 == 0 || @class.Int6 == 0 || i >= 36) ? @class.Int5 : 0; + float[] array = _float2; + for (int j = 0; j < 18; j++) { Float8[j] = array[j + i]; } method_13(Float8, Float9, int26); - for (var k = 0; k < 18; k++) + for (int k = 0; k < 18; k++) { array[k + i] = Float8[k]; } - var array2 = _float3; + float[,] array2 = _float3; array[i] = Float9[0] + array2[int24, i]; array2[int24, i] = Float9[18]; array[1 + i] = Float9[1] + array2[int24, i + 1]; @@ -3606,9 +3605,9 @@ private void method_11(int int24, int int25) private void method_12() { - for (var i = 0; i < 18; i++) + for (int i = 0; i < 18; i++) { - for (var j = 0; j < 18; j += 3) + for (int j = 0; j < 18; j += 3) { _float1[0][i, j] = (_float1[0][i, j] + _float1[1][i, j]) * 0.5f; _float1[0][i, j + 1] = (_float1[0][i, j + 1] + _float1[1][i, j + 1]) * 0.5f; @@ -3634,8 +3633,8 @@ public void method_13(float[] float17, float[] float18, int int24) if (int24 == 2) { Array.Clear(float18, 0, 36); - var num = 0; - for (var i = 0; i < 3; i++) + int num = 0; + for (int i = 0; i < 3; i++) { float17[15 + i] += float17[12 + i]; float17[12 + i] += float17[9 + i]; @@ -3644,9 +3643,9 @@ public void method_13(float[] float17, float[] float18, int int24) float17[3 + i] += float17[i]; float17[15 + i] += float17[9 + i]; float17[9 + i] += float17[3 + i]; - var num2 = float17[12 + i] * 0.5f; - var num3 = float17[6 + i] * 0.8660254f; - var num4 = float17[i] + num2; + float num2 = float17[12 + i] * 0.5f; + float num3 = float17[6 + i] * 0.8660254f; + float num4 = float17[i] + num2; num5 = float17[i] - float17[12 + i]; num6 = num4 + num3; num7 = num4 - num3; @@ -3659,7 +3658,7 @@ public void method_13(float[] float17, float[] float18, int int24) num10 *= 1.93185163f; num8 *= 0.707106769f; num9 *= 0.5176381f; - var num11 = num6; + float num11 = num6; num6 += num9; num9 = num11 - num9; num11 = num5; @@ -3728,52 +3727,52 @@ public void method_13(float[] float17, float[] float18, int int24) float17[7] += float17[5]; float17[5] += float17[3]; float17[3] += float17[1]; - var num18 = float17[0] + float17[0]; - var num19 = num18 + float17[12]; - var num20 = num19 + float17[4] * 1.87938523f + float17[8] * 1.53208888f + float17[16] * 0.347296357f; - var num21 = num18 + float17[4] - float17[8] - float17[12] - float17[12] - float17[16]; - var num22 = num19 - float17[4] * 0.347296357f - float17[8] * 1.87938523f + float17[16] * 1.53208888f; - var num23 = num19 - float17[4] * 1.53208888f + float17[8] * 0.347296357f - float17[16] * 1.87938523f; - var num24 = float17[0] - float17[4] + float17[8] - float17[12] + float17[16]; - var num25 = float17[6] * 1.73205078f; - var num26 = float17[2] * 1.96961546f + num25 + float17[10] * 1.28557527f + float17[14] * 0.6840403f; - var num27 = (float17[2] - float17[10] - float17[14]) * 1.73205078f; - var num28 = float17[2] * 1.28557527f - num25 - float17[10] * 0.6840403f + float17[14] * 1.96961546f; - var num29 = float17[2] * 0.6840403f - num25 + float17[10] * 1.96961546f - float17[14] * 1.28557527f; - var num30 = float17[1] + float17[1]; - var num31 = num30 + float17[13]; - var num32 = num31 + float17[5] * 1.87938523f + float17[9] * 1.53208888f + float17[17] * 0.347296357f; - var num33 = num30 + float17[5] - float17[9] - float17[13] - float17[13] - float17[17]; - var num34 = num31 - float17[5] * 0.347296357f - float17[9] * 1.87938523f + float17[17] * 1.53208888f; - var num35 = num31 - float17[5] * 1.53208888f + float17[9] * 0.347296357f - float17[17] * 1.87938523f; - var num36 = (float17[1] - float17[5] + float17[9] - float17[13] + float17[17]) * 0.707106769f; - var num37 = float17[7] * 1.73205078f; - var num38 = float17[3] * 1.96961546f + num37 + float17[11] * 1.28557527f + float17[15] * 0.6840403f; - var num39 = (float17[3] - float17[11] - float17[15]) * 1.73205078f; - var num40 = float17[3] * 1.28557527f - num37 - float17[11] * 0.6840403f + float17[15] * 1.96961546f; - var num41 = float17[3] * 0.6840403f - num37 + float17[11] * 1.96961546f - float17[15] * 1.28557527f; - var num42 = num20 + num26; - var num43 = (num32 + num38) * 0.5019099f; + float num18 = float17[0] + float17[0]; + float num19 = num18 + float17[12]; + float num20 = num19 + float17[4] * 1.87938523f + float17[8] * 1.53208888f + float17[16] * 0.347296357f; + float num21 = num18 + float17[4] - float17[8] - float17[12] - float17[12] - float17[16]; + float num22 = num19 - float17[4] * 0.347296357f - float17[8] * 1.87938523f + float17[16] * 1.53208888f; + float num23 = num19 - float17[4] * 1.53208888f + float17[8] * 0.347296357f - float17[16] * 1.87938523f; + float num24 = float17[0] - float17[4] + float17[8] - float17[12] + float17[16]; + float num25 = float17[6] * 1.73205078f; + float num26 = float17[2] * 1.96961546f + num25 + float17[10] * 1.28557527f + float17[14] * 0.6840403f; + float num27 = (float17[2] - float17[10] - float17[14]) * 1.73205078f; + float num28 = float17[2] * 1.28557527f - num25 - float17[10] * 0.6840403f + float17[14] * 1.96961546f; + float num29 = float17[2] * 0.6840403f - num25 + float17[10] * 1.96961546f - float17[14] * 1.28557527f; + float num30 = float17[1] + float17[1]; + float num31 = num30 + float17[13]; + float num32 = num31 + float17[5] * 1.87938523f + float17[9] * 1.53208888f + float17[17] * 0.347296357f; + float num33 = num30 + float17[5] - float17[9] - float17[13] - float17[13] - float17[17]; + float num34 = num31 - float17[5] * 0.347296357f - float17[9] * 1.87938523f + float17[17] * 1.53208888f; + float num35 = num31 - float17[5] * 1.53208888f + float17[9] * 0.347296357f - float17[17] * 1.87938523f; + float num36 = (float17[1] - float17[5] + float17[9] - float17[13] + float17[17]) * 0.707106769f; + float num37 = float17[7] * 1.73205078f; + float num38 = float17[3] * 1.96961546f + num37 + float17[11] * 1.28557527f + float17[15] * 0.6840403f; + float num39 = (float17[3] - float17[11] - float17[15]) * 1.73205078f; + float num40 = float17[3] * 1.28557527f - num37 - float17[11] * 0.6840403f + float17[15] * 1.96961546f; + float num41 = float17[3] * 0.6840403f - num37 + float17[11] * 1.96961546f - float17[15] * 1.28557527f; + float num42 = num20 + num26; + float num43 = (num32 + num38) * 0.5019099f; num6 = num42 + num43; - var num44 = num42 - num43; + float num44 = num42 - num43; num42 = num21 + num27; num43 = (num33 + num39) * 0.5176381f; num5 = num42 + num43; - var num45 = num42 - num43; + float num45 = num42 - num43; num42 = num22 + num28; num43 = (num34 + num40) * 0.551688969f; num7 = num42 + num43; - var num46 = num42 - num43; + float num46 = num42 - num43; num42 = num23 + num29; num43 = (num35 + num41) * 0.610387266f; num10 = num42 + num43; - var num47 = num42 - num43; + float num47 = num42 - num43; num8 = num24 + num36; - var num48 = num24 - num36; + float num48 = num24 - num36; num42 = num23 - num29; num43 = (num35 - num41) * 0.8717234f; num9 = num42 + num43; - var num49 = num42 - num43; + float num49 = num42 - num43; num42 = num22 - num28; num43 = (num34 - num40) * 1.18310082f; num16 = num42 + num43; @@ -3786,7 +3785,7 @@ public void method_13(float[] float17, float[] float18, int int24) num43 = (num32 - num38) * 5.73685646f; num12 = num42 + num43; num13 = num42 - num43; - var array = Float16[int24]; + float[] array = Float16[int24]; float18[0] = -num13 * array[0]; float18[1] = -num15 * array[1]; float18[2] = -num17 * array[2]; @@ -3827,9 +3826,9 @@ public void method_13(float[] float17, float[] float18, int int24) private static float[] smethod_0() { - var array = new float[8192]; - var y = 1.3333333333333333; - for (var i = 0; i < 8192; i++) + float[] array = new float[8192]; + double y = 1.3333333333333333; + for (int i = 0; i < 8192; i++) { array[i] = (float) Math.Pow(i, y); } @@ -3838,15 +3837,15 @@ private static float[] smethod_0() public static int[] smethod_1(int[] int24) { - var num = 0; - var array = new int[576]; - for (var i = 0; i < 13; i++) + int num = 0; + int[] array = new int[576]; + for (int i = 0; i < 13; i++) { - var num2 = int24[i]; - var num3 = int24[i + 1]; - for (var j = 0; j < 3; j++) + int num2 = int24[i]; + int num3 = int24[i + 1]; + for (int j = 0; j < 3; j++) { - for (var k = num2; k < num3; k++) + for (int k = num2; k < num3; k++) { array[3 * k + j] = num++; } diff --git a/GHNamespaceI/Class92.cs b/GHNamespaceI/Class92.cs index 1a3a269..87b33cf 100644 --- a/GHNamespaceI/Class92.cs +++ b/GHNamespaceI/Class92.cs @@ -190,7 +190,7 @@ public override bool vmethod_3(Enum4 enum40, Class80 class800, Class80 class801) { if (Int2 != 0 && enum40 != Enum4.Const2) { - var float_ = (Float4 * Float5 + Float6) * Float3; + float float_ = (Float4 * Float5 + Float6) * Float3; class800.method_2(float_, Int0); } return true; @@ -303,7 +303,7 @@ public override void vmethod_1(Class82 class820, ZzSoundClass class1070) public override bool vmethod_2(Class82 class820) { - var result = base.vmethod_2(class820); + bool result = base.vmethod_2(class820); if (Int4 != 0) { Float8 = class820.method_13(Int5); @@ -316,7 +316,7 @@ public override bool vmethod_3(Enum4 enum40, Class80 class800, Class80 class801) base.vmethod_3(enum40, class800, class801); if (Int4 != 0 && enum40 != Enum4.Const1) { - var num = (Float8 * Float9 + Float10) * Float7; + float num = (Float8 * Float9 + Float10) * Float7; if (enum40 == Enum4.Const0) { class801.method_2(num, Int0); @@ -391,7 +391,7 @@ public virtual void vmethod_1() { if (Enum50 == Enum5.Const3) { - for (var i = 0; i < Int0; i++) + for (int i = 0; i < Int0; i++) { Class940[i] = new Class95(i); } @@ -411,7 +411,7 @@ public virtual void vmethod_1() } return; } - for (var i = 0; i < Int0; i++) + for (int i = 0; i < Int0; i++) { Class940[i] = new Class97(i); } @@ -419,7 +419,7 @@ public virtual void vmethod_1() public virtual void vmethod_2() { - for (var i = 0; i < Int0; i++) + for (int i = 0; i < Int0; i++) { Class940[i].vmethod_0(Class820, Class1070, Class1010); } @@ -431,7 +431,7 @@ public virtual void vmethod_3() public virtual void vmethod_4() { - for (var i = 0; i < Int0; i++) + for (int i = 0; i < Int0; i++) { Class940[i].vmethod_1(Class820, Class1070); } @@ -439,18 +439,18 @@ public virtual void vmethod_4() public virtual void vmethod_5() { - var flag = false; - var flag2 = false; - var @enum = Class1070.method_8(); + bool flag = false; + bool flag2 = false; + Enum5 @enum = Class1070.method_8(); do { - for (var i = 0; i < Int0; i++) + for (int i = 0; i < Int0; i++) { flag = Class940[i].vmethod_2(Class820); } do { - for (var i = 0; i < Int0; i++) + for (int i = 0; i < Int0; i++) { flag2 = Class940[i].vmethod_3(Enum40, Class800, Class801); } diff --git a/GHNamespaceI/Class93.cs b/GHNamespaceI/Class93.cs index 7741ef9..9a88948 100644 --- a/GHNamespaceI/Class93.cs +++ b/GHNamespaceI/Class93.cs @@ -88,15 +88,15 @@ public class Class98 : Class94 public Class98(int int11) { - var array = new int[1]; + int[] array = new int[1]; Int8 = array; Float25 = new float[2][]; - var array2 = new float[1]; + float[] array2 = new float[1]; Float26 = array2; Float27 = new float[3]; - var array3 = new float[1]; + float[] array3 = new float[1]; Float28 = array3; - var array4 = new float[1]; + float[] array4 = new float[1]; Float29 = array4; //base..ctor(); Int5 = int11; @@ -108,7 +108,7 @@ public virtual int vmethod_4(ZzSoundClass class1070) { if (class1070.method_3() == Enum3.Const1) { - var num = class1070.method_5(); + int num = class1070.method_5(); if (class1070.method_8() != Enum5.Const3) { if (num == 4) @@ -155,7 +155,7 @@ public virtual int vmethod_4(ZzSoundClass class1070) public virtual void vmethod_5(ZzSoundClass class1070, int int11, int int12, float[] float30, int[] int13, float[] float31, float[] float32) { - var num = class1070.method_5(); + int num = class1070.method_5(); if (class1070.method_8() != Enum5.Const3) { if (num == 4) @@ -213,7 +213,7 @@ public virtual void vmethod_5(ZzSoundClass class1070, int int11, int int12, floa public override void vmethod_0(Class82 class820, ZzSoundClass class1070, Class101 class1010) { - var num = vmethod_4(class1070); + int num = vmethod_4(class1070); Int6 = class820.method_13(num); if (class1010 != null) { @@ -268,12 +268,12 @@ public override bool vmethod_2(Class82 class820) { if (Float25[0] != null) { - var num = class820.method_13(Int8[0]); + int num = class820.method_13(Int8[0]); num += num << 1; - var array = Float27; - var array2 = Float25[0]; - var num2 = 0; - var num3 = num; + float[] array = Float27; + float[] array2 = Float25[0]; + int num2 = 0; + int num3 = num; if (num3 > array2.Length - 3) { num3 = array2.Length - 3; @@ -301,7 +301,7 @@ public override bool vmethod_3(Enum4 enum40, Class80 class800, Class80 class801) { if (Int6 != 0 && enum40 != Enum4.Const2) { - var num = Float27[Int10]; + float num = Float27[Int10]; if (Float25[0] == null) { num = (num + Float29[0]) * Float28[0]; @@ -3277,15 +3277,15 @@ static Class98() 0.000122070313f, 6.103516E-05f }; - var array = new float[16][]; + float[][] array = new float[16][]; array[1] = Float1; Float4 = array; - var array2 = new float[16][]; + float[][] array2 = new float[16][]; array2[1] = Float1; array2[2] = Float2; array2[4] = Float3; Float8 = array2; - var array3 = new float[16][]; + float[][] array3 = new float[16][]; array3[1] = Float1; array3[2] = Float2; array3[3] = Float3; @@ -3366,14 +3366,14 @@ public override bool vmethod_3(Enum4 enum40, Class80 class800, Class80 class801) { if (Int6 != 0) { - var num = Float27[Int10]; + float num = Float27[Int10]; if (Float25[0] == null) { num = (num + Float29[0]) * Float28[0]; } if (enum40 == Enum4.Const0) { - var num2 = num; + float num2 = num; if (Int9 <= 4) { num *= Float22; @@ -3453,13 +3453,13 @@ public class Class100 : Class98 public Class100(int int14) : base(int14) { - var array = new int[1]; + int[] array = new int[1]; Int13 = array; - var array2 = new float[1]; + float[] array2 = new float[1]; Float33 = array2; - var array3 = new float[1]; + float[] array3 = new float[1]; Float35 = array3; - var array4 = new float[1]; + float[] array4 = new float[1]; Float36 = array4; //base..ctor(int_14); Float34 = new float[3]; @@ -3467,7 +3467,7 @@ public Class100(int int14) : base(int14) public override void vmethod_0(Class82 class820, ZzSoundClass class1070, Class101 class1010) { - var num = vmethod_4(class1070); + int num = vmethod_4(class1070); Int6 = class820.method_13(num); Int11 = class820.method_13(num); if (class1010 != null) @@ -3527,16 +3527,16 @@ public override void vmethod_1(Class82 class820, ZzSoundClass class1070) public override bool vmethod_2(Class82 class820) { - var result = base.vmethod_2(class820); + bool result = base.vmethod_2(class820); if (Int11 != 0) { if (Float25[1] != null) { - var num = class820.method_13(Int13[0]); + int num = class820.method_13(Int13[0]); num += num << 1; - var array = Float34; - var array2 = Float25[1]; - var num2 = num; + float[] array = Float34; + float[] array2 = Float25[1]; + int num2 = num; array[0] = array2[num2++]; array[1] = array2[num2++]; array[2] = array2[num2]; @@ -3553,10 +3553,10 @@ public override bool vmethod_2(Class82 class820) public override bool vmethod_3(Enum4 enum40, Class80 class800, Class80 class801) { - var result = base.vmethod_3(enum40, class800, class801); + bool result = base.vmethod_3(enum40, class800, class801); if (Int11 != 0 && enum40 != Enum4.Const1) { - var num = Float34[Int10 - 1]; + float num = Float34[Int10 - 1]; if (Float25[1] == null) { num = (num + Float36[0]) * Float35[0]; @@ -3605,13 +3605,13 @@ public override void vmethod_1() return; } case Enum5.Const3: - for (var i = 0; i < Int0; i++) + for (int i = 0; i < Int0; i++) { Class940[i] = new Class98(i); } return; } - for (var i = 0; i < Int0; i++) + for (int i = 0; i < Int0; i++) { Class940[i] = new Class100(i); } @@ -3619,7 +3619,7 @@ public override void vmethod_1() public override void vmethod_3() { - for (var i = 0; i < Int0; i++) + for (int i = 0; i < Int0; i++) { ((Class98) Class940[i]).vmethod_6(Class820, Class1010); } diff --git a/GHNamespaceI/MP3Class.cs b/GHNamespaceI/MP3Class.cs index 6593d69..68b3906 100644 --- a/GHNamespaceI/MP3Class.cs +++ b/GHNamespaceI/MP3Class.cs @@ -51,17 +51,17 @@ public override long Position FileStream.Position = _int2; _class820.method_6(); _class820.method_7(); - for (var i = 0; i < _class810.Length; i++) + for (int i = 0; i < _class810.Length; i++) { _class810[i].method_0().method_6(); } if (_long1 != 0L) { - var num = (long) (value / _double0 + _int2); - var @class = _class820.method_3(); + long num = (long) (value / _double0 + _int2); + ZzSoundClass @class = _class820.method_3(); while (FileStream.Position + @class.Int12 * _class810.Length < num) { - for (var j = 0; j < _class810.Length; j++) + for (int j = 0; j < _class810.Length; j++) { _class820.method_7(); @class = _class820.method_3(); @@ -80,7 +80,7 @@ public override long Position { _class820.method_7(); } - for (var k = 1; k < _class810.Length; k++) + for (int k = 1; k < _class810.Length; k++) { if (!method_1(k)) { @@ -99,7 +99,7 @@ public Mp3Class(Stream stream1, int int5, Enum4 enum40) : this(stream1, int5, en public Mp3Class(Stream stream1, int int5, Enum4 enum40, int int6) { _class810 = new ZzSoundClass81[int5]; - for (var i = 0; i < _class810.Length; i++) + for (int i = 0; i < _class810.Length; i++) { _class810[i] = new ZzSoundClass81(new Class104(enum40)); } @@ -113,7 +113,7 @@ public Mp3Class(Stream stream1, int int5, Enum4 enum40, int int6) throw new Mp3Exception("Mp3 Decoder: Cannot read header."); } _short0 = 0; - for (var j = 0; j < _class810.Length; j++) + for (int j = 0; j < _class810.Length; j++) { _short0 += (short) _class810[j].method_2(); } @@ -156,8 +156,8 @@ public override void Close() public override int vmethod_3(IntPtr intptr0, int int5) { int5 >>= 2; - var array = new float[int5]; - var num = vmethod_4(array, 0, int5); + float[] array = new float[int5]; + int num = vmethod_4(array, 0, int5); Marshal.Copy(array, 0, intptr0, num); return num << 2; } @@ -169,7 +169,7 @@ public override int Read(byte[] buffer, int offset, int count) int result; lock (_object0) { - var num = 0; + int num = 0; do { if (_class810[0].method_0().method_0() <= 0) @@ -187,8 +187,8 @@ public override int Read(byte[] buffer, int offset, int count) return result; } count >>= 2; - var array = new float[count]; - var num2 = vmethod_4(array, 0, count); + float[] array = new float[count]; + int num2 = vmethod_4(array, 0, count); Buffer.BlockCopy(array, 0, buffer, offset, num2); return num2 << 2; } @@ -200,7 +200,7 @@ public override int vmethod_4(float[] float0, int int5, int int6) int result; lock (_object0) { - var num = 0; + int num = 0; do { if (_class810[0].method_0().method_0() <= 0) @@ -217,25 +217,25 @@ public override int vmethod_4(float[] float0, int int5, int int6) } return result; } - var array = vmethod_5(int6 / WaveFormat0.short_0); + float[][] array = vmethod_5(int6 / WaveFormat0.short_0); if (array == null) { return 0; } - var num2 = 0; - var array2 = array; - for (var i = 0; i < array2.Length; i++) + int num2 = 0; + float[][] array2 = array; + for (int i = 0; i < array2.Length; i++) { - var array3 = array2[i]; + float[] array3 = array2[i]; num2 = Math.Max(array3.Length, num2); } num2 *= WaveFormat0.short_0; - var num3 = array.Length; - for (var j = 0; j < num3; j++) + int num3 = array.Length; + for (int j = 0; j < num3; j++) { - var array4 = array[j]; - var k = 0; - var num4 = int5 + j; + float[] array4 = array[j]; + int k = 0; + int num4 = int5 + j; while (k < array4.Length) { float0[num4] = array4[k]; @@ -252,13 +252,13 @@ public override float[][] vmethod_5(int int5) lock (_object0) { int num = vmethod_0().short_0; - var array = new float[num][]; - for (var i = 0; i < num; i++) + float[][] array = new float[num][]; + for (int i = 0; i < num; i++) { array[i] = new float[int5]; } int5 *= num; - var num2 = 0; + int num2 = 0; do { if (_class810[0].method_0().method_0() <= 0) @@ -268,13 +268,13 @@ public override float[][] vmethod_5(int int5) break; } } - var num3 = 0; - var int6 = num2 / _class810.Length; - var int7 = (int5 - num2) / _class810.Length; - for (var j = 0; j < _class810.Length; j++) + int num3 = 0; + int int6 = num2 / _class810.Length; + int int7 = (int5 - num2) / _class810.Length; + for (int j = 0; j < _class810.Length; j++) { - var array2 = new float[_class810[j].method_2()][]; - var k = 0; + float[][] array2 = new float[_class810[j].method_2()][]; + int k = 0; while (k < array2.Length) { array2[k] = array[num3]; @@ -292,7 +292,7 @@ public override float[][] vmethod_5(int int5) public bool method_0() { - for (var i = 0; i < _class810.Length; i++) + for (int i = 0; i < _class810.Length; i++) { if (!method_1(i)) { @@ -304,7 +304,7 @@ public bool method_0() public bool method_1(int int5) { - var @class = _class820.method_3(); + ZzSoundClass @class = _class820.method_3(); if (@class == null) { return false; diff --git a/GHNamespaceI/MP3Stream.cs b/GHNamespaceI/MP3Stream.cs index 7328d9b..8f954de 100644 --- a/GHNamespaceI/MP3Stream.cs +++ b/GHNamespaceI/MP3Stream.cs @@ -138,8 +138,8 @@ public override void Close() public override int vmethod_3(IntPtr intptr0, int int5) { int5 >>= 2; - var array = new float[int5]; - var num = vmethod_4(array, 0, int5); + float[] array = new float[int5]; + int num = vmethod_4(array, 0, int5); Marshal.Copy(array, 0, intptr0, num); return num << 2; } @@ -149,7 +149,7 @@ public override int vmethod_4(float[] float0, int int5, int int6) int result; lock (_object0) { - var num = 0; + int num = 0; do { if (_class810.method_0().method_0() <= 0) @@ -173,13 +173,13 @@ public override float[][] vmethod_5(int int5) lock (_object0) { int num = vmethod_0().short_0; - var array = new float[num][]; - for (var i = 0; i < num; i++) + float[][] array = new float[num][]; + for (int i = 0; i < num; i++) { array[i] = new float[int5]; } int5 *= num; - var num2 = 0; + int num2 = 0; do { if (_class810.method_0().method_0() <= 0) @@ -202,7 +202,7 @@ public override int Read(byte[] buffer, int offset, int count) int result; lock (_object0) { - var num = 0; + int num = 0; do { if (_class810.method_0().method_0() <= 0) @@ -222,7 +222,7 @@ public override int Read(byte[] buffer, int offset, int count) public bool method_0() { - var @class = _class820.method_3(); + ZzSoundClass @class = _class820.method_3(); if (@class == null) { return false; diff --git a/GHNamespaceI/zzSoundClass81.cs b/GHNamespaceI/zzSoundClass81.cs index 48138ba..485806a 100644 --- a/GHNamespaceI/zzSoundClass81.cs +++ b/GHNamespaceI/zzSoundClass81.cs @@ -55,7 +55,7 @@ public ZzSoundClass81(Class104 class1042) class1042 = Class1040; } _class1041 = class1042; - var @class = _class1041.method_1(); + Class105 @class = _class1041.method_1(); if (@class != null) { _class1050.method_2(@class); @@ -64,14 +64,14 @@ public ZzSoundClass81(Class104 class1042) private void method_3(ZzSoundClass class1070) { - var @enum = class1070.method_8(); + Enum5 @enum = class1070.method_8(); class1070.method_4(); - var num = (@enum == Enum5.Const3 || _class1041.method_0() != Enum4.Const0) ? 1 : 2; + int num = (@enum == Enum5.Const3 || _class1041.method_0() != Enum4.Const0) ? 1 : 2; if (_class840 == null) { _class840 = new Class84(num); } - var float_ = _class1050.method_0(); + float[] float_ = _class1050.method_0(); _class800 = new Class80(0, float_); if (num == 2) { @@ -127,9 +127,9 @@ public Class84 method_5(ZzSoundClass class1070, Class82 class820) { method_3(class1070); } - var int_ = class1070.method_4(); + int int_ = class1070.method_4(); _class840.method_6(); - var @interface = method_4(class1070, class820, int_); + INterface7 @interface = method_4(class1070, class820, int_); @interface.imethod_0(); _class840.method_5(); return _class840; diff --git a/GHNamespaceJ/AC3Class1.cs b/GHNamespaceJ/AC3Class1.cs index c6ecf12..f8bb294 100644 --- a/GHNamespaceJ/AC3Class1.cs +++ b/GHNamespaceJ/AC3Class1.cs @@ -183,19 +183,19 @@ public Ac3Class1() private void method_0() { - for (var i = 0; i < 5; i++) + for (int i = 0; i < 5; i++) { _double9[i] = new double[18]; } - for (var j = 0; j < 5; j++) + for (int j = 0; j < 5; j++) { _byte1[j] = new byte[256]; } - for (var k = 0; k < 5; k++) + for (int k = 0; k < 5; k++) { _byte4[k] = new byte[256]; } - for (var l = 0; l < 5; l++) + for (int l = 0; l < 5; l++) { _int23[l] = new int[50]; } @@ -228,19 +228,19 @@ private bool method_1() } Class1150.method_2(16); Class1150.method_2(16); - var num = Class1150.method_2(8); - var num2 = Class1150.method_2(8); - var num3 = Class1150.method_2(8); - var num4 = Int31[num2 >> 3]; - var num5 = num3 >> 5; + int num = Class1150.method_2(8); + int num2 = Class1150.method_2(8); + int num3 = Class1150.method_2(8); + int num4 = Int31[num2 >> 3]; + int num5 = num3 >> 5; Int1 = ((((num3 & 248) == 80) ? 10 : num5) | (((num3 & Int33[num5]) != 0) ? 16 : 0)); - var num6 = num & 63; + int num6 = num & 63; if (num6 >= 38) { throw new Ac3Exception("Unknown rate"); } Int3 = Int32[num6 >> 1] * 1000 >> num4; - var num7 = num & 192; + int num7 = num & 192; if (num7 != 0) { if (num7 != 64) @@ -272,7 +272,7 @@ private void method_2() Class1150.method_2(32); _int5 = Class1150.method_2(3); Class1150.method_2(5); - var num = Class1150.method_2(5); + int num = Class1150.method_2(5); if (num >= Int31.Length) { throw new FfMpegException("Illegal half rate"); @@ -300,7 +300,7 @@ private void method_2() _double7 *= 2.0; _double8 = _double7; Bool1 = false; - var flag = _int7 == 0; + bool flag = _int7 == 0; do { Class1150.method_2(5); @@ -328,30 +328,30 @@ private void method_2() } if (Class1150.vmethod_1()) { - var num2 = Class1150.method_2(6); + int num2 = Class1150.method_2(6); Class1150.vmethod_3(Class1150.vmethod_0() + num2 * 8); } } private void method_3() { - var num = Int35[_int7]; - var array = new bool[5]; - for (var i = 0; i < num; i++) + int num = Int35[_int7]; + bool[] array = new bool[5]; + for (int i = 0; i < num; i++) { array[i] = Class1150.vmethod_1(); } - var array2 = new bool[5]; - for (var j = 0; j < num; j++) + bool[] array2 = new bool[5]; + for (int j = 0; j < num; j++) { array2[j] = Class1150.vmethod_1(); } - var flag = _int7 == 0; + bool flag = _int7 == 0; do { if (Class1150.vmethod_1()) { - var num2 = method_8(8); + int num2 = method_8(8); if (Bool1) { _double8 = (((num2 & 31) | 32) << 13) * Double13[2 - (num2 >> 5)] * _double7; @@ -363,7 +363,7 @@ private void method_3() _int9 = 0; if (Class1150.vmethod_1()) { - for (var k = 0; k < num; k++) + for (int k = 0; k < num; k++) { _int9 |= Class1150.method_2(1) << k; } @@ -376,8 +376,8 @@ private void method_3() _bool2 = Class1150.vmethod_1(); break; } - var num3 = Class1150.method_2(4); - var num4 = Class1150.method_2(4); + int num3 = Class1150.method_2(4); + int num4 = Class1150.method_2(4); if (num4 + 3 - num3 < 0) { throw new Ac3Exception("Invalid values"); @@ -387,8 +387,8 @@ private void method_3() _int12 = num3 * 12 + 37; _int13 = num4 * 12 + 73; _int14 = 0; - var num5 = _int10; - for (var l = 0; l < num5 - 1; l++) + int num5 = _int10; + for (int l = 0; l < num5 - 1; l++) { if (Class1150.vmethod_1()) { @@ -400,17 +400,17 @@ private void method_3() } if (_int9 != 0) { - var flag2 = false; - for (var m = 0; m < num; m++) + bool flag2 = false; + for (int m = 0; m < num; m++) { if ((_int9 >> m & 1) != 0 && Class1150.vmethod_1()) { flag2 = true; - var num6 = 3 * Class1150.method_2(2); - for (var n = 0; n < _int10; n++) + int num6 = 3 * Class1150.method_2(2); + for (int n = 0; n < _int10; n++) { - var num7 = Class1150.method_2(4); - var num8 = Class1150.method_2(4); + int num7 = Class1150.method_2(4); + int num8 = Class1150.method_2(4); if (num7 == 15) { num8 <<= 14; @@ -425,7 +425,7 @@ private void method_3() } if (_int7 == 2 && _bool2 && flag2) { - for (var num9 = 0; num9 < _int10; num9++) + for (int num9 = 0; num9 < _int10; num9++) { if (Class1150.vmethod_1()) { @@ -437,21 +437,21 @@ private void method_3() if (_int7 == 2 && Class1150.vmethod_1()) { _int15 = 0; - var num10 = (_int9 != 0) ? _int12 : 253; - var num11 = 0; + int num10 = (_int9 != 0) ? _int12 : 253; + int num11 = 0; do { _int15 |= Class1150.method_2(1) << num11; } while (Int37[num11++] < num10); } - var num12 = 0; - var num13 = 0; + int num12 = 0; + int num13 = 0; if (_int9 != 0) { num12 = Class1150.method_2(2); } - var array3 = new int[5]; - for (var num14 = 0; num14 < num; num14++) + int[] array3 = new int[5]; + for (int num14 = 0; num14 < num; num14++) { array3[num14] = Class1150.method_2(2); } @@ -459,7 +459,7 @@ private void method_3() { num13 = Class1150.method_2(1); } - for (var num15 = 0; num15 < num; num15++) + for (int num15 = 0; num15 < num; num15++) { if (array3[num15] != 0) { @@ -469,7 +469,7 @@ private void method_3() } else { - var num16 = Class1150.method_2(6); + int num16 = Class1150.method_2(6); if (num16 > 60) { throw new Ac3Exception("chbwcod too large"); @@ -478,21 +478,21 @@ private void method_3() } } } - var num17 = 0; + int num17 = 0; if (num12 != 0) { num17 = 64; - var int_ = (_int13 - _int12) / (3 << num12 - 1); - var byte_ = (byte) (Class1150.method_2(4) << 1); + int int_ = (_int13 - _int12) / (3 << num12 - 1); + byte byte_ = (byte) (Class1150.method_2(4) << 1); method_13(num12, int_, byte_, _byte0, _int12); } - for (var num18 = 0; num18 < num; num18++) + for (int num18 = 0; num18 < num; num18++) { if (array3[num18] != 0) { num17 |= 1 << num18; - var num19 = 3 << array3[num18] - 1; - var int2 = (_int16[num18] + num19 - 4) / num19; + int num19 = 3 << array3[num18] - 1; + int int2 = (_int16[num18] + num19 - 4) / num19; _byte1[num18][0] = (byte) Class1150.method_2(4); method_13(array3[num18], int2, _byte1[num18][0], _byte1[num18], 1); Class1150.method_2(2); @@ -517,7 +517,7 @@ private void method_3() { _int18 = Class1150.method_2(7); } - for (var num20 = 0; num20 < num; num20++) + for (int num20 = 0; num20 < num; num20++) { _int21[num20] = Class1150.method_2(7); } @@ -539,7 +539,7 @@ private void method_3() { _int19 = Class1150.method_2(2); } - for (var num21 = 0; num21 < num; num21++) + for (int num21 = 0; num21 < num; num21++) { _int22[num21] = Class1150.method_2(2); } @@ -547,7 +547,7 @@ private void method_3() { method_12(_int20); } - for (var num22 = 0; num22 < num; num22++) + for (int num22 = 0; num22 < num; num22++) { if (_int22[num22] == 1) { @@ -559,18 +559,18 @@ private void method_3() { if (method_5(num)) { - for (var num23 = 0; num23 < _byte3.Length; num23++) + for (int num23 = 0; num23 < _byte3.Length; num23++) { _byte3[num23] = 0; } - for (var num24 = 0; num24 < num; num24++) + for (int num24 = 0; num24 < num; num24++) { - for (var num25 = 0; num25 < _byte4[num24].Length; num25++) + for (int num25 = 0; num25 < _byte4[num24].Length; num25++) { _byte4[num24][num25] = 0; } } - for (var num26 = 0; num26 < _byte5.Length; num26++) + for (int num26 = 0; num26 < _byte5.Length; num26++) { _byte5[num26] = 0; } @@ -582,7 +582,7 @@ private void method_3() method_4(_int18, _int19, _int20, _int11, _int12, _int13, _int28 << 8, _int29 << 8, _byte0, _byte3); } - for (var num27 = 0; num27 < num; num27++) + for (int num27 = 0; num27 < num; num27++) { if ((num17 & 1 << num27) != 0) { @@ -599,17 +599,17 @@ private void method_3() } if (Class1150.vmethod_1()) { - var num28 = Class1150.method_2(9); + int num28 = Class1150.method_2(9); Class1150.vmethod_3(Class1150.vmethod_0() + num28 * 8); } - var num29 = 256; - var array4 = new double[5]; + int num29 = 256; + double[] array4 = new double[5]; method_11(array4, _int7, _double8, _double5, _double6); - var flag3 = false; + bool flag3 = false; _class1130.Int0 = -1; _class1130.Int1 = -1; _class1130.Int2 = -1; - for (var num30 = 0; num30 < num; num30++) + for (int num30 = 0; num30 < num; num30++) { method_7(_double10, num29 + 256 * num30, _byte1[num30], _byte4[num30], _class1130, array4[num30], array2[num30], _int16[num30]); @@ -634,10 +634,10 @@ private void method_3() } if (_int7 == 2) { - var num32 = 0; - var num31 = 13; - var num33 = (_int16[0] < _int16[1]) ? _int16[0] : _int16[1]; - var num34 = _int15; + int num32 = 0; + int num31 = 13; + int num33 = (_int16[0] < _int16[1]) ? _int16[0] : _int16[1]; + int num34 = _int15; do { if ((num34 & 1) == 0) @@ -648,15 +648,15 @@ private void method_3() else { num34 >>= 1; - var num35 = Int37[num32++]; + int num35 = Int37[num32++]; if (num35 > num33) { num35 = num33; } do { - var num36 = _double10[num29 + num31]; - var num37 = _double10[num29 + num31 + 256]; + double num36 = _double10[num29 + num31]; + double num37 = _double10[num29 + num31 + 256]; _double10[num29 + num31] = num36 + num37; _double10[num29 + num31 + 256] = num36 - num37; } while (++num31 < num35); @@ -666,13 +666,13 @@ private void method_3() if (_bool0) { method_7(_double10, num29 - 256, _byte2, _byte5, _class1130, 0.0, false, 7); - for (var num38 = 7; num38 < 256; num38++) + for (int num38 = 7; num38 < 256; num38++) { _double10[num29 - 256 + num38] = 0.0; } Class1100.vmethod_0(_double10, num29 - 256, num29 - 256 + 1536, Int0); } - var num39 = 0; + int num39 = 0; if (2 < num) { num39 = 1; @@ -702,7 +702,7 @@ private void method_3() } else { - for (var num31 = 0; num31 < 256; num31++) + for (int num31 = 0; num31 < 256; num31++) { _double10[num29 + 256 * num39 + num31] = 0.0; } @@ -710,7 +710,7 @@ private void method_3() } return; } - var num40 = 0; + int num40 = 0; if (!_bool3) { _bool3 = true; @@ -732,24 +732,24 @@ private void method_3() private void method_4(int int45, int int46, int[] int47, int int48, int int49, int int50, int int51, int int52, byte[] byte10, byte[] byte11) { - var num = 63 + 20 * (_int17 >> 7 & 3) >> _int6; - var num2 = 128 + 128 * (int45 & 7); - var num3 = 15 + 2 * (_int17 >> 9) >> _int6; - var num4 = Int38[_int17 >> 5 & 3]; - var num5 = Int39[_int17 >> 3 & 3]; - var array = Int41[_int5]; + int num = 63 + 20 * (_int17 >> 7 & 3) >> _int6; + int num2 = 128 + 128 * (int45 & 7); + int num3 = 15 + 2 * (_int17 >> 9) >> _int6; + int num4 = Int38[_int17 >> 5 & 3]; + int num5 = Int39[_int17 >> 3 & 3]; + int[] array = Int41[_int5]; if (int46 == 2) { int47 = Int42; } - var num6 = Int40[_int17 & 7]; - var num7 = 960 - 64 * _int27 - 4 * (int45 >> 3) + num6; + int num6 = Int40[_int17 & 7]; + int num7 = 960 - 64 * _int27 - 4 * (int45 >> 3) + num6; num6 >>= 5; - var i = int48; - var j = int49; + int i = int48; + int j = int49; if (int49 == 0) { - var k = 0; + int k = 0; j = int50 - 1; int num8; while (true) @@ -766,7 +766,7 @@ private void method_4(int int45, int int46, int[] int47, int int48, int int49, i } } num8 = 128 * byte10[i]; - var num9 = num8 + num2 + k; + int num9 = num8 + num2 + k; if (num8 > num5) { num9 -= num8 - num5 >> 2; @@ -818,7 +818,7 @@ private void method_4(int int45, int int46, int[] int47, int int48, int int49, i { int52 = num8 + num4; } - var num9 = (int51 + k < int52) ? (int51 + k) : int52; + int num9 = (int51 + k < int52) ? (int51 + k) : int52; if (num8 > num5) { num9 -= num8 - num5 >> 2; @@ -858,7 +858,7 @@ private void method_4(int int45, int int46, int[] int47, int int48, int int49, i { int52 = num8 + num4; } - var num9 = (int51 + k < int52) ? (int51 + k) : int52; + int num9 = (int51 + k < int52) ? (int51 + k) : int52; if (num8 > num5) { num9 -= num8 - num5 >> 2; @@ -887,7 +887,7 @@ private void method_4(int int45, int int46, int[] int47, int int48, int int49, i { int52 = num8 + num4; } - var num9 = (int51 + k < int52) ? (int51 + k) : int52; + int num9 = (int51 + k < int52) ? (int51 + k) : int52; if (num8 > num5) { num9 -= num8 - num5 >> 2; @@ -906,13 +906,13 @@ private void method_4(int int45, int int46, int[] int47, int int48, int int49, i } do { - var num10 = j; - var num11 = (Int43[i - 20] < int50) ? Int43[i - 20] : int50; - var num8 = 128 * byte10[j++]; + int num10 = j; + int num11 = (Int43[i - 20] < int50) ? Int43[i - 20] : int50; + int num8 = 128 * byte10[j++]; while (j < num11) { - var num12 = 128 * byte10[j++]; - var num13 = num12 - num8; + int num12 = 128 * byte10[j++]; + int num13 = num12 - num8; switch (num13 >> 9) { case -6: @@ -940,7 +940,7 @@ private void method_4(int int45, int int46, int[] int47, int int48, int int49, i { int52 = num8 + num4; } - var num9 = (int51 < int52) ? int51 : int52; + int num9 = (int51 < int52) ? int51 : int52; if (num8 > num5) { num9 -= num8 - num5 >> 2; @@ -965,7 +965,7 @@ private bool method_5(int int45) { if (_int27 == 0 && (_int9 == 0 || _int18 >> 3 == 0) && (!_bool0 || _int24 >> 3 == 0)) { - for (var i = 0; i < int45; i++) + for (int i = 0; i < int45; i++) { if (_int21[i] >> 3 != 0) { @@ -979,7 +979,7 @@ private bool method_5(int int45) private int method_6() { - var num = Int34[_int30 >> 8] ^ _int30 << 8; + int num = Int34[_int30 >> 8] ^ _int30 << 8; if ((num & 32768) != 0) { num |= -65536; @@ -995,12 +995,12 @@ private int method_6() private void method_7(double[] double24, int int45, byte[] byte10, byte[] byte11, Class113 class1131, double double25, bool bool5, int int46) { - var array = new double[25]; - for (var i = 0; i <= 24; i++) + double[] array = new double[25]; + for (int i = 0; i <= 24; i++) { array[i] = Double13[i] * double25; } - var j = 0; + int j = 0; while (j < int46) { int num = byte11[j]; @@ -1014,7 +1014,7 @@ private void method_7(double[] double24, int int45, byte[] byte10, byte[] byte11 } else { - var num2 = Class1150.method_2(7); + int num2 = Class1150.method_2(7); class1131.Int2 = 0; class1131.vmethod_2()[0] = Double22[num2]; double24[int45 + j] = Double21[num2] * array[byte10[j]]; @@ -1028,7 +1028,7 @@ private void method_7(double[] double24, int int45, byte[] byte10, byte[] byte11 } else { - var num3 = Class1150.method_2(7); + int num3 = Class1150.method_2(7); class1131.Int1 = 1; class1131.vmethod_1()[0] = Double19[num3]; class1131.vmethod_1()[1] = Double18[num3]; @@ -1043,7 +1043,7 @@ private void method_7(double[] double24, int int45, byte[] byte10, byte[] byte11 } else { - var num4 = Class1150.method_2(5); + int num4 = Class1150.method_2(5); class1131.Int0 = 1; class1131.vmethod_0()[0] = Double16[num4]; class1131.vmethod_0()[1] = Double15[num4]; @@ -1053,7 +1053,7 @@ private void method_7(double[] double24, int int45, byte[] byte10, byte[] byte11 case 0: if (bool5) { - var num5 = method_6(); + int num5 = method_6(); double24[int45 + j] = num5 * array[byte10[j]] * Double2; } else @@ -1077,7 +1077,7 @@ private void method_7(double[] double24, int int45, byte[] byte10, byte[] byte11 j++; continue; IL_216: - var num6 = method_8(num); + int num6 = method_8(num); double24[int45 + j] = (num6 << 16 - num) * array[byte10[j]]; goto IL_275; } @@ -1085,7 +1085,7 @@ private void method_7(double[] double24, int int45, byte[] byte10, byte[] byte11 private int method_8(int int45) { - var num = Class1150.method_2(int45); + int num = Class1150.method_2(int45); if ((num & 1 << int45 - 1) != 0) { num |= -1 << int45; @@ -1096,22 +1096,22 @@ private int method_8(int int45) private void method_9(int int45, double[] double24, double[] double25, int int46, Class113 class1131, bool[] bool5) { - var array = new double[5]; - var array2 = _byte0; - var array3 = _byte3; - var num = 0; - var num2 = _int14; - var i = _int12; + double[] array = new double[5]; + byte[] array2 = _byte0; + byte[] array3 = _byte3; + int num = 0; + int num2 = _int14; + int i = _int12; while (i < _int13) { - var num3 = i + 12; + int num3 = i + 12; while ((num2 & 1) != 0) { num2 >>= 1; num3 += 12; } num2 >>= 1; - for (var j = 0; j < int45; j++) + for (int j = 0; j < int45; j++) { array[j] = _double9[j][num] * double24[j]; } @@ -1130,7 +1130,7 @@ private void method_9(int int45, double[] double24, double[] double25, int int46 } else { - var num6 = Class1150.method_2(7); + int num6 = Class1150.method_2(7); class1131.Int2 = 0; class1131.vmethod_2()[0] = Double22[num6]; num5 = Double21[num6]; @@ -1144,7 +1144,7 @@ private void method_9(int int45, double[] double24, double[] double25, int int46 } else { - var num7 = Class1150.method_2(7); + int num7 = Class1150.method_2(7); class1131.Int1 = 1; class1131.vmethod_1()[0] = Double19[num7]; class1131.vmethod_1()[1] = Double18[num7]; @@ -1159,7 +1159,7 @@ private void method_9(int int45, double[] double24, double[] double25, int int46 } else { - var num8 = Class1150.method_2(5); + int num8 = Class1150.method_2(5); class1131.Int0 = 1; class1131.vmethod_0()[0] = Double16[num8]; class1131.vmethod_0()[1] = Double15[num8]; @@ -1168,7 +1168,7 @@ private void method_9(int int45, double[] double24, double[] double25, int int46 break; case 0: num5 = Double2 * Double13[array2[i]]; - for (var k = 0; k < int45; k++) + for (int k = 0; k < int45; k++) { if ((_int9 >> k & 1) != 0) { @@ -1200,7 +1200,7 @@ private void method_9(int int45, double[] double24, double[] double25, int int46 if (num4 != 0) { num5 *= Double13[array2[i]]; - for (var l = 0; l < int45; l++) + for (int l = 0; l < int45; l++) { if ((_int9 >> l & 1) != 0) { @@ -1274,17 +1274,17 @@ private void method_11(double[] double24, int int45, double double25, double dou private void method_12(int[] int45) { - for (var i = 0; i < int45.Length; i++) + for (int i = 0; i < int45.Length; i++) { int45[i] = 0; } - var num = Class1150.method_2(3); - var num2 = 0; + int num = Class1150.method_2(3); + int num2 = 0; do { num2 += Class1150.method_2(5); - var num3 = Class1150.method_2(4); - var num4 = Class1150.method_2(3); + int num3 = Class1150.method_2(4); + int num4 = Class1150.method_2(3); num4 -= ((num4 < 4) ? 4 : 3); while (num3-- != 0) { @@ -1297,7 +1297,7 @@ private void method_13(int int45, int int46, byte byte10, byte[] byte11, int int { while (int46-- != 0) { - var num = Class1150.method_2(7); + int num = Class1150.method_2(7); byte10 += Byte6[num]; if ((255 & byte10) <= 24) { @@ -1375,7 +1375,7 @@ public virtual int vmethod_0(byte[] byte10, Stream stream0) { try { - var num = byte10.Length; + int num = byte10.Length; Class1150.vmethod_2(byte10, 0, num); while (Class1150.method_1() > 56) { @@ -1392,7 +1392,7 @@ public virtual int vmethod_0(byte[] byte10, Stream stream0) { break; } - var num2 = Class1150.vmethod_0(); + int num2 = Class1150.vmethod_0(); method_2(); while (Class1150.vmethod_0() - num2 < (Int4 - 7) * 8) { diff --git a/GHNamespaceJ/AC3Stream.cs b/GHNamespaceJ/AC3Stream.cs index 9999fa1..5367fc0 100644 --- a/GHNamespaceJ/AC3Stream.cs +++ b/GHNamespaceJ/AC3Stream.cs @@ -12,9 +12,9 @@ public class Ac3Stream : GenericAudioStream public double Double0; - private bool _bool0; + private readonly bool _bool0; - private int _int3; + private readonly int _int3; private readonly object _object0 = new object(); @@ -103,7 +103,7 @@ public override int Read(byte[] buffer, int offset, int count) int result; lock (_object0) { - var num = 0; + int num = 0; do { if (_memoryStream0.Position == _memoryStream0.Length) @@ -127,7 +127,7 @@ public override void Close() public bool method_0() { - var array = new byte[1792]; + byte[] array = new byte[1792]; FileStream.Read(array, 0, 1792); _memoryStream0 = new MemoryStream(); _class1110.vmethod_0(array, _memoryStream0); diff --git a/GHNamespaceJ/Class105.cs b/GHNamespaceJ/Class105.cs index 449b7d3..baa4e4e 100644 --- a/GHNamespaceJ/Class105.cs +++ b/GHNamespaceJ/Class105.cs @@ -14,9 +14,9 @@ public class Class105 public float[] method_0() { - var array = new float[Num1]; - var i = 0; - var num = Num1; + float[] array = new float[Num1]; + int i = 0; + int num = Num1; while (i < num) { array[i] = smethod_1(_float1[i]); @@ -28,8 +28,8 @@ public float[] method_0() public void method_1(float[] float2) { method_3(); - var num = (float2.Length > Num1) ? Num1 : float2.Length; - for (var i = 0; i < num; i++) + int num = (float2.Length > Num1) ? Num1 : float2.Length; + for (int i = 0; i < num; i++) { _float1[i] = smethod_0(float2[i]); } @@ -45,7 +45,7 @@ public void method_2(Class105 class1051) public void method_3() { - for (var i = 0; i < Num1; i++) + for (int i = 0; i < Num1; i++) { _float1[i] = 0f; } diff --git a/GHNamespaceJ/Class110.cs b/GHNamespaceJ/Class110.cs index cd9ad55..1cab879 100644 --- a/GHNamespaceJ/Class110.cs +++ b/GHNamespaceJ/Class110.cs @@ -493,11 +493,11 @@ public class Class110 private void method_0() { - for (var i = 0; i < 8; i++) + for (int i = 0; i < 8; i++) { _double12[i] = new double[256]; } - for (var j = 0; j < 8; j++) + for (int j = 0; j < 8; j++) { _double13[j] = new double[256]; } @@ -505,8 +505,8 @@ private void method_0() private void method_1(double[] double14, double[] double15, int int2, int int3) { - var num = double14[int2]; - var num2 = double15[int2]; + double num = double14[int2]; + double num2 = double15[int2]; double14[int2] = double14[int3]; double15[int2] = double15[int3]; double14[int3] = num; @@ -515,21 +515,21 @@ private void method_1(double[] double14, double[] double15, int int2, int int3) public virtual void vmethod_0(double[] double14, int int2, int int3, double double15) { - for (var i = 0; i < 128; i++) + for (int i = 0; i < 128; i++) { _double2[i] = double14[int2 + 256 - 2 * i - 1] * _double8[i] - double14[int2 + 2 * i] * _double9[i]; _double3[i] = -1.0 * (double14[int2 + 2 * i] * _double8[i] + double14[int2 + 256 - 2 * i - 1] * _double9[i]); } - for (var j = 0; j < 128; j++) + for (int j = 0; j < 128; j++) { - var num = Int0[j]; + int num = Int0[j]; if (num < j) { method_1(_double2, _double3, j, num); } } - for (var k = 0; k < 7; k++) + for (int k = 0; k < 7; k++) { int num2; if (k != 0) @@ -540,17 +540,17 @@ public virtual void vmethod_0(double[] double14, int int2, int int3, double doub { num2 = 1; } - var num3 = 1 << k + 1; - for (var l = 0; l < num2; l++) + int num3 = 1 << k + 1; + for (int l = 0; l < num2; l++) { - for (var m = 0; m < 128; m += num3) + for (int m = 0; m < 128; m += num3) { - var num4 = l + m; - var num5 = num4 + num2; - var num6 = _double2[num4]; - var num7 = _double3[num4]; - var num8 = _double2[num5] * _double12[k][l] - _double3[num5] * _double13[k][l]; - var num9 = _double3[num5] * _double12[k][l] + _double2[num5] * _double13[k][l]; + int num4 = l + m; + int num5 = num4 + num2; + double num6 = _double2[num4]; + double num7 = _double3[num4]; + double num8 = _double2[num5] * _double12[k][l] - _double3[num5] * _double13[k][l]; + double num9 = _double3[num5] * _double12[k][l] + _double2[num5] * _double13[k][l]; _double2[num4] = num6 + num8; _double3[num4] = num7 + num9; _double2[num5] = num6 - num8; @@ -558,33 +558,33 @@ public virtual void vmethod_0(double[] double14, int int2, int int3, double doub } } } - for (var n = 0; n < 128; n++) + for (int n = 0; n < 128; n++) { - var num6 = _double2[n]; - var num7 = -1.0 * _double3[n]; + double num6 = _double2[n]; + double num7 = -1.0 * _double3[n]; _double2[n] = num6 * _double8[n] - num7 * _double9[n]; _double3[n] = num6 * _double9[n] + num7 * _double8[n]; } - var num10 = int2; - var num11 = int3; - var num12 = 0; - for (var num13 = 0; num13 < 64; num13++) + int num10 = int2; + int num11 = int3; + int num12 = 0; + for (int num13 = 0; num13 < 64; num13++) { double14[num10++] = -_double3[64 + num13] * Double1[num12++] + double14[num11++] + double15; double14[num10++] = _double2[64 - num13 - 1] * Double1[num12++] + double14[num11++] + double15; } - for (var num14 = 0; num14 < 64; num14++) + for (int num14 = 0; num14 < 64; num14++) { double14[num10++] = -_double2[num14] * Double1[num12++] + double14[num11++] + double15; double14[num10++] = _double3[128 - num14 - 1] * Double1[num12++] + double14[num11++] + double15; } num11 = int3; - for (var num15 = 0; num15 < 64; num15++) + for (int num15 = 0; num15 < 64; num15++) { double14[num11++] = -_double2[64 + num15] * Double1[--num12]; double14[num11++] = _double3[64 - num15 - 1] * Double1[--num12]; } - for (var num16 = 0; num16 < 64; num16++) + for (int num16 = 0; num16 < 64; num16++) { double14[num11++] = _double3[num16] * Double1[--num12]; double14[num11++] = -_double2[128 - num16 - 1] * Double1[--num12]; @@ -593,28 +593,28 @@ public virtual void vmethod_0(double[] double14, int int2, int int3, double doub public virtual void vmethod_1(double[] double14, int int2, int int3, double double15) { - for (var i = 0; i < 64; i++) + for (int i = 0; i < 64; i++) { - var num = 2 * (128 - 2 * i - 1); - var num2 = 2 * (2 * i); + int num = 2 * (128 - 2 * i - 1); + int num2 = 2 * (2 * i); _double4[i] = double14[num] * _double10[i] - double14[num2] * _double11[i]; _double5[i] = -1.0 * (double14[num2] * _double10[i] + double14[num] * _double11[i]); _double6[i] = double14[num + 1] * _double10[i] - double14[num2 + 1] * _double11[i]; _double7[i] = -1.0 * (double14[num2 + 1] * _double10[i] + double14[num + 1] * _double11[i]); } - for (var j = 0; j < 64; j++) + for (int j = 0; j < 64; j++) { - var num3 = Int1[j]; + int num3 = Int1[j]; if (num3 < j) { method_1(_double4, _double5, j, num3); method_1(_double6, _double7, j, num3); } } - for (var k = 0; k < 6; k++) + for (int k = 0; k < 6; k++) { - var num4 = 1 << k; - var num5 = 1 << k + 1; + int num4 = 1 << k; + int num5 = 1 << k + 1; if (k != 0) { num4 = 1 << k; @@ -623,16 +623,16 @@ public virtual void vmethod_1(double[] double14, int int2, int int3, double doub { num4 = 1; } - for (var l = 0; l < num4; l++) + for (int l = 0; l < num4; l++) { - for (var m = 0; m < 64; m += num5) + for (int m = 0; m < 64; m += num5) { - var num6 = l + m; - var num7 = num6 + num4; - var num8 = _double4[num6]; - var num9 = _double5[num6]; - var num10 = _double4[num7] * _double12[k][l] - _double5[num7] * _double13[k][l]; - var num11 = _double5[num7] * _double12[k][l] + _double4[num7] * _double13[k][l]; + int num6 = l + m; + int num7 = num6 + num4; + double num8 = _double4[num6]; + double num9 = _double5[num6]; + double num10 = _double4[num7] * _double12[k][l] - _double5[num7] * _double13[k][l]; + double num11 = _double5[num7] * _double12[k][l] + _double4[num7] * _double13[k][l]; _double4[num6] = num8 + num10; _double5[num6] = num9 + num11; _double4[num7] = num8 - num10; @@ -648,10 +648,10 @@ public virtual void vmethod_1(double[] double14, int int2, int int3, double doub } } } - for (var n = 0; n < 64; n++) + for (int n = 0; n < 64; n++) { - var num8 = _double4[n]; - var num9 = -_double5[n]; + double num8 = _double4[n]; + double num9 = -_double5[n]; _double4[n] = num8 * _double10[n] - num9 * _double11[n]; _double5[n] = num8 * _double11[n] + num9 * _double10[n]; num8 = _double6[n]; @@ -659,26 +659,26 @@ public virtual void vmethod_1(double[] double14, int int2, int int3, double doub _double6[n] = num8 * _double10[n] - num9 * _double11[n]; _double7[n] = num8 * _double11[n] + num9 * _double10[n]; } - var num12 = int2; - var num13 = int3; - var num14 = 0; - for (var num15 = 0; num15 < 64; num15++) + int num12 = int2; + int num13 = int3; + int num14 = 0; + for (int num15 = 0; num15 < 64; num15++) { double14[num12++] = -_double5[num15] * Double1[num14++] + double14[num13++] + double15; double14[num12++] = _double4[64 - num15 - 1] * Double1[num14++] + double14[num13++] + double15; } - for (var num16 = 0; num16 < 64; num16++) + for (int num16 = 0; num16 < 64; num16++) { double14[num12++] = -_double4[num16] * Double1[num14++] + double14[num13++] + double15; double14[num12++] = _double5[64 - num16 - 1] * Double1[num14++] + double14[num13++] + double15; } num13 = int3; - for (var num17 = 0; num17 < 64; num17++) + for (int num17 = 0; num17 < 64; num17++) { double14[num13++] = -_double6[num17] * Double1[--num14]; double14[num13++] = _double7[64 - num17 - 1] * Double1[--num14]; } - for (var num18 = 0; num18 < 64; num18++) + for (int num18 = 0; num18 < 64; num18++) { double14[num13++] = _double7[num18] * Double1[--num14]; double14[num13++] = -_double6[64 - num18 - 1] * Double1[--num14]; @@ -688,20 +688,20 @@ public virtual void vmethod_1(double[] double14, int int2, int int3, double doub public Class110() { method_0(); - for (var i = 0; i < 128; i++) + for (int i = 0; i < 128; i++) { _double8[i] = -Math.Cos(0.0015339807878856412 * (8 * i + 1)); _double9[i] = -Math.Sin(0.0015339807878856412 * (8 * i + 1)); } - for (var i = 0; i < 64; i++) + for (int i = 0; i < 64; i++) { _double10[i] = -Math.Cos(0.0030679615757712823 * (8 * i + 1)); _double11[i] = -Math.Sin(0.0030679615757712823 * (8 * i + 1)); } - for (var i = 0; i < 7; i++) + for (int i = 0; i < 7; i++) { - var num = 1 << i; - for (var j = 0; j < num; j++) + int num = 1 << i; + for (int j = 0; j < num; j++) { _double12[i][j] = Math.Cos(-3.1415926535897931 * j / num); _double13[i][j] = Math.Sin(-3.1415926535897931 * j / num); @@ -715,13 +715,13 @@ public virtual void vmethod_2(double[] double14, int int2, Stream stream0) { int2 = 2; } - var num = 0; - var array = new byte[int2 * 256 * 2]; - for (var i = 0; i < 256; i++) + int num = 0; + byte[] array = new byte[int2 * 256 * 2]; + for (int i = 0; i < 256; i++) { - for (var j = 0; j < int2; j++) + for (int j = 0; j < int2; j++) { - var num2 = (int) (Double0 * double14[i + 256 * j + 256]); + int num2 = (int) (Double0 * double14[i + 256 * j + 256]); if (num2 > 32767) { num2 = 32767; diff --git a/GHNamespaceJ/Class114.cs b/GHNamespaceJ/Class114.cs index a90af10..0a7caac 100644 --- a/GHNamespaceJ/Class114.cs +++ b/GHNamespaceJ/Class114.cs @@ -668,7 +668,7 @@ public static int[] smethod_3() 2992, 43937 }; - for (var i = 0; i < array.Length; i++) + for (int i = 0; i < array.Length; i++) { if ((array[i] & 32768) != 0) { @@ -712,10 +712,10 @@ public static double[] smethod_4() public static double[] smethod_5() { - var num = -21845.333333333332; - var num2 = 0.0; - var num3 = 21845.333333333332; - var array = new double[32]; + double num = -21845.333333333332; + double num2 = 0.0; + double num3 = 21845.333333333332; + double[] array = new double[32]; array[0] = num; array[1] = num; array[2] = num; @@ -748,10 +748,10 @@ public static double[] smethod_5() public static double[] smethod_6() { - var num = -21845.333333333332; - var num2 = 0.0; - var num3 = 21845.333333333332; - var array = new double[32]; + double num = -21845.333333333332; + double num2 = 0.0; + double num3 = 21845.333333333332; + double[] array = new double[32]; array[0] = num; array[1] = num; array[2] = num; @@ -784,10 +784,10 @@ public static double[] smethod_6() public static double[] smethod_7() { - var num = -21845.333333333332; - var num2 = 0.0; - var num3 = 21845.333333333332; - var array = new double[32]; + double num = -21845.333333333332; + double num2 = 0.0; + double num3 = 21845.333333333332; + double[] array = new double[32]; array[0] = num; array[1] = num2; array[2] = num3; @@ -820,12 +820,12 @@ public static double[] smethod_7() public static double[] smethod_8() { - var num = -26214.4; - var num2 = -13107.2; - var num3 = 0.0; - var num4 = 13107.2; - var num5 = 26214.4; - var array = new double[128]; + double num = -26214.4; + double num2 = -13107.2; + double num3 = 0.0; + double num4 = 13107.2; + double num5 = 26214.4; + double[] array = new double[128]; array[0] = num; array[1] = num; array[2] = num; @@ -956,12 +956,12 @@ public static double[] smethod_8() public static double[] smethod_9() { - var num = -26214.4; - var num2 = -13107.2; - var num3 = 0.0; - var num4 = 13107.2; - var num5 = 26214.4; - var array = new double[128]; + double num = -26214.4; + double num2 = -13107.2; + double num3 = 0.0; + double num4 = 13107.2; + double num5 = 26214.4; + double[] array = new double[128]; array[0] = num; array[1] = num; array[2] = num; @@ -1092,12 +1092,12 @@ public static double[] smethod_9() public static double[] smethod_10() { - var num = -26214.4; - var num2 = -13107.2; - var num3 = 0.0; - var num4 = 13107.2; - var num5 = 26214.4; - var array = new double[128]; + double num = -26214.4; + double num2 = -13107.2; + double num3 = 0.0; + double num4 = 13107.2; + double num5 = 26214.4; + double[] array = new double[128]; array[0] = num; array[1] = num2; array[2] = num3; @@ -1243,18 +1243,18 @@ public static double[] smethod_11() public static double[] smethod_12() { - var num = -29789.090909090908; - var num2 = -23831.272727272728; - var num3 = -17873.454545454544; - var num4 = -11915.636363636364; - var num5 = -5957.818181818182; - var num6 = 0.0; - var num7 = 5957.818181818182; - var num8 = 11915.636363636364; - var num9 = 17873.454545454544; - var num10 = 23831.272727272728; - var num11 = 29789.090909090908; - var array = new double[128]; + double num = -29789.090909090908; + double num2 = -23831.272727272728; + double num3 = -17873.454545454544; + double num4 = -11915.636363636364; + double num5 = -5957.818181818182; + double num6 = 0.0; + double num7 = 5957.818181818182; + double num8 = 11915.636363636364; + double num9 = 17873.454545454544; + double num10 = 23831.272727272728; + double num11 = 29789.090909090908; + double[] array = new double[128]; array[0] = num; array[1] = num; array[2] = num; @@ -1381,18 +1381,18 @@ public static double[] smethod_12() public static double[] smethod_13() { - var num = -29789.090909090908; - var num2 = -23831.272727272728; - var num3 = -17873.454545454544; - var num4 = -11915.636363636364; - var num5 = -5957.818181818182; - var num6 = 0.0; - var num7 = 5957.818181818182; - var num8 = 11915.636363636364; - var num9 = 17873.454545454544; - var num10 = 23831.272727272728; - var num11 = 29789.090909090908; - var array = new double[128]; + double num = -29789.090909090908; + double num2 = -23831.272727272728; + double num3 = -17873.454545454544; + double num4 = -11915.636363636364; + double num5 = -5957.818181818182; + double num6 = 0.0; + double num7 = 5957.818181818182; + double num8 = 11915.636363636364; + double num9 = 17873.454545454544; + double num10 = 23831.272727272728; + double num11 = 29789.090909090908; + double[] array = new double[128]; array[0] = num; array[1] = num2; array[2] = num3; diff --git a/GHNamespaceJ/Class115.cs b/GHNamespaceJ/Class115.cs index 0b62366..8eec6eb 100644 --- a/GHNamespaceJ/Class115.cs +++ b/GHNamespaceJ/Class115.cs @@ -28,7 +28,7 @@ public virtual void vmethod_2(byte[] byte1, int int2, int int3) } if (_byte0.Length - _int1 / 8 < int3 + 8) { - var dst = new byte[(_byte0.Length + int3) * 2]; + byte[] dst = new byte[(_byte0.Length + int3) * 2]; Buffer.BlockCopy(_byte0, 0, dst, 0, _int1 / 8); Buffer.BlockCopy(byte1, int2, dst, _int1 / 8, int3); _byte0 = dst; @@ -59,7 +59,7 @@ public int method_1() public int method_2(int int2) { - var num = _int0 >> 3; + int num = _int0 >> 3; int num2 = _byte0[num++]; int i; for (i = int2 - (8 - (_int0 & 7)); i > 0; i -= 8) @@ -77,7 +77,7 @@ public int method_2(int int2) public int method_3(int int2) { - var num = _int0 >> 3; + int num = _int0 >> 3; int num2 = _byte0[num++]; int i; for (i = int2 - (8 - (_int0 & 7)); i > 0; i -= 8) diff --git a/GHNamespaceJ/OGGOutput.cs b/GHNamespaceJ/OGGOutput.cs index b1f2df2..f38b1e2 100644 --- a/GHNamespaceJ/OGGOutput.cs +++ b/GHNamespaceJ/OGGOutput.cs @@ -116,7 +116,7 @@ public void DifferentStartPlaying() _int2 = 0; _secondaryBuffer0.SetCurrentPosition(0); method_4(); - for (var i = 0; i < 5; i++) + for (int i = 0; i < 5; i++) { method_7(); } @@ -182,7 +182,7 @@ public void SetStartingTimeBasedOnSomeValue(int int5) private int method_1() { - var playPosition = _secondaryBuffer0.PlayPosition; + int playPosition = _secondaryBuffer0.PlayPosition; if (playPosition >= _int2) { return playPosition - _int2; @@ -207,7 +207,7 @@ public void SetVolume(float float0) private void method_2(int int5) { - for (var i = 0; i < int5; i++) + for (int i = 0; i < int5; i++) { _bufferPositionNotify0[i].Offset = (i + 1) * _int0 - 1; _bufferPositionNotify0[i].EventNotifyHandle = _autoResetEvent0.SafeWaitHandle.DangerousGetHandle(); @@ -233,15 +233,17 @@ private void method_4() _bool2 = false; _int3 = 0; _int4 = 0; - _thread0 = new Thread(method_5); - _thread0.Name = "DataTransferThread"; - _thread0.Priority = ThreadPriority.Highest; + _thread0 = new Thread(method_5) + { + Name = "DataTransferThread", + Priority = ThreadPriority.Highest + }; _thread0.Start(); } private void method_5() { - var num = 0; + int num = 0; while (_bool1) { if (_bool2) @@ -256,21 +258,21 @@ private void method_5() } } Array.Clear(_byte0, 0, _byte0.Length); - var flag = true; + bool flag = true; while (flag) { _autoResetEvent0.WaitOne(-1, true); flag = method_6(); } - var num2 = _int2 / _int0; + int num2 = _int2 / _int0; method_8(); - var int_ = (int) (_long0 % _int1); + int int_ = (int) (_long0 % _int1); method_3(int_); - var flag2 = false; + bool flag2 = false; while (!flag2) { _autoResetEvent0.WaitOne(-1, true); - var num3 = _secondaryBuffer0.PlayPosition / _int0; + int num3 = _secondaryBuffer0.PlayPosition / _int0; if (!(flag2 = (num3 == num | num3 == num2))) { _int3++; @@ -282,8 +284,8 @@ private void method_5() private bool method_6() { - var num = _int2 / _int0; - var num2 = _secondaryBuffer0.PlayPosition / _int0; + int num = _int2 / _int0; + int num2 = _secondaryBuffer0.PlayPosition / _int0; if (num != num2) { return false; @@ -294,7 +296,7 @@ private bool method_6() private bool method_7() { - var num = _stream10.Read(_byte0, 0, _byte0.Length); + int num = _stream10.Read(_byte0, 0, _byte0.Length); _bool1 = (num > 0); _long0 += num; method_8(); diff --git a/GHNamespaceJ/zzSoundClass.cs b/GHNamespaceJ/zzSoundClass.cs index b20075a..6e5c554 100644 --- a/GHNamespaceJ/zzSoundClass.cs +++ b/GHNamespaceJ/zzSoundClass.cs @@ -451,7 +451,7 @@ public ZzSoundClass() public override string ToString() { - var stringBuilder = new StringBuilder(200); + StringBuilder stringBuilder = new StringBuilder(200); stringBuilder.Append("Layer "); stringBuilder.Append(method_19()); stringBuilder.Append(" frame "); @@ -473,10 +473,10 @@ public override string ToString() public void method_1(Class82 class820, Class101[] class1011) { - var flag = false; + bool flag = false; while (true) { - var num = class820.method_9(_byte0); + int num = class820.method_9(_byte0); _int14 = num; if (_byte0 == Class82.Byte1) { @@ -514,7 +514,7 @@ public void method_1(Class82 class820, Class101[] class1011) } else { - var num2 = _int3; + int num2 = _int3; if (_enum50 != Enum5.Const3) { if (num2 == 4) @@ -547,7 +547,7 @@ public void method_1(Class82 class820, Class101[] class1011) _int8 = _int7; } method_15(); - var num3 = class820.method_11(Int12); + int num3 = class820.method_11(Int12); if (Int12 >= 0 && num3 != Int12) { break; @@ -580,7 +580,7 @@ public void method_1(Class82 class820, Class101[] class1011) { _class1010 = new Class101(); } - var num = 0; + int num = 0; _class1010.method_0(num, 16); class1011[0] = _class1010; } @@ -608,16 +608,16 @@ public void method_2(byte[] byte1) } try { - var @string = Encoding.UTF8.GetString(byte1, num, 4); + string @string = Encoding.UTF8.GetString(byte1, num, 4); if (@string.Equals("Xing") || @string.Equals("Info")) { _bool2 = true; _int9 = -1; _int11 = -1; _int10 = -1; - var array = new byte[100]; - var num2 = smethod_0(BitConverter.ToInt32(byte1, num + 4)); - var num3 = 8; + byte[] array = new byte[100]; + int num2 = smethod_0(BitConverter.ToInt32(byte1, num + 4)); + int num3 = 8; if ((num2 & 1) != 0) { _int9 = smethod_0(BitConverter.ToInt32(byte1, num + num3)); @@ -657,16 +657,16 @@ public void method_2(byte[] byte1) _int10 = smethod_1(BitConverter.ToInt16(byte1, num + 8)); _int11 = smethod_0(BitConverter.ToInt32(byte1, num + 10)); _int9 = smethod_0(BitConverter.ToInt32(byte1, num + 14)); - var array2 = new int[smethod_1(BitConverter.ToInt16(byte1, num + 18))]; - var num4 = smethod_1(BitConverter.ToInt16(byte1, num + 20)); - var num5 = smethod_1(BitConverter.ToInt16(byte1, num + 22)); - var num6 = smethod_1(BitConverter.ToInt16(byte1, num + 24)); - var num7 = 26; + int[] array2 = new int[smethod_1(BitConverter.ToInt16(byte1, num + 18))]; + short num4 = smethod_1(BitConverter.ToInt16(byte1, num + 20)); + short num5 = smethod_1(BitConverter.ToInt16(byte1, num + 22)); + short num6 = smethod_1(BitConverter.ToInt16(byte1, num + 24)); + int num7 = 26; switch (num5) { case 1: { - var i = 0; + int i = 0; while (i < array2.Length) { array2[i] = byte1[num + num7] * num4; @@ -677,7 +677,7 @@ public void method_2(byte[] byte1) } case 2: { - var j = 0; + int j = 0; while (j < array2.Length) { array2[j] = smethod_1(BitConverter.ToInt16(byte1, num + num7)) * num4; @@ -688,7 +688,7 @@ public void method_2(byte[] byte1) } case 3: { - var k = 0; + int k = 0; while (k < array2.Length) { array2[k] = Struct8.smethod_0(Struct8.smethod_3(byte1, num + num7, true)) * num4; @@ -699,7 +699,7 @@ public void method_2(byte[] byte1) } case 4: { - var l = 0; + int l = 0; while (l < array2.Length) { array2[l] = smethod_0(BitConverter.ToInt32(byte1, num + num7)) * num4; @@ -858,7 +858,7 @@ public double method_17() { if (_bool2) { - var num = _double0[method_4()] / method_7(); + double num = _double0[method_4()] / method_7(); if (_enum30 == Enum3.Const0 || _enum30 == Enum3.Const2) { num /= 2.0; diff --git a/GHNamespaceJ/zzStreamClass106.cs b/GHNamespaceJ/zzStreamClass106.cs index bdb4d48..66609a5 100644 --- a/GHNamespaceJ/zzStreamClass106.cs +++ b/GHNamespaceJ/zzStreamClass106.cs @@ -31,8 +31,8 @@ public Stream method_0() public int method_1(byte[] byte1, int int2, int int3) { - var num = 0; - var flag = true; + int num = 0; + bool flag = true; while (num < int3 && flag) { if (_int1 > 0) @@ -43,10 +43,10 @@ public int method_1(byte[] byte1, int int2, int int3) } else { - var num2 = int3 - num; - var num3 = _stream.Read(_buffer, 0, num2); + int num2 = int3 - num; + int num3 = _stream.Read(_buffer, 0, num2); flag = (num3 >= num2); - for (var i = 0; i < num3; i++) + for (int i = 0; i < num3; i++) { _circBuffer.method_0(_buffer[i]); byte1[int2 + num + i] = _buffer[i]; diff --git a/GHNamespaceK/Class117.cs b/GHNamespaceK/Class117.cs index cd05683..4989902 100644 --- a/GHNamespaceK/Class117.cs +++ b/GHNamespaceK/Class117.cs @@ -73,7 +73,7 @@ public void method_0() private void method_1() { - var flag = false; + bool flag = false; while (_enum10 != AudioStatus.ShouldStopAudio && !flag) { if (_bool0) @@ -83,7 +83,7 @@ private void method_1() } if (_enum10 != AudioStatus.IsCurrentlyPlayingAudio) { - var num = 0; + int num = 0; int num2; do { @@ -99,7 +99,7 @@ private void method_1() } while (num2 == 0); while (num2-- != 0) { - var intPtr = Class119.smethod_6(_intptr1); + IntPtr intPtr = Class119.smethod_6(_intptr1); int num3; lock (_stream10) { @@ -115,8 +115,7 @@ private void method_1() _stopwatch0.Reset(); _stopwatch0.Start(); } - int num4; - Class119.alGetSourcei(_intptr1, Enum11.Const5, out num4); + Class119.alGetSourcei(_intptr1, Enum11.Const5, out int num4); if (num4 <= 0) { break; @@ -155,7 +154,7 @@ public void SetStartingTime(TimeSpan timeSpan0) public void SetStartingTimeBasedOnSomeValue(int int4) { - var @enum = _enum10; + AudioStatus @enum = _enum10; if (@enum != AudioStatus.ShouldStopAudio) { StopPlaying(); @@ -204,10 +203,10 @@ public void DifferentStartPlaying() { Class119.smethod_6(_intptr1); } - var array = _intptr2; - for (var i = 0; i < array.Length; i++) + IntPtr[] array = _intptr2; + for (int i = 0; i < array.Length; i++) { - var intPtr = array[i]; + IntPtr intPtr = array[i]; int num; lock (_stream10) { @@ -284,8 +283,8 @@ public void method_2(bool bool2) private void method_3(object object0) { _bool1 = true; - var num = 0f; - var num2 = _float0; + float num = 0f; + float num2 = _float0; while (num < num2) { SetVolume(num); diff --git a/GHNamespaceK/Class119.cs b/GHNamespaceK/Class119.cs index 213b4f2..ea824c8 100644 --- a/GHNamespaceK/Class119.cs +++ b/GHNamespaceK/Class119.cs @@ -28,8 +28,7 @@ public static bool smethod_1() public static IntPtr smethod_2() { - IntPtr result; - alGenSources(1, out result); + alGenSources(1, out IntPtr result); return result; } @@ -52,8 +51,7 @@ public static void smethod_3(IntPtr intptr0) public static int smethod_4(IntPtr intptr0, Enum11 enum110) { - int result; - alGetSourcei(intptr0, enum110, out result); + alGetSourcei(intptr0, enum110, out int result); return result; } @@ -93,8 +91,7 @@ public static void smethod_5(IntPtr intptr0, ref IntPtr intptr1) public static IntPtr smethod_6(IntPtr intptr0) { - IntPtr result; - alSourceUnqueueBuffers_1(intptr0, 1, out result); + alSourceUnqueueBuffers_1(intptr0, 1, out IntPtr result); return result; } @@ -104,7 +101,7 @@ public static IntPtr[] smethod_7(IntPtr intptr0, int int0) { throw new ArgumentOutOfRangeException("numEntries", "Must be greater than zero."); } - var array = new IntPtr[int0]; + IntPtr[] array = new IntPtr[int0]; alSourceUnqueueBuffers(intptr0, int0, array); return array; } @@ -115,7 +112,7 @@ public static IntPtr[] smethod_7(IntPtr intptr0, int int0) public static IntPtr[] smethod_8(int int0) { - var array = new IntPtr[int0]; + IntPtr[] array = new IntPtr[int0]; alGenBuffers(array.Length, array); return array; } @@ -150,7 +147,7 @@ public static Enum12 smethod_10(WaveFormat waveFormat0) { case 1: { - var short_ = waveFormat0.short_2; + short short_ = waveFormat0.short_2; if (short_ == 8) { return Enum12.Const0; @@ -163,7 +160,7 @@ public static Enum12 smethod_10(WaveFormat waveFormat0) } case 2: { - var short2 = waveFormat0.short_2; + short short2 = waveFormat0.short_2; if (short2 == 8) { return Enum12.Const2; @@ -181,7 +178,7 @@ public static Enum12 smethod_10(WaveFormat waveFormat0) { case 4: { - var short3 = waveFormat0.short_2; + short short3 = waveFormat0.short_2; if (short3 == 8) { return Enum12.Const6; @@ -198,7 +195,7 @@ public static Enum12 smethod_10(WaveFormat waveFormat0) } case 5: { - var short4 = waveFormat0.short_2; + short short4 = waveFormat0.short_2; if (short4 == 8) { return Enum12.Const9; @@ -215,7 +212,7 @@ public static Enum12 smethod_10(WaveFormat waveFormat0) } case 6: { - var short5 = waveFormat0.short_2; + short short5 = waveFormat0.short_2; if (short5 == 8) { return Enum12.Const12; @@ -232,7 +229,7 @@ public static Enum12 smethod_10(WaveFormat waveFormat0) } case 7: { - var short6 = waveFormat0.short_2; + short short6 = waveFormat0.short_2; if (short6 == 8) { return Enum12.Const15; @@ -249,7 +246,7 @@ public static Enum12 smethod_10(WaveFormat waveFormat0) } case 8: { - var short7 = waveFormat0.short_2; + short short7 = waveFormat0.short_2; if (short7 == 8) { return Enum12.Const18; diff --git a/GHNamespaceK/Class120.cs b/GHNamespaceK/Class120.cs index f263061..5e083b0 100644 --- a/GHNamespaceK/Class120.cs +++ b/GHNamespaceK/Class120.cs @@ -70,7 +70,7 @@ private static void smethod_0() { _enum130 = Enum13.Const0; } - foreach (var arg650 in List0) + foreach (string arg650 in List0) { } } @@ -127,7 +127,7 @@ private void method_0(string string1, int int0, int int1, bool bool4, bool bool5 string.IsNullOrEmpty(string1) ? "default" : string1)); } method_1(); - var list = new List(); + List list = new List(); if (int0 != 0) { list.Add(4103); @@ -142,8 +142,7 @@ private void method_0(string string1, int int0, int int1, bool bool4, bool bool5 list.Add(bool4 ? 1 : 0); if (bool5 && OpenAl.alcIsExtensionPresent(_intptr0, "ALC_EXT_EFX")) { - int item; - OpenAl.alcGetIntegerv(_intptr0, Enum9.Const7, 1, out item); + OpenAl.alcGetIntegerv(_intptr0, Enum9.Const7, 1, out int item); list.Add(131075); list.Add(item); } @@ -161,17 +160,16 @@ private void method_0(string string1, int int0, int int1, bool bool4, bool bool5 } method_1(); _string0 = OpenAl.smethod_0(_intptr0, Enum7.Const5); - int num; - OpenAl.alcGetIntegerv(_intptr0, Enum9.Const2, 4, out num); + OpenAl.alcGetIntegerv(_intptr0, Enum9.Const2, 4, out int num); if (num > 0) { - var array = new int[num]; + int[] array = new int[num]; OpenAl.alcGetIntegerv(_intptr0, Enum9.Const3, array.Length * 4, out array[0]); - var array2 = array; - for (var i = 0; i < array2.Length; i++) + int[] array2 = array; + for (int i = 0; i < array2.Length; i++) { - var num2 = array2[i]; - var @enum = (Enum6) num2; + int num2 = array2[i]; + Enum6 @enum = (Enum6) num2; if (@enum == Enum6.Const2) { method_5(true); @@ -187,7 +185,7 @@ private void method_0(string string1, int int0, int int1, bool bool4, bool bool5 private void method_1() { - var alcError = OpenAl.alcGetError(_intptr0); + AlcError alcError = OpenAl.alcGetError(_intptr0); if (alcError != AlcError.NoError) { throw new Exception3(alcError.ToString()); @@ -265,8 +263,7 @@ public static Class120 smethod_2() } else { - Class120 @class; - Dictionary0.TryGetValue(OpenAl.alcGetCurrentContext(), out @class); + Dictionary0.TryGetValue(OpenAl.alcGetCurrentContext(), out Class120 @class); result = @class; } } diff --git a/GHNamespaceK/Class123.cs b/GHNamespaceK/Class123.cs index 892bd7b..d2c2fa8 100644 --- a/GHNamespaceK/Class123.cs +++ b/GHNamespaceK/Class123.cs @@ -30,12 +30,12 @@ public class Class123 : Class121 public Class123(Class144 class1440, int int8, bool bool1) : base(bool1) { - var num = 0; + int num = 0; _int0 = class1440.vmethod_10(32); num = 32; _int1 = class1440.vmethod_10(32); num = 64; - var array = new byte[_int1]; + byte[] array = new byte[_int1]; class1440.vmethod_15(array, _int1); num = 64 + _int1 * 8; _string0 = Encoding.UTF8.GetString(array); diff --git a/GHNamespaceK/Class125.cs b/GHNamespaceK/Class125.cs index ea977be..04ea49c 100644 --- a/GHNamespaceK/Class125.cs +++ b/GHNamespaceK/Class125.cs @@ -24,7 +24,7 @@ public Class125(Class144 class1440, int int1, bool bool2) : base(bool2) if (Int0 > 0) { Class1470 = new Class147[Int0]; - for (var i = 0; i < Int0; i++) + for (int i = 0; i < Int0; i++) { Class1470[i] = new Class147(class1440); } diff --git a/GHNamespaceK/Class130.cs b/GHNamespaceK/Class130.cs index 27e5728..37be859 100644 --- a/GHNamespaceK/Class130.cs +++ b/GHNamespaceK/Class130.cs @@ -4,10 +4,10 @@ public class Class130 { public static void smethod_0(int[] int0, int int1, int[] int2, int int3, int int4, int[] int5, int int6) { - for (var i = 0; i < int1; i++) + for (int i = 0; i < int1; i++) { - var num = 0; - for (var j = 0; j < int3; j++) + int num = 0; + for (int j = 0; j < int3; j++) { num += int2[j] * int5[int6 + i - j - 1]; } @@ -17,10 +17,10 @@ public static void smethod_0(int[] int0, int int1, int[] int2, int int3, int int public static void smethod_1(int[] int0, int int1, int[] int2, int int3, int int4, int[] int5, int int6) { - for (var i = 0; i < int1; i++) + for (int i = 0; i < int1; i++) { - var num = 0L; - for (var j = 0; j < int3; j++) + long num = 0L; + for (int j = 0; j < int3; j++) { num += int2[j] * (long) int5[int6 + i - j - 1]; } diff --git a/GHNamespaceK/Class138.cs b/GHNamespaceK/Class138.cs index 4f91096..3140ca1 100644 --- a/GHNamespaceK/Class138.cs +++ b/GHNamespaceK/Class138.cs @@ -11,18 +11,18 @@ public class Class138 : Class137 public virtual void vmethod_0(Class144 class1440, int int1, int int2, Class140 class1400, int[] int3) { - var num = 0; - var num2 = 1 << int2; - var num3 = (int2 > 0) ? (class1400.Int0 >> int2) : (class1400.Int0 - int1); + int num = 0; + int num2 = 1 << int2; + int num3 = (int2 > 0) ? (class1400.Int0 >> int2) : (class1400.Int0 - int1); Class1430.vmethod_0(Math.Max(6, int2)); Class1430.Int0 = new int[num2]; - for (var i = 0; i < num2; i++) + for (int i = 0; i < num2; i++) { - var num4 = class1440.vmethod_10(4); + int num4 = class1440.vmethod_10(4); Class1430.Int0[i] = num4; if (num4 < 15) { - var num5 = (int2 == 0 || i > 0) ? num3 : (num3 - int1); + int num5 = (int2 == 0 || i > 0) ? num3 : (num3 - int1); class1440.vmethod_17(int3, num, num5, num4); num += num5; } @@ -30,7 +30,7 @@ public virtual void vmethod_0(Class144 class1440, int int1, int int2, Class140 c { num4 = class1440.vmethod_10(5); Class1430.Int1[i] = num4; - var j = (int2 == 0 || i > 0) ? 0 : int1; + int j = (int2 == 0 || i > 0) ? 0 : int1; while (j < num3) { int3[num] = class1440.vmethod_12(num4); diff --git a/GHNamespaceK/OpenAL.cs b/GHNamespaceK/OpenAL.cs index 999c07c..d285666 100644 --- a/GHNamespaceK/OpenAL.cs +++ b/GHNamespaceK/OpenAL.cs @@ -56,13 +56,13 @@ public static string smethod_0(IntPtr intptr0, Enum7 enum70) public static IList smethod_1(IntPtr intptr0, Enum8 enum80) { - var list = new List(); - var ptr = alcGetString(IntPtr.Zero, (Enum7) enum80); - var stringBuilder = new StringBuilder(); - var ofs = 0; + List list = new List(); + IntPtr ptr = alcGetString(IntPtr.Zero, (Enum7) enum80); + StringBuilder stringBuilder = new StringBuilder(); + int ofs = 0; while (true) { - var b = Marshal.ReadByte(ptr, ofs++); + byte b = Marshal.ReadByte(ptr, ofs++); if (b != 0) { stringBuilder.Append((char) b); diff --git a/GHNamespaceK/WAVStream.cs b/GHNamespaceK/WAVStream.cs index cbd1a6c..4d292af 100644 --- a/GHNamespaceK/WAVStream.cs +++ b/GHNamespaceK/WAVStream.cs @@ -47,14 +47,14 @@ public WavStream(Stream stream1) private static string smethod_0(BinaryReader binaryReader0) { - var array = new byte[4]; + byte[] array = new byte[4]; binaryReader0.Read(array, 0, array.Length); return Encoding.UTF8.GetString(array); } private void method_0() { - var binaryReader = new BinaryReader(FileStream, Encoding.UTF8); + BinaryReader binaryReader = new BinaryReader(FileStream, Encoding.UTF8); if (smethod_0(binaryReader) != "RIFF") { throw new Exception("Invalid file format (No Tag RIFF)"); @@ -68,18 +68,20 @@ private void method_0() { throw new Exception("Invalid file format (No Tag fmt)"); } - var num = binaryReader.ReadInt32(); + int num = binaryReader.ReadInt32(); if (num < 16) { throw new Exception("Invalid file format (Size of fmt different of 16)"); } - WaveFormat0 = new WaveFormat(22050, 16, 2); - WaveFormat0.waveFormatTag_0 = (WaveFormatTag) binaryReader.ReadInt16(); - WaveFormat0.short_0 = binaryReader.ReadInt16(); - WaveFormat0.int_0 = binaryReader.ReadInt32(); - WaveFormat0.int_1 = binaryReader.ReadInt32(); - WaveFormat0.short_1 = binaryReader.ReadInt16(); - WaveFormat0.short_2 = binaryReader.ReadInt16(); + WaveFormat0 = new WaveFormat(22050, 16, 2) + { + waveFormatTag_0 = (WaveFormatTag)binaryReader.ReadInt16(), + short_0 = binaryReader.ReadInt16(), + int_0 = binaryReader.ReadInt32(), + int_1 = binaryReader.ReadInt32(), + short_1 = binaryReader.ReadInt16(), + short_2 = binaryReader.ReadInt16() + }; if (num > 16) { FileStream.Position += num - 16; diff --git a/GHNamespaceL/BlackMagic.cs b/GHNamespaceL/BlackMagic.cs index d51fdb5..767658c 100644 --- a/GHNamespaceL/BlackMagic.cs +++ b/GHNamespaceL/BlackMagic.cs @@ -4,30 +4,30 @@ public class BlackMagic { public static void CopyArrayOffset(int[] source, int sourceSize, int int2, int[] destination, int offset) { - //This is black magic. Not sure what it's used for yet + // This is black magic. Not sure what it's used for yet switch (int2) { case 0: - for (var i = 0; i < sourceSize; i++) + for (int i = 0; i < sourceSize; i++) { destination[i + offset] = source[i]; } return; case 1: - for (var j = 0; j < sourceSize; j++) + for (int j = 0; j < sourceSize; j++) { destination[j + offset] = source[j] + destination[j + offset - 1]; } return; case 2: - for (var k = 0; k < sourceSize; k++) + for (int k = 0; k < sourceSize; k++) { destination[k + offset] = source[k] + (destination[k + offset - 1] << 1) - destination[k + offset - 2]; } return; case 3: - for (var l = 0; l < sourceSize; l++) + for (int l = 0; l < sourceSize; l++) { destination[l + offset] = source[l] + @@ -36,7 +36,7 @@ public static void CopyArrayOffset(int[] source, int sourceSize, int int2, int[] } return; case 4: - for (var m = 0; m < sourceSize; m++) + for (int m = 0; m < sourceSize; m++) { destination[m + offset] = source[m] + (destination[m + offset - 1] + destination[m + offset - 3] << 2) - diff --git a/GHNamespaceL/Class127.cs b/GHNamespaceL/Class127.cs index 7b2d485..46390af 100644 --- a/GHNamespaceL/Class127.cs +++ b/GHNamespaceL/Class127.cs @@ -9,9 +9,9 @@ public class Class127 : Class121 public Class127(Class144 class1440, int int0, bool bool1) : base(bool1) { - var num = int0 / 18; + int num = int0 / 18; Class1420 = new Class142[num]; - for (var i = 0; i < Class1420.Length; i++) + for (int i = 0; i < Class1420.Length; i++) { Class1420[i] = new Class142(class1440); } @@ -29,9 +29,9 @@ public virtual int vmethod_1() public override string ToString() { - var stringBuilder = new StringBuilder(); + StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("SeekTable: points=" + Class1420.Length + "\n"); - for (var i = 0; i < Class1420.Length; i++) + for (int i = 0; i < Class1420.Length; i++) { stringBuilder.Append("\tPoint " + Class1420[i] + "\n"); } diff --git a/GHNamespaceL/Class129.cs b/GHNamespaceL/Class129.cs index 7a9ac30..b40f5d4 100644 --- a/GHNamespaceL/Class129.cs +++ b/GHNamespaceL/Class129.cs @@ -13,7 +13,7 @@ public class Class129 : Class121 public Class129(Class144 class1440, int int1, bool bool1) : base(bool1) { - var num = class1440.vmethod_14(); + int num = class1440.vmethod_14(); Byte0 = new byte[num]; class1440.vmethod_15(Byte0, Byte0.Length); Int0 = class1440.vmethod_14(); @@ -21,7 +21,7 @@ public Class129(Class144 class1440, int int1, bool bool1) : base(bool1) { Class1460 = new Class146[Int0]; } - for (var i = 0; i < Int0; i++) + for (int i = 0; i < Int0; i++) { Class1460[i] = new Class146(class1440); } @@ -29,9 +29,9 @@ public Class129(Class144 class1440, int int1, bool bool1) : base(bool1) public override string ToString() { - var stringBuilder = new StringBuilder("VendorString '" + Byte0 + "'\n"); + StringBuilder stringBuilder = new StringBuilder("VendorString '" + Byte0 + "'\n"); stringBuilder.Append("VorbisComment (count=" + Int0 + ")"); - for (var i = 0; i < Int0; i++) + for (int i = 0; i < Int0; i++) { stringBuilder.Append("\n\t" + Class1460[i]); } diff --git a/GHNamespaceL/Class132.cs b/GHNamespaceL/Class132.cs index 6d9ce1d..f5c7afb 100644 --- a/GHNamespaceL/Class132.cs +++ b/GHNamespaceL/Class132.cs @@ -10,7 +10,7 @@ public Class132(Class144 class1440, Class140 class1401, Class136 class1360, int int int3) : base(class1401, int3) { _int1 = class1440.vmethod_12(int2); - for (var i = 0; i < class1401.Int0; i++) + for (int i = 0; i < class1401.Int0; i++) { class1360.vmethod_0()[i] = _int1; } diff --git a/GHNamespaceL/Class133.cs b/GHNamespaceL/Class133.cs index e308679..e6b7c8c 100644 --- a/GHNamespaceL/Class133.cs +++ b/GHNamespaceL/Class133.cs @@ -11,7 +11,7 @@ public Class133(Class144 class1440, Class140 class1401, Class136 class1360, int int int3) : base(class1401, int3) { _int1 = class1360.vmethod_2(); - for (var i = 0; i < class1401.Int0; i++) + for (int i = 0; i < class1401.Int0; i++) { _int1[i] = class1440.vmethod_12(int2); } diff --git a/GHNamespaceL/Class140.cs b/GHNamespaceL/Class140.cs index 52510ab..922f876 100644 --- a/GHNamespaceL/Class140.cs +++ b/GHNamespaceL/Class140.cs @@ -22,18 +22,18 @@ public class Class140 public Class140(Class144 class1440, byte[] byte0, Class122 class1220) { - var num = 0; - var num2 = 0; - var @class = new Class152(16); - var flag = class1220 != null && class1220.vmethod_2() != class1220.vmethod_1(); - var flag2 = class1220 != null && class1220.vmethod_2() == class1220.vmethod_1(); + int num = 0; + int num2 = 0; + Class152 @class = new Class152(16); + bool flag = class1220 != null && class1220.vmethod_2() != class1220.vmethod_1(); + bool flag2 = class1220 != null && class1220.vmethod_2() == class1220.vmethod_1(); @class.vmethod_1(byte0[0]); @class.vmethod_1(byte0[1]); if ((@class.vmethod_3(1) & 3) != 0) { throw new BadHeaderException("Bad Magic Number: " + (@class.vmethod_3(1) & 255)); } - for (var i = 0; i < 2; i++) + for (int i = 0; i < 2; i++) { if (class1440.vmethod_11(8) == 255) { @@ -41,7 +41,7 @@ public Class140(Class144 class1440, byte[] byte0, Class122 class1220) } @class.vmethod_1((byte) class1440.vmethod_10(8)); } - var num3 = @class.vmethod_3(2) >> 4 & 15; + int num3 = @class.vmethod_3(2) >> 4 & 15; switch (num3) { case 0: @@ -75,7 +75,7 @@ public Class140(Class144 class1440, byte[] byte0, Class122 class1220) Int0 = 256 << num3 - 8; break; } - var num4 = @class.vmethod_3(2) & 15; + int num4 = @class.vmethod_3(2) & 15; switch (num4) { case 0: @@ -121,7 +121,7 @@ public Class140(Class144 class1440, byte[] byte0, Class122 class1220) case 15: throw new BadHeaderException("Bad Sample Rate (" + num4 + ")"); } - var num5 = @class.vmethod_3(3) >> 4 & 15; + int num5 = @class.vmethod_3(3) >> 4 & 15; if ((num5 & 8) != 0) { Int2 = 2; @@ -145,7 +145,7 @@ public Class140(Class144 class1440, byte[] byte0, Class122 class1220) Int2 = num5 + 1; Int3 = 0; } - var num6 = (@class.vmethod_3(3) & 14) >> 1; + int num6 = (@class.vmethod_3(3) & 14) >> 1; switch (num6) { case 0: @@ -197,11 +197,11 @@ public Class140(Class144 class1440, byte[] byte0, Class122 class1220) } if (num != 0) { - var num8 = class1440.vmethod_10(8); + int num8 = class1440.vmethod_10(8); @class.vmethod_1((byte) num8); if (num == 7) { - var num9 = class1440.vmethod_10(8); + int num9 = class1440.vmethod_10(8); @class.vmethod_1((byte) num9); num8 = (num8 << 8 | num9); } @@ -209,11 +209,11 @@ public Class140(Class144 class1440, byte[] byte0, Class122 class1220) } if (num2 != 0) { - var num10 = class1440.vmethod_10(8); + int num10 = class1440.vmethod_10(8); @class.vmethod_1((byte) num10); if (num2 != 12) { - var num11 = class1440.vmethod_10(8); + int num11 = class1440.vmethod_10(8); @class.vmethod_1((byte) num11); num10 = (num10 << 8 | num11); } @@ -230,7 +230,7 @@ public Class140(Class144 class1440, byte[] byte0, Class122 class1220) Int1 = num10 * 10; } } - var b = (byte) class1440.vmethod_10(8); + byte b = (byte) class1440.vmethod_10(8); if (Class149.smethod_0(@class.vmethod_2(), @class.vmethod_0()) != b) { throw new BadHeaderException("STREAM_DECODER_ERROR_STATUS_BAD_HEADER"); diff --git a/GHNamespaceL/Class141.cs b/GHNamespaceL/Class141.cs index e5cbb14..a5d6413 100644 --- a/GHNamespaceL/Class141.cs +++ b/GHNamespaceL/Class141.cs @@ -4,7 +4,7 @@ public class Class141 { public static int smethod_0(int int0) { - var num = 0; + int num = 0; while ((int0 >>= 1) != 0) { num++; diff --git a/GHNamespaceL/Class144.cs b/GHNamespaceL/Class144.cs index 507f224..5546b58 100644 --- a/GHNamespaceL/Class144.cs +++ b/GHNamespaceL/Class144.cs @@ -47,7 +47,7 @@ private int method_0() } _int0 -= _int1; _int1 = 0; - var num = _byte1.Length - _int0; + int num = _byte1.Length - _int0; num = _stream0.Read(_byte1, _int0, num); if (num <= 0) { @@ -82,14 +82,14 @@ public virtual void vmethod_5(int int5) { return; } - var num = _int2 & 7; + int num = _int2 & 7; if (num != 0) { - var num2 = Math.Min(8 - num, int5); + int num2 = Math.Min(8 - num, int5); vmethod_10(num2); int5 -= num2; } - var num3 = int5 / 8; + int num3 = int5 / 8; if (num3 > 0) { vmethod_15(null, num3); @@ -107,7 +107,7 @@ public virtual int vmethod_6() { method_0(); } - var result = (((int) _byte1[_int1] & 128 >> _int2) != 0) ? 1 : 0; + int result = (((int) _byte1[_int1] & 128 >> _int2) != 0) ? 1 : 0; _int2++; if (_int2 == 8) { @@ -181,8 +181,8 @@ public virtual long vmethod_9(long long0) public virtual int vmethod_10(int int5) { - var num = 0; - for (var i = 0; i < int5; i++) + int num = 0; + for (int i = 0; i < int5; i++) { num = vmethod_7(num); } @@ -191,8 +191,8 @@ public virtual int vmethod_10(int int5) public virtual int vmethod_11(int int5) { - var num = 0; - for (var i = 0; i < int5; i++) + int num = 0; + for (int i = 0; i < int5; i++) { num = vmethod_8(num, i); } @@ -205,12 +205,12 @@ public virtual int vmethod_12(int int5) { return 0; } - var num = 0; - for (var i = 0; i < int5; i++) + int num = 0; + for (int i = 0; i < int5; i++) { num = vmethod_7(num); } - var num2 = 32 - int5; + int num2 = 32 - int5; int num3; if (num2 != 0) { @@ -227,8 +227,8 @@ public virtual int vmethod_12(int int5) public virtual long vmethod_13(int int5) { - var num = 0L; - for (var i = 0; i < int5; i++) + long num = 0L; + for (int i = 0; i < int5; i++) { num = vmethod_9(num); } @@ -237,8 +237,8 @@ public virtual long vmethod_13(int int5) public virtual int vmethod_14() { - var num = vmethod_10(8); - var num2 = vmethod_10(8); + int num = vmethod_10(8); + int num2 = vmethod_10(8); num |= num2 << 8; num2 = vmethod_10(8); num |= num2 << 16; @@ -248,10 +248,10 @@ public virtual int vmethod_14() public virtual void vmethod_15(byte[] byte2, int int5) { - var num = int5; + int num = int5; while (int5 > 0) { - var num2 = Math.Min(int5, _int0 - _int1); + int num2 = Math.Min(int5, _int0 - _int1); if (num2 == 0) { method_0(); @@ -272,10 +272,10 @@ public virtual void vmethod_15(byte[] byte2, int int5) public virtual int vmethod_16() { - var num = 0; + int num = 0; while (true) { - var num2 = vmethod_6(); + int num2 = vmethod_6(); if (num2 != 0) { break; @@ -287,22 +287,22 @@ public virtual int vmethod_16() public virtual void vmethod_17(int[] int5, int int6, int int7, int int8) { - var i = 0; - var num = 0; - var num2 = 0; - var num3 = 0; - var num4 = 0; - var num5 = 0; + int i = 0; + int num = 0; + int num2 = 0; + int num3 = 0; + int num4 = 0; + int num5 = 0; if (int7 == 0) { return; } - var num6 = _int1; + int num6 = _int1; long num7 = _int1 * 8 + _int2; if (_int2 > 0) { byte b2; - var b = b2 = _byte1[num6]; + byte b = b2 = _byte1[num6]; num = _int2; b = (byte) (b << (byte) num); int num9; @@ -314,7 +314,7 @@ public virtual void vmethod_17(int[] int5, int int6, int int7, int int8) { goto IL_13D; } - var num8 = 0; + int num8 = 0; while ((b & Byte0) == 0) { b = (byte) (b << 1); @@ -405,7 +405,7 @@ public virtual void vmethod_17(int[] int5, int int6, int int7, int int8) while (num6 < _int0 && i < int7) { byte b2; - var b = b2 = _byte1[num6]; + byte b = b2 = _byte1[num6]; num = 0; int num10; while (true) @@ -416,7 +416,7 @@ public virtual void vmethod_17(int[] int5, int int6, int int7, int int8) { goto IL_2EA; } - var num8 = 0; + int num8 = 0; while ((b & Byte0) == 0) { b = (byte) (b << 1); @@ -522,7 +522,7 @@ public virtual void vmethod_17(int[] int5, int int6, int int7, int int8) public virtual int vmethod_18(Class152 class1520) { - var num = vmethod_10(8); + int num = vmethod_10(8); if (class1520 != null) { class1520.vmethod_1((byte) num); @@ -584,7 +584,7 @@ public virtual int vmethod_18(Class152 class1520) public virtual long vmethod_19(Class152 class1520) { - var num = vmethod_10(8); + int num = vmethod_10(8); if (class1520 != null) { class1520.vmethod_1((byte) num); diff --git a/GHNamespaceL/Class146.cs b/GHNamespaceL/Class146.cs index 44a7f60..f1cb2fb 100644 --- a/GHNamespaceL/Class146.cs +++ b/GHNamespaceL/Class146.cs @@ -9,7 +9,7 @@ public class Class146 public Class146(Class144 class1440) { - var num = class1440.vmethod_14(); + int num = class1440.vmethod_14(); if (num == 0) { return; diff --git a/GHNamespaceL/Class147.cs b/GHNamespaceL/Class147.cs index 04069f5..e221bdf 100644 --- a/GHNamespaceL/Class147.cs +++ b/GHNamespaceL/Class147.cs @@ -28,7 +28,7 @@ public Class147(Class144 class1440) if (Byte2 > 0) { Class1480 = new Class148[Byte2]; - for (var i = 0; i < (int) Byte2; i++) + for (int i = 0; i < (int) Byte2; i++) { Class1480[i] = new Class148(class1440); } diff --git a/GHNamespaceL/Class149.cs b/GHNamespaceL/Class149.cs index 79b014b..1ad7201 100644 --- a/GHNamespaceL/Class149.cs +++ b/GHNamespaceL/Class149.cs @@ -265,7 +265,7 @@ public class Class149 public static byte smethod_0(byte[] byte1, int int0) { byte b = 0; - for (var i = 0; i < int0; i++) + for (int i = 0; i < int0; i++) { b = Byte0[(b ^ byte1[i]) & 255]; } diff --git a/GHNamespaceL/Class150.cs b/GHNamespaceL/Class150.cs index 839740e..8b20775 100644 --- a/GHNamespaceL/Class150.cs +++ b/GHNamespaceL/Class150.cs @@ -2,7 +2,7 @@ namespace GHNamespaceL { public class Class150 { - //Appears to be a qb int array (like for a song) + // Appears to be a qb int array (like for a song) private static readonly short[] Short0 = { 0, diff --git a/GHNamespaceL/Class151.cs b/GHNamespaceL/Class151.cs index 7022cd3..166471d 100644 --- a/GHNamespaceL/Class151.cs +++ b/GHNamespaceL/Class151.cs @@ -33,9 +33,9 @@ public virtual void vmethod_1(short short1) public override string ToString() { - var stringBuilder = new StringBuilder(); + StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("Frame Header: " + Class1400 + "\n"); - for (var i = 0; i < Class1400.Int2; i++) + for (int i = 0; i < Class1400.Int2; i++) { stringBuilder.Append("\tFrame Data " + Class1310[i] + "\n"); } diff --git a/GHNamespaceL/FLACStream.cs b/GHNamespaceL/FLACStream.cs index 66e6a12..bf06c45 100644 --- a/GHNamespaceL/FLACStream.cs +++ b/GHNamespaceL/FLACStream.cs @@ -113,7 +113,7 @@ public FlacStream(Stream stream1) private Class121[] method_1() { method_2(); - var list = new List(10); + List list = new List(10); Class121 @class; do { @@ -124,11 +124,11 @@ private Class121[] method_1() private void method_2() { - var num = 0; - var i = 0; + int num = 0; + int i = 0; while (i < 4) { - var num2 = _class1440.vmethod_10(8); + int num2 = _class1440.vmethod_10(8); if (num2 == Class145.Byte0[i]) { i++; @@ -153,9 +153,9 @@ private void method_2() private Class121 method_3() { - var flag = _class1440.vmethod_10(1) != 0; - var num = _class1440.vmethod_10(7); - var num2 = _class1440.vmethod_10(24); + bool flag = _class1440.vmethod_10(1) != 0; + int num = _class1440.vmethod_10(7); + int num2 = _class1440.vmethod_10(24); Class121 result; if (num == 0) { @@ -199,10 +199,10 @@ private void method_4() _class1440.vmethod_12(8); _class1440.vmethod_12(8); _class1440.vmethod_12(8); - var num = 0; - for (var i = 0; i < 4; i++) + int num = 0; + for (int i = 0; i < 4; i++) { - var num2 = _class1440.vmethod_10(8); + int num2 = _class1440.vmethod_10(8); num <<= 7; num |= (num2 & 127); } @@ -250,11 +250,11 @@ private void method_6(int int12, int int13) { return; } - for (var i = 0; i < 8; i++) + for (int i = 0; i < 8; i++) { _class1360[i] = null; } - for (var j = 0; j < int13; j++) + for (int j = 0; j < int13; j++) { _class1360[j] = new Class136(int12); } @@ -264,7 +264,7 @@ private void method_6(int int12, int int13) private void method_7() { - var flag = true; + bool flag = true; if (_class1220 != null && _class1220.vmethod_3() != 0L && _long0 >= _class1220.vmethod_3()) { _bool0 = true; @@ -284,7 +284,7 @@ private void method_7() { while (true) { - var num = _class1440.vmethod_10(8); + int num = _class1440.vmethod_10(8); if (num == 255) { _byte1[0] = (byte) num; @@ -313,7 +313,7 @@ private void method_7() private void method_8() { - var num = Class150.smethod_0(_byte1[0], 0); + short num = Class150.smethod_0(_byte1[0], 0); num = Class150.smethod_0(_byte1[1], num); _class1440.vmethod_3(num); try @@ -326,9 +326,9 @@ private void method_8() throw new FrameDecodeException("Bad Frame Header: " + arg); } method_6(_class1510.Class1400.Int0, _class1510.Class1400.Int2); - for (var i = 0; i < _class1510.Class1400.Int2; i++) + for (int i = 0; i < _class1510.Class1400.Int2; i++) { - var num2 = _class1510.Class1400.Int4; + int num2 = _class1510.Class1400.Int4; switch (_class1510.Class1400.Int3) { case 1: @@ -368,29 +368,29 @@ private void method_8() switch (_class1510.Class1400.Int3) { case 1: - for (var j = 0; j < _class1510.Class1400.Int0; j++) + for (int j = 0; j < _class1510.Class1400.Int0; j++) { _class1360[1].vmethod_0()[j] = _class1360[0].vmethod_0()[j] - _class1360[1].vmethod_0()[j]; } break; case 2: - for (var j = 0; j < _class1510.Class1400.Int0; j++) + for (int j = 0; j < _class1510.Class1400.Int0; j++) { _class1360[0].vmethod_0()[j] += _class1360[1].vmethod_0()[j]; } break; case 3: - for (var j = 0; j < _class1510.Class1400.Int0; j++) + for (int j = 0; j < _class1510.Class1400.Int0; j++) { - var num3 = _class1360[0].vmethod_0()[j]; - var num4 = _class1360[1].vmethod_0()[j]; + int num3 = _class1360[0].vmethod_0()[j]; + int num4 = _class1360[1].vmethod_0()[j]; num3 <<= 1; if ((num4 & 1) != 0) { num3++; } - var num5 = num3 + num4; - var num6 = num3 - num4; + int num5 = num3 + num4; + int num6 = num3 - num4; _class1360[0].vmethod_0()[j] = num5 >> 1; _class1360[1].vmethod_0()[j] = num6 >> 1; } @@ -401,9 +401,9 @@ private void method_8() { Console.WriteLine("CRC Error: " + Convert.ToString(num & 65535, 16) + " vs " + Convert.ToString(_class1510.vmethod_0() & 65535, 16)); - for (var i = 0; i < _class1510.Class1400.Int2; i++) + for (int i = 0; i < _class1510.Class1400.Int2; i++) { - for (var k = 0; k < _class1510.Class1400.Int0; k++) + for (int k = 0; k < _class1510.Class1400.Int0; k++) { _class1360[i].vmethod_0()[k] = 0; } @@ -419,10 +419,10 @@ private void method_8() private void method_9(int int12, int int13) { - var num = _class1440.vmethod_10(8); - var flag = (num & 1) != 0; + int num = _class1440.vmethod_10(8); + bool flag = (num & 1) != 0; num &= 254; - var num2 = 0; + int num2 = 0; if (flag) { num2 = _class1440.vmethod_16() + 1; @@ -467,7 +467,7 @@ private void method_9(int int12, int int13) if (flag) { num = _class1510.Class1310[int12].vmethod_0(); - for (var i = 0; i < _class1510.Class1400.Int0; i++) + for (int i = 0; i < _class1510.Class1400.Int0; i++) { _class1360[int12].vmethod_0()[i] <<= num; } @@ -478,7 +478,7 @@ private void method_10() { if (!_class1440.vmethod_1()) { - var num = _class1440.vmethod_10(_class1440.vmethod_4()); + int num = _class1440.vmethod_10(_class1440.vmethod_4()); if (num != 0) { Console.WriteLine("ZeroPaddingError: " + Convert.ToString(num, 16)); @@ -499,13 +499,13 @@ public bool method_11(long long5) method_5(); return true; } - var num = _class1220.vmethod_3(); - var num2 = _class1220.vmethod_2(); - var num3 = _class1220.vmethod_1(); - var num4 = _class1220.vmethod_5(); - var num5 = _class1220.vmethod_4(); - var num6 = _class1510.Class1400.Int2; - var num7 = _class1510.Class1400.Int4; + long num = _class1220.vmethod_3(); + int num2 = _class1220.vmethod_2(); + int num3 = _class1220.vmethod_1(); + int num4 = _class1220.vmethod_5(); + int num5 = _class1220.vmethod_4(); + int num6 = _class1510.Class1400.Int2; + int num7 = _class1510.Class1400.Int4; if (num6 == 0) { num6 = _class1220.vmethod_8(); @@ -527,18 +527,18 @@ public bool method_11(long long5) { num8 = 4096 * num6 * num7 / 8 + 64; } - var num9 = _long3; - var num10 = 0L; - var num11 = _long4; - var num12 = (num > 0L) ? num : long5; + long num9 = _long3; + long num10 = 0L; + long num11 = _long4; + long num12 = (num > 0L) ? num : long5; if (_class1270 != null) { - var num13 = num9; - var num14 = num11; - var num15 = num10; - var num16 = num12; - var num17 = _class1270.vmethod_1(); - var num18 = num17 - 1; + long num13 = num9; + long num14 = num11; + long num15 = num10; + long num16 = num12; + int num17 = _class1270.vmethod_1(); + int num18 = num17 - 1; while (num18 >= 0 && (_class1270.Class1420[num18].Long0 <= -1L || _class1270.Class1420[num18].Int0 <= 0 || (num > 0L && _class1270.Class1420[num18].Long0 >= num) || @@ -576,10 +576,10 @@ public bool method_11(long long5) { num12 += 1L; } - var flag = true; + bool flag = true; while (num10 < num12 && num9 <= num11) { - var num19 = num9 + (long) ((long5 - num10) / (double) (num12 - num10) * (num11 - num9)) - num8; + long num19 = num9 + (long) ((long5 - num10) / (double) (num12 - num10) * (num11 - num9)) - num8; if (num19 >= num11) { num19 = num11 - 1L; @@ -588,7 +588,7 @@ public bool method_11(long long5) { FileStream.Position = num19; _class1440.vmethod_2(); - for (var i = 0; i < 10; i++) + for (int i = 0; i < 10; i++) { if (method_5() == null) { @@ -611,7 +611,7 @@ public bool method_11(long long5) { return false; } - var num20 = _class1510.Class1400.Long0; + long num20 = _class1510.Class1400.Long0; if (num20 <= long5 && num20 + _class1510.Class1400.Int0 > long5) { _long0 = num20 + _class1510.Class1400.Int0; @@ -692,8 +692,8 @@ public override int vmethod_3(IntPtr intptr0, int int12) { return 0; } - var array = new byte[int12]; - var num = Read(array, 0, int12); + byte[] array = new byte[int12]; + int num = Read(array, 0, int12); if (num == 0) { return 0; @@ -708,28 +708,28 @@ public override int Read(byte[] buffer, int offset, int count) { return 0; } - var num = offset; - var num2 = offset + count; + int num = offset; + int num2 = offset + count; int short_ = WaveFormat0.short_0; - var num3 = WaveFormat0.short_2 / 8; + int num3 = WaveFormat0.short_2 / 8; int short2 = WaveFormat0.short_1; do { - var num4 = _class1510.Class1400.Int0 - _int10; + int num4 = _class1510.Class1400.Int0 - _int10; if (num4 > 0) { if (num4 * short2 > num2 - num) { num4 = (num2 - num) / short2; } - for (var i = 0; i < short_; i++) + for (int i = 0; i < short_; i++) { - var array = method_0()[i].vmethod_0(); + int[] array = method_0()[i].vmethod_0(); if (WaveFormat0.short_2 == 8) { - var j = _int10; - var num5 = num + i; - var num6 = j + num4; + int j = _int10; + int num5 = num + i; + int num6 = j + num4; while (j < num6) { buffer[num5] = (byte) (array[j] + 128); @@ -739,9 +739,9 @@ public override int Read(byte[] buffer, int offset, int count) } else { - var k = _int10 << 2; - var num7 = num + num3 * i; - var num8 = k + (num4 << 2); + int k = _int10 << 2; + int num7 = num + num3 * i; + int num8 = k + (num4 << 2); while (k < num8) { Buffer.BlockCopy(array, k, buffer, num7, num3); @@ -768,30 +768,30 @@ public override int vmethod_4(float[] float0, int int12, int int13) { return 0; } - var num = int12; - var num2 = int12 + int13; + int num = int12; + int num2 = int12 + int13; int short_ = WaveFormat0.short_0; do { - var num3 = _class1510.Class1400.Int0 - _int10; + int num3 = _class1510.Class1400.Int0 - _int10; if (num3 > 0) { if (num3 > num2 - num) { num3 = num2 - num; } - for (var i = 0; i < short_; i++) + for (int i = 0; i < short_; i++) { - var array = method_0()[i].vmethod_0(); - var short2 = WaveFormat0.short_2; + int[] array = method_0()[i].vmethod_0(); + short short2 = WaveFormat0.short_2; if (short2 <= 16) { if (short2 != 8) { if (short2 == 16) { - var j = _int10; - var num4 = num + i; + int j = _int10; + int num4 = num + i; while (j < num3) { float0[num4] = Class11.smethod_7((short) array[j]); @@ -802,8 +802,8 @@ public override int vmethod_4(float[] float0, int int12, int int13) } else { - var k = _int10; - var num5 = num + i; + int k = _int10; + int num5 = num + i; while (k < num3) { float0[num5] = Class11.smethod_3((byte) array[k]); @@ -816,8 +816,8 @@ public override int vmethod_4(float[] float0, int int12, int int13) { if (short2 == 32) { - var l = _int10; - var num6 = num + i; + int l = _int10; + int num6 = num + i; while (l < num3) { float0[num6] = Class11.smethod_15(array[l]); @@ -828,8 +828,8 @@ public override int vmethod_4(float[] float0, int int12, int int13) } else { - var m = _int10; - var num7 = num + i; + int m = _int10; + int num7 = num + i; while (m < num3) { float0[num7] = Class11.smethod_11(Struct8.smethod_1(array[m])); @@ -856,34 +856,34 @@ public override float[][] vmethod_5(int int12) { return null; } - var array = new float[WaveFormat0.short_0][]; - for (var i = 0; i < array.Length; i++) + float[][] array = new float[WaveFormat0.short_0][]; + for (int i = 0; i < array.Length; i++) { array[i] = new float[int12]; } - var num = 0; + int num = 0; do { - var num2 = _class1510.Class1400.Int0 - _int10; + int num2 = _class1510.Class1400.Int0 - _int10; if (num2 > 0) { if (num2 > int12 - num) { num2 = int12 - num; } - for (var j = 0; j < array.Length; j++) + for (int j = 0; j < array.Length; j++) { - var array2 = array[j]; - var array3 = method_0()[j].vmethod_0(); - var short_ = WaveFormat0.short_2; + float[] array2 = array[j]; + int[] array3 = method_0()[j].vmethod_0(); + short short_ = WaveFormat0.short_2; if (short_ <= 16) { if (short_ != 8) { if (short_ == 16) { - var k = num; - var num3 = _int10; + int k = num; + int num3 = _int10; while (k < num2) { array2[k] = Class11.smethod_7((short) array3[num3]); @@ -894,8 +894,8 @@ public override float[][] vmethod_5(int int12) } else { - var l = num; - var num4 = _int10; + int l = num; + int num4 = _int10; while (l < num2) { array2[l] = Class11.smethod_3((byte) array3[num4]); @@ -908,8 +908,8 @@ public override float[][] vmethod_5(int int12) { if (short_ == 32) { - var m = num; - var num5 = _int10; + int m = num; + int num5 = _int10; while (m < num2) { array2[m] = Class11.smethod_15(array3[num5]); @@ -920,8 +920,8 @@ public override float[][] vmethod_5(int int12) } else { - var n = num; - var num6 = _int10; + int n = num; + int num6 = _int10; while (n < num2) { array2[n] = Class11.smethod_11(Struct8.smethod_1(array3[num6])); @@ -945,7 +945,7 @@ public override float[][] vmethod_5(int int12) } if (num < int12) { - for (var num7 = 0; num7 < array.Length; num7++) + for (int num7 = 0; num7 < array.Length; num7++) { Array.Resize(ref array[num7], num); } diff --git a/GHNamespaceM/AudioManager.cs b/GHNamespaceM/AudioManager.cs index de2aae2..282e204 100644 --- a/GHNamespaceM/AudioManager.cs +++ b/GHNamespaceM/AudioManager.cs @@ -36,8 +36,8 @@ public static IPlayableAudio LoadPlayableAudio(Enum25 enum250, GenericAudioStrea case Enum25.Const5: return new WaveOutput(audioStream); } - var flag = Type.GetType("Mono.Runtime") != null; - var platform = (int) Environment.OSVersion.Platform; + bool flag = Type.GetType("Mono.Runtime") != null; + int platform = (int) Environment.OSVersion.Platform; switch (platform) { case 0: @@ -76,7 +76,7 @@ public static IPlayableAudio LoadPlayableAudio(Enum25 enum250, GenericAudioStrea public static AudioTypeEnum smethod_1(string fileName) { - var fileInfo = new FileInfo(fileName); + FileInfo fileInfo = new FileInfo(fileName); string fileExtension; switch (fileExtension = fileInfo.Extension.ToLower()) { @@ -107,7 +107,7 @@ public static AudioTypeEnum smethod_1(string fileName) public static Class16 smethod_2(string string0) { Class16 result; - using (var stream = GetAudioStream(string0)) + using (GenericAudioStream stream = GetAudioStream(string0)) { result = stream.vmethod_1(); } @@ -116,7 +116,7 @@ public static Class16 smethod_2(string string0) public static Class16 smethod_3(Stream stream0) { - var position = stream0.Position; + long position = stream0.Position; Class16 result; try { @@ -131,7 +131,7 @@ public static Class16 smethod_3(Stream stream0) public static GenericAudioStream GetAudioStream(string fileName) { - var fileInfo = new FileInfo(fileName); + FileInfo fileInfo = new FileInfo(fileName); string fileExtension; if ((fileExtension = fileInfo.Extension.ToLower()) != null) { @@ -165,8 +165,8 @@ public static GenericAudioStream GetAudioStream(string fileName) public static GenericAudioStream smethod_5(Stream audioStream) { - var position = audioStream.Position; - var array = new byte[4]; + long position = audioStream.Position; + byte[] array = new byte[4]; audioStream.Read(array, 0, 4); audioStream.Position = position; if (array[0] == 255 && array[1] >= 240) @@ -219,7 +219,7 @@ public static GenericAudioStream smethod_5(Stream audioStream) public void method_0(bool bool0) { - foreach (var current in _list0) + foreach (IPlayableAudio current in _list0) { current.Dispose(); } diff --git a/GHNamespaceM/Class172.cs b/GHNamespaceM/Class172.cs index 982022b..3b43861 100644 --- a/GHNamespaceM/Class172.cs +++ b/GHNamespaceM/Class172.cs @@ -9,9 +9,9 @@ public abstract class Class172 : INterface5 public void imethod_0(Class13[] class130) { - for (var i = 0; i < class130.Length; i++) + for (int i = 0; i < class130.Length; i++) { - var class13 = class130[i]; + Class13 class13 = class130[i]; vmethod_0(class13); } } diff --git a/GHNamespaceM/Class175.cs b/GHNamespaceM/Class175.cs index 8eb2e85..0f3ccfa 100644 --- a/GHNamespaceM/Class175.cs +++ b/GHNamespaceM/Class175.cs @@ -16,7 +16,7 @@ public void imethod_0(Class13[] class130) vmethod_0(class130[0]); return; } - for (var i = 1; i < class130.Length; i++) + for (int i = 1; i < class130.Length; i++) { vmethod_1(class130[0], class130[i]); } diff --git a/GHNamespaceM/Class176.cs b/GHNamespaceM/Class176.cs index e031922..ca6329c 100644 --- a/GHNamespaceM/Class176.cs +++ b/GHNamespaceM/Class176.cs @@ -9,7 +9,7 @@ public abstract class Class176 : INterface5 public void imethod_0(Class13[] class130) { - for (var i = 0; i < class130.Length; i += 2) + for (int i = 0; i < class130.Length; i += 2) { vmethod_0(class130[i], class130[i + 1]); } diff --git a/GHNamespaceM/Class177.cs b/GHNamespaceM/Class177.cs index 22666cf..fd16942 100644 --- a/GHNamespaceM/Class177.cs +++ b/GHNamespaceM/Class177.cs @@ -9,7 +9,7 @@ public abstract class Class177 : INterface5 public void imethod_0(Class13[] class130) { - for (var i = 0; i < class130.Length; i += 3) + for (int i = 0; i < class130.Length; i += 3) { vmethod_0(class130[i], class130[i + 1], class130[i + 2]); } diff --git a/GHNamespaceM/Exception4.cs b/GHNamespaceM/Exception4.cs index ea8b421..78d0dd3 100644 --- a/GHNamespaceM/Exception4.cs +++ b/GHNamespaceM/Exception4.cs @@ -7,7 +7,7 @@ public class Exception4 : Exception { private readonly Enum18 _enum180; - private string _string0; + private readonly string _string0; public Exception4(Enum18 enum181, string string1) : base(smethod_0(enum181, string1)) { diff --git a/GHNamespaceM/FSBClass1.cs b/GHNamespaceM/FSBClass1.cs index 4966b15..433cfdd 100644 --- a/GHNamespaceM/FSBClass1.cs +++ b/GHNamespaceM/FSBClass1.cs @@ -55,8 +55,8 @@ private Enum23 method_0(int int0) public static FsbClass1 smethod_0(Stream stream1) { - var @class = new FsbClass1(); - var position = stream1.Position; + FsbClass1 @class = new FsbClass1(); + long position = stream1.Position; try { @class.method_1(stream1); @@ -64,7 +64,7 @@ public static FsbClass1 smethod_0(Stream stream1) catch { stream1.Position = position; - var stream = new FsbClass2(stream1); + FsbClass2 stream = new FsbClass2(stream1); @class = new FsbClass1(); @class.method_1(stream); @class.Byte0 = stream.Byte0; @@ -75,7 +75,7 @@ public static FsbClass1 smethod_0(Stream stream1) public static FsbClass1 smethod_1(Stream stream1, byte[] byte1) { - var @class = new FsbClass1(); + FsbClass1 @class = new FsbClass1(); @class.method_1(new FsbClass2(stream1, byte1)); @class.Byte0 = byte1; @class._stream0 = stream1; @@ -84,17 +84,14 @@ public static FsbClass1 smethod_1(Stream stream1, byte[] byte1) private void method_1(Stream stream1) { - var binaryReader = new BinaryReader(stream1); - int int_; - long long_; - uint num; - method_2(binaryReader, out int_, out long_, out num); + BinaryReader binaryReader = new BinaryReader(stream1); + method_2(binaryReader, out int int_, out long long_, out uint num); method_7(binaryReader, int_, long_); } private void method_2(BinaryReader inputBin, out int numSubFiles, out long dataOffset, out uint allDataSize) { - var @string = Encoding.UTF8.GetString(inputBin.ReadBytes(4)); + string @string = Encoding.UTF8.GetString(inputBin.ReadBytes(4)); string a; if ((a = @string) != null) { @@ -170,11 +167,11 @@ private void method_6(BinaryReader inputBin, out int numSubFiles, out uint subFi private void method_7(BinaryReader binaryReader0, int int0, long long0) { - var num = long0; - for (var i = 0; i < int0; i++) + long num = long0; + for (int i = 0; i < int0; i++) { Class168 @class = null; - var num2 = 0u; + uint num2 = 0u; switch (method_0(i)) { case Enum23.Const0: @@ -198,9 +195,11 @@ private void method_7(BinaryReader binaryReader0, int int0, long long0) private Class168 method_8(BinaryReader inputBin, out uint dataSize) { - var @class = new Class168(); - @class.FileName = method_14(inputBin.ReadBytes(32)); - @class.Uint0 = inputBin.ReadUInt32(); + Class168 @class = new Class168 + { + FileName = method_14(inputBin.ReadBytes(32)), + Uint0 = inputBin.ReadUInt32() + }; dataSize = inputBin.ReadUInt32(); @class.Int0 = inputBin.ReadInt32(); @class.Ushort1 = inputBin.ReadUInt16(); @@ -215,15 +214,14 @@ private Class168 method_8(BinaryReader inputBin, out uint dataSize) private Class168 method_9(BinaryReader inputBin, out uint dataSize) { - uint num; - var @class = method_10(inputBin, out dataSize, out num); + Class168 @class = method_10(inputBin, out dataSize, out uint num); method_11(inputBin, @class, num - 64u); return @class; } private Class168 method_10(BinaryReader inputBin, out uint dataSize, out uint hdrSize) { - var @class = new Class168(); + Class168 @class = new Class168(); hdrSize = inputBin.ReadUInt16(); @class.FileName = method_14(inputBin.ReadBytes(30)); @class.Uint0 = inputBin.ReadUInt32(); @@ -246,15 +244,14 @@ private void method_11(BinaryReader binaryReader0, Class168 class1680, uint uint private Class168 method_12(BinaryReader inputBin, out uint dataSize) { - uint num; - var @class = method_13(inputBin, out dataSize, out num); + Class168 @class = method_13(inputBin, out dataSize, out uint num); method_11(inputBin, @class, num - 80u); return @class; } private Class168 method_13(BinaryReader inputBin, out uint dataSize, out uint hdrSize) { - var @class = method_10(inputBin, out dataSize, out hdrSize); + Class168 @class = method_10(inputBin, out dataSize, out hdrSize); @class.Float2 = inputBin.ReadSingle(); @class.Float3 = inputBin.ReadSingle(); Console.WriteLine(inputBin.BaseStream.Position); @@ -267,8 +264,10 @@ private Class168 method_13(BinaryReader inputBin, out uint dataSize, out uint hd private static Class168 smethod_2(BinaryReader inputBin, out uint dataSize, Class168 firstFile) { - var @class = new Class168(); - @class.Uint0 = inputBin.ReadUInt32(); + Class168 @class = new Class168 + { + Uint0 = inputBin.ReadUInt32() + }; dataSize = inputBin.ReadUInt32(); Console.WriteLine(inputBin.BaseStream.Position); @class.FileName = firstFile.FileName; @@ -291,7 +290,7 @@ private static Class168 smethod_2(BinaryReader inputBin, out uint dataSize, Clas private string method_14(byte[] byte1) { - var num = Array.IndexOf(byte1, 0); + int num = Array.IndexOf(byte1, 0); if (num == -1) { num = byte1.Length; @@ -330,7 +329,7 @@ public void method_17(Stream stream1) { stream1 = new FsbClass2(stream1, Byte0); } - var binaryWriter = new BinaryWriter(stream1); + BinaryWriter binaryWriter = new BinaryWriter(stream1); method_18(binaryWriter); method_24(binaryWriter); method_32(binaryWriter); @@ -386,8 +385,8 @@ private void method_21(BinaryWriter binaryWriter0) private void method_22(BinaryWriter binaryWriter0) { method_21(binaryWriter0); - var buffer = new byte[8]; - var bytes = Encoding.UTF8.GetBytes("CreatedByFSBTool"); + byte[] buffer = new byte[8]; + byte[] bytes = Encoding.UTF8.GetBytes("CreatedByFSBTool"); binaryWriter0.Write(buffer); binaryWriter0.Write(bytes); } @@ -412,7 +411,7 @@ private int method_23() private void method_24(BinaryWriter binaryWriter0) { - for (var i = 0; i < method_33().Count; i++) + for (int i = 0; i < method_33().Count; i++) { switch (method_0(i)) { @@ -517,8 +516,8 @@ private static int smethod_7(Class168 class1680) private int method_30() { - var num = method_23(); - for (var i = 0; i < method_33().Count; i++) + int num = method_23(); + for (int i = 0; i < method_33().Count; i++) { switch (method_0(i)) { @@ -542,8 +541,8 @@ private int method_30() private int method_31() { - var num = 0; - for (var i = 0; i < method_33().Count; i++) + int num = 0; + for (int i = 0; i < method_33().Count; i++) { num += (int) method_33()[i].Stream1.Length; } @@ -556,7 +555,7 @@ private static byte[] smethod_8(string string0, int int0) { int0 = string0.Length + 1; } - var bytes = Encoding.UTF8.GetBytes(string0); + byte[] bytes = Encoding.UTF8.GetBytes(string0); Array.Resize(ref bytes, int0); return bytes; } @@ -578,7 +577,7 @@ private static uint smethod_9(FsbEnum1 enum201) private void method_32(BinaryWriter binaryWriter0) { - for (var i = 0; i < method_33().Count; i++) + for (int i = 0; i < method_33().Count; i++) { StreamHelper.CopyStream(binaryWriter0.BaseStream, method_33()[i].Stream1); } @@ -603,9 +602,9 @@ public FsbClass1() public override string ToString() { - var text = string.Concat("FsbFile:\nVersion = ", Enum200, "\nFlags = ", Enum210, "\nSubFiles.Count = ", + string text = string.Concat("FsbFile:\nVersion = ", Enum200, "\nFlags = ", Enum210, "\nSubFiles.Count = ", method_33().Count, "\n"); - foreach (var current in method_33()) + foreach (Class168 current in method_33()) { text += current; } @@ -633,7 +632,7 @@ public void method_35(bool bool0) { _stream0.Close(); } - foreach (var current in method_33()) + foreach (Class168 current in method_33()) { current.Dispose(); } diff --git a/GHNamespaceM/FSBClass2.cs b/GHNamespaceM/FSBClass2.cs index 6e89025..f035d01 100644 --- a/GHNamespaceM/FSBClass2.cs +++ b/GHNamespaceM/FSBClass2.cs @@ -290,16 +290,8 @@ public long method_0() public FsbClass2(Stream stream1, byte[] byte2) { - if (stream1 == null) - { - throw new ArgumentNullException("BaseStream", "Fsb Encryption"); - } - if (byte2 == null) - { - throw new ArgumentNullException("Key", "Fsb Encryption"); - } - Stream0 = stream1; - Byte0 = byte2; + Stream0 = stream1 ?? throw new ArgumentNullException("BaseStream", "Fsb Encryption"); + Byte0 = byte2 ?? throw new ArgumentNullException("Key", "Fsb Encryption"); } public FsbClass2(Stream stream1) : this(stream1, smethod_0(stream1)) @@ -308,14 +300,14 @@ public FsbClass2(Stream stream1) : this(stream1, smethod_0(stream1)) private static byte[] smethod_0(Stream stream1) { - var position = stream1.Position; - var array = new byte[65536]; - var num = stream1.Read(array, 0, array.Length); + long position = stream1.Position; + byte[] array = new byte[65536]; + int num = stream1.Read(array, 0, array.Length); Array.Resize(ref array, num); - var i = 2; + int i = 2; while (i < 50) { - var result = smethod_1(array, i); + byte[] result = smethod_1(array, i); stream1.Position = position; try { @@ -334,10 +326,10 @@ private static byte[] smethod_0(Stream stream1) if (num > 1000) { Array.Resize(ref array, 1000); - var j = 2; + int j = 2; while (j < 50) { - var result2 = smethod_1(array, j); + byte[] result2 = smethod_1(array, j); stream1.Position = position; try { @@ -357,10 +349,10 @@ private static byte[] smethod_0(Stream stream1) if (num > 500) { Array.Resize(ref array, 500); - var k = 2; + int k = 2; while (k < 50) { - var result3 = smethod_1(array, k); + byte[] result3 = smethod_1(array, k); stream1.Position = position; try { @@ -383,19 +375,19 @@ private static byte[] smethod_0(Stream stream1) private static byte[] smethod_1(byte[] byte2, int int0) { - var array = new byte[int0]; - var array2 = new uint[256]; - for (var i = 0; i < int0; i++) + byte[] array = new byte[int0]; + uint[] array2 = new uint[256]; + for (int i = 0; i < int0; i++) { Array.Clear(array2, 0, array2.Length); - var num = 0; + int num = 0; while (i + num < byte2.Length) { array2[byte2[i + num]] += 1u; num += int0; } - var num2 = 0; - for (var j = 0; j < array2.Length; j++) + int num2 = 0; + for (int j = 0; j < array2.Length; j++) { if (array2[j] >= array2[num2]) { @@ -409,8 +401,8 @@ private static byte[] smethod_1(byte[] byte2, int int0) public byte method_1(byte byte2, ref long long0) { - var arg_1A0 = byte2; - var arg190 = Byte0; + byte arg_1A0 = byte2; + byte[] arg190 = Byte0; long num; long0 = (num = long0) + 1L; byte2 = (byte) (arg_1A0 ^ arg190[(int) ((IntPtr) num)]); @@ -433,7 +425,7 @@ public byte method_3(byte byte2, ref long long0) public void method_4(byte[] byte2, int int0, int int1, long long0) { - for (var i = int0; i < int1; i++) + for (int i = int0; i < int1; i++) { byte2[i] = method_2(byte2[i], ref long0); } @@ -441,7 +433,7 @@ public void method_4(byte[] byte2, int int0, int int1, long long0) public void method_5(byte[] byte2, int int0, int int1, long long0) { - for (var i = int0; i < int1; i++) + for (int i = int0; i < int1; i++) { byte2[i] = method_3(byte2[i], ref long0); } @@ -449,15 +441,15 @@ public void method_5(byte[] byte2, int int0, int int1, long long0) public override int Read(byte[] buffer, int offset, int count) { - var long_ = method_0(); - var num = Stream0.Read(buffer, offset, count); + long long_ = method_0(); + int num = Stream0.Read(buffer, offset, count); method_5(buffer, offset, num, long_); return num; } public override int ReadByte() { - var num = method_0(); + long num = method_0(); return method_3(Byte0[(int) ((IntPtr) method_0())], ref num); } @@ -469,7 +461,7 @@ public override void Write(byte[] buffer, int offset, int count) public override void WriteByte(byte value) { - var num = method_0(); + long num = method_0(); Stream0.WriteByte(method_2(value, ref num)); } diff --git a/GHNamespaceM/FSBStream.cs b/GHNamespaceM/FSBStream.cs index 854e776..01eed23 100644 --- a/GHNamespaceM/FSBStream.cs +++ b/GHNamespaceM/FSBStream.cs @@ -47,8 +47,8 @@ public FsbStream(FsbClass1 class1670) break; default: { - var list = new List(); - foreach (var current in class1670.method_33()) + List list = new List(); + foreach (Class168 current in class1670.method_33()) { list.Add(smethod_0(current)); } @@ -61,10 +61,10 @@ public FsbStream(FsbClass1 class1670) private static GenericAudioStream smethod_0(Class168 class1680) { - var flag = (class1680.Enum220 & FsbFlags2.Flag19) != FsbFlags2.Flag0; - var stream = class1680.Stream1; - var position = stream.Position; - var array = new byte[4]; + bool flag = (class1680.Enum220 & FsbFlags2.Flag19) != FsbFlags2.Flag0; + Stream stream = class1680.Stream1; + long position = stream.Position; + byte[] array = new byte[4]; stream.Read(array, 0, 4); stream.Position = position; if (array[0] == 255 && array[1] >= 240) diff --git a/GHNamespaceM/Stream18.cs b/GHNamespaceM/Stream18.cs index a4d5b29..e1cfd73 100644 --- a/GHNamespaceM/Stream18.cs +++ b/GHNamespaceM/Stream18.cs @@ -75,7 +75,7 @@ public override int Read(byte[] buffer, int offset, int count) method_0().Seek(_long2, SeekOrigin.Begin); } count = (int) Math.Min(count, method_2()); - var num = method_0().Read(buffer, offset, count); + int num = method_0().Read(buffer, offset, count); _long2 += num; result = num; } diff --git a/GHNamespaceN/Class356.cs b/GHNamespaceN/Class356.cs index 16597bf..2e568a9 100644 --- a/GHNamespaceN/Class356.cs +++ b/GHNamespaceN/Class356.cs @@ -5,11 +5,11 @@ namespace GHNamespaceN { public class Class356 : INterface15 { - private DateTime _dateTime0 = DateTime.MinValue; + private readonly DateTime _dateTime0 = DateTime.MinValue; - private DateTime _dateTime1 = DateTime.MinValue; + private readonly DateTime _dateTime1 = DateTime.MinValue; - private Dictionary _dictionary0 = new Dictionary(); + private readonly Dictionary _dictionary0 = new Dictionary(); private readonly Dictionary _dictionary1 = new Dictionary(); @@ -20,7 +20,7 @@ public void imethod_0(string string0) public void imethod_1(string string0) { - var stackTrace = Environment.StackTrace; + string stackTrace = Environment.StackTrace; Console.WriteLine("WARNING: " + string0); Console.WriteLine(stackTrace); if (_dictionary1.ContainsKey(stackTrace)) @@ -30,7 +30,7 @@ public void imethod_1(string string0) while (true) { Console.Write("\tContinue? This can be dangerous, corrupt your files, etc! (y/n/y!): "); - var text = Console.ReadLine(); + string text = Console.ReadLine(); string a; if ((a = text.ToLower()) != null) { diff --git a/GHNamespaceN/Class357.cs b/GHNamespaceN/Class357.cs index d08b3da..ffe0332 100644 --- a/GHNamespaceN/Class357.cs +++ b/GHNamespaceN/Class357.cs @@ -12,11 +12,11 @@ public class Class357 : IDisposable, IEmptyInterface1 public void Dispose() { - foreach (var current in _list0) + foreach (IEmptyInterface1 current in _list0) { current.Dispose(); } - for (var i = 0; i < _class3520.Length; i++) + for (int i = 0; i < _class3520.Length; i++) { _class3520[i].Dispose(); } diff --git a/GHNamespaceN/Class361.cs b/GHNamespaceN/Class361.cs index 60c60b8..7087cf5 100644 --- a/GHNamespaceN/Class361.cs +++ b/GHNamespaceN/Class361.cs @@ -20,18 +20,18 @@ public string Format(string format, object arg, IFormatProvider formatProvider) { throw new ArgumentNullException(); } - var timeSpan = (TimeSpan) arg; + TimeSpan timeSpan = (TimeSpan) arg; return smethod_0(timeSpan, format); } private static string smethod_0(TimeSpan timeSpan0, string string0) { - var stringBuilder = new StringBuilder(64); - var length = string0.Length; - var i = 0; + StringBuilder stringBuilder = new StringBuilder(64); + int length = string0.Length; + int i = 0; while (i < length) { - var c = string0[i]; + char c = string0[i]; if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) { int j; @@ -55,7 +55,7 @@ private static string smethod_0(TimeSpan timeSpan0, string string0) } else { - var flag = false; + bool flag = false; while (!flag) { int j; @@ -130,8 +130,8 @@ private static bool smethod_1(StringBuilder stringBuilder0, char char0, int int0 private static void smethod_2(StringBuilder stringBuilder0, int int0, int int1) { - var num = 10; - for (var i = 0; i < int1 - 1; i++) + int num = 10; + for (int i = 0; i < int1 - 1; i++) { if (int0 < num) { diff --git a/GHNamespaceN/Control1.cs b/GHNamespaceN/Control1.cs index dc773d1..e8a430b 100644 --- a/GHNamespaceN/Control1.cs +++ b/GHNamespaceN/Control1.cs @@ -19,15 +19,15 @@ public enum Enum40 private EventHandler _eventHandler0; - private ScrollEventHandler _scrollEventHandler0; + private readonly ScrollEventHandler _scrollEventHandler0; private bool _bool0; - private Orientation _orientation0; + private readonly Orientation _orientation0; - private bool _bool1; + private readonly bool _bool1; - private bool _bool2; + private readonly bool _bool2; private readonly ToolTip _toolTip0 = new ToolTip(); @@ -51,13 +51,13 @@ public enum Enum40 private int _int1 = 15; - private GraphicsPath _graphicsPath0; + private readonly GraphicsPath _graphicsPath0; private SizeF _sizeF0 = new SizeF(50f, 50f); private readonly bool _bool5 = true; - private Image _image0; + private readonly Image _image0; private Color _color0 = Color.White; @@ -111,12 +111,12 @@ public enum Enum40 public void method_0(EventHandler eventHandler1) { - var eventHandler = _eventHandler0; + EventHandler eventHandler = _eventHandler0; EventHandler eventHandler2; do { eventHandler2 = eventHandler; - var value = (EventHandler) Delegate.Combine(eventHandler2, eventHandler1); + EventHandler value = (EventHandler) Delegate.Combine(eventHandler2, eventHandler1); eventHandler = Interlocked.CompareExchange(ref _eventHandler0, value, eventHandler2); } while (eventHandler != eventHandler2); } @@ -230,10 +230,7 @@ public void method_14(int int8) { _int2 = (_bool0 ? (method_17() - int8 + method_15()) : int8); } - if (_eventHandler0 != null) - { - _eventHandler0(this, new EventArgs()); - } + _eventHandler0?.Invoke(this, new EventArgs()); Invalidate(); } @@ -252,10 +249,7 @@ public void method_16(int int8) if (_int2 < _int3) { _int2 = _int3; - if (_eventHandler0 != null) - { - _eventHandler0(this, new EventArgs()); - } + _eventHandler0?.Invoke(this, new EventArgs()); } Invalidate(); } @@ -275,10 +269,7 @@ public void method_18(int int8) if (_int2 > _int4) { _int2 = _int4; - if (_eventHandler0 != null) - { - _eventHandler0(this, new EventArgs()); - } + _eventHandler0?.Invoke(this, new EventArgs()); } Invalidate(); } @@ -296,7 +287,7 @@ public void method_20(uint uint2) public void method_21(Enum40 enum401) { _enum400 = enum401; - var b = (byte) enum401; + byte b = (byte) enum401; _color0 = _color8[b, 0]; _color1 = _color8[b, 1]; _color2 = _color8[b, 2]; @@ -310,7 +301,7 @@ public void method_21(Enum40 enum401) public Control1(int int8, int int9, int int10) { - var array = new Color[4, 8]; + Color[,] array = new Color[4, 8]; array[0, 0] = Color.White; array[0, 1] = Color.Gainsboro; array[0, 2] = Color.Silver; @@ -364,7 +355,7 @@ protected override void OnPaint(PaintEventArgs e) { if (!Enabled) { - var array = smethod_1(new[] + Color[] array = smethod_1(new[] { _color0, _color1, @@ -380,7 +371,7 @@ protected override void OnPaint(PaintEventArgs e) } if (_bool4 && _bool6) { - var array2 = smethod_2(new[] + Color[] array2 = smethod_2(new[] { _color0, _color1, @@ -405,12 +396,12 @@ private void method_22(PaintEventArgs paintEventArgs0, Color color9, Color color { if (_orientation0 == Orientation.Horizontal) { - var x = (_int2 - _int3) * (ClientRectangle.Width - _int1) / (float) (_int4 - _int3); + float x = (_int2 - _int3) * (ClientRectangle.Width - _int1) / (float) (_int4 - _int3); _rectangleF0 = new RectangleF(x, 1f, _int1 - 1, ClientRectangle.Height - 2); } else { - var y = (_int2 - _int3) * (ClientRectangle.Height - _int1) / (float) (_int4 - _int3); + float y = (_int2 - _int3) * (ClientRectangle.Height - _int1) / (float) (_int4 - _int3); _rectangleF0 = new RectangleF(1f, y, ClientRectangle.Width - 2, _int1 - 1); } _rectangleF1 = ClientRectangle; @@ -458,7 +449,7 @@ private void method_22(PaintEventArgs paintEventArgs0, Color color9, Color color } else if (_string0.Length > 0 && _bool6) { - var text = _bool3 + string text = _bool3 ? smethod_4(TimeSpan.FromSeconds(_int7), _string0) : string.Format(_string0, _int7); if (_orientation0 == Orientation.Horizontal) @@ -488,28 +479,28 @@ private void method_22(PaintEventArgs paintEventArgs0, Color color9, Color color else { graphicsPath = _graphicsPath0; - var matrix = new Matrix(); + Matrix matrix = new Matrix(); matrix.Translate(_rectangleF0.Left - graphicsPath.GetBounds().Left, _rectangleF0.Top - graphicsPath.GetBounds().Top); graphicsPath.Transform(matrix); } paintEventArgs0.Graphics.SmoothingMode = SmoothingMode.AntiAlias; - using (var graphicsPath2 = smethod_0(_rectangleF1, sizeF)) + using (GraphicsPath graphicsPath2 = smethod_0(_rectangleF1, sizeF)) { - using (var linearGradientBrush = + using (LinearGradientBrush linearGradientBrush = new LinearGradientBrush(_rectangleF2, color12, color13, linearGradientMode)) { linearGradientBrush.WrapMode = WrapMode.TileFlipXY; paintEventArgs0.Graphics.FillPath(linearGradientBrush, graphicsPath2); - using (var graphicsPath3 = smethod_0(_rectangleF4, sizeF)) + using (GraphicsPath graphicsPath3 = smethod_0(_rectangleF4, sizeF)) { - using (var linearGradientBrush2 = + using (LinearGradientBrush linearGradientBrush2 = new LinearGradientBrush(_rectangleF2, color15, color16, linearGradientMode)) { linearGradientBrush2.WrapMode = WrapMode.TileFlipXY; if (Capture && _bool5) { - var region = new Region(graphicsPath3); + Region region = new Region(graphicsPath3); region.Exclude(graphicsPath); paintEventArgs0.Graphics.FillRegion(linearGradientBrush2, region); } @@ -519,30 +510,30 @@ private void method_22(PaintEventArgs paintEventArgs0, Color color9, Color color } } } - using (var pen = new Pen(color14, 0.5f)) + using (Pen pen = new Pen(color14, 0.5f)) { paintEventArgs0.Graphics.DrawPath(pen, graphicsPath2); } } } - var color = color9; - var color2 = color10; + Color color = color9; + Color color2 = color10; if (Capture && _bool5) { color = Color.FromArgb(175, color9); color2 = Color.FromArgb(175, color10); } - using (var linearGradientBrush3 = + using (LinearGradientBrush linearGradientBrush3 = new LinearGradientBrush(_rectangleF3, color, color2, linearGradientMode)) { linearGradientBrush3.WrapMode = WrapMode.TileFlipXY; paintEventArgs0.Graphics.SmoothingMode = SmoothingMode.AntiAlias; - var color3 = color11; + Color color3 = color11; if (_bool4 && (Capture || _bool7)) { color3 = ControlPaint.Dark(color3); } - using (var pen2 = new Pen(color3)) + using (Pen pen2 = new Pen(color3)) { if (_image0 != null) { @@ -557,14 +548,14 @@ private void method_22(PaintEventArgs paintEventArgs0, Color color9, Color color } if (Focused & _bool1) { - using (var pen3 = new Pen(Color.FromArgb(200, color14))) + using (Pen pen3 = new Pen(Color.FromArgb(200, color14))) { pen3.DashStyle = DashStyle.Dot; RectangleF rectangleF = ClientRectangle; rectangleF.Width -= 2f; rectangleF.Height -= 1f; rectangleF.X += 1f; - using (var graphicsPath4 = smethod_0(rectangleF, sizeF)) + using (GraphicsPath graphicsPath4 = smethod_0(rectangleF, sizeF)) { paintEventArgs0.Graphics.DrawPath(pen3, graphicsPath4); } @@ -604,14 +595,8 @@ protected override void OnMouseDown(MouseEventArgs e) if (e.Button == MouseButtons.Left) { Capture = true; - if (_scrollEventHandler0 != null) - { - _scrollEventHandler0(this, new ScrollEventArgs(ScrollEventType.ThumbTrack, _int2)); - } - if (_eventHandler0 != null) - { - _eventHandler0(this, new EventArgs()); - } + _scrollEventHandler0?.Invoke(this, new ScrollEventArgs(ScrollEventType.ThumbTrack, _int2)); + _eventHandler0?.Invoke(this, new EventArgs()); OnMouseMove(e); } } @@ -622,17 +607,17 @@ protected override void OnMouseMove(MouseEventArgs e) _int5 = e.X; _int6 = e.Y; _bool7 = smethod_3(e.Location, _rectangleF0); - var location = e.Location; - var num = (_orientation0 == Orientation.Horizontal) ? location.X : location.Y; - var num2 = _int1 >> 1; + Point location = e.Location; + int num = (_orientation0 == Orientation.Horizontal) ? location.X : location.Y; + int num2 = _int1 >> 1; num -= num2; - var num3 = (_int4 - _int3) / (float) (((_orientation0 == Orientation.Horizontal) + float num3 = (_int4 - _int3) / (float) (((_orientation0 == Orientation.Horizontal) ? ClientSize.Width : ClientSize.Height) - 2 * num2); _int7 = (int) (num * num3 + _int3); if (Capture & e.Button == MouseButtons.Left) { - var type = ScrollEventType.ThumbPosition; + ScrollEventType type = ScrollEventType.ThumbPosition; _int2 = _int7; if (_int2 <= _int3) { @@ -644,14 +629,8 @@ protected override void OnMouseMove(MouseEventArgs e) _int2 = _int4; type = ScrollEventType.Last; } - if (_scrollEventHandler0 != null) - { - _scrollEventHandler0(this, new ScrollEventArgs(type, _int2)); - } - if (_eventHandler0 != null) - { - _eventHandler0(this, new EventArgs()); - } + _scrollEventHandler0?.Invoke(this, new ScrollEventArgs(type, _int2)); + _eventHandler0?.Invoke(this, new EventArgs()); } if (_int7 < _int3) { @@ -673,14 +652,8 @@ protected override void OnMouseUp(MouseEventArgs e) base.OnMouseUp(e); Capture = false; _bool7 = smethod_3(e.Location, _rectangleF0); - if (_scrollEventHandler0 != null) - { - _scrollEventHandler0(this, new ScrollEventArgs(ScrollEventType.EndScroll, _int2)); - } - if (_eventHandler0 != null) - { - _eventHandler0(this, new EventArgs()); - } + _scrollEventHandler0?.Invoke(this, new ScrollEventArgs(ScrollEventType.EndScroll, _int2)); + _eventHandler0?.Invoke(this, new EventArgs()); Invalidate(); } @@ -689,12 +662,9 @@ protected override void OnMouseWheel(MouseEventArgs e) if (_bool2) { base.OnMouseWheel(e); - var num = e.Delta / SystemInformation.MouseWheelScrollDelta * (_int4 - _int3) / _int0; + int num = e.Delta / SystemInformation.MouseWheelScrollDelta * (_int4 - _int3) / _int0; method_23(method_13() + num); - if (_scrollEventHandler0 != null) - { - _scrollEventHandler0(this, new ScrollEventArgs(ScrollEventType.EndScroll, _int2)); - } + _scrollEventHandler0?.Invoke(this, new ScrollEventArgs(ScrollEventType.EndScroll, _int2)); } } @@ -717,17 +687,11 @@ protected override void OnKeyUp(KeyEventArgs e) { case Keys.Prior: method_23(method_13() + (int) _uint1); - if (_scrollEventHandler0 != null) - { - _scrollEventHandler0(this, new ScrollEventArgs(ScrollEventType.LargeIncrement, method_13())); - } + _scrollEventHandler0?.Invoke(this, new ScrollEventArgs(ScrollEventType.LargeIncrement, method_13())); break; case Keys.Next: method_23(method_13() - (int) _uint1); - if (_scrollEventHandler0 != null) - { - _scrollEventHandler0(this, new ScrollEventArgs(ScrollEventType.LargeDecrement, method_13())); - } + _scrollEventHandler0?.Invoke(this, new ScrollEventArgs(ScrollEventType.LargeDecrement, method_13())); break; case Keys.End: method_14(_int4); @@ -738,18 +702,12 @@ protected override void OnKeyUp(KeyEventArgs e) case Keys.Left: case Keys.Down: method_23(method_13() - (int) _uint0); - if (_scrollEventHandler0 != null) - { - _scrollEventHandler0(this, new ScrollEventArgs(ScrollEventType.SmallDecrement, method_13())); - } + _scrollEventHandler0?.Invoke(this, new ScrollEventArgs(ScrollEventType.SmallDecrement, method_13())); break; case Keys.Up: case Keys.Right: method_23(method_13() + (int) _uint0); - if (_scrollEventHandler0 != null) - { - _scrollEventHandler0(this, new ScrollEventArgs(ScrollEventType.SmallIncrement, method_13())); - } + _scrollEventHandler0?.Invoke(this, new ScrollEventArgs(ScrollEventType.SmallIncrement, method_13())); break; } if (_scrollEventHandler0 != null && method_13() == _int3) @@ -760,7 +718,7 @@ protected override void OnKeyUp(KeyEventArgs e) { _scrollEventHandler0(this, new ScrollEventArgs(ScrollEventType.Last, method_13())); } - var point = PointToClient(Cursor.Position); + Point point = PointToClient(Cursor.Position); OnMouseMove(new MouseEventArgs(MouseButtons.None, 0, point.X, point.Y, 0)); } @@ -776,7 +734,7 @@ protected override bool ProcessDialogKey(Keys keyData) public static GraphicsPath smethod_0(RectangleF rectangleF5, SizeF sizeF1) { - var graphicsPath = new GraphicsPath(); + GraphicsPath graphicsPath = new GraphicsPath(); graphicsPath.AddLine(rectangleF5.Left + sizeF1.Width / 2f, rectangleF5.Top, rectangleF5.Right - sizeF1.Width / 2f, rectangleF5.Top); graphicsPath.AddArc(rectangleF5.Right - sizeF1.Width, rectangleF5.Top, sizeF1.Width, sizeF1.Height, 270f, @@ -797,10 +755,10 @@ public static GraphicsPath smethod_0(RectangleF rectangleF5, SizeF sizeF1) public static Color[] smethod_1(Color[] color9) { - var array = new Color[color9.Length]; - for (var i = 0; i < color9.Length; i++) + Color[] array = new Color[color9.Length]; + for (int i = 0; i < color9.Length; i++) { - var num = (int) (color9[i].R * 0.3 + color9[i].G * 0.6 + color9[i].B * 0.1); + int num = (int) (color9[i].R * 0.3 + color9[i].G * 0.6 + color9[i].B * 0.1); array[i] = Color.FromArgb(-65793 * (255 - num) - 1); } return array; @@ -808,8 +766,8 @@ public static Color[] smethod_1(Color[] color9) public static Color[] smethod_2(Color[] color9) { - var array = new Color[color9.Length]; - for (var i = 0; i < color9.Length; i++) + Color[] array = new Color[color9.Length]; + for (int i = 0; i < color9.Length; i++) { array[i] = ((color9[i] == Color.FromKnownColor(KnownColor.Transparent)) ? color9[i] diff --git a/GHNamespaceN/LameEncoder.cs b/GHNamespaceN/LameEncoder.cs index 3061d48..28e9878 100644 --- a/GHNamespaceN/LameEncoder.cs +++ b/GHNamespaceN/LameEncoder.cs @@ -15,11 +15,11 @@ public static extern uint beEncodeChunk(uint hbeStream, uint nSamples, IntPtr pS public static uint smethod_0(uint uint0, byte[] byte0, int int0, uint uint1, byte[] byte1, ref uint uint2) { - var gCHandle = GCHandle.Alloc(byte0, GCHandleType.Pinned); + GCHandle gCHandle = GCHandle.Alloc(byte0, GCHandleType.Pinned); uint result; try { - var pSamples = (IntPtr) (gCHandle.AddrOfPinnedObject().ToInt32() + int0); + IntPtr pSamples = (IntPtr) (gCHandle.AddrOfPinnedObject().ToInt32() + int0); result = beEncodeChunk(uint0, uint1 / 2u, pSamples, byte1, ref uint2); } finally diff --git a/GHNamespaceN/MIDIReader.cs b/GHNamespaceN/MIDIReader.cs index 5b03918..bd55673 100644 --- a/GHNamespaceN/MIDIReader.cs +++ b/GHNamespaceN/MIDIReader.cs @@ -15,7 +15,7 @@ public class MidiReader public static MidiReader smethod_0(string fileLocation) { MidiReader result; - using (var fileStream = new FileStream(fileLocation, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) + using (FileStream fileStream = new FileStream(fileLocation, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { result = new MidiReader(fileStream); } @@ -48,29 +48,29 @@ public List GetMidiLineList() private void method_3(Stream midiStream) { - var midiFile = new BinaryReader(midiStream); + BinaryReader midiFile = new BinaryReader(midiStream); ByteFiddler.smethod_3("MIDI", midiFile, "MThd"); ByteFiddler.RotateLeft(midiFile.ReadUInt32()); ByteFiddler.RotateRight(midiFile.ReadUInt16()); int num = ByteFiddler.RotateRight(midiFile.ReadUInt16()); method_1(ByteFiddler.RotateRight(midiFile.ReadUInt16())); MidiLineList.Clear(); - for (var i = 0; i < num; i++) + for (int i = 0; i < num; i++) { - var midiLine = new MidiLine(method_0()); + MidiLine midiLine = new MidiLine(method_0()); MidiLineList.Add(midiLine); - var list = new List(); + List list = new List(); ByteFiddler.smethod_3("MIDI", midiFile, "MTrk"); - var num2 = ByteFiddler.RotateLeft(midiFile.ReadUInt32()); - var position = midiFile.BaseStream.Position; - var num3 = 0; + uint num2 = ByteFiddler.RotateLeft(midiFile.ReadUInt32()); + long position = midiFile.BaseStream.Position; + int num3 = 0; byte b = 0; while (midiFile.BaseStream.Position < position + num2) { - var num4 = (int) method_4(midiFile); + int num4 = (int) method_4(midiFile); AbstractNoteClass midiNote = null; num3 += num4; - var b2 = midiFile.ReadByte(); + byte b2 = midiFile.ReadByte(); if (b2 != 255) { byte int_; @@ -84,7 +84,7 @@ private void method_3(Stream midiStream) int_ = b2; b2 = b; } - var b3 = (byte) (b2 >> 4); + byte b3 = (byte) (b2 >> 4); switch (b3) { case 8: @@ -101,10 +101,10 @@ private void method_3(Stream midiStream) throw new NotImplementedException(string.Format("Unhandled MIDI command: {0} at position {1}", b3.ToString("X"), midiFile.BaseStream.Position)); } - var b4 = midiFile.ReadByte(); - var num5 = method_4(midiFile); - var array = midiFile.ReadBytes((int) num5); - var b5 = b4; + byte b4 = midiFile.ReadByte(); + long num5 = method_4(midiFile); + byte[] array = midiFile.ReadBytes((int) num5); + byte b5 = b4; if (b5 <= 47) { switch (b5) @@ -116,7 +116,7 @@ private void method_3(Stream midiStream) break; case 3: { - var text = Encoding.ASCII.GetString(array).ToUpper(); + string text = Encoding.ASCII.GetString(array).ToUpper(); if (!string.IsNullOrEmpty(text)) { midiLine.method_3(text); @@ -151,7 +151,7 @@ private void method_3(Stream midiStream) string.Format("Expected tempo event to have data length of 3, but found instead {0}", num5)); } - var num6 = array[0] << 16; + int num6 = array[0] << 16; num6 |= array[1] << 8; num6 |= array[2]; midiNote = new BpmNote1(num3, num6); @@ -170,7 +170,7 @@ private void method_3(Stream midiStream) private long method_4(BinaryReader binaryReader0) { - var num = 0L; + long num = 0L; byte b; do { diff --git a/GHNamespaceN/QBCParser.cs b/GHNamespaceN/QBCParser.cs index 47c6364..21b82b2 100644 --- a/GHNamespaceN/QBCParser.cs +++ b/GHNamespaceN/QBCParser.cs @@ -60,8 +60,8 @@ public QbcParser(Gh3Song gh3Song1) : this() public QbcParser(string fileName) { - var list = new List(); - var streamReader = File.OpenText(fileName); + List list = new List(); + StreamReader streamReader = File.OpenText(fileName); string text = null; string currentLine; while ((currentLine = streamReader.ReadLine()) != null) @@ -121,27 +121,26 @@ public QbcParser(string fileName) } }; } - int num; - if (Class369.Dictionary0.TryGetValue(key, out num)) + if (Class369.Dictionary0.TryGetValue(key, out int num)) { switch (num) { case 0: Gh3Song0.Editable = true; - using (var enumerator = list.GetEnumerator()) + using (List.Enumerator enumerator = list.GetEnumerator()) { while (enumerator.MoveNext()) { - var current = enumerator.Current; - var array = current.Split(new[] + string current = enumerator.Current; + string[] array = current.Split(new[] { '\t', '=' }, StringSplitOptions.RemoveEmptyEntries); if (array.Length > 1) { - var text3 = array[0].Trim().ToLower(); - var text4 = array[1].Trim().Replace("\"", ""); + string text3 = array[0].Trim().ToLower(); + string text4 = array[1].Trim().Replace("\"", ""); string key2; switch (key2 = text3) { @@ -213,12 +212,12 @@ public QbcParser(string fileName) case 2: goto IL_5AE; case 3: - using (var enumerator2 = list.GetEnumerator()) + using (List.Enumerator enumerator2 = list.GetEnumerator()) { while (enumerator2.MoveNext()) { - var current2 = enumerator2.Current; - var array2 = current2.Split(new[] + string current2 = enumerator2.Current; + string[] array2 = current2.Split(new[] { ' ', '\t', @@ -243,12 +242,12 @@ public QbcParser(string fileName) default: goto IL_8AA; } - using (var enumerator3 = list.GetEnumerator()) + using (List.Enumerator enumerator3 = list.GetEnumerator()) { while (enumerator3.MoveNext()) { - var current3 = enumerator3.Current; - var array3 = current3.Split(new[] + string current3 = enumerator3.Current; + string[] array3 = current3.Split(new[] { ' ', '\t', @@ -262,21 +261,21 @@ public QbcParser(string fileName) } goto IL_A3C; } - IL_5AE: + IL_5AE: FretbarList = new Fretbar(); - foreach (var current4 in list) + foreach (string current4 in list) { FretbarList.method_1(Convert.ToInt32(current4.Trim(' ', '\t', '='))); } Int0 = (FretbarList[1] - FretbarList[0]) / 4; goto IL_A3C; - IL_514: - using (var enumerator5 = list.GetEnumerator()) + IL_514: + using (List.Enumerator enumerator5 = list.GetEnumerator()) { while (enumerator5.MoveNext()) { - var current5 = enumerator5.Current; - var array4 = current5.Split(new[] + string current5 = enumerator5.Current; + string[] array4 = current5.Split(new[] { ' ', '\t', @@ -294,13 +293,13 @@ public QbcParser(string fileName) } goto IL_A3C; } - IL_72D: - using (var enumerator6 = list.GetEnumerator()) + IL_72D: + using (List.Enumerator enumerator6 = list.GetEnumerator()) { while (enumerator6.MoveNext()) { - var current6 = enumerator6.Current; - var array5 = current6.Split(new[] + string current6 = enumerator6.Current; + string[] array5 = current6.Split(new[] { ' ', '\t', @@ -314,13 +313,13 @@ public QbcParser(string fileName) } goto IL_A3C; } - IL_7AC: - using (var enumerator7 = list.GetEnumerator()) + IL_7AC: + using (List.Enumerator enumerator7 = list.GetEnumerator()) { while (enumerator7.MoveNext()) { - var current7 = enumerator7.Current; - var array6 = current7.Split(new[] + string current7 = enumerator7.Current; + string[] array6 = current7.Split(new[] { ' ', '\t', @@ -334,13 +333,13 @@ public QbcParser(string fileName) } goto IL_A3C; } - IL_82B: - using (var enumerator8 = list.GetEnumerator()) + IL_82B: + using (List.Enumerator enumerator8 = list.GetEnumerator()) { while (enumerator8.MoveNext()) { - var current8 = enumerator8.Current; - var array7 = current8.Split(new[] + string current8 = enumerator8.Current; + string[] array7 = current8.Split(new[] { ' ', '\t', @@ -363,12 +362,12 @@ public QbcParser(string fileName) text = text.ToLower(); if (!NoteList.ContainsKey(text)) { - var noteList = new Track(); - var spList = new Track(); - var battleNote = new Track(); - foreach (var current9 in list) + Track noteList = new Track(); + Track spList = new Track(); + Track battleNote = new Track(); + foreach (string current9 in list) { - var array8 = current9.Split(new[] + string[] array8 = current9.Split(new[] { ' ', '\t', @@ -445,30 +444,30 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 "Double" }; ArrayPointerRootNode @class; - for (var i = 0; i < array2.Length; i++) + for (int i = 0; i < array2.Length; i++) { - var a = array2[i]; + string a = array2[i]; string[] array3 = { "Guitar", "Rhythm" }; - for (var j = 0; j < array3.Length; j++) + for (int j = 0; j < array3.Length; j++) { - var text = array3[j]; - var array4 = array; - for (var k = 0; k < array4.Length; k++) + string text = array3[j]; + string[] array4 = array; + for (int k = 0; k < array4.Length; k++) { - var text2 = array4[k]; - var text3 = + string text2 = array4[k]; + string text3 = (text.ToLower() + ((a == "Double") ? "coop" : "") + "_" + text2.ToLower()) .Replace("guitar_", ""); @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_song_" + text3)); if (@class != null && @class.method_7() is IntegerArrayNode) { - var class2 = new Track(); - var array5 = @class.method_7().method_7(); - for (var l = 0; l < array5.Length; l += 3) + Track class2 = new Track(); + int[] array5 = @class.method_7().method_7(); + for (int l = 0; l < array5.Length; l += 3) { class2.Add(array5[l], new NotesAtOffset(array5[l + 2], array5[l + 1])); } @@ -477,8 +476,8 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_" + text3 + "_star")); if (@class != null && @class.method_7() is ListArrayNode) { - var class3 = new Track(); - foreach (var current in @class.method_7().method_8()) + Track class3 = new Track(); + foreach (IntegerArrayNode current in @class.method_7().method_8()) { class3.Add(current[0], new[] { @@ -492,8 +491,8 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 new ArrayPointerRootNode(string0 + "_" + text3 + "_starbattlemode")); if (@class != null && @class.method_7() is ListArrayNode) { - var class4 = new Track(); - foreach (var current2 in @class.method_7().method_8()) + Track class4 = new Track(); + foreach (IntegerArrayNode current2 in @class.method_7().method_8()) { class4.Add(current2[0], new[] { @@ -509,7 +508,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_faceoffp1")); if (@class != null && @class.method_7() is ListArrayNode) { - foreach (var current3 in @class.method_7().method_8()) + foreach (IntegerArrayNode current3 in @class.method_7().method_8()) { Class2282.Add(current3[0], current3[1]); } @@ -517,7 +516,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_faceoffp2")); if (@class != null && @class.method_7() is ListArrayNode) { - foreach (var current4 in @class.method_7().method_8()) + foreach (IntegerArrayNode current4 in @class.method_7().method_8()) { Class2283.Add(current4[0], current4[1]); } @@ -525,7 +524,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_bossbattlep1")); if (@class != null && @class.method_7() is ListArrayNode) { - foreach (var current5 in @class.method_7().method_8()) + foreach (IntegerArrayNode current5 in @class.method_7().method_8()) { BpmList.Add(current5[0], current5[1]); } @@ -533,7 +532,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_bossbattlep2")); if (@class != null && @class.method_7() is ListArrayNode) { - foreach (var current6 in @class.method_7().method_8()) + foreach (IntegerArrayNode current6 in @class.method_7().method_8()) { Class2285.Add(current6[0], current6[1]); } @@ -541,7 +540,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_timesig")); if (@class != null && @class.method_7() is ListArrayNode) { - foreach (var current7 in @class.method_7().method_8()) + foreach (IntegerArrayNode current7 in @class.method_7().method_8()) { TsList.Add(current7[0], new[] { @@ -557,7 +556,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 Int0 = (FretbarList[1] - FretbarList[0]) / 4; try { - var dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_markers")); if (class3081 != null && @class != null && @class.method_7() is StructureArrayNode) { @@ -565,11 +564,11 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 { dictionary.Add(class5.Int0, class5.method_7()); } - using (var enumerator9 = @class.method_7().method_8().GetEnumerator()) + using (List.Enumerator enumerator9 = @class.method_7().method_8().GetEnumerator()) { while (enumerator9.MoveNext()) { - var current8 = enumerator9.Current; + StructureHeaderNode current8 = enumerator9.Current; Class2281.Add(((IntegerStructureNode) current8[0]).method_8(), dictionary[((FileTagStructureNode) current8[1]).method_9()]); } @@ -578,7 +577,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 } if (@class != null && @class.method_7() is StructureArrayNode) { - foreach (var current9 in @class.method_7().method_8()) + foreach (StructureHeaderNode current9 in @class.method_7().method_8()) { Class2281.Add(((IntegerStructureNode) current9[0]).method_8(), ((UnicodeStructureNode) current9[1]).method_8()); @@ -608,7 +607,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 private int method_0(int int2) { - var num = _class2286.method_1(int2); + int num = _class2286.method_1(int2); return Convert.ToInt32((num + (int2 - _class2286.Keys[num]) / (double) _class2286.Values[num]) * Int1); } @@ -619,8 +618,10 @@ public ChartParser method_1() public ChartParser method_2(Gh3Song gh3Song1) { - var @class = new ChartParser(Gh3Song0); - @class.Constant480 = Int1; + ChartParser @class = new ChartParser(Gh3Song0) + { + Constant480 = Int1 + }; if (gh3Song1 != null) { @class.Gh3SongInfo.vmethod_0(gh3Song1); @@ -628,13 +629,13 @@ public ChartParser method_2(Gh3Song gh3Song1) _class2286 = new Track(); if (FretbarList != null) { - var value = FretbarList[0]; + int value = FretbarList[0]; FretbarList[0] = 0; - var num = 0; - for (var i = 1; i < FretbarList.Count; i++) + int num = 0; + for (int i = 1; i < FretbarList.Count; i++) { - var num2 = FretbarList[i] - FretbarList[i - 1]; - var num3 = Convert.ToInt32(60000000.0 / num2); + int num2 = FretbarList[i] - FretbarList[i - 1]; + int num3 = Convert.ToInt32(60000000.0 / num2); if (num3 != num) { @class.BpmInterpreter.BpmList.Add((i - 1) * Int1, num3); @@ -648,40 +649,40 @@ public ChartParser method_2(Gh3Song gh3Song1) { "end" })); - foreach (var current in Class2281.Keys) + foreach (int current in Class2281.Keys) { @class.SectionInterpreter.SectionList.Add(method_0(current), Class2281[current]); } - foreach (var current2 in TsList.Keys) + foreach (int current2 in TsList.Keys) { @class.BpmInterpreter.TsList.Add(method_0(current2), TsList[current2][0]); } - var class2 = new Track(); - var class3 = new Track(); - foreach (var current3 in Class2282.Keys) + Track class2 = new Track(); + Track class3 = new Track(); + foreach (int current3 in Class2282.Keys) { - var num4 = method_0(current3); - var num5 = method_0(current3 + Class2282[current3] - Int0) - num4; + int num4 = method_0(current3); + int num5 = method_0(current3 + Class2282[current3] - Int0) - num4; class2.Add(num4, (num5 <= Int1 / 4) ? 0 : num5); } - foreach (var current4 in Class2283.Keys) + foreach (int current4 in Class2283.Keys) { - var num4 = method_0(current4); - var num5 = method_0(current4 + Class2283[current4] - Int0) - num4; + int num4 = method_0(current4); + int num5 = method_0(current4 + Class2283[current4] - Int0) - num4; class3.Add(num4, (num5 <= Int1 / 4) ? 0 : num5); } - var class4 = new Track(); - var class5 = new Track(); - foreach (var current5 in BpmList.Keys) + Track class4 = new Track(); + Track class5 = new Track(); + foreach (int current5 in BpmList.Keys) { - var num4 = method_0(current5); - var num5 = method_0(current5 + BpmList[current5] - Int0) - num4; + int num4 = method_0(current5); + int num5 = method_0(current5 + BpmList[current5] - Int0) - num4; class4.Add(num4, (num5 <= Int1 / 4) ? 0 : num5); } - foreach (var current6 in Class2285.Keys) + foreach (int current6 in Class2285.Keys) { - var num4 = method_0(current6); - var num5 = method_0(current6 + Class2285[current6] - Int0) - num4; + int num4 = method_0(current6); + int num5 = method_0(current6 + Class2285[current6] - Int0) - num4; class5.Add(num4, (num5 <= Int1 / 4) ? 0 : num5); } string[] array = @@ -696,52 +697,52 @@ public ChartParser method_2(Gh3Song gh3Song1) "Single", "Double" }; - for (var j = 0; j < array2.Length; j++) + for (int j = 0; j < array2.Length; j++) { - var text = array2[j]; + string text = array2[j]; string[] array3 = { "Guitar", "Rhythm" }; - for (var k = 0; k < array3.Length; k++) + for (int k = 0; k < array3.Length; k++) { - var text2 = array3[k]; - var array4 = array; - for (var l = 0; l < array4.Length; l++) + string text2 = array3[k]; + string[] array4 = array; + for (int l = 0; l < array4.Length; l++) { - var text3 = array4[l]; - var key = (text2.ToLower() + ((text == "Double") ? "coop" : "") + "_" + text3.ToLower()) + string text3 = array4[l]; + string key = (text2.ToLower() + ((text == "Double") ? "coop" : "") + "_" + text3.ToLower()) .Replace("guitar_", ""); if (NoteList.ContainsKey(key)) { - var class6 = new NoteEventInterpreter(); - var class7 = NoteList[key]; - foreach (var current7 in class7.Keys) + NoteEventInterpreter class6 = new NoteEventInterpreter(); + Track class7 = NoteList[key]; + foreach (int current7 in class7.Keys) { - var num4 = method_0(current7); - var num5 = method_0(current7 + class7[current7].SustainLength - Int0) - num4; + int num4 = method_0(current7); + int num5 = method_0(current7 + class7[current7].SustainLength - Int0) - num4; class6.NoteList.Add(num4, new NotesAtOffset(class7[current7].NoteValues, (num5 <= Int1 / 4) ? 0 : num5)); } class6.AlwaysTrue = false; if (SpList.ContainsKey(key)) { - var class8 = SpList[key]; - foreach (var current8 in class8.Keys) + Track class8 = SpList[key]; + foreach (int current8 in class8.Keys) { - var num4 = method_0(current8); - var num5 = method_0(current8 + class8[current8][0] - Int0) - num4; + int num4 = method_0(current8); + int num5 = method_0(current8 + class8[current8][0] - Int0) - num4; class6.Class2281.Add(num4, (num5 <= Int1 / 4) ? 0 : num5); } } if (BattleNoteList.ContainsKey(key)) { - var class9 = SpList[key]; - foreach (var current9 in class9.Keys) + Track class9 = SpList[key]; + foreach (int current9 in class9.Keys) { - var num4 = method_0(current9); - var num5 = method_0(current9 + class9[current9][0] - Int0) - num4; + int num4 = method_0(current9); + int num5 = method_0(current9 + class9[current9][0] - Int0) - num4; class6.Class2284.Add(num4, (num5 <= Int1 / 4) ? 0 : num5); } } @@ -764,7 +765,7 @@ public ChartParser method_2(Gh3Song gh3Song1) public void QbcCreator(string fileLocation, Gh3Song song) { Gh3Song0 = song; - var streamWriter = new StreamWriter(fileLocation); + StreamWriter streamWriter = new StreamWriter(fileLocation); streamWriter.WriteLine("[Song]"); streamWriter.WriteLine("{"); streamWriter.WriteLine("\tName = \"" + Gh3Song0.Title + "\""); @@ -796,7 +797,7 @@ public void QbcCreator(string fileLocation, Gh3Song song) streamWriter.WriteLine("}"); streamWriter.WriteLine("[SyncTrack]"); streamWriter.WriteLine("{"); - foreach (var current in TsList.Keys) + foreach (int current in TsList.Keys) { streamWriter.WriteLine(string.Concat("\t", current, " = TS ", TsList[current][0], " ", TsList[current][1])); @@ -804,14 +805,14 @@ public void QbcCreator(string fileLocation, Gh3Song song) streamWriter.WriteLine("}"); streamWriter.WriteLine("[FretBars]"); streamWriter.WriteLine("{"); - foreach (var current2 in FretbarList) + foreach (int current2 in FretbarList) { streamWriter.WriteLine("\t" + current2); } streamWriter.WriteLine("}"); streamWriter.WriteLine("[Events]"); streamWriter.WriteLine("{"); - foreach (var current3 in Class2281.Keys) + foreach (int current3 in Class2281.Keys) { streamWriter.WriteLine(string.Concat("\t", current3, " = S \"", Class2281[current3], "\"")); } @@ -823,9 +824,9 @@ public void QbcCreator(string fileLocation, Gh3Song song) "guitarcoop_", "rhythmcoop_" }; - for (var i = 0; i < array.Length; i++) + for (int i = 0; i < array.Length; i++) { - var str = array[i]; + string str = array[i]; string[] array2 = { "easy", @@ -833,18 +834,18 @@ public void QbcCreator(string fileLocation, Gh3Song song) "hard", "expert" }; - for (var j = 0; j < array2.Length; j++) + for (int j = 0; j < array2.Length; j++) { - var str2 = array2[j]; - var text = str + str2; - var @class = NoteList.ContainsKey(text) ? NoteList[text] : new Track(); - var class2 = SpList.ContainsKey(text) ? SpList[text] : new Track(); - var class3 = BattleNoteList.ContainsKey(text) ? BattleNoteList[text] : new Track(); - var class4 = new Class221(@class.Keys); + string str2 = array2[j]; + string text = str + str2; + Track @class = NoteList.ContainsKey(text) ? NoteList[text] : new Track(); + Track class2 = SpList.ContainsKey(text) ? SpList[text] : new Track(); + Track class3 = BattleNoteList.ContainsKey(text) ? BattleNoteList[text] : new Track(); + Class221 class4 = new Class221(@class.Keys); class4.vmethod_1(class2.Keys); class4.vmethod_1(class3.Keys); class4.Sort(); - var stringBuilder = new StringBuilder(text); + StringBuilder stringBuilder = new StringBuilder(text); stringBuilder[0] = char.ToUpper(stringBuilder[0]); if (text.Contains("_")) { @@ -852,7 +853,7 @@ public void QbcCreator(string fileLocation, Gh3Song song) } streamWriter.WriteLine("[" + stringBuilder + "]"); streamWriter.WriteLine("{"); - foreach (var current4 in class4) + foreach (int current4 in class4) { if (@class.ContainsKey(current4)) { @@ -875,28 +876,28 @@ public void QbcCreator(string fileLocation, Gh3Song song) } streamWriter.WriteLine("[FaceOffP1]"); streamWriter.WriteLine("{"); - foreach (var current5 in Class2282.Keys) + foreach (int current5 in Class2282.Keys) { streamWriter.WriteLine(string.Concat("\t", current5, " = F ", Class2282[current5])); } streamWriter.WriteLine("}"); streamWriter.WriteLine("[FaceOffP2]"); streamWriter.WriteLine("{"); - foreach (var current6 in Class2283.Keys) + foreach (int current6 in Class2283.Keys) { streamWriter.WriteLine(string.Concat("\t", current6, " = F ", Class2283[current6])); } streamWriter.WriteLine("}"); streamWriter.WriteLine("[BossBattleP1]"); streamWriter.WriteLine("{"); - foreach (var current7 in BpmList.Keys) + foreach (int current7 in BpmList.Keys) { streamWriter.WriteLine(string.Concat("\t", current7, " = B ", BpmList[current7])); } streamWriter.WriteLine("}"); streamWriter.WriteLine("[BossBattleP2]"); streamWriter.WriteLine("{"); - foreach (var current8 in Class2285.Keys) + foreach (int current8 in Class2285.Keys) { streamWriter.WriteLine(string.Concat("\t", current8, " = B ", Class2285[current8])); } @@ -906,8 +907,8 @@ public void QbcCreator(string fileLocation, Gh3Song song) public ZzGenericNode1 method_4(string string0) { - var @class = new ZzGenericNode1(); - var int_ = QbSongClass1.AddKeyToDictionary("songs\\" + string0 + ".mid.qb"); + ZzGenericNode1 @class = new ZzGenericNode1(); + int int_ = QbSongClass1.AddKeyToDictionary("songs\\" + string0 + ".mid.qb"); string[] array = { "", @@ -916,9 +917,9 @@ public ZzGenericNode1 method_4(string string0) "rhythmcoop_", "aux_" }; - for (var i = 0; i < array.Length; i++) + for (int i = 0; i < array.Length; i++) { - var str = array[i]; + string str = array[i]; string[] array2 = { "easy", @@ -926,10 +927,10 @@ public ZzGenericNode1 method_4(string string0) "hard", "expert" }; - for (var j = 0; j < array2.Length; j++) + for (int j = 0; j < array2.Length; j++) { - var str2 = array2[j]; - var text = str + str2; + string str2 = array2[j]; + string text = str + str2; if (NoteList.ContainsKey(text)) { method_5(int_, string0 + "_song_" + text, @class, NoteList[text]); @@ -989,8 +990,8 @@ private void method_5(int int2, string string0, ZzGenericNode1 class3080, Track< method_11(int2, string0, class3080); return; } - var list = new List(); - foreach (var current in class2287.Keys) + List list = new List(); + foreach (int current in class2287.Keys) { list.Add(current); list.Add(class2287[current].SustainLength); @@ -1006,8 +1007,8 @@ private void method_6(int int2, string string0, ZzGenericNode1 class3080, Track< method_11(int2, string0, class3080); return; } - var @class = new ListArrayNode(); - foreach (var current in class2287.Keys) + ListArrayNode @class = new ListArrayNode(); + foreach (int current in class2287.Keys) { @class.addChild(new IntegerArrayNode(new[] { @@ -1026,8 +1027,8 @@ private void method_7(int int2, string string0, ZzGenericNode1 class3080, Track< method_11(int2, string0, class3080); return; } - var @class = new ListArrayNode(); - foreach (var current in class2287.Keys) + ListArrayNode @class = new ListArrayNode(); + foreach (int current in class2287.Keys) { @class.addChild(new IntegerArrayNode(new[] { @@ -1040,8 +1041,8 @@ private void method_7(int int2, string string0, ZzGenericNode1 class3080, Track< private void method_8(int int2, string string0, ZzGenericNode1 class3080) { - var @class = new ListArrayNode(); - foreach (var current in TsList.Keys) + ListArrayNode @class = new ListArrayNode(); + foreach (int current in TsList.Keys) { @class.addChild(new IntegerArrayNode(new[] { @@ -1065,8 +1066,8 @@ private void method_10(int int2, string string0, ZzGenericNode1 class3080) method_11(int2, string0, class3080); return; } - var @class = new StructureArrayNode(); - foreach (var current in Class2281.Keys) + StructureArrayNode @class = new StructureArrayNode(); + foreach (int current in Class2281.Keys) { @class.addChild(new StructureHeaderNode(new ZzUnkNode294[] { diff --git a/GHNamespaceN/Stream16.cs b/GHNamespaceN/Stream16.cs index cdd2cd2..04d567a 100644 --- a/GHNamespaceN/Stream16.cs +++ b/GHNamespaceN/Stream16.cs @@ -30,7 +30,7 @@ public Stream16(Stream stream1, WaveFormat waveFormat1, BeConfig beConfig1) : ba try { _beConfig0 = beConfig1; - var num = LameEncoder.beInitStream(_beConfig0, ref _uint1, ref _uint2, ref _uint0); + uint num = LameEncoder.beInitStream(_beConfig0, ref _uint1, ref _uint2, ref _uint0); if (num != 0u) { throw new ApplicationException( @@ -57,7 +57,7 @@ public void method_1() { try { - var num = 0u; + uint num = 0u; if (_int2 > 0 && LameEncoder.smethod_0(_uint0, _byte0, 0, (uint) _int2, _byte1, ref num) == 0u && num > 0u) { @@ -85,12 +85,12 @@ public override void Close() public override void Write(byte[] buffer, int offset, int count) { - var num = 0u; + uint num = 0u; while (count > 0) { if (_int2 > 0) { - var num2 = Math.Min(count, _byte0.Length - _int2); + int num2 = Math.Min(count, _byte0.Length - _int2); Buffer.BlockCopy(buffer, offset, _byte0, _int2, num2); _int2 += num2; offset += num2; @@ -98,7 +98,7 @@ public override void Write(byte[] buffer, int offset, int count) if (_int2 >= _byte0.Length) { _int2 = 0; - var num3 = LameEncoder.smethod_1(_uint0, _byte0, _byte1, ref num); + uint num3 = LameEncoder.smethod_1(_uint0, _byte0, _byte1, ref num); if (num3 != 0u) { throw new ApplicationException("Lame_encDll.EncodeChunk failed with the error code " + @@ -112,7 +112,7 @@ public override void Write(byte[] buffer, int offset, int count) } else if (count >= _byte0.Length) { - var num3 = LameEncoder.smethod_0(_uint0, buffer, offset, (uint) _byte0.Length, _byte1, ref num); + uint num3 = LameEncoder.smethod_0(_uint0, buffer, offset, (uint) _byte0.Length, _byte1, ref num); if (num3 != 0u) { throw new ApplicationException("Lame_encDll.EncodeChunk failed with the error code " + num3); @@ -136,18 +136,18 @@ public override void Write(byte[] buffer, int offset, int count) public static Class16 smethod_0(GenericAudioStream stream10, Stream stream1, int int3, int int4) { - var waveFormat = stream10.vmethod_0(); + WaveFormat waveFormat = stream10.vmethod_0(); if (waveFormat.waveFormatTag_0 != WaveFormatTag.Pcm || waveFormat.short_2 != 16) { stream10 = new Stream4(stream10, 16); waveFormat = stream10.vmethod_0(); } - var stream = new Stream16(stream1, waveFormat, + Stream16 stream = new Stream16(stream1, waveFormat, (waveFormat.int_0 == int3) ? new BeConfig(waveFormat, (uint) int4) : new BeConfig(waveFormat, (uint) int4, (uint) int3)); - var uint_ = (uint) stream.vmethod_1().Position; - var array = new byte[stream.method_0() * 2]; + uint uint_ = (uint) stream.vmethod_1().Position; + byte[] array = new byte[stream.method_0() * 2]; Class16 result; try { @@ -173,15 +173,15 @@ public static Class16 smethod_1(Stream stream1, Class16 class160, int int3) public static Class16 smethod_2(Stream stream1, TimeSpan timeSpan0, int int3, int int4, bool bool1) { - var waveFormat = new WaveFormat(int3, 16, bool1 ? 2 : 1); - var stream = new Stream16(stream1, waveFormat, new BeConfig(waveFormat, (uint) int4)); - var uint_ = (uint) stream.vmethod_1().Position; - var array = new byte[stream.method_0() * 2]; + WaveFormat waveFormat = new WaveFormat(int3, 16, bool1 ? 2 : 1); + Stream16 stream = new Stream16(stream1, waveFormat, new BeConfig(waveFormat, (uint) int4)); + uint uint_ = (uint) stream.vmethod_1().Position; + byte[] array = new byte[stream.method_0() * 2]; Class16 result; try { - var num = 0; - var num2 = (int) (timeSpan0.TotalSeconds * waveFormat.int_1); + int num = 0; + int num2 = (int) (timeSpan0.TotalSeconds * waveFormat.int_1); int count; while ((count = Math.Min(num2 - num - array.Length, array.Length)) > 0) { diff --git a/GuitarHero.Setlist/GH3Setlist.cs b/GuitarHero.Setlist/GH3Setlist.cs index 0aab107..6f9c1cd 100644 --- a/GuitarHero.Setlist/GH3Setlist.cs +++ b/GuitarHero.Setlist/GH3Setlist.cs @@ -66,12 +66,12 @@ public void method_5(StructureHeaderNode class2860, Gh3Songlist gh3Songlist0) ? @class.method_8() : ""); IntegerStructureNode class2; - var num = ((class2 = class2860.zzFindNode(new IntegerStructureNode("num_tiers"))) != null) + int num = ((class2 = class2860.zzFindNode(new IntegerStructureNode("num_tiers"))) != null) ? class2.method_8() : 0; try { - for (var i = 1; i <= num; i++) + for (int i = 1; i <= num; i++) { Tiers.Add(new Gh3Tier(class2860.zzFindNode(new StructurePointerNode("tier" + i)).method_8(), gh3Songlist0)); @@ -85,11 +85,11 @@ public void method_5(StructureHeaderNode class2860, Gh3Songlist gh3Songlist0) public StructureHeaderNode method_6() { - var @class = new StructureHeaderNode(); + StructureHeaderNode @class = new StructureHeaderNode(); @class.addChild(new AsciiStructureNode("prefix", Prefix)); @class.addChild(new IntegerStructureNode("num_tiers", Tiers.Count)); @class.addChild(new AsciiStructureNode("initial_movie", InitialMovie)); - for (var i = 0; i < Tiers.Count; i++) + for (int i = 0; i < Tiers.Count; i++) { @class.addChild(new StructurePointerNode("tier" + (i + 1), Tiers[i].method_3())); } diff --git a/GuitarHero.Songlist/GH3Song.cs b/GuitarHero.Songlist/GH3Song.cs index faf9c42..60f59a5 100644 --- a/GuitarHero.Songlist/GH3Song.cs +++ b/GuitarHero.Songlist/GH3Song.cs @@ -82,7 +82,7 @@ public virtual void vmethod_0(INterface16 interface160) { if (interface160 is Gh3Song) { - var gH3Song = interface160 as Gh3Song; + Gh3Song gH3Song = interface160 as Gh3Song; OriginalArtist = gH3Song.OriginalArtist; NotBass = gH3Song.NotBass; NoRhythmTrack = gH3Song.NoRhythmTrack; @@ -220,7 +220,7 @@ public virtual void vmethod_4(StructurePointerNode class3020) public virtual StructurePointerNode vmethod_5() { - var @class = new StructureHeaderNode(); + StructureHeaderNode @class = new StructureHeaderNode(); @class.addChild(new StructItemQbKey("checksum", Name)); @class.addChild(new AsciiStructureNode("name", Name)); @class.addChild(new UnicodeStructureNode("title", Title)); diff --git a/GuitarHero.Songlist/GH3Songlist.cs b/GuitarHero.Songlist/GH3Songlist.cs index 7f6cf16..a269848 100644 --- a/GuitarHero.Songlist/GH3Songlist.cs +++ b/GuitarHero.Songlist/GH3Songlist.cs @@ -78,10 +78,10 @@ public void method_0(Gh3Song gh3Song0, bool bool0) public List method_1(Gh3Song gh3Song0) { - var list = new List(); - foreach (var current in Gh3SetlistList.Keys) + List list = new List(); + foreach (int current in Gh3SetlistList.Keys) { - foreach (var current2 in Gh3SetlistList[current].method_0()) + foreach (Tier.Gh3Tier current2 in Gh3SetlistList[current].method_0()) { if (current2.method_0().Contains(gh3Song0)) { @@ -99,16 +99,16 @@ public List method_1(Gh3Song gh3Song0) public Gh3Song[] GetSongs() { - var songList = new List(Values); + List songList = new List(Values); if (songList.Count != 0) { if (HideUsed) { - foreach (var current in Gh3SetlistList.Values) + foreach (Gh3Setlist current in Gh3SetlistList.Values) { - foreach (var current2 in current.method_0()) + foreach (Tier.Gh3Tier current2 in current.method_0()) { - foreach (var current3 in current2.method_0()) + foreach (Gh3Song current3 in current2.method_0()) { if (songList.Contains(current3)) { @@ -120,7 +120,7 @@ public Gh3Song[] GetSongs() } if (HideUnEditable) { - foreach (var current4 in Values) + foreach (Gh3Song current4 in Values) { if (!current4.IsEditable()) { @@ -128,7 +128,7 @@ public Gh3Song[] GetSongs() } } } - foreach (var current5 in Values) + foreach (Gh3Song current5 in Values) { if (!current5.IsVisible()) { @@ -146,7 +146,7 @@ public bool method_3(string string0) public Gh3Setlist method_4(string string0, StructurePointerRootNode class2660) { - var gH3Setlist = new Gh3Setlist(class2660.method_7(), this); + Gh3Setlist gH3Setlist = new Gh3Setlist(class2660.method_7(), this); gH3Setlist.method_3(string0); Gh3SetlistList.Add(class2660.Int0, gH3Setlist); return gH3Setlist; @@ -154,7 +154,7 @@ public Gh3Setlist method_4(string string0, StructurePointerRootNode class2660) public GhLink method_5(string string0, StructurePointerRootNode class2660) { - var gHLink = new GhLink(string0, class2660.method_7()); + GhLink gHLink = new GhLink(string0, class2660.method_7()); Dictionary1.Add(class2660.Int0, gHLink); return gHLink; } @@ -163,7 +163,7 @@ public void method_6(StructureArrayNode class2920) { foreach (StructureHeaderNode @class in class2920.Nodes) { - var num = @class.zzFindNode(new StructItemQbKey("tag")).method_10(); + int num = @class.zzFindNode(new StructItemQbKey("tag")).method_10(); if (Dictionary1.ContainsKey(num)) { Class2140.Add(@class.zzFindNode(new UnicodeStructureNode("text")).method_8(), num); @@ -173,8 +173,8 @@ public void method_6(StructureArrayNode class2920) public StructureArrayNode method_7() { - var @class = new StructureArrayNode(); - foreach (var current in Class2140.Keys) + StructureArrayNode @class = new StructureArrayNode(); + foreach (string current in Class2140.Keys) { @class.addChild(new StructureHeaderNode(new List { @@ -187,7 +187,7 @@ public StructureArrayNode method_7() public string method_8(int int0) { - foreach (var current in Dictionary1.Keys) + foreach (int current in Dictionary1.Keys) { if (Dictionary1[current].Setlist == int0) { @@ -214,12 +214,12 @@ public Gh3Setlist method_11(int int0) public void FindEditableSongs(ZzGenericNode1 class3080, Gh3Songlist gh3Songlist0) { - var @class = class3080.zzFindNode(new StructurePointerRootNode("permanent_songlist_props")).method_7(); - var flag = class3080.zzFindNode(new StructItemQbKey("band")) != null; + StructureHeaderNode @class = class3080.zzFindNode(new StructurePointerRootNode("permanent_songlist_props")).method_7(); + bool flag = class3080.zzFindNode(new StructItemQbKey("band")) != null; Clear(); foreach (StructurePointerNode class2 in @class.Nodes) { - var gH3Song = flag ? new GhaSong(class2) : new Gh3Song(class2); + Gh3Song gH3Song = flag ? new GhaSong(class2) : new Gh3Song(class2); if (gh3Songlist0 != null) { gH3Song.SetEditable(!gh3Songlist0.method_3(gH3Song.GetSongName())); @@ -231,9 +231,9 @@ public void FindEditableSongs(ZzGenericNode1 class3080, Gh3Songlist gh3Songlist0 public void method_13(ZzGenericNode1 class3080) { - var list = new List(); - var list2 = new List(); - foreach (var current in Keys) + List list = new List(); + List list2 = new List(); + foreach (string current in Keys) { list.Add(QbSongClass1.AddKeyToDictionary(current)); list2.Add(base[current].vmethod_5()); diff --git a/GuitarHero.Songlist/GHASong.cs b/GuitarHero.Songlist/GHASong.cs index edc2b54..5023acd 100644 --- a/GuitarHero.Songlist/GHASong.cs +++ b/GuitarHero.Songlist/GHASong.cs @@ -44,7 +44,7 @@ public override void vmethod_0(INterface16 interface160) base.vmethod_0(interface160); if (interface160 is GhaSong) { - var gHaSong = interface160 as GhaSong; + GhaSong gHaSong = interface160 as GhaSong; gHaSong.CoveredBy = CoveredBy; gHaSong.Band = Band; gHaSong.GuitaristChecksum = GuitaristChecksum; @@ -82,8 +82,8 @@ public override void vmethod_4(StructurePointerNode class3020) public override StructurePointerNode vmethod_5() { - var @class = base.vmethod_5(); - var class2 = @class.method_8(); + StructurePointerNode @class = base.vmethod_5(); + StructureHeaderNode class2 = @class.method_8(); if (!CoveredBy.Equals("")) { class2.addChild(new UnicodeStructureNode("covered_by", CoveredBy)); diff --git a/GuitarHero.Tier/GH3Tier.cs b/GuitarHero.Tier/GH3Tier.cs index ef6f6d2..ed6ed42 100644 --- a/GuitarHero.Tier/GH3Tier.cs +++ b/GuitarHero.Tier/GH3Tier.cs @@ -96,10 +96,10 @@ public void method_2(StructureHeaderNode class2860, Gh3Songlist gh3Songlist0) Boss = (class2860.zzFindNode(new StructItemQbKey(0, "boss")) != null); Nocash = (class2860.zzFindNode(new StructItemQbKey(0, "nocash")) != null); Unlockall = (class2860.zzFindNode(new StructItemQbKey(0, "unlockall")) != null); - var class5 = new ArrayPointerNode("songs"); + ArrayPointerNode class5 = new ArrayPointerNode("songs"); if (class2860.method_6(ref class5) && !(class5.GetFirstChild() is FloatListNode)) { - foreach (var current in class5.GetFirstChild().method_8()) + foreach (string current in class5.GetFirstChild().method_8()) { if (gh3Songlist0.ContainsKey(current)) { @@ -115,7 +115,7 @@ public void method_2(StructureHeaderNode class2860, Gh3Songlist gh3Songlist0) public StructureHeaderNode method_3() { - var @class = new StructureHeaderNode(); + StructureHeaderNode @class = new StructureHeaderNode(); @class.addChild(new UnicodeStructureNode("title", Title)); if (Songs.Count == 0) { @@ -123,8 +123,8 @@ public StructureHeaderNode method_3() } else { - var list = new List(); - foreach (var current in Songs) + List list = new List(); + foreach (Gh3Song current in Songs) { list.Add(QbSongClass1.AddKeyToDictionary(current.Name)); } diff --git a/GuitarHero/GHLink.cs b/GuitarHero/GHLink.cs index 755cbc5..452b038 100644 --- a/GuitarHero/GHLink.cs +++ b/GuitarHero/GHLink.cs @@ -43,7 +43,7 @@ public void method_0(StructureHeaderNode class2860) public StructureHeaderNode method_1() { - var @class = new StructureHeaderNode(); + StructureHeaderNode @class = new StructureHeaderNode(); @class.addChild(new StructItemQbKey("tier_global", Setlist)); @class.addChild(new StructItemQbKey("progression_global", Progression)); return @class; diff --git a/MidiConverter/Midi2Chart.cs b/MidiConverter/Midi2Chart.cs index 8fe510c..6ebbf55 100644 --- a/MidiConverter/Midi2Chart.cs +++ b/MidiConverter/Midi2Chart.cs @@ -16,8 +16,8 @@ public static QbcParser LoadMidiSong(string fileName, bool forceRb3) try { song = MidReader.ReadMidi(fileName); - var chartFile = ChartWriter.writeChart(song, "", false, forceRb3).ToString(); - var chartParser = new ChartParser(chartFile, false); + string chartFile = ChartWriter.writeChart(song, "", false, forceRb3).ToString(); + ChartParser chartParser = new ChartParser(chartFile, false); chartParser.Gh3SongInfo = IniParser.ParseIni(Path.GetDirectoryName(fileName), chartParser.Gh3SongInfo); qbc = chartParser.ConvertToQbc(); } diff --git a/SharpAudio.ASC.Mp3.Decoding/CircularByteBuffer.cs b/SharpAudio.ASC.Mp3.Decoding/CircularByteBuffer.cs index 0333e8a..2e7532a 100644 --- a/SharpAudio.ASC.Mp3.Decoding/CircularByteBuffer.cs +++ b/SharpAudio.ASC.Mp3.Decoding/CircularByteBuffer.cs @@ -78,8 +78,8 @@ public int method_3() public override string ToString() { - var text = ""; - for (var i = 0; i < _dataArray.Length; i++) + string text = ""; + for (int i = 0; i < _dataArray.Length; i++) { text = text + _dataArray[i] + " "; } diff --git a/SharpAudio.ASC.Mp3.Lame/LHV1.cs b/SharpAudio.ASC.Mp3.Lame/LHV1.cs index 8fd244b..48934ed 100644 --- a/SharpAudio.ASC.Mp3.Lame/LHV1.cs +++ b/SharpAudio.ASC.Mp3.Lame/LHV1.cs @@ -74,7 +74,7 @@ public Lhv1(WaveFormat waveFormat0, uint uint0, uint uint1) } dwStructVersion = 1u; dwStructSize = (uint) Marshal.SizeOf(typeof(BeConfig)); - var num = (uint) ((uint1 == 0u) ? waveFormat0.int_0 : ((int) uint1)); + uint num = (uint) ((uint1 == 0u) ? waveFormat0.int_0 : ((int) uint1)); if (num <= 24000u) { if (num == 16000u || num == 22050u || num == 24000u) diff --git a/SharpAudio.ASC/AudioConfig.cs b/SharpAudio.ASC/AudioConfig.cs index 85c5163..fd7e958 100644 --- a/SharpAudio.ASC/AudioConfig.cs +++ b/SharpAudio.ASC/AudioConfig.cs @@ -10,9 +10,9 @@ public class AudioConfig : ISerializable public AudioConfig(SerializationInfo serializationInfo0, StreamingContext streamingContext0) { - var @int = serializationInfo0.GetInt32("Format.Rate"); - var int2 = serializationInfo0.GetInt32("Format.Bits"); - var int3 = serializationInfo0.GetInt32("Format.Channels"); + int @int = serializationInfo0.GetInt32("Format.Rate"); + int int2 = serializationInfo0.GetInt32("Format.Bits"); + int int3 = serializationInfo0.GetInt32("Format.Channels"); MFormat = new WaveFormat(@int, int2, int3); } diff --git a/SharpAudio.ASC/WaveFormat.cs b/SharpAudio.ASC/WaveFormat.cs index 8a4d325..b517b3a 100644 --- a/SharpAudio.ASC/WaveFormat.cs +++ b/SharpAudio.ASC/WaveFormat.cs @@ -54,7 +54,7 @@ public WaveFormat(int int2, int int3) public override string ToString() { - var waveFormatTag = waveFormatTag_0; + WaveFormatTag waveFormatTag = waveFormatTag_0; if (waveFormatTag != WaveFormatTag.Pcm) { if (waveFormatTag != WaveFormatTag.Extensible) @@ -67,8 +67,7 @@ public override string ToString() public override bool Equals(object obj) { - var waveFormat = obj as WaveFormat; - return waveFormat != null && + return obj is WaveFormat waveFormat && (waveFormatTag_0 == waveFormat.waveFormatTag_0 && short_0 == waveFormat.short_0 && int_0 == waveFormat.int_0 && int_1 == waveFormat.int_1 && short_1 == waveFormat.short_1) && short_2 == waveFormat.short_2; @@ -81,8 +80,8 @@ public override int GetHashCode() public static WaveFormat smethod_0(IntPtr intptr0) { - var waveFormat = (WaveFormat) Marshal.PtrToStructure(intptr0, typeof(WaveFormat)); - var waveFormatTag = waveFormat.waveFormatTag_0; + WaveFormat waveFormat = (WaveFormat) Marshal.PtrToStructure(intptr0, typeof(WaveFormat)); + WaveFormatTag waveFormatTag = waveFormat.waveFormatTag_0; switch (waveFormatTag) { case WaveFormatTag.Pcm: @@ -110,15 +109,15 @@ public static WaveFormat smethod_0(IntPtr intptr0) public static IntPtr smethod_1(WaveFormat waveFormat0) { - var cb = Marshal.SizeOf(waveFormat0); - var intPtr = Marshal.AllocHGlobal(cb); + int cb = Marshal.SizeOf(waveFormat0); + IntPtr intPtr = Marshal.AllocHGlobal(cb); Marshal.StructureToPtr(waveFormat0, intPtr, false); return intPtr; } public int method_0(int int2) { - var num = (int) (int_1 / 1000.0 * int2); + int num = (int) (int_1 / 1000.0 * int2); if (num % short_1 != 0) { return num + short_1 - num % short_1; diff --git a/SystemTools/BitList.cs b/SystemTools/BitList.cs index f9653f8..525ac02 100644 --- a/SystemTools/BitList.cs +++ b/SystemTools/BitList.cs @@ -93,8 +93,8 @@ public bool this[int index] { throw new ArgumentOutOfRangeException(); } - var num = index >> 3; - var num2 = index & 7; + int num = index >> 3; + int num2 = index & 7; if (value) { List list; @@ -124,7 +124,7 @@ public BitList(BitList bitList0) public static byte[] smethod_0(T gparam0) where T : struct { - var array = new byte[Marshal.SizeOf(gparam0)]; + byte[] array = new byte[Marshal.SizeOf(gparam0)]; try { T[] src = @@ -137,7 +137,7 @@ public static byte[] smethod_0(T gparam0) where T : struct catch { } - var gCHandle = GCHandle.Alloc(array, GCHandleType.Pinned); + GCHandle gCHandle = GCHandle.Alloc(array, GCHandleType.Pinned); try { Marshal.StructureToPtr(gparam0, gCHandle.AddrOfPinnedObject(), false); @@ -151,8 +151,8 @@ public static byte[] smethod_0(T gparam0) where T : struct public void method_0(int int0, byte byte0) { - var num = int0 >> 3; - var num2 = int0 & 7; + int num = int0 >> 3; + int num2 = int0 & 7; if (num2 == 0) { _data[num] = byte0; @@ -190,7 +190,7 @@ public void method_1(IEnumerable ienumerable0) { if (_bitLength != 0 && (_bitLength & 7) != 0) { - foreach (var current in ienumerable0) + foreach (byte current in ienumerable0) { method_0(_bitLength, current); } @@ -202,8 +202,8 @@ public void method_1(IEnumerable ienumerable0) public override string ToString() { - var text = string.Empty; - using (var enumerator = GetEnumerator()) + string text = string.Empty; + using (IEnumerator enumerator = GetEnumerator()) { while (enumerator.MoveNext()) { @@ -215,13 +215,13 @@ public override string ToString() public override bool Equals(object obj) { - var bitList = (BitList) obj; + BitList bitList = (BitList) obj; if (_bitLength != bitList._bitLength) { return false; } - var num = (_bitLength >> 3) + 1; - for (var i = 0; i < num; i++) + int num = (_bitLength >> 3) + 1; + for (int i = 0; i < num; i++) { if (_data[i] != bitList._data[i]) { @@ -238,7 +238,7 @@ public override int GetHashCode() public int IndexOf(bool item) { - for (var i = 0; i < _bitLength; i++) + for (int i = 0; i < _bitLength; i++) { if (this[i] == item) { @@ -263,12 +263,12 @@ public void Insert(int index, bool item) { _data.Add(0); } - var num = 1; - var num2 = 7; - var num3 = _data.Count - 1; - var num4 = index >> 3; - var num5 = index - (num4 << 3); - for (var i = num3; i > num4; i--) + int num = 1; + int num2 = 7; + int num3 = _data.Count - 1; + int num4 = index >> 3; + int num5 = index - (num4 << 3); + for (int i = num3; i > num4; i--) { _data[i] = (byte) (_data[i] << num | _data[i - 1] >> num2); } @@ -286,13 +286,13 @@ public void RemoveAt(int index) { if (index >= 0 && index < _bitLength) { - var num = 1; - var num2 = 7; - var num3 = _data.Count - 1; - var num4 = index >> 3; - var num5 = index - (num4 << 3); - var b = _data[num4]; - for (var i = num4; i < num3; i++) + int num = 1; + int num2 = 7; + int num3 = _data.Count - 1; + int num4 = index >> 3; + int num5 = index - (num4 << 3); + byte b = _data[num4]; + for (int i = num4; i < num3; i++) { _data[i] = (byte) (_data[i] >> num | _data[i + 1] << num2); } @@ -312,7 +312,7 @@ public void RemoveAt(int index) public void Add(bool item) { - var num = (_data.Count << 3) - _bitLength; + int num = (_data.Count << 3) - _bitLength; if (num > 0) { if (item) @@ -343,7 +343,7 @@ public void Clear() public bool Contains(bool item) { - foreach (var current in _data) + foreach (byte current in _data) { if (item ? (current != 0) : (current != 255)) { @@ -357,7 +357,7 @@ public void CopyTo(bool[] array, int index) { if (index >= 0 && index + _bitLength < array.Length) { - for (var i = 0; i < _bitLength; i++) + for (int i = 0; i < _bitLength; i++) { array[index + i] = this[i]; } @@ -368,7 +368,7 @@ public void CopyTo(bool[] array, int index) public bool Remove(bool item) { - var num = IndexOf(item); + int num = IndexOf(item); if (num < 0) { return false;